/* ==========================================================================
   教师端工作台 · 全局样式系统
   设计依据：dataviz 参考调色板（浅色/深色双主题）
   ========================================================================== */

/* ---------- 设计令牌（Design Tokens） ---------- */
:root {
  color-scheme: light;

  /* 表面与背景：淡蓝灰底 + 白卡片，清爽护眼 */
  --surface-1:       #ffffff;   /* 卡片 / 图表表面 */
  --page-bg:         #f2f5fa;   /* 页面平面 */
  --surface-2:       #f8fafc;   /* 高亮表面（输入框 / 表头等） */

  /* 文字墨色：柔和深蓝灰，减少长时间使用的视觉疲劳 */
  --text-primary:    #1e293b;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;

  /* 图表家具 */
  --gridline:        #e6ebf2;
  --baseline:        #cbd5e1;
  --border:          rgba(30, 41, 59, 0.10);
  --border-strong:   rgba(30, 41, 59, 0.16);

  /* 品牌 / 主色（categorical slot 1 · blue） */
  --brand:           #2a78d6;
  --brand-hover:     #256abf;
  --brand-soft:      #eaf2fc;

  /* 系列色（categorical，固定顺序，永不复用循环） */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;

  /* 顺序色 ramp（blue，light->dark） */
  --seq-100: #cde2fb;
  --seq-250: #86b6ef;
  --seq-400: #3987e5;
  --seq-550: #1c5cab;
  --seq-700: #0d366b;

  /* 状态色（固定，不用于系列） */
  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-serious:  #ec835a;
  --status-critical: #d03b3b;

  /* 去强调灰（用于"其他/未达标"等次要填充） */
  --deemph-fill:     #e9edf3;
  --deemph-ink:      #94a3b8;

  /* 侧边栏（白色） */
  --sidebar-bg:      #ffffff;
  --sidebar-ink:     #475569;
  --sidebar-ink-dim: #94a3b8;
  --sidebar-active:  #eaf2fc;
  --sidebar-border:  rgba(30, 41, 59, 0.08);
  --sidebar-hover-ink: #2a78d6;   /* 悬停浅蓝 */
  --sidebar-hover-bg:  #f0f6ff;
  --sidebar-active-ink: #2a78d6;

  /* 尺寸 */
  --sidebar-w:       240px;
  --topbar-h:        68px;
  --radius:          12px;
  --radius-sm:       8px;

  /* 阴影（克制） */
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 1px rgba(15, 23, 42, 0.03);

  --font-sans: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei",
               "PingFang SC", "Hiragino Sans GB", sans-serif;
}

/* 深色主题：自己选步骤，从同一 ramp 取深色值，非自动翻转 */
:root[data-theme="dark"] {
  color-scheme: dark;

  --surface-1:       #1a1a19;
  --page-bg:         #0d0d0d;
  --surface-2:       #222220;

  --text-primary:    #ffffff;
  --text-secondary:  #c3c2b7;
  --text-muted:      #898781;

  --gridline:        #2c2c2a;
  --baseline:        #383835;
  --border:          rgba(255, 255, 255, 0.10);
  --border-strong:   rgba(255, 255, 255, 0.16);

  --brand:           #3987e5;
  --brand-hover:     #5598e7;
  --brand-soft:      #1c2f45;

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;

  --seq-100: #22405f;
  --seq-250: #2f5c8f;
  --seq-400: #3987e5;
  --seq-550: #86b6ef;
  --seq-700: #cde2fb;

  --deemph-fill:     #2c2c2a;
  --deemph-ink:      #898781;

  --sidebar-bg:      #0d0d0d;
  --sidebar-ink:     #c3c2b7;
  --sidebar-ink-dim: #898781;
  --sidebar-active:  #1a1a19;
  --sidebar-border:  rgba(255, 255, 255, 0.08);
  --sidebar-hover-ink: #ffffff;
  --sidebar-hover-bg:  rgba(255, 255, 255, 0.06);
  --sidebar-active-ink: #ffffff;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* hidden 属性兜底：防止被 display:flex 等规则覆盖 */
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button, select, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-ink-dim);
  margin-top: 1px;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.nav-group-label {
  font-size: 11px;
  color: var(--sidebar-ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink);
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
  font-size: 13.5px;
  user-select: none;
}

.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-ink);
}

.nav-item:hover .nav-icon { color: var(--sidebar-hover-ink); }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-ink);
  font-weight: 500;
}

.nav-item.active .nav-icon { color: var(--brand); }
.nav-item[hidden] { display: none; }

.nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--sidebar-ink-dim);
}

.nav-icon svg { width: 18px; height: 18px; }

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  color: var(--sidebar-ink-dim);
  font-variant-numeric: tabular-nums;
}

/* 二级菜单 */
.nav-arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--sidebar-ink-dim);
  transition: transform 0.15s;
}
.nav-arrow svg { width: 16px; height: 16px; }
.nav-parent.open .nav-arrow { transform: rotate(90deg); }
.nav-sub {
  display: none;
  margin-bottom: 2px;
  padding-left: 10px;
}
.nav-parent.open + .nav-sub { display: block; }
.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink);
  cursor: pointer;
  margin-bottom: 2px;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.nav-sub-item .nav-icon { color: var(--sidebar-ink-dim); }
.nav-sub-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-ink);
}
.nav-sub-item:hover .nav-icon { color: var(--sidebar-hover-ink); }
.nav-sub-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-ink);
  font-weight: 500;
}
.nav-sub-item.active .nav-icon { color: var(--sidebar-active-ink); }
.nav-sub-item--child {
  padding-left: 30px;
  font-size: 12.5px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--series-1), var(--series-7));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-footer .meta { min-width: 0; }
.sidebar-footer .name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer .role {
  font-size: 11px;
  color: var(--sidebar-ink-dim);
}

/* ==========================================================================
   主区域
   ========================================================================== */
.main {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 5;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
}

.topbar-crumb {
  font-size: 12.5px;
  color: var(--text-muted);
}
.topbar-crumb b { color: var(--text-primary); font-weight: 500; }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-1);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }

.content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   页面 / 导航
   ========================================================================== */
.page { display: none; }
.page.active { display: flex; flex-direction: column; gap: 24px; }

/* 占位页 */
.placeholder {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.placeholder .ph-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.placeholder .ph-icon svg { width: 28px; height: 28px; }
.placeholder h3 { font-size: 17px; font-weight: 600; }
.placeholder p { color: var(--text-secondary); max-width: 420px; font-size: 13.5px; }
.placeholder .ph-tag {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
}

/* ==========================================================================
   筛选器栏（一行，位于内容上方，作用于其下所有图表）
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.filter-field label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 132px;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.select:hover { border-color: var(--brand); }
.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 多选筛选（试卷等）：触发器外观对齐 .select，下拉内为复选清单 */
.st-multi { position: relative; }
.st-multi-trigger {
  min-width: 132px;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s;
}
.st-multi-trigger:hover { border-color: var(--brand); }
.st-multi-trigger:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.st-multi-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-multi-caret { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.st-multi-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 30;
}
.st-multi-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
}
.st-multi-opt:hover { background: var(--brand-soft); }
.st-multi-opt input { margin: 0; cursor: pointer; flex-shrink: 0; }

.filter-spacer { flex: 1; }

/* ==========================================================================
   模块 / 卡片
   ========================================================================== */
.module { display: flex; flex-direction: column; gap: 14px; }

.module-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-title .bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand);
}
.module-title .hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--text-muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 表格视图切换（图表的可访问性孪生） */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle button {
  border: none;
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle button.active {
  background: var(--brand);
  color: #fff;
}
.view-toggle button:not(.active):hover { background: var(--brand-soft); color: var(--brand); }

/* ==========================================================================
   KPI / Stat Tile
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
/* 学生信息总览：五个看板浅白底，悬停变浅蓝 + 五列布局 */
.kpi-grid.kpi-grid-info { grid-template-columns: repeat(5, 1fr); }
.kpi-grid.kpi-grid-info .kpi {
  background: var(--surface-1);
  transition: background-color 0.15s, border-color 0.15s;
}
.kpi-grid.kpi-grid-info .kpi:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
}

.kpi {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--text-primary);
}
.kpi-value .unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 3px;
  letter-spacing: 0;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.kpi-delta.up-good { color: var(--status-good); }
.kpi-delta.down-bad { color: var(--status-critical); }
.kpi-delta.neutral { color: var(--text-muted); }

/* Hero figure（页面主数字） */
.kpi.kpi-hero { grid-column: span 1; }
.kpi.kpi-hero .kpi-value { font-size: 48px; }

.kpi .spark {
  position: absolute;
  right: 14px;
  bottom: 16px;
  width: 88px;
  height: 30px;
}

/* 活跃率 mini meter */
.kpi-meter {
  height: 6px;
  border-radius: 3px;
  background: var(--deemph-fill);
  overflow: hidden;
  margin-top: 2px;
}
.kpi-meter > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}

/* 清零数据：紧凑型 KPI（更小更密） */
.kpi-grid.kpi-grid-compact { gap: 10px; }
.kpi-grid.kpi-grid-compact .kpi { padding: 12px 14px; gap: 5px; }
.kpi-grid.kpi-grid-compact .kpi-label { font-size: 12px; }
.kpi-grid.kpi-grid-compact .kpi-value { font-size: 24px; }
.kpi-grid.kpi-grid-compact .kpi-value .unit { font-size: 13px; }
.kpi-grid.kpi-grid-compact .kpi-sub { font-size: 11px; }
.kpi-grid.kpi-grid-compact .spark { width: 64px; height: 22px; right: 12px; bottom: 12px; }

/* ==========================================================================
   图表容器
   ========================================================================== */
.viz-root {
  color-scheme: light;
  --viz-surface: var(--surface-1);
  --viz-text: var(--text-primary);
  --viz-text-2: var(--text-secondary);
  --viz-muted: var(--text-muted);
  --viz-grid: var(--gridline);
  --viz-axis: var(--baseline);
}
:root[data-theme="dark"] .viz-root { color-scheme: dark; }

.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }

.chart-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart-table th, .chart-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gridline);
  font-variant-numeric: tabular-nums;
}
.chart-table th {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--baseline);
}
.chart-table th.num,
.chart-table td.num { text-align: center; }
.chart-table tr:hover td { background: var(--brand-soft); }
.chart-table tr.is-clickable { cursor: pointer; }
.chart-table tr.is-clickable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.chart-table .cell-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -1px;
}

/* ---------- SVG 图表元素（颜色走设计令牌，深浅主题自动跟随） ---------- */
.viz-bar { fill: var(--series-1); }
.viz-bar-deemph { fill: var(--deemph-fill); }
.viz-axis-line { stroke: var(--viz-axis); }
.viz-grid-line { stroke: var(--viz-grid); }
.viz-threshold { stroke: var(--viz-axis); }
.viz-label-text { fill: var(--viz-text); }
.viz-label-text-2 { fill: var(--viz-text-2); }
.viz-label-muted { fill: var(--viz-muted); }
.viz-spark-line { stroke: var(--deemph-ink); }
.viz-spark-dot { fill: var(--series-1); }
.viz-line { fill: none; stroke: var(--series-1); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.viz-line-area { fill: color-mix(in srgb, var(--series-1) 12%, transparent); stroke: none; }
.viz-dot { fill: var(--surface-1); stroke: var(--series-1); stroke-width: 2; }

/* 图表空状态 */
.viz-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* hover / focus 提升 */
path.viz-bar.hovered,
path.viz-bar-deemph.hovered { filter: brightness(1.09); }
.viz-hit { outline: none; }
.viz-row-hit,
.chart [data-viz-row] { cursor: pointer; }

/* ==========================================================================
   薄弱知识点列表
   ========================================================================== */
.weak-list { display: flex; flex-direction: column; gap: 10px; }
.weak-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.weak-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.weak-rank.r1 { background: #fdeaea; color: #c0392b; }
.weak-rank.r2 { background: #fdf1e6; color: #d35400; }
.weak-rank.r3 { background: #fdf6e3; color: #b7791f; }
.weak-rank.rx { background: var(--deemph-fill); color: var(--text-secondary); }
:root[data-theme="dark"] .weak-rank.r1 { background: #3a2020; color: #e66767; }
:root[data-theme="dark"] .weak-rank.r2 { background: #3a2a1c; color: #eb9a5a; }
:root[data-theme="dark"] .weak-rank.r3 { background: #3a3018; color: #d9a44a; }

.weak-body { flex: 1; min-width: 0; }
.weak-name {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weak-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.weak-rate {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.weak-rate.low { color: var(--status-critical); }
.weak-rate.mid { color: var(--status-serious); }
.weak-rate.ok { color: var(--status-good); }

.weak-bar-wrap {
  width: 90px;
  height: 6px;
  border-radius: 3px;
  background: var(--deemph-fill);
  overflow: hidden;
  flex-shrink: 0;
}
.weak-bar-wrap > span {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.weak-bar-wrap > span.low { background: var(--status-critical); }
.weak-bar-wrap > span.mid { background: var(--status-serious); }
.weak-bar-wrap > span.ok { background: var(--status-good); }

/* ==========================================================================
   图表 Tooltip
   ========================================================================== */
.viz-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  z-index: 20;
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.1s;
}
.viz-tooltip.show { opacity: 1; }
.viz-tooltip .tt-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
}
.viz-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 1.5px 0;
  color: var(--text-secondary);
}
.viz-tooltip .tt-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.viz-tooltip .tt-key.rect { width: 9px; height: 9px; border-radius: 3px; }
.viz-tooltip .tt-val {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  padding-left: 14px;
}

/* ==========================================================================
   徽章 / 标签
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge.good { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.badge.warn { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.badge.bad { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); }
.badge.brand { color: var(--brand); background: var(--brand-soft); }

/* ==========================================================================
   图例（≥2 系列时始终存在）
   ========================================================================== */
.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.legend-item.dim { opacity: 0.45; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend-swatch.line { width: 14px; height: 3px; border-radius: 2px; }

/* ==========================================================================
   学生作业页
   ========================================================================== */
.hw-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hw-head-actions { display: flex; align-items: center; gap: 8px; }
.hw-title { font-size: 20px; font-weight: 700; }
.hw-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }

/* 列表筛选栏 */
.hw-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.hw-filter-bar .select { min-width: 116px; }
.hw-filter-bar .ph-search { width: 210px; flex-shrink: 0; }
.hw-filter-bar .hf-name { width: 180px; flex-shrink: 0; }
.hw-current { font-size: 12.5px; color: var(--text-muted); }
.lr-format-label { font-size: 12.5px; color: var(--text-muted); }

/* 学情报告 · 考试筛选面板 */
.lr-exam { position: relative; }
.lr-exam-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 150px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lr-exam-trigger:hover { border-color: var(--brand); }
.lr-exam-trigger.open,
.lr-exam-trigger.active { border-color: var(--brand); color: var(--brand); }
.lr-exam-caret { font-style: normal; font-size: 11px; color: var(--text-muted); transition: transform .15s; }
.lr-exam-trigger.open .lr-exam-caret { transform: rotate(180deg); }
.lr-exam-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 248px;
  padding: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(30, 41, 59, .14);
}
.lr-exam-col-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.lr-exam-search {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.lr-exam-search:focus { border-color: var(--brand); }
.lr-exam-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 232px;
  margin-top: 10px;
  overflow: auto;
}
.lr-exam-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.lr-exam-item:hover { background: var(--surface-2); }
.lr-exam-item.on { background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand); font-weight: 600; }
.lr-exam-item input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.lr-date-range { display: inline-flex; align-items: center; gap: 6px; }
.lr-date {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}
.lr-date:focus { border-color: var(--brand); outline: none; }
.lr-date-sep { color: var(--text-muted); }
.hw-count { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 资源中心入口卡片 */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.res-card {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.res-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(42,120,214,.12); }
.res-card-icon {
  flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
}
.res-card-icon svg { width: 22px; height: 22px; }
.res-card-body { display: flex; flex-direction: column; gap: 4px; }
.res-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.res-card-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.mb-hide-names {
  appearance: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.mb-hide-names:hover { color: var(--text-primary); border-color: var(--brand); }
.mb-hide-names.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

/* 作业列表 */
.hw-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hw-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hw-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(42, 120, 214, 0.10);
}

.hw-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hw-card-top .badge { flex-shrink: 0; margin-top: 1px; }
.hw-type {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 0 8px;
  white-space: nowrap;
}
.hw-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.hw-info {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.hw-info .sep { color: var(--text-muted); }
.hw-info .hw-info-red { color: var(--status-critical); font-weight: 600; }

.hw-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--gridline);
  padding-top: 10px;
  margin-top: 2px;
}
.hw-answer {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.hw-answer b { color: var(--text-primary); font-weight: 600; }
.hw-card-actions { display: flex; align-items: center; gap: 4px; }

.btn-link {
  border: none;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-link:hover { background: var(--brand-soft); }

/* 状态徽章扩展：草稿（warn 已有）/ 已发布（good）/ 已截止（gray） */
.badge.gray { color: var(--text-muted); background: var(--deemph-fill); }

/* ==========================================================================
   模态框
   ========================================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-mask[hidden] { display: none; }
/* 试卷预览需盖过"查看正确率"弹框（两者均为 .modal-mask 且后者在 DOM 中更靠后） */
#pers-preview-mask { z-index: 120; }

.modal {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface-1);
  z-index: 1;
}
.modal-head h3 { font-size: 16px; font-weight: 600; }

.modal-body { padding: 18px 20px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-field label { font-size: 12px; color: var(--text-secondary); }
.form-field .select { width: 100%; min-width: 0; }
.form-full { grid-column: 1 / -1; }

.input {
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color 0.15s;
  width: 100%;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.form-hint { font-size: 12px; color: var(--text-muted); }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--surface-1);
}

/* 创建作业：大号模态框 + 分区块
   尺寸与主页面内容区保持一致（视口 - 侧边栏 240 - 内边距 48） */
.modal-lg {
  width: calc(100vw - 288px);
  max-width: none;
}
.modal-lg .form-grid { grid-template-columns: repeat(3, 1fr); }
.form-section { margin-bottom: 20px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }

.pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pick-head > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.pick-head .form-section-title { margin-bottom: 0; }

/* 题目分组：空状态 */
.hw-pick-empty {
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  padding: 30px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* 题目分组：按题型分组的题目列表 */
.hw-groups { display: flex; flex-direction: column; gap: 12px; }
.hw-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hw-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.type-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.hw-q {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.hw-q:last-child { border-bottom: none; }
.hw-q-no { color: var(--text-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.hw-q-main { flex: 1; min-width: 0; }
.hw-q-stem { font-size: 25px; color: var(--text-primary); line-height: 1.5; }
.hw-q-src { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.hw-q-score { color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hw-q-del {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.hw-q-del:hover { color: var(--status-critical); background: var(--surface-2); }
.hw-f-summary-mt { margin-top: 10px; }

/* ==========================================================================
   从教辅添加题目 · 右侧侧边栏
   ========================================================================== */
.bank-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: flex;
  justify-content: flex-end;
  z-index: 150;
}
.bank-mask[hidden] { display: none; }

.bank-panel {
  width: 520px;
  max-width: 94vw;
  height: 100%;
  background: var(--surface-1);
  border-left: 1px solid var(--border-strong);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  animation: bank-in 0.18s ease;
}
@keyframes bank-in {
  from { transform: translateX(28px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.bank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.bank-head h3 { font-size: 16px; font-weight: 600; }

.bank-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.bank-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 16px;
}
.bank-filters .form-field:first-child { grid-column: 1 / -1; }

.bank-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}
.bank-q:hover { border-color: var(--brand); box-shadow: var(--shadow-card); }

.bq-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bq-type {
  font-size: 11.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 6px; padding: 1px 8px;
}
.bq-diff { font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 8px; }
.bq-diff-easy { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 10%, transparent); }
.bq-diff-mid { color: #b0760a; background: color-mix(in srgb, var(--status-warning) 16%, transparent); }
.bq-diff-hard { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 10%, transparent); }
.bq-know {
  font-size: 11.5px; color: var(--text-secondary);
  background: var(--deemph-fill); border-radius: 6px; padding: 1px 8px;
}

.bank-q-stem { font-size: 25px; color: var(--text-primary); line-height: 1.6; margin-bottom: 6px; }
.bq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin: 4px 0 6px; }
.bq-option { font-size: 18px; color: var(--text-secondary); }
.bank-q-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

.bq-ans-toggle {
  appearance: none; background: none; border: none; padding: 0;
  font-size: 12px; color: var(--brand); cursor: pointer; margin-bottom: 4px;
}
.bq-ans-toggle:hover { text-decoration: underline; }
.bq-detail {
  background: var(--surface-1);
  border: 1px dashed var(--border);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 8px;
}
.bq-answer { font-size: 12.5px; color: var(--status-good); font-weight: 600; }
.bq-analysis { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.6; }

.bq-actions { display: flex; align-items: center; gap: 8px; }
.bq-add {
  appearance: none; font-size: 12px; font-weight: 600;
  color: var(--brand); background: var(--surface-1);
  border: 1px solid var(--brand); border-radius: 999px; padding: 4px 12px; cursor: pointer;
  transition: color .15s, background .15s;
}
.bq-add:hover { background: var(--brand-soft); }
.bq-add.active { color: #fff; background: var(--brand); }
.bq-add-sm { padding: 3px 10px; font-size: 11.5px; }
.bq-rec {
  appearance: none; font-size: 12px; color: var(--text-secondary);
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.bq-rec:hover { color: var(--text-primary); border-color: var(--brand); }

.bq-rec-panel {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.bq-rec-item {
  border: 1px solid var(--border); border-left: 3px solid var(--series-5);
  border-radius: 8px; padding: 8px 12px; background: var(--surface-1);
}
.bq-rec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.bq-rec-stem { font-size: 25px; color: var(--text-primary); line-height: 1.5; margin-bottom: 6px; }

.bank-empty { color: var(--text-muted); font-size: 12.5px; text-align: center; padding: 28px 0; }

.bank-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.bank-picked { font-size: 12.5px; color: var(--text-muted); }
.bank-foot-actions { display: flex; align-items: center; gap: 8px; }

.bank-q-score { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   从教辅添加题目 · 选题工作台（三栏）
   ========================================================================== */
.bank-panel--ws { width: 1060px; }

.bank-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.bank-top-field { max-width: 340px; flex: 1; min-width: 0; }
.bank-top #btn-bank-confirm-add { flex-shrink: 0; }

.bank-body--ws { display: flex; padding: 0; overflow: hidden; }

.bank-col { display: flex; flex-direction: column; min-width: 0; }
.bank-col-title {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  padding: 12px 12px 8px; letter-spacing: .02em;
}

.bank-col--tree {
  width: 212px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.bank-col--tree .bank-col-title { position: sticky; top: 0; background: var(--surface-1); z-index: 1; }

.bank-col--mid { flex: 1; border-right: 1px solid var(--border); }

.bank-col--preview {
  width: 320px; flex-shrink: 0;
  overflow-y: auto;
}
.bank-col--preview .bank-col-title { position: sticky; top: 0; background: var(--surface-1); z-index: 1; }

/* 章节目录树 */
.bank-tree { padding: 0 8px 16px; }
.bt-row {
  display: flex; align-items: center; gap: 4px;
  border-radius: 7px; padding: 4px 6px; cursor: pointer;
  transition: background .12s;
}
.bt-row:hover { background: var(--deemph-fill); }
.bt-row.active { background: var(--brand-soft); }
.bt-row.active .bt-label { color: var(--brand); font-weight: 600; }
.bt-caret {
  width: 16px; flex-shrink: 0; text-align: center;
  font-size: 11px; color: var(--text-muted); cursor: pointer; user-select: none;
}
.bt-caret-none { visibility: hidden; }
.bt-label {
  appearance: none; background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--text-primary); text-align: left;
  line-height: 1.5; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 中间筛选栏 */
.bank-mid-filters {
  display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 12px 12px 0;
}
.bank-mid-filters .form-field { flex: 1; min-width: 96px; }
.bank-mid-filters .form-field label { font-size: 11px; }

/* 题型行 · 横铺平铺（含一键生题） */
.bank-type-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 12px; border-bottom: 1px solid var(--border);
}
.bank-type-label { font-size: 11px; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }
.bank-mid-gen { flex-shrink: 0; margin-left: auto; }

/* 题型多选平铺 chips */
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.type-chip {
  appearance: none; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.type-chip:hover { border-color: var(--brand); color: var(--brand); }
.type-chip.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.type-chip.locked { opacity: 0.5; cursor: not-allowed; }
.type-chip.locked:hover { border-color: var(--border); color: var(--text-secondary); }
.type-chip.locked.active:hover { background: var(--brand); color: #fff; }

/* 中间搜索栏（题干关键词 + 已勾选数） */
.bank-search-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.bank-search {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px;
}
.bank-search::placeholder { color: var(--text-muted); }
.bank-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.bank-check-count { flex-shrink: 0; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

/* 中间分页 */
.bank-pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--border);
}
.bank-pager-btn {
  appearance: none; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 7px; padding: 4px 12px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.bank-pager-btn:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.bank-pager-btn:disabled { color: var(--text-muted); cursor: not-allowed; opacity: 0.55; }
.bank-pager-info { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 中间题目列表 */
.bank-list { flex: 1; overflow-y: auto; padding: 12px; }

.bq-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.bq-item:hover { border-color: var(--brand); box-shadow: var(--shadow-card); }
.bq-item.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.bq-item.checked { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface-2)); }
.bq-item .bq-top { margin-bottom: 6px; }
.bq-check {
  flex-shrink: 0; margin-top: 2px;
  width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer;
}
.bq-item-body { flex: 1; min-width: 0; }
.bq-item-stem {
  font-size: 12.5px; color: var(--text-primary); line-height: 1.55;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bq-item .bank-q-meta { margin-bottom: 0; }

/* 右侧预览 */
.bank-preview { padding: 0 12px 16px; }
.bank-preview .bank-q { margin-bottom: 12px; }
.bank-preview .bank-q:last-child { margin-bottom: 0; }

/* 右侧顶部：已勾选题型统计 */
.bank-pick-stats {
  padding: 4px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.bank-stats-head { display: flex; align-items: baseline; gap: 6px; }
.bank-stats-label { font-size: 12px; color: var(--text-secondary); }
.bank-stats-num { font-size: 24px; font-weight: 700; color: var(--brand); line-height: 1; }
.bank-stats-unit { font-size: 12px; color: var(--text-muted); }
.bank-stats-breakdown {
  margin-top: 6px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; min-height: 18px;
}

/* ==========================================================================
   作业查看详情 · 侧边栏
   ========================================================================== */
.bank-panel--wide { width: 720px; }

.hd-head-main { flex: 1; min-width: 0; }
.hd-badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hd-kicker { font-size: 11.5px; color: var(--text-muted); }
.hd-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.hd-info { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.8; }

.hd-section { margin-bottom: 24px; }
.hd-section:last-child { margin-bottom: 0; }
.hd-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.hd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.hd-section-head .hd-section-title { margin-bottom: 0; }
.hd-search { width: 230px; }
.hd-search .input { padding: 6px 12px; font-size: 12.5px; }
.hd-filter-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* 正确 / 错误占比条（部分-整体：单根堆叠条 + 图例） */
.hd-rate-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--deemph-fill);
}
.hd-rate-good { background: var(--status-good); border-radius: 999px; }
.hd-rate-bad { background: var(--status-critical); border-radius: 999px; }
.hd-rate-label { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; line-height: 1.7; }
.hd-rate-label .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.hd-rate-label b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.hd-stat-line { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; }
.hd-stu-section { margin-top: 18px; }
.hd-stu-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }

/* 学生作答表格 */
.hd-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hd-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hd-tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.hd-tbl td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.hd-tbl tr:last-child td { border-bottom: none; }
.hd-tbl tbody tr.active { background: var(--brand-soft); }
.hd-st-name { display: block; font-weight: 600; color: var(--text-primary); }
.hd-st-no { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hd-tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 学生作答筛选行 */
.hd-head-filters { display: flex; align-items: center; gap: 8px; }
.hd-stats-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select--sm { min-width: 150px; font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; }

/* 逐生展开错题（折叠行） */
.hd-tbl tr.hd-expand-row > td { background: var(--surface-2); padding: 4px 12px 12px; }
.hd-st-wrong { display: flex; flex-direction: column; gap: 8px; }
.hd-st-wrong-head { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.hd-st-wrong-empty { font-size: 12.5px; color: var(--status-good); }
.hd-st-wrong-item {
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-critical);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-1);
}
.hd-st-wrong-item-head { font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.hd-st-wrong-item-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.55; }

/* ==========================================================================
   学生作答明细弹框（逐题对 / 部分对 / 错 + 学生切换 + 分页）
   ========================================================================== */
.hw-stu-modal { max-width: 1120px; }
.hw-stu-body { display: flex; flex-direction: column; gap: 12px; }
.hw-stu-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.hw-stu-switch { display: flex; align-items: center; gap: 8px; }
.hw-stu-select { min-width: 160px; max-width: 240px; }
.hw-stu-stat { font-size: 12.5px; color: var(--text-secondary); }
.hw-stu-stat b { color: var(--text-primary); }
.hw-stu-list { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.hw-stu-main { display: flex; align-items: stretch; gap: 16px; min-height: 0; }
.hw-stu-question { flex: 1; min-width: 0; overflow-y: auto; max-height: 60vh; padding-right: 4px; }
.hw-stu-nums { width: 208px; flex-shrink: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); padding-left: 14px; }
.hw-stu-nums-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.hw-stu-nums-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; overflow-y: auto; max-height: 60vh; padding-right: 2px; }
.hw-stu-num {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hw-stu-num:hover { border-color: var(--brand); color: var(--brand); }
.hw-stu-num.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); font-weight: 600; }
.hw-stu-num.correct { border-left: 3px solid var(--status-good); }
.hw-stu-num.partial { border-left: 3px solid var(--status-warning); }
.hw-stu-num.wrong { border-left: 3px solid var(--status-critical); }
.hw-stu-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-1);
}
.hw-stu-q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hw-stu-q-no { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.hw-stu-q-meta { font-size: 12px; color: var(--text-muted); }
.hw-stu-q-status { margin-left: auto; }
.hw-stu-q-stem { font-size: 13px; color: var(--text-primary); line-height: 1.6; margin-bottom: 10px; }
.hw-stu-q-opts { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.hw-stu-q-ans {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12.5px; color: var(--text-secondary);
  padding-top: 8px; border-top: 1px dashed var(--border);
}
.hw-stu-q-ans b { color: var(--text-primary); }
.hw-stu-q-ans .ref { color: var(--status-good); }
.hw-stu-q-ans .sa { color: var(--brand); }
.hw-stu-q-fig { margin: 4px 0 10px; }
.hw-stu-q-fig img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.hw-stu-q-steps { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.hw-stu-q-steps-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.hw-stu-q-steps-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.hw-stu-q-step-title { font-weight: 600; color: var(--brand); margin-right: 6px; }
.hw-stu-q-step-body { color: var(--text-secondary); line-height: 1.6; }
.hw-stu-empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.hw-stu-foot { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hw-stu-pos { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* 错题详情 */
.hd-wrong-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.hd-wrong-q:last-child { margin-bottom: 0; }
.hd-wrong-q-head { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.hd-wrong-q-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.55; }
.hd-wrong-who { margin-top: 8px; font-size: 12px; color: var(--status-critical); line-height: 1.9; }
.hd-chip {
  display: inline-block;
  font-size: 11.5px;
  color: var(--status-critical);
  background: color-mix(in srgb, var(--status-critical) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-critical) 30%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  margin: 0 4px 4px 0;
}
.hd-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 24px 0;
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
}

/* 知识点分析（答题概况内） */
.hd-know-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-1);
  margin-bottom: 8px;
}
.hd-know-accent { flex: 0 0 auto; width: 4px; height: 34px; border-radius: 999px; }
.hd-know-accent-good { background: var(--status-good); }
.hd-know-accent-mid { background: var(--status-warning); }
.hd-know-accent-low { background: var(--status-critical); }
.hd-know-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hd-know-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.hd-know-nos { font-size: 12px; color: var(--text-muted); }
.hd-know-visual { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; flex: 0 0 210px; }
.hd-know-bar { display: flex; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; background: var(--deemph-fill); }
.hd-know-bar-good { background: var(--status-good); }
.hd-know-bar-bad { background: var(--status-critical); }
.hd-know-rates { display: flex; gap: 12px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hd-know-good { color: var(--status-good); }
.hd-know-bad { color: #c0392b; }

.hd-know-sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 10px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  border-radius: 4px;
  margin-bottom: 10px;
}

.hd-common-wrong { margin-top: 16px; }
.hd-common-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.hd-common-stem {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hd-common-rate { display: flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 12.5px; color: var(--text-secondary); }
.hd-common-rate input {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-primary);
  background: var(--surface-1);
}

/* ==========================================================================
   作业详情 · 逐题分析
   ========================================================================== */
.hd-perq-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hd-perq-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hd-perq-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.hd-perq-chip--critical {
  border-color: color-mix(in srgb, var(--status-critical) 24%, transparent);
  background: color-mix(in srgb, var(--status-critical) 8%, transparent);
  color: var(--status-critical);
}
.hd-perq-chip--brand {
  border-color: color-mix(in srgb, var(--brand) 24%, transparent);
  background: var(--brand-soft);
  color: var(--brand);
}
.hd-perq-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
}
.hd-perq-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.hd-perq-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.hd-perq-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.hd-perq-table tr:last-child td { border-bottom: none; }
.hd-perq-table tbody tr:hover td { background: var(--brand-soft); }
.hd-perq-info { margin-left: 4px; color: var(--text-muted); font-size: 11px; cursor: help; }
.hd-perq-no { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-perq-q { display: flex; align-items: flex-start; gap: 6px; min-width: 260px; }
.hd-perq-q .type-tag { flex-shrink: 0; margin-top: 1px; }
.hd-perq-stem {
  color: var(--text-primary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hd-perq-rate { display: flex; flex-direction: column; gap: 5px; min-width: 68px; }
.hd-perq-rate-val {
  color: var(--status-good);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hd-perq-rate-bar {
  display: block;
  width: 62px;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border);
}
.hd-perq-rate-bar i { display: block; height: 100%; border-radius: 2px; background: var(--status-good); }
.hd-perq-diff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-right: 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.hd-perq-diff--easy { background: color-mix(in srgb, var(--status-good) 12%, transparent); color: var(--status-good); }
.hd-perq-diff--mid { background: color-mix(in srgb, var(--status-warning) 16%, transparent); color: #b7791f; }
.hd-perq-diff--hard { background: color-mix(in srgb, var(--status-critical) 10%, transparent); color: var(--status-critical); }
.hd-perq-diff-val { font-variant-numeric: tabular-nums; }
.hd-perq-wrong { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-perq-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.hd-perq-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--status-good);
  cursor: pointer;
}
.hd-perq-link:hover { text-decoration: underline; }
.hd-perq-link--review { color: var(--brand); }
.hd-perq-must-tag {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 1px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--status-critical) 10%, transparent);
  color: var(--status-critical);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

/* 逐题「查看答题」弹框 */
.hd-q-answer-modal { max-width: 860px; max-height: 88vh; }
.hdqa-stem {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 14px;
}
.hdqa-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hdqa-stats .hd-perq-chip { font-size: 12.5px; }
.hdqa-section { margin-top: 16px; }
.hdqa-section-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.hdqa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hdqa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-1);
  font-size: 12.5px;
  color: var(--text-primary);
}
.hdqa-chip--wrong {
  border-color: color-mix(in srgb, var(--status-critical) 22%, transparent);
  background: color-mix(in srgb, var(--status-critical) 6%, transparent);
}
.hdqa-chip--right {
  border-color: color-mix(in srgb, var(--status-good) 22%, transparent);
  background: color-mix(in srgb, var(--status-good) 6%, transparent);
}
.hdqa-no { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hdqa-empty { font-size: 12.5px; color: var(--text-muted); }

/* ==========================================================================
   错题本（mb）
   ========================================================================== */
.mb-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 16px;
  border-bottom: 1px solid var(--border);
}
.mb-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: -1px;
}
.mb-tab:hover { color: var(--text-primary); }
.mb-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.mb-kpis { margin-bottom: 16px; }

.mb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mb-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.mb-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.mb-know {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 999px;
  padding: 1px 9px;
}
.mbk-hot {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--status-critical);
  background: color-mix(in srgb, var(--status-critical) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-critical) 40%, transparent);
  border-radius: 999px;
  padding: 1px 9px;
}
.mbk-student-input {
  min-width: 148px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.mbk-student-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mb-type {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--deemph-fill);
  border-radius: 6px;
  padding: 1px 7px;
}
.mb-src { font-size: 12px; color: var(--text-muted); }
.mb-stem {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 10px;
}
.mb-who { font-size: 12px; color: var(--status-critical); line-height: 1.9; }
.mb-chip {
  display: inline-block;
  font-size: 11.5px;
  color: var(--status-critical);
  background: color-mix(in srgb, var(--status-critical) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-critical) 30%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  margin: 0 4px 4px 0;
}
.mb-occur {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.mb-rec {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-serious);
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--status-serious) 5%, transparent);
}
.mb-rec-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.mb-rec-item {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 2px 0;
}
.mb-sug {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.mb-options {
  margin: 2px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mb-option {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mb-answer {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-strong);
  padding: 10px 2px 8px;
}
.mb-video { margin-top: 10px; }
.mb-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mb-video-btn:hover { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.mb-video-btn.active { color: var(--text-primary); background: var(--surface-2); }
.mb-video-dur { font-weight: 400; opacity: 0.75; }
.mb-player {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f1220;
}
.mb-player-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e8eaf2;
  cursor: pointer;
}
.mb-player-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 20px;
  color: #0f1220;
  background: #e8eaf2;
  border-radius: 50%;
}
.mb-player-cap { font-size: 13px; opacity: 0.85; }
.mb-more {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ==========================================================================
   考情概览（成绩档位）
   ========================================================================== */
.kb-bands {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.kb-band {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.kb-band.kb-excellent { border-left-color: var(--status-good); }
.kb-band.kb-good { border-left-color: var(--brand); }
.kb-band.kb-pass { border-left-color: var(--status-serious); }
.kb-band.kb-fail { border-left-color: var(--status-critical); }
.kb-band-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.kb-band-range { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.kb-band-num { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-top: 8px; line-height: 1; }
.kb-band-unit { font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.kb-band-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.kb-crit-list { display: flex; flex-direction: column; gap: 10px; }
.kb-crit-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.kb-crit { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1080px; }
.kb-crit th, .kb-crit td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.kb-crit thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.kb-crit tbody tr:last-child td { border-bottom: none; }
.kb-row { cursor: pointer; transition: background 0.15s; }
.kb-row:hover, .kb-row:focus-visible { background: var(--surface-2); outline: none; }
.kb-row-band { white-space: nowrap; }
.kb-row-stu { min-width: 132px; }
.kb-row-name { font-weight: 600; color: var(--text-primary); }
.kb-row-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.kb-row-score { font-weight: 700; color: var(--text-primary); }
.kb-row-exam { font-weight: 600; color: var(--text-primary); }
.kb-row-gap { color: var(--status-critical); font-weight: 600; white-space: nowrap; }
.kb-row-trend { font-weight: 600; white-space: nowrap; }
.trend-up { color: var(--status-good); }
.trend-down { color: var(--status-critical); }
.trend-flat { color: var(--text-muted); }
.kb-row-lose { color: var(--status-serious); }
.kb-row-attack { color: var(--brand); font-weight: 600; }
.kb-row-advice { white-space: nowrap; }
.kb-advice-tag { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 10px; }
.kb-advice-attn { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); }
.kb-advice-var { color: var(--brand); background: var(--brand-soft); }
.kb-advice-keep { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.kb-more {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.kb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 0 2px;
}
.kb-pager-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.kb-pager-btn:hover:not(:disabled) {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.kb-pager-btn:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.55;
}
.kb-pager-info {
  font-size: 12.5px;
  color: var(--text-muted);
  min-width: 88px;
  text-align: center;
}

/* 班级共性「钉子户」错题表 */
.kb-stubborn { display: flex; flex-direction: column; gap: 10px; }
.kb-stubborn-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.kb-stub { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.kb-stub th, .kb-stub td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.kb-stub thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.kb-stub tbody tr:last-child td { border-bottom: none; }
.kb-stub-stem { min-width: 320px; max-width: 440px; }
.kb-stub-text { color: var(--text-primary); line-height: 1.6; }
.kb-stub-src { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.kb-stub-wrong { color: var(--status-critical); font-weight: 700; white-space: nowrap; }
.kb-stub-know { color: var(--status-serious); font-weight: 600; }
.kb-stub-cause { color: var(--text-secondary); }
.kb-stub-advice { color: var(--brand); font-weight: 600; min-width: 180px; }

/* 班级学情：知识点掌握 + 钉子户错题 两列布局 */
.kb-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: stretch;
}
.kb-duo-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.kb-know-wrap { flex: 1; display: flex; flex-direction: column; }
.kb-stubborn { flex: 1; }
.kb-stubborn-scroll { flex: 1; }
.kb-col-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-col-title .bar {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--brand);
  flex-shrink: 0;
}
.kb-col-title .hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.kb-know-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  flex: 1;
}

/* 高频音词（英语发音词汇） */
.ph-stu-list, .ph-cls-list { display: flex; flex-direction: column; gap: 10px; }
.ph-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.ph-crit { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 540px; }
.ph-crit th, .ph-crit td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ph-crit thead th, .ph-cls thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.ph-crit tbody tr:last-child td, .ph-cls tbody tr:last-child td { border-bottom: none; }
.ph-row { cursor: pointer; transition: background 0.15s; }
.ph-row:hover, .ph-row:focus-visible { background: var(--surface-2); outline: none; }
.ph-row-stu { min-width: 120px; }
.ph-row-name { font-weight: 600; color: var(--text-primary); }
.ph-row-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ph-row-words { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.ph-chip {
  font-size: 11.5px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
}
.ph-cls { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.ph-cls th, .ph-cls td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ph-cls-word { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.ph-cls-zh { color: var(--text-secondary); }
.ph-cls-src { color: var(--text-muted); white-space: nowrap; }

.ph-diag-words { display: flex; flex-direction: column; gap: 8px; }
.ph-diag-word {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 8px 12px;
}
.ph-diag-word-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ph-diag-word-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ph-diag-word-count { font-size: 12px; color: var(--status-critical); font-weight: 600; }
.ph-diag-word-wrong { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 班级高频音词：Excel 上传 + 进度条 */
.ph-cls-upload { margin-left: auto; }
.ph-upload-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
}
.ph-upload-track {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden;
}
.ph-upload-fill {
  height: 100%; width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.18s ease;
}
.ph-upload-pct {
  font-size: 12px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; min-width: 40px; text-align: right;
}

/* ==================== 答题扫描记录 ==================== */
.scan-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); font-size: 13px;
}
.scan-sum-title { font-weight: 600; color: var(--text-primary); }
.scan-sum-cls {
  color: var(--status-critical); font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--status-critical) 12%, transparent);
}
.scan-sum-item { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.scan-sum-total { margin-left: auto; font-weight: 600; color: var(--text-primary); }

.scan-scanner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 12px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); font-size: 13px;
}
.scan-scanner-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-primary); }
.scan-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.scan-dot--on { background: var(--status-good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-good) 20%, transparent); }
.scan-scanner-note { color: var(--text-secondary); flex: 1; min-width: 200px; }
.scan-rescan-btn { margin-left: auto; }

.scan-progress-line {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; font-size: 13px;
}
.scan-progress-label { color: var(--text-primary); font-weight: 500; }

.scan-ai {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1);
}
.scan-ai-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.scan-ai-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.scan-ai-nums { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.scan-progress-track {
  height: 8px; border-radius: 999px; margin-top: 10px;
  background: var(--surface-2); overflow: hidden;
}
.scan-progress-fill { height: 100%; background: var(--status-good); border-radius: 999px; transition: width 0.18s ease; }
.scan-ai-done { margin-top: 10px; font-size: 12.5px; color: var(--status-good); }

.scan-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; margin-bottom: 8px;
}
.scan-list-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.scan-list-tools { display: flex; align-items: center; gap: 10px; }
.scan-search { width: 220px; }
.scan-status-filter { min-width: 150px; }

.scan-table { min-width: 980px; }
.scan-table td { vertical-align: middle; }
.scan-id { font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: 12px; }
.scan-sheets { display: flex; gap: 8px; align-items: center; }
.scan-sheet-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.scan-sheet-img { width: 72px; height: 94px; border: 1px solid var(--border); border-radius: 6px; background: #fbfaf7; box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08); display: block; }
.scan-sheet-tag { font-size: 11px; color: var(--text-secondary); }
.scan-statuses { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.scan-status-row { display: flex; align-items: center; gap: 6px; }
.scan-status-side { width: 18px; font-size: 12px; color: var(--text-secondary); }
.scan-rec { color: var(--text-secondary); white-space: normal; max-width: 240px; }
.scan-rec-fail { color: var(--status-critical); font-weight: 500; }
.scan-op-muted { color: var(--text-muted); }
.scan-empty { text-align: center; color: var(--text-muted); padding: 22px 0; }

/* ==================== 作业录入（录入历史 + 上传解析） ==================== */
.entry-head { align-items: center; }
.entry-modal {
  width: calc(100vw - 288px);
  max-width: none;
  height: calc(100vh - 48px);
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.entry-modal .modal-head { flex-shrink: 0; }
.entry-modal .modal-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
#entry-view-upload { flex: 1; min-height: 0; overflow-y: auto; }
#entry-view-history { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.entry-tabs { display: flex; gap: 4px; }
.entry-tab {
  appearance: none; background: transparent; border: none;
  padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s;
}
.entry-tab:hover { color: var(--text-primary); }
.entry-tab.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* 录入历史：左侧选择作业 + 右侧勾选题目 */
.entry-records-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; flex-shrink: 0; }
.entry-records-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.entry-records-hint { font-size: 12.5px; color: var(--text-muted); }
.entry-history-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.entry-history-left,
.entry-history-right {
  min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: hidden;
}
.entry-history-sub {
  padding: 10px 14px; font-weight: 600; font-size: 13px;
  color: var(--text-primary); border-bottom: 1px solid var(--border);
  background: var(--surface-1); flex-shrink: 0;
}
.entry-hw-list { flex: 1; overflow-y: auto; padding: 10px; }
.entry-hw-item {
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; margin-bottom: 6px; transition: all 0.15s; background: var(--surface-1);
}
.entry-hw-item:hover { border-color: var(--brand); }
.entry-hw-item.active { background: var(--brand-soft); border-color: var(--brand); }
.entry-hw-item-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.entry-hw-item-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-secondary); margin: 3px 0 6px; }
.entry-hw-questions { flex: 1; overflow-y: auto; padding: 10px; }
.entry-hw-q-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-1); margin-bottom: 8px;
}
.entry-hw-q-check { margin-top: 3px; flex-shrink: 0; }
.entry-hw-q-no { font-size: 12.5px; font-weight: 700; color: var(--brand); flex-shrink: 0; }
.entry-hw-q-body { flex: 1; min-width: 0; }
.entry-hw-q-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.6; }
.entry-hw-q-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.entry-history-actions { padding: 12px 14px; display: flex; gap: 10px; border-top: 1px solid var(--border); background: var(--surface-1); flex-shrink: 0; }
.entry-records-empty { padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 审核：待审核录入作业列表 */
#entry-view-review { flex: 1; min-height: 0; overflow-y: auto; }
.entry-review-list { display: flex; flex-direction: column; gap: 10px; }
.entry-review-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-1);
}
.entry-review-info { flex: 1; min-width: 0; }
.entry-review-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.entry-review-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.entry-review-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 录入（上传）单行布局 */
.entry-upload { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.entry-explain { flex-basis: 100%; font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.entry-field { display: flex; align-items: center; gap: 10px; }
.entry-field-row { display: flex; align-items: center; gap: 8px; }
.entry-file-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.entry-req { color: var(--status-critical); }
.entry-file-pick {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2);
  font-size: 13px; font-weight: 500; color: var(--text-primary); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.entry-file-pick:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.entry-file-pick input[type="file"] { display: none; }
.entry-file-name { font-size: 12.5px; color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-field .select { max-width: 220px; }
.entry-actions { display: flex; align-items: center; gap: 10px; }
.entry-hint { flex-basis: 100%; font-size: 12px; color: var(--text-muted); margin: 0; }

.entry-result {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 20px;
  padding: 14px; border: 1px solid color-mix(in srgb, var(--status-good) 40%, transparent);
  border-radius: var(--radius); background: color-mix(in srgb, var(--status-good) 10%, transparent);
}
.entry-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.entry-result-line { font-size: 13px; color: var(--status-good); flex: 1; }
.entry-result-actions { display: flex; gap: 8px; }
.entry-parsed-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }

/* 解析后的试题卡片（可编辑） */
.entry-pq {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.entry-pq-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entry-pq-no { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.entry-pq-type {
  font-size: 11px; color: var(--brand); background: var(--brand-soft);
  border-radius: 4px; padding: 1px 7px;
}
.entry-pq-score { font-size: 12px; color: var(--text-secondary); }
.entry-pq-diff { font-size: 11.5px; color: #b7791f; }
.entry-pq-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.6; margin-top: 6px; white-space: pre-wrap; }
.entry-pq-options { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.entry-pq-option { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.entry-pq-imgs { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.entry-pq-img { width: 96px; border: 1px solid var(--border); border-radius: 6px; display: block; }
.entry-pq-insert { margin-top: 8px; }
.entry-pq-field { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.entry-pq-field-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.entry-pq-field textarea, .entry-pq-field input[type="text"] {
  width: 100%; box-sizing: border-box; font-size: 12.5px; line-height: 1.6;
  padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-1); color: var(--text-primary); font-family: inherit;
}
.entry-pq-field textarea { resize: vertical; min-height: 52px; }
.entry-pq-steps { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.entry-pq-steps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry-pq-steps-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.entry-pq-steps-total { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.entry-step { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.entry-step-no { font-size: 12px; font-weight: 600; color: var(--brand); flex-shrink: 0; }
.entry-step-desc { flex: 1; }
.entry-step-desc input[type="text"] {
  width: 100%; box-sizing: border-box; font-size: 12.5px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary);
}
.entry-step-score { width: 62px; flex-shrink: 0; }
.entry-step-score input[type="number"] {
  width: 100%; box-sizing: border-box; font-size: 12.5px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary);
}

/* 从试题文件裁剪图片 */
.entry-crop-modal { width: 640px; max-width: 92vw; }
.entry-crop-stage {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: auto; max-height: 62vh;
}
.entry-crop-svg { display: block; width: 100%; max-width: 460px; height: auto; cursor: crosshair; touch-action: none; }
.entry-crop-sel { fill: rgba(42, 120, 214, 0.12); stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; }
.entry-crop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* 录题页 · 拆解题目 */
.ez-split-modal { width: 940px; max-width: 94vw; }
.ez-split-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.ez-split-source { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ez-split-source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-secondary); }
.ez-split-source-name { font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ez-split-pager { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ez-split-pager .btn { padding: 3px 10px; font-size: 12px; }
.ez-split-stage {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: auto; max-height: 58vh; min-height: 320px;
}
.ez-split-stage img, .ez-split-stage svg { display: block; max-width: 100%; height: auto; }
.ez-split-text {
  width: 100%; margin: 0; padding: 16px 18px; border-radius: var(--radius);
  background: #fff; font-family: inherit; font-size: 12.5px; line-height: 1.85;
  color: var(--text-primary); white-space: pre-wrap; word-break: break-word;
}
.ez-split-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ez-split-panel-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; }
.ez-split-count { font-size: 12px; color: var(--text-muted); }
.ez-split-items { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: 58vh; }
.ez-split-item { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-1); }
.ez-split-item.is-off { opacity: .5; }
.ez-split-item-main { min-width: 0; }
.ez-split-item-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.ez-split-item-text { margin-top: 4px; font-size: 12.5px; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.ez-split-empty { padding: 24px 12px; text-align: center; font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 900px) {
  .entry-modal { width: auto; }
  .entry-history-grid { grid-template-columns: 1fr; }
}

/* 分析报告 */
.rg-kpis { grid-template-columns: repeat(5, 1fr); }
.rg-trend { margin-top: 4px; }
.rg-trend svg { width: 100%; height: auto; display: block; }

/* 分析报告生成模态框 */
.rg-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.rg-form-row { display: flex; align-items: center; gap: 12px; }
.rg-label { flex-shrink: 0; width: 64px; font-size: 12.5px; color: var(--text-secondary); }
.rg-form-row .select { flex: 1; }
.rg-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rg-mode-btn {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.rg-mode-btn + .rg-mode-btn { border-left: 1px solid var(--border); }
.rg-mode-btn:hover { color: var(--text-primary); background: var(--surface-2); }
.rg-mode-btn.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.rg-seg { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rg-seg-btn {
  padding: 6px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rg-seg-btn.active { background: var(--brand); color: #fff; }
.rg-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.rg-preview {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rg-preview-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.rg-preview-scope { font-size: 12px; color: var(--text-muted); }
.rg-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rg-preview-head-text { flex: 1; min-width: 0; }
.rg-pdf-btn { flex-shrink: 0; }
.rg-preview-sec {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 10px 14px;
}
.rg-preview-sec.rg-preview-cb { border-left-color: var(--status-serious); }
.rg-preview-sec-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.rg-preview-list { display: flex; flex-direction: column; gap: 4px; }
.rg-preview-item { font-size: 12.5px; color: var(--text-secondary); }
.rg-preview-advice { font-size: 13px; color: var(--text-primary); line-height: 1.7; }
.rg-preview-advice-item { font-size: 13px; color: var(--text-primary); line-height: 1.7; }
.rg-preview-item.rg-preview-both { color: var(--status-serious); font-weight: 600; }

/* 清零趋势三栏布局（左图 | 分隔条 | 右表），分隔条可拖拽调整左右宽度 */
.rg-trend-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 16px minmax(0, 1fr);
  gap: 0;
  margin-top: 6px;
  align-items: start;
}
.rg-trend-resizer {
  align-self: stretch;
  cursor: col-resize;
  position: relative;
  min-height: 300px;
  user-select: none;
}
.rg-trend-resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: var(--border-strong);
  transition: background 0.15s;
}
.rg-trend-resizer:hover::before,
body.rg-trend-resizing .rg-trend-resizer::before { background: var(--brand); }
body.rg-trend-resizing { cursor: col-resize; user-select: none; }
.rg-trend-resizer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 28px;
  border-radius: 5px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
}
body.rg-trend-resizing .rg-trend-resizer::after { border-color: var(--brand); }
.rg-trend-panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}
.rg-subtitle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rg-trend-chart .rg-trend { margin-top: 2px; }

/* 作业错题清零：核心指标卡片 + 左右两栏布局（无拖拽分隔条） */
.hwc-kpis { margin-top: 16px; }
.hwc-trend-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 6px;
  align-items: start;
}
.hwc-list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hwc-list-box .st-table-wrap { max-height: 520px; overflow: auto; }
.hwc-list-table { min-width: 1180px; }
.hwc-row-ops { white-space: nowrap; }
.hwc-row-ops .st-link-btn + .st-link-btn { margin-left: 10px; }

/* 作业进度弹框：逐生清零进度 */
.hwc-progress-modal { width: min(880px, calc(100vw - 96px)); }
.hwc-progress-box .st-table-wrap { max-height: 62vh; overflow: auto; }
.hwc-progress-table { min-width: 720px; }
.hwc-prog-name { font-weight: 600; color: var(--text-primary); }
.hwc-prog-no { margin-left: 8px; font-size: 12px; color: var(--text-muted); }
.hwc-prog-bar {
  display: inline-block;
  vertical-align: middle;
  width: 120px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--deemph-fill);
  overflow: hidden;
}
.hwc-prog-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.hwc-prog-num { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.hwc-stu-table { min-width: 720px; width: auto; }
.hwc-stu-table th, .hwc-stu-table td { padding: 8px 10px; }
.hw-filter-bar .rg-date { width: 128px; }

/* 作业详情弹框：左侧题目 / 右侧未做学生 */
.hwc-detail-modal { width: min(1120px, calc(100vw - 96px)); }
.hwc-detail-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.hwc-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
}
.hwc-detail-sub { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.hwc-detail-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 4px;
}
.hwc-detail-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--surface-2);
}
.hwc-detail-q-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.hwc-detail-q-no { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.hwc-detail-q-kind {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
}
.hwc-detail-q-kind.is-orig { color: var(--brand); background: var(--brand-soft); }
.hwc-detail-q-kind.is-var { color: var(--status-good); background: rgba(12, 163, 12, 0.12); }
.hwc-detail-q-type { font-size: 11px; color: var(--text-muted); }
.hwc-detail-q-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.6; }
.hwc-detail-students {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 4px;
}
.hwc-detail-stu {
  font-size: 12.5px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}
.hwc-detail-empty { font-size: 12.5px; color: var(--text-muted); }

/* 学生错题弹框 */
.hwc-stu-modal { width: min(720px, calc(100vw - 96px)); }
.hwc-stu-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.hwc-stu-wrongs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 4px;
}
.hwc-stu-wrong {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-1);
}
.hwc-stu-wrong-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hwc-stu-wrong-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
}
.hwc-stu-wrong-no { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.hwc-stu-wrong-type { font-size: 11.5px; color: var(--text-muted); }
.hwc-stu-wrong-hw { font-size: 11.5px; color: var(--text-secondary); margin-left: auto; }
.hwc-stu-wrong-stem { font-size: 13px; color: var(--text-primary); line-height: 1.6; margin-bottom: 10px; }
.hwc-stu-wrong-fig { margin-bottom: 10px; }
.hwc-stu-wrong-fig img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.hwc-stu-wrong-ans { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.hwc-stu-wrong-ans .sa { color: var(--brand); }
.hwc-stu-wrong-ans .ref { color: var(--status-good); }

/* 考试错题清零：学生列表 + 清零详情弹框 */
.exc-list-box .st-table-wrap { max-height: 520px; overflow: auto; }
.exc-list-table { min-width: 1240px; }
.exc-list-table th, .exc-list-table td { padding: 8px 10px; }
.exc-detail-modal { width: min(1080px, calc(100vw - 96px)); }
.exc-detail-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.exc-detail-banner {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.exc-detail-banner.is-cleared { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 10%, transparent); }
.exc-detail-banner.is-not { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 16%, transparent); }
.exc-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.exc-detail-sub { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.exc-detail-qs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}
.exc-detail-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--surface-2);
}
.exc-detail-q.is-ok { border-left: 3px solid var(--status-good); }
.exc-detail-q.is-wrong { border-left: 3px solid var(--status-warning); }
.exc-detail-q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.exc-detail-q-no { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.exc-detail-q-type { font-size: 11px; color: var(--text-muted); }
.exc-detail-q-res {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
}
.exc-detail-q.is-ok .exc-detail-q-res { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.exc-detail-q.is-wrong .exc-detail-q-res { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.exc-detail-q-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.6; }
.exc-detail-q-fig { margin-top: 8px; }
.exc-detail-q-fig img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* 时间查询 */
.rg-date-range { display: flex; align-items: center; gap: 6px; }
.rg-date {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.rg-date:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rg-date-sep { font-size: 12.5px; color: var(--text-muted); }

/* 班级顽固错题 */
.rg-trend-stubborn .st-table-wrap { max-height: 336px; overflow: auto; }
.rg-stubborn-table { min-width: 500px; }
.rg-stubborn-stem { white-space: normal; min-width: 150px; max-width: 240px; line-height: 1.5; }
.rg-stubborn-src { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.rg-stubborn-mastery { font-size: 11px; color: var(--brand); margin-top: 3px; }
.rg-stubborn-cause { white-space: normal; min-width: 90px; max-width: 150px; line-height: 1.5; }

/* 清零之星 */
.rg-stars { display: flex; flex-direction: column; gap: 12px; }
.rg-star-row { display: flex; align-items: center; gap: 10px; }
.rg-star-rank {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 50%;
}
.rg-star-rank.rg-star-top { background: transparent; font-size: 18px; }
.rg-star-info { flex: 1; min-width: 0; }
.rg-star-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-star-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.rg-star-bar { flex-shrink: 0; width: 64px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rg-star-bar-fill { height: 100%; background: var(--series-1); border-radius: 999px; }
.rg-star-count { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--brand); }

/* 学生清零明细 */
.rg-clear-tabs { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.rg-clear-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rg-clear-tab:hover { color: var(--brand); border-color: var(--brand); }
.rg-clear-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rg-clear-search {
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-primary);
  width: 180px;
  transition: border-color 0.15s;
}
.rg-clear-search::placeholder { color: var(--text-muted); }
.rg-clear-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rg-clear-export { margin-left: 4px; padding: 6px 14px; font-size: 12.5px; }
.rg-clear-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.rg-page-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.rg-page-btn:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.rg-page-btn:disabled { opacity: 0.45; cursor: default; }
.rg-page-info { font-size: 12.5px; color: var(--text-muted); }
.rg-page-jump { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.rg-page-input {
  width: 56px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-primary);
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
}
.rg-page-input::-webkit-outer-spin-button,
.rg-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rg-page-input[type='number'] { -moz-appearance: textfield; }
.rg-page-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 学生作答页面：逐题闯关卡片 */
.ans-list { display: flex; flex-direction: column; gap: 12px; }
.ans-empty { text-align: center; color: var(--text-muted); padding: 28px 12px; font-size: 13px; }
.ans-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-1);
  overflow: hidden;
}
.ans-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.ans-head-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ans-lv { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.ans-type {
  display: inline-block;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  color: var(--brand); background: var(--brand-soft);
}
.ans-head-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ans-verdict { font-size: 12.5px; font-weight: 700; }
.ans-stars { color: #f5a623; font-weight: 600; letter-spacing: 1px; }
.ans-body { padding: 12px 14px; }
.ans-stem { display: flex; gap: 12px; align-items: flex-start; }
.ans-fig {
  flex-shrink: 0; width: 168px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 4px;
}
.ans-fig .q-fig { width: 100%; height: auto; display: block; }
.ans-stem-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary); line-height: 1.65; white-space: normal; }
.ans-answer { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.ans-answer-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.ans-photo {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--brand); border-radius: 8px; background: var(--brand-soft);
  color: var(--brand); font-size: 12px; padding: 8px 14px;
}
.ans-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px; color: var(--text-secondary);
}
.ans-foot-item { display: inline-flex; align-items: center; gap: 4px; }
.ans-foot-item b { color: var(--brand); font-weight: 700; }
.ans-foot-pass { color: var(--status-good); font-weight: 700; }
.rg-clear-list { margin-top: 2px; }
.rg-clear-table { min-width: 1180px; }
.st-td-empty { text-align: center; color: var(--text-muted); padding: 20px 12px; }
.rg-clear-meta { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-top: 1px; }
.rg-rate-high { color: var(--status-good); font-weight: 600; }
.rg-rate-mid { color: #b7791f; font-weight: 600; }
.rg-rate-low { color: var(--status-critical); font-weight: 600; }
.rg-clear-summary { max-height: 76px; overflow-y: auto; max-width: 340px; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.rg-clear-sum-item { font-size: 11.5px; color: var(--text-secondary); white-space: normal; line-height: 1.5; }
.rg-clear-sum-item b { color: var(--status-warning); font-weight: 600; }
.rg-clear-done { color: var(--status-good); font-size: 12px; }
.rg-clear-stem { white-space: normal; min-width: 260px; max-width: 420px; line-height: 1.5; }
.rg-kind { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }
.rg-kind--must { color: var(--brand); background: var(--brand-soft); }
.rg-kind--rec { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 16%, transparent); }

/* 分析报告生成：作业/考试内容双列选择 */
.rg-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.rg-col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 10px 12px;
  min-width: 0;
}
.rg-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rg-col-hint { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.rg-col-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.rg-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rg-item:hover { border-color: var(--brand); }
.rg-item:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.rg-item-check { margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.rg-item-body { min-width: 0; }
.rg-item-stem { font-size: 12.5px; color: var(--text-primary); line-height: 1.5; }
.rg-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 1080px) {
  .rg-kpis { grid-template-columns: repeat(3, 1fr); }
  .rg-trend-grid { grid-template-columns: 1fr; }
  .rg-trend-resizer { display: none; }
  .rg-content { grid-template-columns: 1fr; }
  .hwc-trend-grid { grid-template-columns: 1fr; }
  .hwc-detail-grid { grid-template-columns: 1fr; }
  .exc-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rg-kpis { grid-template-columns: repeat(2, 1fr); }
  .rg-form-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .rg-label { width: auto; }
}

.kb-know { width: 100%; border-collapse: collapse; font-size: 13px; }
.kb-know th, .kb-know td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.kb-know thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
}
.kb-know-name { font-weight: 600; color: var(--text-primary); }
.kb-know-wrong { color: var(--status-critical); font-weight: 600; }
.kb-know-cause { color: var(--text-secondary); }

.badge.kb-badge-excellent { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.badge.kb-badge-good { color: var(--brand); background: var(--brand-soft); }
.badge.kb-badge-pass { color: var(--status-serious); background: color-mix(in srgb, var(--status-serious) 14%, transparent); }
.badge.kb-badge-fail { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); }

.kb-diag-score {
  display: flex;
  align-items: baseline;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 6px;
}
.kb-diag-scoreval { font-size: 34px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.kb-diag-scoreunit { font-size: 14px; font-weight: 400; color: var(--text-secondary); margin-left: 2px; }
.kb-diag-scoremeta { font-size: 12.5px; color: var(--text-secondary); }
.kb-diag-weak { display: flex; flex-direction: column; gap: 8px; }
.kb-diag-weak-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-serious);
  border-radius: 8px;
  padding: 8px 12px;
}
.kb-diag-weak-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kb-diag-weak-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.kb-diag-weak-count { font-size: 12px; color: var(--status-critical); font-weight: 600; }
.kb-diag-weak-cause { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.kb-diag-mastery { display: flex; flex-direction: column; gap: 10px; }
.kb-diag-mastery-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.kb-diag-mastery-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.kb-diag-mastery-name { font-size: 12.5px; color: var(--text-primary); }
.kb-diag-mastery-pct { font-size: 12px; font-weight: 600; color: var(--status-good); font-variant-numeric: tabular-nums; }
.kb-diag-mastery-pct.is-weak { color: var(--status-serious); }
.kb-diag-mastery-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.kb-diag-mastery-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--status-good);
}
.kb-diag-mastery-fill.is-weak { background: var(--status-serious); }

.kb-diag-advice {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 13.5px;
  color: var(--text-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  z-index: 200;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   数据统计页
   ========================================================================== */
/* 时间粒度分段切换 */
.st-grain {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.st-grain-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 6px;
  cursor: pointer;
}
.st-grain-btn:hover { color: var(--text-primary); }
.st-grain-btn.active {
  background: var(--surface-1);
  color: var(--brand);
  box-shadow: var(--shadow-card);
  font-weight: 600;
}

.st-kpis { margin-top: 16px; }
.st-kpis .kpi { transition: background-color 0.15s, border-color 0.15s; }
.st-kpis .kpi:hover { background: var(--brand-soft); border-color: var(--brand-soft); }

/* 底部功能 Tab */
.st-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
  border-bottom: 1px solid var(--border);
}
.st-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: -1px;
}
.st-tab:hover { color: var(--text-primary); }
.st-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.st-panel { display: flex; flex-direction: column; gap: 16px; }

/* 指标卡组 */
.st-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.st-metric-grid.st-metric-grid-3 { grid-template-columns: repeat(3, 1fr); }
.st-metric {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background-color 0.15s, border-color 0.15s;
}
.st-metric:hover { background: var(--brand-soft); border-color: var(--brand-soft); }
.st-metric-label { font-size: 12px; color: var(--text-secondary); }
.st-metric-value { font-size: 24px; font-weight: 600; color: var(--text-primary); line-height: 1.1; }
.st-metric-unit { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 3px; }
/* 达标率着色：数值按表现分档（绿=达标 / 琥珀=中等 / 橙=偏低 / 红=需干预） */
.st-metric-value--good { color: var(--status-good); }
.st-metric-value--warning { color: #b7791f; }
.st-metric-value--serious { color: var(--status-serious); }
.st-metric-value--critical { color: var(--status-critical); }
.st-metric-value--good .st-metric-unit,
.st-metric-value--warning .st-metric-unit,
.st-metric-value--serious .st-metric-unit,
.st-metric-value--critical .st-metric-unit { color: inherit; }
.st-metric-sub { font-size: 12px; color: var(--text-muted); line-height: 1.2; }
.st-metric-grid.st-metric-grid-4 { grid-template-columns: repeat(4, 1fr); }
.st-metric-grid.st-metric-grid-5 { grid-template-columns: repeat(5, 1fr); }

/* 视频学习：筛选行 + 班级学生 */
.stv-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stv-label { font-size: 12.5px; color: var(--text-secondary); }
.stv-filter .select { min-width: 130px; }
.stv-students-wrap { max-height: 340px; overflow: auto; }

/* 可点击指标卡（下钻原错题） */
.stv-click { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stv-click:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.stv-click-hint { font-size: 11.5px; color: var(--brand); font-weight: 600; }

/* 原错题页面 */
.st-orig-table { min-width: 760px; }
.st-orig-stem { white-space: normal; min-width: 220px; max-width: 380px; line-height: 1.5; }
.st-orig-know { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.st-orig-stu-stem {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}
/* 学生作答：当前题下方展开的明细行 */
.st-orig-detail { background: var(--surface-2); }
.st-orig-detail > td { padding: 0; }
.st-orig-detail-inner {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}
.st-orig-detail-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.st-orig-stu-table { min-width: 640px; }

@media (max-width: 1280px) {
  .st-metric-grid.st-metric-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .st-metric-grid.st-metric-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rg-trend-grid { grid-template-columns: 1fr; }
  .rg-trend-resizer { display: none; }
}

/* 薄弱知识点占比条 */
.st-know-list { display: flex; flex-direction: column; gap: 10px; }
.st-know-row { display: flex; flex-direction: column; gap: 5px; }
.st-know-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-know-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.st-know-ratio { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.st-know-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--deemph-fill);
  overflow: hidden;
}
.st-know-bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--brand);
}

/* 两列布局：知识点占比 + 错因分析 */
.st-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.st-split-col {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.st-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

/* 关键发现 */
.st-find-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.st-find-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.st-find-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.st-find-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 教学建议 */
.st-advice-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-advice-item {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

/* 数据表格 */
.st-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.st-table th,
.st-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-primary);
}
.st-table thead th {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  position: sticky;
  top: 0;
}
.st-table tbody tr:last-child td { border-bottom: none; }
.st-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.st-th-group {
  text-align: center !important;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.st-table--compare { min-width: 1240px; }
.st-td-strong { font-weight: 600; }
.st-td-time { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.st-td-ai { color: var(--text-secondary); max-width: 220px; white-space: normal; }
.st-stars { color: #f5a623; font-weight: 600; letter-spacing: 1px; }

.st-link-btn {
  appearance: none;
  border: none;
  background: none;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.st-link-btn:hover { text-decoration: underline; }

/* 状态徽章（闯关状态） */
.st-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
}
.st-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-status--good { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.st-status--warn { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.st-status--muted { color: var(--text-muted); background: var(--deemph-fill); }

/* 作答对错 */
.st-ok { color: var(--status-good); font-weight: 600; }
.st-no { color: var(--status-critical); font-weight: 600; }

/* 原考试题目 · 各班错率 chips */
.st-cls-rates { display: flex; flex-wrap: wrap; gap: 4px; max-width: 560px; }
.st-cls-rate {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.st-cls-rate--critical { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); }
.st-cls-rate--serious { color: var(--status-serious); background: color-mix(in srgb, var(--status-serious) 14%, transparent); }
.st-cls-rate--warning { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.st-cls-rate--good { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }

.st-table-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* 学生明细抽屉表格 */
.st-detail-wrap { overflow-x: auto; }
.st-detail-wrap .st-table { min-width: 980px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid.kpi-grid-info { grid-template-columns: repeat(2, 1fr); }
  .kb-bands { grid-template-columns: repeat(2, 1fr); }
  .kb-duo { grid-template-columns: 1fr; }
  .st-metric-grid { grid-template-columns: repeat(3, 1fr); }
  .st-metric-grid.st-metric-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { grid-column: 1; }
  .kpi-grid, .kpi-grid.kpi-grid-3, .kpi-grid.kpi-grid-info { grid-template-columns: 1fr; }
  .kb-bands { grid-template-columns: 1fr; }
  .st-metric-grid, .st-metric-grid.st-metric-grid-3 { grid-template-columns: 1fr; }
  .st-split { grid-template-columns: 1fr; }
  .st-find-list { grid-template-columns: 1fr; }
  .modal-lg { width: auto; }
  .modal-lg .form-grid { grid-template-columns: 1fr; }
  .hd-search { width: 100%; }
}

/* ==========================================================================
   题库（入库题目）
   ========================================================================== */
.wh-filter-bar { margin: 4px 0 14px; gap: 12px; }
.wh-filter-bar .select { min-width: 116px; }
.wh-whole-fields {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
#wh-whole-actions {
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  flex-wrap: nowrap;
}
#wh-whole-actions .btn { white-space: nowrap; }
#wh-whole-actions .hw-count {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  white-space: nowrap;
}
#wh-whole-actions #paper-count {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.wh-list { display: flex; flex-direction: column; gap: 12px; }

.wh-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.wh-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wh-tag {
  font-size: 11.5px;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.wh-tag-scope { color: var(--text-secondary); background: var(--surface-2); border: 1px solid var(--border); }
.wh-tag-subject { color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.wh-tag-type { color: var(--text-muted); background: var(--deemph-fill); }
.wh-score { margin-left: auto; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.wh-stem { font-size: 25px; color: var(--text-primary); line-height: 1.6; margin-bottom: 8px; }
.wh-options { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.wh-option {
  font-size: 19px; color: var(--text-primary); line-height: 1.5;
  padding: 6px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
}
.wh-option-letter { font-weight: 700; color: var(--brand); margin-right: 2px; }

.wh-foot { display: flex; align-items: center; gap: 10px; }
.wh-ans-toggle {
  font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
  background: transparent; border: none; padding: 0; cursor: pointer;
}
.wh-ans-toggle:hover { color: var(--brand); }
.wh-review-btn { margin-left: auto; }

.wh-detail { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.wh-answer { font-size: 13px; color: var(--status-good); font-weight: 600; margin-bottom: 8px; }
.wh-analysis { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; }

.wh-more {
  font-size: 12.5px; color: var(--text-muted); text-align: center;
  padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius);
}

/* 讲评抽屉 */
.wr-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.wr-body-inner { display: flex; flex-direction: column; gap: 14px; }
.wr-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.wr-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.3px; margin: 0 0 8px;
}
.wr-stem { font-size: 25px; color: var(--text-primary); line-height: 1.6; }
.wr-answer { font-size: 14px; color: var(--status-good); font-weight: 600; }
.wr-analysis { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.wr-section-review { border-left: 3px solid var(--brand); }

/* 步骤化讲评：进度条 + 单步讲解 + 上一步/下一步 */
.wr-stepper { display: flex; flex-direction: column; gap: 12px; }
.wr-stepper-progress {
  height: 6px; background: var(--deemph-fill);
  border-radius: 999px; overflow: hidden;
}
.wr-stepper-bar {
  height: 100%; width: 0; background: var(--brand);
  border-radius: 999px; transition: width 0.25s ease;
}
.wr-step-body {
  min-height: 92px; padding: 12px 14px;
  background: var(--surface-2); border-radius: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.wr-step-label {
  font-size: 11.5px; font-weight: 600; color: var(--brand);
  letter-spacing: 0.3px;
}
.wr-step-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.wr-step-text { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.wr-stepper-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wr-stepper-nav .btn:disabled { opacity: 0.45; cursor: not-allowed; }

.wr-section-video .mb-video { margin-top: 0; }

/* 视频播放器：进度条 + 时间（模拟播放） */
.mb-player-bar {
  height: 4px; background: rgba(232, 234, 242, 0.18);
  margin: 0 14px; border-radius: 999px; overflow: hidden;
}
.mb-player-progress {
  height: 100%; width: 0; background: var(--brand);
  transition: width 0.2s linear;
}
.mb-player-time {
  padding: 6px 14px 10px; font-size: 11.5px;
  color: rgba(232, 234, 242, 0.72); font-variant-numeric: tabular-nums;
  display: flex; justify-content: space-between;
}

/* 同类推荐题抽屉 */
.rc-list { display: flex; flex-direction: column; gap: 12px; }
.rc-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; background: var(--surface-1);
}
.rc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.rc-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.rc-check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.rc-head .wh-score { margin-left: auto; }
.rc-stem { font-size: 25px; color: var(--text-primary); line-height: 1.6; margin-bottom: 8px; }

/* ==========================================================================
   讲评抽屉 · 头工具区（字号控件 + 关闭） */
.wr-head-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 危险操作按钮（作废等） */
.btn-danger {
  background: color-mix(in srgb, var(--status-critical) 10%, transparent);
  border-color: color-mix(in srgb, var(--status-critical) 45%, transparent);
  color: var(--status-critical);
}
.btn-danger:hover { background: var(--status-critical); border-color: var(--status-critical); color: #fff; }

/* ==========================================================================
   作业详情 · 顶部操作区 / 中部概况 / 试题详情 */
.hd-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 12px; }

.hd-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.hd-sum-tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.hd-sum-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.hd-sum-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hd-sum-k { font-size: 11px; color: var(--text-muted); }
.hd-sum-v { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }

.hd-answered-summary { font-size: 12.5px; color: var(--text-muted); }

.hd-questions { display: flex; flex-direction: column; gap: 12px; }
.hd-q-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-1);
}
.hd-q-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hd-q-head .wh-score { margin-left: 0; }
.hd-q-no { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.hd-q-answered { margin-left: auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hd-q-stem { font-size: 25px; color: var(--text-primary); line-height: 1.6; margin-bottom: 8px; }
.hd-q-ans { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }

/* ==========================================================================
   题库 · 模式切换 + 组卷模式 + 练习模式 */
.wh-mode-bar { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  border: none; background: transparent;
  padding: 7px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.seg-btn:hover { color: var(--text-primary); }
.seg-btn.active {
  background: var(--surface-1); color: var(--brand); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.seg--sm .seg-btn { padding: 5px 14px; font-size: 12.5px; }
.sum-toggle { margin-left: auto; }

.wh-mode-panel { margin-top: 4px; }

.paper-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.paper-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 整体组卷：试题多选框 + 已勾选高亮 */
.paper-check { margin: 0 10px 0 0; flex-shrink: 0; width: 15px; height: 15px; cursor: pointer; }
.wh-card:has(.paper-check:checked) { border-color: var(--brand); background: var(--brand-soft); }
.wh-tag-time {
  color: #b7791f;
  background: color-mix(in srgb, var(--status-warning) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-warning) 32%, transparent);
}

.practice-controls {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.practice-kn { display: flex; flex-direction: column; gap: 8px; }
.practice-kn-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.3px; }
.practice-kn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kn-chip {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary);
  border-radius: 999px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.kn-chip:hover { border-color: var(--brand); color: var(--brand); }
.kn-chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.practice-kn-empty { font-size: 12.5px; color: var(--text-muted); }

.practice-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.practice-counts-label { width: 100%; font-size: 11px; color: var(--text-muted); letter-spacing: 0.3px; }
.stepper {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2);
}
.stepper-label { font-size: 12.5px; color: var(--text-primary); font-weight: 500; }
.stepper-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-1);
  color: var(--text-secondary); font-size: 15px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.stepper-btn:hover { color: var(--brand); border-color: var(--brand); }
.stepper-input {
  width: 40px; height: 26px; text-align: center;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-variant-numeric: tabular-nums;
  color: var(--text-primary); background: var(--surface-1);
}

/* ==========================================================================
   题库 · 组卷模式（整体组卷 + 个性化组卷）
   ========================================================================== */
#paper-submode-seg { margin-bottom: 14px; }

/* 已选试卷（整体组卷）：拖动排序 + 分值 + 发布 */
.paper-compose {
  margin-top: 16px;
  background: var(--surface-1);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.pc-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pc-meta { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pc-actions { margin-left: auto; display: flex; gap: 8px; }
.pc-list { display: flex; flex-direction: column; gap: 8px; }
.pc-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; background: var(--surface-2);
  cursor: grab;
}
.pc-row.dragging { opacity: 0.5; border-style: dashed; }
.pc-grip { color: var(--text-muted); cursor: grab; letter-spacing: -1px; }
.pc-no { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; width: 22px; }
.pc-stem { flex: 1; font-size: 12.5px; color: var(--text-primary); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-score { width: 60px; height: 26px; text-align: center; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-primary); background: var(--surface-1); }
.pc-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--text-secondary); cursor: pointer; font-size: 13px; line-height: 1; }
.pc-btn:hover { color: var(--brand); border-color: var(--brand); }
.pc-del:hover { color: var(--status-critical); border-color: var(--status-critical); }

/* ==================== 组卷工作台 ==================== */
.pb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.pb-bank { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pb-filter { margin: 0; }

.pb-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.pb-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pb-section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pb-section-sub { font-size: 12px; color: var(--text-muted); }
.pb-tag-add {
  font-size: 11.5px; border-radius: 999px; padding: 2px 10px; white-space: nowrap;
  color: var(--series-2); background: color-mix(in srgb, var(--series-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--series-2) 35%, transparent);
}
.pb-list { display: flex; flex-direction: column; gap: 12px; }

/* 原题 + 变式题组 */
.pb-card { padding: 14px 18px; }
.pb-kind-tag {
  font-size: 11.5px; border-radius: 999px; padding: 2px 10px; white-space: nowrap;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.pb-kind-tag.is-var { color: var(--series-4); background: color-mix(in srgb, var(--series-4) 12%, transparent); border-color: color-mix(in srgb, var(--series-4) 35%, transparent); }
.pb-kind-tag.is-student { color: var(--series-2); background: color-mix(in srgb, var(--series-2) 12%, transparent); border-color: color-mix(in srgb, var(--series-2) 35%, transparent); }
.pb-variants {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong);
}
.pb-variant {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
}
.pb-variant-main { flex: 1; min-width: 0; }
.pb-variant-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pb-variant-stem { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
/* 组卷工作台内题目题干使用正常阅读字号（覆盖共享的 .wh-stem 大字号） */
.pb-card .wh-stem { font-size: 14px; line-height: 1.7; }
.pb-add-btn { flex-shrink: 0; }
.pb-student-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

/* 右侧试题栏 */
.pb-cart {
  position: sticky; top: 84px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-card);
}
.pb-cart-head { display: flex; align-items: center; justify-content: space-between; }
.pb-cart-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.pb-cart-count { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pb-cart-block { display: flex; flex-direction: column; gap: 8px; }
.pb-cart-block--grow { min-height: 0; }
.pb-block-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.3px; }
.pb-score-hint { font-size: 12px; color: var(--text-muted); }
.pb-cart-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.pb-cart-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
}
.pb-cart-no { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; width: 20px; flex-shrink: 0; }
.pb-cart-stem { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-primary); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-cart-score { width: 52px; height: 24px; text-align: center; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; color: var(--text-primary); }
.pb-cart-del { flex-shrink: 0; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 14px; }
.pb-cart-del:hover { color: var(--status-critical); }
.pb-cart-total { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-secondary); }
.pb-cart-total b { color: var(--brand); font-variant-numeric: tabular-nums; }

/* 发布方式 */
.pb-publish { display: flex; flex-direction: column; gap: 8px; }
.pb-radio {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-primary); cursor: pointer;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
}
.pb-radio:hover { border-color: var(--brand); }
.pb-radio input { accent-color: var(--brand); }
.pb-radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* 布置班级 */
.pb-assign { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-assign-chip {
  font-size: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--text-secondary);
}
.pb-assign-chip:hover { border-color: var(--brand); color: var(--brand); }
.pb-assign-chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* 底部操作 */
.pb-cart-foot { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.pb-cart-foot .btn { flex: 1; justify-content: center; }
.pb-cart-foot .btn-primary { flex: 1.4; }

/* 预览弹框 */
.pb-preview-head { margin-bottom: 14px; }
.pb-preview-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.pb-preview-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.pb-preview-list { display: flex; flex-direction: column; gap: 10px; }
.pb-preview-q {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); font-size: 13px; color: var(--text-primary); line-height: 1.6;
}
.pb-preview-q b { color: var(--text-muted); font-weight: 600; margin-right: 4px; }

@media (max-width: 1080px) {
  .pb-layout { grid-template-columns: 1fr; }
  .pb-cart { position: static; }
}

/* ==================== 作业审核 ==================== */
.audit-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }

.audit-queue {
  position: sticky; top: 84px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 140px);
}
.audit-queue-head {
  padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.audit-queue-list { display: flex; flex-direction: column; overflow-y: auto; }
.audit-queue-item {
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent; transition: background .12s;
}
.audit-queue-item:hover { background: var(--deemph-fill); }
.audit-queue-item.active { background: var(--brand-soft); border-left-color: var(--brand); }
.audit-queue-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 6px; }
.audit-queue-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.audit-queue-prog { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.audit-work { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.audit-work-head {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px;
}
.audit-work-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.audit-work-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

.audit-progress {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 18px;
}
.audit-progress-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.audit-progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.audit-progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .2s; }

.audit-q-list { display: flex; flex-direction: column; gap: 14px; }
.audit-q {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.audit-q.is-done { border-color: color-mix(in srgb, var(--status-good) 45%, var(--border)); }
.audit-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.audit-q-no { font-size: 13px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.audit-q-var { font-size: 11.5px; color: var(--series-4); }
.audit-q-review {
  margin-left: auto; font-size: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--text-secondary);
}
.audit-q-review:hover { border-color: var(--brand); color: var(--brand); }
.audit-q-review.done {
  background: color-mix(in srgb, var(--status-good) 14%, transparent);
  border-color: color-mix(in srgb, var(--status-good) 45%, transparent);
  color: var(--status-good); font-weight: 600;
}

.audit-q-label { font-size: 11px; color: var(--text-muted); letter-spacing: .3px; margin: 10px 0 6px; }
.audit-q-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--text-primary); font-family: inherit; line-height: 1.6;
  background: var(--surface-1); resize: vertical; box-sizing: border-box;
}
.audit-q-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.audit-slot { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); }
.audit-slot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.audit-slot-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.audit-video { font-size: 12.5px; color: var(--text-secondary); }
.audit-empty { font-size: 12px; color: var(--text-muted); }
.audit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}

.audit-work-foot {
  position: sticky; bottom: 0;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 0; background: linear-gradient(transparent, var(--page-bg) 60%);
}
.audit-work-foot .btn { min-width: 160px; justify-content: center; }
.audit-work-foot .btn:disabled { opacity: .5; cursor: not-allowed; }

.audit-lib-hint { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.audit-lib-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.audit-lib-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
}
.audit-lib-info { flex: 1; min-width: 0; }
.audit-lib-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.audit-lib-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

@media (max-width: 1080px) {
  .audit-layout { grid-template-columns: 1fr; }
  .audit-queue { position: static; max-height: none; }
}

/* 错题本卡片：同类推荐 + 讲评 */
.mb-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.mb-foot .wh-rec-btn { color: var(--text-secondary); }
.mb-foot .wh-review-btn { margin-left: auto; }

/* 个性化组卷：面板内左右两栏 */
.pers-panel-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.pers-settings {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
}
.pers-setting { display: flex; flex-direction: column; gap: 8px; }
.pers-setting-counts { flex-direction: row; flex-wrap: wrap; align-items: center; }
.pers-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.3px; }
.pers-setting-counts .pers-label { width: 100%; }
.pers-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pers-dedup { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }
.pers-dedup input { margin: 0; }

/* 右侧：当前学生错题勾选列表 */
.pers-right-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.pers-right-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pers-right-hint { font-size: 12px; color: var(--text-muted); }
.pers-right-actions { margin-left: auto; display: flex; gap: 6px; }
.pers-qrow {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-1); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.pers-qrow:hover { background: var(--deemph-fill); }
.pers-qrow.checked { background: var(--brand-soft); border-color: var(--brand); }
.pers-qrow input { margin: 2px 0 0; flex-shrink: 0; }
.pers-qno {
  flex-shrink: 0; width: 22px; text-align: right;
  font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.pers-qstem { flex: 1; font-size: 12.5px; color: var(--text-primary); line-height: 1.5; }
.pers-qscore { flex-shrink: 0; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.pers-layout { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.pers-left {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); overflow: hidden;
  display: flex; flex-direction: column; max-height: 62vh;
}
.pers-left-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.pers-left-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pers-left-count { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pers-batch { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.btn-mini { padding: 3px 10px; font-size: 12px; border-radius: 6px; }

/* 学生档案：名册表格 + 导入导出 */
.sa-card { padding: 0; overflow: hidden; }
.sa-table-wrap { overflow: auto; }
.sa-table-wrap .chart-table th,
.sa-table-wrap .chart-table td { white-space: nowrap; }
.sa-table-wrap .sa-actions { display: flex; gap: 6px; }
.sa-table-wrap .sa-empty { text-align: center; color: var(--text-muted); padding: 28px 0; }
.sa-import-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.sa-import-actions .btn { cursor: pointer; }
.sa-import-actions label.btn { display: inline-flex; align-items: center; margin: 0; }
#sa-import-result { margin-top: 12px; }
#sa-export-count { margin-top: 8px; }
.sa-rate-ok { color: var(--status-good); font-weight: 600; }
.sa-rate-mid { color: var(--text-secondary); }
.sa-rate-low { color: var(--status-critical); font-weight: 600; }

/* 分层：纯文字着色（避免徽章 inline-flex 在表格里造成垂直错行） */
.sa-tier { font-weight: 500; }
.sa-tier-brand { color: var(--brand); }
.sa-tier-good { color: var(--status-good); }
.sa-tier-warn { color: #b7791f; }

/* 学生档案分页 */
.sa-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 0 2px;
}
.sa-page-info { font-size: 13px; color: var(--text-muted); }
.sa-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.sa-page-size .select { min-width: 90px; }

/* ---------- 学生档案 · 分层与分组 ---------- */
.modal-sa-group { max-width: 1500px; width: calc(100vw - 48px); max-height: calc(100vh - 48px); }
.sa-group-body { background: var(--page-bg); }

.sa-step-badge {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.sa-tier-board { padding: 16px 18px; margin-bottom: 16px; }
.sa-tier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.sa-tier-col {
  display: flex; flex-direction: column; gap: 8px; min-height: 164px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-left: 3px solid var(--tier-color, var(--border));
  border-radius: 10px; background: var(--surface-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sa-tier-col.is-drop { border-color: var(--brand); border-left-color: var(--tier-color, var(--brand)); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.sa-tier-label { font-size: 13px; font-weight: 600; }
.sa-tier-members { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex: 1 1 auto; max-height: 150px; overflow: auto; }
.sa-tier-move { height: 28px; padding: 2px 8px; font-size: 12px; min-width: 92px; }
@media (max-width: 900px) { .sa-tier-cards { grid-template-columns: 1fr; } }

.sa-grp-scope { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.sa-grp-scope-label { font-size: 12px; color: var(--text-muted); }
.sa-grp-scope-selects { display: flex; gap: 10px; flex-wrap: wrap; }
.sa-grp-scope-selects .select { width: 220px; min-width: 0; }

.sa-grp-board { padding: 16px 18px; margin-bottom: 16px; }
.sa-grp-board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sa-grp-board-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.sa-grp-ico { font-size: 15px; }
.sa-grp-meta { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.sa-grp-quota { font-size: 12px; font-weight: 400; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.sa-grp-board-actions { display: flex; gap: 8px; }
.sa-grp-hint { margin: 8px 0 14px; font-size: 12px; line-height: 1.7; color: var(--text-muted); }

.sa-grp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.sa-grp-col {
  display: flex; flex-direction: column; gap: 8px; min-height: 164px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sa-grp-col.is-ungrouped { background: var(--surface-1); }
.sa-grp-col.is-drop { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.sa-grp-col-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sa-grp-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.sa-grp-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sa-grp-name {
  flex: 1 1 auto; min-width: 0; width: 100%;
  padding: 3px 5px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}
.sa-grp-name:hover { border-color: var(--border-strong); }
.sa-grp-name:focus { outline: none; border-color: var(--brand); background: var(--surface-1); box-shadow: 0 0 0 2px var(--brand-soft); }
.sa-grp-count { flex: 0 0 auto; margin-left: auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sa-grp-del {
  flex: 0 0 auto; border: 0; background: transparent; padding: 2px 4px;
  font-size: 11.5px; color: var(--text-muted); cursor: pointer; border-radius: 4px;
}
.sa-grp-del:hover { color: var(--status-critical); background: rgba(208, 59, 59, .08); }
.sa-grp-cap { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-muted); }
.sa-grp-cap input {
  width: 42px; height: 24px; padding: 2px 5px; border: 1px solid var(--border-strong);
  border-radius: 5px; background: var(--surface-1); font-family: inherit; font-size: 11.5px;
  color: var(--text-primary); text-align: center;
}
.sa-grp-cap input:focus { outline: none; border-color: var(--brand); }
.sa-grp-sub { font-size: 11.5px; color: var(--text-muted); }
.sa-grp-members { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex: 1 1 auto; }
.sa-grp-chip {
  display: inline-flex; align-items: center; max-width: 100%;
  padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-1); font-size: 12px; color: var(--text-secondary);
  cursor: grab; user-select: none; white-space: nowrap;
}
.sa-grp-chip:hover { border-color: var(--brand); color: var(--brand); }
.sa-grp-chip:active { cursor: grabbing; }
.sa-grp-chip.is-drag { opacity: .4; }
.sa-grp-drop {
  border: 1px dashed var(--border-strong); border-radius: 7px; padding: 7px 8px;
  text-align: center; font-size: 11.5px; color: var(--text-muted);
}
.sa-grp-col.is-drop .sa-grp-drop { border-color: var(--brand); color: var(--brand); }

.sa-grp-roster { padding: 0; overflow: hidden; }
.sa-grp-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.sa-grp-roster-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sa-grp-roster-tools { display: flex; align-items: center; gap: 8px; }
.sa-grp-roster-tools .select { min-width: 112px; }
.sa-grp-roster-tools .input { width: 200px; }
.sa-grp-table-wrap { max-height: 340px; overflow: auto; }
.sa-grp-table th, .sa-grp-table td { padding: 9px 16px; white-space: nowrap; }
.sa-grp-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.sa-grp-check-col { width: 44px; }
.sa-grp-check-col input { width: 14px; height: 14px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.sa-grp-row.is-drag { opacity: .4; }
.sa-grp-stu-name { font-weight: 500; color: var(--text-primary); }
.sa-grp-stu-no { color: var(--text-secondary); }
.sa-grp-move { height: 28px; padding: 2px 8px; font-size: 12px; min-width: 96px; }
.sa-grp-batch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 18px; background: var(--brand-soft); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
.sa-grp-batch[hidden] { display: none; }
.sa-grp-batch .select { min-width: 120px; }
.sa-grp-foot { padding: 10px 18px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-muted); }

/* 学生分析报告弹窗 */
.sa-report-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.sa-report-chip {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}
.sa-report-body .form-section { margin-bottom: 22px; }
.sa-report-body .form-section:last-child { margin-bottom: 0; }

/* 报告 KPI：更小更紧凑，悬停/点击浅蓝 */
.sa-report-body .kpi-grid { gap: 8px; }
.sa-report-body .kpi-grid .kpi {
  padding: 8px 10px;
  gap: 3px;
  box-shadow: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.sa-report-body .kpi-grid .kpi:hover,
.sa-report-body .kpi-grid .kpi:active { background: var(--brand-soft); border-color: var(--brand-soft); }
.sa-report-body .kpi-grid .kpi-label { font-size: 11px; }
.sa-report-body .kpi-grid .kpi-value { font-size: 18px; }
.sa-report-body .kpi-grid .kpi-value .unit { font-size: 10px; }
.sa-report-body .kpi-grid .kpi-sub { font-size: 10px; }
#sa-report-hw { grid-template-columns: repeat(3, 1fr); }
#sa-report-clear { grid-template-columns: repeat(4, 1fr); }

/* 薄弱知识点表格：卡片化 + 掌握率进度条 + 程度徽章 */
#sa-report-weak { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
#sa-report-weak .chart-table th,
#sa-report-weak .chart-table td { padding: 10px 14px; }
#sa-report-weak .chart-table th { background: var(--surface-2); }
#sa-report-weak .chart-table td { vertical-align: middle; }
.sa-rate-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.sa-rate-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.sa-rate-fill { display: block; height: 100%; border-radius: 999px; }
.sa-rate-fill.sa-rate-ok { background: var(--status-good); }
.sa-rate-fill.sa-rate-mid { background: var(--brand); }
.sa-rate-fill.sa-rate-low { background: var(--status-critical); }
.sa-rate-txt { font-size: 12.5px; font-weight: 600; color: var(--text-primary); min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.sa-level-badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.sa-level-high { color: var(--status-critical); background: rgba(220, 38, 38, 0.10); }
.sa-level-mid { color: #b7791f; background: rgba(183, 121, 31, 0.12); }
.sa-level-low { color: var(--status-good); background: rgba(22, 163, 74, 0.10); }

/* 综合建议：总 - 分 - 总 */
.sa-report-suggestion { font-size: 13.5px; color: var(--text-primary); line-height: 1.7; }
.sa-sugg-intro { margin: 0 0 14px; }
.sa-sugg-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sa-sugg-list li {
  padding: 12px 14px 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}
.sa-sugg-list li strong { color: var(--text-primary); }
.sa-sugg-summary {
  margin: 0;
  padding: 12px 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius-sm);
}
.pers-stu-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.pers-stu-item {
  appearance: none; background: none; width: 100%; text-align: left; font: inherit;
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.pers-stu-item:hover { background: var(--brand-soft); }
.pers-stu-item.active { background: var(--brand-soft); border-color: var(--brand); }
.pers-stu-item.active .pers-stu-item-name { color: var(--brand); font-weight: 600; }
.pers-stu-item-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.pers-stu-item-meta { margin-left: auto; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.pers-right { display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.pers-stu-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); padding: 12px 14px;
}
.pers-stu-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pers-stu-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pers-stu-card-meta { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pers-sec-title { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; margin-bottom: 8px; }

.pers-mastery { margin-bottom: 12px; }
.pers-mastery-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pers-mastery-name { width: 150px; flex-shrink: 0; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pers-mastery-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.pers-mastery-fill { height: 100%; border-radius: 999px; background: var(--brand); }
.pers-mastery-fill.is-weak { background: var(--status-serious); }
.pers-mastery-pct { width: 40px; text-align: right; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.pers-weak { margin-bottom: 12px; }
.pers-weak-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pers-weak-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--status-serious); color: #fff; }
.pers-weak-none { font-size: 12.5px; color: var(--text-muted); }

.pers-paper { border-top: 1px dashed var(--border); padding-top: 10px; }
.pers-paper-head { width: 100%; text-align: left; padding: 6px 0; border: none; background: none; font-size: 13px; color: var(--brand); cursor: pointer; font-weight: 500; }
.pers-paper-body { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pers-paper-q { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-primary); }

/* ==========================================================================
   个性化考试（一人一卷 · 分层 · 锚定题）
   ========================================================================== */
.pexam-steps {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
}
.pexam-body { display: flex; flex-direction: column; gap: 14px; min-height: 300px; }
.pexam-foot-left { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 12.5px; }
.pexam-footer { display: flex; justify-content: flex-end; gap: 10px; }

/* 基础信息表单（向导第 1 步） */
.pexam-form-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
  font-size: 12.5px; color: var(--text-primary);
}
.pexam-form-summary .fs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; }
.pexam-form-summary .fs-label { color: var(--text-secondary); }
.pexam-form-summary b { color: var(--brand); font-weight: 600; }
.pexam-form-summary .fs-note { margin-left: auto; color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }

.pexam-form-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pexam-form-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--gridline);
  background: var(--surface-2);
}
.pexam-form-card-head .fc-icon {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: var(--brand-soft); color: var(--brand);
}
.pexam-form-card-head .fc-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pexam-form-card-head .fc-desc { font-size: 11.5px; color: var(--text-muted); }
.pexam-form-card-body { padding: 16px; }

.pexam-tag {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 3px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.pexam-form-hint {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
.pexam-form-hint .fh-icon { flex: 0 0 auto; margin-top: 1px; }

.pexam-form-field { margin-top: 16px; }
.pexam-form-field:first-child { margin-top: 0; }
.pexam-form-card-body .pers-stu-card + .pers-stu-card { margin-top: 10px; }

.pexam-kv { display: flex; flex-direction: column; }
.pexam-kv-row { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--gridline); }
.pexam-kv-row:first-child { padding-top: 0; }
.pexam-kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.pexam-kv-row .k { flex: 0 0 120px; font-size: 12.5px; color: var(--text-muted); }
.pexam-kv-row .v { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* 分层 KPI */
.pexam-tier-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pexam-tier-kpi {
  position: relative; overflow: hidden;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 12px;
}
.pexam-tier-kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--tier, var(--brand));
}
.pexam-tier-kpi .tk-label { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.pexam-tier-kpi .tk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tier, var(--brand)); }
.pexam-tier-kpi .tk-count { font-size: 26px; font-weight: 600; color: var(--text-primary); margin-top: 6px; line-height: 1.1; }
.pexam-tier-kpi .tk-count .unit { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.pexam-tier-kpi .tk-avg { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pexam-tier-kpi .tk-bar { height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.pexam-tier-kpi .tk-bar i { display: block; height: 100%; background: var(--tier, var(--brand)); }

/* 通用表格 */
.pexam-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pexam-table th, .pexam-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gridline);
  vertical-align: top;
}
.pexam-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.pexam-table td { color: var(--text-primary); }
.pexam-table tr:last-child td { border-bottom: none; }
.pexam-table .num { font-variant-numeric: tabular-nums; }

/* 逐生诊断列表 */
.pexam-stu-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pexam-stu-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--gridline); background: var(--surface-1);
}
.pexam-stu-row:last-child { border-bottom: none; }
.pexam-stu-row .sn { width: 20px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.pexam-stu-row .smain { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.pexam-stu-row .sname { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pexam-stu-row .sno { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pexam-stu-row .smeta { flex: 1; min-width: 0; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; text-align: right; }

/* 个体报告：得分概览 */
.pexam-stu-score {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px;
}
.pexam-stu-score .ss-big { font-size: 40px; font-weight: 600; color: var(--brand); letter-spacing: -0.5px; line-height: 1; }
.pexam-stu-score .ss-big .unit { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.pexam-stu-score .ss-meta { font-size: 12.5px; color: var(--text-secondary); line-height: 1.8; }
.pexam-stu-score .ss-meta b { color: var(--text-primary); }

/* 专属试卷 */
.pexam-paper { display: flex; flex-direction: column; gap: 12px; }
.pexam-q { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-1); padding: 12px 14px; }
.pexam-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pexam-q-no { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.pexam-q-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; line-height: 1.6; }
.pexam-q-tag.anchor { color: var(--brand); background: var(--brand-soft); }
.pexam-q-tag.personal { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.pexam-q-type { font-size: 11px; color: var(--text-muted); }
.pexam-q-stem { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
.pexam-q-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pexam-q-result { margin-left: auto; font-size: 12px; font-weight: 600; }
.pexam-q-result.ok { color: var(--status-good); }
.pexam-q-result.no { color: var(--status-critical); }

/* 薄弱知识点 chips */
.pexam-weak { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================================
   问题反馈
   ========================================================================== */
.fb-source { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

#fb-kpis { margin-bottom: 18px; }

/* 反馈类型分布 */
.fb-type-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-type-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); cursor: pointer; min-width: 150px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.fb-type-chip:hover { border-color: var(--brand); }
.fb-type-chip:active { transform: translateY(1px); }
.fb-type-chip.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.fb-type-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fb-type-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.fb-type-n { margin-left: auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.fb-type-dot.t-err  { background: #d03b3b; }
.fb-type-dot.t-ans  { background: #e0743a; }
.fb-type-dot.t-know { background: #2a78d6; }
.fb-type-dot.t-sys  { background: #fab219; }
.fb-type-dot.t-sug  { background: #0ca30c; }

.fb-type { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.fb-type.t-err  { background: rgba(208,59,59,.12);   color: #d03b3b; }
.fb-type.t-ans  { background: rgba(224,116,58,.14);  color: #c8551f; }
.fb-type.t-know { background: rgba(42,120,214,.12);  color: #2a78d6; }
.fb-type.t-sys  { background: rgba(250,178,25,.20);  color: #a06a00; }
.fb-type.t-sug  { background: rgba(12,163,12,.12);   color: #0ca30c; }

/* 明细列表 */
.fb-list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fb-list-head .filter-spacer { flex: 1; }
.fb-meta { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.fb-content { max-width: 380px; color: var(--text-secondary); }
.fb-table th, .fb-table td { vertical-align: middle; }

/* 详情抽屉 */
.fb-drawer-mask {
  position: fixed; inset: 0; background: rgba(11,11,11,.45); z-index: 110;
  display: flex; justify-content: flex-end;
}
.fb-drawer-mask[hidden] { display: none; }
.fb-drawer {
  width: 440px; max-width: 92vw; height: 100%; background: var(--surface-1);
  border-left: 1px solid var(--border-strong); display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.12); animation: fb-slide .2s ease;
}
@keyframes fb-slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.fb-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.fb-drawer-head h3 { font-size: 16px; margin: 0; color: var(--text-primary); }
.fb-drawer-body { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.fb-field { display: flex; flex-direction: column; gap: 6px; }
.fb-field label { font-size: 12px; color: var(--text-muted); }
.fb-field-val { font-size: 14px; color: var(--text-primary); }
.fb-drawer-content {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; line-height: 1.7; color: var(--text-primary);
}
.fb-status-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-status-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.fb-status-btn:hover { border-color: var(--brand); color: var(--brand); }
.fb-status-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-drawer-foot { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.pexam-weak-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--status-serious); color: #fff; }

/* 档位色点（列表卡片用） */
.pexam-tier-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

@media (max-width: 1100px) {
  .pexam-tier-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .pexam-tier-kpis { grid-template-columns: 1fr; }
}
.pers-paper-stem { flex: 1; line-height: 1.5; }
.pers-paper-score { flex-shrink: 0; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   个性化组卷：列表 + 6 步向导 + 试卷预览/编辑
   ========================================================================== */
.pers-list { display: flex; flex-direction: column; gap: 12px; }
.pers-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.pers-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pers-card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pers-card-meta { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.pers-card-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 向导步骤条 */
.pers-steps {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
}
.pers-step {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
  font-size: 12.5px; color: var(--text-secondary); cursor: pointer;
}
.pers-step:hover { border-color: var(--brand); }
.pers-step.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pers-step.done { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.pers-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.08); font-size: 11px; font-weight: 600;
}
.pers-step.active .pers-step-n { background: rgba(255,255,255,0.25); }
.pers-step.done .pers-step-n { background: var(--brand); color: #fff; }

/* 向导内容 */
.pers-wizard-body { display: flex; flex-direction: column; gap: 14px; min-height: 320px; }
.pers-wizard-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--border);
}
.pers-step-intro { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.pers-step-scope {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius-sm);
  padding: 8px 12px; width: fit-content;
}
.pers-field-label { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-top: 4px; }

/* 第 1 步：考试/作业多选下拉框 */
.pers-msel-row { display: flex; gap: 16px; align-items: flex-start; }
.pers-field { flex: 1; min-width: 0; }
.pers-time-arrow { flex: 0 0 auto; padding-top: 26px; color: var(--text-muted); font-size: 14px; }
.pers-msel { position: relative; width: 100%; }
.pers-msel-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-1); font-size: 13px; color: var(--text-primary); cursor: pointer;
}
.pers-msel-trigger:hover { border-color: var(--brand); }
.pers-msel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pers-msel-arrow { flex-shrink: 0; color: var(--text-muted); font-size: 12px; }
.pers-msel-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  width: 100%; max-height: 264px; overflow-y: auto;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); padding: 6px;
}
.pers-msel-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-primary); cursor: pointer;
}
.pers-msel-opt:hover { background: var(--surface-2); }
.pers-msel-opt.on { background: var(--brand-soft); }
.pers-msel-opt input { margin: 0; }
.pers-msel-empty { padding: 10px 12px; font-size: 12px; color: var(--text-muted); }

/* 分页 */
.pers-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.pers-pager-info { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* 第 2 步：分层 */
.pers-tier-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.pers-tier-badge { font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.tier-basic { background: #eef1f5; color: #5b6b7b; }
.tier-consolidate { background: #fff3e0; color: #b26a00; }
.tier-advance { background: #e7f6e7; color: var(--status-good); }
.pers-tier-select { min-width: 96px; padding: 4px 8px; }
.pers-tier-reason { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.pers-tier-table td, .pers-tier-table th { vertical-align: middle; }

/* 第 3 步：达标标注 */
.pers-attain-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.attain-chip {
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  cursor: pointer; background: var(--surface-2); color: var(--text-primary);
}
.attain-chip.good { background: #e7f6e7; border-color: #b7e0b7; color: #0a7a0a; }
.attain-chip.bad { background: #fdecea; border-color: #f3c2bd; color: var(--status-critical); }

/* 第 4 步：题型配置 */
.pers-type-num { width: 80px; padding: 4px 8px; }
.pers-type-table td, .pers-type-table th { vertical-align: middle; }
.pers-duration-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-primary); }

/* 第 5 步：生成试卷 */
.pers-paper-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pers-paper-table td, .pers-paper-table th { vertical-align: middle; }
.pers-pos { font-size: 11.5px; color: var(--text-secondary); }

/* 第 6 步：发布 */
.pers-publish-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
}
.pers-publish-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.pers-publish-meta { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.pers-publish-note { font-size: 12px; color: var(--text-muted); }

/* 试卷预览/编辑 */
.pers-preview-head { margin-top: 4px; }
.pers-preview-head select { min-width: 180px; }
.pers-preview-info { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.pers-preview-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.pers-preview-q {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.pers-preview-q.editable { padding-left: 8px; }
.pers-preview-cb { margin-top: 3px; flex-shrink: 0; }
.pers-preview-no { flex-shrink: 0; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pers-preview-stem { flex: 1; font-size: 12.5px; color: var(--text-primary); line-height: 1.5; }
.pers-preview-score { flex-shrink: 0; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pers-q-res { flex-shrink: 0; font-size: 11px; font-weight: 600; line-height: 1; padding: 2px 8px; border-radius: 999px; }
.pers-q-res.is-right { background: #e8f6ec; color: var(--status-good); }
.pers-q-res.is-wrong { background: #fdecea; color: var(--status-critical); }
.pers-preview-tools { display: flex; gap: 8px; margin-top: 12px; }

/* 重考正确率查看 */
.pers-acc-meta { margin-top: 4px; font-size: 12.5px; color: var(--text-secondary); }
.pers-acc-summary {
  display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.pers-acc-class {
  min-width: 220px; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2);
}
.pers-acc-class-label { font-size: 12.5px; color: var(--text-secondary); }
.pers-acc-class-val { font-size: 34px; font-weight: 700; color: var(--brand); line-height: 1.15; margin-top: 4px; }
.pers-acc-class-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.pers-acc-layers { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pers-acc-layer { display: flex; align-items: center; gap: 10px; }
.pers-acc-layer-val { font-size: 16px; font-weight: 700; color: var(--text-primary); min-width: 44px; }
.pers-acc-layer-sub { font-size: 11.5px; color: var(--text-muted); }
.pers-acc-table td { vertical-align: middle; }
.pers-acc-name { font-weight: 600; color: var(--text-primary); }
.pers-acc-cell { display: flex; align-items: center; gap: 4px; min-width: 180px; }
.pers-acc-bar {
  flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3);
  overflow: hidden; min-width: 90px;
}
.pers-acc-bar-fill { height: 100%; border-radius: 999px; background: var(--brand); }
.pers-acc-bar-fill.pers-acc-good { background: var(--status-good); }
.pers-acc-bar-fill.pers-acc-mid { background: var(--status-warning); }
.pers-acc-bar-fill.pers-acc-low { background: var(--status-critical); }
.pers-acc-pct { font-size: 12.5px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; min-width: 40px; }
.pers-acc-rank { text-align: center; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; width: 48px; }
.pers-acc-rank.is-top { color: var(--brand); }
.pers-acc-answered { font-variant-numeric: tabular-nums; color: var(--text-secondary); white-space: nowrap; }

.diff-badge { flex-shrink: 0; font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 500; }
.diff-easy { background: var(--brand-soft); color: var(--brand); }
.diff-mid { background: #fff3e0; color: #b26a00; }
.diff-hard { background: #fdecea; color: var(--status-critical); }

/* ==========================================================================
   作业详情 · 居中全宽弹框 + 试题讲评弹框
   ========================================================================== */
.hd-modal { max-height: 92vh; }

/* 试题卡片底部：讲评按钮 */
.hd-q-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* 试题讲评弹框（居中，宽幅：左侧题干/解析/讲评/白板，右侧做错学生） */
.hd-review-modal { max-width: 1120px; max-height: 94vh; }

.hdr-foot { justify-content: space-between; align-items: center; }
.hdr-pos { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }

.hdr-head-tools { display: flex; align-items: center; gap: 8px; }
.hdr-toggle { font-size: 12.5px; padding: 5px 12px; color: var(--text-secondary); }
.hdr-toggle.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 讲评弹框主体：左主区 + 右学生栏 */
.hdr-body { display: flex; flex-direction: column; gap: 14px; }
.hdr-cols { display: grid; grid-template-columns: 1fr 220px; gap: 14px; align-items: start; }
.hdr-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hdr-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
  max-height: calc(94vh - 140px);
  overflow-y: auto;
}
.hdr-side-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* 可隐藏区块（解析 / 讲评步骤） */
.hdr-sec { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 12px 14px; }
.hdr-sec-title { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.hdr-analysis { font-size: 13px; color: var(--text-primary); line-height: 1.7; }
.hdr-review { display: flex; flex-direction: column; gap: 8px; }
.hdr-step { display: flex; flex-direction: column; gap: 2px; }
.hdr-step-title { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.hdr-step-body { font-size: 12.5px; color: var(--text-primary); line-height: 1.6; }

/* 做错学生名单 */
.hdr-wrong { display: flex; flex-direction: column; gap: 8px; }
.hdr-wrong-count { font-size: 12px; color: var(--status-critical); font-weight: 600; }
.hdr-wrong-empty { font-size: 12px; color: var(--text-muted); }
.hdr-wrong-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-1);
}
.hdr-wrong-no { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.hd-stem {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px 14px;
  max-height: 200px;
  overflow-y: auto;
}
.hd-stem-text { font-size: 14px; color: var(--text-primary); line-height: 1.7; white-space: pre-wrap; }

/* 白板容器 */
.hd-wb {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-1);
}
.hd-wb-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.wb-group { display: flex; align-items: center; gap: 6px; }
.wb-group + .wb-group { border-left: 1px solid var(--border); padding-left: 12px; }
.wb-spacer { flex: 1; }

.wb-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.wb-color.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

.wb-size,
.wb-tool {
  height: 26px;
  padding: 0 10px;
  min-width: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
}
.wb-size.active,
.wb-tool.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.hd-wb-stage {
  position: relative;
  height: 400px;
  background: #fff; /* 白板底色 */
  touch-action: none;
}
.hd-wb-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* ==================== 学情中心·学情报告 ==================== */
.lr-tabs { display: flex; gap: 8px; margin: 14px 0 14px; }
.lr-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lr-tab:hover { color: var(--brand); border-color: var(--brand); }
.lr-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.lr-batch-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -2px 0 14px;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.lr-check-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.lr-check-all input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.lr-batch-count { font-size: 12.5px; color: var(--text-muted); }
.lr-batch-bar .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lr-pick {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  cursor: pointer;
}
.lr-pick input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.lr-card.selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow-card); }

.lr-body { display: flex; flex-direction: column; gap: 14px; }

.lr-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.lr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.lr-card-text { min-width: 0; flex: 1; }
.lr-card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.lr-card-scope { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.lr-card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.lr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.lr-sec { margin-bottom: 14px; }
.lr-grid .lr-sec { margin-bottom: 0; }
.lr-sec:last-child { margin-bottom: 0; }
.lr-sec-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  padding: 6px 10px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  border-radius: 4px;
  margin-bottom: 12px;
}

.lr-sub-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.lr-sub-title::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--border-strong); }

.lr-table--bands td, .lr-table--bands th { vertical-align: middle; }
.lr-table--bands td:first-child { white-space: nowrap; }
.lr-band-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; background: var(--text-muted); }
.lr-band-range { margin-left: 8px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lr-band-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.lr-band-ratio { white-space: nowrap; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lr-band-bar { display: inline-block; width: 96px; height: 5px; margin-right: 8px; border-radius: 999px; background: var(--border); overflow: hidden; vertical-align: middle; }
.lr-band-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.lr-band-names { color: var(--text-secondary); line-height: 1.7; }
.lr-band--great .lr-band-dot, .lr-band--great .lr-band-bar i { background: #1d7a4b; }
.lr-band--good .lr-band-dot, .lr-band--good .lr-band-bar i { background: var(--brand); }
.lr-band--pass .lr-band-dot, .lr-band--pass .lr-band-bar i { background: #e08a1e; }
.lr-band--fail .lr-band-dot, .lr-band--fail .lr-band-bar i { background: #d0453d; }

/* 错题清零报告 */
.lr-table--clear thead th { white-space: nowrap; }
.lr-table--clear td { font-variant-numeric: tabular-nums; }
.lr-table--clear tbody tr:hover td { background: var(--surface-2); }
.lr-table-scroll { overflow-x: auto; }
.lr-table--clear-wide { min-width: 1180px; }
.lr-table--clear td:nth-child(3) { white-space: nowrap; }
.lr-table--clear .lr-stu-band { white-space: nowrap; }

.lr-ov-tag--select { background: #1f7a6b; }
.lr-ov .lr-ov-row--part { grid-template-columns: repeat(8, minmax(0, 165px)); justify-content: start; }
.lr-ov .lr-ov-row--select,
.lr-ov .lr-ov-row--must { grid-template-columns: repeat(4, minmax(0, 165px)); justify-content: start; }
.lr-ov .lr-ov-row--select .lr-ov-stat { grid-column: auto; }
/* 与教研中心·知识点诊断卡片对齐的紧凑尺寸 */
.lr-ov .lr-ov-row--part .lr-ov-stat,
.lr-ov .lr-ov-row--select .lr-ov-stat,
.lr-ov .lr-ov-row--must .lr-ov-stat { padding: 9px 12px; }
.lr-ov .lr-ov-row--part .lr-ov-stat b,
.lr-ov .lr-ov-row--select .lr-ov-stat b,
.lr-ov .lr-ov-row--must .lr-ov-stat b { margin-top: 2px; font-size: 15px; line-height: 18px; }

/* 学生作答统计 */
.lr-table--stu thead th { white-space: nowrap; }
.lr-table--stu tbody tr:hover td { background: var(--surface-2); }
.lr-stu-name { font-weight: 600; white-space: nowrap; }
.lr-stu-band {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px;
  font-size: 11px; font-weight: 500; line-height: 17px; vertical-align: 1px;
}
.lr-stu-band--great { color: #1d7a4b; background: #e8f5ee; }
.lr-stu-band--good { color: var(--brand); background: var(--brand-soft); }
.lr-stu-band--pass { color: #a5660f; background: #fdf3e2; }
.lr-stu-band--fail { color: #c0392b; background: #fdeaea; }
.lr-stu-score { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-stu-score b { font-size: 15px; font-weight: 700; }
.lr-stu-score span { margin-left: 2px; font-size: 12px; color: var(--text-muted); }
.lr-stu-score--great { color: #1d7a4b; }
.lr-stu-score--good { color: var(--brand); }
.lr-stu-score--pass { color: #e08a1e; }
.lr-stu-score--fail { color: #d0453d; }
.lr-stu-num { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
.lr-stu-num b { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lr-stu-watch { white-space: nowrap; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lr-stu-watch b { color: var(--text-primary); font-weight: 600; }

.lr-kv { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.lr-kv:last-child { border-bottom: none; }
.lr-kv span { color: var(--text-secondary); }
.lr-kv b { color: var(--text-primary); font-weight: 600; }

.lr-weak { display: flex; flex-direction: column; gap: 8px; }
.lr-weak-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.lr-weak-name { flex: 0 0 160px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-weak-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lr-weak-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.lr-weak-bar i.lr-weak-low { background: #c0392b; }
.lr-weak-bar i.lr-weak-mid { background: #e08a1e; }
.lr-weak-bar i.lr-weak-high { background: var(--status-good); }
.lr-weak-rate { flex: 0 0 52px; text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.lr-advice { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.lr-advice li { margin: 4px 0; }

.lr-textarea { min-height: 140px; resize: vertical; line-height: 1.6; font-family: inherit; }

.lr-push-scope { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.lr-push-checks { display: flex; gap: 20px; }
.lr-push-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-primary); cursor: pointer; }
.lr-push-check input { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }

/* 班级整体数据概览：考试成绩 / 错题清零统计两组 */
.lr-ov { display: flex; flex-direction: column; gap: 18px; }
.lr-ov-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #fff;
}
.lr-ov-tag--exam { background: #8a2f8f; }
.lr-ov-tag--clear { background: #b8561f; }
.lr-ov-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px 10px; }
.lr-ov-row + .lr-ov-row { margin-top: 4px; }
.lr-ov-stat, .lr-ov-mini {
  padding: 9px 12px 10px;
  border-radius: 8px;
  background: #e4f1f8;
  border: 1px solid #cfe4f1;
  box-shadow: 0 1px 2px rgba(23, 57, 95, 0.10);
}
.lr-ov-stat span, .lr-ov-mini span { display: block; font-size: 12px; color: #000; white-space: nowrap; }
.lr-ov-stat b, .lr-ov-mini b { display: block; margin-top: 4px; font-size: 17px; font-weight: 650; color: #000; font-variant-numeric: tabular-nums; }
.lr-ov-mini em { display: block; margin-top: 3px; font-size: 11.5px; font-style: normal; color: #000; }
.lr-ov .lr-stat-help { color: #000; border-color: rgba(0, 0, 0, 0.35); }
.lr-ov .lr-stat-help:hover { color: #000; border-color: #000; }
.lr-ov-row--rates .lr-ov-stat b { font-size: 15px; }
.lr-ov-note { margin-top: 10px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.lr-stat-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  vertical-align: 1px;
}
.lr-stat-help {
  padding: 0;
  font-family: inherit;
  background: transparent;
  appearance: none;
}
.lr-stat-help:hover { color: var(--brand); border-color: var(--brand); }
.lr-stat-help.on { background: rgba(0, 0, 0, 0.10); border-color: currentColor; }
.lr-tip-pop {
  position: absolute;
  z-index: 90;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #1f2d3d;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 6px 20px rgba(15, 30, 50, 0.22);
  pointer-events: none;
}
.lr-non { margin-top: 10px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }

.lr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lr-table th, .lr-table td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.lr-table thead th { background: var(--surface-2); color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.lr-table td { color: var(--text-secondary); }
.lr-table tbody tr:nth-child(even) { background: var(--surface-2); }
.lr-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.lr-table--tiers .lr-tier-names { min-width: 300px; line-height: 1.7; }
.lr-table--tiers th:nth-child(-n+2), .lr-table--tiers td:nth-child(-n+2) { white-space: nowrap; }
.lr-judge { max-width: 260px; }
.lr-stem { max-width: 340px; line-height: 1.6; }
.lr-err { color: #c0392b; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 题目分析表（班级报告 · 三） */
.lr-qa-wrap { overflow-x: auto; }
.lr-table--qa { table-layout: fixed; min-width: 1235px; }
.lr-table--qa th, .lr-table--qa td {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  vertical-align: middle;
  background: transparent;
}
.lr-table--qa thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
  vertical-align: middle;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.lr-table--qa thead th.lr-qa-group {
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.lr-table--qa thead tr:last-child th,
.lr-table--qa thead th[rowspan] { border-bottom: 1px solid var(--border-strong); }
.lr-qa-sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease;
}
.lr-qa-sort:hover { color: var(--brand); }
.lr-qa-sort.active { color: var(--brand); font-weight: 600; }
.lr-qa-sort-ico { font-style: normal; font-size: 10px; line-height: 1; opacity: .6; }
.lr-qa-sort:hover .lr-qa-sort-ico,
.lr-qa-sort.active .lr-qa-sort-ico { opacity: 1; }
.lr-table--qa tbody tr:nth-child(even) { background: transparent; }
.lr-table--qa tbody tr:hover { background: var(--surface-2); }
.lr-table--qa tbody tr:last-child td { border-bottom: 0; }
.lr-qa-no { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-qa-q { display: flex; align-items: flex-start; gap: 8px; }
.lr-qa-q .type-tag { flex-shrink: 0; margin-top: 1px; }
.lr-qa-stem {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  color: var(--text-primary);
}
.lr-qa-know { white-space: normal; word-break: break-word; line-height: 1.6; color: var(--text-secondary); }
.lr-qa-rate { position: relative; display: block; min-width: 80px; line-height: 1.3; }
.lr-qa-rate span { font-weight: 600; font-variant-numeric: tabular-nums; }
.lr-qa-bar {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border);
}
.lr-qa-bar b { display: block; height: 100%; border-radius: 2px; background: currentColor; }
.lr-qa-rate--good { color: var(--status-good); }
.lr-qa-rate--warn { color: #d9822b; }
.lr-qa-rate--bad { color: var(--status-critical); }
.lr-qa-plain { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-qa-diff { white-space: nowrap; }
.lr-qa-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.lr-qa-level--easy { background: color-mix(in srgb, var(--status-good) 12%, transparent); color: var(--status-good); }
.lr-qa-level--mid { background: color-mix(in srgb, var(--status-warning) 16%, transparent); color: #b7791f; }
.lr-qa-level--hard { background: color-mix(in srgb, var(--status-critical) 10%, transparent); color: var(--status-critical); }
.lr-qa-wrong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-qa-act { text-align: center; }
.lr-qa-act-head { width: 72px; }
.lr-qa-view {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.lr-qa-view:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); border-color: var(--brand); }

.lr-qa-detail-modal { max-width: 640px; }
.lr-qa-detail-sec { margin-bottom: 18px; }
.lr-qa-detail-sec:last-child { margin-bottom: 0; }
.lr-qa-detail-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.lr-qa-detail-stem { font-size: 13px; line-height: 1.7; color: var(--text-primary); }
.lr-qa-detail-stem .type-tag { margin-right: 8px; }
.lr-qa-detail-ans { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.lr-qa-detail-ans-row { margin-bottom: 4px; }
.lr-qa-detail-ans-row:last-child { margin-bottom: 0; }
.lr-qa-detail-ans-row b { color: var(--text-primary); font-weight: 600; margin-right: 6px; }
.lr-qa-steps-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 4px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.lr-qa-detail-wrong { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.lr-qa-detail-wrong b { color: var(--status-critical); font-weight: 600; margin-right: 8px; }

.lr-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.lr-status-mastered, .lr-status-solved { background: #e8f5ee; color: #1d7a4b; }
.lr-status-reinforce { background: #fdf3e3; color: #b06a12; }
.lr-status-unsolved { background: #fdeaea; color: #c0392b; }

.lr-concl { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lr-concl-item { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.6; }
.lr-concl-item b { flex: 0 0 auto; font-weight: 600; color: var(--text-primary); }
.lr-concl-item span { color: var(--text-secondary); }
.lr-concl-common { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; }

@media (max-width: 860px) {
  .lr-grid { grid-template-columns: 1fr; }
  .lr-weak-name { flex-basis: 110px; }
}

/* ==================== 教研中心·错误类型归因 ==================== */
.ea-body { display: flex; flex-direction: column; gap: 14px; }

.ea-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.ea-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ea-student { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ea-tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 10px;
}
.ea-stem {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.7;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.ea-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ea-field { margin-bottom: 12px; }
.ea-grid .ea-field { margin-bottom: 0; }
.ea-field:last-child { margin-bottom: 0; }
.ea-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ea-field-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.ea-answer { color: var(--status-good); font-weight: 600; }
.ea-steps {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.ea-steps li { margin: 2px 0; }
.ea-causes { display: flex; flex-direction: column; gap: 8px; }
.ea-cause {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.ea-cause-rank {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 1px;
}
.ea-cause-body { min-width: 0; }
.ea-cause-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ea-cause-basis { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; margin-top: 2px; }

@media (max-width: 860px) {
  .ea-grid { grid-template-columns: 1fr; }
}

/* ==================== 教研中心·知识点诊断 ==================== */
.kd-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  margin-top: 14px;
}
.kd-card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }

/* 知识图谱：按模块分组的知识点节点 */
.kd-graph { display: flex; flex-direction: column; gap: 14px; }
.kd-module { display: flex; gap: 14px; align-items: flex-start; }
.kd-module-name {
  flex: 0 0 84px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  padding-top: 8px;
  text-align: right;
}
.kd-module-nodes { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.kd-node {
  min-width: 132px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.kd-node-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.kd-node-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kd-node-excellent { border-color: color-mix(in srgb, var(--status-good) 45%, transparent); background: color-mix(in srgb, var(--status-good) 10%, #fff); }
.kd-node-good { border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.kd-node-attention { border-color: color-mix(in srgb, var(--status-warning) 50%, transparent); background: color-mix(in srgb, var(--status-warning) 12%, #fff); }
.kd-node-weak { border-color: color-mix(in srgb, var(--status-critical) 45%, transparent); background: color-mix(in srgb, var(--status-critical) 9%, #fff); }

/* 明细表格 */
.kd-table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.kd-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.kd-tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.kd-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.kd-tbl tr:last-child td { border-bottom: none; }
.kd-tbl tbody tr:nth-child(even) { background: var(--surface-2); }
.kd-td-name { font-weight: 600; color: var(--text-primary); }
.kd-mod-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--deemph-fill);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.kd-td-mastery { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.kd-mastery { flex: 1; height: 8px; border-radius: 999px; background: var(--deemph-fill); overflow: hidden; }
.kd-mastery-fill { display: block; height: 100%; border-radius: 999px; }
.kd-mastery-excellent { background: var(--status-good); }
.kd-mastery-good { background: var(--brand); }
.kd-mastery-attention { background: var(--status-warning); }
.kd-mastery-weak { background: var(--status-critical); }
.kd-mastery-pct { font-size: 12.5px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kd-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.kd-status-excellent { background: #e8f5ee; color: #1d7a4b; }
.kd-status-good { background: #eaf2fc; color: #256abf; }
.kd-status-attention { background: #fdf3e3; color: #b06a12; }
.kd-status-weak { background: #fdeaea; color: #c0392b; }

@media (max-width: 860px) {
  .kd-module { flex-direction: column; gap: 8px; }
  .kd-module-name { flex: none; text-align: left; padding-top: 0; }
  .kd-td-mastery { min-width: 130px; }
}

/* ==================== 命题质量分析 ==================== */
.qq-card { margin-top: 14px; }
.qq-ind-name { font-weight: 600; }
.qq-ind-desc { color: var(--text-muted); }
.qq-ind-weight { font-variant-numeric: tabular-nums; }
.qq-table-wrap { overflow-x: auto; }
.qq-stem { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qq-select { width: 100%; min-width: 84px; }
.qq-ind-edit-head { display: grid; grid-template-columns: 1fr 2fr 84px 60px; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--text-secondary); }
.qq-ind-edit-row { display: grid; grid-template-columns: 1fr 2fr 84px 60px; gap: 8px; margin-bottom: 8px; align-items: center; }
.qq-ind-edit-row .input { width: 100%; min-width: 0; }

/* ==================== 备课素材 ==================== */
.lmb-topbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
}
.lmb-topbar .lmb-search { flex: 1; min-width: 180px; }
.lmb-topbar .lmb-search .input { width: 100%; }

.lmb-tabs { margin-bottom: 12px; }
.lmb-view { min-height: 480px; }

/* 素材库三栏布局 */
.lmb-lib {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap: 14px; align-items: start;
}

/* 左栏：教材目录树 */
.lmb-tree { padding: 0; overflow: hidden; background: var(--surface-2); }
.lmb-tree-list { padding: 8px 10px 12px; max-height: 720px; overflow: auto; }
.lmb-tree-ch { margin-bottom: 6px; }
.lmb-tree-ch-head, .lmb-tree-sec-head {
  display: flex; align-items: center; gap: 4px; width: 100%;
  border: none; background: none; cursor: pointer; padding: 4px 6px;
  font-size: 13px; font-weight: 600; color: var(--text-primary); text-align: left;
  border-radius: 6px;
}
.lmb-tree-ch-head:hover, .lmb-tree-sec-head:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.lmb-tree-ch-head.active .lmb-tree-ch-name { color: var(--brand); }
.lmb-tree-sec-head.active { color: var(--brand); font-weight: 600; }
.lmb-tree-arrow { font-size: 10px; color: var(--text-muted); transition: transform .15s; }
.lmb-tree-secs { padding-left: 10px; border-left: 1px solid var(--border); margin-left: 6px; }
.lmb-tree-sec-head { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.lmb-tree-leaves { padding-left: 12px; }
.lmb-tree-secs.hide, .lmb-tree-leaves.hide { display: none; }
.lmb-tree-leaf {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; border: none; background: none; cursor: pointer;
  padding: 4px 8px; font-size: 12.5px; color: var(--text-secondary); text-align: left;
  border-radius: 6px;
}
.lmb-tree-leaf:hover { background: var(--surface-2); color: var(--text-primary); }
.lmb-tree-leaf.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lmb-tree-leaf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmb-tree-leaf-count { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 中栏：课时信息 / 推荐 / 卡片 */
.lmb-mid { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lmb-lesson-info {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.lmb-lesson-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.lmb-lesson-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 5px; line-height: 1.6; }
.lmb-goals { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.lmb-gchip {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; color: var(--brand);
}

.lmb-recommend { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.lmb-recommend-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lmb-recommend-sub { font-size: 11.5px; color: var(--text-muted); }
.lmb-recommend-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lmb-rec-card {
  flex: 0 0 calc((100% - 20px) / 3); min-width: 180px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: var(--surface-1);
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.lmb-rec-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 10%, transparent); }
.lmb-rec-top { display: flex; align-items: flex-start; gap: 8px; }
.lmb-rec-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.lmb-rec-reason { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }
.lmb-rec-actions { display: flex; gap: 6px; margin-top: auto; }

.lmb-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lmb-filter .select { min-width: 120px; }
.lmb-filter .input { flex: 1; min-width: 140px; }
.lmb-filter .lmb-fbar { margin: 0; }
.lmb-filter .lmb-fchip { flex: 0 0 auto; }
.lmb-kw { flex: 1 1 160px; min-width: 140px; }
.lmb-pack-sum { padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; }
.lmb-pack-sum-row { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--text-secondary); }
.lmb-pack-sum-row:last-child { margin-bottom: 0; }
.lmb-pack-sum-row b { color: var(--brand); font-weight: 600; }

.lmb-materials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* 素材卡片 */
.lm-card {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; background: var(--surface-1);
}
.lm-card-top { display: flex; align-items: flex-start; gap: 9px; }
.lm-card-body { flex: 1; min-width: 0; }
.lm-mico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.lm-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.lm-card-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.lm-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.lm-card-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--text-secondary); }
.lm-card-stats b { color: var(--text-primary); font-weight: 600; }
.lm-card-stars { color: var(--series-4); }
.lm-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.lm-card-fav {
  flex-shrink: 0; border: none; background: none; cursor: pointer; font-size: 16px;
  color: var(--text-muted); line-height: 1; margin-top: 2px;
}
.lm-card-fav.is-fav { color: var(--series-4); }
.lm-tag {
  font-size: 11px; color: var(--text-secondary);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px;
}
.lm-tag.blue { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.lm-tag.green { color: var(--series-3); background: color-mix(in srgb, var(--series-3) 12%, transparent); border-color: color-mix(in srgb, var(--series-3) 30%, transparent); }
.lm-tag.orange { color: var(--series-2); background: color-mix(in srgb, var(--series-2) 12%, transparent); border-color: color-mix(in srgb, var(--series-2) 30%, transparent); }
.lm-tag.purple { color: var(--series-7); background: color-mix(in srgb, var(--series-7) 12%, transparent); border-color: color-mix(in srgb, var(--series-7) 30%, transparent); }
.lm-type-badge {
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 4px; padding: 1px 7px; width: fit-content;
}
.lm-avail-tag {
  font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 8px;
  width: fit-content; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary);
}
.lm-avail-tag.lm-avail-拿来即用 { color: var(--series-3); background: color-mix(in srgb, var(--series-3) 12%, transparent); border-color: color-mix(in srgb, var(--series-3) 35%, transparent); }
.lm-avail-tag.lm-avail-改改就能用 { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.lm-avail-tag.lm-avail-参考思路 { color: var(--series-2); background: color-mix(in srgb, var(--series-2) 12%, transparent); border-color: color-mix(in srgb, var(--series-2) 35%, transparent); }
.lm-empty { font-size: 12.5px; color: var(--text-muted); text-align: center; padding: 24px 0; }

/* 右栏：备课包 */
.lmb-pack { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lmb-pack-count { font-size: 12px; color: var(--text-muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.lmb-pack-list { padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.lmb-pack-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; background: var(--surface-2);
}
.lmb-pack-title { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmb-pack-del {
  flex-shrink: 0; border: none; background: none; cursor: pointer;
  color: var(--text-muted); font-size: 13px; line-height: 1;
}
.lmb-pack-del:hover { color: var(--status-critical); }
.lmb-pack-actions { padding: 10px 12px 12px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; }

/* 视图二：学情联动（闭环流程条 + 两栏联动） */
.lmb-flow {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 13px;
  padding: 14px; margin-bottom: 13px;
}
.lmb-fnode {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  color: var(--brand); border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 12.5px;
}
.lmb-farrow { color: var(--text-muted); font-size: 15px; }
.lmb-an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; align-items: start; }
.lmb-weak-list { display: flex; flex-direction: column; gap: 9px; }
.lmb-weak-item {
  text-align: left; cursor: pointer; width: 100%;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-1);
  transition: border-color .12s, box-shadow .12s;
}
.lmb-weak-item:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.lmb-weak-item.active {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 8%, transparent);
}
.lmb-weak-wt { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.lmb-weak-kp { color: var(--text-primary); }
.lmb-weak-wm { font-size: 11.5px; color: var(--text-muted); line-height: 1.8; }
.lmb-weak-recs { display: flex; flex-direction: column; gap: 9px; }
.lmb-rec-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-1); }
.lmb-rec-info { flex: 1; min-width: 0; }
.lmb-rec-title { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmb-rec-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.lmb-rec-acts { flex-shrink: 0; display: flex; gap: 6px; }
.lmb-alert { border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.7; color: var(--text-secondary); }
.lmb-alert.warn { background: color-mix(in srgb, var(--series-4) 10%, transparent); border-left: 3px solid var(--series-4); }
.lmb-alert.inf { background: var(--brand-soft); border-left: 3px solid var(--brand); color: var(--text-primary); }
.lm-tag.red { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); border-color: color-mix(in srgb, var(--status-critical) 30%, transparent); }

/* 视图三 / 四：表格 */
.lmb-school-table-wrap { overflow-x: auto; }
.lmb-school-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lmb-school-tbl th, .lmb-school-tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lmb-school-tbl thead th { background: var(--surface-2); color: var(--text-secondary); font-weight: 600; font-size: 12px; }
.lmb-school-tbl tbody tr:hover { background: var(--surface-2); }
.lmb-school-tbl tbody tr:last-child td { border-bottom: none; }
.lmb-school-tbl td { color: var(--text-primary); }
.lmb-school-title { font-weight: 600; }
.lmb-school-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.lmb-school-note { white-space: normal; color: var(--text-muted); font-size: 11.5px; max-width: 220px; line-height: 1.5; }
.lmb-fbar { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.lmb-fchip {
  cursor: pointer; border: 1px solid var(--border); background: var(--surface-1);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; color: var(--text-secondary);
}
.lmb-fchip:hover { border-color: var(--brand); color: var(--brand); }
.lmb-fchip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.lmb-status {
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px;
  background: var(--surface-2); color: var(--text-secondary);
}
.lmb-status-草稿 { color: var(--text-secondary); background: var(--surface-2); }
.lmb-status-待审核 { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.lmb-status-已上架 { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.lmb-status-待优化 { color: var(--series-4); background: color-mix(in srgb, var(--series-4) 14%, transparent); }
.lmb-status-已下架 { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 12%, transparent); }

/* 视图四：使用留痕 */
.lmb-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.lmb-kpi-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-1); }
.lmb-kpi-label { font-size: 12px; color: var(--text-muted); }
.lmb-kpi-value { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.lmb-kpi-sub { font-size: 11.5px; color: var(--series-3); margin-top: 3px; }
.lmb-weights { display: flex; flex-direction: column; gap: 8px; }
.lmb-weight-row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 12px; align-items: center; }
.lmb-weight-name { font-size: 12.5px; color: var(--text-primary); }
.lmb-weight-row input[type=range] { width: 100%; }
.lmb-weight-val { font-size: 12px; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }

/* 预览器 */
.lmb-dlay { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.lmb-preview-left { min-width: 0; }
.lmb-pstage {
  height: 460px; overflow: auto; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.lmb-pside { display: flex; flex-direction: column; gap: 11px; }
.lmb-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; padding: 6px 9px; background: var(--surface-2); border-radius: 7px; margin-bottom: 6px;
}
.lmb-row-k { color: var(--text-muted); flex-shrink: 0; }
.lmb-row-v { font-weight: 600; text-align: right; max-width: 60%; color: var(--text-primary); }
.lmb-avail-link {
  border: none; background: none; cursor: pointer; padding: 0;
  font-size: 12px; font-weight: 600; color: var(--brand); text-align: right;
}
.lmb-sact { display: flex; flex-direction: column; gap: 6px; }
.lmb-block { width: 100%; }
.lmb-ai-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--series-7) 8%, #fff), var(--brand-soft));
  border: 1px solid color-mix(in srgb, var(--series-7) 20%, transparent);
  border-radius: 10px; padding: 12px 14px;
}
.lmb-ai-title { font-size: 12.5px; font-weight: 700; color: var(--series-7); margin-bottom: 5px; }
.lmb-ai-text { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.lmb-side-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.lmb-rel-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.lmb-rel-title { min-width: 0; font-size: 12.2px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmb-copyright {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.lmb-copyright-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.lmb-copyright-line { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.lmb-preview-stage { display: flex; flex-direction: column; gap: 12px; }
.lmb-pager { display: flex; align-items: center; gap: 10px; justify-content: center; }
.lmb-pager-info { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lmb-slide {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 22px 20px; background: var(--surface-1); min-height: 220px;
}
.lmb-slide-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.lmb-slide-line { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }

/* 课件（PPT）幻灯片：封面 / 图文内容页 */
.lmb-ppt {
  position: relative; min-height: 400px; display: flex; flex-direction: column;
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 8px; padding: 26px 30px;
}
.lmb-ppt-kick { font-size: 10.5px; color: var(--text-muted); letter-spacing: 2px; margin-bottom: 10px; }
.lmb-ppt-cover { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.lmb-ppt-big { font-size: 26px; font-weight: 800; color: #1e3a8a; line-height: 1.35; }
.lmb-ppt-rule { width: 54px; height: 3px; border-radius: 2px; background: var(--brand); margin: 14px auto; }
.lmb-ppt-sub { font-size: 12px; color: var(--text-secondary); line-height: 2; }
.lmb-ppt-h {
  font-size: 16px; font-weight: 800; color: #1e3a8a;
  padding-left: 11px; border-left: 4px solid var(--brand); margin-bottom: 14px;
}
.lmb-ppt-list { margin: 0 0 10px; padding-left: 20px; }
.lmb-ppt-list li { font-size: 12.5px; color: #334155; line-height: 1.8; margin-bottom: 7px; }
.lmb-ppt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.lmb-ppt-col {
  background: #fff; border: 1px solid var(--border); border-radius: 7px;
  padding: 10px 12px; font-size: 12px; color: var(--text-secondary);
}
.lmb-ppt-col b { display: block; color: #1e3a8a; margin-bottom: 5px; }
.lmb-ppt-col ul { margin: 0; padding-left: 16px; line-height: 1.8; }
.lmb-ppt-figure {
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  margin: 4px 0 10px; padding: 6px;
}
.lmb-ppt-box {
  background: #eff6ff; border: 1px solid #dbeafe; color: #1e40af;
  border-radius: 7px; padding: 10px 12px; font-size: 12px; line-height: 1.7; margin-top: auto;
}
.lmb-ppt-box.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.lmb-ppt-num { position: absolute; right: 16px; bottom: 10px; font-size: 10.5px; color: var(--text-muted); }
.lmb-video-player {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 8px; min-height: 140px;
  background: var(--surface-2); color: var(--text-secondary);
}
.lmb-video-play { font-size: 28px; }
.lmb-chapters { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.lmb-chapters-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.lmb-chapter {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: none; background: none; padding: 5px 6px; border-radius: 6px;
  font-size: 12.5px; color: var(--text-secondary);
}
.lmb-chapter:hover { background: var(--brand-soft); color: var(--brand); }

/* 微课 / 视频播放器 */
.lmb-vid {
  background: #0f172a; border-radius: 10px; padding: 14px;
  color: #e2e8f0; display: flex; flex-direction: column; min-height: 400px;
}
.lmb-vscr {
  flex: 1; min-height: 210px; border-radius: 8px; border: 1px solid #334155;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.lmb-vplay {
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer; border: none;
  background: color-mix(in srgb, var(--brand) 90%, #fff); color: #fff;
  font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.lmb-vplay:hover { background: var(--brand); }
.lmb-vcap { font-size: 12.5px; color: #cbd5e1; text-align: center; padding: 0 18px; line-height: 1.7; }
.lmb-vbar { margin-top: 12px; }
.lmb-vprog { height: 5px; background: #334155; border-radius: 3px; overflow: hidden; }
.lmb-vprog > div { height: 100%; background: var(--brand); border-radius: 3px; transition: width .35s linear; }
.lmb-vtime { display: flex; justify-content: space-between; font-size: 10.5px; color: #94a3b8; margin-top: 5px; font-variant-numeric: tabular-nums; }
.lmb-chlist { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.lmb-chitem {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 10px; border: none; border-radius: 6px; background: #1e293b;
  font-size: 11.5px; color: #cbd5e1; cursor: pointer; text-align: left;
}
.lmb-chitem:hover { background: #243449; }
.lmb-chitem.active { background: #1d4ed8; color: #fff; }
.lmb-image {
  display: flex; align-items: center; justify-content: center; min-height: 200px;
  border: 1px dashed var(--border-strong); border-radius: 8px;
  background: var(--surface-2); color: var(--text-secondary); font-size: 15px;
}
.lmb-hint { font-size: 11.5px; color: var(--text-muted); text-align: center; }
.lmb-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.lmb-steps li { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
.lmb-mind { display: flex; flex-direction: column; gap: 12px; }
.lmb-mind-root {
  align-self: center; font-size: 15px; font-weight: 700; color: var(--text-primary);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  border-radius: 8px; padding: 8px 18px;
}
.lmb-mind-branches { display: flex; flex-direction: column; gap: 8px; }
.lmb-mind-branch-head {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px;
  padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.lmb-mind-leaves { padding: 4px 10px 4px 24px; display: flex; flex-direction: column; gap: 4px; }
.lmb-mind-leaves.collapsed { display: none; }
.lmb-mind-leaf { font-size: 12.5px; color: var(--text-secondary); }
.lmb-kcard { perspective: 1000px; width: 260px; height: 160px; align-self: center; cursor: pointer; }
.lmb-kcard-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.lmb-kcard.flipped .lmb-kcard-inner { transform: rotateY(180deg); }
.lmb-kcard-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 10px; padding: 18px; font-size: 14px; font-weight: 600;
}
.lmb-kcard-front { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand); }
.lmb-kcard-back { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary); transform: rotateY(180deg); }
.lmb-venn { display: flex; gap: 12px; }
.lmb-venn-col { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.lmb-venn-col-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.lmb-venn-item { font-size: 12.5px; color: var(--text-secondary); padding: 3px 0; }
.lmb-quiz { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.lmb-quiz-stem { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.lmb-quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.lmb-quiz-opt {
  text-align: left; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: 6px; padding: 6px 10px; font-size: 12.5px; color: var(--text-primary);
}
.lmb-quiz-opt:hover { border-color: var(--brand); }
.lmb-quiz-opt.picked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lmb-quiz-ans { font-size: 12.5px; color: var(--text-secondary); background: var(--surface-2); border-radius: 6px; padding: 8px 10px; line-height: 1.6; }
.lmb-quiz .btn { align-self: flex-start; }

/* 弹框 */
.lmb-avail-list { display: flex; flex-direction: column; gap: 8px; }
.lmb-avail-row { display: flex; align-items: center; gap: 12px; }
.lmb-avail-rule { flex: 1; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.lmb-version-list { display: flex; flex-direction: column; gap: 8px; }
.lmb-version-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.lmb-version-v { font-size: 12px; font-weight: 700; color: var(--brand); }
.lmb-version-info { flex: 1; font-size: 12.5px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 3px; }
.lmb-version-name { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.lmb-version-meta { font-size: 11px; color: var(--text-muted); }
.lmb-version-acts { display: flex; gap: 5px; flex-shrink: 0; }
.lmb-basket-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 8px 4px; }
.lmb-basket-no { flex-shrink: 0; font-size: 12.5px; color: var(--text-muted); }
.lmb-basket-stem { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmb-product-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lmb-product-tbl th, .lmb-product-tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.lmb-product-tbl th { color: var(--text-muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.lmb-product-tbl td { color: var(--text-primary); }
.lmb-product-tbl td:last-child { color: var(--text-secondary); }

/* ==================== 权限管理 ==================== */
.pm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pm-kpi {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); padding: 13px 16px;
}
.pm-kpi-label { font-size: 12px; color: var(--text-muted); }
.pm-kpi-value { font-size: 23px; font-weight: 700; color: var(--text-primary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.pm-kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

.pm-tabs { margin: 16px 0 14px; }
.pm-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.pm-roles-card { padding: 0; overflow: hidden; }
.pm-roles-card .card-head { padding: 14px 16px 10px; margin: 0; }
.pm-role-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 640px; overflow: auto; }
.pm-role-item {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid transparent; background: none; border-radius: 9px;
  padding: 9px 10px; transition: background .15s, border-color .15s;
}
.pm-role-item:hover { background: var(--surface-2); }
.pm-role-item.active { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 28%, transparent); }
.pm-role-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-role-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pm-role-tag {
  font-size: 10.5px; font-weight: 500; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.pm-role-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.pm-level { font-size: 10.5px; font-weight: 500; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.pm-level-l1 { color: #5b4b9e; background: color-mix(in srgb, #5b4b9e 12%, transparent); }
.pm-level-l2 { color: var(--brand); background: var(--brand-soft); }
.pm-level-l3 { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.pm-level-l4 { color: var(--text-secondary); background: var(--surface-2); }

.pm-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pm-role-head { display: flex; align-items: flex-start; gap: 14px; }
.pm-role-head-main { flex: 1; min-width: 0; }
.pm-role-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.pm-role-duty { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; line-height: 1.6; }
.pm-role-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.pm-chip {
  font-size: 11.5px; color: var(--text-secondary);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 9px;
}
.pm-role-acts { flex-shrink: 0; display: flex; gap: 6px; }

.pm-func-card .card-head { flex-wrap: wrap; }
.pm-func-list { display: flex; flex-direction: column; gap: 12px; }
.pm-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pm-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--surface-2);
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.pm-group-head span { font-weight: 400; color: var(--text-muted); }
.pm-func-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) 92px 152px 110px;
  gap: 10px; align-items: center;
  padding: 9px 12px; border-top: 1px solid var(--border);
}
.pm-func-row.is-off .pm-func-name { font-weight: 500; color: var(--text-secondary); }
.pm-func-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.pm-func-path { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pm-perm {
  justify-self: start; font-size: 11.5px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.pm-perm-off { color: var(--text-muted); background: var(--surface-2); border: 1px dashed var(--border); }
.pm-func-none { justify-self: end; font-size: 12px; color: var(--text-muted); }
.pm-perm-可用, .pm-perm-审核 { color: var(--brand); background: var(--brand-soft); }
.pm-perm-使用 { color: var(--series-3); background: color-mix(in srgb, var(--series-3) 12%, transparent); }
.pm-perm-查看 { color: var(--text-secondary); background: var(--surface-2); }
.pm-perm-参与 { color: var(--series-4); background: color-mix(in srgb, var(--series-4) 12%, transparent); }
.pm-perm-提交建议 { color: var(--series-7); background: color-mix(in srgb, var(--series-7) 12%, transparent); }
.pm-scope { font-size: 12px; color: var(--text-secondary); }
.pm-func-acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.pm-empty { padding: 26px 12px; text-align: center; font-size: 12.5px; color: var(--text-muted); }

.pm-grant-wrap { overflow-x: auto; margin-top: 12px; }
.pm-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pm-tbl th, .pm-tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pm-tbl thead th { background: var(--surface-2); color: var(--text-secondary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pm-tbl tbody tr:hover { background: var(--surface-2); }
.pm-tbl tbody tr:last-child td { border-bottom: none; }
.pm-grant-menus { display: flex; flex-wrap: wrap; gap: 4px; }
.pm-grant-menu {
  font-size: 11.5px; color: var(--text-secondary);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px;
}
.pm-grant-teacher { font-weight: 600; color: var(--text-primary); }
.pm-grant-phone { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.pm-status { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pm-status-on { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 12%, transparent); }
.pm-status-pending { color: #b7791f; background: color-mix(in srgb, var(--status-warning) 18%, transparent); }
.pm-status-expired { color: var(--text-muted); background: var(--surface-2); }

.modal-pm { max-width: 840px; }
.pm-pick-list { display: flex; flex-direction: column; gap: 12px; max-height: 56vh; overflow: auto; padding-right: 4px; }
.pm-pick-group { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pm-pick-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface-2);
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.pm-pick-all { accent-color: var(--brand); }
.pm-pick-count { margin-left: auto; font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
.pm-pick-group .pm-check { padding: 5px 10px; border-top: 1px solid var(--border); }
.pm-pick-row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) 100px 166px;
  gap: 10px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--border);
  transition: background .15s ease;
}
.pm-pick-row:hover { background: var(--surface-2); }
.pm-pick-row.is-on { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.pm-pick-row > input[type="checkbox"], .pm-pick-head > input[type="checkbox"] {
  width: 14px; height: 14px; margin: 0; accent-color: var(--brand); cursor: pointer;
}
.pm-pick-row .select { width: 100%; min-width: 0; height: 30px; padding: 4px 8px; font-size: 12px; }
.pm-pick-name { font-size: 13px; color: var(--text-primary); }
.pm-menu-checks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px;
  max-height: 210px; overflow: auto;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.pm-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-primary); }
.pm-check input { accent-color: var(--brand); }

/* 负责班级：多选 */
.pm-class-btn {
  width: 100%; min-height: 30px; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface-1);
  padding: 5px 9px; font-size: 11.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-class-btn:hover { border-color: var(--brand); color: var(--brand); }
.pm-class-row { padding: 10px 12px; border-top: 1px dashed var(--border); background: var(--surface-2); }
.pm-class-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pm-class-head {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.pm-class-title { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.pm-class-acts { margin-left: auto; display: flex; gap: 10px; }
.pm-class-link { border: none; background: none; padding: 0; font-size: 11.5px; color: var(--brand); cursor: pointer; }
.pm-class-link:hover { text-decoration: underline; }
.pm-class-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px;
  padding: 7px 10px; max-height: 170px; overflow: auto; background: var(--surface-1);
}
.pm-class-grade { grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: var(--text-muted); padding-top: 4px; }
.pm-class-grade:first-child { padding-top: 0; }
.pm-class-opt {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-secondary); padding: 2px 0; cursor: pointer; white-space: nowrap;
}
.pm-class-opt input { accent-color: var(--brand); margin: 0; }
.pm-reco {
  font-size: 10px; color: var(--brand); background: var(--brand-soft);
  border-radius: 999px; padding: 1px 6px; margin-left: 6px; white-space: nowrap;
}
.pm-edit-scope-hint { font-size: 11.5px; color: var(--text-muted); }

/* 功能申请 */
.pm-approver {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: 9px; background: color-mix(in srgb, var(--brand) 4%, var(--surface-1));
  padding: 9px 12px; margin-bottom: 12px;
}
.pm-approver-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.pm-approver .select { width: 160px; height: 30px; padding: 4px 8px; font-size: 12px; }
.pm-approver-hint { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
#pm-func-body > .form-hint { margin: 0 0 10px; line-height: 1.7; }
.pm-app-list { display: flex; flex-direction: column; }
.pm-app-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 172px 78px 120px;
  gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--border);
}
.pm-app-func { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-app-chip {
  font-size: 11.5px; color: var(--text-secondary); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px;
}
.pm-app-meta { font-size: 11.5px; color: var(--text-muted); }
.pm-app-acts { display: flex; gap: 6px; justify-content: flex-end; }

@media (max-width: 1200px) {
  .pm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .pm-func-row { grid-template-columns: minmax(0, 1.3fr) 85px 124px 96px; }
  .pm-app-row { grid-template-columns: minmax(0, 1fr) 150px 76px 120px; }
  .pm-class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pm-layout { grid-template-columns: 1fr; }
  .pm-menu-checks { grid-template-columns: 1fr; }
  .pm-app-row { grid-template-columns: 1fr; gap: 6px; }
  .pm-app-acts { justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .lmb-lib { grid-template-columns: 1fr; }
}

/* ==========================================================================
   创建新作业 · 两步向导
   ========================================================================== */
#page-hw-create { gap: 20px; }
#page-hw-edit { gap: 20px; }

/* 编辑作业：题目平铺列表（按当前顺序，可上移 / 下移 / 编辑 / 删除） */
.hwe-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hwe-list[hidden] { display: none; }
.hwe-q {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.hwe-q:last-child { border-bottom: none; }
.hwe-q-no { color: var(--text-muted); font-variant-numeric: tabular-nums; padding-top: 1px; min-width: 18px; }
.hwe-q .type-tag { margin-top: 0; }
.hwe-q-main { flex: 1; min-width: 0; }
.hwe-q-stem { font-size: 13px; color: var(--text-primary); line-height: 1.55; }
.hwe-q-src { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.hwe-q-ops { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.hwe-op {
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.hwe-op:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.hwe-op:disabled { opacity: .35; cursor: not-allowed; }
.hwe-op-del:hover:not(:disabled) { color: var(--status-critical); border-color: var(--status-critical); }
.hwe-opt-list { display: flex; flex-direction: column; gap: 8px; }
.hwe-opt-row { display: flex; align-items: center; gap: 8px; }
.hwe-opt-label { width: 16px; font-size: 12px; color: var(--text-muted); text-align: center; }

.hwc-head {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px 20px;
  box-shadow: var(--shadow-card);
}
.hwc-back {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.hwc-back:hover { color: var(--brand); }
.hwc-title-row { display: flex; align-items: center; margin-top: 6px; }
.hwc-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-primary); }
.hwc-title-row .btn { margin-left: auto; }

.hwc-steps { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.hwc-step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.hwc-step-no {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid #cbd5e1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.hwc-step.is-active { color: var(--brand); font-weight: 600; }
.hwc-step.is-active .hwc-step-no { background: var(--brand); border-color: var(--brand); color: #fff; }
.hwc-step.is-done { color: var(--status-good); }
.hwc-step.is-done .hwc-step-no { background: var(--status-good); border-color: var(--status-good); color: #fff; }
.hwc-step-line { flex: 1; height: 1px; background: #e2e8f0; }

.hwc-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

.hwc-pick-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.hwc-pick-title h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.hwc-summary { margin: 0; font-size: 12px; color: var(--text-muted); }
.hwc-pick-actions { display: flex; align-items: flex-end; gap: 12px; flex: 0 0 auto; }
.hwc-subject-field label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-secondary); }
.hwc-subject-field .select { width: 232px; }
.hwc-field em, .hwc-subject-field em { color: var(--status-critical); font-style: normal; }
.hwc-bank-btn:disabled { opacity: .45; cursor: not-allowed; }

.hw-pick-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  background: #fcfdff;
}
.hwc-empty-icon { display: block; margin: 0 auto 12px; }
.hwc-empty-hint { margin-top: 8px; font-size: 13px; color: #d98b2b; }

.hwc-foot { display: flex; align-items: center; gap: 12px; }
.hwc-foot-hint { font-size: 12px; color: var(--text-muted); }
.hwc-foot #hwc-next { margin-left: auto; }
.hwc-foot-actions { margin-left: auto; display: flex; gap: 12px; }

.hwc-card-title { margin: 0 0 18px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.hwc-basic {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 20px;
  padding: 18px 20px 14px;
  margin-bottom: 20px;
  border: 1px dashed #d5dbe6;
  border-radius: 10px;
  background: #fafbfe;
}
.hwc-field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.hwc-field .select, .hwc-field .input { width: 100%; }
.hwc-hint { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.hwc-readonly {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--text-primary);
}
.hwc-field-full { margin-bottom: 20px; }
.hwc-field-full:last-of-type { margin-bottom: 0; }
.hwc-time-row { display: flex; gap: 20px; }
.hwc-time { flex: 1; }
.hwc-time span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }

.hwc-multi { position: relative; }
.hwc-multi-btn {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 12px;
  text-align: left;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}
.hwc-multi-btn.has-value { color: var(--text-primary); }
.hwc-multi-btn::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: translateY(-70%) rotate(45deg);
}
.hwc-multi-pop {
  position: absolute;
  z-index: 30;
  left: 0; right: 0; top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.hwc-multi-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}
.hwc-multi-opt:hover { background: var(--surface-2); }
.hwc-multi-opt input { accent-color: var(--brand); margin: 0; }

@media (max-width: 1100px) {
  .hwc-basic { grid-template-columns: 1fr; }
  .hwc-pick-head { flex-direction: column; }
  .hwc-pick-actions { width: 100%; }
  .hwc-subject-field { flex: 1; }
  .hwc-subject-field .select { width: 100%; }
}

/* ==========================================================================
   错题本 · 四类错题（作业 / 考试 / 收藏 / 顽固）视觉升级
   ========================================================================== */
#mbk-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 18px 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
#mbk-tabs .mb-tab {
  margin: 0;
  padding: 8px 18px;
  border: none;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
#mbk-tabs .mb-tab:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--surface-1) 70%, transparent);
}
#mbk-tabs .mb-tab.active {
  color: var(--brand);
  background: var(--surface-1);
  box-shadow: 0 1px 3px rgba(20, 35, 60, 0.1);
}

#mbk-list { gap: 14px; }
#mbk-list .mb-card {
  position: relative;
  padding: 18px 22px 18px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(20, 35, 60, 0.04);
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
#mbk-list .mb-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand);
  opacity: 0.55;
}
#mbk-list .mb-card.is-hot::before { background: var(--status-critical); opacity: 0.9; }
#mbk-list .mb-card:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 10px 24px rgba(20, 35, 60, 0.08);
  transform: translateY(-1px);
}

#mbk-list .mb-card-head { margin-bottom: 12px; gap: 12px; }
.mb-head-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
#mbk-list .mbk-hot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--status-critical);
  background: color-mix(in srgb, var(--status-critical) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-critical) 28%, transparent);
  border-radius: 999px;
}
#mbk-list .mbk-hot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
#mbk-list .mb-know {
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 999px;
}
#mbk-list .mb-type {
  padding: 3px 9px;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
#mbk-list .mb-src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
#mbk-list .mb-src::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.mb-err {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--status-critical);
  background: color-mix(in srgb, var(--status-critical) 7%, transparent);
  border-radius: 999px;
  white-space: nowrap;
}
.mb-err b { font-size: 15px; font-weight: 700; margin: 0 1px; }

#mbk-list .mb-stem {
  margin-bottom: 12px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-primary);
}

#mbk-list .mb-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
#mbk-list .mb-option {
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 0.15s, border-color 0.15s;
}
#mbk-list .mb-option:hover {
  background: var(--surface-1);
  border-color: var(--border-strong);
}

#mbk-list .mb-students {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
#mbk-list .mb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.mb-chip-name { font-weight: 600; color: var(--text-primary); }
.mb-chip-cls { color: var(--text-muted); }

#mbk-reset {
  align-self: flex-end;
  height: 33px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* 勾选错题 → 组卷 */
#mbk-list .mbk-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
#mbk-list .mbk-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-1);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
#mbk-list .mbk-check input:hover { border-color: var(--brand); }
#mbk-list .mbk-check input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
#mbk-list .mbk-check input:checked {
  border-color: var(--brand);
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
}
#mbk-list .mb-card.is-selected {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--border));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 14%, transparent);
}

.mbk-selbar {
  position: sticky;
  bottom: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface-1);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(20, 35, 60, 0.16);
}
.mbk-selbar-count { font-size: 13.5px; color: var(--text-secondary); }
.mbk-selbar-count b { font-size: 18px; line-height: 1; color: var(--brand); margin: 0 2px; }
.mbk-selbar-actions { display: flex; gap: 10px; }

@media (max-width: 760px) {
  #mbk-tabs { display: flex; flex-wrap: wrap; }
  #mbk-list .mb-card { padding: 16px 16px 16px 20px; }
  #mbk-list .mb-options { grid-template-columns: 1fr; }
  #mbk-list .mb-card-head { align-items: flex-start; }
}

/* ==========================================================================
   录题页（资源中心 → 录入作业 · 录题）
   左侧作业本 + 右侧题目工作区 + 底部批量操作条
   ========================================================================== */
#page-entry { gap: 16px; }
#page-entry .ez-title { font-size: 24px; }
#page-entry .ez-head { align-items: flex-start; }
.ez-upload-btn { padding: 9px 22px; border-radius: 9px; }

.ez-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 276px);
  min-height: 520px;
}

/* ---------- 左：作业本 ---------- */
.ez-books {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.ez-books-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  font-size: 16px;
  font-weight: 700;
}
.ez-books-count {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.ez-book-filter { padding: 0 14px 10px; }
.ez-book-filter .ez-filter-field { width: 100%; }
.ez-book-filter .select { width: 100%; height: 36px; }
.ez-book-search {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--border);
}
.ez-book-search .input { flex: 1; min-width: 0; height: 36px; }
.ez-search-btn {
  height: 36px;
  padding: 0 14px;
  flex-shrink: 0;
  color: var(--brand);
  border-color: rgba(42, 120, 214, 0.35);
  background: var(--surface-1);
}
.ez-search-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.ez-book-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px;
  scrollbar-width: thin;
}
.ez-book-item {
  padding: 12px 12px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
}
.ez-book-item:hover { background: var(--surface-2); }
.ez-book-item.active {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}
.ez-book-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ez-book-item-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }

.ez-books-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}
.ez-pager { display: flex; gap: 6px; }
.ez-page-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--surface-1);
}
.ez-page-btn:disabled,
.ez-page-btn:disabled:hover {
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--border);
  cursor: not-allowed;
}

/* ---------- 右：题目 ---------- */
.ez-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.ez-card {
  flex: 1;
  min-height: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ez-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  flex-wrap: wrap;
}
.ez-book-info { min-width: 0; }
.ez-book-title { font-size: 18px; font-weight: 700; line-height: 1.4; }
.ez-book-meta { margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.ez-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ez-filter-field { display: flex; flex-direction: column; gap: 5px; }
.ez-filter-label { font-size: 12px; color: var(--text-secondary); }
.ez-filter-field .select,
.ez-filter-field .input { height: 36px; }
.ez-filter-field .select { min-width: 126px; }
.ez-filter-kw .input { width: 240px; }

.ez-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  border-top: 1px solid var(--border);
}
.ez-check-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.ez-page-picked {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ez-q-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 16px;
  scrollbar-width: thin;
}
.ez-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
  background: var(--surface-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ez-q + .ez-q { margin-top: 12px; }
.ez-q:hover { border-color: var(--border-strong); }
.ez-q.is-selected {
  border-color: rgba(42, 120, 214, 0.5);
  box-shadow: 0 0 0 1px rgba(42, 120, 214, 0.28) inset;
}
.ez-q-head { display: flex; align-items: center; gap: 8px; }
.ez-q-check { display: inline-flex; align-items: center; cursor: pointer; }
.ez-q-check input { width: 15px; height: 15px; cursor: pointer; }
.ez-type-tag {
  font-size: 11.5px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 4px;
  color: #7c5cd6;
  background: #f1ecff;
}
.ez-q-no { font-size: 12.5px; color: var(--text-muted); }
.ez-q-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.ez-tool {
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: 12px;
  color: var(--brand);
  cursor: pointer;
}
.ez-tool:hover { text-decoration: underline; }
.ez-tool.active { color: var(--brand-hover); font-weight: 600; }
.ez-tool-rec { font-weight: 600; }
.ez-rec {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.ez-rec-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.ez-rec-sub { font-size: 12px; color: var(--text-muted); }
.ez-rec-item {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.ez-rec-top { display: flex; align-items: center; gap: 8px; }
.ez-rec-diff {
  font-size: 11.5px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
}
.ez-rec-type { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.ez-rec-actions { display: flex; gap: 10px; margin-left: 6px; }
.ez-rec-act {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ez-rec-act:hover { text-decoration: underline; }
.ez-rec-act-del { color: #c0392b; }
.ez-rec-act-save { font-weight: 600; }
.ez-rec-add {
  margin-top: 10px;
  padding: 5px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.ez-rec-add:hover { border-color: var(--brand); background: var(--brand-soft); }
.ez-rec-edit { display: flex; flex-direction: column; gap: 8px; }
.ez-rec-edit-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ez-rec-edit-row .ez-rec-edit-field { flex: 0 0 auto; }
.ez-rec-edit-field { display: flex; align-items: flex-start; gap: 8px; }
.ez-rec-edit-field[hidden] { display: none; }
.ez-rec-edit-field > span { flex: 0 0 34px; font-size: 12.5px; color: var(--text-secondary); line-height: 28px; }
.ez-rec-edit-field input,
.ez-rec-edit-field select,
.ez-rec-edit-field textarea {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-1);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}
.ez-rec-edit-field select { flex: 0 0 auto; width: auto; }
.ez-rec-edit-field textarea { resize: vertical; line-height: 1.6; }
.ez-rec-edit-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 2px; }
.ez-rec-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-primary);
}
.ez-rec-analysis { margin-top: 5px; font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); }
.ez-rec-empty { margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.ez-rec-stem { margin-top: 7px; font-size: 14px; line-height: 1.75; color: var(--text-primary); }
.ez-rec-ans { margin-top: 5px; font-size: 13px; color: var(--text-secondary); }
.ez-mark { font-size: 12px; }
.ez-mark-blue { color: var(--brand); }
.ez-mark-green { color: var(--series-3); }

.ez-q-stem {
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}
.ez-q-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}
.ez-q-answer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.ez-q-answer p { margin: 2px 0; white-space: pre-line; }
.ez-q-answer b { color: var(--text-primary); font-weight: 600; }

.ez-list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.ez-empty {
  padding: 48px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- 底部操作条 ---------- */
.ez-actionbar {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), var(--shadow-card);
}
.ez-clear { padding: 6px 14px; font-size: 12.5px; color: var(--text-secondary); }
.ez-selected {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
}
.ez-actions { margin-left: auto; display: flex; gap: 10px; }
.ez-actionbar .btn { padding: 7px 16px; font-size: 13px; }
.ez-actionbar .btn:disabled,
.ez-actionbar .btn:disabled:hover {
  cursor: not-allowed;
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--border);
}
.ez-actionbar .btn-primary:disabled,
.ez-actionbar .btn-primary:disabled:hover {
  background: #cbd7e5;
  border-color: #cbd7e5;
  color: #fff;
}
/* 录题页操作条贴底，Toast 上移避免遮挡「保存」 */
body.entry-page-active .toast { bottom: 108px; }

/* 深色主题 */
:root[data-theme="dark"] .ez-type-tag { color: #b9a8f5; background: #2a2548; }
:root[data-theme="dark"] .ez-book-item.active { background: var(--brand-soft); }
:root[data-theme="dark"] .ez-actionbar .btn-primary:disabled,
:root[data-theme="dark"] .ez-actionbar .btn-primary:disabled:hover {
  background: #34404f;
  border-color: #34404f;
  color: #8b97a6;
}

@media (max-width: 1240px) {
  .ez-layout { grid-template-columns: 290px minmax(0, 1fr); }
  .ez-filter-kw .input { width: 180px; }
  .ez-q-options { gap: 8px 24px; }
}
@media (max-width: 980px) {
  .ez-layout { grid-template-columns: 1fr; height: auto; }
  .ez-books { height: 400px; }
  .ez-card { height: 600px; flex: none; }
  .ez-actionbar { flex-wrap: wrap; }
  .ez-selected { position: static; transform: none; margin-left: 4px; }
  .ez-actions { width: 100%; justify-content: flex-end; }
}

/* ---------------- 视频生成平台 ---------------- */
.vg-collection {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-1);
}
.vg-coll-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.vg-coll-title { margin: 0; font-size: 17px; font-weight: 600; color: var(--text-primary); }
.vg-coll-meta { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.vg-coll-tag {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.vg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.vg-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-1);
  overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.vg-card:hover { border-color: var(--border-strong); box-shadow: 0 4px 16px rgba(15, 30, 50, .08); }
.vg-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b3f66 0%, #1f2d4a 60%, #17233a 100%);
}
.vg-play {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #1f2d4a;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.vg-thumb-label {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .9);
  font-size: 11px;
}
.vg-dur {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.vg-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.vg-card-top { display: flex; align-items: center; gap: 8px; }
.vg-no { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.vg-type {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
}
.vg-stem {
  margin: 0;
  min-height: 43px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vg-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.vg-status { font-size: 12px; color: #1f8a5b; }
.vg-act {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.vg-act:hover { text-decoration: underline; }
.vg-empty {
  padding: 64px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-1);
  text-align: center;
}
.vg-empty b { display: block; font-size: 15px; color: var(--text-primary); }
.vg-empty p { margin: 8px 0 18px; font-size: 13px; color: var(--text-muted); }
:root[data-theme="dark"] .vg-status { color: #6ee7a8; }
