/* eUniversity LMS — app shell styles (light, on-brand) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --ink:        oklch(0.165 0.012 38);
  --ink-2:      oklch(0.205 0.014 38);
  --ink-3:      oklch(0.255 0.016 40);
  --paper:      oklch(0.974 0.008 75);
  --paper-2:    oklch(0.955 0.01 72);
  --paper-line: oklch(0.9 0.012 70);
  --white:      oklch(1 0 0);

  --red:        oklch(0.585 0.225 28);
  --red-bright: oklch(0.66 0.232 32);
  --red-deep:   oklch(0.43 0.18 28);
  --red-tint:   oklch(0.585 0.225 28 / 0.08);

  --amber:      oklch(0.80 0.155 72);
  --emerald:    oklch(0.60 0.13 162);
  --sky:        oklch(0.60 0.13 232);
  --violet:     oklch(0.56 0.15 292);

  --ink-text:   oklch(0.22 0.02 40);
  --ink-mut:    oklch(0.46 0.02 45);
  --ink-dim:    oklch(0.63 0.015 50);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-bright); }
button { font-family: inherit; }
::selection { background: var(--red); color: #fff; }

#root { height: 100vh; }

.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 244px;
  flex: none;
  background: var(--ink);
  color: oklch(0.85 0.01 60);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}
.sb-logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; }
.sb-logo img { height: 30px; width: auto; }
.sb-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500; color: oklch(0.78 0.01 60);
  cursor: pointer; border: none; background: none; text-align: left; width: 100%;
  transition: background .2s, color .2s;
}
.sb-item svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.sb-item:hover { background: oklch(1 0 0 / 0.06); color: #fff; }
.sb-item.active { background: var(--red); color: #fff; }
.sb-item.active svg { opacity: 1; }
.sb-sep { height: 1px; background: oklch(1 0 0 / 0.08); margin: 14px 6px; }
.sb-role-toggle {
  display: flex; background: oklch(1 0 0 / 0.06); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px;
}
.sb-role-btn {
  flex: 1; border: none; background: none; color: oklch(0.7 0.01 60); font-size: 12.5px; font-weight: 600;
  padding: 8px 6px; border-radius: 9px; cursor: pointer; transition: all .2s;
}
.sb-role-btn.active { background: #fff; color: var(--ink-text); }
.sb-role-btn .short { display: none; }
@media (max-width: 1000px) {
  .sb-role-btn { font-size: 10px; padding: 8px 2px; }
  .sb-role-btn .full { display: none; }
  .sb-role-btn .short { display: inline; font-size: 13px; font-weight: 700; }
}
.sb-foot { padding: 12px 12px 4px; display: flex; align-items: center; gap: 11px; border-top: 1px solid oklch(1 0 0 / 0.08); margin-top: 8px; }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; flex: none; }
.sb-foot .name { font-size: 13.5px; font-weight: 600; color: #fff; }
.sb-foot .role { font-size: 11.5px; color: oklch(0.65 0.01 60); margin-top: 1px; }

/* ---------- Main content ---------- */
.main { flex: 1; overflow-y: auto; }
.topbar-app {
  position: sticky; top: 0; z-index: 5;
  background: oklch(0.974 0.008 75 / 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-line);
  padding: 18px 36px; display: flex; align-items: center; justify-content: space-between;
}
.topbar-app h1 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.streak-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--white); border: 1px solid var(--paper-line); font-size: 12.5px; font-weight: 600; color: var(--ink-mut); white-space: nowrap; flex: none; }
.streak-chip svg { width: 15px; height: 15px; color: var(--amber); }
.page { padding: 32px 36px 60px; max-width: 1180px; }

/* ---------- Cards / generic ---------- */
.card { background: var(--white); border: 1px solid var(--paper-line); border-radius: 18px; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; margin-bottom: 16px; }
.eyebrow-sm { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }

/* ---------- Stat tiles ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 30px; }
.stat-tile { padding: 22px 22px; }
.stat-tile .ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.stat-tile .ic svg { width: 19px; height: 19px; }
.stat-tile .num { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; }
.stat-tile .lbl { font-size: 12.5px; color: var(--ink-mut); margin-top: 4px; }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.course-card { padding: 22px; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px oklch(0 0 0 / 0.22); border-color: var(--card-accent, var(--red)); }
.course-card .chead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.course-card .cat-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: color-mix(in oklab, var(--card-accent) 14%, white); color: color-mix(in oklab, var(--card-accent) 65%, black); }
.course-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-top: 14px; letter-spacing: -0.01em; }
.course-card .org { font-size: 12.5px; color: var(--ink-mut); margin-top: 4px; }
.course-card .next { font-size: 12.5px; color: var(--ink-mut); margin-top: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-card .next b { color: var(--ink-text); font-weight: 600; }
.progress-bar { height: 7px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin-top: 14px; }
.progress-bar .fill { height: 100%; border-radius: 999px; background: var(--card-accent, var(--red)); transition: width .6s var(--ease); }
.progress-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-mut); margin-top: 8px; }

/* ---------- Catalog ---------- */
.catalog-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border: 1.5px solid var(--paper-line); border-radius: 12px; background: var(--white); transition: border-color .2s, box-shadow .2s; }
.catalog-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 10%, transparent); }
.catalog-search svg { width: 18px; height: 18px; color: var(--ink-mut); flex-shrink: 0; }
.catalog-search input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.catalog-search .clear-search { border: none; background: none; font-size: 20px; line-height: 1; color: var(--ink-mut); cursor: pointer; padding: 0 4px; }
.catalog-search .clear-search:hover { color: var(--ink); }
.results-count { margin-left: auto; align-self: center; font-size: 12.5px; color: var(--ink-dim); }
.rating-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; }
.rating-row .stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: color-mix(in oklab, var(--amber) 60%, black); }
.rating-row .stars svg { width: 14px; height: 14px; color: var(--amber); }
.rating-row .learners { color: var(--ink-dim); }
.catalog-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 20px; text-align: center; color: var(--ink-mut); }
.catalog-empty svg { width: 34px; height: 34px; color: var(--paper-line); }
.catalog-empty p { font-size: 14.5px; }
.cat-card.clickable { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.cat-card.clickable:hover { transform: translateY(-3px); border-color: var(--card-accent); box-shadow: 0 10px 28px -14px color-mix(in oklab, var(--card-accent) 60%, transparent); }
.new-pill { margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald); background: color-mix(in oklab, var(--emerald) 14%, white); padding: 3px 9px; border-radius: 999px; }

/* ---------- Course detail ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.detail-hero { position: relative; padding: 26px; overflow: hidden; }
.detail-hero .cat-pill { margin-bottom: 12px; }
.detail-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: 27px; letter-spacing: -0.015em; line-height: 1.1; }
.detail-org { font-size: 13.5px; color: var(--ink-mut); margin-top: 6px; }
.detail-blurb { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-top: 14px; max-width: 60ch; }
.detail-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--ink-mut); }
.detail-facts .stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: color-mix(in oklab, var(--amber) 60%, black); }
.detail-facts .stars svg { width: 15px; height: 15px; color: var(--amber); }
.detail-block { margin-top: 26px; }
.detail-block h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 14px; }
.outcomes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.outcome { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.outcome .ok { flex-shrink: 0; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in oklab, var(--emerald) 16%, white); color: var(--emerald); }
.outcome .ok svg { width: 13px; height: 13px; }
.syllabus { display: flex; flex-direction: column; border: 1px solid var(--paper-line); border-radius: 14px; overflow: hidden; }
.syl-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--paper-line); }
.syl-row:last-child { border-bottom: none; }
.syl-n { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink-dim); }
.syl-t { font-size: 14.5px; color: var(--ink); }
.detail-aside { position: sticky; top: 22px; }
.enroll-card { position: relative; padding: 22px; overflow: hidden; }
.enroll-bar { height: 5px; border-radius: 999px; background: var(--card-accent); width: 44px; margin-bottom: 16px; }
.enroll-price { font-size: 13px; color: var(--ink-mut); margin-bottom: 12px; }
.enrolled-btn { border-color: var(--emerald) !important; color: var(--emerald) !important; }
.enroll-note { font-size: 12px; color: var(--emerald); margin-top: 10px; line-height: 1.4; }
.enroll-list { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--paper-line); display: flex; flex-direction: column; gap: 11px; }
.enroll-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.enroll-list svg { width: 17px; height: 17px; color: var(--ink-mut); flex-shrink: 0; }
.filter-row { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.filter-chip { padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--paper-line); background: var(--white); font-size: 13px; font-weight: 600; color: var(--ink-mut); cursor: pointer; transition: all .2s; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card { padding: 20px; }
.cat-card .bar { height: 5px; border-radius: 999px; background: var(--card-accent); margin-bottom: 16px; width: 40px; }
.cat-card h4 { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; }
.cat-card .org { font-size: 12px; color: var(--ink-mut); margin-top: 5px; }
.cat-card .meta { display: flex; gap: 12px; margin-top: 14px; font-size: 12px; color: var(--ink-dim); }
.cat-card .btn-enroll { margin-top: 16px; width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid var(--paper-line); background: none; font-size: 13px; font-weight: 600; color: var(--ink-text); cursor: pointer; transition: all .2s; }
.cat-card .btn-enroll:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-card .btn-enroll.enrolled { background: var(--emerald); color: #fff; border-color: var(--emerald); }

/* ---------- Buttons ---------- */
.btn2 { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all .25s var(--ease); }
.btn2 svg { width: 16px; height: 16px; }
.btn2-primary { background: var(--red); color: #fff; }
.btn2-primary:hover { background: var(--red-bright); transform: translateY(-1px); }
.btn2-ghost { background: var(--white); color: var(--ink-text); border: 1.5px solid var(--paper-line); }
.btn2-ghost:hover { border-color: var(--ink); }
.btn2:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Course Player ---------- */
.player-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.video-stage { background: var(--ink); border-radius: 18px; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.video-stage .playbtn { width: 64px; height: 64px; border-radius: 50%; background: oklch(1 0 0 / 0.14); border: 1.5px solid oklch(1 0 0 / 0.3); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(4px); transition: transform .25s; }
.video-stage .playbtn:hover { transform: scale(1.08); }
.video-stage .playbtn svg { width: 26px; height: 26px; }
.video-meta { padding: 18px 4px 0; display: flex; align-items: center; justify-content: space-between; }
.video-meta h2 { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.video-meta .dur { font-size: 12.5px; color: var(--ink-mut); margin-top: 4px; }
.ai-summary { padding: 22px; margin-top: 18px; }
.ai-summary .hd { display: flex; align-items: center; justify-content: space-between; }
.ai-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--violet); }
.ai-badge svg { width: 15px; height: 15px; }
.ai-summary ul { margin: 14px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.ai-summary li { font-size: 14px; line-height: 1.55; color: var(--ink-text); }
.regen-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-mut); background: none; border: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: all .2s; }
.regen-btn:hover { background: var(--paper-2); color: var(--ink-text); }
.regen-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.regen-btn svg { width: 13px; height: 13px; }
.regen-btn.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.module-list { display: flex; flex-direction: column; gap: 14px; }
.module-block { padding: 16px; }
.module-block h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mut); margin-bottom: 10px; }
.lesson-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.lesson-row:hover { background: var(--paper-2); }
.lesson-row.active { background: var(--red-tint); }
.lesson-row .lic { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--paper-2); color: var(--ink-dim); }
.lesson-row.done .lic { background: var(--emerald); color: #fff; }
.lesson-row .lic svg { width: 13px; height: 13px; }
.lesson-row .lt { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-row .ld { font-size: 11.5px; color: var(--ink-dim); }

/* ---------- AI Tutor ---------- */
.tutor-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; height: calc(100vh - 160px); }
.chat-panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 78%; padding: 13px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; }
.msg.ai { background: var(--paper-2); color: var(--ink-text); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { display: flex; gap: 4px; align-items: center; padding: 15px 18px; }
.msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); animation: bounce 1.2s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-input-row { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--paper-line); }
.chat-input-row input { flex: 1; border: 1.5px solid var(--paper-line); border-radius: 12px; padding: 12px 15px; font-size: 14px; font-family: inherit; }
.chat-input-row input:focus { outline: none; border-color: var(--red); }
.chat-send { width: 44px; height: 44px; border-radius: 12px; background: var(--red); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: background .2s; }
.chat-send:hover { background: var(--red-bright); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send svg { width: 18px; height: 18px; }
.suggest-panel { padding: 20px; }
.suggest-panel h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mut); margin-bottom: 14px; }
.suggest-chip { display: block; width: 100%; text-align: left; padding: 11px 13px; border-radius: 11px; background: var(--paper-2); border: none; font-size: 13px; color: var(--ink-text); cursor: pointer; margin-bottom: 8px; transition: background .2s; }
.suggest-chip:hover { background: var(--red-tint); }

/* ---------- Quiz ---------- */
.quiz-card { padding: 30px; max-width: 720px; }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.quiz-progress .dot { height: 5px; flex: 1; border-radius: 999px; background: var(--paper-line); }
.quiz-progress .dot.done { background: var(--red); }
.quiz-q { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; margin-bottom: 20px; }
.quiz-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--paper-line); margin-bottom: 10px; cursor: pointer; font-size: 14.5px; transition: all .2s; }
.quiz-opt:hover { border-color: var(--ink-dim); }
.quiz-opt.selected { border-color: var(--red); background: var(--red-tint); }
.quiz-opt.correct { border-color: var(--emerald); background: color-mix(in oklab, var(--emerald) 12%, white); }
.quiz-opt.incorrect { border-color: var(--red); background: color-mix(in oklab, var(--red) 10%, white); }
.quiz-opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--paper-line); flex: none; }
.quiz-opt.selected .radio { border-color: var(--red); background: var(--red); }
.quiz-opt.correct .radio { border-color: var(--emerald); background: var(--emerald); }
.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .ring { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 28px; }
.quiz-result h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.quiz-result p { color: var(--ink-mut); margin-top: 8px; font-size: 14.5px; }

/* ---------- Profile ---------- */
.profile-hero { display: flex; align-items: center; gap: 20px; padding: 26px; margin-bottom: 24px; }
.profile-avatar { width: 70px; height: 70px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 24px; flex: none; }
.profile-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.profile-hero .sub { font-size: 13.5px; color: var(--ink-mut); margin-top: 4px; }
.cert-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--paper-line); }
.cert-row:last-child { border-bottom: none; }
.cert-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: flex; align-items: center; justify-content: center; flex: none; }
.cert-ic svg { width: 20px; height: 20px; }
.cert-row b { font-size: 14.5px; font-weight: 600; display: block; }
.cert-row span { font-size: 12.5px; color: var(--ink-mut); }

/* ---------- Admin ---------- */
.risk-table { width: 100%; border-collapse: collapse; }
.risk-table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-mut); padding: 10px 14px; border-bottom: 1px solid var(--paper-line); }
.risk-table td { padding: 14px; font-size: 13.5px; border-bottom: 1px solid var(--paper-line); }
.risk-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.risk-badge.high { background: color-mix(in oklab, var(--red) 14%, white); color: var(--red); }
.risk-badge.medium { background: color-mix(in oklab, var(--amber) 22%, white); color: color-mix(in oklab, var(--amber) 60%, black); }
.risk-badge.low { background: color-mix(in oklab, var(--emerald) 14%, white); color: var(--emerald); }
.ai-insight { padding: 20px 22px; margin-bottom: 22px; background: linear-gradient(120deg, color-mix(in oklab, var(--violet) 8%, white), var(--white)); border-color: color-mix(in oklab, var(--violet) 25%, var(--paper-line)); }
.ai-insight .hd { display: flex; align-items: center; gap: 8px; }
.ai-insight p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--ink-text); }
.admin-course-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--paper-line); }
.admin-course-row:last-child { border-bottom: none; }
.admin-course-row .swatch { width: 8px; height: 40px; border-radius: 4px; flex: none; }
.admin-course-row .ct { flex: 1; }
.admin-course-row b { font-size: 14.5px; font-weight: 600; }
.admin-course-row .meta2 { font-size: 12.5px; color: var(--ink-mut); margin-top: 2px; }
.admin-course-row .metric { text-align: right; }
.admin-course-row .metric .n { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.admin-course-row .metric .l { font-size: 11px; color: var(--ink-mut); }

.tab-row { display: flex; gap: 6px; margin-bottom: 24px; background: var(--paper-2); padding: 5px; border-radius: 12px; width: fit-content; }
.tab-btn { padding: 9px 18px; border-radius: 9px; border: none; background: none; font-size: 13.5px; font-weight: 600; color: var(--ink-mut); cursor: pointer; transition: all .2s; }
.tab-btn.active { background: var(--white); color: var(--ink-text); box-shadow: 0 2px 8px -2px oklch(0 0 0 / 0.12); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 1000px) {
  .sidebar { width: 76px; }
  .sb-logo span, .sb-item span, .sb-foot .txt { display: none; }
  .sb-item { justify-content: center; }
  .sb-role-toggle { flex-direction: column; }
  .course-grid, .catalog-grid, .grid-2 { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .player-layout, .tutor-layout { grid-template-columns: 1fr; height: auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page { padding: 24px 18px 48px; }
  .topbar-app { padding: 16px 18px; }
}
