/* ============================================================
   SA Learn — SailPoint Academy LMS
   Daylight by default (matching the 1A sign-in): navy ink on cool
   white, cyan reserved for action, progress and live state, and
   metadata spoken in monospace like a ticket stub. Dark is the
   opt-in "Screening Room" mode; the video player is always dark.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #eef3f8;
  --room: #ffffff;
  --panel: #ffffff;
  --raised: #e9f0f7;
  --hover-wash: rgba(11, 42, 74, 0.045);
  /* hairlines */
  --line: rgba(11, 42, 74, 0.11);
  --line-strong: rgba(11, 42, 74, 0.2);
  /* ink */
  --ink: #0b2a4a;
  --ink-2: #33475f;
  --ink-3: #566880;
  --ink-4: #5c6c82;
  /* brand */
  --accent: #006ba8;          /* darkened from #0077b6 to clear 4.5:1 on --bg */
  --accent-deep: #005983;
  --accent-soft: rgba(0, 180, 216, 0.14);
  --grad: linear-gradient(135deg, #00b4d8, #0077b6);
  --green: #04795b;
  --green-soft: rgba(6, 214, 160, 0.16);
  --warn: #8a6508;
  --warn-soft: rgba(255, 200, 87, 0.22);
  --danger: #c81e4f;
  --danger-soft: rgba(214, 51, 95, 0.1);
  /* glow */
  --bloom: 0 12px 26px -10px rgba(0, 119, 182, 0.42);
  --bloom-lg: 0 24px 60px -22px rgba(11, 42, 74, 0.3);
  /* translucent chrome + ambience — themed, never hard-coded downstream */
  --veil: rgba(238, 243, 248, 0.78);
  --veil-panel: rgba(255, 255, 255, 0.88);
  --backdrop: rgba(11, 42, 74, 0.35);
  --grain: 0.025;
  --ambient:
    radial-gradient(900px 420px at 50% -8%, rgba(0, 180, 216, 0.1), transparent 62%),
    radial-gradient(1200px 800px at 50% 120%, rgba(11, 42, 74, 0.05), transparent 60%);
  --hero-grad:
    radial-gradient(700px 340px at 85% 10%, rgba(0, 180, 216, 0.14), transparent 60%),
    linear-gradient(135deg, #123e66, #0b2a4a);
  /* shape */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 11px;
  /* depth */
  --shadow-1: 0 1px 2px rgba(11, 42, 74, 0.04), 0 12px 32px -18px rgba(11, 42, 74, 0.3);
  --shadow-2: 0 2px 8px rgba(11, 42, 74, 0.06), 0 30px 60px -26px rgba(11, 42, 74, 0.35);
  /* type */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --z-sticky: 40;
  --z-modal: 70;
  --z-toast: 90;
}

/* ============================================================
   DARK — the opt-in "Screening Room". Also forced on the video
   player (body.force-dark) whatever the chosen theme.
   ============================================================ */
:root[data-theme="dark"],
body.force-dark {
  --bg: #04070d;
  --room: #070d18;
  --panel: #0a1322;
  --raised: #0f1b30;
  --hover-wash: rgba(140, 180, 235, 0.05);
  --line: rgba(158, 193, 255, 0.09);
  --line-strong: rgba(158, 193, 255, 0.18);
  --ink: #eaf1fa;
  --ink-2: #c3d2e4;
  --ink-3: #8ea4bf;
  --ink-4: #7089a6;
  --accent: #22c3e6;
  --accent-deep: #0090c9;
  --accent-soft: rgba(34, 195, 230, 0.12);
  --green: #2fe6b0;
  --green-soft: rgba(47, 230, 176, 0.12);
  --warn: #ffc857;
  --warn-soft: rgba(255, 200, 87, 0.12);
  --danger: #ff5d84;
  --danger-soft: rgba(255, 93, 132, 0.1);
  --bloom: 0 0 24px rgba(0, 180, 216, 0.35), 0 8px 32px -8px rgba(0, 150, 210, 0.5);
  --bloom-lg: 0 0 60px rgba(0, 180, 216, 0.2), 0 24px 70px -20px rgba(0, 0, 0, 0.8);
  --veil: rgba(4, 7, 13, 0.72);
  --veil-panel: rgba(10, 19, 34, 0.82);
  --backdrop: rgba(2, 5, 10, 0.7);
  --grain: 0.05;
  --ambient:
    radial-gradient(900px 420px at 50% -8%, rgba(0, 180, 216, 0.09), transparent 62%),
    radial-gradient(1200px 800px at 50% 120%, rgba(2, 8, 18, 0.9), transparent 60%);
  --hero-grad:
    radial-gradient(700px 340px at 85% 10%, rgba(0, 180, 216, 0.16), transparent 60%),
    radial-gradient(400px 300px at 10% 100%, rgba(0, 90, 160, 0.18), transparent 65%),
    var(--room);
  --shadow-1: 0 1px 0 rgba(158, 193, 255, 0.04) inset, 0 14px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 1px 0 rgba(158, 193, 255, 0.06) inset, 0 30px 70px -24px rgba(0, 0, 0, 0.85);
}
body.force-dark { color: var(--ink-2); background: var(--bg); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
/* film grain + key light — the room itself */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: var(--grain); mix-blend-mode: overlay;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--ambient);
}
body > * { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.14;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.97rem; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.86em; color: var(--ink-2); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.ic { width: 20px; height: 20px; flex: 0 0 auto; }
.muted { color: var(--ink-3); }
.mini { font-size: 0.82rem; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.center-text { text-align: center; }
.clamp-1, .clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
/* mono metadata voice — dates, durations, counts, codes */
.mono, .continue-meta, .next-card time, .ep,
.recent-body .mini, .lesson-info .mini, .ann-row time, .ann-head time, .ann-head .mini,
td.muted, .w-bar .mini, .stat span, .batch-line-top .mini, .mini-row .mini {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ink-4);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(0, 180, 216, 0.35); color: #fff; }

.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - 40px); }
.page { padding: 34px 0 70px; }
body.has-tabbar .page { padding-bottom: 118px; }

/* ---------- chips · notes · bars ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.5;
  background: var(--raised); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip .ic { width: 13px; height: 13px; }
.chip-soft { background: var(--raised); }
.chip-ok { background: var(--green-soft); color: var(--green); border-color: rgba(47, 230, 176, 0.25); }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(255, 200, 87, 0.25); }
.chip-glass { background: rgba(4, 10, 20, 0.5); color: var(--ink); border-color: var(--line-strong); backdrop-filter: blur(8px); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--r-sm);
  font-size: 0.9rem; margin: 0 0 14px; border: 1px solid;
}
.note .ic { width: 18px; height: 18px; margin-top: 1px; }
.note-ok { background: var(--green-soft); color: var(--green); border-color: rgba(47, 230, 176, 0.3); }
.note-err { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 93, 132, 0.3); }
.note-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(255, 200, 87, 0.3); }
.note-dev { background: var(--raised); color: var(--ink-2); border-color: var(--line); word-break: break-all; }

.bar { height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; flex: 1; position: relative; }
.bar span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.5);
  transform-origin: left;
  animation: barIn 1.1s var(--ease);
}
.bar.sm { height: 4px; }
@keyframes barIn { from { transform: scaleX(0); } }

.pill {
  font-family: var(--font-mono); font-size: 0.84rem;
  background: var(--raised); border: 1px dashed var(--line-strong);
  padding: 4px 10px; border-radius: 8px; font-weight: 600; color: var(--ink);
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 13px; border: 1px solid transparent;
  font: 600 0.92rem var(--font-body); cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none; white-space: nowrap; user-select: none;
  will-change: transform;
}
.btn .ic { width: 17px; height: 17px; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--bloom); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 0.5s var(--ease-io);
}
.btn-primary:hover { box-shadow: 0 0 34px rgba(0, 180, 216, 0.5), 0 10px 36px -8px rgba(0, 150, 210, 0.6); }
.btn-primary:hover::after { left: 120%; }
.btn-light { background: var(--ink); color: var(--bg); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn-done { background: var(--green-soft); color: var(--green); border-color: rgba(47, 230, 176, 0.35); }
.btn-wa { background: #e7f8ef; color: #0f7a42; border: 1px solid rgba(18, 140, 75, 0.28); }
.btn-wa:hover { background: #d9f4e6; }
.btn-block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 0.84rem; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.right { justify-content: flex-end; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  cursor: pointer; transition: transform 0.16s var(--ease), border-color 0.2s, color 0.2s, background 0.2s;
  flex: 0 0 auto;
}
.icon-btn .ic { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.icon-btn:disabled { opacity: 0.3; pointer-events: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.link-arrow .ic { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.link-arrow:hover .ic { transform: translateX(4px); }
.link-arrow.back { color: var(--ink-3); margin-bottom: 6px; }
.link-arrow.back .ic { transform: none; }
.link-arrow.back:hover { color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; }
.field input, .field textarea, .select {
  font: 400 0.95rem var(--font-body); color: var(--ink);
  background: var(--room); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.field input:focus, .field textarea:focus, .select:focus {
  outline: none; border-color: var(--accent-deep); background: var(--panel);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 20px rgba(0, 180, 216, 0.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field textarea { resize: vertical; min-height: 44px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > div:last-child { margin-top: 4px; }
.check-field { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 15px; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; }
.check-field input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent-deep); }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
.select option { background: var(--panel); color: var(--ink); }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--ink-4); cursor: pointer;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle .ic { width: 18px; height: 18px; }

/* ---------- panels ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(158, 193, 255, 0.03), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.25s;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3, .card > h3 { margin: 0; }
.card > h3 { margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-head); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--bloom);
}
.brand-mark .ic { width: 15px; height: 15px; margin-left: 1px; }
.brand-text { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-text em { font-style: normal; color: var(--accent); font-weight: 600; }

/* ============================================================
   APP SHELL — glass rail on the left, content on the right
   ============================================================ */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100dvh; }

.rail { position: sticky; top: 0; height: 100dvh; z-index: var(--z-sticky); }
/* the glass itself: blurred, tinted, with a lit inner edge */
.rail-glass {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset -1px 0 0 rgba(11, 42, 74, 0.06), 18px 0 50px -30px rgba(11, 42, 74, 0.35);
}
.rail-glass::after {          /* soft cyan bloom bleeding through the glass */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(320px 220px at 12% 8%, rgba(0, 180, 216, 0.2), transparent 70%),
    radial-gradient(300px 260px at 90% 96%, rgba(0, 119, 182, 0.16), transparent 72%);
}
:root[data-theme="dark"] .rail-glass {
  background: linear-gradient(160deg, rgba(18, 32, 54, 0.72), rgba(8, 16, 30, 0.5));
  border-right: 1px solid rgba(158, 193, 255, 0.12);
  box-shadow: inset -1px 0 0 rgba(158, 193, 255, 0.06), 18px 0 60px -30px rgba(0, 0, 0, 0.8);
}
.rail-inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; gap: 26px; padding: 24px 16px;
}
.rail-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--ink); font-family: var(--font-head); }

.rail-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.rail-nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 13px;
  color: var(--ink-3); font-weight: 600; font-size: 0.93rem;
  transition: color 0.2s var(--ease), background 0.2s, transform 0.2s var(--ease);
}
.rail-nav a .ic { width: 19px; height: 19px; }
.rail-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); transform: translateX(2px); }
:root[data-theme="dark"] .rail-nav a:hover { background: rgba(158, 193, 255, 0.08); }
.rail-nav a.on {
  color: var(--accent-deep);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  box-shadow: 0 6px 18px -10px rgba(11, 42, 74, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
:root[data-theme="dark"] .rail-nav a.on {
  color: var(--accent);
  background: rgba(34, 195, 230, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.22);
}
.rail-nav a.on::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--grad);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.7);
}
.rail-nav .badge { margin-left: auto; }

.rail-foot { display: flex; align-items: flex-end; gap: 10px; }
.rail-batch {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
:root[data-theme="dark"] .rail-batch { background: rgba(158, 193, 255, 0.06); border-color: rgba(158, 193, 255, 0.1); }
.rail-batch strong { font-size: 0.88rem; color: var(--ink); }
.rail-batch .mini { font-size: 0.7rem; }

.app-main { min-width: 0; }
.app-main .page { padding: 34px clamp(20px, 3vw, 44px) 70px; }
.app-main .page.narrow { max-width: 780px; }
body.has-tabbar .app-main .page { padding-bottom: 118px; }

/* mobile header (rail collapses away) */
.mobile-top {
  display: none; align-items: center; justify-content: space-between;
  padding: 12px 18px; position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--veil);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 0.66rem; font-weight: 700;
  display: inline-grid; place-items: center;
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}
.top-right { display: flex; align-items: center; gap: 12px; }
.batch-chip { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center; box-shadow: var(--bloom);
  transition: transform 0.18s var(--ease);
}
.avatar:hover { transform: scale(1.08); }
.avatar.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar.big { width: 68px; height: 68px; font-size: 1.6rem; border-radius: 22px; }

/* ---------- announcement ticker ---------- */
.ticker {
  position: relative; overflow: hidden; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--room);
  margin-bottom: 26px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: inline-flex; gap: 48px; padding: 9px 24px;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.03em; color: var(--ink-3);
  animation: tick 36s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track b { color: var(--accent); font-weight: 600; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- mobile tabbar ---------- */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--z-sticky);
  display: none; grid-template-columns: repeat(4, 1fr);
  background: var(--veil-panel);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom) / 2);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 5px; border-radius: 14px; color: var(--ink-4);
  font-size: 0.66rem; font-weight: 600; position: relative;
  transition: color 0.2s;
}
.tabbar a .ic { width: 21px; height: 21px; transition: transform 0.25s var(--ease); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on .ic { transform: translateY(-1px); filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.6)); }
.tabbar a:active .ic { transform: scale(0.85); }
.tabbar a.has-dot::after {
  content: ''; position: absolute; top: 5px; right: calc(50% - 15px);
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.8);
}

/* ============================================================
   AUTH — "Split Stage" (design direction 1A)
   Navy credibility panel on the left, white form on the right.
   Always light — this page ignores the theme toggle by design.
   ============================================================ */
body.auth-1a { background: #fff; }
body.auth-1a::before, body.auth-1a::after { display: none; }

.split { display: grid; grid-template-columns: 620px 1fr; min-height: 100dvh; }

/* ---- left panel ---- */
.split-left {
  position: relative; overflow: hidden;
  background: #0b2a4a; color: #fff;
  padding: 56px 56px 48px;
  display: flex; flex-direction: column;
}
.split-left > *:not(.blob):not(.split-grid) { position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.blob-a {
  top: -160px; left: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle at 35% 35%, rgba(0, 180, 216, 0.28), rgba(0, 180, 216, 0) 68%);
  animation: drift 16s ease-in-out infinite;
}
.blob-b {
  bottom: -200px; right: -140px; width: 560px; height: 560px;
  background: radial-gradient(circle at 60% 40%, rgba(0, 119, 182, 0.32), rgba(0, 119, 182, 0) 70%);
  animation: drift2 20s ease-in-out infinite;
}
@keyframes drift  { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 24px) scale(1.06); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-26px, -20px) scale(1.08); } }
.split-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.split-left .logo-chip {
  background: #fff; border-radius: 12px; padding: 12px 18px;
  align-self: flex-start; display: inline-flex;
  animation: fadeUp 0.7s var(--ease) both;
  transition: transform 0.25s var(--ease);
}
.split-left .logo-chip img { height: 34px; width: auto; }
.split-left .logo-chip:hover { transform: translateY(-2px); }
.eyebrow {
  margin: 52px 0 0; font-family: var(--font-head); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: #00b4d8;
  animation: fadeUp 0.7s 0.08s var(--ease) both;
}
/* visually the panel's headline, but not an <h1> — the form title owns that role */
.stage-h1 {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(2.2rem, 3.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em;
  margin: 16px 0 0; color: #fff;
  animation: fadeUp 0.7s 0.16s var(--ease) both;
}
.stage-body {
  font-size: 1.06rem; line-height: 1.65; color: #b9cfe2;
  margin: 20px 0 0; max-width: 430px;
  animation: fadeUp 0.7s 0.24s var(--ease) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.idgraph { margin-top: auto; padding-top: 40px; animation: fadeIn 1.2s 0.25s var(--ease) both; }
.idgraph svg { width: 100%; height: auto; max-width: 500px; overflow: visible; }
.idg-links path {
  fill: none; stroke: #00b4d8; stroke-width: 1.2; opacity: 0.55;
  stroke-dasharray: 6 8; animation: dashFlow 9s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -140; } }
.idg-nodes circle {
  fill: #00b4d8; transform-box: fill-box; transform-origin: center;
  animation: pulseNode 3.2s ease-in-out infinite;
  animation-delay: calc(var(--n) * 0.6s);
}
@keyframes pulseNode {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.55); opacity: 1; }
}
.idg-labels text {
  font-family: var(--font-body); font-size: 11px;
  fill: #fff; opacity: 0.72;
}

/* ---- right column ---- */
.split-right {
  display: flex; flex-direction: column;
  padding: 44px clamp(24px, 6vw, 90px) 40px;
  background: #fff;
}
.split-top {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  font-size: 0.875rem; color: #64748b;
}
.pill-link {
  border: 1px solid #cfe3ef; border-radius: 999px; padding: 8px 16px;
  font-weight: 600; color: #0077b6; transition: all 0.22s var(--ease);
}
.pill-link:hover { border-color: #00b4d8; color: #00b4d8; background: #f2fbfe; transform: translateY(-1px); }

.split-form { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 480px; margin: 0 auto; }
.split-form > .note { margin-bottom: 18px; }
.form-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.35rem); color: #0b2a4a; letter-spacing: -0.015em; margin: 0; }
.form-sub { font-size: 1rem; color: #64748b; margin-top: 10px; line-height: 1.6; }
.form-sub strong { color: #0b2a4a; font-weight: 600; }

/* staggered row entrance */
.r1, .r2, .r3, .r4, .r5, .r6, .r7, .r8 { animation: fadeUp 0.6s var(--ease) both; }
.r1 { animation-delay: 0.10s; } .r2 { animation-delay: 0.15s; }
.r3 { animation-delay: 0.20s; } .r4 { animation-delay: 0.25s; }
.r5 { animation-delay: 0.30s; } .r6 { animation-delay: 0.35s; }
.r7 { animation-delay: 0.40s; } .r8 { animation-delay: 0.45s; }

/* segmented Student / Trainer */
.seg { display: flex; gap: 6px; margin-top: 28px; padding: 5px; background: #f1f5f9; border-radius: 12px; }
.seg-btn {
  flex: 1; text-align: center; border-radius: 9px; padding: 11px 12px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  color: #56657c;   /* pack spec #64748b was 4.34:1 on the track — nudged to clear AA */
  transition: all 0.24s var(--ease);
}
.seg-btn:hover { color: #0b2a4a; }
.seg-btn.on { background: #fff; color: #0b2a4a; box-shadow: 0 2px 8px rgba(11, 42, 74, 0.12); }

/* boxed fields with leading icon */
.bf { display: block; margin-top: 22px; }
.bf-row { display: flex; justify-content: space-between; align-items: baseline; }
.bf-label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #475569; }
.bf-aside { font-size: 0.8rem; font-weight: 600; color: #0077b6; }
.bf-aside:hover { color: #00b4d8; }
.bf-wrap { position: relative; display: block; margin-top: 9px; }
.bf-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; display: flex; }
.bf-ic .ic { width: 18px; height: 18px; }
.bf-wrap input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid #dbe4ec; border-radius: 12px;
  padding: 15px 16px 15px 46px;
  font-family: var(--font-body); font-size: 1rem; color: #0f172a; background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.bf-wrap input::placeholder { color: #a4b3c4; }
.bf-wrap input:focus { outline: none; border-color: #00b4d8; box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.16); }
.bf-wrap:has(.pw-toggle) input { padding-right: 52px; }
.bf .pw-toggle { top: 50%; right: 8px; color: #64748b; }
.bf .pw-toggle:hover { background: #f1f5f9; }

/* keep me signed in */
.check-line { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 0.92rem; color: #475569; cursor: pointer; user-select: none; }
.check-line input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-line .tick {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto;
  border: 1.5px solid #cbd5e1; background: #fff;
  display: grid; place-items: center; color: #fff;
  transition: background 0.22s, border-color 0.22s;
}
.check-line .tick .ic { width: 13px; height: 13px; opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.25s var(--ease); }
.check-line input:checked + .tick { background: linear-gradient(135deg, #00b4d8, #0077b6); border-color: transparent; }
.check-line input:checked + .tick .ic { opacity: 1; transform: none; }
.check-line input:focus-visible + .tick { outline: 2px solid #00b4d8; outline-offset: 2px; }

.split-form .btn-primary { margin-top: 28px; border-radius: 13px; padding: 18px; font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; box-shadow: 0 12px 26px rgba(0, 119, 182, 0.32); }
.split-form .btn-primary:hover { box-shadow: 0 18px 34px rgba(0, 119, 182, 0.42); }
.alt-line { text-align: center; margin-top: 22px; font-size: 0.9rem; font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 18px; }
.back-link .ic { width: 15px; height: 15px; }
.back-link:hover { color: #0077b6; }
.link-btn { border: 0; background: none; padding: 0; font: 600 0.9rem var(--font-body); color: #0077b6; cursor: pointer; }
.link-btn:hover { color: #00b4d8; text-decoration: underline; }
.resend { display: flex; justify-content: center; gap: 6px; margin-top: 20px; font-size: 0.9rem; color: #64748b; }

/* trainer gate */
.gate { margin-top: 26px; text-align: center; padding: 30px 24px; border: 1px dashed #cfe3ef; border-radius: 16px; background: #f8fbfd; }
.gate-ic { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px; background: rgba(0, 180, 216, 0.12); color: #0077b6; display: grid; place-items: center; }
.gate-ic .ic { width: 24px; height: 24px; }
.gate h2 { font-size: 1.15rem; color: #0b2a4a; }
.gate p { margin-top: 8px; font-size: 0.92rem; color: #64748b; line-height: 1.6; max-width: 34ch; margin-inline: auto; }
.gate .btn-primary { margin-top: 22px; }
.btn-quiet { background: none; border: 0; color: #64748b; margin-top: 10px; }
.btn-quiet:hover { color: #0077b6; }

/* OTP cells */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 26px; }
.otp-cell {
  width: 100%; height: 62px; text-align: center;
  border: 1.5px solid #dbe4ec; border-radius: 12px; background: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: #0b2a4a;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.otp-cell:focus { outline: none; border-color: #00b4d8; box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.16); transform: translateY(-2px); }
.otp-cell.filled { border-color: #9fd9ec; }
.verified-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(6, 214, 160, 0.14); color: #04795b;
  font-size: 0.8rem; font-weight: 600;
}
.verified-badge .ic { width: 15px; height: 15px; }

.split-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid #eef2f7; padding-top: 20px; margin-top: 32px;
  font-size: 0.8rem; color: #64748b;   /* pack spec #94a3b8 was 2.56:1 — unreadable, darkened to AA */
}
.split-foot-links { display: flex; gap: 18px; }
.split-foot-links a { color: #0077b6; }

.btn-sheen { position: relative; overflow: hidden; }
.btn-sheen::before {
  content: ''; position: absolute; top: 0; left: -45%; width: 45%; height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -45%; } 55%, 100% { left: 130%; } }

/* ---- solo auth pages (reset link, first-login, expired, admin, 404, 500) ---- */
body.auth-solo { background: #eef3f8; }
body.auth-solo::before, body.auth-solo::after { display: none; }
.solo-wrap {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px; padding: 32px 20px;
  background:
    radial-gradient(760px 460px at 50% -10%, rgba(0, 180, 216, 0.14), transparent 62%),
    #eef3f8;
}
.solo-logo {
  background: #fff; border: 1px solid rgba(11, 42, 74, 0.08);
  border-radius: 12px; padding: 11px 17px; display: inline-flex;
  box-shadow: 0 6px 18px -10px rgba(11, 42, 74, 0.4);
  animation: fadeUp 0.6s var(--ease) both;
}
.solo-logo img { height: 30px; width: auto; }
.solo-card {
  width: min(440px, 100%); background: #fff;
  border: 1px solid rgba(11, 42, 74, 0.1); border-radius: 20px;
  padding: 32px; box-shadow: 0 2px 8px rgba(11, 42, 74, 0.05), 0 30px 60px -28px rgba(11, 42, 74, 0.4);
  animation: fadeUp 0.7s 0.08s var(--ease) both;
}
.solo-card.center { text-align: center; }
.solo-card h1 { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: #0b2a4a; letter-spacing: -0.02em; margin: 0; }
.solo-card .form-sub { margin-bottom: 4px; }
.solo-card .btn-primary { margin-top: 26px; border-radius: 13px; padding: 17px; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.solo-card .btn-ghost { margin-top: 10px; }
.solo-eyebrow { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: #0077b6; margin-bottom: 10px; }
.solo-links { text-align: center; margin-top: 18px; font-size: 0.88rem; font-weight: 600; }
.solo-help { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid #eef2f7; font-size: 0.82rem; color: #64748b; line-height: 1.6; }
.solo-foot { font-size: 0.78rem; color: #64748b; text-align: center; }

.big-ic {
  width: 60px; height: 60px; border-radius: 19px; margin: 0 auto 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.2), 0 0 30px rgba(0, 180, 216, 0.15);
}
.big-ic .ic { width: 26px; height: 26px; }
.big-ic.ok { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(47, 230, 176, 0.2), 0 0 30px rgba(47, 230, 176, 0.12); }
.glass-card .big-ic { background: rgba(0, 180, 216, 0.14); }

/* ---------- dashboard: the screening room ---------- */
.dash-greet { margin-bottom: 20px; }
.dash-greet h1 { font-weight: 800; letter-spacing: -0.03em; }
.dash-greet .muted { margin-top: 6px; font-size: 0.95rem; }
.dash-greet strong { color: var(--ink); }

.dash-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin-bottom: 36px; }

/* ---- hero (1a: one dominant action) ---- */
.hero {
  position: relative; display: flex; justify-content: space-between; gap: 20px;
  background: var(--hero-grad);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: 32px; overflow: hidden;
  box-shadow: var(--bloom-lg); margin-bottom: 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
  transform-style: preserve-3d;
}
.hero, .hero h2 { color: #eaf1fa; }
.hero:hover { border-color: rgba(34, 195, 230, 0.4); }
.hero-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.hero-body h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.028em; max-width: 20ch; }
.hero-meta { color: #a9c0d6; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.02em; }
.hero-body .btn { margin-top: 8px; }
.hero-art { position: relative; z-index: 1; display: grid; place-items: center; padding-right: 10px; }
.hero.empty { background: var(--panel); border-style: dashed; box-shadow: none; }
.hero.empty, .hero.empty h2 { color: var(--ink); }
.hero.empty .hero-meta { color: var(--ink-3); }

/* ---- class rows (flat, chronological) ---- */
.cls-badge {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep);
  font: 700 0.95rem var(--font-mono);
  box-shadow: inset 0 0 0 1px rgba(0, 180, 216, 0.18);
  transition: background 0.25s, color 0.25s;
}
:root[data-theme="dark"] .cls-badge { color: var(--accent); }
.cls-badge.done { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(6, 214, 160, 0.25); }
.cls-badge .ic { width: 18px; height: 18px; }

.class-list { display: flex; flex-direction: column; gap: 9px; }
.class-row, .upnext-row {
  display: flex; align-items: center; gap: 15px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 18px; color: var(--ink-2);
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.28s;
}
.class-row:hover, .upnext-row:hover {
  transform: translateY(-2px); border-color: rgba(0, 180, 216, 0.4);
  box-shadow: 0 14px 32px -18px rgba(11, 42, 74, 0.5);
}
.class-info, .upnext-row .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.class-info strong, .upnext-row strong { color: var(--ink); font-size: 0.96rem; font-weight: 600; }
.class-row.is-done .class-info strong { color: var(--ink-2); }
.class-cta {
  display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.class-cta .ic { width: 15px; height: 15px; }
.class-row:hover .class-cta { opacity: 1; transform: none; }
.upnext-list { display: flex; flex-direction: column; gap: 9px; }
.upnext-play { color: var(--ink-4); flex: 0 0 auto; }
.upnext-play .ic { width: 17px; height: 17px; }
.upnext-row:hover .upnext-play { color: var(--accent); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* kept for the empty-state variant used elsewhere */
.continue-card {
  position: relative; display: flex; justify-content: space-between; gap: 20px;
  background: var(--hero-grad);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 30px; color: var(--ink); overflow: hidden;
  box-shadow: var(--bloom-lg);
  transition: transform 0.3s var(--ease), border-color 0.3s;
  transform-style: preserve-3d;
}
.continue-card:hover { border-color: rgba(34, 195, 230, 0.4); }
.now-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; color: var(--accent);
}
.now-label::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px rgba(0, 180, 216, 0.9);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.continue-info { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.continue-info h2 { color: var(--ink); font-size: clamp(1.35rem, 2.4vw, 1.8rem); max-width: 22ch; letter-spacing: -0.028em; }
.continue-meta { display: flex; align-items: center; gap: 7px; }
.continue-meta .ic { width: 14px; height: 14px; }
.continue-info .btn { margin-top: 8px; }
.continue-art { position: relative; z-index: 1; display: grid; place-items: center; padding-right: 10px; }
.play-pulse {
  position: relative; width: 82px; height: 82px; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: var(--bloom);
}
.play-pulse::before, .play-pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(34, 195, 230, 0.5);
  animation: ringOut 2.8s var(--ease-io) infinite;
}
.play-pulse::after { animation-delay: 1.4s; }
@keyframes ringOut { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.play-pulse .ic { width: 30px; height: 30px; margin-left: 4px; }
.continue-card.empty { background: var(--panel); border-style: dashed; box-shadow: none; }
.continue-card.empty h2 { color: var(--ink); }

.dash-side { display: flex; flex-direction: column; gap: 20px; }

/* progress dial */
.ring-card { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 98px; height: 98px; flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-linecap: round; }
.ring-tick { stroke: var(--raised); stroke-width: 2; stroke-dasharray: 1 6.06; }
.ring-bg { stroke: var(--raised); stroke-width: 7; }
.ring-fg {
  stroke: url(#ringGrad); stroke-width: 7;
  stroke-dasharray: 226.2; stroke-dashoffset: 226.2;
  transition: stroke-dashoffset 1.4s var(--ease);
  filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.6));
}
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); }
.ring-label span { font-family: var(--font-mono); font-size: 0.58rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.12em; }
.ring-side h3 { margin-bottom: 2px; }
.ring-side .muted { margin-bottom: 10px; font-size: 0.86rem; }

.next-card h3 { margin: 8px 0 6px; }
.next-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.14em;
}
.next-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px rgba(47, 230, 176, 0.9);
  animation: blink 1.8s ease-in-out infinite;
}
.next-card .muted { display: flex; gap: 7px; align-items: center; font-size: 0.85rem; }
.next-card .muted .ic { width: 14px; height: 14px; }
.next-card .btn { margin-top: 14px; }

.dash-section { margin-bottom: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-head h2 { font-size: 1.2rem; letter-spacing: -0.02em; }

.ann-preview { display: flex; flex-direction: column; gap: 9px; }
.ann-row {
  display: flex; align-items: center; gap: 15px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 19px; color: var(--ink-2);
  transition: transform 0.22s var(--ease), border-color 0.22s, background 0.22s;
}
.ann-row:hover { transform: translateX(5px); border-color: var(--line-strong); background: var(--raised); }
.ann-row .ann-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--raised); flex: 0 0 auto; }
.ann-row.unread .ann-dot { background: var(--accent); box-shadow: 0 0 10px rgba(0, 180, 216, 0.8); }
.ann-row div { flex: 1; min-width: 0; }
.ann-row h4 { margin-bottom: 1px; color: var(--ink); }
.ann-row time { flex: 0 0 auto; }

.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.recent-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px; color: var(--ink-2);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.3s;
}
.recent-card:hover {
  transform: translateY(-4px); border-color: rgba(34, 195, 230, 0.35);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 180, 216, 0.08);
}
.recent-thumb {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.18);
}
.recent-thumb.done { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(47, 230, 176, 0.18); }
.recent-thumb .ic { width: 18px; height: 18px; }
.recent-body h4 { margin: 3px 0 4px; color: var(--ink); }

/* ---------- course: the reel ---------- */
.course-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.course-head h1 { font-weight: 800; }
.course-head .muted { margin-top: 5px; }
.course-progress { display: flex; align-items: center; gap: 10px; min-width: 220px; flex: 0 1 300px; }
.course-progress .mini { font-family: var(--font-mono); }

.module-list { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 26px; }
/* the reel line */
.module-list::before {
  content: ''; position: absolute; left: 8px; top: 24px; bottom: 24px; width: 2px;
  background: var(--raised); border-radius: 2px;
}
.module-list::after {
  content: ''; position: absolute; left: 8px; top: 24px; bottom: 24px; width: 2px;
  background: var(--grad); border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.5);
  transform: scaleY(var(--fill, 0)); transform-origin: top;
  transition: transform 1.4s var(--ease);
}
.module {
  position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1);
  transition: border-color 0.25s;
}
.module::before {
  content: ''; position: absolute; left: -22px; top: 26px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--raised); border: 2px solid var(--room);
}
.module[open] { border-color: var(--line-strong); }
.module summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  transition: background 0.2s;
}
.module summary::-webkit-details-marker { display: none; }
.module summary:hover { background: var(--hover-wash); }
.module-num {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--raised); color: var(--ink-3);
  font: 700 0.92rem var(--font-mono);
  transition: all 0.3s var(--ease);
}
.module-num.done { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(47, 230, 176, 0.25); }
.module-num.done .ic { width: 17px; height: 17px; }
.module-num.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 0.76rem; }
.module[open] .module-num:not(.done) { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.25); }
.module-title { flex: 1; min-width: 0; }
.module-title h3 { font-size: 1rem; letter-spacing: -0.015em; }
.module-title .mini { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-4); }
.module-chev { color: var(--ink-4); transition: transform 0.35s var(--ease); }
.module[open] .module-chev { transform: rotate(180deg); color: var(--accent); }
.module-body { border-top: 1px solid var(--line); animation: fadeDown 0.35s var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.lesson-row {
  display: flex; align-items: center; gap: 15px;
  padding: 14px 20px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
}
.lesson-row > * { transition: transform 0.25s var(--ease); }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--hover-wash); }
.lesson-row:hover > * { transform: translateX(6px); }
.lesson-info { flex: 1; min-width: 0; }
.lesson-info h4 { font-weight: 600; font-size: 0.94rem; color: var(--ink); }
.lesson-play { color: var(--ink-4); opacity: 0; transition: opacity 0.2s, transform 0.25s var(--ease); transform: translateX(-6px); }
.lesson-row:hover .lesson-play { opacity: 1; transform: none; color: var(--accent); }
.lesson-play .ic { width: 17px; height: 17px; }

.check {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  color: var(--bg); transition: all 0.3s var(--ease); background: transparent;
}
.check .ic { width: 13px; height: 13px; }
.check.done { background: var(--green); border-color: var(--green); box-shadow: 0 0 12px rgba(47, 230, 176, 0.4); }
.check.done .ic { animation: checkPop 0.4s var(--ease); }
.check.seen { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-soft); }
.check.sm { width: 20px; height: 20px; }
.check.sm .ic { width: 10px; height: 10px; }
@keyframes checkPop { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- player: the projection ---------- */
.player-page { background: var(--bg); }
.player-top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: var(--veil);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.player-top-title { flex: 1; min-width: 0; }
.player-top-title .mini { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.player-top-title h1 { font-size: 1rem; letter-spacing: -0.01em; }
.player-layout {
  display: grid; grid-template-columns: 1fr 350px; gap: 26px;
  width: min(1300px, 100% - 40px); margin: 24px auto 70px;
  align-items: start;
}
.stage-glow { position: relative; }
.stage-glow::before {
  content: ''; position: absolute; inset: -8% -6%;
  background: radial-gradient(60% 70% at 50% 45%, rgba(0, 160, 215, 0.22), transparent 70%);
  filter: blur(30px); z-index: 0; pointer-events: none;
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.65; transform: scale(0.985); } to { opacity: 1; transform: scale(1.015); } }
.player-stage {
  position: relative; aspect-ratio: 16 / 9; z-index: 1;
  background: #000814; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  user-select: none;
}
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 24px; color: var(--ink-2);
}
.stage-empty .big-ic { margin-bottom: 8px; }
.stage-empty h3 { color: var(--ink); }
.stage-empty p { max-width: 42ch; font-size: 0.9rem; }
.watermark {
  position: absolute; top: 8%; left: 6%; z-index: 3;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.38); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; pointer-events: none; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: transform 2.6s var(--ease-io), opacity 2.6s var(--ease-io);
  will-change: transform;
}

.player-info { position: relative; z-index: 1; padding: 24px 2px 0; }
.player-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.player-headrow h2 { margin-bottom: 6px; letter-spacing: -0.025em; }
.player-headrow .muted { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.76rem; }
.player-headrow .muted .ic { width: 13px; height: 13px; }
.player-navrow { display: flex; justify-content: space-between; gap: 14px; margin: 24px 0; }
.nav-lesson {
  display: flex; align-items: center; gap: 12px; max-width: 47%;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 17px; color: var(--ink-2);
  transition: border-color 0.22s, transform 0.25s var(--ease), background 0.22s;
}
.nav-lesson:hover { border-color: rgba(34, 195, 230, 0.35); transform: translateY(-3px); background: var(--raised); }
.nav-lesson span { display: flex; flex-direction: column; min-width: 0; }
.nav-lesson span .mini { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; }
.nav-lesson strong { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.nav-lesson.right { text-align: right; margin-left: auto; }
.nav-lesson .ic { color: var(--ink-4); flex: 0 0 auto; }
.player-desc, .player-res { margin-top: 26px; }
.player-desc h3, .player-res h3 { margin-bottom: 9px; }
.player-desc p { color: var(--ink-2); max-width: 70ch; }
.res-row {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 15px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ink); font-weight: 500; font-size: 0.92rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.res-row:hover { border-color: rgba(34, 195, 230, 0.35); transform: translateX(3px); }
.res-row .ic { width: 16px; height: 16px; color: var(--accent); }
.res-ic {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px;
  display: grid; place-items: center; background: var(--raised); color: var(--ink-3);
}
.res-transcript .res-ic { background: rgba(0, 180, 216, 0.14); color: var(--accent); }
.res-audio .res-ic { background: rgba(47, 230, 176, 0.14); color: var(--green); }
.res-notes .res-ic { background: rgba(255, 200, 87, 0.14); color: var(--warn); }
.res-row .chip { text-transform: capitalize; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-inline: 4px; }
.side-list { display: flex; flex-direction: column; gap: 2px; }

.player-side {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
  position: sticky; top: 80px;
  max-height: calc(100dvh - 104px); overflow: auto;
}
.player-side > h3 { margin-bottom: 10px; padding-inline: 4px; }
.side-module { border-top: 1px solid var(--line); }
.side-module summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 12px 4px; font-weight: 600; font-size: 0.9rem; color: var(--ink-2);
  transition: color 0.2s;
}
.side-module summary::-webkit-details-marker { display: none; }
.side-module summary:hover { color: var(--ink); }
.side-module summary .mini { margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.7rem; }
.side-lesson {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 10px; margin-bottom: 2px;
  color: var(--ink-3); font-size: 0.86rem;
  transition: background 0.18s, color 0.18s;
}
.side-lesson:hover { background: var(--hover-wash); color: var(--ink); }
.side-lesson.now { background: var(--accent-soft); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.2); }
.now-tag {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- announcements page ---------- */
.ann-list { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.ann-card.unread { border-color: rgba(34, 195, 230, 0.35); box-shadow: var(--shadow-1), 0 0 24px rgba(0, 180, 216, 0.06); }
.ann-card .ann-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.ann-card h3 { margin-bottom: 7px; }
.ann-body { color: var(--ink-2); white-space: pre-line; max-width: 70ch; }

/* ---------- profile ---------- */
.profile-card { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.profile-info h1 { font-size: 1.5rem; }
.profile-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.narrow .card { margin-bottom: 20px; }

/* ---------- empty state ---------- */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .big-ic { margin-bottom: 14px; }
.empty-state p { max-width: 46ch; margin-inline: auto; margin-top: 4px; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.admin-side {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 24px;
  padding: 22px 16px; border-right: 1px solid var(--line);
  background: var(--room);
}
.admin-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: 11px;
  color: var(--ink-3); font-weight: 600; font-size: 0.9rem;
  transition: color 0.18s, background 0.18s;
}
.admin-links a .ic { width: 18px; height: 18px; }
.admin-links a:hover { color: var(--ink); background: var(--hover-wash); }
.admin-links a.on {
  color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.admin-side-foot { display: flex; flex-direction: column; gap: 4px; }
.side-mini {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 13px; border-radius: 10px; border: 0; background: none;
  color: var(--ink-4); font: 600 0.84rem var(--font-body); cursor: pointer;
  transition: color 0.18s, background 0.18s; text-align: left;
}
.side-mini .ic { width: 16px; height: 16px; }
.side-mini:hover { color: var(--ink); background: var(--hover-wash); }

.admin-main { padding: 32px clamp(18px, 3.4vw, 46px) 70px; min-width: 0; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-weight: 800; letter-spacing: -0.028em; }
.admin-head .muted { margin-top: 5px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  display: flex; align-items: center; gap: 15px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-1);
  transition: border-color 0.25s;
}
.stat:hover { border-color: var(--line-strong); }
.stat-ic {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(34, 195, 230, 0.16);
}
.stat-ic .ic { width: 19px; height: 19px; }
.stat strong { display: block; font: 700 1.5rem var(--font-head); letter-spacing: -0.03em; color: var(--ink); }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; align-items: start; }
.content-grid { grid-template-columns: 1.7fr 1fr; }

.batch-line { margin-bottom: 16px; }
.batch-line-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; align-items: baseline; }
.batch-line-top strong { color: var(--ink); }
.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.mini-row:last-child { border-bottom: 0; }
.mini-row a { color: var(--ink-2); display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mini-row a strong { color: var(--ink); }
.progress-module {
  font: 600 0.68rem var(--font-mono); color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.12em; padding: 16px 0 5px;
}

.toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 220px;
  background: var(--room); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.search:focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .ic { width: 17px; height: 17px; color: var(--ink-4); }
.search input { border: 0; background: none; padding: 12px 0; width: 100%; font: 400 0.95rem var(--font-body); color: var(--ink); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--ink-4); }
.toolbar .select { width: auto; }

.table-wrap { overflow-x: auto; margin-inline: -6px; padding-inline: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th {
  text-align: left; font: 600 0.66rem var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-4);
  padding: 8px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
th.right { text-align: right; }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
td strong { color: var(--ink); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--hover-wash); }
.cell-main { display: flex; flex-direction: column; color: var(--ink-2); }
.w-bar { min-width: 130px; }
.w-bar .bar { display: inline-block; width: 80px; vertical-align: middle; margin-right: 8px; }

.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  padding: 9px 18px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--ink-3); font-weight: 600; font-size: 0.88rem;
  transition: all 0.22s var(--ease);
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--bloom); }

.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.batch-nums { display: flex; gap: 18px; margin: 12px 0 16px; font-size: 0.86rem; color: var(--ink-2); flex-wrap: wrap; }
.batch-nums span { display: inline-flex; align-items: center; gap: 8px; }
.batch-nums .ic { width: 16px; height: 16px; color: var(--accent); }

.inline-edit { display: flex; align-items: center; gap: 6px; }
.inline-edit input {
  flex: 1; min-width: 0; font: 500 0.88rem var(--font-body); color: var(--ink-2);
  background: none; border: 1px solid transparent; border-radius: 9px; padding: 6px 9px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.inline-edit input:hover { background: var(--hover-wash); color: var(--ink); }
.inline-edit input:focus { outline: none; border-color: var(--accent-deep); background: var(--room); color: var(--ink); }
.inline-edit .icon-btn { width: 30px; height: 30px; opacity: 0; }
.inline-edit:focus-within .icon-btn { opacity: 1; }
.cls-badge.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 0.8rem; }
.auto-name {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px;
  padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--accent-soft); border: 1px solid rgba(0, 180, 216, 0.25);
}
.auto-name strong { font-family: var(--font-head); font-size: 1.08rem; color: var(--ink); letter-spacing: -0.01em; }
.setup-steps { margin: 12px 0 10px; padding-left: 20px; line-height: 1.75; }
.setup-steps li { margin-bottom: 6px; }
.setup-steps code { background: var(--raised); padding: 2px 6px; border-radius: 6px; }
.action-list { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.action-list .btn { width: 100%; justify-content: flex-start; }
.ann-admin { padding: 15px 0; border-bottom: 1px solid var(--line); }
.ann-admin:last-child { border-bottom: 0; }
.ann-admin h4 { margin: 9px 0 4px; color: var(--ink); }
.ann-admin .btn-row { margin-top: 11px; }
.ann-admin-list { display: flex; flex-direction: column; }

/* ---------- dialogs ---------- */
.dlg {
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 0;
  width: min(530px, calc(100vw - 32px));
  background: var(--panel); color: var(--ink-2);
  box-shadow: var(--bloom-lg);
}
.dlg::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); }
.dlg[open] { animation: dlgIn 0.35s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.dlg-form { padding: 26px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- toasts ---------- */
.toast-root {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-tabbar .toast-root { bottom: 96px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #0b2a4a; color: #fff;
  border: 1px solid transparent;
  padding: 12px 20px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.12), 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  animation: toastIn 0.4s var(--ease);
}
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
.toast .ic { width: 16px; height: 16px; color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.95); } }

/* ---------- entrance choreography ---------- */
.reveal { animation: rise 0.65s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.16s; }
::view-transition-new(root) { animation-duration: 0.24s; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .player-layout { grid-template-columns: 1fr; }
  .player-side { position: static; max-height: none; }
  .admin-grid, .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side {
    position: sticky; top: 0; height: auto; z-index: var(--z-sticky);
    flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; background: rgba(7, 13, 24, 0.85);
    backdrop-filter: blur(16px);
  }
  .admin-side .brand-text { display: none; }
  .admin-links { flex-direction: row; gap: 2px; }
  .admin-links a { padding: 8px 11px; }
  .admin-links a.on { box-shadow: none; }
  .admin-links a span { display: none; }
  .admin-side-foot { flex-direction: row; }
  .side-mini span { display: none; }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: 84px 1fr; }
  .rail-inner { padding: 20px 12px; align-items: center; }
  .rail-brand .brand-text, .rail-nav a span:not(.badge), .rail-batch { display: none; }
  .rail-nav a { justify-content: center; padding: 12px; }
  .rail-nav .badge { position: absolute; top: 6px; right: 8px; margin: 0; }
  .rail-foot { justify-content: center; }
  .dash-row { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .mobile-top { display: flex; }
  .tabbar { display: grid; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container, .container.narrow { width: calc(100% - 28px); }
  .app-main .page { padding: 20px 16px 118px; }
  .card { padding: 18px; border-radius: 18px; }
  .hero, .continue-card { flex-direction: column; padding: 22px; }
  .hero-art, .continue-art { display: none; }
  .class-cta { opacity: 1; transform: none; }
  .field-row { grid-template-columns: 1fr; }
  .player-layout { width: calc(100% - 24px); margin-top: 14px; }
  .player-navrow { flex-direction: column; }
  .nav-lesson, .nav-lesson.right { max-width: 100%; }
  .profile-card { flex-direction: column; text-align: center; }
  .profile-chips { justify-content: center; }
  .admin-head { flex-direction: column; }
  .stat-row { grid-template-columns: 1fr; }
  .module-list { padding-left: 0; }
  .module-list::before, .module-list::after, .module::before { display: none; }
}

/* ---------- theme toggle ---------- */
.theme-ic { position: relative; display: block; width: 17px; height: 17px; flex: 0 0 auto; }
.side-mini .theme-ic { width: 16px; height: 16px; }
.theme-ic .ic { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 0.45s var(--ease), opacity 0.25s; }
/* daylight is the default → offer the moon; in dark mode → offer the sun */
.theme-ic .ic-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.theme-ic .ic-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-ic .ic-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-ic .ic-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

/* the hero card is a navy surface in both themes, so its text is always light */
.continue-card, .continue-card h2 { color: #eaf1fa; }
.continue-card .continue-meta { color: #a9c0d6; }
.continue-card.empty, .continue-card.empty h2 { color: var(--ink); }
.continue-card.empty .continue-meta { color: var(--ink-3); }

/* dark-mode surface corrections */
:root[data-theme="dark"] .toast, body.force-dark .toast { background: var(--raised); color: var(--ink); }
:root[data-theme="dark"] .btn-wa, body.force-dark .btn-wa {
  background: rgba(37, 211, 102, 0.12); color: #4ce38a; border-color: rgba(37, 211, 102, 0.3);
}

/* ---------- 1A responsive ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: 520px 1fr; }
  .split-left { padding: 44px 40px 40px; }
}
@media (max-width: 980px) {
  /* left panel becomes a navy header card, form flows beneath */
  .split { grid-template-columns: 1fr; min-height: 100dvh; }
  .split-left {
    padding: 26px 26px 30px;
    border-radius: 0 0 26px 26px;
    min-height: auto;
  }
  .split-left .logo-chip { padding: 9px 15px; }
  .split-left .logo-chip img { height: 26px; }
  .eyebrow { margin-top: 26px; font-size: 0.7rem; letter-spacing: 0.2em; }
  .stage-h1 { font-size: clamp(1.75rem, 6.4vw, 2.3rem); margin-top: 10px; }
  .stage-body { font-size: 0.95rem; margin-top: 12px; max-width: none; }
  .idgraph { display: none; }
  .split-right { padding: 26px 24px 30px; }
  .split-form { justify-content: flex-start; max-width: 100%; padding-top: 4px; }
  .split-top { justify-content: center; margin-bottom: 22px; }
  .split-foot { flex-direction: column; gap: 10px; text-align: center; margin-top: 26px; }
}
@media (max-width: 420px) {
  .otp { gap: 7px; }
  .otp-cell { height: 54px; font-size: 1.35rem; border-radius: 10px; }
  .seg-btn { font-size: 0.9rem; padding: 10px; }
  .split-left { padding: 22px 20px 26px; }
  .split-right { padding: 24px 20px 28px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .solo-card, .solo-logo { animation: none; }
  .ticker-track, .btn-sheen::before { animation: none; }
  .blob-a, .blob-b, .idg-links path, .idg-nodes circle { animation: none; }
  .r1, .r2, .r3, .r4, .r5, .r6, .r7, .r8,
  .split-left .logo-chip, .eyebrow, .stage-h1, .stage-body, .idgraph { animation: none; }
  .watermark { transition: none; }
  .orb-a, .orb-b, .stage-glow::before, .play-pulse::before, .play-pulse::after { animation: none; }
}
