/* NNP Academy — Coaching Center Digital Ecosystem */

:root {
  /* Palette: Trust Blue (default) */
  --bg: #F7F9FC;
  --bg-2: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F4F6FB;
  --border: #E4E9F2;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #94A3B8;
  --primary: #3B82F6;
  --primary-2: #2563EB;
  --primary-soft: #EFF6FF;
  --success: #22C55E;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-soft: #FEF3C7;
  --danger: #EF4444;
  --danger-soft: #FEE2E2;
  --accent: #8B5CF6;
  --accent-soft: #F5F3FF;
  --info: #06B6D4;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.04);
  --shadow: 0 4px 12px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.08), 0 4px 8px rgba(15,23,42,0.04);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.12), 0 8px 16px rgba(15,23,42,0.06);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-display: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --motion: 1;
  --tx: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0B1020;
  --bg-2: #0E1428;
  --surface: #141A30;
  --surface-2: #1A2140;
  --border: #232B47;
  --text: #F1F5F9;
  --text-2: #B4BCD0;
  --text-3: #6B7390;
  --primary: #60A5FA;
  --primary-2: #3B82F6;
  --primary-soft: #1A2440;
  --success: #4ADE80;
  --success-soft: #142B22;
  --warning: #FBBF24;
  --warning-soft: #2A2210;
  --danger: #F87171;
  --danger-soft: #2A1414;
  --accent: #A78BFA;
  --accent-soft: #1E1A36;
  --info: #22D3EE;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.6);
}

/* Palette variants */
[data-palette="indigo"] { --primary: #6366F1; --primary-2: #4F46E5; --primary-soft: #EEF2FF; --accent: #EC4899; --accent-soft: #FDF2F8; }
[data-palette="indigo"][data-theme="dark"] { --primary: #818CF8; --primary-2: #6366F1; --primary-soft: #1E1B4B; --accent: #F472B6; --accent-soft: #2A1322; }
[data-palette="teal"] { --primary: #14B8A6; --primary-2: #0D9488; --primary-soft: #ECFDF5; --accent: #FBBF24; --accent-soft: #FEF3C7; }
[data-palette="teal"][data-theme="dark"] { --primary: #2DD4BF; --primary-2: #14B8A6; --primary-soft: #042F2E; --accent: #FBBF24; --accent-soft: #2A2210; }
[data-palette="sunset"] { --primary: #F97316; --primary-2: #EA580C; --primary-soft: #FFF7ED; --accent: #DC2626; --accent-soft: #FEE2E2; }
[data-palette="sunset"][data-theme="dark"] { --primary: #FB923C; --primary-2: #F97316; --primary-soft: #2A1810; --accent: #F87171; --accent-soft: #2A1414; }

/* Font variants */
[data-font="rounded"] { --font-display: 'Quicksand', 'Hind Siliguri', system-ui, sans-serif; --font-body: 'Quicksand', system-ui, sans-serif; }
[data-font="serif"] { --font-display: 'Fraunces', 'Hind Siliguri', serif; --font-body: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  transition: background 0.4s var(--tx), color 0.3s var(--tx);
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Ambient animated background — a subtle drifting glow behind every page */
body::before {
  content: ''; position: fixed; inset: -15%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side, color-mix(in oklab, var(--primary) 30%, transparent), transparent),
    radial-gradient(closest-side, color-mix(in oklab, var(--accent) 26%, transparent), transparent);
  background-repeat: no-repeat;
  background-size: 46% 46%, 52% 52%;
  background-position: 8% 12%, 90% 88%;
  opacity: 0.42;
  animation: ambientDrift 32s ease-in-out infinite;
  will-change: transform;
}
@keyframes ambientDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(2.5%, 3%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* Live-status pulsing dot — admin traffic KPI cards */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; position: relative; flex-shrink: 0; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: pulse-ring 1.6s ease-out infinite; }
.live-dot-blue { background: #3B82F6; }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }

/* Celebration confetti — full-screen falling pieces for success screens */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 60; }
.confetti-bit { position: absolute; top: -28px; animation-name: confettiFall; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes confettiFall {
  0%   { transform: translateY(-28px) rotateZ(0); opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(102vh) rotateZ(880deg); opacity: 0.65; }
}
.celebrate-pop { animation: celebratePop .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes celebratePop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .celebrate-pop { animation: none; } }

/* Layout */
.app { display: flex; min-height: 100vh; }
/* Standalone auth screen — login / registration: app-like, fixed, no chrome */
.auth-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  overflow: auto; padding: 24px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}
/* Mobile auth-screen override lives in the auth-page section below — keep this comment as a marker. */
.sidebar {
  width: 264px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform 0.3s var(--tx), width 0.3s var(--tx);
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
/* Hero-merged header (guest) — fully transparent (no background of its own) at
   the top so the hero shows through it; gains a solid surface once scrolled */
.topbar-merged {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  transition: background .3s var(--tx), backdrop-filter .3s var(--tx), border-color .3s var(--tx);
}
.topbar-merged.scrolled {
  background: color-mix(in oklab, var(--surface) 82%, transparent) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom-color: var(--border) !important;
}
/* Keep the profile text readable while the header is transparent over the hero */
.topbar-merged:not(.scrolled) .tp-hi { color: var(--text-2); }
.topbar-merged:not(.scrolled) .tp-nm { color: var(--text); }
/* Centred platform wordmark — NNP over ACADEMY */
.topbar-brand {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display); line-height: 1;
  pointer-events: none; user-select: none; z-index: 1;
}
.topbar-brand .tb-nnp {
  font-size: 20px; font-weight: 800; letter-spacing: 0.05em; color: var(--text);
}
.topbar-brand .tb-acad {
  font-size: 12px; font-weight: 700; letter-spacing: 0.34em;
  color: var(--primary); margin: 3px 0 0 0.34em;
}
.content { padding: 24px 32px 64px; max-width: 1480px; margin: 0 auto; width: 100%; }

/* Logo */
.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px color-mix(in oklab, var(--primary) 40%, transparent);
}
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.logo-text span { color: var(--primary); }

/* Portal pill */
.portal-pill {
  margin: 14px 16px 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--primary) 20%, transparent);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: transform 0.2s var(--tx);
}
.portal-pill:hover { transform: translateY(-1px); }
.portal-pill .who { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.portal-pill .name { font-size: 14px; font-weight: 700; color: var(--text); }
.portal-pill .swap { margin-left: auto; color: var(--primary); }

/* Nav */
.nav { padding: 8px 12px 12px; flex: 1; }
.nav-section { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: background 0.2s var(--tx), color 0.2s var(--tx), transform 0.2s var(--tx);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, color-mix(in oklab, var(--primary) 12%, transparent), transparent);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--primary); border-radius: 0 3px 3px 0;
}
.nav-item .ic { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item .badge { margin-left: auto; background: var(--primary); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 700; }

/* Topbar parts */
.search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 14px; height: 40px;
  transition: border-color 0.2s var(--tx);
}
.search:focus-within { border-color: var(--primary); background: var(--surface); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--text-2);
  position: relative;
  transition: background 0.15s var(--tx);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }

.topbar-avatar { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer; transition: background 0.15s var(--tx); }
.topbar-avatar:hover { background: var(--surface-2); }
.topbar-avatar .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.topbar-avatar .nm { font-size: 13px; font-weight: 600; }
/* Mobile app-style profile block — header left */
.topbar-profile { display: none; align-items: center; gap: 10px; min-width: 0; }
.topbar-profile .tp-ava { width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.topbar-profile .tp-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar-profile .tp-hi { font-size: 11px; font-weight: 500; color: var(--text-3); }
.topbar-profile .tp-nm { font-size: 14.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 165px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card-pad-0 { padding: 0 !important; overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: transform 0.15s var(--tx), background 0.15s var(--tx), box-shadow 0.15s var(--tx);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px color-mix(in oklab, var(--primary) 40%, transparent); }
.btn-primary:hover { background: var(--primary-2); box-shadow: 0 8px 18px color-mix(in oklab, var(--primary) 50%, transparent); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }

/* Pills/chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.chip-primary { background: var(--primary-soft); color: var(--primary); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }

/* Inputs */
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; outline: 0; transition: border-color 0.15s var(--tx), box-shadow 0.15s var(--tx); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent); }
.label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; color: var(--text-2); }

/* Page intro */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 4px; }
.page-sub { color: var(--text-2); font-size: 14px; margin: 0; }

/* Grid helpers */
.grid { display: grid; gap: 20px; }
.row { display: flex; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }

/* KPI */
.kpi { padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.kpi .lbl { color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .val { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 6px; }
.kpi .ic { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }

/* Animations */
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slide-up { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-ring { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.anim-on .page-enter { animation: slide-up 0.45s var(--tx) both; }
.anim-on .pop { animation: pop 0.3s var(--tx) both; }
.anim-on .float { animation: float 4s ease-in-out infinite; }

/* Mobile */
.mobile-toggle { display: none; }
.scrim { display: none; }

/* Mobile bottom navigation bar (app-style) — hidden on desktop */
.bottom-nav { display: none; }
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border: 0; background: none; cursor: pointer;
  color: var(--text-3); font-size: 10.5px; font-weight: 600;
  font-family: var(--font-body); border-radius: 12px;
  transition: color 0.15s var(--tx); -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item .bn-ic {
  display: grid; place-items: center; width: 34px; height: 28px;
  border-radius: 9px; transition: background 0.15s var(--tx);
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active .bn-ic { background: var(--primary-soft); }
.bottom-nav-item:active .bn-ic { transform: scale(0.92); }

/* Responsive utility classes */
.grid-hero { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 32px; align-items: center; }
/* Hero card — full-bleed band that runs up behind the transparent header */
.hero-card { margin: -92px -32px 0; border-radius: 0; }
@media (max-width: 980px) { .hero-card { margin: -84px -16px 0; } }
/* Student dashboard hero KPI strip — always one compact row */
.hero-kpi { flex-wrap: nowrap !important; }
.hero-kpi .hero-kpi-item { flex: 1 1 0; min-width: 0; }
.hero-kpi .hero-kpi-item .hero-kpi-v { font-family: var(--font-display); font-size: 30px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-kpi .hero-kpi-item .hero-kpi-v.sm { font-size: 21px; }
.hero-kpi .hero-kpi-item .hero-kpi-l { font-size: 13px; color: var(--text-2); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Student dashboard — Learning Analytics band (full-bleed, matches the hero) */
.analytics-band {
  position: relative;
  margin: 30px -32px 0; padding: 34px 32px;
}
.analytics-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px;
  box-shadow: 0 6px 20px rgba(15,23,42,0.06);
  transition: transform .2s var(--tx), box-shadow .2s var(--tx);
}
.analytics-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15,23,42,0.12); }
.analytics-card .ac-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.analytics-card .ac-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.analytics-card .ac-title { font-weight: 700; font-size: 14px; }
@media (max-width: 980px) { .analytics-band { margin: 24px -16px 0; padding: 26px 16px; } }
/* Dashboard course / class cards — compact, content-sized info, responsive */
.crs-card {
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  align-self: start;  /* never stretch — the info block stays content-sized */
  transition: transform .2s var(--tx), box-shadow .2s var(--tx);
  animation: crsIn .45s var(--tx) backwards;
}
.crs-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15,23,42,0.14); }
.crs-thumb { aspect-ratio: 3 / 2; position: relative; display: grid; place-items: center; overflow: hidden; }
.crs-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--tx); }
.crs-emoji { font-size: 34px; transition: transform .35s var(--tx); }
.crs-card:hover .crs-thumb img, .crs-card:hover .crs-emoji { transform: scale(1.07); }
.crs-info { padding: 12px 13px; display: flex; flex-direction: column; gap: 5px; }
.crs-title {
  font-weight: 700; font-size: 13.5px; line-height: 1.35; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s var(--tx);
}
.crs-card:hover .crs-title { color: var(--primary); }
.crs-meta { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crs-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
@keyframes crsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .crs-info { padding: 9px 10px; gap: 3px; }
  .crs-title { font-size: 12px; }
  .crs-meta { font-size: 10px; }
  .crs-emoji { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .crs-card { animation: none; } }
/* Course catalog — page-head tool buttons (grid / list / filter) */
.catalog-tools { display: flex; gap: 6px; flex-shrink: 0; }
.catalog-tools .icon-btn { border: 1px solid var(--border); }
.courses-filters { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
@media (max-width: 600px) {
  .courses-toolbar .ct-filter-label { display: none; }
  .courses-filters { gap: 10px; }
  .courses-filters > label { flex: 1 1 calc(50% - 5px); }
}
/* Guest courses — list-view row */
.course-row {
  display: flex; gap: 14px; padding: 14px; cursor: pointer; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--tx), box-shadow .15s var(--tx);
}
.course-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.course-row .cr-thumb {
  width: 160px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; align-self: stretch; min-height: 118px;
}
.course-row .cr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-row .cr-emoji { font-size: 42px; }
.course-row .cr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.course-row .cr-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.course-row .cr-title {
  font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.course-row .cr-meta { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-row .cr-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.course-row .cr-price { display: flex; align-items: baseline; gap: 6px; }
.course-row .cr-price-old { font-size: 12px; color: var(--text-3); text-decoration: line-through; }
.course-row .cr-price-now { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--primary); }
.course-row .cr-actions { display: flex; gap: 6px; }
@media (max-width: 600px) {
  .course-row { padding: 10px; gap: 10px; }
  .course-row .cr-thumb { width: 104px; min-height: 104px; }
  .course-row .cr-emoji { font-size: 32px; }
  .course-row .cr-title { font-size: 13.5px; }
  .course-row .cr-meta { font-size: 11px; }
  .course-row .cr-price-now { font-size: 17px; }
  .course-row .cr-actions { flex: 1 1 100%; }
  .course-row .cr-actions .btn { flex: 1; justify-content: center; }
}
/* Site footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 28px; }
.footer-pay { text-align: center; margin-top: 30px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.footer-pay-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; display: inline-flex; align-items: center; gap: 6px; }
.footer-pay img { max-width: 100%; height: auto; border-radius: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: 32px; }
.footer-h { font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.footer-link { font-size: 13px; color: var(--text-2); cursor: pointer; transition: color .15s var(--tx); width: fit-content; }
.footer-link:hover { color: var(--primary); }
.footer-ic { color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.footer-social { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); transition: all .15s var(--tx); }
.footer-social:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.footer-sub { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-sub input { flex: 1 1 150px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; }
.footer-sub input:focus { outline: 0; border-color: var(--primary); }
.footer-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }
/* Checkout — secure payment footer strip */
.checkout-secure { margin-top: 16px; }
.checkout-secure .cs-head { display: flex; gap: 12px; align-items: flex-start; }
.checkout-secure .cs-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--success-soft); color: var(--success); display: grid; place-items: center; flex-shrink: 0; }
.checkout-secure .cs-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.checkout-secure .cs-methods span { font-size: 11.5px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; }
/* Home hero — 2-column on desktop/tablet, stacks to 1-column on phones */
.hero-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 32px; align-items: center; }
/* Each hero slide carries its own background + padding so slides can differ.
   Extra top padding clears the transparent header the hero runs up behind. */
.hero-slide { padding: 102px 34px 34px; }
/* Hero background — drifting, colour-cycling glow lights */
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(10px) hue-rotate(0deg); will-change: transform, filter;
}
.hero-glow-1 {
  top: -100px; right: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,0.55) 0%, rgba(99,102,241,0) 70%);
  animation: heroGlowDrift1 17s ease-in-out infinite, heroGlowHue 9s linear infinite;
}
.hero-glow-2 {
  bottom: -120px; left: 26%; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(236,72,153,0.5) 0%, rgba(236,72,153,0) 70%);
  animation: heroGlowDrift2 23s ease-in-out infinite, heroGlowHue 13s linear infinite reverse;
}
.hero-glow-3 {
  top: 15%; left: -110px; width: 270px; height: 270px;
  background: radial-gradient(circle, rgba(20,184,166,0.5) 0%, rgba(20,184,166,0) 70%);
  animation: heroGlowDrift3 19s ease-in-out infinite, heroGlowHue 16s linear infinite;
}
@keyframes heroGlowHue {
  from { filter: blur(10px) hue-rotate(0deg); }
  to   { filter: blur(10px) hue-rotate(360deg); }
}
@keyframes heroGlowDrift1 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(-70px,55px) scale(1.18); }
  66%  { transform: translate(45px,85px) scale(0.9); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes heroGlowDrift2 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(75px,-50px) scale(0.88); }
  66%  { transform: translate(-55px,-30px) scale(1.2); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes heroGlowDrift3 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(90px,40px) scale(1.15); }
  66%  { transform: translate(50px,-45px) scale(0.92); }
  100% { transform: translate(0,0) scale(1); }
}
/* Hero headline — line-by-line pop-up entrance */
@keyframes heroPop {
  0%   { opacity: 0; transform: translateY(18px) scale(0.6); }
  55%  { opacity: 1; transform: translateY(0) scale(1.08); }
  78%  { transform: translateY(0) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-pop { animation: heroPop 0.75s var(--tx) both; transform-origin: center bottom; }
.hero-pop-1 { animation-delay: 0.12s; }
.hero-pop-2 { animation-delay: 0.30s; }
/* Hero CTA buttons — narrower width + periodic shine flash sweeping across */
.hero-cta .btn { position: relative; overflow: hidden; padding-left: 14px; padding-right: 14px; gap: 6px; }
.hero-cta .btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -90%; width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-22deg); pointer-events: none;
  animation: btnShine 3.4s ease-in-out infinite;
}
.hero-cta .btn:last-child::after { animation-delay: 0.6s; }
@keyframes btnShine {
  0%   { left: -90%; }
  20%  { left: 170%; }
  100% { left: 170%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-glow { animation: none !important; }
  .hero-pop  { animation: none !important; }
  .hero-cta .btn::after { animation: none !important; }
}
/* Hero right-side course-thumbnail slider — large on desktop, full-width on mobile */
.hero-cslider { width: 100%; max-width: 540px; }
.hero-cslider-emoji { font-size: 76px; }
.hero-cslider-badge { padding: 6px 13px; font-size: 12.5px; }
.hero-cslider-cap { padding: 40px 18px 16px; }
.hero-cslider-cap > div:first-child { font-size: 17px; }
.hero-cslider-by { font-size: 12.5px; margin-top: 4px; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
  .hero-cslider { max-width: 380px; }
  .hero-cslider-emoji { font-size: 54px; }
  .hero-cslider-cap > div:first-child { font-size: 15px; }
}
@media (max-width: 600px) {
  /* Hero stacks: text on top, course slider full-width below */
  .hero-slide { padding: 86px 16px 18px !important; }
  /* Compact app header — avatar + greeting/name (left), centred brand, actions (right) */
  .topbar { gap: 6px !important; padding: 0 10px !important; }
  .topbar-profile { gap: 7px !important; }
  .topbar-profile .tp-ava { width: 34px !important; height: 34px !important; }
  .topbar-profile .tp-hi { font-size: 9px !important; }
  .topbar-profile .tp-nm { font-size: 11.5px !important; max-width: 84px !important; }
  .topbar .icon-btn { width: 34px !important; height: 34px !important; }
  .topbar-brand .tb-nnp { font-size: 17px !important; }
  .topbar-brand .tb-acad { font-size: 9.5px !important; letter-spacing: 0.24em !important; margin-left: 0.24em !important; }
  .hero-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  /* Centre-align the hero text block on phones */
  .hero-text { text-align: center !important; }
  .hero-text h1 { font-size: 30px !important; margin: 2px 0 12px !important; }
  .hero-text p  { font-size: 13px !important; margin: 0 auto 18px !important; line-height: 1.5 !important;
    display: -webkit-box !important; -webkit-line-clamp: 3 !important; line-clamp: 3 !important;
    -webkit-box-orient: vertical !important; overflow: hidden !important; }
  .hero-text .chip { font-size: 11px !important; margin-bottom: 4px !important; }
  .hero-cta { flex-wrap: nowrap !important; gap: 8px !important; justify-content: center !important; }
  .hero-text .btn { font-size: 11px !important; height: 34px !important; flex: 0 0 auto !important;
    max-width: 132px !important; padding: 0 11px !important; white-space: nowrap !important;
    overflow: hidden !important; }
  .hero-text .btn svg { display: none !important; }
  .hero-stats { gap: 16px !important; margin-top: 20px !important; flex-wrap: wrap !important; justify-content: center !important; }
  .hero-stats > div > div:first-child { font-size: 21px !important; }
  .hero-stats > div > div:last-child  { font-size: 10px !important; }
  /* KPI strip stays one row + shrinks on phones */
  .hero-kpi { flex-wrap: nowrap !important; gap: 7px !important; margin-top: 16px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-v { font-size: 19px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-v.sm { font-size: 13px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-l { font-size: 9px !important; }
  .hero-visual { min-height: 0 !important; }
  /* Course-thumbnail slider — full-width card under the text */
  .hero-cslider { max-width: 460px !important; }
  .hero-cslider-emoji { font-size: 60px !important; }
  .hero-cslider-badge { padding: 4px 10px !important; font-size: 11px !important; }
  .hero-cslider-cap { padding: 34px 14px 12px !important; }
  .hero-cslider-cap > div:first-child { font-size: 15px !important; }
  .hero-cslider-by { font-size: 11px !important; margin-top: 3px !important; }
}
/* Extra-small phones (≤380px, e.g. 320px) — shrink the hero + course slider so nothing overflows */
@media (max-width: 380px) {
  .hero-slide { padding: 78px 12px 16px !important; }
  .hero-grid { gap: 14px !important; }
  .hero-text h1 { font-size: 24px !important; margin: 2px 0 9px !important; }
  .hero-text p  { font-size: 12px !important; margin: 0 auto 14px !important; }
  .hero-text .chip { font-size: 10px !important; }
  .hero-cta { gap: 6px !important; }
  .hero-text .btn { font-size: 10.5px !important; height: 32px !important;
    max-width: 116px !important; padding: 0 9px !important; }
  .hero-kpi { gap: 5px !important; margin-top: 13px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-v { font-size: 16px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-v.sm { font-size: 11.5px !important; }
  .hero-kpi .hero-kpi-item .hero-kpi-l { font-size: 8px !important; }
  /* Course slider — make it noticeably smaller and centred on tiny screens */
  .hero-visual { min-height: 0 !important; }
  .hero-cslider { max-width: 230px !important; margin: 0 auto !important; }
  .hero-cslider-emoji { font-size: 42px !important; }
  .hero-cslider-badge { padding: 3px 8px !important; font-size: 9.5px !important; }
  .hero-cslider-cap { padding: 26px 10px 9px !important; }
  .hero-cslider-cap > div:first-child { font-size: 12.5px !important; }
  .hero-cslider-by { font-size: 9.5px !important; margin-top: 2px !important; }
}
.grid-main { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
/* Student dashboard split — 70% main (left) + 30% rail (right); stacks on mobile */
.dash-grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,3fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
.grid-main-sm { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; align-items: start; }
.grid-main-left { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 16px; }
/* Course / lesson grids — 4 per row on desktop, 3 on tablet, 2 on phone */
.grid-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid-cards-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.grid-cards-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
@media (max-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-3up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .grid-3up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

@media (max-width: 980px) {
  .sidebar { position: fixed; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 45; }
  .mobile-toggle { display: grid; }
  .content { padding: 16px 16px 64px; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .topbar-avatar { display: none; }
  .topbar-profile { display: flex; }
  .page-title { font-size: 22px; }
  
  /* Flatten grids */
  .grid-hero, .grid-main, .grid-main-sm, .grid-main-left { grid-template-columns: 1fr; }
  .grid-hero { gap: 24px; }
  
  /* Unsticky sidebars on mobile */
  .grid-main > .card, .grid-main-sm > .card, .grid-main-left > .card { position: static !important; }

  /* Show the app-style bottom nav, and keep content clear of it */
  .bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in oklab, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .has-bottom-nav .content { padding-bottom: 88px; }
}

/* Course detail — animated KPI cards and banner text */
.kpi-card { animation: kpi-rise 0.5s var(--tx) both; }
@keyframes kpi-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.kpi-card .kpi-ic { transition: transform 0.2s var(--tx); }
.kpi-card:hover .kpi-ic { transform: scale(1.12) rotate(-6deg); }
.cd-banner-anim { animation: cd-text-in 0.6s var(--tx) both; }
@keyframes cd-text-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Course detail — on phones hide the top banner and float the
   enrolment / price card to the very top. Desktop is unaffected.
   `!important` is required because the banner sets `display: flex` inline
   (needed for its 8:1 aspect-ratio centering on desktop). */
@media (max-width: 768px) {
  .course-detail { display: flex; flex-direction: column; }
  .course-detail .cd-banner { display: none !important; }
  /* unwrap the 2-col grid so the enrol card, KPIs and content reflow freely */
  .course-detail .cd-grid { display: contents; }
  .course-detail .cd-back { order: 0; }
  .course-detail .cd-side { order: 1; }
  .course-detail .cd-kpi  { order: 2; }
  .course-detail .cd-main { order: 3; }
  /* inside the content column, float the teacher card above the rest */
  .cd-main .cd-teachers { order: -1; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Card paddings and smaller elements */
  .card { padding: 16px; }
  .btn-lg { width: 100%; justify-content: center; }
  .page-title { font-size: 20px; }

  /* Course cards */
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .grid-cards-sm, .grid-cards-lg { grid-template-columns: 1fr !important; }
}

/* ─── Course-Lessons slim header (student) — responsive emoji + title row ─── */
.cl-header {
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cl-emoji {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  flex-shrink: 0;
}
.cl-info       { flex: 1; min-width: 0; }
.cl-course-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  /* Wrap long titles instead of overflowing the card */
  overflow-wrap: anywhere;
}
.cl-course-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

@media (max-width: 600px) {
  .cl-header   { padding: 14px 14px; gap: 12px; margin-bottom: 14px; }
  .cl-emoji    { width: 44px; height: 44px; border-radius: 11px; font-size: 22px; }
  .cl-course-title { font-size: 15.5px; }
  .cl-course-meta  { font-size: 11.5px; }
  .cl-details-btn  { width: 100%; justify-content: center; }
}

/* Visibility helpers — keep desktop-only / mobile-only blocks tidy */
.show-mobile { display: none; }
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block; }
}

/* ─── Auth pages (login + register) — keep the original card layout
   but make it comfortable on phones: the card stretches to fill the
   width, padding and inputs grow for thumbs, iOS auto-zoom is blocked. */
.auth-wrap { width: 100%; }

@media (max-width: 600px) {
  /* The card fills the screen but keeps its rounded look. Slight side
     gutter on the .auth-screen wrapper so the card breathes against
     the gradient backdrop. */
  .auth-screen { padding: 16px !important; }
  .auth-wrap   { min-height: auto !important; }
  .auth-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 22px 18px 26px !important;
  }
  /* Larger inputs + 16 px font prevents iOS focus zoom */
  .auth-card .input,
  .auth-card input[type="text"],
  .auth-card input[type="email"],
  .auth-card input[type="tel"],
  .auth-card input[type="password"],
  .auth-card input[type="number"],
  .auth-card select {
    height: 48px !important;
    font-size: 16px !important;
    border-radius: 11px !important;
  }
  .auth-card .label {
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
    display: block;
  }
  .auth-card .btn,
  .auth-card .btn-lg {
    min-height: 50px;
    font-size: 15px;
    border-radius: 12px;
  }
  /* Two-up rows stack to a single column on phones. `display: contents`
     unwraps the .row so its children become direct children of the parent
     .col flex container — they then pick up the same gap as the rest of
     the fields. But the children carry an inline `flex: 1 1 200px` which,
     in a column-direction parent, would force each one 200 px tall, so we
     reset their flex back to natural content height. */
  .auth-card .row { display: contents; }
  .auth-card .row > * { flex: 0 0 auto !important; }
}

/* Reduced motion */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

/* Skeletons */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--text) 6%, transparent), transparent); animation: shimmer 1.5s infinite; }

/* Avatars */
.av {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-lg { width: 56px; height: 56px; font-size: 18px; }
.av-xl { width: 80px; height: 80px; font-size: 24px; }

/* Utility colors for varied avatars */
.av-1 { background: linear-gradient(135deg, #F97316, #DC2626); }
.av-2 { background: linear-gradient(135deg, #14B8A6, #0EA5E9); }
.av-3 { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.av-4 { background: linear-gradient(135deg, #22C55E, #14B8A6); }
.av-5 { background: linear-gradient(135deg, #F59E0B, #F97316); }
.av-6 { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.av-7 { background: linear-gradient(135deg, #EC4899, #F43F5E); }

/* Progress */
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width 0.6s var(--tx); }

/* Section */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; width: fit-content; }
.tab { padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: all 0.15s var(--tx); }
.tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── Table ──────────────────────────────────────────────────── */
.tbl, .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

/* Header */
.tbl th, .table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

/* Body cells */
.tbl td, .table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

/* Last row — remove bottom divider */
.tbl tbody tr:last-child td, .table tbody tr:last-child td { border-bottom: none; }

/* Row hover */
.tbl tbody tr, .table tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover td, .table tbody tr:hover td {
  background: color-mix(in oklab, var(--primary) 6%, transparent);
}

/* Alternating row tint (opt-in via .table-stripe) */
.table-stripe tbody tr:nth-child(even) td { background: var(--surface-2); }
.table-stripe tbody tr:nth-child(even):hover td { background: color-mix(in oklab, var(--primary) 6%, transparent); }

/* Scrollable standalone wrapper */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.table-wrap .table, .table-wrap .tbl { border-radius: 0; }
.table-wrap .table thead th, .table-wrap .tbl thead th { border-top: none; }
.table-wrap .table tbody tr:last-child td, .table-wrap .tbl tbody tr:last-child td { border-bottom: none; }

/* Print-friendly ID card etc */
.dotgrid {
  background-image: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--text) 10%, transparent) 1px, transparent 0);
  background-size: 18px 18px;
}

/* Calendar wrap */
.calendar-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calendar-wrap > div { min-width: 500px; }
