/* lumen. shared stylesheet. Warm editorial e-learning back office.
   Light by default, dark via prefers-color-scheme. Responsive to ~380px. */

:root {
  --ground: #F6F4F7;      /* cool neutral, not warm cream */
  --surface: #FFFFFF;
  --surface-2: #F0EDF2;
  --ink: #1D1B22;
  --muted: #625E6B;
  --hairline: rgba(29, 27, 34, .10);
  --hairline-2: rgba(29, 27, 34, .06);

  --coral: #F0567A;
  --coral-hover: #DA3F63;
  --coral-ink: #FFFFFF;
  --amber: #E8A33D;       /* warm secondary, sparing */
  --green: #2F9E6A;
  --amber-txt: #C77F2A;
  --red: #D8452E;

  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 16px;
  --sidebar-w: 244px;
  --topbar-h: 62px;

  --shadow: 0 1px 2px rgba(29,27,34,.05), 0 10px 30px rgba(29,27,34,.07);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #131218;
    --surface: #1C1A22;
    --surface-2: #262330;
    --ink: #F1EEF4;
    --muted: #9E98A9;
    --hairline: rgba(255, 255, 255, .11);
    --hairline-2: rgba(255, 255, 255, .06);

    --coral: #F0567A;
    --coral-hover: #F76E8E;
    --coral-ink: #17141B;
    --amber: #EBAE52;
    --green: #45B984;
    --amber-txt: #E0A24C;
    --red: #EE6A54;

    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 12px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--coral);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 5px;
}

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brandmark {
  display: flex; align-items: center;
  padding: 2px 8px 16px;
  border-bottom: 1px solid var(--hairline-2);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.02em;
}
.wordmark .dot { color: var(--coral); }

.school {
  display: flex; align-items: center; gap: 11px;
  padding: 2px 6px;
}
.sch-badge {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--coral) 16%, var(--surface-2));
  color: var(--coral);
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
  border: 1px solid color-mix(in srgb, var(--coral) 26%, transparent);
}
.sch-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.school .name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.1; }
.chip-plan {
  align-self: flex-start;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber-txt);
  border: 1px solid color-mix(in srgb, var(--amber) 42%, transparent);
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  padding: 2px 8px; border-radius: 999px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group-label {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  padding: 14px 10px 6px;
}
.nav .nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 500;
  background: none; border: none; text-align: left; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.nav .nav-item svg { width: 18px; height: 18px; flex: none; }
.nav .nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav .nav-item[aria-current="page"] {
  background: color-mix(in srgb, var(--coral) 12%, transparent);
  color: var(--ink); font-weight: 600;
}
.nav .nav-item[aria-current="page"] svg { color: var(--coral); }
.nav .nav-item.muted { opacity: .78; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--hairline-2);
  padding-top: 14px;
  font-size: 11px; color: var(--muted); line-height: 1.45;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 13px;
  padding: 0 var(--gutter);
}
.topbar h1 { font-size: 18px; font-weight: 600; }
.topbar .spacer { flex: 1; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 7px 14px; min-width: 210px; color: var(--muted);
}
.searchbox svg { width: 15px; height: 15px; flex: none; }
.searchbox input { background: none; border: none; color: var(--ink); font: inherit; font-size: 13px; width: 100%; outline: none; }
.searchbox input::placeholder { color: var(--muted); }

.term-ctl {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  color: var(--ink); background: var(--surface); white-space: nowrap;
}
.term-ctl .td { width: 7px; height: 7px; border-radius: 999px; background: var(--green); }

.icon-btn {
  width: 37px; height: 37px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
  background: var(--coral); color: #fff;
  font-family: var(--font-mono); font-size: 9px;
  display: grid; place-items: center; border: 2px solid var(--ground);
}

.avatar {
  width: 37px; height: 37px; border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 20%, var(--surface-2));
  color: var(--coral);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  border: 1px solid var(--hairline);
}

.hamburger {
  display: none; width: 39px; height: 39px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  cursor: pointer; place-items: center;
}
.hamburger svg { width: 19px; height: 19px; }

.content { padding: 26px var(--gutter) 64px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 22px; }
.page-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .eyebrow { display: block; margin-bottom: 9px; }
.page-head h2 { font-size: 30px; font-weight: 600; }
.page-head p { color: var(--muted); margin: 8px 0 0; font-size: 14.5px; max-width: 62ch; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  color: var(--coral-ink); background: var(--coral);
  border: none; border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: background .14s ease;
}
.btn-primary:hover { background: var(--coral-hover); }
.btn-primary svg { width: 16px; height: 16px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 30px 0 14px;
}
.section-head h3 { font-size: 19px; font-weight: 600; }
.section-head .link { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.section-head .link:hover { color: var(--coral); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }

/* ---------- KPI band ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 999px;
  background: var(--accent, var(--muted)); opacity: .07;
}
.kpi.tone-coral { --accent: var(--coral); }
.kpi.tone-amber { --accent: var(--amber); }
.kpi.tone-green { --accent: var(--green); }
.kpi.tone-ink { --accent: var(--ink); }
.kpi.tone-red { --accent: var(--red); }
.kpi .k-label { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .k-value { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.05; margin: 10px 0 5px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .k-note { font-size: 12.5px; color: var(--muted); position: relative; }
.kpi .k-note b { color: var(--accent, var(--ink)); font-weight: 600; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px 3px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: none; }
.pill.st-published { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); border-color: color-mix(in srgb, var(--green) 32%, transparent); }
.pill.st-draft { color: var(--amber-txt); background: color-mix(in srgb, var(--amber) 15%, transparent); border-color: color-mix(in srgb, var(--amber) 34%, transparent); }
.pill.st-paid { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); border-color: color-mix(in srgb, var(--green) 32%, transparent); }
.pill.st-scheduled { color: var(--muted); background: var(--surface-2); border-color: var(--hairline); }
.pill.st-processing { color: var(--amber-txt); background: color-mix(in srgb, var(--amber) 15%, transparent); border-color: color-mix(in srgb, var(--amber) 34%, transparent); }

/* ---------- Filter row ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar .fb-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.filter-bar .fb-label svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .02em;
  color: var(--muted); background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 6px 13px; cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--coral) 40%, var(--hairline)); }
.chip[aria-pressed="true"] { color: var(--coral-ink); background: var(--coral); border-color: var(--coral); }

/* ---------- Overview layout ---------- */
.ov-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }

.chart-card .ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.chart-card .ch-name { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chart-card .ch-figure { font-family: var(--font-display); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--hairline-2); stroke-width: 1; }
.ch-ylab, .ch-xlab { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.ch-area { fill: var(--coral); opacity: .12; }
.ch-line { fill: none; stroke: var(--coral); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ch-dot { fill: var(--surface); stroke: var(--coral); stroke-width: 1.8; }
.ch-dot.last { fill: var(--coral); stroke: var(--surface); stroke-width: 2; }
.ch-bar { fill: color-mix(in srgb, var(--coral) 42%, var(--surface-2)); }
.ch-bar.last { fill: var(--coral); }

/* Top courses rail */
.rail { display: flex; flex-direction: column; }
.rail-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--hairline-2); }
.rail-row:last-child { border-bottom: none; }
.rail-rank { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); width: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.rail-mid { flex: 1; min-width: 0; }
.rail-title { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.rail-cat { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.rail-count { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail-count svg { width: 14px; height: 14px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--muted); }

/* Activity feed */
.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--hairline-2); }
.feed-row:last-child { border-bottom: none; }
.feed-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed-ic svg { width: 17px; height: 17px; }
.feed-ic.k-enroll { background: color-mix(in srgb, var(--coral) 14%, transparent); color: var(--coral); }
.feed-ic.k-complete { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.feed-ic.k-review { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber-txt); }
.feed-ic.k-publish { background: var(--surface-2); color: var(--ink); }
.feed-ic.k-refund { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
.feed-text { font-size: 13.5px; min-width: 0; }
.feed-text b { font-weight: 600; }
.feed-when { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- Course library cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.course-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .14s ease, transform .14s ease;
}
.course-card:hover { border-color: color-mix(in srgb, var(--coral) 34%, var(--hairline)); transform: translateY(-2px); }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cc-cat { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.cc-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.2; margin-top: 8px; }
.cc-instr { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.cc-stats { display: flex; gap: 22px; border-top: 1px solid var(--hairline-2); padding-top: 14px; }
.cc-stat .s-lab { font-family: var(--font-mono); font-weight: 500; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-stat .s-val { font-family: var(--font-mono); font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.cc-completion .comp-top { display: flex; align-items: baseline; justify-content: space-between; }
.cc-completion .comp-lab { font-family: var(--font-mono); font-weight: 500; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-completion .comp-val { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.progress { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 7px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--coral); }
.progress.amber > span { background: var(--amber); }
.progress.green > span { background: var(--green); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.cc-price { font-family: var(--font-display); font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; }

/* ---------- Tiles (students) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.tile .t-label { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.tile .t-value { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 8px 0 3px; font-variant-numeric: tabular-nums; }
.tile .t-note { font-size: 12px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data thead th {
  text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 13px 16px; border-bottom: 1px solid var(--hairline); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface);
}
table.data tbody td { padding: 13px 16px; border-bottom: 1px solid var(--hairline-2); font-size: 13.5px; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.name-cell { display: flex; align-items: center; gap: 11px; }
.name-av { width: 32px; height: 32px; border-radius: 999px; flex: none; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 12px; background: color-mix(in srgb, var(--coral) 15%, var(--surface-2)); color: var(--coral); }
.name-main { font-weight: 600; }
.name-sub { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); }
.prog-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.prog-cell .progress { flex: 1; margin: 0; }
.prog-cell .prog-num { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; font-variant-numeric: tabular-nums; width: 38px; text-align: right; }
.plan-tag { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--muted); }
.plan-tag.plan-Studio { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 34%, transparent); background: color-mix(in srgb, var(--coral) 10%, transparent); }
.plan-tag.plan-Annual { color: var(--green); border-color: color-mix(in srgb, var(--green) 32%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.plan-tag.plan-Monthly { color: var(--amber-txt); border-color: color-mix(in srgb, var(--amber) 34%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.mono-cell { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; color: var(--muted); }

/* ---------- Curriculum ---------- */
.course-banner {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; display: flex; gap: 24px; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: 8px;
}
.cb-cover {
  width: 96px; height: 96px; border-radius: var(--radius); flex: none;
  background: linear-gradient(140deg, var(--coral), var(--amber));
  display: grid; place-items: center; color: #fff;
}
.cb-cover svg { width: 40px; height: 40px; }
.cb-main { flex: 1; min-width: 220px; }
.cb-cat { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.cb-title { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 8px 0 4px; }
.cb-instr { color: var(--muted); font-size: 13.5px; }
.cb-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; }
.cb-meta .m-lab { font-family: var(--font-mono); font-weight: 500; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cb-meta .m-val { font-family: var(--font-mono); font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.cb-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.module { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; }
.module-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--hairline-2); }
.module-num { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--coral); border: 1px solid color-mix(in srgb, var(--coral) 32%, transparent); border-radius: 8px; padding: 5px 9px; flex: none; }
.module-titles { flex: 1; min-width: 0; }
.module-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.module-sum { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.module-count { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--muted); white-space: nowrap; }
.lesson-list { display: flex; flex-direction: column; }
.lesson { display: grid; grid-template-columns: auto auto 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--hairline-2); }
.lesson:last-child { border-bottom: none; }
.grip { color: var(--muted); opacity: .55; cursor: default; display: grid; place-items: center; }
.grip svg { width: 18px; height: 18px; }
.lesson-type { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.lesson-type svg { width: 16px; height: 16px; }
.lt-Video { background: color-mix(in srgb, var(--coral) 13%, transparent); color: var(--coral); }
.lt-Quiz { background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber-txt); }
.lt-Reading { background: var(--surface-2); color: var(--muted); }
.lesson-name { font-size: 13.5px; font-weight: 500; min-width: 0; }
.lesson-kind { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.lesson-dur { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lesson-state { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.state-pub { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.state-draft { color: var(--muted); background: var(--surface-2); }

/* ---------- Revenue by course ---------- */
.rev-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hairline-2); }
.bar-row:last-child { border-bottom: none; }
.bar-row .b-title { font-size: 13px; font-weight: 500; }
.bar-row .b-amount { font-family: var(--font-mono); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.bar-row .b-track { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-row .b-track > span { display: block; height: 100%; border-radius: 999px; background: var(--coral); }

/* ---------- Footer note ---------- */
.demo-note {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--hairline-2);
  font-size: 11.5px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.demo-note svg { width: 15px; height: 15px; flex: none; color: var(--coral); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: var(--ground);
  padding: 11px 17px; border-radius: 999px; box-shadow: var(--shadow);
  font-size: 13px; display: flex; align-items: center; gap: 9px;
  opacity: 0; pointer-events: none; z-index: 80;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 15px; height: 15px; color: var(--coral); }

.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.scrim.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ov-grid, .rev-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid, .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; }
  .searchbox, .term-ctl { display: none; }
}
@media (max-width: 480px) {
  .kpi-grid, .tiles, .course-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 52px; }
  .page-head h2 { font-size: 25px; }
  .kpi .k-value { font-size: 30px; }
  .lesson { grid-template-columns: auto 1fr auto auto; gap: 10px; padding: 12px 16px; }
  .lesson .grip, .lesson .lesson-kind { display: none; }
  .cb-side { align-items: flex-start; width: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (prefers-reduced-motion: no-preference) {
  .kpi, .tile, .card, .course-card, .module { animation: rise .3s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
