/* ============================================================
   星火视光 · 学习平台  样式表
   配色：深松绿 + 米白纸感 + 琥珀强调
   ============================================================ */

:root {
  --pine: #0e3b36;
  --pine-2: #144741;
  --pine-3: #1b5a52;
  --ink: #16201d;
  --ink-2: #4a5852;
  --ink-3: #808d87;
  --line: #e3e8e3;
  --line-2: #eef1ec;
  --bg: #f5f7f4;
  --card: #ffffff;
  --brand: #10695f;
  --brand-dark: #0a4d45;
  --brand-tint: #e8f2ef;
  --amber: #b8842c;
  --amber-tint: #fbf2e0;
  --red: #b4432c;
  --red-tint: #fbece8;
  --green: #2f7a54;
  --green-tint: #e9f3ec;
  --blue: #2c6b8c;
  --blue-tint: #e9f1f6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 26, .05), 0 8px 24px -18px rgba(16, 32, 26, .35);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============ 登录 ============ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
}

.login-brand {
  position: relative;
  background: var(--pine);
  color: #dcece7;
  padding: 64px clamp(36px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0);
  background-size: 26px 26px;
  pointer-events: none;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  right: -220px; bottom: -260px;
  border: 1px solid rgba(143, 211, 196, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(143,211,196,.045), 0 0 0 120px rgba(143,211,196,.03);
  pointer-events: none;
}
.brand-lockup {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; letter-spacing: .16em; color: #8fd3c4;
  position: relative; z-index: 1;
}
.brand-lockup svg { width: 34px; height: 34px; color: #8fd3c4; }
.login-brand h1 {
  position: relative; z-index: 1;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.28;
  margin: 44px 0 20px;
  color: #f4faf8;
  font-weight: 600;
  letter-spacing: .01em;
}
.login-sub {
  position: relative; z-index: 1;
  color: #a9c6bd; font-size: 14px; line-height: 2;
  max-width: 520px;
}
.login-points {
  position: relative; z-index: 1;
  list-style: none; padding: 0; margin: 44px 0 0;
  display: grid; gap: 16px; max-width: 460px;
}
.login-points li {
  display: flex; gap: 14px; align-items: baseline;
  font-size: 13.5px; color: #c3d9d2;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.login-points b {
  font-size: 12px; letter-spacing: .1em; color: #e8b44a; font-weight: 600;
}
.login-foot {
  position: relative; z-index: 1;
  margin-top: 48px; font-size: 12px; color: #7fa79c; letter-spacing: .08em;
}

.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--bg);
}
.login-card {
  width: 100%; max-width: 372px;
  display: grid; gap: 18px;
}
.login-card-head h2 { font-size: 26px; margin-bottom: 8px; }
.login-card-head p { color: var(--ink-3); font-size: 13px; }

.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 105, 95, .1);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.7; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
  white-space: nowrap;
}
.btn:hover { border-color: #cdd6cf; background: #fafbf9; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #eccdc5; background: #fff; }
.btn-danger:hover { background: var(--red-tint); border-color: #e0b6ab; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.form-error {
  padding: 9px 12px; border-radius: 9px;
  background: var(--red-tint); color: var(--red); font-size: 12.5px;
}
.login-hint {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-3);
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* ============ 框架 ============ */
.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--pine);
  color: #d5e5e0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; gap: 11px; align-items: center;
  padding: 26px 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand svg { width: 34px; height: 34px; color: #8fd3c4; flex: none; }
.side-title { font-size: 15px; color: #fff; letter-spacing: .05em; }
.side-sub { font-size: 11px; color: #83a89e; letter-spacing: .12em; margin-top: 2px; }

.side-nav { padding: 16px 12px; display: grid; gap: 2px; align-content: start; overflow-y: auto; flex: 1; }
.side-nav .nav-group {
  font-size: 10.5px; letter-spacing: .16em; color: #6d948a;
  padding: 14px 10px 8px;
}
.side-nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: 9px;
  background: transparent; color: #b6cdc7;
  font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.side-nav button:hover { background: rgba(255,255,255,.06); color: #e8f2ee; }
.side-nav button.active { background: rgba(143, 211, 196, .15); color: #fff; }
.side-nav button.active .nav-dot { background: #e8b44a; }
.side-nav svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav-count {
  margin-left: auto; font-size: 11px; padding: 1px 6px; border-radius: 6px;
  background: rgba(255,255,255,.12); color: #e8f2ee;
}

.side-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.side-user { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(143,211,196,.18); color: #cfeadf;
  display: grid; place-items: center; font-size: 14px; flex: none;
}
.side-user-info > div:first-child { color: #eaf5f1; font-size: 13.5px; }
.side-user-info > div:last-child { color: #7fa79c; font-size: 11.5px; }
.side-actions { display: flex; gap: 14px; margin-top: 12px; }
.link-btn {
  border: 0; background: transparent; padding: 0;
  color: #8fb0a7; font-size: 12px; cursor: pointer;
}
.link-btn:hover { color: #e8b44a; }

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

.topbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 26px 32px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 6;
}
.topbar h2 { font-size: 21px; }
.topbar p { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }
.clock { font-size: 12.5px; color: var(--ink-3); }
.pill {
  font-size: 12.5px; padding: 5px 11px; border-radius: 8px;
  background: var(--amber-tint); color: #8a6220;
  border: 1px solid #f0e2c6; max-width: 460px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.view { padding: 26px 32px 56px; flex: 1; }

/* ============ 通用组件 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 15px; }
.card-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.card-body { padding: 20px 22px; }
.card-body.tight { padding: 6px 10px; }

.section { margin-bottom: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.section-head h3 { font-size: 15.5px; }
.section-head p { font-size: 12px; color: var(--ink-3); }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }

/* KPI */
.kpi { padding: 20px 22px; position: relative; overflow: hidden; }
.kpi-label { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.kpi-value {
  font-size: 30px; font-weight: 650; letter-spacing: -.02em;
  margin-top: 6px; display: flex; align-items: baseline; gap: 6px;
}
.kpi-value small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.kpi-foot { margin-top: 10px; font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.kpi-mark { position: absolute; right: 18px; top: 18px; width: 26px; height: 26px; opacity: .18; }
.kpi-accent { height: 3px; border-radius: 2px; background: var(--brand); position: absolute; left: 22px; right: 22px; bottom: 0; opacity: .9; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.tag-green { background: var(--green-tint); color: var(--green); }
.tag-amber { background: var(--amber-tint); color: #8a6220; }
.tag-red { background: var(--red-tint); color: var(--red); }
.tag-blue { background: var(--blue-tint); color: var(--blue); }
.tag-brand { background: var(--brand-tint); color: var(--brand); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* 进度条 */
.bar { height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .4s ease; }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }
.bar.green > i { background: var(--green); }
.progress-cell { display: flex; align-items: center; gap: 9px; }
.progress-cell span { font-size: 12.5px; color: var(--ink-2); min-width: 34px; text-align: right; }

/* 环形进度 */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { display: block; }
.ring-text { position: absolute; text-align: center; }
.ring-text b { font-size: 20px; font-weight: 650; display: block; line-height: 1.1; }
.ring-text span { font-size: 11px; color: var(--ink-3); }
.ring.dark .ring-text b { color: #ffffff; }
.ring.dark .ring-text span { color: rgba(255,255,255,.72); }
.ring.dark svg circle:first-child { stroke: rgba(255,255,255,.22); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  letter-spacing: .03em; background: #fcfdfc;
}
td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  font-size: 13px; vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfa; }
td.tnum, th.tnum { font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 600; }
.cell-strong.link { cursor: pointer; transition: color .15s ease; }
.cell-strong.link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.row-actions { display: flex; gap: 3px; flex-wrap: nowrap; }
.row-actions .btn { padding: 3px 7px; font-size: 11.5px; white-space: nowrap; }
td.nowrap, th.nowrap { white-space: nowrap; }

/* 工具条 */
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.input-search {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #fff; min-width: 210px; font-family: inherit;
}
.input-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16,105,95,.08); }
select.select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #fff; font-family: inherit; color: var(--ink);
}

/* 空态 */
.empty {
  padding: 48px 20px; text-align: center; color: var(--ink-3); font-size: 13px;
}
.empty svg { width: 42px; height: 42px; opacity: .35; display: block; margin: 0 auto 12px; }

/* 课程卡 */
.course-list { display: grid; gap: 14px; }
.course-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); overflow: hidden; }
.course-cover {
  position: relative; min-height: 124px;
  display: grid; place-content: center; gap: 6px;
  color: #fff; padding: 16px;
}
.course-cover .cat { font-size: 10.5px; letter-spacing: .12em; opacity: .82; text-align: center; }
.course-cover .lv { font-size: 20px; font-weight: 600; letter-spacing: .04em; text-align: center; }
.course-main { padding: 18px 22px; display: grid; gap: 10px; min-width: 0; }
.course-main h3 { font-size: 16px; }
.course-main .desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.course-meta { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.course-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.course-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 章节列表 */
.lesson-list { display: grid; gap: 0; }
.lesson-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .15s;
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: #fafcfa; }
.lesson-idx {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--line-2); color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.lesson-item.done .lesson-idx { background: var(--green-tint); color: var(--green); }
.lesson-title { font-size: 13.5px; }
.lesson-item.done .lesson-title { color: var(--ink-2); }
.lesson-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; display: flex; gap: 10px; }
.lesson-arrow { color: var(--ink-3); font-size: 12px; }

/* 阅读页 */
.article-head { padding: 26px 34px; border-bottom: 1px solid var(--line-2); }
.article-head h3 { font-size: 20px; }
.article-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.article-body { padding: 30px 34px 34px; max-width: 780px; }
.article-body h4 {
  font-size: 15px; margin: 26px 0 10px; color: var(--brand-dark);
  padding-left: 12px; border-left: 3px solid var(--brand);
}
.article-body h4:first-child { margin-top: 0; }
.article-body p { font-size: 14px; line-height: 2; color: #2b3733; margin-bottom: 12px; }
.article-body ul { margin: 0 0 14px; padding-left: 20px; }
.article-body li { font-size: 14px; line-height: 1.95; color: #2b3733; margin-bottom: 6px; }
.article-body blockquote {
  margin: 18px 0; padding: 14px 18px;
  background: var(--brand-tint); border-radius: 10px;
  color: var(--brand-dark); font-size: 13.5px; line-height: 1.9;
}
.article-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 34px; border-top: 1px solid var(--line-2);
  background: #fcfdfc; flex-wrap: wrap;
}

/* 考核 */
.exam-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.exam-timer {
  font-size: 15px; padding: 7px 14px; border-radius: 9px;
  background: var(--pine); color: #eaf5f1; font-variant-numeric: tabular-nums;
}

.exam-guard {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--line); color: var(--ink-3); white-space: nowrap;
}
.exam-guard.warn { background: var(--red-tint); color: var(--red); }

.exam-meta {
  display: inline-block; margin-top: 10px; font-size: 12px; color: var(--ink-3);
  background: #f2f5f2; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
}
.exam-timer.warn { background: var(--red); }
.question { padding: 22px 26px; border-bottom: 1px solid var(--line-2); }
.question:last-of-type { border-bottom: 0; }
.q-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.q-idx {
  font-size: 11.5px; color: var(--brand); background: var(--brand-tint);
  padding: 2px 8px; border-radius: 6px; flex: none;
}
.q-stem { font-size: 14.5px; line-height: 1.8; font-weight: 500; }
.q-type { font-size: 11px; color: var(--ink-3); margin-left: auto; flex: none; }
.opt {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s;
  font-size: 13.5px; line-height: 1.7;
}
.opt:hover { border-color: #c9d3cb; background: #fbfcfb; }
.opt input { margin-top: 2px; accent-color: var(--brand); }
.opt.sel { border-color: var(--brand); background: var(--brand-tint); }
.opt.correct { border-color: var(--green); background: var(--green-tint); }
.opt.wrong { border-color: var(--red); background: var(--red-tint); }
.opt-key { font-size: 12px; color: var(--ink-3); width: 16px; flex: none; }
.q-explain {
  margin-top: 10px; padding: 10px 13px; border-radius: 9px;
  background: var(--line-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.8;
}

.result-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px;
  align-items: center; padding: 30px 32px;
}

/* 矩阵 */
.matrix th, .matrix td { text-align: center; padding: 10px 8px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 16px; }
.matrix .course-col { font-size: 11.5px; line-height: 1.4; }
.m-cell { display: grid; gap: 4px; justify-items: center; cursor: pointer; }
.m-percent { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.m-dot { width: 8px; height: 8px; border-radius: 50%; }
.m-dot.done { background: var(--green); }
.m-dot.exam { background: var(--amber); }
.m-dot.studying { background: var(--blue); }
.m-dot.idle { background: var(--line); }
.m-cell:hover .m-percent { color: var(--brand); }

/* 抽屉 / 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(14, 32, 27, .42);
  display: grid; place-items: center; z-index: 40; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px;
  width: min(560px, 100%); max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px -30px rgba(10, 30, 24, .5);
  animation: pop .18s ease;
}
.modal.wide { width: min(880px, 100%); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex: 0 0 auto;
  padding: 20px 24px; border-bottom: 1px solid var(--line-2);
}
.modal-head h3 { font-size: 16px; }
.modal-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 20px 24px; display: grid; gap: 16px; overflow: auto; flex: 1 1 auto; min-height: 0; max-height: calc(88vh - 150px); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto;
  padding: 16px 24px; border-top: 1px solid var(--line-2); background: #fcfdfc;
}
.modal-close {
  border: 0; background: transparent; font-size: 20px; line-height: 1;
  color: var(--ink-3); cursor: pointer; padding: 2px 6px;
}
.modal-close:hover { color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 抽屉式详情 */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(460px, 92vw);
  background: #fff; z-index: 41; display: flex; flex-direction: column;
  box-shadow: -20px 0 60px -30px rgba(10, 30, 24, .45);
  animation: slide .2s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head { padding: 22px 24px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; }
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: grid; gap: 18px; align-content: start; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); }

/* 学员详情抽屉 */
.drawer.wide { width: min(560px, 95vw); }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; background: #fafbf9; }
.stu-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--brand-tint, #e6f1ee); color: var(--pine);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}
.stu-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stu-stat {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 3px; background: #fcfdfc;
}
.stu-stat-label { font-size: 11.5px; color: var(--ink-3); }
.stu-stat b { font-size: 19px; line-height: 1.2; }
.stu-stat-note { font-size: 11px; color: var(--ink-3); }
.drawer-sec {
  font-size: 12px; letter-spacing: .04em; text-transform: none;
  color: var(--ink-3); font-weight: 600; margin: 4px 0 -4px;
}
.course-block { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 15px; background: #fff; display: grid; gap: 10px; }
.course-block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.course-block-head b { font-size: 13.5px; }
.attempt-list { display: grid; gap: 6px; padding: 8px 10px; border-radius: 8px; background: #f5f7f4; }
.attempt-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.attempt-row .num { font-weight: 600; min-width: 52px; }
.attempt-time { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.lesson-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lchip {
  font-size: 11.5px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-3); background: #fff;
}
.lchip.done { border-color: #cfe3d8; background: var(--green-tint); color: var(--green); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: var(--pine); color: #eaf5f1; font-size: 13px;
  padding: 11px 20px; border-radius: 10px; z-index: 50;
  box-shadow: 0 14px 40px -16px rgba(10,30,24,.6);
  animation: pop .2s ease;
}
.toast.bad { background: #8e351f; }

/* 趋势图 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding: 0 2px; }
.trend-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.trend-bar > i {
  width: 100%; max-width: 22px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #1c8579, #0e3b36);
  min-height: 3px; transition: height .5s;
}
.trend-bar > span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.trend-bar.zero > i { background: var(--line); }

/* 分布条 */
.dist { display: grid; gap: 9px; }
.dist-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 12.5px; }
.dist-row .lbl { color: var(--ink-2); font-size: 12px; }
.dist-row .val { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 分段切换 */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button {
  border: 0; background: transparent; padding: 7px 14px;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.seg button.active { background: var(--pine); color: #fff; }

/* 提示条 */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--radius);
  background: var(--amber-tint); border: 1px solid #f0e2c6;
  font-size: 12.5px; color: #7a5717; line-height: 1.8;
}
.callout.brand { background: var(--brand-tint); border-color: #cfe4de; color: var(--brand-dark); }

/* 学员端首页 */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px;
  align-items: center; padding: 28px 30px;
  background: var(--pine); color: #eaf5f1; border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; width: 340px; height: 340px; right: -140px; top: -150px;
  border-radius: 50%; border: 1px solid rgba(143,211,196,.25);
  box-shadow: 0 0 0 40px rgba(143,211,196,.04);
}
.hero h3 { font-size: 22px; color: #fff; }
.hero p { font-size: 13px; color: #a9c6bd; margin-top: 8px; line-height: 1.9; }
.hero-stats { display: flex; gap: 34px; margin-top: 22px; flex-wrap: wrap; }
.hero-stat b { font-size: 24px; font-weight: 600; color: #fff; display: block; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 11.5px; color: #8fb0a7; }
.hero-ring { position: relative; z-index: 1; }

/* 响应式 */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; background: var(--bg); }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 10;
    flex-direction: row; align-items: center; overflow-x: auto;
  }
  .side-brand { border-bottom: 0; padding: 14px 16px; flex: none; }
  .side-brand svg { width: 26px; height: 26px; }
  .side-title { font-size: 13px; }
  .side-sub { display: none; }
  .side-nav { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; flex: 1; }
  .side-nav .nav-group { display: none; }
  .side-nav button { width: auto; white-space: nowrap; padding: 8px 12px; font-size: 12.5px; }
  .side-nav svg { display: none; }
  .side-foot { border-top: 0; padding: 8px 14px; flex: none; display: flex; gap: 12px; align-items: center; }
  .side-user-info { display: none; }
  .side-actions { margin-top: 0; }
  .topbar { padding: 18px 18px 14px; position: static; }
  .topbar-right .clock { display: none; }
  .view { padding: 18px 18px 44px; }
  .g4, .g3, .g2, .form-row { grid-template-columns: minmax(0, 1fr); }
  .course-card { grid-template-columns: 1fr; }
  .course-cover { min-height: 76px; }
  .course-cover .lv { font-size: 15px; }
  .hero { grid-template-columns: 1fr; }
  .hero-ring { display: none; }
  .article-body, .article-head, .article-foot { padding-left: 18px; padding-right: 18px; }
  .result-hero { grid-template-columns: 1fr; }
  th, td { padding: 10px 10px; }
}

/* 题库与组卷 */
.divider { height: 0; border-top: 1px solid var(--line); }
.q-idx { display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:6px;background:#eef3f1;color:var(--ink-2);font-size:11.5px;font-weight:600; }

.pill.danger { background: #fdeeea; border-color: #eccdc5; color: var(--red); }
