/* =====================================================================
   CSMC学员中心 - 全站统一设计系统 app.css
   2026 流行风格：浅色渐变 + 大圆角卡片 + 柔和阴影 + 流畅动效
   移动端优先（学员端/教师端），兼容所有现代浏览器（含微信内置浏览器）
   ===================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --primary: #2563eb;
  --primary-2: #4f8cff;
  --grad-main: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --grad-soft: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  --accent: #10b981;
  --accent-2: #34d399;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --bg: #f2f5fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #94a3b8;
  --line: #e5eaf3;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .12);
  --nav-h: 62px;
  --topbar-h: 96px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "HarmonyOS Sans SC", "Segoe UI", Roboto, sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 22px; height: 22px; }

/* ---------- 3. 移动端页面骨架 ---------- */
.m-page { background: var(--bg); padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }
.m-body { padding: 14px 14px 20px; max-width: 720px; margin: 0 auto; }

/* 渐变顶栏 */
.m-topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--grad-main);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
  box-shadow: 0 6px 24px rgba(37, 99, 235, .18);
}
.m-topbar-bg { display: none; }
.m-topbar-in { max-width: 720px; margin: 0 auto; }
.m-topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-topbar-title { display: flex; align-items: center; min-width: 0; }
.m-topbar-logo { height: 34px; width: auto; display: block; }
.m-topbar-user { font-size: 13px; opacity: .95; background: rgba(255,255,255,.18); padding: 3px 13px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.m-topbar-user-box { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.m-topbar-user-top { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.m-topbar-logout { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; color: rgba(255,255,255,.9); border-radius: 50%; border: 1px solid rgba(255,255,255,.4); transition: background .2s; }
.m-topbar-logout svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-topbar-logout:hover { background: rgba(255,255,255,.18); }
.m-topbar-logout:active { background: rgba(255,255,255,.28); }
.m-topbar-sub { font-size: 12px; opacity: .88; display: flex; align-items: center; gap: 6px; }
.m-topbar-sub::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.75); flex: none; }
.m-topbar-space { height: 0; }

/* 底部五Tab导航 */
.m-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, .05);
}
.m-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 0 7px; color: var(--muted); font-size: 11px;
  transition: color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.m-nav-item:active { transform: scale(.94); }
.m-nav-ic svg { width: 24px; height: 24px; }
.m-nav-item.active { color: var(--primary); }
.m-nav-item.active .m-nav-ic {
  position: relative;
}
.m-nav-item.active .m-nav-ic::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
}
.m-nav-space { height: calc(var(--nav-h) + var(--safe-bottom)); }

/* ---------- 4. 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15.5px; font-weight: 700; margin-bottom: 12px;
}
.card-title .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.section { margin-bottom: 18px; }
.section-title {
  font-size: 14px; font-weight: 700; color: var(--text-2);
  margin: 4px 2px 10px; display: flex; align-items: center; gap: 6px;
}
.section-title::before {
  content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--grad-main);
}

/* 统计卡网格 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card .num {
  font-size: 26px; font-weight: 800; line-height: 1.2;
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card .lbl { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.stat-card.tone-green .num { background: linear-gradient(135deg, #059669, #34d399); -webkit-background-clip: text; background-clip: text; }
.stat-card.tone-orange .num { background: linear-gradient(135deg, #d97706, #fbbf24); -webkit-background-clip: text; background-clip: text; }
.stat-card.tone-red .num { background: linear-gradient(135deg, #dc2626, #f87171); -webkit-background-clip: text; background-clip: text; }
.stat-card .ico {
  position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff; opacity: .9;
  background: var(--grad-main);
}
.stat-card .ico svg { width: 18px; height: 18px; }
.stat-card.tone-green .ico { background: linear-gradient(135deg, #059669, #34d399); }
.stat-card.tone-orange .ico { background: linear-gradient(135deg, #d97706, #fbbf24); }
.stat-card.tone-red .ico { background: linear-gradient(135deg, #dc2626, #f87171); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 15px; font-weight: 600;
  transition: transform .12s, opacity .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad-main); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.btn.ghost { background: #eef3ff; color: var(--primary); }
.btn.success { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.btn.warn { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.btn.danger { background: linear-gradient(135deg, #dc2626, #f87171); color: #fff; }
.btn.plain { background: #f1f5f9; color: var(--text-2); }
.btn.outline { background: transparent; border: 1.5px solid var(--line); color: var(--text-2); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after {
  content: ''; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 6. 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .textarea, .native-select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .textarea:focus, .native-select:focus {
  border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.textarea { resize: vertical; min-height: 80px; }
.input::placeholder, .textarea::placeholder { color: #b6c0d2; }
.input-sm { padding: 8px 11px; font-size: 14px; }

/* 统一美化下拉框（自定义 .c-select 组件，由 app.js 渲染） */
.c-select { position: relative; user-select: none; }
.c-select .c-sel-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 13px; background: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; min-height: 46px;
}
.c-select.open .c-sel-trigger { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.c-sel-value { color: var(--text); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sel-value.placeholder { color: #b6c0d2; }
.c-sel-arrow { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; flex: none; }
.c-select.open .c-sel-arrow { transform: rotate(180deg); }
.c-sel-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 90;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); max-height: 260px; overflow-y: auto;
  padding: 5px; display: none;
  animation: popIn .16s ease;
}
.c-select.open .c-sel-menu { display: block; }
.c-sel-option {
  padding: 9px 12px; border-radius: 8px; font-size: 14.5px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  white-space: nowrap;
  transition: background .12s;
}
.c-sel-option:hover { background: #f1f5f9; }
.c-sel-option.selected { background: #eef3ff; color: var(--primary); font-weight: 600; }
.c-sel-option .check { width: 16px; height: 16px; color: var(--primary); flex: none; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: #dbe2ee;
  transition: background .2s; cursor: pointer;
}
.switch .slider::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.18);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 表单行（后台表格内联表单） */
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- 7. 统一弹窗（modal） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  border: none; background: #f1f5f9; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
  transition: background .15s;
}
.modal-close svg { width: 15px; height: 15px; }
.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 6px 18px 8px; font-size: 14.5px; color: var(--text-2); }
/* 弹窗表单行统一排版 */
.modal-body .f-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.modal-body .f-row > label { width: 84px; flex: none; font-size: 13.5px; color: #64748b; font-weight: 600; }
.modal-body .f-row .input { flex: 1; min-width: 0; }
.modal-body .f-row .c-select { flex: 1; min-width: 0; }
.modal-body .f-row .c-sel-trigger { min-height: 42px; padding: 9px 12px; font-size: 14px; }
.modal-body .f-tip { margin: -6px 0 13px 94px; color: #94a3b8; font-size: 12.5px; line-height: 1.5; }
.modal-foot { padding: 14px 18px 18px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-foot .btn { flex: 1; }

/* 确认弹窗图标 */
.modal-confirm-ic {
  width: 56px; height: 56px; border-radius: 50%; margin: 6px auto 4px;
  display: flex; align-items: center; justify-content: center;
}
.modal-confirm-ic.danger { background: #fee2e2; color: var(--danger); }
.modal-confirm-ic.warn { background: #fef3c7; color: var(--warn); }
.modal-confirm-ic.success { background: #d1fae5; color: var(--accent); }
.modal-confirm-ic svg { width: 26px; height: 26px; }

/* ---------- 8. 统一 Toast 提示 ---------- */
.toast-wrap {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
  z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; padding: 0 16px;
}
.toast {
  max-width: 92%; min-width: 180px;
  background: rgba(15, 23, 42, .9); color: #fff; border-radius: 999px;
  padding: 10px 20px; font-size: 14px; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.3);
  display: flex; align-items: center; gap: 7px;
}
.toast.success { background: rgba(5, 150, 105, .95); }
.toast.error { background: rgba(220, 38, 38, .95); }
.toast.warn { background: rgba(217, 119, 6, .95); }
.toast.leaving { animation: toastOut .25s ease forwards; }
.toast-ic { width: 18px; height: 18px; flex: none; }

/* ---------- 9. 统一下拉筛选（列表页顶部筛选条） ---------- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 12px;
}
.filter-bar .c-select, .filter-bar .search-box { flex: 1; min-width: 130px; }
.search-box { position: relative; }
.search-box .input { padding-left: 38px; }
.search-box .s-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}

/* ---------- 10. 表格（后台为主，移动端横向滚动） ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.table th {
  background: #f8fafc; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8faff; }
.table .ops { display: flex; gap: 6px; white-space: nowrap; }
.table .rank-no {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px;
  font-weight: 700; font-size: 12.5px;
}
.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.rank-n { background: #eef3ff; color: var(--primary); }

/* 移动端列表卡片（学员端记录展示） */
.list-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.list-card .lc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
}
.list-card .lc-title { font-weight: 700; font-size: 14.5px; }
.list-card .lc-body { padding: 10px 14px; font-size: 13.5px; color: var(--text-2); }
.list-card .lc-row { display: flex; justify-content: space-between; padding: 4px 0; }
.list-card .lc-row b { color: var(--text); font-weight: 600; }
.list-card .lc-foot {
  display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #f1f5f9; flex-wrap: wrap;
}

/* ---------- 11. 徽章 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; padding: 2.5px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge-success { background: #d1fae5; color: #047857; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-muted { background: #f1f5f9; color: #64748b; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

/* ---------- 12. Tab / 分段控件 ---------- */
.tabs { display: flex; gap: 4px; background: #e9eef7; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.tabs .tab {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.tabs .tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.seg { display: inline-flex; background: #e9eef7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg .seg-item {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-2); cursor: pointer; transition: all .15s;
}
.seg .seg-item.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px rgba(15,23,42,.08); }

/* ---------- 13. 进度条 ---------- */
.progress { height: 9px; background: #e9eef7; border-radius: 999px; overflow: hidden; }
.progress .bar {
  height: 100%; border-radius: 999px;
  background: var(--grad-main);
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.progress.green .bar { background: linear-gradient(135deg, #059669, #34d399); }
.progress.orange .bar { background: linear-gradient(135deg, #d97706, #fbbf24); }
.progress.red .bar { background: linear-gradient(135deg, #dc2626, #f87171); }

/* 知识点掌握条形图 */
.kp-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.kp-bar .name { width: 76px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-bar .track { flex: 1; height: 8px; background: #e9eef7; border-radius: 999px; overflow: hidden; }
.kp-bar .fill { height: 100%; border-radius: 999px; background: var(--grad-main); }
.kp-bar .pct { width: 44px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--primary); }

/* 圆环图（conic-gradient） */
.donut {
  width: 110px; height: 110px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.donut::before {
  content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #fff;
}
.donut .donut-val { position: relative; z-index: 1; text-align: center; }
.donut .donut-val b { display: block; font-size: 22px; font-weight: 800; }
.donut .donut-val span { font-size: 11px; color: var(--muted); }

/* 迷你折线（SVG） */
.mini-chart { width: 100%; height: 90px; }
.mini-chart svg { width: 100%; height: 100%; }

/* ---------- 14. 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 13px 6px; text-align: center; color: var(--text-2);
  transition: transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.quick-item:active { transform: scale(.94); }
.quick-item .q-ic {
  width: 44px; height: 44px; margin: 0 auto 7px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.quick-item .q-ic svg { width: 22px; height: 22px; }
.quick-item .q-tx { font-size: 12px; font-weight: 600; }
.q-ic.blue { background: var(--grad-main); }
.q-ic.green { background: linear-gradient(135deg, #059669, #34d399); }
.q-ic.orange { background: linear-gradient(135deg, #d97706, #fbbf24); }
.q-ic.pink { background: linear-gradient(135deg, #db2777, #f472b6); }
.q-ic.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.q-ic.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.q-ic.red { background: linear-gradient(135deg, #dc2626, #f87171); }

/* ---------- 15. 空状态 / 分页 ---------- */
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty .empty-ic { font-size: 40px; margin-bottom: 8px; }
.empty .empty-tx { font-size: 13.5px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; }
.pager-btn {
  padding: 6px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); transition: all .15s;
}
.pager-btn:hover { color: var(--primary); border-color: var(--primary-2); }
.pager-info { font-size: 13px; color: var(--muted); }

/* ---------- 16. 学习/答题 ---------- */
.video-box {
  width: 100%; aspect-ratio: 16/9; background: #0b1120; border-radius: var(--radius);
  overflow: hidden; position: relative;
}
.video-box video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.chapter-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .15s;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: #f8faff; }
.chapter-item .ci-index {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: #eef3ff; color: var(--primary); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.chapter-item.done .ci-index { background: #d1fae5; color: #047857; }
.chapter-item .ci-info { flex: 1; min-width: 0; }
.chapter-item .ci-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-item .ci-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 题目卡 */
.q-options { display: grid; gap: 9px; margin-top: 10px; }
.q-option {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; cursor: pointer; transition: all .15s; font-size: 14.5px;
}
.q-option:active { transform: scale(.99); }
.q-option .op-key {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: #f1f5f9; color: var(--text-2); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.q-option.selected { border-color: var(--primary); background: #eef3ff; }
.q-option.selected .op-key { background: var(--primary); color: #fff; }
.q-option.correct { border-color: #10b981; background: #ecfdf5; }
.q-option.correct .op-key { background: #10b981; color: #fff; }
.q-option.wrong { border-color: #ef4444; background: #fef2f2; }
.q-option.wrong .op-key { background: #ef4444; color: #fff; }
.q-option[disabled] { cursor: default; }
.q-blank-input { margin-top: 10px; }

/* 结果卡（答案解析+视频解析） */
.res-analysis { margin-top: 10px; padding: 11px 13px; background: #f8fafc; border-radius: var(--radius-sm); font-size: 13.5px; }
.res-analysis b { color: var(--text); }
.res-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.res-tag.ok { background: #d1fae5; color: #047857; }
.res-tag.err { background: #fee2e2; color: #b91c1c; }
.q-video { width: 100%; border-radius: 8px; margin-top: 8px; background: #000; }
.q-video-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 600; font-size: 13px; margin-top: 8px; }

/* 考试倒计时 */
.exam-timer {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; margin-bottom: 12px;
}
.exam-timer .t-label { font-size: 13px; color: var(--text-2); }
.exam-timer .t-val { font-size: 17px; font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; }
.exam-timer .t-val.low { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* 答题卡（题号网格） */
.answer-sheet { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.answer-sheet .as-no {
  aspect-ratio: 1; border-radius: 10px; background: #f1f5f9; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .12s; border: 1.5px solid transparent;
}
.answer-sheet .as-no.answered { background: #eef3ff; color: var(--primary); border-color: #c7d7fe; }
.answer-sheet .as-no.current { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* ---------- 17. 动效 ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- 18. 后台基础组件补充（布局见 admin.css） ---------- */
.a-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.a-toolbar .spacer { flex: 1; }
.a-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.a-panel-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.a-panel-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--grad-main); }
.a-btn-sm {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--text-2);
  transition: all .15s;
}
.a-btn-sm:hover { border-color: var(--primary-2); color: var(--primary); }
.a-btn-sm.danger { color: var(--danger); }
.a-btn-sm.danger:hover { border-color: var(--danger); background: #fef2f2; }
.a-btn-sm.primary { color: var(--primary); border-color: #c7d7fe; background: #eef3ff; }
.a-btn-sm.success { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }

/* 登录/注册页 */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--grad-main);
}
.auth-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 20px; max-width: 460px; margin: 0 auto; width: 100%; }
.auth-brand { color: #fff; text-align: center; margin-bottom: 26px; }
.auth-brand .auth-logo { height: 46px; width: auto; margin: 0 auto 12px; display: block; }
.auth-brand .logo {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900;
  border: 1.5px solid rgba(255,255,255,.35); backdrop-filter: blur(6px);
}
.auth-brand h1 { font-size: 22px; font-weight: 800; letter-spacing: 2px; }
.auth-brand p { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px 22px; }
.auth-links { display: flex; justify-content: center; gap: 26px; margin-top: 16px; color: #fff; font-size: 13.5px; }
.auth-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-tip { text-align: center; font-size: 12px; color: rgba(255,255,255,.8); margin-top: 18px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-row .cap-img { width: 130px; height: 46px; border-radius: var(--radius-sm); cursor: pointer; border: 1.5px solid var(--line); }

/* 工具类 */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); } .text-2 { color: var(--text-2); }
.text-primary { color: var(--primary); } .text-success { color: #059669; } .text-danger { color: var(--danger); } .text-warn { color: #d97706; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-20 { font-size: 20px; }
.tc { text-align: center; } .tr { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
