/* style.css — shared theme for the whole Code Lab click-through.
   All three pages (login, dashboard, lesson) load this one file, so a
   color or spacing change here updates everywhere at once — same idea
   as your real project's style.css extracted from the waitlist page. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f1f3f6;
  --border: #e3e6eb;
  --green: #0e9f5a;
  --green-soft: #e7f7ee;
  --orange: #c9660f;
  --orange-soft: #fbeee0;
  --red: #d33;
  --red-soft: #fbe9e9;
  --blue: #2563eb;
  --text: #171a21;
  --muted: #667085;
  --muted-2: #98a1b0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(20,20,30,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,20,30,0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- brand ---------- */
.brand-mark { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark:hover { opacity: .88; }
.brand-logo-img { height: 34px; width: auto; display: block; }
/* brand kit v2 (Release 1, 2026-10): the wordmark is an image now —
   green letters, orange "ga", black outline (assets/wordmark.svg) */
.brand-wordmark-img { height: 15px; width: auto; display: block; margin: 2px 0 3px; }
.login-wordmark { margin: 0 0 6px; display: flex; justify-content: center; }
.login-wordmark img { height: 24px; width: auto; display: block; }
.wordmark { font-weight: 800; color: var(--green); }
.wordmark .ga { color: var(--orange); }
.cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--green);
  margin-left: 2px;
  vertical-align: -1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.badge-demo {
  font-size: 9.5px; color: var(--orange);
  background: var(--orange-soft); border: 1px solid #f0d3ae;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

/* ---------- header (dark, matches the site's dark theme even though
   the page itself is light — overriding the tokens here is enough,
   every child element already reads colors via var(...)) ---------- */
header.topbar {
  background: #0a0e14;
  border-bottom: 1px solid #21262d;
  position: sticky; top: 0; z-index: 50;
  --text: #c9d1d9;
  --muted: #8b949e;
  --muted-2: #6b7280;
  --border: #30363d;
  --panel-2: #161b22;
  --green: #39ff88;
  --green-soft: rgba(57,255,136,0.12);
  --orange: #f0883e;
  --orange-soft: rgba(240,136,62,0.14);
  color: var(--text);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.brand-title { font-size: 15px; font-weight: 700; margin: 0; }
.brand-sub { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .8px; margin: 2px 0 0; }

.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.chip.streak { background: var(--orange-soft); border: 1px solid #f0d3ae; color: var(--orange); }
.chip.xp { background: var(--green-soft); border: 1px solid #bfe8d2; color: var(--green); }

.avatar-mini { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid var(--border); }
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.avatar-name { font-size: 12.5px; font-weight: 600; }
.logout-link { font-size: 11.5px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--border); }
.logout-link:hover { color: var(--text); }

.back-link { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.back-link:hover { color: var(--green); }

/* ---------- layout ---------- */
main.content { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
main.content.narrow { max-width: 640px; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 22px; }
.panel {
  background: linear-gradient(135deg, #fffdf5 0%, #fbf3d6 55%, #f5e6a8 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(20,20,30,0.04);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.panel-head h3 { font-size: 16.5px; margin: 0; }
.panel-head p { font-size: 11px; color: var(--muted-2); margin: 3px 0 0; }

/* ---------- live banner ---------- */
.live-banner { position: relative; overflow: hidden; }
.live-glow {
  position: absolute; right: -40px; bottom: -40px; width: 190px; height: 190px;
  border-radius: 50%; background: var(--green-soft); filter: blur(40px); pointer-events: none;
}
.live-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.live-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red-soft); border: 1px solid #f3c6c6; color: var(--red);
  font-size: 10.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; margin-bottom: 10px;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.live-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.live-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.live-timer-label { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px; }
.live-timer { font-size: 26px; font-weight: 800; color: var(--orange); margin: 0 0 12px; }
.btn-join { background: var(--green); color: #fff; font-weight: 700; font-size: 13px; padding: 11px 20px; border-radius: 9px; border: none; display: inline-block; white-space: nowrap; cursor: pointer; }
.btn-join:hover { opacity: .9; }

/* ---------- roadmap ---------- */
.progress-chip { font-size: 11px; color: var(--green); background: var(--green-soft); border: 1px solid #bfe8d2; border-radius: 8px; padding: 5px 11px; }
.roadmap { position: relative; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px; padding: 6px 0; }
.roadmap::before { content: ""; position: absolute; top: 30px; bottom: 30px; left: 50%; width: 2px; background: var(--border); transform: translateX(-1px); }
.node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.node-badge { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; border: 4px solid var(--bg); }
.node.done .node-badge { background: var(--green); color: #fff; }
.node.active .node-badge { width: 62px; height: 62px; background: var(--orange); color: #fff; font-size: 26px; box-shadow: 0 0 0 4px var(--orange-soft); }
.node.locked .node-badge { background: var(--panel-2); border-color: var(--bg); color: var(--muted-2); }
.node-info { margin-top: 10px; text-align: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; width: 100%; max-width: 280px; }
.node.active .node-info { border-color: #f0d3ae; background: var(--orange-soft); }
.node.locked .node-info { opacity: .65; }
.node-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 3px; }
.node.done .node-tag { color: var(--green); }
.node.active .node-tag { color: var(--orange); }
.node.locked .node-tag { color: var(--muted-2); }
.node-name { font-size: 13px; font-weight: 700; margin: 0; }
.btn-start { margin-top: 10px; display: block; width: 100%; text-align: center; background: var(--orange); color: #fff; font-weight: 700; font-size: 11.5px; padding: 8px; border-radius: 8px; border: none; cursor: pointer; }

/* ---------- leaderboard ---------- */
.lb-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 10px; margin-bottom: 6px; background: var(--panel-2); border: 1px solid var(--border); }
.lb-row.top1 { background: var(--orange-soft); border-color: #f0d3ae; }
.lb-row.me { background: var(--green-soft); border-color: #bfe8d2; }
.lb-left { display: flex; align-items: center; gap: 9px; }
.lb-medal { width: 16px; text-align: center; }
.lb-avatar { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--muted); }
.lb-name { font-size: 12px; font-weight: 700; }
.lb-sub { font-size: 9.5px; color: var(--muted-2); }
.lb-xp { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.lb-row.top1 .lb-xp { color: var(--orange); }
.lb-row.me .lb-xp { color: var(--green); }

/* ---------- subscription status widget ---------- */
.sub-widget-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.sub-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; margin-bottom: 10px;
}
.sub-widget.warning .sub-tag { background: var(--red-soft); border: 1px solid #f3c6c6; color: var(--red); }
.sub-widget.ok .sub-tag { background: var(--green-soft); border: 1px solid #bfe8d2; color: var(--green); }
.sub-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.sub-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.btn-renew {
  background: var(--red); color: #fff; font-weight: 700; font-size: 13px;
  padding: 11px 20px; border-radius: 9px; border: none; display: inline-block;
  white-space: nowrap; cursor: pointer;
}
.btn-renew:hover { opacity: .9; }
.sub-cta-price { margin: 7px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.btn-manage {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-weight: 700; font-size: 12.5px; padding: 10px 18px; border-radius: 9px;
  display: inline-block; cursor: pointer; white-space: nowrap;
}
.sub-track { width: 100%; height: 7px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 16px; }
.sub-fill { height: 100%; border-radius: 999px; }
.sub-widget.warning .sub-fill { background: var(--red); }
.sub-widget.ok .sub-fill { background: var(--green); }

/* ---------- Home's compact "attention magnet" CTA linking to challenge.html ---------- */
.challenge-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cc-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.cc-sub { font-size: 12px; color: var(--muted); margin: 0; }
.btn-start-challenge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 13px 22px; border-radius: 10px; white-space: nowrap;
  animation: cta-pulse 2.2s ease-in-out infinite;
}
.btn-start-challenge:hover { opacity: .95; }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 136, 62, 0.5); }
  50% { box-shadow: 0 0 0 11px rgba(240, 136, 62, 0); }
}

/* ---------- daily challenge (dynamic quiz / game / open-question) ---------- */
.dc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.dc-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-soft); border: 1px solid #bfe8d2; color: var(--green);
  font-size: 10.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; margin-bottom: 9px;
}
.dc-title { font-size: 17px; font-weight: 700; margin: 0; }

.dc-progress { text-align: right; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.dc-progress[hidden] { display: none; }
.dc-score-note { font-weight: 700; color: var(--orange); }

.dc-question { font-size: 13.5px; line-height: 1.8; color: var(--text); margin: 0 0 16px; }

.dc-options { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.dc-option {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer;
}
.dc-option:hover { border-color: var(--orange); }
.dc-option input { accent-color: var(--orange); width: 15px; height: 15px; flex: 0 0 auto; }

.dc-game-preview {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 26px 20px; text-align: center; margin-bottom: 16px;
}
.dc-game-art { font-size: 40px; margin-bottom: 10px; }
.dc-game-name { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.dc-game-sub { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- flash card game (graded flip cards) ---------- */
.flashcard { perspective: 1400px; margin-bottom: 16px; }
.flashcard-inner {
  position: relative; min-height: 220px;
  transition: transform 0.5s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.flashcard-inner.flipped { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; justify-content: center;
}
.flashcard-front { position: relative; }
.flashcard-back { transform: rotateY(180deg); text-align: center; align-items: center; }
.fc-result-text { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.fc-correct-answer { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------- "challenge not added yet" state ---------- */
.dc-empty { text-align: center; padding: 30px 20px; }
.dc-empty-icon { font-size: 40px; margin-bottom: 10px; }
.dc-empty-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.dc-empty-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; max-width: 360px; margin-left: auto; margin-right: auto; }

.dc-done { text-align: center; padding: 8px 0 4px; }
.dc-done-check {
  width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); border: 2px solid var(--green);
  color: var(--green); font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.dc-done-title { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.dc-done-sub { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.dc-countdown { font-size: 22px; font-weight: 800; color: var(--orange); margin: 0; }
.dc-done-check.icon-wrong { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); }

/* ---------- celebration modal + confetti ---------- */
#confetti-canvas { position: fixed; inset: 0; z-index: 250; pointer-events: none; }
.celebrate-box { text-align: center; }
.celebrate-icon { font-size: 44px; margin-bottom: 8px; }
.celebrate-title { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.celebrate-score { font-size: 13px; color: var(--text); font-weight: 700; margin: 0 0 4px; }
.celebrate-score[hidden] { display: none; }
.celebrate-weekly-bonus {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--orange);
  background: var(--orange-soft); border: 1px solid rgba(240,136,62,0.35);
  border-radius: 999px; padding: 5px 12px; margin: 2px 0 10px;
}
.celebrate-weekly-bonus[hidden] { display: none; }
.celebrate-xp { font-size: 14px; color: var(--green); font-weight: 700; margin: 0 0 4px; }
.celebrate-sub { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- weekly goal ---------- */
.goal-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.goal-top .pct { color: var(--green); font-weight: 700; }
.goal-track { width: 100%; height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.goal-fill { height: 100%; background: var(--green); border-radius: 999px; }

/* ---------- login screen ---------- */
.login-wrap { min-height: calc(100vh - 0px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 34px 28px; text-align: center; box-shadow: 0 1px 2px rgba(20,20,30,0.04); }
.login-icon { width: 64px; height: auto; margin: 0 auto 14px; display: block; }
.login-tag { font-size: 10.5px; color: var(--muted-2); letter-spacing: 1.2px; margin: 10px 0 20px; }
.login-copy { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 22px; }
.btn-pill-primary {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--green); color: #04170c; font-weight: 700; font-size: 14px;
  font-family: 'JetBrains Mono', monospace; padding: 15px; border-radius: 10px; border: none; cursor: pointer;
  transition: filter 0.15s ease;
}
.btn-pill-primary:hover { filter: brightness(1.06); }
.btn-pill-primary:disabled { opacity: .6; cursor: default; filter: none; }
.login-status { font-size: 11.5px; color: var(--muted-2); margin-top: 14px; min-height: 16px; }
.login-footer { margin-top: 22px; font-size: 10.5px; color: var(--muted-2); }

/* ==================== LOGIN PAGE — premium dark redesign ====================
   Scoped to body.login-page only (same convention as challenge-page /
   admin-page) so the shared .login-wrap/.login-card classes stay untouched
   for admin-login.html's simpler PIN-gate treatment. */
body.login-page {
  background-color: #0b0b0b;
  background-image:
    linear-gradient(rgba(57, 255, 136, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 136, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  --bg: #0b0b0b;
  --panel: #101418;
  --panel-2: #171b20;
  --border: #242830;
  --green: #39ff88;
  --green-soft: rgba(57, 255, 136, 0.12);
  --orange: #F97316;
  --orange-soft: rgba(249, 115, 22, 0.14);
  --text: #e6edf3;
  --muted: #8b949e;
  --muted-2: #5b6470;
}
body.login-page .login-wrap { position: relative; overflow: hidden; flex-direction: column; }
.login-glow {
  position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 640px; height: 640px; pointer-events: none;
  background: radial-gradient(circle, rgba(57,255,136,0.14) 0%, rgba(57,255,136,0) 70%);
}
.login-ambient-code {
  position: absolute; top: 40px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: rgba(255,255,255,0.06); letter-spacing: 0.5px;
  margin: 0; pointer-events: none;
}
body.login-page .login-card {
  position: relative; z-index: 2; max-width: 360px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 45%), var(--panel);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
  padding: 40px 28px 30px; box-shadow: 0 30px 60px -22px rgba(0,0,0,0.65);
}
.login-card-accent {
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,255,136,0.65), transparent);
}
body.login-page .login-icon { width: 128px; margin-bottom: 18px; }
body.login-page .login-tag { margin: 11px 0 0; text-transform: uppercase; }
.login-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 22px 0 24px; }
body.login-page .login-copy { color: #9aa1ac; }
.login-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; }
.login-trust span { font-size: 10.5px; color: var(--muted-2); }
.login-help { position: relative; z-index: 2; margin-top: 26px; font-size: 10.5px; color: var(--muted-2); text-align: center; }
.login-help a { color: #8b949e; }
.discord-btn-icon { display: block; }
.login-whatsapp {
  position: relative; z-index: 2; margin-top: 10px; font-size: 11px; color: var(--muted);
  text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.login-whatsapp .wa-number { color: var(--text); font-weight: 600; letter-spacing: 0.3px; }
.login-preview-note {
  position: relative; z-index: 2; max-width: 340px; margin: 14px auto 0; padding: 0 20px;
  font-size: 10px; color: #454b53; text-align: center; line-height: 1.6;
}
.login-preview-note code { color: #5b6470; }

/* ---------- lesson screen ---------- */
.lesson-head { margin-bottom: 4px; }
.lesson-crumb { font-size: 11px; color: var(--muted-2); margin: 0 0 10px; }
.lesson-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.lesson-title-row h1 { font-size: 20px; margin: 0; }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag.points { background: var(--green-soft); color: var(--green); border: 1px solid #bfe8d2; }

.video-box {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #0a0e14; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.video-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; }
.play-stack { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.play-btn { width: 54px; height: 54px; border-radius: 50%; background: #39ff88; color: #04170c; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.play-caption { background: rgba(0,0,0,.75); border: 1px solid rgba(57,255,136,.25); color: #39ff88; font-size: 11px; padding: 5px 11px; border-radius: 999px; }

.challenge-body { font-size: 13px; line-height: 1.8; color: var(--text); margin: 0 0 4px; }

.field-label { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; display: block; }
.field-input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 13px; color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none;
}
.field-input:focus { border-color: var(--green); }
.btn-submit {
  margin-top: 14px; width: 100%; background: var(--green); color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 13px; border-radius: 9px; border: none; cursor: pointer;
}
.btn-submit:hover { opacity: .92; }
.btn-submit:disabled { opacity: .5; cursor: default; }

.success-box { display: none; text-align: center; padding: 10px 0 4px; }
.success-box.show { display: block; }
.success-check {
  width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); border: 2px solid var(--green);
  color: var(--green); font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.success-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.success-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }
.btn-secondary {
  display: inline-block; background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-weight: 700; font-size: 12.5px; padding: 10px 20px; border-radius: 9px; cursor: pointer;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   HOME TAB — stacked week list + bottom tab navigation
   New class names only (week-*, bn-*, modal-*) so nothing here touches the
   existing .roadmap/.node/.node-badge rules that dashboard.html still uses
   for its old lesson-based roadmap.
   ========================================================================== */

/* ---------- bottom tab bar ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #0a0e14; border-top: 1px solid #21262d;
  display: flex; justify-content: center; gap: 4px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
}
.bn-item {
  width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; color: #6b7280; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; border-radius: 10px; cursor: pointer;
}
.bn-item:hover { color: #c9d1d9; }
.bn-icon { font-size: 18px; line-height: 1; }
.bn-item.active { color: #39ff88; background: rgba(57,255,136,0.1); }
main.content.with-bottom-nav { padding-bottom: 96px; }
main.content.home-wide { max-width: 760px; }

/* ---------- home page header row ---------- */
.home-head { text-align: center; margin-bottom: 22px; }
.home-head h1 { font-size: 19px; margin: 0 0 4px; }
.home-head p { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- week list (full-width stacked cards) ---------- */
.week-list { display: flex; flex-direction: column; gap: 14px; }

.week-card {
  width: 100%; background: linear-gradient(135deg, #fffdf5 0%, #fbf3d6 55%, #f5e6a8 100%);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px;
}
.week-card.done { border-color: #bfe8d2; cursor: pointer; }
.week-card.done:hover { border-color: var(--green); }
.week-card.active { border: 2px solid var(--orange); cursor: pointer; }
.week-card.locked { opacity: .6; }
/* Future weeks (2026-09-16) — replaces the old fully-hidden 'locked' card.
   Still readable (title, plan, table) but visually clearly "not yet". */
.week-card.upcoming { opacity: .75; border-style: dashed; cursor: pointer; }
.week-card.upcoming .week-badge { background: var(--panel-2); color: var(--muted-2); border-color: var(--border); }
.week-card.upcoming .week-card-tag { color: var(--muted-2); }

.week-card-head { display: flex; align-items: center; gap: 14px; }
.week-badge {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  border: 3px solid var(--bg); background: var(--panel-2); color: var(--muted-2);
}
.week-card.done .week-badge { background: var(--green); color: #fff; border-color: var(--green-soft); }
.week-card.active .week-badge { background: var(--orange); color: #fff; border-color: var(--orange-soft); }

.week-card-title-wrap { flex: 1 1 auto; min-width: 0; }
.here-badge {
  display: inline-block; background: var(--orange); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .4px; margin-bottom: 5px;
}
.week-card-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); display: block; margin-bottom: 3px; }
.week-card.done .week-card-tag { color: var(--green); }
.week-card.active .week-card-tag { color: var(--orange); }
.week-card-title { font-size: 14px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sample/example roadmap cards (added 2026-09-15) — dashed border and a
   muted badge so they read as clearly not-real content, never confused
   with a real published week. */
.week-card.example { border-style: dashed; border-color: var(--muted-2); cursor: default; }
.week-card.example .week-badge { background: var(--muted-2); color: #fff; border-color: var(--border); }
.week-card.example .week-card-tag { color: var(--muted-2); }
.week-card-desc { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }

/* ---------- recorded-session button ---------- */
.btn-recording {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 12px;
  font-family: 'JetBrains Mono', monospace; padding: 10px 16px; border-radius: 9px;
  border: none; cursor: pointer;
}
.btn-recording:hover { opacity: .9; }
.btn-recording.pending {
  background: transparent; border: 1px solid var(--orange); color: var(--orange);
}

/* ---------- reward-loop snapshot (streak / xp / weekly bonus / freeze / level) ---------- */
.reward-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.reward-tile {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 14px; text-align: center;
}
.reward-icon { font-size: 21px; margin-bottom: 6px; }
.reward-value { font-size: 21px; font-weight: 800; margin: 0; }
.reward-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); margin: 3px 0 7px; }
.reward-sub { font-size: 10.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.reward-tile .goal-track { margin: 2px 0 8px; }

.reward-tile.streak .reward-value { color: var(--orange); }
.reward-tile.xp .reward-value { color: var(--green); }
.reward-tile.bonus .reward-value { color: var(--blue); }
.reward-tile.freeze .reward-value { color: #2f9fe0; }
.reward-tile.level .reward-value { color: #b8860b; }

/* ---------- weekly tracking table (Sun → Sat, 2 data rows) ---------- */
.week-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: 14px 0 0; }
.week-table th {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700;
  color: var(--muted-2); padding-bottom: 2px;
}
.week-table th .th-day { display: block; }
.week-table th .th-date {
  display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0; text-transform: none;
  color: var(--text); margin-top: 2px;
}
.week-table th.today-col { color: var(--orange); text-shadow: 0 0 6px var(--orange); }
.week-table th.today-col .th-date { color: var(--orange); text-shadow: 0 0 6px var(--orange); }
.week-table th.row-label-col, .week-table td.row-label-col {
  width: 58px; text-align: left; padding-left: 2px;
}
.week-table td.row-label {
  background: none; border: none; text-align: left; font-size: 9.5px; font-weight: 700;
  color: var(--muted-2); white-space: nowrap; padding: 6px 2px;
}
.week-table td.day-cell {
  text-align: center; padding: 7px 2px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--border); font-size: 13px;
}
.week-table td.day-cell .score-num { font-size: 11.5px; font-weight: 700; color: var(--text); }
.week-table td.day-cell.done { background: #d9f0e3; border-color: #bfe8d2; }
.week-table td.day-cell.freeze { background: #dceefb; border-color: #bcdff5; }
.week-table td.day-cell.today {
  border: 2px solid var(--orange);
  background: #fff;
  box-shadow: 0 0 6px 1px var(--orange);
  animation: today-cell-glow 1.6s ease-in-out infinite alternate;
}
@keyframes today-cell-glow {
  from { box-shadow: 0 0 4px 1px var(--orange); }
  to   { box-shadow: 0 0 12px 4px var(--orange); }
}
.week-table td.day-cell.upcoming { opacity: .45; }
.week-table td.day-cell.missed { background: var(--red-soft); border-color: #f3c6c6; opacity: .8; }
.week-table td.day-cell.missed .score-num { color: var(--red); }

@media (max-width: 460px) {
  .week-card { padding: 13px 12px; }
  .week-card-title { font-size: 12.5px; }
  .week-table { border-spacing: 3px; }
  .week-table th, .week-table td.day-cell { font-size: 10px; padding: 6px 1px; }
  .week-table th.row-label-col, .week-table td.row-label-col { width: 40px; font-size: 8px; }
  .week-table td.day-cell .score-num { font-size: 10px; }
  .week-table th .th-date { font-size: 9.5px; margin-top: 1px; }
  .btn-recording { width: 100%; justify-content: center; }
}

/* ---------- floating "jump to current week" shortcut ---------- */
.fab-current-week {
  position: fixed; right: 18px; bottom: 84px; z-index: 55;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
  padding: 12px 18px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(240, 136, 62, 0.4);
}
.fab-current-week .fab-icon { font-size: 14px; }
.fab-current-week:hover { opacity: .92; }
.fab-current-week:active { transform: scale(0.96); }

@media (max-width: 460px) {
  .fab-current-week { right: 14px; bottom: 80px; padding: 11px 15px; font-size: 11.5px; }
}

@keyframes current-week-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(240, 136, 62, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(240, 136, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 136, 62, 0); }
}
.week-card.flash { animation: current-week-pulse 0.9s ease-out 2; }

/* ==========================================================================
   CURRICULUM TAB — plain session list
   ========================================================================== */
.curriculum-head { text-align: center; margin-bottom: 20px; }
.curriculum-head h1 { font-size: 19px; margin: 0 0 4px; }
.curriculum-head p { font-size: 12px; color: var(--muted); margin: 0; }

.panel.curr-panel { padding: 8px 0; }
.curr-module-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted-2); margin: 18px 22px 8px;
}
.curr-module-label:first-child { margin-top: 6px; }

.curr-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--border); }
.curr-row:last-child { border-bottom: none; }
.curr-row-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.curr-status {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: var(--panel-2); border: 2px solid var(--bg); color: var(--muted-2);
}
.curr-row.done .curr-status { background: var(--green); color: #fff; }
.curr-row.active .curr-status { background: var(--orange); color: #fff; }

.curr-text { min-width: 0; }
.curr-week-num { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); display: block; margin-bottom: 2px; }
.curr-row.done .curr-week-num { color: var(--green); }
.curr-row.active .curr-week-num { color: var(--orange); }
.curr-title { font-size: 13px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curr-row.locked { opacity: .55; }
.curr-row.upcoming { opacity: .8; }

.curr-chip { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.curr-chip.done { background: var(--green-soft); color: var(--green); border: 1px solid #bfe8d2; }
.curr-chip.active { background: var(--orange-soft); color: var(--orange); border: 1px solid #f0d3ae; }
.curr-chip.locked { background: var(--panel-2); color: var(--muted-2); border: 1px solid var(--border); }

/* Sample/example rows (added 2026-09-15) — same "clearly not real"
   treatment as home.js's example week cards. */
.curr-row.example .curr-status { background: var(--panel-2); color: var(--muted-2); }
.curr-chip:not(.done):not(.active):not(.locked) { background: var(--panel-2); color: var(--muted-2); border: 1px solid var(--border); }

.curr-row-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.curr-practice-link {
  font-family: inherit; font-size: 10px; font-weight: 700; color: var(--blue); text-decoration: underline;
  white-space: nowrap; background: none; border: none; padding: 0; cursor: pointer;
}
.curr-practice-link:hover { color: var(--green); }

.curr-daypicker {
  display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; padding: 10px 14px 2px;
}
.curr-daypicker[hidden] { display: none; }
.curr-day-pill {
  font-size: 11px; font-weight: 700; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; text-decoration: none;
}
.curr-day-pill:hover { border-color: var(--blue); color: var(--blue); }
.curr-daypicker.sparse .curr-day-pill { color: var(--muted-2); border-style: dashed; }

@media (max-width: 460px) {
  .curr-row { padding: 11px 14px; gap: 10px; }
  .curr-module-label { margin-left: 14px; margin-right: 14px; }
  .curr-title { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
  .curr-chip { font-size: 9px; padding: 4px 8px; }
}

/* ---------- video modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,7,12,0.72); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px;
}
.modal-title { font-size: 15px; font-weight: 700; margin: 0 0 5px; padding-right: 30px; }
.modal-sub { font-size: 11.5px; color: var(--muted-2); margin: 0 0 14px; }
.modal-empty {
  aspect-ratio: 16/9; border-radius: 10px; background: var(--panel-2); border: 1px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted-2); text-align: center; padding: 20px;
}
.modal-empty .me-icon { font-size: 28px; }
.modal-empty .me-title { font-size: 13px; font-weight: 700; color: var(--muted); }
.modal-empty .me-sub { font-size: 11.5px; max-width: 300px; }

@media (max-width: 480px) {
  .week-node-card { width: 165px; padding: 12px; }
  .week-node-card.active { width: 178px; }
}

/* ==========================================================================
   CHALLENGE PAGE (challenge.html) — dedicated dark "arena" theme
   Re-themes every reused component (panel, dc-*, field-input, btn-submit,
   modal-box, etc.) by overriding the same CSS custom properties they
   already read from, rather than duplicating each class in a dark variant.
   ========================================================================== */
body.challenge-page {
  background-color: #0a0e14;
  background-image:
    linear-gradient(rgba(57, 255, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 136, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  --bg: #0a0e14;
  --panel: #121820;
  --panel-2: #171d26;
  --border: #2a323c;
  --green-soft: rgba(57, 255, 136, 0.12);
  --orange-soft: rgba(240, 136, 62, 0.14);
  --red-soft: rgba(211, 51, 51, 0.16);
  --text: #e6edf3;
  --muted: #8b949e;
  --muted-2: #6b7280;
}
body.challenge-page .dc-tag { border-color: rgba(57, 255, 136, 0.3); }
body.challenge-page .panel {
  background: linear-gradient(160deg, #151c26 0%, #121820 100%);
  border-color: var(--border);
  box-shadow: 0 0 46px rgba(57, 255, 136, 0.05);
}

.challenge-main { max-width: 640px; margin: 0 auto; padding: 26px 20px 60px; }
.challenge-crumb { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.challenge-crumb:hover { color: var(--green); }

/* practice-mode banner */
.practice-banner {
  display: flex; align-items: center; gap: 9px;
  background: rgba(37, 99, 235, 0.14); border: 1px solid rgba(37, 99, 235, 0.4);
  color: #7fa8f5; font-size: 12px; font-weight: 700;
  padding: 11px 16px; border-radius: 10px; margin-bottom: 18px;
}
.practice-banner[hidden] { display: none; }

/* ---------- greeting overlay (start of a challenge, not completion) ---------- */
.greeting-overlay {
  position: fixed; inset: 0; z-index: 300; background: #0a0e14;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
}
.greeting-overlay[hidden] { display: none; }
#sparkle-canvas { position: fixed; inset: 0; z-index: 301; pointer-events: none; }
.greeting-icon { font-size: 48px; margin-bottom: 14px; }
.greeting-title { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.greeting-sub { font-size: 13px; color: var(--muted); margin: 0 0 26px; max-width: 320px; }
.btn-lets-go {
  background: var(--green); color: #04170c; font-weight: 800; font-size: 14px;
  padding: 14px 28px; border-radius: 10px; border: none; cursor: pointer;
  box-shadow: 0 0 30px rgba(57, 255, 136, 0.35);
}
.btn-lets-go:hover { opacity: .92; }

/* ---------- practice-mode inline answer reveal ---------- */
.dc-option.correct-answer { border-color: var(--green); background: var(--green-soft); }
.dc-option.wrong-answer { border-color: var(--red); background: var(--red-soft); }
.practice-result { text-align: center; padding: 6px 0 4px; }
.practice-result-title { font-size: 15px; font-weight: 700; margin: 10px 0 6px; }
.practice-result-sub { font-size: 12px; color: var(--muted); margin: 0 0 18px; }

/* ==================== ADMIN PANEL ==================== */
body.admin-page {
  background-color: #0d1117;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  --bg: #0d1117;
  --panel: #151b26;
  --panel-2: #1b2330;
  --border: #2a3342;
  --green-soft: rgba(14, 159, 90, 0.16);
  --orange-soft: rgba(201, 102, 15, 0.18);
  --red-soft: rgba(211, 51, 51, 0.18);
  --text: #e6edf3;
  --muted: #8b949e;
  --muted-2: #6b7280;
}
body.admin-page .panel {
  background: linear-gradient(160deg, #171f2c 0%, #151b26 100%);
  border-color: var(--border);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.05);
}

/* ---------- admin login — same premium pattern as the student login
   page (glow, ambient background, card accent line, trust line, help
   footer), re-themed in the admin panel's blue instead of the student
   login's green, so this internal screen still fits visually within
   body.admin-page's own theme rather than borrowing login-page's palette
   wholesale. Structural rules (.login-wrap/.login-card/.login-icon)
   below are scoped to .admin-page.admin-login-page specifically so they
   never bleed into the other admin-*.html pages that share .admin-page. */
body.admin-page.admin-login-page .login-wrap { position: relative; overflow: hidden; flex-direction: column; }
.admin-login-glow {
  position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 640px; height: 640px; pointer-events: none;
  background: radial-gradient(circle, rgba(37,99,235,0.16) 0%, rgba(37,99,235,0) 70%);
}
body.admin-page.admin-login-page .login-card {
  position: relative; z-index: 2; max-width: 360px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 45%), var(--panel);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
  padding: 40px 28px 30px; box-shadow: 0 30px 60px -22px rgba(0,0,0,0.65);
}
.admin-login-card-accent {
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.7), transparent);
}
body.admin-page.admin-login-page .login-icon { width: 128px; margin-bottom: 18px; }
body.admin-page.admin-login-page .login-copy { color: #9aa1ac; }

.admin-nav {
  display: flex; gap: 2px; max-width: 1120px; margin: 0 auto; padding: 0 20px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap; background: #0a0e14;
}
.admin-nav-item {
  font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 13px 16px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.admin-nav-item:hover { color: var(--text); }
.admin-nav-item.active { color: var(--blue); border-bottom-color: var(--blue); }

main.admin-content { max-width: 1120px; margin: 0 auto; padding: 26px 20px 60px; }
.admin-head { margin-bottom: 20px; }
.admin-head h1 { font-size: 20px; margin: 0 0 4px; }
.admin-head p { font-size: 12.5px; color: var(--muted); margin: 0; }

/* summary stat strip, shared by Students/Payments */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.admin-stat-label { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px; }
.admin-stat-value { font-size: 22px; font-weight: 800; margin: 0; }
.admin-stat-value.accent-green { color: var(--green); }
.admin-stat-value.accent-orange { color: var(--orange); }
.admin-stat-value.accent-blue { color: var(--blue); }

/* search + table */
.admin-search {
  width: 100%; max-width: 320px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; margin-bottom: 16px;
}
.admin-search::placeholder { color: var(--muted-2); }
.admin-table-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-table-actions .admin-mini-btn { display: inline-block; text-decoration: none; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2);
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.admin-row-hidden { display: none; }
.admin-pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.admin-pill.active { background: var(--green-soft); color: var(--green); }
.admin-pill.expiring { background: var(--orange-soft); color: var(--orange); }
.admin-pill.expired { background: var(--red-soft); color: var(--red); }
.admin-pill.trial { background: rgba(37, 99, 235, 0.12); color: var(--blue); }
.admin-mini-btn {
  font-family: inherit; font-size: 11px; font-weight: 700; color: var(--blue); background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 11px; cursor: pointer; white-space: nowrap;
}
.admin-mini-btn:hover { border-color: var(--blue); }
.admin-mini-btn:disabled { color: var(--muted-2); cursor: default; }
.admin-mini-btn:disabled:hover { border-color: var(--border); }

/* forms (live session + question editor) */
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-grid .field-full { grid-column: 1 / -1; }
.admin-field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.admin-field input, .admin-field textarea, .admin-field select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 13px; color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none;
}
.admin-field input:focus, .admin-field textarea:focus, .admin-field select:focus { border-color: var(--blue); }
.admin-field textarea { resize: vertical; min-height: 70px; }
.btn-admin-primary {
  background: var(--blue); color: #fff; font-weight: 700; font-size: 13.5px; border: none;
  padding: 12px 22px; border-radius: 9px; cursor: pointer;
}
.btn-admin-primary:hover { opacity: .92; }

.admin-session-list { margin-top: 22px; }
.admin-session-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.admin-session-row:last-child { border-bottom: none; }
.admin-session-title { font-size: 13.5px; font-weight: 700; margin: 0 0 3px; }
.admin-session-meta { font-size: 11.5px; color: var(--muted); margin: 0; }

/* sample-week per-day stats editor (admin-curriculum.html, 2026-09-15) */
.admin-days-cell { white-space: normal !important; }
.admin-day-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.admin-day-editor-col {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  font-size: 11px; display: flex; flex-direction: column; gap: 6px;
}
.admin-day-editor-label { font-size: 11px; font-weight: 700; margin: 0 0 2px; }
.admin-day-editor-col label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; white-space: nowrap; }
.admin-day-editor-col input[type="number"] { width: 48px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 3px 5px; font-family: inherit; font-size: 11px; }
.admin-days-save-status { font-size: 11.5px; color: var(--muted); margin-left: 10px; }

/* question bank day grid */
.admin-day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.admin-day-card {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  cursor: pointer; text-align: left; font-family: inherit;
}
.admin-day-card:hover { border-color: var(--blue); }
.admin-day-card.active-day { border-color: var(--blue); background: rgba(37,99,235,0.1); }
.admin-day-card .day-week { font-size: 10px; color: var(--muted-2); text-transform: uppercase; margin: 0 0 4px; }
.admin-day-card .day-label { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.admin-day-card .day-type-pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.admin-day-card .day-type-pill.type-quiz { background: var(--green-soft); color: var(--green); }
.admin-day-card .day-type-pill.type-flashcard { background: rgba(37,99,235,0.14); color: var(--blue); }
.admin-day-card .day-type-pill.type-game { background: var(--orange-soft); color: var(--orange); }
.admin-day-card .day-type-pill.type-empty { background: var(--panel); color: var(--muted-2); border: 1px dashed var(--border); }

.admin-editor { display: none; }
.admin-editor.show { display: block; }
.admin-qcard {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.admin-qcard-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.admin-qcard-head span { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.admin-option-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.admin-option-row input[type="text"] {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 12.5px; outline: none;
}
.admin-option-row input[type="text"]:focus { border-color: var(--blue); }
.admin-option-row input[type="radio"] { accent-color: var(--green); width: 16px; height: 16px; flex: 0 0 auto; }

/* login gate */
.admin-login-badge { font-size: 9.5px; color: var(--blue); background: rgba(37,99,235,0.14); border: 1px solid rgba(37,99,235,0.4); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

@media (max-width: 640px) {
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-table { font-size: 11.5px; }
}

/* ==================== LEADERBOARD ==================== */
.lb-sub { font-size: 12.5px; color: var(--muted); text-align: center; margin: -6px 0 20px; }

.lb-toggle {
  display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px; width: fit-content; margin: 0 auto 24px;
}
.lb-toggle-btn {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--muted);
  background: transparent; border: none; padding: 9px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.lb-toggle-btn.active { background: var(--blue); color: #fff; }

.lb-podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 20px; }
.lb-podium-slot { flex: 1; max-width: 160px; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 14px 14px 6px 6px; padding: 16px 10px 14px; }
.lb-podium-slot.rank-1 { order: 2; padding-top: 26px; border-color: #f0c94a; box-shadow: 0 0 30px rgba(240, 201, 74, 0.18); }
.lb-podium-slot.rank-2 { order: 1; }
.lb-podium-slot.rank-3 { order: 3; }
.lb-podium-slot.you { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,0.25); }
.lb-medal { font-size: 24px; margin-bottom: 6px; }
.lb-podium-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; margin: 0 auto 8px;
}
.lb-podium-name { font-size: 12.5px; font-weight: 700; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-podium-points { font-size: 15px; font-weight: 800; color: var(--orange); margin: 0; }
.lb-podium-points .unit { font-size: 10px; color: var(--muted-2); font-weight: 700; }

.lb-list-panel { padding: 8px 0; }
.lb-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-row.you { background: rgba(37, 99, 235, 0.08); }
.lb-rank { width: 22px; font-size: 13px; font-weight: 800; color: var(--muted-2); text-align: center; flex: 0 0 auto; }
.lb-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.lb-row-name { flex: 1; min-width: 0; }
.lb-row-name p { margin: 0; font-size: 13px; font-weight: 700; }
.lb-row-name span { font-size: 10.5px; color: var(--muted-2); }
.lb-row-points { text-align: right; flex: 0 0 auto; }
.lb-row-points .main { font-size: 14px; font-weight: 800; color: var(--orange); }
.lb-row-points .sub { display: block; font-size: 10px; color: var(--muted-2); font-weight: 600; }

.lb-you-bar {
  position: fixed; left: 0; right: 0; bottom: 62px; z-index: 55;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 10px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}
.lb-you-rank { background: rgba(255,255,255,0.2); padding: 2px 9px; border-radius: 999px; font-size: 11.5px; }

@media (max-width: 460px) {
  .lb-podium-slot { padding: 12px 6px 10px; }
  .lb-podium-slot.rank-1 { padding-top: 20px; }
  .lb-podium-name { font-size: 11px; }
}

/* ---------- Release 2 (2026-10): Daily Challenge from the Content Studio ---------- */
/* Game row on the weekly card: played days show their game, the coming
   days stay a surprise, Saturday is the personal review. */
.week-table .game-cell { font-size: 9.5px; line-height: 1.2; white-space: normal; padding-left: 2px; padding-right: 2px; }
.week-table .game-cell .game-name { display: inline-block; max-width: 64px; word-break: break-word; font-weight: 700; }
.week-table .game-cell.mystery .game-name { color: var(--orange); font-size: 13px; }
.week-table .game-cell.review .game-name { color: #6d55d9; }
/* future weeks: inactive title cards */
.week-card.inactive { opacity: .62; padding-top: 14px; padding-bottom: 14px; cursor: default; }
.week-card.inactive .week-card-head { margin-bottom: 0; }
/* expired student, current week */
.btn-recording.resume { background: var(--orange); color: #fff; border-color: var(--orange); margin-bottom: 8px; }
