/* ==========================================================================
   Lens Polytechnic Offa — Student Portal design system
   Tokens → base → layout → components → pages → dark mode → print.
   Living style guide: portal/stu/styleguide (under the website root)
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ----------
   Latin subset only (₦ and other rarer symbols fall back to the phone's own
   font). font-display: optional — on a slow first visit the system font is
   used for that page rather than swapping mid-read; once cached, every page
   renders in Inter / Plus Jakarta Sans from the first paint. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: optional; src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700 800; font-display: optional; src: url("fonts/jakarta-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --maroon-900: #3a0402; --maroon-800: #560602; --maroon-700: #7A0703; --maroon-600: #93241f;
  --maroon-500: #b1463f; --maroon-200: #efc9c6; --maroon-100: #f8e7e5; --maroon-50: #fcf3f2;
  --steel-800: #1f3f58; --steel-700: #2c5577; --steel-600: #3a6a90; --steel-500: #4678A1;
  --steel-100: #e2edf6; --steel-50: #f1f6fb;
  --gold-700: #9a5f05; --gold-600: #c47b08; --gold-500: #E2900C; --gold-400: #efa83a;
  --gold-100: #fcefd6; --gold-50: #fef8ec;

  /* Neutrals (warm) */
  --n-0: #ffffff; --n-25: #fcfbf9; --n-50: #f7f5f2; --n-100: #efece7; --n-200: #e3dfd8;
  --n-300: #cdc7be; --n-400: #a19b92; --n-500: #6b665e; --n-600: #56524b; --n-700: #3f3c37;
  --n-800: #292724; --n-900: #171614;

  /* Semantic */
  --success: #13743a; --success-bg: #e6f5ec; --success-bd: #b6e0c5;
  --warning: #955600; --warning-bg: #fdf3df; --warning-bd: #f2d49b;
  --danger:  #b3261e; --danger-bg:  #fdecea; --danger-bd:  #f3c2bd;
  --info:    #2c5577; --info-bg:    #e7f0f8; --info-bd:    #bcd3e7;

  /* Roles */
  --bg: var(--n-50);
  --surface: var(--n-0);
  --surface-2: var(--n-25);
  --surface-3: var(--n-100);
  --border: var(--n-200);
  --border-strong: var(--n-300);
  --text: var(--n-900);
  --text-muted: var(--n-600);
  --text-subtle: var(--n-500);
  --primary: var(--maroon-700);
  --primary-hover: var(--maroon-800);
  --primary-soft: var(--maroon-50);
  --on-primary: #ffffff;
  --accent: var(--steel-500);
  --accent-ink: var(--steel-700);
  --cta: var(--gold-500);
  --cta-hover: var(--gold-400);
  --on-cta: #1e1300;
  --link: var(--steel-700);
  --focus: #1f6fd1;
  --sidebar-bg: var(--maroon-800);
  --sidebar-ink: rgba(255,255,255,.78);
  --sidebar-ink-strong: #ffffff;
  --sidebar-hover: rgba(255,255,255,.08);
  --sidebar-active: rgba(255,255,255,.14);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: clamp(.72rem, .70rem + .1vw, .76rem);
  --fs-sm: clamp(.8rem, .78rem + .12vw, .86rem);
  --fs-md: clamp(.9rem, .88rem + .14vw, .96rem);
  --fs-lg: clamp(1.02rem, .98rem + .2vw, 1.1rem);
  --fs-xl: clamp(1.18rem, 1.1rem + .4vw, 1.35rem);
  --fs-2xl: clamp(1.4rem, 1.25rem + .7vw, 1.75rem);
  --fs-3xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.4rem);

  /* Space (4px scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Shape, depth, motion, layers */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(23,22,20,.06), 0 1px 1px rgba(23,22,20,.04);
  --shadow-2: 0 4px 14px rgba(23,22,20,.07), 0 1px 3px rgba(23,22,20,.05);
  --shadow-3: 0 18px 48px rgba(23,22,20,.16), 0 4px 12px rgba(23,22,20,.06);
  --dur-1: 150ms; --dur-2: 200ms; --dur-3: 250ms;
  --ease: cubic-bezier(.2,.7,.2,1);
  --z-nav: 20; --z-sticky: 30; --z-overlay: 60; --z-toast: 80;
  --tap: 44px;
  --sidebar-w: 264px;
  --topbar-h: 60px;
  --bottomnav-h: 64px;

  color-scheme: light;
}
/* Save-Data (set on <html> by the server): system fonts only, no font downloads at all. */
.save-data { --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-head: var(--font-body); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 var(--s-2); letter-spacing: -.01em; color: var(--text); }
h1 { font-size: var(--fs-2xl); font-weight: 800; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
h4 { font-size: var(--fs-md); font-weight: 700; }
p { margin: 0 0 var(--s-3); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
img[src*="crest"] { object-fit: contain; }
small, .text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.num, .money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.break { overflow-wrap: anywhere; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
html:not(.js) [data-dismiss-onboarding], html:not(.js) .js-only { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: var(--s-3); top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); box-shadow: var(--shadow-2); font-weight: 700; }
.skip-link:focus { top: var(--s-3); }
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: var(--z-nav);
  background: var(--sidebar-bg); color: var(--sidebar-ink);
  display: none; flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); min-height: var(--topbar-h); color: #fff; text-decoration: none; }
.sidebar-brand img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 2px; object-fit: contain; }
.sidebar-brand span { font-family: var(--font-head); font-weight: 800; font-size: .98rem; line-height: 1.15; }
.sidebar-brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: rgba(255,255,255,.6); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--s-2) var(--s-3) var(--s-4); scrollbar-width: thin; }
.nav-group { margin-top: var(--s-4); }
.nav-group:first-child { margin-top: var(--s-1); }
.nav-label { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 0 var(--s-3) var(--s-2); }
.nav-link {
  display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: 8px var(--s-3);
  border-radius: var(--r-sm); color: var(--sidebar-ink); text-decoration: none; font-weight: 600; font-size: .88rem;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-ink-strong); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-link .nav-text { flex: 1; min-width: 0; }
.nav-link.is-locked { color: rgba(255,255,255,.5); }
.nav-link .lock { width: 15px; height: 15px; opacity: .85; }
/* Quick access: the one call to action at the top of the menu */
.nav-link.nav-quick { background: var(--cta); color: var(--on-cta); font-weight: 700; box-shadow: 0 2px 0 var(--gold-600) inset; }
.nav-link.nav-quick:hover { background: var(--cta-hover); color: var(--on-cta); }
.nav-link.nav-quick.is-locked { background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); box-shadow: none; font-weight: 600; }
.sidebar-foot { padding: var(--s-3) var(--s-4) var(--s-4); border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; }
.access-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-full); font-size: .74rem; font-weight: 700; }
.access-pill.ok { background: rgba(35,160,90,.18); color: #bff0cf; }
.access-pill.locked { background: rgba(226,144,12,.2); color: #ffd996; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky); height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4);
  background: var(--surface);   /* solid, not a blur: blur is costly to paint on low-end phones */
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--text); min-width: 0; }
.topbar-brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.topbar-title { font-family: var(--font-head); font-weight: 800; font-size: 1rem; }
.topbar-spacer { flex: 1; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border-radius: var(--r-full); border: 0; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.search-trigger {
  display: none; align-items: center; gap: var(--s-2); height: 40px; min-width: 260px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface-2); color: var(--text-subtle);
  font: inherit; font-size: var(--fs-sm); cursor: pointer; text-align: left;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-muted); }
.search-trigger kbd { margin-left: auto; }
kbd { font-family: inherit; font-size: .7rem; font-weight: 700; padding: 2px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text-muted); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--maroon-700); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .85rem; overflow: hidden; text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; }

.main { padding: var(--s-5) var(--s-4) calc(var(--bottomnav-h) + var(--s-8)); }
.container { width: 100%; max-width: 1080px; margin: 0 auto; }
.container.narrow { max-width: 640px; }
.container.medium { max-width: 820px; }

.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-nav); height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(23,22,20,.06);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tap);
  color: var(--text-subtle); text-decoration: none; font-size: .7rem; font-weight: 600; position: relative;
}
.bottom-nav a[aria-current="page"] { color: var(--primary); }
.bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.bottom-nav .icon { width: 22px; height: 22px; }

@media (min-width: 960px) {
  .sidebar { display: flex; }
  .app { padding-left: var(--sidebar-w); }
  .bottom-nav, .topbar-brand, .topbar .mobile-only { display: none; }
  .search-trigger { display: inline-flex; }
  .main { padding: var(--s-8) var(--s-8) var(--s-12); }
  html.sidebar-collapsed { --sidebar-w: 76px; }
  html.sidebar-collapsed .sidebar-brand span, html.sidebar-collapsed .nav-text, html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .nav-link .lock, html.sidebar-collapsed .sidebar-foot .access-text { display: none; }
  html.sidebar-collapsed .nav-link { justify-content: center; padding: 10px 0; }
  html.sidebar-collapsed .sidebar-brand { justify-content: center; padding: var(--s-4) 0; }
  html.sidebar-collapsed .sidebar-foot { text-align: center; padding: var(--s-3) 0; }
}
@media (max-width: 959px) { .desktop-only { display: none !important; } }
@media (min-width: 960px) { .mobile-only { display: none !important; } }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.page-head h1 { margin: 0; }
.page-head p { margin: var(--s-1) 0 0; color: var(--text-muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 var(--s-2); padding: 0; font-size: var(--fs-sm); color: var(--text-subtle); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--n-300); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Layout helpers ---------- */
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
/* Source order = the mobile reading order (today, fees, numbers, notices, quick actions). */
.dash-grid { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "today fee" "today stats" "quick notices"; }
  .dash-today { grid-area: today; } .dash-fee { grid-area: fee; } .dash-stats { grid-area: stats; }
  .dash-notices { grid-area: notices; } .dash-quick { grid-area: quick; }
}
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); }
.center { text-align: center; }

/* ---------- Card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s-5); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--fs-lg); }
.card-head a { font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.card-foot { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.card-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); text-decoration: none; }
.card-tint { background: var(--surface-2); }
.card-hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(226,144,12,.18), transparent 55%), linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
  color: #fff; border: 0;
}
.card-hero h1, .card-hero h2, .card-hero h3 { color: #fff; }
.card-hero .muted { color: rgba(255,255,255,.75); }

/* ---------- Stat tile ---------- */
.stat { padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.stat-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-subtle); }
.stat-value { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xl); margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.stat-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 480px) { .stat-grid .stat { padding: var(--s-3); } .stat-grid .stat-value { font-size: var(--fs-lg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-5); border-radius: var(--r-md); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-cta { background: var(--cta); color: var(--on-cta); box-shadow: 0 2px 0 var(--gold-600) inset, 0 6px 16px rgba(226,144,12,.28); }
.btn-cta:hover { background: var(--cta-hover); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: .84rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 54px; padding: 0 var(--s-6); font-size: 1rem; border-radius: var(--r-md); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid currentColor; border-color: rgba(0,0,0,.25) rgba(0,0,0,.25) rgba(0,0,0,.7); border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.is-busy::after { border-color: rgba(255,255,255,.35) rgba(255,255,255,.35) #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s-4); }
.label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; color: var(--text); }
.label .optional { font-weight: 500; color: var(--text-subtle); }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[readonly], .input:disabled { background: var(--surface-3); color: var(--text-muted); }
.input-lg { min-height: 56px; font-size: 1.25rem; font-weight: 700; }
.input-otp { letter-spacing: .5em; text-align: center; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hint { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 6px; }
.field-error { font-size: var(--fs-sm); color: var(--danger); margin-top: 6px; font-weight: 600; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 700; pointer-events: none; }
.input-group .input { padding-left: 34px; }
.input-group .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2378736b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.check { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }

/* Segmented control / chips / tabs */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-md); background: var(--surface-3); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a, .segmented button, .segmented label {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 var(--s-4); border: 0; border-radius: 9px;
  background: transparent; font: inherit; font-weight: 600; font-size: var(--fs-sm); color: var(--text-muted); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.segmented [aria-current="true"], .segmented [aria-selected="true"], .segmented .is-active, .segmented input:checked + span {
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-1);
}
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.is-active { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* ---------- Badges / status chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4; max-width: 100%;
  background: var(--surface-3); color: var(--text-muted); border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-bd); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-bd); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-bd); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-bd); }
.badge-brand   { background: var(--primary-soft); color: var(--primary); border-color: var(--maroon-200); }
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.grade-a { background: var(--success-bg); color: var(--success); }
.grade-b { background: var(--info-bg); color: var(--info); }
.grade-c { background: var(--gold-50); color: var(--gold-700); }
.grade-d, .grade-e { background: var(--warning-bg); color: var(--warning); }
.grade-f { background: var(--surface-3); color: var(--text-muted); }

/* ---------- Callouts / alerts ---------- */
.callout { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-sm); }
.callout .icon { margin-top: 1px; }
.callout strong { display: block; font-size: var(--fs-md); margin-bottom: 2px; }
.callout p:last-child { margin-bottom: 0; }
.callout-success { background: var(--success-bg); border-color: var(--success-bd); color: #0e4f28; }
.callout-warning { background: var(--warning-bg); border-color: var(--warning-bd); color: #5f3700; }
.callout-danger  { background: var(--danger-bg);  border-color: var(--danger-bd);  color: #7c1a14; }
.callout-info    { background: var(--info-bg);    border-color: var(--info-bd);    color: #1d3a52; }
.callout-success .icon { color: var(--success); } .callout-warning .icon { color: var(--warning); }
.callout-danger .icon { color: var(--danger); } .callout-info .icon { color: var(--info); }
.callout a { color: inherit; font-weight: 700; }
.banner { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); margin-bottom: var(--s-5); font-size: var(--fs-sm); }
.banner .grow { min-width: 0; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); min-height: 56px; }
.list-item:last-child { border-bottom: 0; }
.list-item .li-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-muted); flex-shrink: 0; }
.list-item .li-title { font-weight: 700; font-size: var(--fs-md); }
.list-item .li-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.list-link { color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.list-link:hover .li-title { color: var(--primary); }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: var(--s-2) var(--s-4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Tables (collapse to cards on small screens) ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-subtle); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .t-right { text-align: right; }
@media (max-width: 640px) {
  .table-cards thead { display: none; }
  .table-cards tr { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--border); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { display: flex; justify-content: space-between; gap: var(--s-3); padding: 4px 0; border: 0; }
  .table-cards td::before { content: attr(data-label); color: var(--text-subtle); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
  .table-cards td.t-right { text-align: right; }
}

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--success), #23a05a); transition: width var(--dur-3) var(--ease); }
.progress.is-partial > span { background: linear-gradient(90deg, var(--gold-600), var(--gold-500)); }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: var(--s-10) var(--s-5); color: var(--text-muted); }
.empty .empty-art { width: 64px; height: 64px; margin: 0 auto var(--s-4); border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-subtle); }
.empty .empty-art .icon { width: 30px; height: 30px; }
.empty h3 { color: var(--text); margin-bottom: var(--s-1); }
.empty p { max-width: 42ch; margin: 0 auto var(--s-4); font-size: var(--fs-sm); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 1.3s infinite; }

/* ---------- Locked feature pattern ---------- */
.locked-tile { position: relative; }
.lock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; color: var(--warning); background: var(--warning-bg); border: 1px solid var(--warning-bd); padding: 2px 8px; border-radius: var(--r-full); }
.unlock-card { text-align: center; padding: var(--s-8) var(--s-5); }
.unlock-card .unlock-icon { width: 72px; height: 72px; margin: 0 auto var(--s-4); border-radius: 24px; display: flex; align-items: center; justify-content: center; background: var(--gold-100); color: var(--gold-700); }
.unlock-card .unlock-icon .icon { width: 34px; height: 34px; }
.unlock-card .callout, .unlock-card .pay-summary { text-align: left; }
.unlock-amount { font-family: var(--font-head); font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: var(--s-2) 0 var(--s-1); }
.unlock-list { list-style: none; margin: var(--s-5) auto; padding: 0; display: grid; gap: var(--s-2); max-width: 420px; text-align: left; }
.unlock-list li { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); font-weight: 600; }
.unlock-list .icon { color: var(--success); }
.status-orb { width: 72px; height: 72px; margin: 0 auto var(--s-4); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.status-orb .icon { width: 34px; height: 34px; }
.status-orb.ok { background: var(--success-bg); color: var(--success); }
.status-orb.wait { background: var(--info-bg); color: var(--info); }
.status-orb.bad { background: var(--danger-bg); color: var(--danger); }
.pulse-ring { position: relative; }
.pulse-ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--info-bd); animation: pulse 1.6s var(--ease) infinite; }

/* ---------- Timeline / tracker ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 var(--s-5) var(--s-8); }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-subtle); }
.timeline .dot .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.timeline .dot.ok { background: var(--success); color: #fff; }
.timeline .dot.wait { background: var(--gold-500); color: var(--on-cta); }
.timeline .dot.bad { background: var(--danger); color: #fff; }
.tracker { display: flex; gap: var(--s-2); list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.tracker li { flex: 1; text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--text-subtle); }
.tracker li::before { content: ""; display: block; height: 6px; border-radius: 3px; margin-bottom: 6px; background: var(--surface-3); }
.tracker li.done { color: var(--success); } .tracker li.done::before { background: var(--success); }
.tracker li.current { color: var(--text); } .tracker li.current::before { background: var(--gold-500); }
.tracker li.bad { color: var(--danger); } .tracker li.bad::before { background: var(--danger); }

/* ---------- Dialog / bottom sheet / command palette ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(23,22,20,.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3);
  padding: var(--s-3) var(--s-5) calc(var(--s-6) + env(safe-area-inset-bottom));
}
.sheet[open] { animation: sheet-up var(--dur-3) var(--ease); }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--n-300); margin: 0 auto var(--s-4); }
@media (min-width: 640px) {
  .sheet { inset: 0; margin: auto; width: min(460px, calc(100% - 32px)); height: fit-content; border-radius: var(--r-xl); padding: var(--s-6); }
  .sheet[open] { animation: pop-in var(--dur-2) var(--ease); }
  .sheet .grabber { display: none; }
}
.sheet-list a { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: 0 var(--s-2); border-radius: var(--r-md); color: var(--text); text-decoration: none; font-weight: 600; }
.sheet-list a:hover { background: var(--surface-3); }
.sheet-list a.is-locked { color: var(--text-muted); }
.sheet-list .grow, .sheet-list .nav-text { flex: 1; min-width: 0; }
.sheet-list .lock { color: var(--warning); }
.palette { position: fixed; inset: 0; margin: 8vh auto auto; width: min(640px, calc(100% - 24px)); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.palette[open] { animation: pop-in var(--dur-2) var(--ease); }
.palette-input { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; min-height: 58px; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text); }
.palette-input input:focus { outline: none; }
.palette-results { max-height: 56vh; overflow-y: auto; padding: var(--s-2); list-style: none; margin: 0; }
.palette-results .group { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); padding: var(--s-3) var(--s-3) var(--s-1); }
.palette-results a { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); min-height: 48px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.palette-results a[aria-selected="true"], .palette-results a:hover { background: var(--primary-soft); }
.palette-results .sub { font-size: var(--fs-xs); color: var(--text-muted); }
.palette-foot { display: flex; gap: var(--s-4); padding: var(--s-2) var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-subtle); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + var(--s-4) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-2); width: min(440px, calc(100% - 24px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: var(--s-6); left: auto; right: var(--s-6); transform: none; } }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--n-900); color: #fff; box-shadow: var(--shadow-3); font-size: var(--fs-sm); animation: toast-in var(--dur-3) var(--ease); }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #6fe39c; } .toast-error .icon { color: #ff9c93; } .toast-info .icon { color: #9ec7ea; } .toast-warning .icon { color: #ffd07a; }
.toast button { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 0 0 0 var(--s-2); font-size: 1.1rem; line-height: 1; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-toast); background: var(--n-800); color: #fff; text-align: center; font-size: var(--fs-sm); font-weight: 600; padding: 8px var(--s-4); }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: var(--s-5); }
.pager a, .pager span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.pager [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- File uploader ---------- */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); padding: var(--s-6) var(--s-4); border: 2px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); text-align: center; font-size: var(--fs-sm); color: var(--text-muted); transition: border-color var(--dur-1), background var(--dur-1); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--steel-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .file-name { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }

/* ---------- Pay flow ---------- */
.pay-summary { display: grid; gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-sm); }
.pay-summary .row { justify-content: space-between; }
.pay-summary .total { font-weight: 800; font-size: var(--fs-md); padding-top: var(--s-2); border-top: 1px dashed var(--border-strong); }
.gateway-list { display: grid; gap: var(--s-2); }
.gateway { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font: inherit; font-weight: 700; color: var(--text); text-align: left; width: 100%; transition: border-color var(--dur-1), box-shadow var(--dur-1); }
.gateway:hover { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.gateway .gw-mark { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; color: #fff; flex-shrink: 0; }
.gw-interswitch .gw-mark { background: #0a4a7f; } .gw-paystack .gw-mark { background: #0ba4db; } .gw-flutterwave .gw-mark { background: #f5a623; color: #1e1300; }
.gateway .gw-sub { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--text-muted); }
.gateway .icon:last-child { margin-left: auto; color: var(--text-subtle); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-subtle); margin-top: var(--s-4); text-align: center; }

/* ---------- Dashboard pieces ---------- */
.greet { display: flex; align-items: center; gap: var(--s-4); }
.greet h1 { font-size: var(--fs-2xl); margin: 0; }
.greet .meta { color: var(--text-muted); font-size: var(--fs-sm); }
.attention { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.attn { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.attn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); text-decoration: none; }
.attn .attn-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.attn-money .attn-icon { background: var(--gold-100); color: var(--gold-700); }
.attn-exam .attn-icon { background: var(--danger-bg); color: var(--danger); }
.attn-work .attn-icon { background: var(--info-bg); color: var(--info); }
.attn-note .attn-icon { background: var(--primary-soft); color: var(--primary); }
.attn strong { display: block; font-size: var(--fs-sm); }
.attn span { font-size: var(--fs-xs); color: var(--text-muted); }
.quick { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.quick a { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-4); min-height: 96px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.quick a:hover { border-color: var(--primary); text-decoration: none; }
.quick a .icon { color: var(--primary); width: 24px; height: 24px; }
.slot { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); align-items: start; }
.slot:last-child { border-bottom: 0; }
.slot-time { font-weight: 800; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; line-height: 1.3; }
.slot-time small { display: block; font-weight: 600; color: var(--text-muted); }
.slot-body strong { display: block; }
.slot-body span { font-size: var(--fs-sm); color: var(--text-muted); }
.slot.is-now { background: linear-gradient(90deg, var(--primary-soft), transparent); border-radius: var(--r-sm); padding-left: var(--s-2); margin-left: calc(-1 * var(--s-2)); box-shadow: inset 3px 0 0 var(--primary); }
/* Past classes: quieter by colour, not transparency, so text keeps AA contrast. */
.slot.is-past .slot-time, .slot.is-past .slot-body strong { color: var(--text-muted); font-weight: 600; }
.slot.is-past .slot-body span { color: var(--text-subtle); }

/* School fees: session + semester picker, term bill */
fieldset.bare { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.btn-stack { flex-direction: column; gap: 2px; white-space: normal; text-align: center; line-height: 1.25; padding-block: var(--s-3); height: auto; }
.btn-sub { font-size: var(--fs-sm); font-weight: 600; }
.seg-radio label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg-radio label:has(input:focus-visible), .term-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.term-cards { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 359px) { .term-cards { grid-template-columns: 1fr; } }
.term-card {
  display: grid; gap: var(--s-2); align-content: start; min-height: 112px; padding: var(--s-4); cursor: pointer;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.term-card:hover { border-color: var(--accent); }
.term-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.term-card.is-off { cursor: default; background: var(--surface-2); border-style: dashed; }
.term-card.is-off:hover { border-color: var(--border-strong); }
.term-card.is-off .term-name, .term-card.is-off .term-line { color: var(--text-muted); }
.term-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--s-2); }
.term-name { font-weight: 800; font-family: var(--font-head); line-height: 1.25; }
.term-tag { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.term-line { font-size: var(--fs-sm); font-weight: 600; }
.term-card.st-overdue:not(:has(input:checked)) { border-color: var(--danger-bd); }
.bill-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.bill-line { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); }
.bill-right { text-align: right; flex-shrink: 0; }
.paying-for { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--primary-soft); border: 1px solid var(--maroon-200); }
html.js .nojs-only { display: none !important; }

/* Timetable week grid */
.week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
@media (min-width: 1320px) { .week { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.week-col h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .05em; color: var(--text-subtle); margin-bottom: var(--s-2); }
.week-col.is-today h3 { color: var(--primary); }
.class-block { padding: var(--s-3); border-radius: var(--r-sm); background: var(--steel-50); border-left: 3px solid var(--accent); margin-bottom: var(--s-2); font-size: var(--fs-xs); }
.class-block strong { display: block; font-size: var(--fs-sm); }
.class-block.is-now { background: var(--primary-soft); border-left-color: var(--primary); }
.day-panels > [role=tabpanel] { outline: none; }

/* Results chart */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart .line { stroke: var(--primary); stroke-width: 2.5; fill: none; }
.chart .area { fill: url(#chartFill); }
.chart .pt { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; }
.chart text { font-size: 11px; fill: var(--text-subtle); font-family: var(--font-body); }
details.expand { border-top: 1px solid var(--border); }
details.expand > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; min-height: var(--tap); font-weight: 700; }
details.expand > summary::-webkit-details-marker { display: none; }
details.expand > summary .chev { margin-left: auto; transition: transform var(--dur-2) var(--ease); color: var(--text-subtle); }
details.expand[open] > summary .chev { transform: rotate(180deg); }

/* Course registration */
.course-opt { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3); border: 1.5px solid var(--border); border-radius: var(--r-md); cursor: pointer; background: var(--surface); transition: border-color var(--dur-1), background var(--dur-1); }
.course-opt:hover { border-color: var(--border-strong); }
.course-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.course-opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.course-opt .code { font-family: var(--font-head); font-weight: 800; }
.course-opt .units { margin-left: auto; white-space: nowrap; font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); }
.course-opt.has-clash { border-color: var(--warning-bd); }
.course-opt.find-hit { align-items: center; cursor: default; border-style: dashed; }
.extra-courses input[type=search] { flex: 1 1 auto; min-width: 0; }
.clash-note { display: block; margin-top: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--warning); }
.unit-bar { position: sticky; bottom: calc(var(--bottomnav-h) + var(--s-3) + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--n-900); color: #fff; box-shadow: var(--shadow-3); margin-top: var(--s-5); }
@media (min-width: 960px) { .unit-bar { bottom: var(--s-4); } }
.unit-bar .units-now { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.unit-bar.is-over { background: var(--danger); }

/* ID card */
.id-card { width: 100%; max-width: 360px; aspect-ratio: 1.586; border-radius: 16px; padding: var(--s-4); color: #fff; position: relative; overflow: hidden; background: radial-gradient(120% 120% at 100% 0%, rgba(226,144,12,.35), transparent 50%), linear-gradient(135deg, var(--maroon-700), var(--maroon-900)); box-shadow: var(--shadow-2); display: grid; grid-template-columns: 84px 1fr; gap: var(--s-3); align-content: start; }
.id-card .id-head { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-2); font-family: var(--font-head); font-weight: 800; font-size: .8rem; }
.id-card .id-head img { width: 26px; height: 26px; background: #fff; border-radius: 6px; padding: 1px; }
.id-card .id-photo { width: 84px; height: 100px; border-radius: 10px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; }
.id-card .id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-card .id-name { font-family: var(--font-head); font-weight: 800; font-size: .95rem; line-height: 1.15; overflow-wrap: anywhere; }
.id-card .id-line { font-size: .68rem; opacity: .85; margin-top: 3px; }
.id-card .id-foot { position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-3); display: flex; justify-content: space-between; font-size: .62rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Auth screens (sign-in, activation) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 900px) { .auth { grid-template-columns: minmax(360px, 44%) 1fr; } }
.auth-aside { display: none; position: relative; overflow: hidden; color: #fff; padding: var(--s-10); background: radial-gradient(90% 70% at 100% 0%, rgba(226,144,12,.28), transparent 60%), radial-gradient(80% 60% at 0% 100%, rgba(70,120,161,.35), transparent 60%), linear-gradient(160deg, var(--maroon-700), var(--maroon-900)); }
@media (min-width: 900px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside .brand { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
.auth-aside .brand img { width: 52px; height: 52px; background: #fff; border-radius: 14px; padding: 3px; }
.auth-aside h2 { color: #fff; font-size: var(--fs-3xl); max-width: 16ch; margin: 0 0 var(--s-3); }
.auth-aside p { color: rgba(255,255,255,.78); max-width: 42ch; }
.auth-aside ul { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-3); }
.auth-aside li { display: flex; align-items: center; gap: var(--s-3); color: rgba(255,255,255,.9); font-weight: 600; font-size: var(--fs-sm); }
.auth-aside li .icon { color: var(--gold-400); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-6) var(--s-4) var(--s-10); }
.auth-card { width: 100%; max-width: 420px; }
.auth-mobile-brand { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-8); font-family: var(--font-head); font-weight: 800; }
.auth-mobile-brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; }
@media (min-width: 900px) { .auth-mobile-brand { display: none; } }
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--s-1); }
.auth-card .lead { color: var(--text-muted); margin-bottom: var(--s-6); }
.auth-links { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--border); display: grid; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted); }
.auth-links a { font-weight: 700; }
/* The portal's front door (portal/index.php): one card per kind of sign-in. */
.choices { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.choice { padding: 0; overflow: hidden; }
.choice-main { display: flex; align-items: center; gap: var(--s-4); min-height: 76px; padding: var(--s-4) var(--s-5); color: var(--text); text-decoration: none; }
.choice-main:hover { background: var(--surface-2); text-decoration: none; }
.choice-main:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.choice-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--primary-soft); color: var(--primary); }
.choice-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.choice-text strong { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); font-family: var(--font-head); font-size: var(--fs-lg); }
.choice-text > span { color: var(--text-muted); font-size: var(--fs-sm); }
.choice-go { flex: 0 0 auto; color: var(--text-subtle); transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.choice-main:hover .choice-go { transform: translateX(3px); color: var(--primary); }
.choice-more { margin: 0; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-muted); }
.choice-more a { font-weight: 700; }
.steps { display: flex; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-6); counter-reset: step; }
.steps li { flex: 1; font-size: var(--fs-xs); font-weight: 700; color: var(--text-subtle); counter-increment: step; }
.steps li::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--surface-3); margin-bottom: 6px; }
.steps li.done { color: var(--success); } .steps li.done::before { background: var(--success); }
.steps li.current { color: var(--text); } .steps li.current::before { background: var(--gold-500); }

/* ---------- Exam mode ---------- */
.exam-mode { background: var(--bg); }
.exam-bar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-4); min-height: 60px; background: var(--maroon-800); color: #fff; }
.exam-bar .exam-title { font-family: var(--font-head); font-weight: 800; font-size: .95rem; }
.exam-timer { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: rgba(255,255,255,.12); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.exam-timer.is-low { background: var(--gold-500); color: var(--on-cta); }
.exam-timer.is-critical { background: #fff; color: var(--danger); animation: blink 1s steps(2) infinite; }
.save-state { font-size: var(--fs-xs); color: rgba(255,255,255,.75); }
.exam-wrap { max-width: 760px; margin: 0 auto; padding: var(--s-5) var(--s-4) var(--s-16); }
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); margin-bottom: var(--s-4); }
.q-num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); display: flex; align-items: center; gap: var(--s-2); }
.q-text { font-size: var(--fs-lg); font-weight: 600; margin: var(--s-2) 0 var(--s-4); overflow-wrap: anywhere; }
.opt { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); min-height: 54px; border: 1.5px solid var(--border); border-radius: var(--r-md); margin-bottom: var(--s-2); cursor: pointer; background: var(--surface); }
.opt:hover { border-color: var(--border-strong); }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opt input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.opt .opt-key { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.opt:has(input:checked) .opt-key { background: var(--primary); color: #fff; }
.q-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--s-2); }
.q-nav button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; color: var(--text); position: relative; }
.q-nav button.is-answered { background: var(--steel-100); border-color: var(--steel-500); }
.q-nav button.is-current { outline: 3px solid var(--primary); outline-offset: 1px; }
.q-nav button.is-flagged::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }
.exam-controls { display: flex; gap: var(--s-3); justify-content: space-between; margin-top: var(--s-4); }
.js div.exam-controls { display: grid; grid-template-columns: 1fr 1fr; }
.exam-controls [data-prev] { order: 1; } .exam-controls [data-next] { order: 2; }
.exam-controls [data-flag] { order: 3; grid-column: 1 / -1; }
.exam-controls [data-flag][aria-pressed="true"] { background: var(--gold-100); color: var(--gold-700); }
@media (min-width: 640px) { .js div.exam-controls { grid-template-columns: auto 1fr auto; } .exam-controls [data-flag] { order: 2; grid-column: auto; justify-self: center; } .exam-controls [data-next] { order: 3; } }
.js-exam .q-card:not(.is-current) { display: none; }

/* ---------- Receipt (screen + print) ---------- */
.receipt { background: #fff; color: #171614; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-2); padding: var(--s-8) var(--s-6); max-width: 620px; margin: 0 auto; position: relative; overflow: hidden; }
.receipt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--maroon-700), var(--gold-500), var(--steel-500)); }
.receipt-head { display: flex; align-items: center; gap: var(--s-4); padding-bottom: var(--s-5); border-bottom: 1px solid #e3dfd8; }
.receipt-head img { width: 60px; height: 60px; object-fit: contain; }
.receipt-head h1 { font-size: 1.15rem; margin: 0; color: #171614; }
.receipt-head p { margin: 2px 0 0; font-size: .78rem; color: #5b5750; }
.receipt-title { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; }
.receipt-title h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #5b5750; margin: 0; }
.receipt-paid { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid #13743a; color: #13743a; border-radius: 8px; font-weight: 800; letter-spacing: .12em; font-size: .78rem; transform: rotate(-2deg); }
.receipt-amount { text-align: center; padding: var(--s-5); margin: var(--s-4) 0; border-radius: var(--r-md); background: #f7f5f2; }
.receipt-amount .label { color: #5b5750; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.receipt-amount .value { font-family: var(--font-head); font-weight: 800; font-size: 2rem; font-variant-numeric: tabular-nums; color: #171614; }
.receipt .kv dt { color: #5b5750; } .receipt .kv dd { color: #171614; }
.course-form { max-width: 760px; }
.receipt-paid.is-wait { border-color: #a15c07; color: #a15c07; }
.cf-who { display: flex; gap: var(--s-5); align-items: flex-start; margin-bottom: var(--s-5); }
.cf-who .kv { flex: 1; }
.cf-photo { width: 104px; height: 124px; flex-shrink: 0; border: 1px dashed #cdc7be; border-radius: 6px; display: grid; place-items: center; text-align: center; font-size: .7rem; color: #78736b; overflow: hidden; }
.cf-photo img { width: 100%; height: 100%; object-fit: cover; }
.course-form .table th, .course-form .table td { color: #171614; border-color: #e3dfd8; }
.course-form .table tfoot th { font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; color: #171614; border-top: 2px solid #171614; border-bottom: 0; padding-top: var(--s-3); }
.cf-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); margin-top: var(--s-8); font-size: .75rem; color: #5b5750; }
.cf-signs span { display: block; border-bottom: 1px solid #171614; height: 36px; margin-bottom: 6px; }
@media (max-width: 560px) { .cf-who { flex-direction: column-reverse; } .cf-signs { grid-template-columns: 1fr; } }
.receipt-foot { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px dashed #cdc7be; font-size: .72rem; color: #78736b; text-align: center; }

/* ---------- Styleguide helpers ---------- */
.swatch { border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden; font-size: var(--fs-xs); }
.swatch div:first-child { height: 56px; }
.swatch div:last-child { padding: var(--s-2); background: var(--surface); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes blink { 50% { opacity: .55; } }
/* ---------- Summer (stu/summer) ---------- */
.summer-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s-6); color: #fff;
  background: radial-gradient(circle at 88% 12%, rgba(239,168,58,.55), transparent 42%), linear-gradient(135deg, var(--maroon-900), var(--maroon-700) 55%, #a3410c); box-shadow: var(--shadow-2); }
.summer-hero .summer-sun { position: absolute; right: -36px; top: -36px; width: 190px; height: 190px; color: var(--gold-400); opacity: .32; stroke-width: 1.2; pointer-events: none; }
.summer-hero .eyebrow { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.summer-hero h2 { color: #fff; font-size: var(--fs-3xl); font-weight: 800; margin: 2px 0 var(--s-2); }
.summer-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-full); background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font-size: var(--fs-xs); font-weight: 800; }
.summer-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.summer-pill.open::before { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.summer-pill.soon::before { background: var(--gold-400); }
.summer-when { margin: var(--s-2) 0 0; font-size: var(--fs-sm); opacity: .9; }
.summer-facts { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-5); }
.summer-fact { padding: var(--s-3); border-radius: var(--r-md); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(2px); }
.summer-fact b { display: block; font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 800; }
.summer-fact span { display: block; font-size: var(--fs-xs); opacity: .85; line-height: 1.35; }
@media (max-width: 420px) { .summer-hero { padding: var(--s-5) var(--s-4); } .summer-fact b { font-size: var(--fs-md); } }
.list-item .li-icon.ok { background: var(--success-bg); color: var(--success); }
.summer-opt .units { color: var(--text); }
.course-opt.is-off { opacity: .5; cursor: not-allowed; }
.summer-bar { flex-wrap: wrap; row-gap: var(--s-2); }
.summer-bar .text-right { text-align: right; }
.summer-bar .summer-total { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.summer-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.summer-steps li { display: flex; gap: var(--s-3); align-items: flex-start; }
.summer-steps .num { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-100); color: var(--gold-700); font-weight: 800; font-family: var(--font-head); }
.summer-steps p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }

@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fade-up var(--dur-3) var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110; --surface: #1b1a18; --surface-2: #211f1d; --surface-3: #2a2825;
  --border: #34312d; --border-strong: #46423d;
  --text: #f3f0ec; --text-muted: #bdb6ad; --text-subtle: #948d84;
  --primary: #e0857d; --primary-hover: #eaa29b; --primary-soft: rgba(224,133,125,.12); --on-primary: #1a0605;
  --accent: #7fb0d8; --accent-ink: #9cc4e4; --link: #9cc4e4; --focus: #7fb4ff;
  --sidebar-bg: #1d0a08;
  --success: #62d18f; --success-bg: rgba(98,209,143,.12); --success-bd: rgba(98,209,143,.3);
  --warning: #f3bb5c; --warning-bg: rgba(243,187,92,.12); --warning-bd: rgba(243,187,92,.3);
  --danger: #ff8a80; --danger-bg: rgba(255,138,128,.12); --danger-bd: rgba(255,138,128,.3);
  --info: #8fc0e8; --info-bg: rgba(143,192,232,.12); --info-bd: rgba(143,192,232,.3);
  --gold-100: rgba(226,144,12,.18); --gold-50: rgba(226,144,12,.1); --gold-700: #f3bb5c;
  --steel-50: rgba(127,176,216,.1); --steel-100: rgba(127,176,216,.2); --maroon-200: rgba(224,133,125,.35);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 6px 18px rgba(0,0,0,.45); --shadow-3: 0 18px 48px rgba(0,0,0,.6);
}
:root[data-theme="dark"] .callout-success { color: #c9f2d8; } :root[data-theme="dark"] .callout-warning { color: #fbe2b5; }
:root[data-theme="dark"] .callout-danger { color: #ffd2cd; } :root[data-theme="dark"] .callout-info { color: #d3e6f6; }
:root[data-theme="dark"] .btn-primary { color: #1a0605; }
:root[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
:root[data-theme="dark"] .toast { background: #2f2c29; }
:root[data-theme="dark"] .bottom-nav a[aria-current="page"]::before { background: var(--primary); }

/* ---------- Print ---------- */
@media print {
  :root { --bg: #fff; }
  body { background: #fff; color: #000; }
  .sidebar, .topbar, .bottom-nav, .toasts, .no-print, .skip-link, .offline-bar { display: none !important; }
  .app { padding: 0 !important; }
  .main { padding: 0 !important; }
  .card, .receipt { box-shadow: none; border-color: #ccc; }
  .receipt { border: 0; max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  @page { margin: 14mm; }
}
