/* =============================================================================
   PakMaths Portal — shared theme
   Brand: orange #F4711E on deep navy #0a1020 (matches /enquiry).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --orange:   #F4711E;
  --orange-d: #d65f12;
  --bg:       #0a1020;
  --bg-2:     #0e1730;
  --card:     #15223f;
  --card-2:   #1b2c4f;
  --line:     rgba(255,255,255,.10);
  --line-2:   rgba(255,255,255,.18);
  --txt:      #eaf0ff;
  --muted:    #93a2c4;
  --ok:       #22c55e;
  --warn:     #f59e0b;
  --bad:      #ef4444;
  --radius:   14px;
  --shadow:   0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 700px at 80% -10%, #16224a 0%, var(--bg) 55%) fixed;
  color: var(--txt);
  font: 400 16px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,h2,h3 { line-height: 1.15; margin: 0 0 .4em; }
.display { font-family: Anton, Inter, sans-serif; letter-spacing: .5px; text-transform: uppercase; }
a { color: var(--orange); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: rgba(10,16,32,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { height: 40px; width: auto; flex: none; display: inline-flex; }
/* show the FULL wide badge; clip only the white corner margin + round it */
.topbar .logo img { height: 40px; width: auto; display: block; clip-path: inset(2.5% round 9px); }
.topbar .brand { font-family: Anton; font-size: 20px; letter-spacing: .5px; }
.topbar .brand small { display: block; font: 500 11px/1 Inter; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }

/* cards */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px Inter; cursor: pointer; border: 0; border-radius: 12px;
  padding: 11px 18px; color: #fff;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-d) 100%);
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--txt); }
.btn.danger { background: linear-gradient(180deg,#ef4444,#b91c1c); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }

/* forms */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 14px; }
input, select, textarea {
  width: 100%; font: 400 15px Inter; color: var(--txt);
  background: #0b142b; border: 1px solid var(--line-2);
  border-radius: 11px; padding: 11px 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); }
textarea { resize: vertical; min-height: 80px; }
.field + .field { margin-top: 12px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: rgba(255,255,255,.02); }

/* pills / badges */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line-2);
}
.pill.present, .pill.paid   { background: rgba(34,197,94,.15);  color: #86efac; border-color: rgba(34,197,94,.4); }
.pill.absent,  .pill.unpaid { background: rgba(239,68,68,.15);  color: #fca5a5; border-color: rgba(239,68,68,.4); }
.pill.late                  { background: rgba(245,158,11,.15); color: #fcd34d; border-color: rgba(245,158,11,.4); }
.pill.excused               { background: rgba(147,162,196,.15); color: #cbd5e1; }
.pill.recording_sent        { background: rgba(6,182,212,.15);  color: #67e8f9; border-color: rgba(6,182,212,.4); }
.pill.note     { background: rgba(99,102,241,.15);  color: #c7d2fe; }
.pill.homework { background: rgba(244,113,30,.15);  color: #fdba74; }
.pill.past_paper { background: rgba(6,182,212,.15); color: #67e8f9; }
.pill.resource { background: rgba(147,162,196,.15); color: #cbd5e1; }

/* tabs / nav */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  background: none; border: 0; color: var(--muted); font: 700 15px Inter;
  padding: 11px 16px; cursor: pointer; border-bottom: 2px solid transparent;
}
.tab.active { color: var(--txt); border-bottom-color: var(--orange); }

/* misc */
.thumb { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); cursor: zoom-in; }
.empty { color: var(--muted); text-align: center; padding: 30px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--txt);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 999;
  font-weight: 600;
}
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* full-screen login */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .logo-lg { height: 66px; width: fit-content; margin: 0 auto 16px; }
.auth-card .logo-lg img { height: 66px; width: auto; display: block; clip-path: inset(2.5% round 12px); }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 1000; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
