:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18213a;
  background: #f5f7fb;
  --ink: #18213a;
  --muted: #6d7690;
  --line: #e8ebf3;
  --primary: #6157d9;
  --primary-soft: #eeecff;
  --green: #24a57a;
  --shadow: 0 16px 44px rgba(42, 50, 91, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f7fb; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar {
  height: 72px; display: flex; align-items: center; gap: 28px;
  padding: 0 34px; background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  color: white; font-weight: 800; font-size: 22px; background: linear-gradient(145deg,#6258da,#8f75f2);
}
.brand strong { display: block; font-size: 17px; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.brand-with-logo {
  background: #0b0f16;
  border-radius: 12px;
  padding: 7px 10px;
  gap: 0;
}
.brand-logo {
  display: block;
  width: 152px;
  height: auto;
}
.login-brand.brand-with-logo {
  width: fit-content;
  padding: 10px 14px;
}
.login-brand .brand-logo { width: 190px; }
.mode-switch { display: flex; padding: 4px; border-radius: 12px; background: #f0f2f8; margin-left: auto; }
.mode { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 9px; }
.mode.active { background: white; color: var(--ink); box-shadow: 0 2px 9px rgba(30,38,80,.08); font-weight: 700; }
.status { font-size: 12px; color: var(--green); padding: 7px 10px; background: #e8f8f2; border-radius: 999px; }
.shell { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: calc(100vh - 116px); }
.sidebar {
  padding: 28px 18px; background: white; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 7px;
}
.profile { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.profile strong, .profile small { display: block; }
.profile small { color: var(--muted); margin-top: 3px; font-size: 12px; }
.avatar {
  width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%;
  background: #e9f7f2; color: #16825f; font-weight: 800;
}
.nav { text-align: left; border: 0; background: transparent; color: var(--muted); padding: 11px 12px; border-radius: 10px; }
.nav.active, .nav:hover { color: var(--primary); background: var(--primary-soft); font-weight: 650; }
.sidebar-note { margin-top: auto; padding: 14px; border-radius: 14px; background: #f8f8fc; font-size: 12px; color: var(--muted); }
.sidebar-note strong { display: block; color: var(--ink); font-size: 15px; margin: 6px 0 10px; }
.mini-progress { height: 5px; background: #e5e7ef; border-radius: 20px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.workspace { padding: 34px; max-width: 1320px; width: 100%; margin: 0 auto; }
.hidden { display: none !important; }
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 34px; border-radius: 24px; color: white;
  background: linear-gradient(120deg,#28245d 0%,#6157d9 62%,#9077ef 100%);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(26px,3vw,40px); margin: 5px 0 8px; line-height: 1.08; }
.hero p { margin: 0; color: rgba(255,255,255,.78); }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: #cfcaff; }
.level-ring {
  min-width: 94px; height: 94px; border: 8px solid rgba(255,255,255,.2);
  outline: 5px solid rgba(255,255,255,.06); border-radius: 50%;
  display: grid; place-items: center; align-content: center;
}
.level-ring strong { font-size: 22px; }
.level-ring span { font-size: 11px; opacity: .7; }
.grid { display: grid; gap: 18px; margin-top: 18px; }
.student-grid { grid-template-columns: 1.25fr 1fr; }
.card {
  background: white; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: 0 7px 25px rgba(42,50,91,.045);
}
.card h2 { margin: 4px 0 10px; font-size: 20px; }
.card p { color: var(--muted); line-height: 1.55; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.pill { color: #574fc2; background: var(--primary-soft); padding: 6px 9px; border-radius: 999px; font-weight: 750; font-size: 11px; }
.pill.accent { color: #087657; background: #e6f8f1; }
.lesson-row {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px;
  padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.lesson-row span { color: #a0a6b8; }
.lesson-row em { font-style: normal; color: var(--muted); font-size: 11px; }
.primary {
  width: 100%; margin-top: 10px; padding: 12px 16px; border: 0; border-radius: 11px;
  color: white; background: var(--primary); font-weight: 750;
}
.chat { height: 210px; overflow: auto; display: flex; flex-direction: column; gap: 9px; padding: 18px 0 10px; }
.bubble { max-width: 82%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.bubble.ai { background: #f0f1f7; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.composer { display: flex; gap: 8px; border: 1px solid var(--line); padding: 5px; border-radius: 12px; }
.composer input { border: 0; outline: 0; min-width: 0; flex: 1; padding: 8px; }
.composer button { width: 35px; border: 0; border-radius: 9px; color: white; background: var(--primary); }
.voice { width: 100%; margin-top: 9px; border: 0; background: transparent; color: var(--primary); font-weight: 700; padding: 6px; }
.metric-card { min-height: 130px; }
.metric-card strong { display: block; font-size: 25px; margin-top: 14px; }
.metric-card p { margin: 5px 0 0; font-size: 12px; }
.metric-label { color: var(--muted); font-size: 12px; }
.student-grid .metric-card { grid-column: span 1; }
.teacher-hero { background: linear-gradient(120deg,#133d49,#1e766f 65%,#35a684); }
.teacher-badge { padding: 15px 17px; border-radius: 16px; background: rgba(255,255,255,.12); font-weight: 750; }
.metrics-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 18px; }
.stat span, .stat small { display: block; color: var(--muted); }
.stat strong { display: block; font-size: 30px; margin: 9px 0 5px; }
.teacher-grid { grid-template-columns: 1fr 1fr; }
.brief { margin-top: 15px; border-left: 4px solid var(--primary); padding: 13px 15px; background: #f7f6ff; border-radius: 9px; }
.brief p { margin: 4px 0 0; font-size: 13px; }
.brief.secondary { border-left-color: var(--green); background: #f1faf7; }
.student-row {
  display: grid; grid-template-columns: 12px 1fr 55px 90px; align-items: center; gap: 8px;
  padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.student-row em { font-style: normal; font-weight: 750; }
.student-row small { color: var(--muted); text-align: right; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa; }
.dot.good { background: var(--green); }
.dot.warn { background: #e4a23b; }
footer {
  min-height: 44px; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 0 34px; border-top: 1px solid var(--line); color: var(--muted);
  background: white; font-size: 11px;
}
@media (min-width: 1050px) {
  .student-grid { grid-template-columns: 1.25fr 1fr repeat(3,.55fr); }
  .lesson-card { grid-column: span 3; }
  .tutor-card { grid-column: span 2; }
}
@media (max-width: 860px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .status { display: none; }
  .shell { display: block; }
  .sidebar { display: none; }
  .workspace { padding: 18px; }
  .student-grid, .teacher-grid, .metrics-row { grid-template-columns: 1fr; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 27px; }
  .level-ring { min-width: 78px; height: 78px; }
  footer { padding: 12px 18px; flex-direction: column; align-items: flex-start; }
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(19, 22, 48, .68);
  backdrop-filter: blur(14px);
}
.login-card {
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 28px 80px rgba(18, 22, 55, .28);
}
.login-brand { margin-bottom: 22px; }
.login-card h1 { margin: 7px 0 8px; font-size: 30px; }
.login-card > p { color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 13px; margin-top: 20px; }
.login-form label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  outline: 0;
  background: #fbfcff;
}
.login-form input:focus { border-color: #a79ff0; box-shadow: 0 0 0 3px var(--primary-soft); }
.login-error { min-height: 20px; margin: 10px 0 0 !important; color: #bb3d4a !important; font-size: 12px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.demo-accounts button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  text-align: left;
  background: #f9f9fd;
  color: var(--ink);
  font-weight: 750;
}
.demo-accounts button:hover { border-color: #c9c4f5; background: var(--primary-soft); }
.demo-accounts small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.login-note { display: block; margin-top: 15px; color: var(--muted); line-height: 1.4; }
.session-user { margin-left: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.logout {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11px;
}
.logout:hover { color: var(--primary); border-color: #c9c4f5; }
.voice-status { display: block; min-height: 16px; text-align: center; color: var(--muted); font-size: 10px; }
button:disabled { opacity: .58; cursor: wait; }
@media (max-width: 620px) {
  .mode-switch { margin-left: 0; }
  .session-user { display: none; }
  .login-card { padding: 23px; }
  .demo-accounts { grid-template-columns: 1fr; }
}

.pilot-wide { grid-column: 1 / -1; }
.course-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.course-module {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfcff;
}
.course-module.locked { opacity: .62; }
.course-module-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}
.course-module-title span { color: var(--muted); font-size: 10px; text-align: right; }
.course-lesson {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.course-lesson small { color: var(--muted); }
.course-lesson.current { color: var(--primary); font-weight: 750; }
.course-lesson.completed small { color: var(--green); }
.course-lesson.locked { color: #9da3b5; }
.placement-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.placement-question span {
  display: block;
  min-height: 32px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.placement-question select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}
.placement-submit { grid-column: 1 / -1; max-width: 320px; }
.placement-result {
  min-height: 22px;
  margin-bottom: 0 !important;
  font-weight: 650;
}
.pilot-attention {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e8;
  color: #8b5f13 !important;
}
.pilot-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.pilot-metric {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfe;
}
.pilot-metric span,
.pilot-metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.pilot-metric strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 22px;
}
.review-queue { display: grid; gap: 9px; margin-top: 12px; }
.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.review-item div strong,
.review-item div small { display: block; }
.review-item div small { margin-top: 3px; color: var(--muted); }
.review-item > span {
  color: #7b5b17;
  background: #fff5d9;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}
.review-item.high { border-color: #efc9cd; background: #fff8f8; }
.review-item.high > span { color: #a63846; background: #fdebed; }

@media (max-width: 900px) {
  .course-modules,
  .pilot-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .course-modules,
  .pilot-metrics,
  .placement-form { grid-template-columns: 1fr; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.language-picker select {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
}
.login-language-picker {
  width: 100%;
  justify-content: space-between;
  margin: 14px 0 6px;
}
.topbar-language-picker {
  margin-left: 6px;
}
.bubble.correction {
  align-self: flex-start;
  background: #fff8df;
  color: #6f5614;
  border: 1px solid #f0dda2;
  font-size: 12px;
}
.basics-card { overflow: hidden; }
.basics-note {
  margin-top: 5px !important;
  font-size: 12px;
}
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.alphabet-item,
.number-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  min-height: 96px;
}
.alphabet-item:hover,
.number-item:hover {
  border-color: #c8c4f6;
  background: #f7f6ff;
}
.alphabet-item strong,
.alphabet-item span,
.alphabet-item small,
.number-item strong,
.number-item span,
.number-item small {
  display: block;
}
.alphabet-item strong { font-size: 22px; }
.alphabet-item span {
  color: var(--primary);
  font-weight: 700;
  margin: 4px 0;
}
.alphabet-item small,
.number-item small {
  color: var(--muted);
  line-height: 1.35;
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.number-item { min-height: 86px; }
.number-item strong { font-size: 20px; }
.number-item span {
  color: var(--primary);
  font-weight: 750;
  margin: 3px 0;
}
@media (max-width: 900px) {
  .alphabet-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .numbers-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar-language-picker { margin-left: auto; }
}
@media (max-width: 620px) {
  .alphabet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================================================
   ALLTRACE unified visual — CRM / Marketing parity
   Typography: IBM Plex Sans + Manrope
   Themes: Auto / Light / Dark
   ========================================================= */
:root {
  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --brand-green: #63c833;
  --brand-green-strong: #4fb82c;
  --brand-green-soft: rgba(99,200,51,.13);
  --premium-blue: #5b9cff;
  --radius-card: 17px;
}

html[data-theme="light"] {
  --ink: #18212f;
  --muted: #526177;
  --line: #d8dee8;
  --primary: #4fb82c;
  --primary-soft: rgba(79,184,44,.12);
  --green: #4fb82c;
  --page-bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --hover: #e8edf3;
  --shadow: 0 14px 42px -30px rgba(33,45,62,.34);
}

html[data-theme="dark"] {
  --ink: #f2f5f8;
  --muted: #9aa5b7;
  --line: #232c3a;
  --primary: #63c833;
  --primary-soft: rgba(99,200,51,.14);
  --green: #63c833;
  --page-bg: #090b0f;
  --surface: #121720;
  --surface-2: #171d27;
  --surface-3: #1b2230;
  --hover: #1b2230;
  --shadow: 0 14px 42px -28px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.018);
}

html, body {
  font-family: var(--font-ui);
  background: var(--page-bg);
  color: var(--ink);
  letter-spacing: -.01em;
}
button, input, select, textarea { font-family: var(--font-ui); }
h1, h2, h3, h4,
.hero strong,
.metric-card > strong,
.stat > strong,
.pilot-metric strong,
.level-ring strong {
  font-family: var(--font-display);
  letter-spacing: -.025em;
}

/* Header */
.topbar {
  height: 64px;
  padding: 0 24px;
  gap: 14px;
  border-bottom: 1px solid;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px -24px rgba(33,45,62,.45);
}
html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, #AEB8C5 0%, #98A5B5 100%);
  border-bottom-color: #8C99A9;
}
html[data-theme="dark"] .topbar {
  background: rgba(9,12,17,.94);
  border-bottom-color: rgba(120,140,170,.13);
}
.brand-with-logo,
.login-brand.brand-with-logo {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.brand-logo {
  width: 142px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.22));
}
.login-brand .brand-logo { width: 188px; }
.mode-switch {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  padding: 3px;
}
.mode {
  color: rgba(248,250,252,.76);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.mode:hover { color: #fff; background: rgba(255,255,255,.08); }
.mode.active {
  background: rgba(255,255,255,.95);
  color: #18212f;
  box-shadow: 0 5px 16px -10px rgba(17,23,32,.65);
}
.theme-picker,
.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: 12px;
}
.theme-picker select,
.language-picker select {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: inherit;
  padding: 7px 9px;
  font: inherit;
  outline: 0;
}
.topbar .theme-picker,
.topbar .language-picker,
.topbar .session-user { color: rgba(248,250,252,.84); }
.topbar .theme-picker select option,
.topbar .language-picker select option {
  background: #f8fafc;
  color: #18212f;
}
html[data-theme="dark"] .topbar .theme-picker select option,
html[data-theme="dark"] .topbar .language-picker select option {
  background: #121720;
  color: #f2f5f8;
}
.topbar-theme-picker { margin-left: 2px; }
.theme-icon { font-size: 15px; }
.status {
  color: #eaf9e5;
  background: rgba(99,200,51,.18);
  border: 1px solid rgba(99,200,51,.22);
}
.logout {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.86);
}
.logout:hover { color: #fff; border-color: rgba(255,255,255,.32); }

/* Shell / sidebar */
.shell { min-height: calc(100vh - 108px); }
.sidebar {
  padding: 24px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, rgba(14,18,25,.99), rgba(9,12,17,.99));
}
.profile { border-bottom-color: var(--line); }
.profile small { color: var(--muted); }
.avatar {
  background: var(--brand-green-soft);
  color: var(--primary);
}
.nav {
  color: var(--muted);
  border-radius: 11px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav:hover {
  color: var(--ink);
  background: var(--hover);
}
.nav.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 650;
}
.sidebar-note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.sidebar-note strong { color: var(--ink); }
.mini-progress { background: var(--surface-3); }
.mini-progress i { background: linear-gradient(90deg, #63c833, #8fe35f); }

/* Workspace */
.workspace { padding: 28px; }
html[data-theme="light"] .workspace {
  background:
    radial-gradient(900px 520px at 79% -12%, rgba(52,120,246,.045), transparent 62%),
    linear-gradient(180deg,#f7f9fc,#f3f5f8);
}
html[data-theme="dark"] .workspace {
  background:
    radial-gradient(900px 520px at 79% -12%, rgba(59,130,246,.05), transparent 62%),
    radial-gradient(620px 420px at 10% 100%, rgba(99,200,51,.035), transparent 68%),
    #090b0f;
}
.hero {
  border: 1px solid rgba(126,146,177,.14);
  border-radius: 20px;
  background:
    radial-gradient(520px 210px at 100% 0%, rgba(99,200,51,.13), transparent 70%),
    radial-gradient(420px 180px at 0% 100%, rgba(91,156,255,.10), transparent 72%),
    linear-gradient(135deg,#151c27,#10161f);
  box-shadow: var(--shadow);
}
.hero h1 { font-weight: 750; }
.hero p { color: rgba(232,238,247,.72); }
.eyebrow { color: #8fe35f; }
.level-ring {
  border-color: rgba(99,200,51,.32);
  outline-color: rgba(99,200,51,.08);
}

/* Cards / panels */
.card,
.course-module,
.pilot-metric,
.review-item,
.alphabet-item,
.number-item {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.card { border-radius: var(--radius-card); }
.card p,
.card-head,
.metric-label,
.basics-note,
.course-module-title span,
.course-lesson small,
.pilot-metric span,
.pilot-metric small,
.review-item div small,
.alphabet-item small,
.number-item small { color: var(--muted); }
.metric-card > strong,
.stat > strong,
.pilot-metric strong { color: var(--ink); }
.pill {
  color: var(--primary);
  background: var(--primary-soft);
}
.pill.accent {
  color: #4fb82c;
  background: rgba(99,200,51,.13);
}
.primary {
  background: linear-gradient(135deg,#6ee047,#50bd33);
  color: #071008;
  box-shadow: 0 8px 22px -14px rgba(99,200,51,.72);
}
.primary:hover { filter: brightness(1.04); }
.voice {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.voice:hover { color: var(--ink); background: var(--hover); }
.lesson-row,
.student-row,
.course-lesson { border-color: var(--line); }
.course-lesson.current { color: var(--primary); }
.course-lesson.completed small { color: var(--green); }
.course-lesson.locked { color: var(--muted); opacity: .68; }

/* Forms / chat */
.composer,
.login-form input,
.placement-question select,
.alphabet-item,
.number-item {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
.composer input { color: var(--ink); }
.composer input::placeholder,
.login-form input::placeholder { color: var(--muted); }
.login-form input:focus,
.placement-question select:focus {
  border-color: rgba(99,200,51,.42);
  box-shadow: 0 0 0 3px rgba(99,200,51,.08);
}
.bubble.ai { background: var(--surface-2); color: var(--ink); }
.bubble.user { background: var(--primary); color: #071008; }
.bubble.correction {
  background: rgba(245,173,66,.10);
  color: #c98216;
  border-color: rgba(245,173,66,.22);
}
html[data-theme="dark"] .bubble.correction { color: #f5bd64; }
.alphabet-item:hover,
.number-item:hover {
  border-color: rgba(99,200,51,.32);
  background: var(--hover);
}
.alphabet-item span,
.number-item span { color: var(--primary); }

/* Login */
.login-overlay {
  background: rgba(7,10,14,.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.login-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.30);
}
.login-card h1 { font-family: var(--font-display); }
.login-card > p,
.login-note { color: var(--muted); }
.login-control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 14px 0 6px;
}
.login-language-picker,
.login-theme-picker {
  width: 100%;
  margin: 0;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
}
.login-language-picker select,
.login-theme-picker select {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 3px 4px;
}
.login-language-picker select option,
.login-theme-picker select option {
  background: var(--surface);
  color: var(--ink);
}
.demo-accounts button {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
.demo-accounts button:hover {
  border-color: rgba(99,200,51,.30);
  background: var(--primary-soft);
}

/* Teacher / pilot */
.teacher-badge {
  background: rgba(99,200,51,.14);
  color: #8fe35f;
  border-color: rgba(99,200,51,.22);
}
.brief,
.pilot-attention {
  background: var(--surface-2);
  color: var(--ink) !important;
  border-color: var(--line);
}
.brief.secondary { background: var(--surface-2); }
.review-item > span {
  color: #a36c11;
  background: rgba(245,173,66,.13);
}
.review-item.high {
  border-color: rgba(255,92,103,.24);
  background: rgba(255,92,103,.06);
}
.review-item.high > span {
  color: #d84d59;
  background: rgba(255,92,103,.12);
}

/* Footer */
footer {
  background: var(--surface);
  color: var(--muted);
  border-top-color: var(--line);
}

/* Compact responsive controls */
@media (max-width: 900px) {
  .topbar { height: 60px; padding: 0 14px; gap: 8px; }
  .brand-logo { width: 124px; }
  .topbar-theme-picker { margin-left: auto; }
  .theme-picker select { max-width: 78px; }
}
@media (max-width: 620px) {
  .login-control-row { grid-template-columns: 1fr; }
  .topbar-theme-picker .theme-icon { display: none; }
  .topbar-theme-picker select { max-width: 64px; padding: 6px; }
  .workspace { padding: 16px 12px 26px; }
}
