/* ==========================================================================
   AI 智能考试系统 - 主样式表
   设计基调：企业级蓝白配色（呼应 CTG 品牌色），卡片化布局，清晰的信息层级
   色值约定：成绩/涨幅类正面指标用红色，负向指标用绿色（中国习惯）
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --brand-50:  #eef4ff;
  --brand-100: #dbe7ff;
  --brand-200: #bcd2ff;
  --brand-300: #8fb2ff;
  --brand-400: #5b8cff;
  --brand-500: #2f6bee;   /* 主色 */
  --brand-600: #1f52c9;
  --brand-700: #1a41a0;
  --brand-800: #18367d;
  --brand-900: #162c5f;

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #2f6bee 0%, #4a8cff 55%, #6aa4ff 100%);
  --grad-brand-soft: linear-gradient(135deg, #eef4ff 0%, #e3edff 100%);
  --grad-side: linear-gradient(180deg, #16243f 0%, #1b2f52 100%);
  --grad-hero: linear-gradient(120deg, #1a41a0 0%, #2f6bee 45%, #5b8cff 100%);

  /* 语义色 */
  --success: #16a34a;
  --success-bg: #e8f7ee;
  --warning: #d97706;
  --warning-bg: #fdf4e3;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --info: #0284c7;
  --info-bg: #e6f4fd;

  /* 成绩相关：红=好/高（中国习惯），绿=差/低 */
  --score-high: #d92b2b;
  --score-mid: #e8850c;
  --score-low: #16a34a;

  /* 中性色 */
  --bg-body: #f4f6fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafd;
  --bg-hover: #f1f5fd;
  --border: #e3e8f0;
  --border-strong: #cdd6e4;

  --text-1: #131c2e;   /* 主标题 */
  --text-2: #3d4a63;   /* 正文 */
  --text-3: #6b7891;   /* 次要 */
  --text-4: #9aa5b8;   /* 占位 */

  /* 圆角 */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(19, 28, 46, .05);
  --sh-sm: 0 2px 6px rgba(19, 28, 46, .06);
  --sh-md: 0 4px 14px rgba(19, 28, 46, .08);
  --sh-lg: 0 10px 30px rgba(19, 28, 46, .10);
  --sh-brand: 0 6px 18px rgba(47, 107, 238, .25);

  /* 尺寸 */
  --side-w: 216px;
  --top-h: 58px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

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

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

/* 移动端：禁止系统字体自动放大，避免横竖屏切换时排版跳变 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--text-1); font-weight: 600; }
p { margin: 0 0 8px; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--brand-600); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* 焦点可见性（无障碍：键盘导航必须有清晰焦点指示） */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccd5e3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b0bccd; }

/* 屏幕阅读器专用 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 3. 应用骨架 ---------- */
.app {
  display: flex;
  min-height: 100dvh;   /* 移动端用 dvh，避免地址栏引起的高度跳动 */
}

/* 侧边栏 */
.side {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  background: var(--grad-side);
  color: #c8d3e6;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  z-index: 30;
}

.side__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex: 0 0 auto;
}

.side__logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 3px 10px rgba(47,107,238,.45);
  flex: 0 0 auto;
}

.side__title { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.25; }
.side__sub { font-size: 11px; color: #7f8fae; letter-spacing: .3px; }

.side__nav { padding: 10px 10px 20px; flex: 1 1 auto; }

.side__group {
  font-size: 11px;
  color: #6b7b99;
  letter-spacing: .8px;
  padding: 14px 10px 6px;
  font-weight: 600;
}

.side__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  color: #c0cce0;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: 0; background: none; width: 100%; text-align: left;
}

.side__item:hover { background: rgba(255,255,255,.07); color: #fff; }

.side__item.is-active {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(47,107,238,.4);
}

.side__icon { width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.8; }

.side__foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11.5px;
  color: #6b7b99;
  flex: 0 0 auto;
}

/* 主区域 */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

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

.topbar__crumb { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.topbar__crumb b { color: var(--text-1); font-weight: 600; }
.topbar__spacer { flex: 1 1 auto; }

.topbar__user {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-brand);
  color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; flex: 0 0 auto;
}

.topbar__uname { font-size: 13px; font-weight: 600; color: var(--text-1); line-height: 1.2; }
.topbar__urole { font-size: 11px; color: var(--text-3); line-height: 1.2; }

.page { padding: 20px 22px 40px; flex: 1 1 auto; }

/* 移动端抽屉导航：汉堡按钮与遮罩（桌面端默认隐藏，见「7. 响应式」）
   注意：这里必须用 .topbar 提高优先级 —— 后面 .btn 的 display:inline-flex
   会覆盖单类的 .topbar__burger，导致汉堡按钮在桌面端也冒出来。 */
.topbar .topbar__burger { display: none; }

.nav-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 38, .5);
  z-index: 29;
}

/* ---------- 4. 通用组件 ---------- */

/* 卡片 */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}

.card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.card__title { font-size: 15px; font-weight: 650; color: var(--text-1); }
.card__desc { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.card__spacer { flex: 1 1 auto; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh-xs);
  position: relative;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}

.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.stat::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grad-brand);
}

.stat__label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat__value {
  font-size: 27px; font-weight: 700; color: var(--text-1);
  line-height: 1.2; margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.stat__value small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.stat__foot { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 5px; }

/* 数字趋势：红涨绿跌（中国习惯） */
.trend-up { color: var(--score-high); font-weight: 600; }
.trend-down { color: var(--score-low); font-weight: 600; }
.trend-flat { color: var(--text-3); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.5;
}

.btn:hover { background: var(--bg-hover); border-color: var(--brand-300); color: var(--brand-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--grad-brand); color: #fff; border-color: transparent;
  box-shadow: var(--sh-brand);
}
.btn--primary:hover { background: linear-gradient(135deg,#2560dd,#3f80ff); color: #fff; border-color: transparent; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-3); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--brand-600); }

.btn--danger { color: var(--danger); border-color: #f3c9c9; background: #fff; }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.btn--sm { padding: 5px 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn--lg { padding: 11px 26px; font-size: 15px; border-radius: var(--r-md); }
.btn--block { width: 100%; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}

.badge--brand   { background: var(--brand-50);   color: var(--brand-600); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--info    { background: var(--info-bg);    color: var(--info); }
.badge--muted   { background: #eef1f6;           color: var(--text-3); }

/* 表格 */
.table-wrap { overflow-x: auto; }

.table { font-size: 13.5px; }

.table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-subtle);
  color: var(--text-3);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--bg-subtle); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table .nowrap { white-space: nowrap; }

/* 表单 */
.field { margin-bottom: 15px; }
.field__label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.5;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(47,107,238,.12);
}

.textarea { resize: vertical; min-height: 90px; }
.select { cursor: pointer; appearance: none;
  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='%236b7891' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 38px; height: 21px; border-radius: var(--r-full);
  background: #cbd5e2; position: relative; transition: background .2s; flex: 0 0 auto;
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: var(--sh-xs);
}
.switch input:checked + .switch__track { background: var(--brand-500); }
.switch input:checked + .switch__track::after { transform: translateX(17px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.switch__text { font-size: 13.5px; color: var(--text-2); }

/* 标签页 */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); padding: 0 4px; overflow-x: auto; }

.tab {
  padding: 10px 15px;
  border: 0; background: none;
  color: var(--text-3);
  font-size: 13.5px; font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.tab:hover { color: var(--brand-500); }
.tab.is-active { color: var(--brand-600); border-bottom-color: var(--brand-500); font-weight: 600; }

/* 分段控件 */
.seg { display: inline-flex; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; }
.seg__item {
  padding: 5px 13px; border: 0; background: none; border-radius: var(--r-xs);
  font-size: 12.5px; color: var(--text-3); font-weight: 500; transition: all .15s;
}
.seg__item.is-active { background: #fff; color: var(--brand-600); font-weight: 600; box-shadow: var(--sh-xs); }

/* 进度条 */
.progress { height: 7px; background: #e8edf5; border-radius: var(--r-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--grad-brand); border-radius: var(--r-full); transition: width .4s ease; }
.progress--thin { height: 4px; }

/* 空状态 */
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty__icon { width: 46px; height: 46px; margin: 0 auto 12px; opacity: .38; }
.empty__title { font-size: 14.5px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty__desc { font-size: 13px; }

/* 提示条 */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.6;
  border: 1px solid transparent;
}
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert--info    { background: var(--info-bg);    border-color: #bfe2f7; color: #075985; }
.alert--warning { background: var(--warning-bg); border-color: #f5dfae; color: #92400e; }
.alert--success { background: var(--success-bg); border-color: #b8e6cb; color: #14532d; }
.alert--danger  { background: var(--danger-bg);  border-color: #f5c6c6; color: #991b1b; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 38, .5);
  display: grid; place-items: center; z-index: 100;
  padding: 20px; overflow-y: auto;
  backdrop-filter: blur(2px);
  animation: fadeIn .15s ease;
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  width: 100%; max-width: 620px;
  max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column;
  animation: slideUp .2s ease;
}

.modal--wide { max-width: 900px; }
.modal--narrow { max-width: 440px; }

.modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.modal__title { font-size: 16px; font-weight: 650; }
.modal__sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.modal__close {
  margin-left: auto; width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 0; background: none; color: var(--text-3);
  display: grid; place-items: center; transition: all .15s;
}
.modal__close:hover { background: var(--bg-hover); color: var(--text-1); }
.modal__body { padding: 20px; overflow-y: auto; flex: 1 1 auto; }
.modal__foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border);
  flex: 0 0 auto; background: var(--bg-subtle);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* Toast 提示 */
.toast-wrap {
  position: fixed; top: 18px; right: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 9px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-radius: var(--r-md);
  background: #1e293b; color: #fff; font-size: 13.5px;
  box-shadow: var(--sh-lg); animation: slideInRight .25s ease;
  pointer-events: auto; max-width: 340px;
}
.toast--success { background: #15803d; }
.toast--error   { background: #b91c1c; }
.toast--warning { background: #b45309; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

/* 下拉菜单 */
.menu {
  position: absolute; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: 5px; min-width: 150px; z-index: 120;
  animation: fadeIn .12s ease;
}
.menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 11px; border: 0; background: none; border-radius: var(--r-xs);
  font-size: 13px; color: var(--text-2); text-align: left; transition: background .12s;
}
.menu__item:hover { background: var(--bg-hover); color: var(--brand-600); }
.menu__item--danger { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-bg); color: var(--danger); }
.menu__sep { height: 1px; background: var(--border); margin: 4px 6px; }

/* ---------- 5. 五大能力特色组件 ---------- */

/* 能力总览卡（首页） */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }

.cap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
}

.cap::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-brand); opacity: 0; transition: opacity .18s;
}

.cap:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--brand-200); }
.cap:hover::before { opacity: 1; }

.cap__no {
  font-size: 30px; font-weight: 800; line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.cap__icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--brand-50); color: var(--brand-500);
  display: grid; place-items: center; margin-bottom: 11px;
}

.cap__name { font-size: 15px; font-weight: 650; color: var(--text-1); margin-bottom: 5px; }
.cap__desc { font-size: 12.5px; color: var(--text-3); line-height: 1.6; min-height: 40px; }
.cap__foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--text-3);
}

/* Hero 区（首页顶部） */
.hero {
  background: var(--grad-hero);
  border-radius: var(--r-xl);
  padding: 26px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.hero::after {
  content: ''; position: absolute; right: -70px; top: -70px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
}

.hero__tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.24);
  padding: 3px 11px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600; margin-bottom: 11px;
  backdrop-filter: blur(4px);
}

.hero__title { font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.hero__desc { font-size: 13.5px; color: rgba(255,255,255,.85); margin-top: 7px; max-width: 620px; line-height: 1.7; }

.hero__metrics {
  display: flex; gap: 30px; margin-top: 20px;
  flex-wrap: wrap; position: relative; z-index: 1;
}

.hero__metric-v { font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__metric-l { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 1px; }
.hero__metric-v small { font-size: 12px; opacity: .85; margin-left: 2px; }

/* ---------- 考试作答界面 ---------- */
.exam-layout { display: grid; grid-template-columns: 1fr 246px; gap: 16px; align-items: start; }

.exam-head {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 13px 18px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  position: sticky; top: var(--top-h); z-index: 10;
  box-shadow: var(--sh-xs);
}

.exam-head__title { font-size: 15px; font-weight: 650; }
.exam-head__meta { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.timer {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--r-full);
  background: var(--brand-50); color: var(--brand-600);
  font-weight: 650; font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}

.timer--urgent { background: var(--danger-bg); color: var(--danger); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* 题目 */
.q {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.q__head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; flex-wrap: wrap; }

.q__no {
  width: 25px; height: 25px; border-radius: var(--r-sm);
  background: var(--grad-brand); color: #fff;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; flex: 0 0 auto;
}

.q__stem { font-size: 15px; line-height: 1.75; color: var(--text-1); margin-bottom: 15px; }
.q__score { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* 选项 */
.opts { display: flex; flex-direction: column; gap: 9px; }

.opt {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
  background: var(--bg-surface);
  line-height: 1.65;
}

.opt:hover { border-color: var(--brand-300); background: var(--brand-50); }
.opt.is-picked { border-color: var(--brand-500); background: var(--brand-50); }

.opt__key {
  width: 23px; height: 23px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--text-3);
  flex: 0 0 auto; transition: all .15s; margin-top: 1px;
}

.opt.is-picked .opt__key { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.opt__text { flex: 1 1 auto; font-size: 14px; color: var(--text-2); }

/* 判卷后状态 */
.opt.is-correct { border-color: var(--success); background: var(--success-bg); }
.opt.is-correct .opt__key { background: var(--success); border-color: var(--success); color: #fff; }

.opt.is-wrong { border-color: var(--danger); background: var(--danger-bg); }
.opt.is-wrong .opt__key { background: var(--danger); border-color: var(--danger); color: #fff; }

.opt__mark { margin-left: auto; flex: 0 0 auto; font-size: 12px; font-weight: 600; }

/* 答题卡 */
.sheet { position: sticky; top: calc(var(--top-h) + 16px); }

.sheet__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }

.sheet__cell {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
  transition: all .15s; font-variant-numeric: tabular-nums;
}

.sheet__cell:hover { border-color: var(--brand-400); color: var(--brand-600); }
.sheet__cell.is-done { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-600); }
.sheet__cell.is-cur  { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: var(--sh-brand); }
.sheet__cell.is-mark { position: relative; }
.sheet__cell.is-mark::after {
  content: ''; position: absolute; top: 2px; right: 2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--warning);
}

.sheet__legend { display: flex; flex-wrap: wrap; gap: 11px; font-size: 11.5px; color: var(--text-3); margin-top: 13px; }
.sheet__legend span { display: inline-flex; align-items: center; gap: 5px; }
.sheet__dot { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--border); }

/* ---------- 成绩报告 ---------- */
.score-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.score-big {
  font-size: 62px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -2px;
}
.score-big small { font-size: 20px; font-weight: 600; color: var(--text-4); margin-left: 4px; letter-spacing: 0; }

.score-pass   { color: var(--score-high); }
.score-fail   { color: var(--score-low); }

/* 环形进度 */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring__val { position: absolute; text-align: center; }
.ring__num { font-size: 21px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.ring__lab { font-size: 11px; color: var(--text-3); }

/* 知识掌握度条 */
.kbar { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kbar:last-child { border-bottom: 0; }
.kbar__name { flex: 0 0 130px; font-size: 13px; color: var(--text-2); }
.kbar__track { flex: 1 1 auto; height: 8px; background: #eef1f6; border-radius: var(--r-full); overflow: hidden; }
.kbar__fill { height: 100%; border-radius: var(--r-full); transition: width .5s ease; }
.kbar__val { flex: 0 0 46px; text-align: right; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- 图表（纯 CSS/SVG，无外部依赖） ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 18px; }
.chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-col__bar {
  width: 100%; max-width: 46px;
  background: linear-gradient(180deg, #5b8cff, #2f6bee);
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  position: relative; transition: height .5s ease, filter .15s;
  min-height: 3px;
}
.chart-col__bar:hover { filter: brightness(1.12); }
.chart-col__bar--alt { background: linear-gradient(180deg, #9fb8f5, #7d9df0); }
.chart-col__val { font-size: 11.5px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-col__lab { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* 折线图容器 */
.line-chart { width: 100%; height: 200px; }

/* 分布条（分数段） */
.dist { display: flex; flex-direction: column; gap: 10px; }
.dist__row { display: flex; align-items: center; gap: 11px; }
.dist__lab { flex: 0 0 72px; font-size: 12.5px; color: var(--text-3); }
.dist__track { flex: 1 1 auto; height: 22px; background: #f2f5fa; border-radius: var(--r-sm); overflow: hidden; }
.dist__fill {
  height: 100%; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px; font-size: 11.5px; font-weight: 650; color: #fff;
  transition: width .5s ease; min-width: 26px;
}

/* ---------- 6. 工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 auto; }
.gap-4 { gap: 4px; }  .gap-6 { gap: 6px; }   .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }

.mt-4 { margin-top: 4px; }   .mt-8 { margin-top: 8px; }   .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }  .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }

.text-c { text-align: center; } .text-r { text-align: right; }
.text-1 { color: var(--text-1); } .text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.fs-15 { font-size: 15px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-20 { font-size: 20px; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.pointer { cursor: pointer; }
.w-full { width: 100%; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ---------- 7. 响应式 ----------
   断点约定：
     1180px  作答页由「题目 + 答题卡」双栏收起为单栏
      900px  侧栏由固定栏改为抽屉（汉堡按钮唤出），内容区占满整宽
      768px  卡片工具栏、表格、表单转为移动布局
      640px  单列排布、弹窗变底部抽屉、触控尺寸放大
      480px  登录页与顶栏进一步压缩
   ========================================================================== */

/* ---- 7.1 中等屏幕：作答页单栏 ---- */
@media (max-width: 1180px) {
  /* 页面里有用内联 style 指定双栏的地方（如错题本练习），一并收敛为单栏 */
  .exam-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .sheet { position: static; }
  .sheet__grid { grid-template-columns: repeat(10, 1fr); }
}

/* ---- 7.2 平板 / 手机：侧栏 → 抽屉 ---- */
@media (max-width: 900px) {
  .side {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: 268px;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 0 44px rgba(10, 18, 32, .3);
    overscroll-behavior: contain;
    z-index: 30;
  }

  .app.is-nav-open .side { transform: none; }
  .app.is-nav-open .nav-mask { display: block; animation: fadeIn .18s ease; }

  .topbar .topbar__burger { display: inline-flex; }

  /* 抽屉内文字完整展示，触控目标放大 */
  .side__item { justify-content: flex-start; padding: 12px; font-size: 14.5px; min-height: 44px; }
  .side__nav { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding: 16px 14px calc(34px + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   栅格收缩安全网
   --------------------------------------------------------------------------
   `1fr` 的自动最小值等于子项的 min-content，窄屏时会被宽表格 / 长图表撑破，
   导致整个页面横向滚动（且 window.innerWidth 会跟着一起变大，掩盖问题）。
   统一改用 minmax(0, 1fr) 并允许子项收缩。 */

.grid-2 > *, .grid-3 > *, .grid-4 > *, .stats > *, .info-grid > * { min-width: 0; }

/* ---- 7.3 手机：工具栏 / 表格 / 表单 ---- */
@media (max-width: 768px) {
  /* iOS 在字号小于 16px 的输入框聚焦时会自动放大页面，这里统一提到 16px 规避 */
  .input, .select, .textarea { font-size: 16px; }

  /* 触控目标不小于 36px，避免误触 */
  .btn { min-height: 40px; }
  .btn--sm { min-height: 36px; padding: 7px 12px; font-size: 13px; }
  .opt { min-height: 44px; }
  .seg__item { padding: 8px 14px; }
  .tab { padding: 11px 14px; }

  /* 卡片标题栏：标题、筛选条件各占一行，筛选控件撑满宽度 */
  .card__head { flex-wrap: wrap; row-gap: 10px; padding: 13px 14px; }
  .card__head > * { flex: 1 1 100%; min-width: 0; }
  .card__head > .card__spacer { display: none; }
  .card__head .input,
  .card__head .select { width: 100% !important; min-width: 0 !important; }
  .card__head .seg { display: flex; overflow-x: auto; }
  .card__head .seg__item { flex: 1 1 auto; white-space: nowrap; }

  /* 表格：字号与内边距收敛，首列吸附，横向滑动查看其余列 */
  .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .table { font-size: 12.5px; }
  .table th, .table td { padding: 9px 11px; }
  .table th:first-child,
  .table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-surface);
    box-shadow: 1px 0 0 var(--border);
  }
  .table th:first-child { background: var(--bg-subtle); z-index: 3; }
  .table tbody tr:hover td:first-child { background: var(--bg-subtle); }
  /* 数据表窄屏下不再拆字：广电站 / 岗位这类短值整块显示，宽度不够就横向滑动。
     例外：题干那种多行截断的单元格必须允许正常换行，否则行数截断会失效；
     同时给个最小宽度，避免被挤成每行三四个字、看不出内容。 */
  .table td { word-break: keep-all; }
  .table td > div[style*="line-clamp"],
  .table td > div[style*="-webkit-box"] { word-break: normal; min-width: 168px; }
}

/* ---- 7.4 窄屏手机：单列排布 ---- */
@media (max-width: 640px) {
  /* minmax(0,1fr)：避免宽表格/图表把栅格轨道撑破（见上方「栅格收缩安全网」） */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }

  /* 顶栏：只留当前页名，其余控件压缩为图标 */
  .topbar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    gap: 8px;
  }
  .topbar__crumb { min-width: 0; overflow: hidden; }
  .topbar__crumb > span,
  .topbar__crumb > svg { display: none; }
  .topbar__crumb b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar__uname, .topbar__urole { display: none; }
  .topbar__user { padding: 4px; }

  /* 首页 Hero：指标两列排布 */
  .hero { padding: 18px; border-radius: var(--r-lg); margin-bottom: 14px; }
  .hero__title { font-size: 19px; }
  .hero__desc { font-size: 12.5px; }
  .hero__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
  }
  .hero__metric-v { font-size: 20px; }

  /* 统计卡：强制两列（覆盖页面内联的 repeat(4,1fr)） */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat:hover { transform: none; }
  .stat__value { font-size: 21px; }
  .stat__foot { font-size: 11.5px; }

  .cap-grid { gap: 11px; }
  .cap { padding: 15px; }
  .cap:hover { transform: none; }
  .cap__desc { min-height: 0; }

  /* 作答页 */
  .exam-shell { padding: 14px 12px calc(30px + env(safe-area-inset-bottom)); }
  .exam-head { flex-wrap: wrap; row-gap: 8px; padding: 11px 13px; position: static; }
  .exam-head__title { font-size: 14px; }
  .timer { font-size: 13.5px; padding: 5px 11px; }
  .q { padding: 15px; }
  .q__stem { font-size: 14.5px; }
  .opt { padding: 10px 12px; }
  .opt__text { font-size: 13.5px; }
  .sheet__grid { grid-template-columns: repeat(5, 1fr); }
  .sheet__legend { gap: 9px; }
  .score-hero { padding: 22px 16px; }
  .score-big { font-size: 46px; }

  /* 图表：列数多时横向滚动，而不是把每根柱子压扁
     flex 基准 46px + min-width 46px：列少时自动铺满，列多时固定 46px 并滚动 */
  .chart-bars { overflow-x: auto; padding-bottom: 4px; }
  .chart-col { flex: 1 1 46px; min-width: 46px; }
  .kbar__name { flex: 0 0 86px; font-size: 12.5px; }
  .dist__lab { flex: 0 0 56px; font-size: 12px; }

  /* 卡片与弹窗 */
  .card__body { padding: 14px; }
  .modal-mask { padding: 0; align-items: end; }
  .modal { max-width: 100%; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .modal__head { padding: 15px 16px; }
  .modal__body { padding: 16px; }
  .modal__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
    border-radius: 0;
  }
  .modal__foot .btn { flex: 1 1 auto; }

  /* Toast 改为通栏 */
  .toast-wrap { left: 12px; right: 12px; top: 12px; }
  .toast { max-width: none; }

  /* 列表行 / 设置行 / 判卷 */
  .exam-row { flex-wrap: wrap; row-gap: 6px; padding: 11px 14px; }
  .exam-card { padding: 15px; }
  .exam-card__name { padding-right: 66px; font-size: 15px; }
  .exam-card__meta { gap: 5px 14px; font-size: 12px; }
  .exam-card__foot { flex-wrap: wrap; gap: 8px; }

  .set-row { flex-wrap: wrap; row-gap: 9px; }
  .set-row__ctrl { flex: 1 1 100%; min-width: 0; text-align: left; }

  .grade-item { padding: 14px; }
  .grade-ans { flex-direction: column; gap: 2px; }
  .grade-ans__lab { flex: 0 0 auto; }

  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .rank-row { gap: 9px; font-size: 13px; }
}

/* ---- 7.5 小屏手机 ---- */
@media (max-width: 480px) {
  .page { padding: 12px 10px calc(28px + env(safe-area-inset-bottom)); }
  .side { width: 258px; }
  .sheet__grid { grid-template-columns: repeat(4, 1fr); }
  .login-wrap { padding: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .login-right { padding: 26px 20px; }
  .login-left__title { font-size: 22px; }
}


/* ---------- 8. 登录页 ---------- */
.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 12% 8%, #dbe7ff 0%, transparent 60%),
    radial-gradient(800px 520px at 88% 92%, #e3edff 0%, transparent 58%),
    var(--bg-body);
}

.login-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: 880px;
  background: var(--bg-surface);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(19, 28, 46, .14);
  overflow: hidden;
  border: 1px solid var(--border);
}

.login-left {
  background: var(--grad-hero);
  padding: 34px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-left::after {
  content: ''; position: absolute; right: -80px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}

.login-left__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; position: relative; z-index: 1; }

.login-left__title {
  font-size: 25px; font-weight: 700; color: #fff;
  line-height: 1.45; letter-spacing: -.3px;
  position: relative; z-index: 1;
}

.login-left__desc {
  font-size: 13px; color: rgba(255,255,255,.82);
  margin-top: 12px; line-height: 1.7; position: relative; z-index: 1;
}

.login-left__list { margin-top: 24px; display: flex; flex-direction: column; gap: 11px; position: relative; z-index: 1; }
.login-left__list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,.9); }
.login-left__list svg { flex: 0 0 auto; opacity: .9; }

.login-left__foot {
  margin-top: auto; padding-top: 20px;
  font-size: 11.5px; color: rgba(255,255,255,.62);
  border-top: 1px solid rgba(255,255,255,.14);
  position: relative; z-index: 1;
}

.login-right { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-title { font-size: 21px; font-weight: 700; }
.login-sub { font-size: 13px; color: var(--text-3); margin-top: 5px; margin-bottom: 24px; }

.login-demo { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border); }
.login-demo__title { font-size: 12px; color: var(--text-3); margin-bottom: 9px; font-weight: 600; }
.login-demo__grid { display: flex; flex-direction: column; gap: 7px; }

.login-demo__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  font-size: 12.5px;
  color: var(--text-2);
  transition: all .15s;
  text-align: left;
}
.login-demo__item:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-600); }
.login-demo__item b { font-weight: 600; }
.login-demo__item span { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

@media (max-width: 820px) {
  .login-card { grid-template-columns: 1fr; max-width: 460px; }
  .login-left { display: none; }
  .login-right { padding: 32px 26px; }
}

/* ---------- 9. 帮助文档列表 ---------- */
.help-list { padding-left: 0; counter-reset: h; display: flex; flex-direction: column; gap: 10px; }
.help-list li {
  position: relative; padding: 11px 14px 11px 40px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: 13px; line-height: 1.7;
  counter-increment: h;
}
.help-list li::before {
  content: counter(h);
  position: absolute; left: 12px; top: 11px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}

code {
  font-family: var(--mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .92em;
  color: var(--brand-700);
}

/* ---------- 10. 页面级组件 ---------- */

/* 考试行（工作台/列表） */
.exam-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .14s;
}
.exam-row:last-child { border-bottom: 0; }
.exam-row:hover { background: var(--bg-subtle); }

/* 考试卡片（随堂即考列表） */
.exam-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 17px 19px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.exam-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--brand-200); }

.exam-card__status {
  position: absolute; top: 0; right: 0;
  padding: 4px 13px;
  border-radius: 0 var(--r-lg) 0 var(--r-md);
  font-size: 11.5px; font-weight: 650;
  color: #fff;
}
.exam-card__status--ongoing   { background: linear-gradient(135deg,#16a34a,#22c55e); }
.exam-card__status--scheduled { background: linear-gradient(135deg,#64748b,#94a3b8); }
.exam-card__status--finished  { background: linear-gradient(135deg,#2f6bee,#5b8cff); }
.exam-card__status--done      { background: linear-gradient(135deg,#7c3aed,#a855f7); }

.exam-card__name { font-size: 15.5px; font-weight: 650; color: var(--text-1); padding-right: 74px; line-height: 1.5; }

.exam-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 11px; font-size: 12.5px; color: var(--text-3);
}
.exam-card__meta span { display: inline-flex; align-items: center; gap: 5px; }

.exam-card__foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 15px; padding-top: 14px; border-top: 1px dashed var(--border);
}

/* 智能出题页 */
.ai-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }

.ai-drop {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 26px;
  text-align: center;
  background: var(--bg-subtle);
  transition: all .18s;
  cursor: pointer;
}
.ai-drop:hover, .ai-drop.is-over { border-color: var(--brand-400); background: var(--brand-50); }
.ai-drop__icon { color: var(--brand-400); margin-bottom: 10px; }

.gen-preview { max-height: 430px; overflow-y: auto; }

.gen-q {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 11px;
  background: var(--bg-surface);
  position: relative;
}
.gen-q__no {
  position: absolute; top: 13px; left: 16px;
  width: 22px; height: 22px; border-radius: var(--r-xs);
  background: var(--brand-50); color: var(--brand-600);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}
.gen-q__body { padding-left: 32px; }
.gen-q__stem { font-size: 13.5px; line-height: 1.7; color: var(--text-1); white-space: pre-wrap; }
.gen-q__opt { font-size: 12.5px; color: var(--text-2); padding: 3px 0 3px 6px; }
.gen-q__opt.is-ans { color: var(--score-high); font-weight: 600; }
.gen-q__ans { font-size: 12.5px; color: var(--score-high); font-weight: 600; margin-top: 7px; }
.gen-q__ana {
  font-size: 12.5px; color: var(--text-3); margin-top: 7px;
  padding: 9px 11px; background: var(--bg-subtle); border-radius: var(--r-sm);
  line-height: 1.7; white-space: pre-wrap;
  border-left: 2px solid var(--brand-300);
}

/* 考试作答页 */
.exam-shell { background: var(--bg-body); min-height: 100dvh; padding: 20px 22px 40px; }

/* 阅卷页 */
.grade-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 15px 17px;
  margin-bottom: 12px;
  background: var(--bg-surface);
}
.grade-item__head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; flex-wrap: wrap; }
.grade-ans {
  display: flex; gap: 10px; padding: 9px 13px; border-radius: var(--r-sm);
  font-size: 13px; line-height: 1.65; margin-top: 8px;
}
.grade-ans--right { background: var(--success-bg); border-left: 3px solid var(--success); }
.grade-ans--wrong { background: var(--danger-bg);  border-left: 3px solid var(--danger); }
.grade-ans--std   { background: var(--brand-50);   border-left: 3px solid var(--brand-400); }
.grade-ans__lab { flex: 0 0 62px; font-weight: 600; color: var(--text-2); }
.grade-ans__val { flex: 1 1 auto; color: var(--text-2); }

/* 统计页 */
.stat-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
}
.stat-panel__title { font-size: 14.5px; font-weight: 650; color: var(--text-1); margin-bottom: 3px; }
.stat-panel__desc { font-size: 12px; color: var(--text-3); margin-bottom: 15px; }

/* 排行榜 */
.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex: 0 0 auto;
  background: var(--bg-subtle); color: var(--text-3);
  border: 1px solid var(--border);
}
.rank-no--1 { background: linear-gradient(135deg,#d92b2b,#f26b6b); color: #fff; border-color: transparent; }
.rank-no--2 { background: linear-gradient(135deg,#e8850c,#f5a623); color: #fff; border-color: transparent; }
.rank-no--3 { background: linear-gradient(135deg,#2f6bee,#5b8cff); color: #fff; border-color: transparent; }

/* 用户卡片 */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell__name { font-weight: 600; color: var(--text-1); line-height: 1.25; }
.user-cell__meta { font-size: 11.5px; color: var(--text-3); line-height: 1.25; }

/* 设置页 */
.set-sec { margin-bottom: 26px; }
.set-sec__title {
  font-size: 14.5px; font-weight: 650; color: var(--text-1);
  padding-bottom: 9px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.set-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px dashed var(--border);
}
.set-row:last-child { border-bottom: 0; }
.set-row__label { flex: 1 1 auto; }
.set-row__name { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.set-row__desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.6; }
.set-row__ctrl { flex: 0 0 auto; min-width: 150px; text-align: right; }

/* 空面板 */
.panel-empty { padding: 30px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 信息网格 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.info-item { padding: 12px 14px; background: var(--bg-subtle); border-radius: var(--r-md); border: 1px solid var(--border); }
.info-item__l { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.info-item__v { font-size: 16px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   两级分类选择器（一级：岗位；二级：题库分类，多选）
   ========================================================================== */
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 12.5px; color: var(--text-2); background: #fff; cursor: pointer;
  user-select: none; transition: all .15s;
}
.cat-chip:hover { border-color: var(--brand-500); }
.cat-chip input { margin: 0; accent-color: var(--brand-500); }
.cat-chip i { font-style: normal; font-size: 11px; color: var(--text-3); }
.cat-chip.is-on {
  border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); font-weight: 600;
}
.cat-chip.is-on i { color: var(--brand-500); }
.cat-empty { font-size: 12.5px; color: var(--text-3); padding: 4px 0; }

/* 列表里的分类展示 */
.cat-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

@media (max-width: 1100px) {
  .ai-layout { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .side, .topbar, .no-print { display: none !important; }
  .page { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
