/* ==========================================================================
   K2 AI 跨学科学习社区 · 2026 秋季智能管理系统
   视觉规范（v1.25.2）：深靛蓝暗色主题 —— 深色底 + 暗卡 + 紫蓝渐变强调（参考龙哥 2026-10-14 配色图）
   ========================================================================== */

:root {
  --ink-900: #f2f3fb;
  --ink-800: #dfe2f4;
  --ink-700: #c3c8e2;
  --ink-500: #8f94ba;
  --ink-400: #747aa0;
  --ink-300: #3d4374;
  --line: #2a2f55;
  --bg: #0d102e;
  --card: #161a3f;
  --card-2: #1b2050;
  --primary: #6a5ae8;
  --primary-2: #3f8cff;
  --grad: linear-gradient(135deg, #6a5ae8 0%, #3f8cff 100%);
  --ok: #34d399;
  --warn: #fb923c;
  --danger: #f87171;
  --gold: #facc15;
  --blue: #60a5fa;
  /* v1.25.4：原生控件（date picker icon / select 箭头 / 滚动条）跟随暗色，黑 icon 根因 */
  color-scheme: dark;
  --link: #a5b4fc;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .3);
  /* v1.25.14：当前页面「顶部吸顶条」实测高度 —— 表格表头吸顶时据此让位，避免压住信息条。
     由 app.js 的 syncPinOffset() 在每次渲染后写入；无吸顶条时为 0。 */
  --pin-h: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 700; line-height: 1.35; }
/* v1.25.10（龙哥）：全局标题字号瘦身 —— 标题只比正文(14px)略大一号，页头不再吓人 */
h1 { font-size: 16px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
p { margin: 0 0 8px; }
a { color: var(--link); }
.small { font-size: 12px; }
.muted { color: var(--ink-500); }
.center { text-align: center; }
.right { text-align: right; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.zero { color: var(--ink-400); }
[hidden] { display: none !important; }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-700);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.btn.ghost { background: var(--card); }
.btn.light {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.btn.light:hover { background: rgba(255, 255, 255, .22); }
.btn.danger { color: var(--danger); border-color: rgba(248,113,113,.4); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #0b0e26 0%, #151a42 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 2px 10px rgba(0, 0, 0, .18);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .logo { height: 34px; width: auto; display: block; }
.brand-title { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: rgba(255, 255, 255, .62); display: flex; align-items: center; gap: 8px; }
/* v1.25.1：版本号徽章（登录后顶栏，学期名右侧；版本号由服务端注入） */
.brand-ver {
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .3px;
  padding: 2px 6px; border-radius: 999px; white-space: nowrap;
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.who { font-size: 13px; color: rgba(255, 255, 255, .82); text-align: right; }
.who b { color: #fff; }

/* ------------------------------ 登录页 ------------------------------ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(99, 102, 241, .12), transparent 70%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  padding: 26px 26px 22px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand h1 { font-size: 16px; margin: 0; }
.login-brand p { margin: 0; font-size: 12px; }
.login-logo {
  height: 44px; width: 44px; padding: 6px;
  border-radius: 10px; background: linear-gradient(135deg, #0b0e26, #151a42);
  object-fit: contain;
}
.login-error {
  margin-bottom: 10px; padding: 8px 12px;
  border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.12); color: var(--danger);
  border-radius: 8px; font-size: 13px;
}
.demo-box { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-title { font-size: 12px; color: var(--ink-500); margin-bottom: 8px; }
.demo-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.demo-chip {
  border: 1px solid var(--line); background: #1e234d; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--ink-700);
}
.demo-chip:hover { border-color: var(--primary); color: var(--primary-2); background: rgba(165,180,252,.12); }
.login-slogan {
  margin: -4px 0 16px;
  font-size: 13px;
  color: var(--primary-2);
  font-weight: 600;
  letter-spacing: .5px;
  text-align: center;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(14,165,233,.06), rgba(99,102,241,.06));
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 10px;
}
.login-foot {
  margin-top: 14px;
  text-align: center;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

/* ------------------------------ 顶栏用户菜单 ------------------------------ */
.who-wrap { position: relative; }
.who-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff; font-size: 13px;
  font-family: inherit; cursor: pointer;
}
.who-btn:hover { background: rgba(255,255,255,.22); }
.who-btn .who-name { font-weight: 600; }
.who-btn .who-role { color: rgba(255,255,255,.7); font-size: 12px; }
.who-btn .caret { font-size: 10px; opacity: .8; }
.who-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 150px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  padding: 6px; z-index: 50;
  display: flex; flex-direction: column; gap: 2px;
}
.who-menu button {
  text-align: left;
  background: transparent; border: none;
  padding: 8px 12px; border-radius: 6px;
  color: var(--ink-700); font-size: 13px;
  font-family: inherit; cursor: pointer;
}
.who-menu button:hover { background: #20254e; color: var(--primary-2); }

/* ------------------------------ 弹层 Modal ------------------------------ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.45);
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%; max-width: 440px;
  background: var(--card); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  padding: 22px 24px 20px;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-x {
  background: transparent; border: none;
  color: var(--ink-500); font-size: 22px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.modal-x:hover { background: #20254e; color: var(--ink-900); }
.modal-error {
  margin-bottom: 10px; padding: 8px 12px;
  border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.12); color: var(--danger);
  border-radius: 8px; font-size: 13px;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 8px;
}

/* ------------------------------ 布局 ------------------------------ */
.shell { display: flex; align-items: flex-start; gap: 0; min-height: calc(100vh - 56px); }
.sidebar {
  position: sticky; top: 56px;
  width: 208px; flex: 0 0 208px;
  padding: 16px 12px;
  background: var(--card);
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 56px);
}
.sidebar .nav-title { font-size: 12px; color: var(--ink-400); padding: 0 8px 8px; letter-spacing: 1px; }
.tab-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left;
  padding: 9px 12px; margin-bottom: 4px;
  border: none; border-radius: 8px; background: transparent;
  color: var(--ink-700); font-size: 14px; font-family: inherit; cursor: pointer;
}
.tab-btn:hover { background: #20254e; }
.tab-btn.active { background: var(--grad); color: #fff; font-weight: 600; }
.tab-btn .idx { font-family: var(--mono); font-size: 11px; opacity: .6; }
.content { flex: 1 1 auto; padding: 20px 22px 60px; min-width: 0; }

@media (max-width: 1023px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: static; width: 100%; flex: none; min-height: 0;
    display: flex; gap: 8px; overflow-x: auto;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }
  .sidebar .nav-title { display: none; }
  .tab-btn { width: auto; white-space: nowrap; margin-bottom: 0; }
  .content { padding: 16px 14px 60px; }
}
@media (max-width: 767px) {
  .topbar { padding: 8px 12px; }
  .topbar .logo { height: 28px; }
  .brand-title { font-size: 13px; }
  .brand-sub { display: none; }
  .who { font-size: 12px; }
  .content { padding: 12px 10px 50px; }
}

/* ------------------------------ 卡片 / 区块 ------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.card > .card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.card > .card-head h2, .card > .card-head h3 { margin: 0; }
.page-head { margin-bottom: 14px; }
.page-head h1 { margin-bottom: 2px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------ 表单 ------------------------------ */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 12px; color: var(--ink-500); margin-bottom: 4px; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"],
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.85); cursor: pointer; }
input[type="search"], select, textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink-900);
  font-size: 13px; font-family: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .12);
}
textarea { min-height: 64px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--primary-2); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-700); cursor: pointer; user-select: none;
}
.check input { width: auto; margin: 0; accent-color: var(--primary-2); }
.radio-group { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.radio-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; cursor: pointer; }
.radio-inline input { width: auto; margin: 0; accent-color: var(--primary-2); }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form > div { min-width: 140px; }
.form-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------ 表格 ------------------------------ */
.table-wrap { overflow-x: auto; }
table.ktable { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ktable th, table.ktable td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px; text-align: left; vertical-align: top;
}
table.ktable th { background: #1e234d; color: var(--ink-500); font-weight: 600; white-space: nowrap; }
table.ktable td.num, table.ktable th.num { text-align: right; font-family: var(--mono); }
table.ktable tbody tr:hover { background: #1e234d; }
table.ktable tr.total td { font-weight: 700; background: #1e234d; }

/* ------------------------------ 徽标 ------------------------------ */
.badge {
  display: inline-block; min-width: 26px; text-align: center;
  padding: 2px 10px; border-radius: 999px;
  color: #fff; font-weight: 700; font-size: 12px; font-family: var(--mono);
}
.badge.soft { background: #20254e; color: var(--ink-700); font-weight: 500; }
.badge.ok { background: rgba(52,211,153,.14); color: #4ade80; font-weight: 600; }
.badge.warn { background: rgba(251,146,60,.14); color: #fdba74; font-weight: 600; }
.badge.danger { background: rgba(248,113,113,.14); color: #fca5a5; font-weight: 600; }
.badge.info { background: rgba(165,180,252,.12); color: #a5b4fc; font-weight: 600; }
.grade-big {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 10px 22px; border-radius: 14px; color: #fff;
  font-weight: 800;
}
.grade-big .lg { font-size: 34px; line-height: 1; font-family: var(--mono); }
.grade-big .sub { font-size: 14px; font-weight: 600; opacity: .9; }

/* ------------------------------ KPI ------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  box-shadow: var(--shadow);
}
.kpi .lb { font-size: 12px; color: var(--ink-500); }
.kpi .vl { font-size: 18px; font-weight: 700; font-family: var(--mono); }
.kpi .vl small { font-size: 12px; font-weight: 500; color: var(--ink-400); }

/* ------------------------------ 提示条 ------------------------------ */
.alert-box {
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px;
  border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.12); color: #fca5a5;
}
.alert-box.warn { border-color: rgba(251,146,60,.4); background: rgba(251,146,60,.12); color: #fdba74; }
.ok-box {
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px;
  border: 1px solid rgba(52,211,153,.4); background: rgba(52,211,153,.12); color: #4ade80;
}
.empty {
  padding: 26px 14px; text-align: center; color: var(--ink-400);
  border: 1px dashed var(--line); border-radius: 10px; background: #1e234d;
}

/* ------------------------------ 分布条 ------------------------------ */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-row .bname { width: 92px; flex: 0 0 92px; font-size: 12px; color: var(--ink-700); }
.bar-track { flex: 1 1 auto; height: 12px; border-radius: 999px; background: #1e234d; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad); }
.bar-val { width: 66px; flex: 0 0 66px; text-align: right; font-size: 12px; font-family: var(--mono); color: var(--ink-500); }

/* ------------------------------ 周等级条 ------------------------------ */
.week-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.week-chip {
  min-width: 62px; text-align: center; padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #1e234d;
}
.week-chip .d { font-size: 11px; color: var(--ink-500); font-family: var(--mono); }
.week-chip .g { font-size: 15px; font-weight: 800; font-family: var(--mono); }
.week-chip.cur { border-color: var(--primary-2); box-shadow: 0 0 0 2px rgba(99, 102, 241, .14); }

/* ------------------------------ 每日行为分卡片 ------------------------------ */
.stu-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #1e234d;
}
.stu-card .stu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.stu-card .stu-name { font-weight: 600; }
.stu-card .dim { margin-bottom: 8px; }
.stu-card .dim .dim-title { font-size: 12px; color: var(--ink-500); margin-bottom: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; margin: 2px 4px 2px 0;
  border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.12); color: var(--danger);
  border-radius: 999px; font-size: 12px;
}
.chip button {
  border: none; background: transparent; color: var(--danger);
  cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px;
}

/* ------------------------------ 标签 / 可点选标签 ------------------------------ */
.tag {
  display: inline-block;
  padding: 1px 8px;
  margin: 2px 4px 2px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #20254e;
  color: var(--ink-700);
  font-size: 12px;
  white-space: nowrap;
}
.tag.more { background: #1e234d; color: var(--ink-500); }
.profile-line { margin: 2px 0 6px; }
.chip-box {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #1e234d;
}
/* v1.4.1：老师较多时限制高度并滚动，避免拉长表单 */
.chip-box.chip-scroll {
  max-height: 132px;
  overflow-y: auto;
  align-content: flex-start;
}
.chip-box.chip-scroll::-webkit-scrollbar { width: 8px; }
.chip-box.chip-scroll::-webkit-scrollbar-thumb {
  background: #3d4374; border-radius: 999px;
}
.chip-toggle {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-700);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .12s ease;
}
.chip-toggle:hover { border-color: var(--primary); color: var(--primary-2); }
.chip-toggle.on {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* --------------------- v1.6：老师工作反思 --------------------- */
.rf-form-card { margin-bottom: 14px; }
.rf-vis { display: flex; flex-wrap: wrap; gap: 16px; padding: 4px 0 2px; }
.rf-radio {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--ink-700); cursor: pointer; user-select: none;
}
.rf-radio input { margin: 0; }
.rf-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #1e234d;
}
.rf-item:last-child { margin-bottom: 0; }
.rf-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.rf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-body { display: block; }
.rf-row { display: flex; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--line); }
.rf-row:first-child { border-top: 0; }
.rf-label {
  flex: 0 0 88px; color: var(--ink-500); font-size: 13px; font-weight: 600;
}
.rf-text {
  flex: 1 1 auto; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; color: var(--ink-700); line-height: 1.6;
}
.rf-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ------------------------------ Toast ------------------------------ */
.toast-wrap {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 9px 18px; border-radius: 999px; color: #fff; font-size: 13px;
  background: var(--grad);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  animation: toast-in .18s ease-out;
}
.toast.error { background: linear-gradient(135deg, #f87171, #991b1b); }
.toast.warn { background: linear-gradient(135deg, #fbbf24, #b45309); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------ 打印优化 ------------------------------ */
@media print {
  .topbar, .sidebar, .toast-wrap { display: none !important; }
  .content { padding: 0; }
}

/* ============================ v1.3 ============================ */

/* --- 计划完成度自评 --- */
.self-eval-list { display: grid; gap: 10px; }
.self-eval-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #1e234d;
}
.self-eval-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.self-eval-done { font-weight: 600; color: var(--primary-2); }
.self-eval-title {
  font-size: 13px;
  color: var(--ink-700);
  margin: 4px 0 8px;
  padding: 6px 10px;
  background: #20254e;
  border-radius: 6px;
  font-family: var(--mono);
}
.self-eval-note { width: 100%; }

/* --- 学生档案（老师端第 6 标签）--- */
/* v1.25.9（龙哥）：左侧细长名单 → 顶部常驻下拉，右侧详情独占整宽 */
.stu-overview-shell {
  display: block;
}
.stu-overview-list { padding: 0; overflow: hidden; }
.stu-overview-list .card-head { padding: 14px 16px; margin: 0; }
.stu-list { max-height: 70vh; overflow-y: auto; }
.stu-list-item {
  width: 100%;
  text-align: left;
  display: block;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
}
.stu-list-item:hover { background: #20254e; }
.stu-list-item.active { background: var(--grad); color: #fff; }
.stu-list-item.active .stu-list-meta { color: rgba(255,255,255,.85); }
/* v1.25.3（龙哥）：未选中时名字不要用亮色/深色看不清 —— 名字与简介统一浅灰 */
.stu-list-item .stu-list-name { color: var(--ink-700); }
.stu-list-item .stu-list-meta { color: var(--ink-400); }
.stu-list-item.active .stu-list-name { color: #fff; }
.stu-list-name { font-weight: 600; font-size: 14px; }
.stu-list-meta { font-size: 12px; margin-top: 2px; }

/* ---------------- v1.25.9（龙哥）：学生档案顶部「当前学生」常驻下拉条 ----------------
   背景：原来左侧细长的名单框不好点，而且详情页往下翻就忘了在看哪位学生。
   现在下拉选择器直接固定在详情页最顶端（sticky），下滑全程可见：谁 + 年级学号 一目了然。 */
/* v1.25.10（龙哥）：top:0 会被系统顶栏（sticky top:0 / z-30 / 高 56px）盖住，
   吸顶后整条藏在顶栏后面 —— 改为 top:56px 与侧栏对齐，吸在系统顶栏正下方。 */
/* v1.25.12（龙哥）：吸顶时紧贴系统顶栏显得"顶住页头"——吸顶偏移再让出 12px 呼吸空隙，
   并用 ::before 铺一块同底色盖住这道缝（否则下方内容会从缝里露出来一闪一闪）。 */
.stu-ov-topbar {
  position: sticky; top: 68px; z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
/* 吸顶空隙遮罩：铺在卡片上方 12px 处，颜色=页面底色，视觉上就是"一个空行" */
.stu-ov-topbar::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}
.stu-ov-topbar-label { font-size: 12px; color: var(--ink-500); }
.stu-ov-topbar select { min-width: 220px; max-width: 340px; font-weight: 600; }
.stu-ov-topbar-meta { font-size: 12px; color: var(--ink-500); margin-left: auto; }
/* v1.25.5（龙哥）：右侧学生详情顶部 sticky 姓名条 —— 下滑长页面始终知道看的是哪位学生 */
.stu-ov-sticky {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.stu-ov-sticky-name { font-weight: 700; font-size: 15px; color: var(--ink-900); }
.stu-ov-sticky-meta { font-size: 12px; color: var(--ink-500); }
@media (max-width: 900px) {
  .stu-overview-shell { grid-template-columns: 1fr; }
  .stu-list { max-height: none; }
}
/* v1.25.10/v1.25.12：窄屏系统顶栏变矮（8*2+28=44px），吸顶偏移同步改小 + 同样让出 12px */
@media (max-width: 767px) {
  .stu-ov-topbar { top: 56px; }
  .tc-pin { top: 56px; }   /* v1.25.13：任务完成度冻结条同步 */
}

/* --- 重置学期 --- */
.reset-term-card { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }
.reset-term-card h2 { color: var(--danger); }
.reset-term-card .card-head h2 { color: var(--danger); }

/* ==========================================================================
   v1.4：老师私密备注 + 师生留言
   ========================================================================== */

/* --- 老师备注（学生档案区块 f） --- */
.note-card { border-color: rgba(165,180,252,.4); background: #1e234d; }
.note-warn {
  display: inline-block;
  background: rgba(250,204,21,.14);
  color: #fcd34d;
  border: 1px solid rgba(250,204,21,.25);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  margin: 0 0 10px;
}
.note-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.note-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.note-actions { margin-left: auto; display: flex; gap: 6px; }
.note-body { white-space: pre-wrap; word-break: break-word; color: var(--ink-800); }
.note-form textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.note-form .btn-row { margin-top: 8px; }

/* --- 留言：单列（学生端） --- */
.msg-shell { display: flex; flex-direction: column; }
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 12px 4px;
}
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.msg-row.other { justify-content: flex-start; }
.msg-bubble {
  max-width: 78%;
  background: #1e234d;
  border-radius: 12px;
  padding: 8px 12px;
}
.msg-bubble.msg-mine { background: var(--grad); color: #fff; }
.msg-content { white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 11px; color: var(--ink-400); margin-top: 4px; }
.msg-bubble.msg-mine .msg-meta { color: rgba(255,255,255,.85); }
.msg-input { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.msg-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

/* --- 留言：双列（老师端） --- */
.msg-shell-2 { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.msg-stu-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.msg-stu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border: none; background: transparent;
  border-bottom: 1px solid var(--line); cursor: pointer;
  font-family: inherit; font-size: 14px; text-align: left;
}
.msg-stu-item:hover { background: #20254e; }
.msg-stu-item.active { background: var(--grad); color: #fff; }
.msg-stu-name { font-weight: 600; }
.unread-dot {
  min-width: 18px; height: 18px; border-radius: 999px;
  background: var(--danger); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center;
  padding: 0 5px;
}
.msg-stu-item.active .unread-dot { background: var(--card); color: var(--danger); }
.msg-main { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .msg-shell-2 { grid-template-columns: 1fr; }
  .msg-bubble { max-width: 88%; }
}

/* ==========================================================================
   v1.8：考试计划 / 备考提醒条 / AI 建议卡
   前缀统一：.ex-* / .remind-* / .ai-* / .skel*（避免与既有类名冲突）
   ========================================================================== */

/* ---------------- 考试计划条目 ---------------- */
.ex-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--card);
}
.ex-item:last-child { margin-bottom: 0; }
.ex-item.ex-expired { opacity: .62; background: #1e234d; }
.ex-item.ex-focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, .16); }
.ex-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ex-item-head > .tag { margin-right: 0; }
.ex-item-body { margin: 8px 0 10px; }
.ex-scope { font-size: 13px; color: var(--ink-700); word-break: break-word; }
.ex-note { margin-top: 4px; word-break: break-word; }
.ex-item-foot { margin-top: 2px; }
.ex-form { border-color: var(--primary); }
.ex-custom { align-self: end; }
.ex-item .warn-text { color: var(--warn); }

/* ---------------- 备考提醒条 ---------------- */
.remind-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  background: #1e234d;
}
.remind-icon { font-size: 18px; line-height: 1; }
.remind-list { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.remind-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.remind-subj { font-weight: 600; color: var(--ink-800); }
.remind-actions { display: flex; gap: 8px; flex-shrink: 0; }
.remind-tail { margin: -4px 0 10px; padding-left: 4px; }

.remind-bar.remind-high { border-left-color: var(--danger); background: rgba(248,113,113,.12); }
.remind-bar.remind-mid { border-left-color: var(--warn); background: rgba(251,146,60,.12); }
.remind-bar.remind-low { border-left-color: var(--blue); background: rgba(165,180,252,.12); }
.remind-bar.remind-info { border-left-color: var(--ink-400); background: #1e234d; }

/* 倒计时小胶囊 */
.remind-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  background: #20254e;
  color: var(--ink-500);
}
.remind-chip.remind-high { background: rgba(248,113,113,.14); color: #fca5a5; }
.remind-chip.remind-mid { background: rgba(251,146,60,.14); color: #fdba74; }
.remind-chip.remind-low { background: rgba(165,180,252,.14); color: #c7d2fe; }
.remind-chip.remind-info { background: #1e234d; color: var(--ink-500); }
.remind-chip.remind-expired { background: #20254e; color: var(--ink-400); text-decoration: line-through; }

/* ---------------- AI 建议卡 ---------------- */
.ai-card { border-color: rgba(165,180,252,.14); }
.ai-inline { margin-top: 8px; }
.ai-inline:empty { margin-top: 0; }
.ai-body { display: block; }
.ai-summary {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1e234d;
  color: var(--ink-800);
  font-size: 13px;
}
.ai-sec { margin-bottom: 10px; }
.ai-sec h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-800);
  border-left: 3px solid var(--primary);
  padding-left: 7px;
}
.ai-sec ul { margin: 0; padding-left: 20px; }
.ai-sec li { font-size: 13px; margin-bottom: 2px; word-break: break-word; }
.ai-disclaimer { margin: 6px 0 0; }
.ai-tip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px dashed rgba(251,146,60,.4);
  border-radius: 8px;
  background: rgba(251,146,60,.12);
  color: #fdba74;
  font-size: 12px;
}
.ai-error .empty { color: var(--danger); }

/* 来源徽标 */
.ai-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
.ai-badge-ai { background: rgba(45,212,191,.14); color: #2dd4bf; }
.ai-badge-fallback { background: #20254e; color: var(--ink-500); }

/* ---------------- 骨架屏 ---------------- */
.skel {
  position: relative;
  overflow: hidden;
  background: #1e234d;
  border-radius: 6px;
}
.skel-line { height: 12px; margin-bottom: 10px; width: 100%; }
.skel-line.w60 { width: 60%; }
.skel-line.w70 { width: 70%; }
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .10) 50%, rgba(255, 255, 255, 0) 100%);
  animation: skel 1.2s infinite;
}
@keyframes skel {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 弹层正文（v1.8 通用弹层） */
.modal-body { max-height: 60vh; overflow-y: auto; }
.nowrap { white-space: nowrap; }

/* ---------------- 移动端：单列不溢出 ---------------- */
@media (max-width: 720px) {
  .remind-bar { flex-direction: column; align-items: stretch; }
  .remind-actions { justify-content: flex-end; }
  .ex-item-head { gap: 6px; }
  .ex-item-foot { flex-wrap: wrap; }
}

/* ==========================================================================
   v1.9：消息中心（顶栏铃铛 + 通知抽屉）
   前缀统一：.bell-* / .nt-*（避免与既有类名冲突）
   配色沿用顶栏深色系（渐变 #f2f3fb → #dfe2f4）+ 浅色文字，不新增主题色
   ========================================================================== */

.bell-wrap { position: relative; flex: 0 0 auto; }

/* ---------------- 铃铛按钮 ---------------- */
.bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.bell-btn:hover { background: rgba(255, 255, 255, .22); }
.bell-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.bell-btn.is-open { background: rgba(255, 255, 255, .26); }
.bell-icon { font-size: 17px; line-height: 1; filter: saturate(.9); }

/* 未读角标：复用 .unread-dot 的形状与色值，只补绝对定位 */
.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 2;
  min-width: 18px;
  padding: 0 5px;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, .9);
  pointer-events: none;
}

/* P1-6：未读数变大时轻微晃动（≤0.6s，无声音、无弹幕） */
.bell-btn.shake { animation: bellShake .6s ease; }
@keyframes bellShake {
  0%   { transform: rotate(0deg) translateY(0); }
  15%  { transform: rotate(-11deg) translateY(-1px); }
  30%  { transform: rotate(9deg); }
  45%  { transform: rotate(-7deg); }
  60%  { transform: rotate(5deg); }
  80%  { transform: rotate(-2deg); }
  100% { transform: rotate(0deg) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bell-btn.shake { animation: none; }
}

/* ---------------- 通知抽屉 ---------------- */
.bell-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 380px;
  max-width: calc(100vw - 32px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(160deg, #0b0e26 0%, #151a42 100%);
  color: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
  overflow: hidden;
  text-align: left;
}

.nt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.nt-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.nt-count {
  flex: 1 1 auto;
  font-size: 12px;
  color: rgba(255, 255, 255, .62);
}
.nt-x {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.nt-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.nt-list {
  max-height: min(60vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 单条通知 */
.nt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease;
}
.nt-item:first-child { border-top: none; }
.nt-item:hover { background: rgba(255, 255, 255, .07); }
.nt-item.unread { background: rgba(99, 102, 241, .16); }
.nt-item:focus-visible { outline: 2px solid rgba(255, 255, 255, .55); outline-offset: -2px; }

.nt-ico {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}
.nt-main { flex: 1 1 auto; min-width: 0; display: block; }
.nt-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nt-item.read .nt-title { font-weight: 400; color: rgba(255, 255, 255, .72); }
.nt-cnt {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.nt-sum {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .62);
  word-break: break-word;
}
.nt-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, .42);
}
.nt-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.nt-time {
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap;
}
.nt-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary, #38bdf8);
}
.nt-mark {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-family: inherit;
  font-size: 11px;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease;
  /* v1.9：透明态必须禁用指针事件。触屏设备没有 hover，
     若不禁用，平板用户点这一小块会误触发「标记已读」而不是打开通知。 */
  pointer-events: none;
}
.nt-item:hover .nt-mark, .nt-mark:focus-visible { opacity: 1; pointer-events: auto; }
.nt-mark:hover { color: #fff; text-decoration: underline; }

/* 空状态 / 加载 / 失败 */
.nt-empty { padding: 30px 18px; text-align: center; }
.nt-empty-icon { font-size: 26px; opacity: .55; }
.nt-empty-title { margin-top: 6px; font-size: 14px; font-weight: 600; }
.nt-empty-sub { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .55); }
.nt-loading { padding: 26px 18px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .6); }

/* 底部操作条 */
.nt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}
.nt-foot-tip { font-size: 11px; color: rgba(255, 255, 255, .45); }
.nt-foot-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.nt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.nt-btn:hover { background: rgba(255, 255, 255, .2); }
.nt-btn:disabled { opacity: .45; cursor: not-allowed; background: rgba(255, 255, 255, .06); }
.nt-btn.primary {
  background: var(--grad);
  border-color: transparent;
  font-weight: 600;
}
.nt-btn.primary:hover { filter: brightness(1.06); }
.nt-btn.danger { color: #fca5a5; }

/* 侧栏「师生留言」标签红点 */
.tab-dot { flex: 0 0 auto; }

/* ---------------- 窄屏：抽屉改为顶部下方全宽 ---------------- */
@media (max-width: 720px) {
  .bell-panel {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    border-radius: 0 0 14px 14px;
    max-height: calc(100vh - 56px);
  }
  .nt-list { max-height: calc(70vh - 96px); }
}

/* 打印时不出现铃铛与抽屉 */
@media print {
  .bell-wrap { display: none !important; }
}

/* ==========================================================================
   v1.9.1：周反思 —— 底部常驻保存栏
   配色沿用现有 --card / --line / --shadow，与 .card 同系，不新增主题色
   ========================================================================== */
.refl-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.refl-bar-txt {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-500);
}
.refl-bar .btn { flex: 0 0 auto; }

@media (max-width: 720px) {
  .refl-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .refl-bar .btn { width: 100%; }
}

/* ==========================================================================
   v1.14 驾驶舱（.brand-home + .ck-* + .lb-*）
   复用现有 CSS 变量与 .card / .badge 色板，不新增主题色。
   ========================================================================== */

/* ---------- 顶栏品牌区 = 返回驾驶舱按钮 ---------- */
.brand-home {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 8px 4px 4px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.brand-home:hover .logo { transform: scale(1.04); }
.brand-home:hover .brand-title { color: #a5b4fc; }
.brand-home .logo { transition: transform .2s ease; }
.brand-home .brand-title { transition: color .2s ease; }

/* ---------- 驾驶舱栅格 ---------- */
.ck-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.ck-card { min-width: 0; }
.ck-gpa-card { order: 1; }
.ck-ov       { order: 2; }
.ck-todo     { order: 3; }
.ck-lb       { order: 4; grid-column: span 2; }
.ck-msg      { order: 5; }

/* ---------- 我的本周 GPA ---------- */
.ck-gpa { display: flex; align-items: center; gap: 18px; }
.ck-gpa-main { display: flex; align-items: baseline; gap: 8px; }
.ck-gpa-score { font-size: 28px; font-weight: 800; line-height: 1; }
.ck-gpa-grade { font-size: 15px; font-weight: 700; }
.ck-gpa-side { font-size: 13px; color: var(--ink-500); display: flex; flex-direction: column; gap: 4px; }
.ck-alert { color: var(--danger); font-weight: 600; }
.ck-bd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.ck-bd-item { font-size: 12px; color: var(--ink-500); }
.ck-bd-item b { color: var(--ink-800); margin-left: 4px; }
.ck-nick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-500);
}
.ck-nick-row b { color: var(--ink-800); }

/* ---------- 排行榜 ---------- */
.ck-lb-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lb-table { display: flex; flex-direction: column; }
.lb-row {
  display: grid;
  grid-template-columns: 64px 1fr 88px 64px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.lb-row:last-child { border-bottom: 0; }
.lb-head {
  font-size: 12px;
  color: var(--ink-500);
  background: var(--bg);
  border-radius: 8px;
  border-bottom: 0;
}
.lb-row.me {
  background: rgba(249, 115, 22, .08);
  box-shadow: inset 4px 0 0 #F97316;
}
.lb-row.me .lb-name { font-weight: 700; }
.lb-row.empty { color: var(--ink-400); }
.lb-rank { font-weight: 700; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 700; text-align: right; }
.lb-tie, .lb-me-tag {
  font-style: normal;
  font-size: 11px;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink-500);
}
.lb-me-tag { background: #F97316; color: #fff; }

/* ---------- 待办 ---------- */
.ck-todo-list { display: flex; flex-direction: column; gap: 6px; }
.ck-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.ck-todo:hover { border-color: var(--primary); }
.ck-todo.urgent { border-color: var(--warn); background: rgba(234, 88, 12, .06); }
.ck-todo-title { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink-800); }
.ck-todo.urgent .ck-todo-title { color: var(--warn); font-weight: 600; }
.ck-todo-hint { flex: 0 0 auto; font-size: 12px; color: var(--ink-400); }
.ck-todo-go { flex: 0 0 auto; color: var(--ink-400); }

/* ---------- 最近留言 ---------- */
.ck-msg-list { display: flex; flex-direction: column; gap: 8px; }
.ck-msg {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.ck-msg.unread { border-left: 3px solid var(--primary); background: rgba(14, 165, 233, .05); }
.ck-msg-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ck-msg-body { margin-top: 4px; font-size: 13px; color: var(--ink-700); word-break: break-word; }

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .ck-grid { grid-template-columns: minmax(0, 1fr); }
  .ck-lb { grid-column: span 1; }
}

@media (max-width: 767px) {
  /* 手机端顺序：我的 GPA → 待办 → 排行榜 → 留言（概览在最前：它是老师端主卡） */
  .ck-ov       { order: 1; }
  .ck-gpa-card { order: 2; }
  .ck-todo     { order: 3; }
  .ck-lb       { order: 4; }
  .ck-msg      { order: 5; }
  .ck-grid, .ck-card, .lb-table { overflow-x: hidden; }
  .lb-row { grid-template-columns: 48px minmax(0, 1fr) 60px 56px; }
  /* 顶栏品牌区：整块可点，触控区 min-height 44px；隐藏学期名腾出横向空间 */
  .brand-home { min-height: 44px; padding: 4px; }
  .brand-home .brand-sub { display: none; }
}

/* ==========================================================================
   v1.15 双语（英文上一行、中文下一行）
   规则来源：PRD_v1.15 §2.1 / §2.2；按钮与表头的宽度分流由 public/i18n.js
   在运行时测量后加/去 .bi-enonly 类，此处只负责呈现。
   ========================================================================== */

/* 双行容器：默认块级（按钮/表头/标签都靠它切成两行） */
.bi { display: block; }

/* PRD §2.1：英文略小于中文（英文信息密度高，等大会显得更重） */
.bi > .en,
.bi > .zh {
  display: block;
  line-height: 1.15;
}
.bi > .en {
  font-size: .92em;
  font-weight: 500;
}
.bi > .zh {
  font-size: 1em;
  font-weight: 400;
  color: var(--ink-500, #8f94ba);
  margin-top: 0;
}

/* 只显示英文（按钮 <88px / 密集表头）：中文进 title */
.bi.bi-enonly > .zh { display: none; }

/* ---------- 热修 v1.21.1：.bi-row 单行并排变体（信息行/mono 行内双语片段） ----------
   场景：CRM 表单 C 区「下次跟进时间：…（来源：手动）」与详情头「负责人 …」这类流式信息行。
   块级 .bi（EN 一行 + CN 一行）会把窄 pill/信息行撑爆（龙哥 2026-09-27 线上截图），
   故此处整段降为 inline 单行；带 html[data-lang] 前缀对冲语言模式 !important 规则
   （(0,4,1) > 语言模式的 (0,3,1)，纯 .bi.bi-row 的 (0,3,0) 压不过它——实测踩坑）。 */
.bi.bi-row, .bi.bi-row > .en, .bi.bi-row > .zh { display: inline !important; }
html[data-lang="zh"] .bi.bi-row > .en { display: none !important; }
html[data-lang="zh"] .bi.bi-row > .zh { display: inline !important; }
html[data-lang="en"] .bi.bi-row > .zh { display: none !important; }
html[data-lang="en"] .bi.bi-row > .en { display: inline !important; }
.bi.bi-row > .zh { color: inherit; }   /* mono/muted 行内不二次降色，跟随容器 */

/* 语言切换：纯 CSS 显隐，不重渲染、不请求服务端。
   ⚠️ 这里的 !important 是必须的：窄屏下按钮/表头会被 i18n.js 量出 <88px 而打上 .bi-enonly
   （只显示英文），若不强制覆盖，切到「仅中文」时该处会变成空白。语言模式优先于宽度规则。
   ⚠️ 仅英文模式下 .en 复位为 1em / 400：单语场景不该沿用 .bi > .en 的 .92em / 500（那是给双语
   两行排版用的「英文略小」），删掉这两条声明会让仅英文模式下的文字偏小偏粗。 */
html[data-lang="zh"] .bi > .en { display: none !important; }
html[data-lang="zh"] .bi > .zh { display: block !important; }
html[data-lang="en"] .bi > .zh { display: none !important; }
html[data-lang="en"] .bi > .en { display: block !important; font-weight: 400; font-size: 1em; }

/* ---------- 深底 / 白字场景：中文行必须跟着变浅，否则看不清 ---------- */
.toast .bi > .zh,
.btn.primary .bi > .zh,
.btn.light .bi > .zh,
.btn.danger .bi > .zh,
.chip-toggle.on .bi > .zh,
.tab-btn.active .bi > .zh,
.badge .bi > .zh,
.topbar .bi > .zh,
.lb-me-tag .bi > .zh { color: rgba(255, 255, 255, .82); }

/* ---------- 按钮：≥88px 双行 → min-height 42px（PRD §2.2） ---------- */
.btn.bi-host,
.chip-toggle.bi-host { min-height: 42px; }
.btn.sm.bi-host { min-height: 36px; }
.btn.bi-host .bi { text-align: center; }

/* ---------- 标签页导航：项高 40 → 52px（PRD §2.2） ---------- */
.tab-btn.bi-host { min-height: 52px; }
.tab-btn .bi { flex: 1 1 auto; min-width: 0; }
.tab-btn .idx { flex: 0 0 auto; align-self: flex-end; }

/* ---------- Toast：双行，max-width 320 → 380px（PRD §2.2） ---------- */
.toast { max-width: 380px; text-align: center; }
.toast .bi { text-align: center; }

/* ---------- 表头两行不撑爆行高 ---------- */
table.ktable th .bi > .en,
table.ktable th .bi > .zh { white-space: nowrap; }
table.ktable th { vertical-align: middle; }

/* ---------- 长段落：整段英文 + 分隔线 + 整段中文（PRD §2.2 ④） ---------- */
.bi-para > .en,
.bi-para > .zh { display: block; line-height: 1.6; }
.bi-para .para-sep,
.bi-para > .para-sep {
  display: block;
  height: 1px;
  background: var(--line, #2a2f55);
  margin: 6px 0;
}
.bi-para-single { line-height: 1.6; }

/* ---------- 原生下拉：单行「English · 中文」，不撑高 select ---------- */
select option { white-space: nowrap; }

/* ==========================================================================
   v1.15 周报编辑页（T04 使用的类名，T03 一次性加齐）
   ========================================================================== */
.wrd-block { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; }
.wrd-block.readonly { background: #1e234d; }
.wrd-block.edited { border-left: 3px solid var(--warn); }
.wrd-badge-edited { font-size: 11px; color: var(--warn); }
.wrd-block textarea { width: 100%; min-height: 76px; resize: vertical; }
.wrd-reset { cursor: pointer; }
.wrd-en-pending { color: var(--muted, #8f94ba); }
.wrd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wrd-title { font-size: 15px; font-weight: 700; }
.wrd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wrd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.wrd-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; }
.wrd-row input[type="checkbox"] { margin-top: 3px; }
.wrd-sub { padding-left: 24px; }
.wrd-lock { font-size: 12px; }
.wrd-page-est { font-size: 12px; color: var(--ink-500); }
.wrd-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wrd-note { font-size: 12px; color: var(--ink-500); }
.wrd-count { font-size: 11px; color: var(--ink-400); }

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

@media print {
  .no-print { display: none !important; }
  .wrd-block { break-inside: avoid; border: 0; }
}

/* ==========================================================================
   v1.15 顶栏语言菜单
   ========================================================================== */
.who-menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.who-menu-lang { padding: 4px 12px 6px; }
.who-menu-lang-title {
  display: block; font-size: 11px; color: var(--ink-400);
  letter-spacing: .5px; margin-bottom: 4px;
}
.who-menu-lang button {
  display: block; width: 100%; text-align: left;
  padding: 5px 8px; margin: 2px 0;
  border: none; border-radius: 6px; background: transparent;
  color: var(--ink-700); font-size: 13px; font-family: inherit; cursor: pointer;
}
.who-menu-lang button:hover { background: #20254e; color: var(--primary-2); }
html[data-lang="bi"] .who-menu-lang button[data-lang="bi"],
html[data-lang="zh"] .who-menu-lang button[data-lang="zh"],
html[data-lang="en"] .who-menu-lang button[data-lang="en"] {
  background: rgba(14, 165, 233, .12);
  color: var(--primary-2);
  font-weight: 600;
}

/* ==========================================================================
   v1.15 双语确认弹窗（public/bi-modal.js · window.biConfirm）
   命名前缀 .bim-，与 .wrd-* 保持一致；零依赖、无构建。
   按钮 ≥88px 的双行 / 单行裁决由 public/i18n.js 运行时测量，此处只负责呈现。
   ========================================================================== */
.bim-mask {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(17, 24, 39, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: bim-fade .14s ease-out;
}
.bim-card {
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--card, #fff);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  padding: 20px 22px 16px;
  animation: bim-pop .16s ease-out;
}

/* 标题：英文行 + 中文行（i18n.js 的 .bi 双行容器） */
.bim-head { margin-bottom: 10px; }
.bim-title { font-size: 15px; font-weight: 700; }
.bim-title > .zh { font-size: 13px; font-weight: 500; }

/* 正文：英文上一行、中文下一行；pre-line 支持多行长文案（如「开始新学期」清单） */
.bim-body { margin-bottom: 18px; }
.bim-msg { white-space: pre-line; line-height: 1.6; word-break: break-word; }
.bim-msg.en { font-size: 14px; color: var(--ink-800, #dfe2f4); }
.bim-msg.zh { font-size: 13px; color: var(--ink-500, #8f94ba); margin-top: 4px; }

/* 操作区 */
.bim-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.bim-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 112px;             /* ≥88px → i18n.js 判定为双行（英文上 / 中文下） */
  padding: 8px 18px;
  border: 1px solid var(--line, #2a2f55);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-700, #c3c8e2);
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .08s ease;
}
.bim-btn:hover { box-shadow: var(--shadow); }
.bim-btn:active { transform: translateY(1px); }
.bim-btn:focus-visible { outline: 2px solid var(--primary, #38bdf8); outline-offset: 2px; }
.bim-btn .bi { text-align: center; }
.bim-btn.bi-host { min-height: 42px; }

.bim-btn-ghost { background: var(--card); }
.bim-btn-ghost:hover { background: #1e234d; }

/* 主按钮：系统橙色主色；危险操作走红色 */
.bim-btn-primary {
  background: #F97316; border-color: #F97316; color: #fff; font-weight: 600;
}
.bim-btn-primary:hover { background: #fb923c; border-color: #fb923c; }
.bim-btn-danger {
  background: var(--danger, #f87171); border-color: var(--danger, #f87171);
  color: #fff; font-weight: 600;
}
.bim-btn-danger:hover { background: #fca5a5; border-color: #fca5a5; }

/* 白字按钮：中文行跟着变浅，与系统既有约定一致 */
.bim-btn-primary .bi > .zh,
.bim-btn-danger .bi > .zh { color: rgba(255, 255, 255, .85); }

@keyframes bim-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bim-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .bim-actions { flex-direction: column-reverse; }
  .bim-btn { width: 100%; }
}

/* 语言模式覆盖「宽度分流」：切到仅中文 / 仅英文时不能出现空白行。
   与 i18n.js 段落末尾的同款规则保持一致的强度。 */
html[data-lang="zh"] .bim-btn .bi > .en { display: none !important; }
html[data-lang="zh"] .bim-btn .bi > .zh { display: block !important; }
html[data-lang="en"] .bim-btn .bi > .zh { display: none !important; }
html[data-lang="en"] .bim-btn .bi > .en { display: block !important; }

/* 语言模式切换：正文行同理（.bim-msg 不在 .bi 容器内，需单独覆盖） */
html[data-lang="zh"] .bim-msg.en { display: none; }
html[data-lang="en"] .bim-msg.zh { display: none; }

/* ==========================================================================
 * v1.16：每周 1v1 Review（.rv-*）+ 社会服务项目（.sp-*）
 * ⚠️ 本区块只新增，不改动上方任何既有规则（v1.15 曾因重复规则的子集/超集关系删错 CSS）。
 * 命名前缀：.rv-*（Review）/ .svr-*（学生端 Review）/ .sp-*（服务项目）/ .sch-*（在读学校）。
 * ========================================================================== */

/* ---------- 页面骨架 ---------- */
.rv-toolbar { padding: 12px 14px; }
.rv-tool-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.rv-tool-row > div { display: flex; flex-direction: column; gap: 4px; }
.rv-tool-row label { font-size: 12px; color: #8f94ba; }
.rv-tool-status { margin-left: auto; }
.rv-tool-meta { margin-top: 6px; }
.rv-weeknav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rv-weeknav input[type="date"] { max-width: 160px; }

.rv-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.rv-badge-draft { background: rgba(251,146,60,.12); color: var(--warn); border: 1px solid rgba(251,146,60,.4); }
.rv-badge-pub { background: rgba(52,211,153,.12); color: var(--ok); border: 1px solid rgba(52,211,153,.4); }

.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.rv-col-main { display: flex; flex-direction: column; gap: 14px; }
.rv-col-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }

/* Review 区块 */
.rv-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.rv-sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.rv-sec-head h3 { margin: 0; font-size: 15px; }
.rv-sec-count { margin-left: auto; font-size: 12px; color: #8f94ba; }
.rv-required { margin-left: auto; font-size: 12px; color: var(--warn); font-weight: 600; }

/* 打分项 */
.rv-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rv-item:last-child { border-bottom: 0; }
.rv-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-item-label { font-weight: 600; }
.rv-item-last { margin-left: auto; font-size: 12px; color: #8f94ba; }

/* 五格 / 四格 / 三格 / 两格 radio：允许换行，禁止截断（坑③） */
.rv-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-cell {
  position: relative; flex: 1 1 86px; min-width: 74px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; background: #1e234d; text-align: center;
  font-size: 13px; line-height: 1.25; word-break: break-word;
}
.rv-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rv-cell-en { font-size: 12px; color: #c3c8e2; }
.rv-cell-zh { font-size: 12px; color: #8f94ba; }
.rv-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #7c81a6; background: var(--card); margin-top: 4px; }
.rv-cell.on { background: rgba(165,180,252,.12); border-color: var(--primary); }
.rv-cell:hover { border-color: var(--primary); }
.rv-cell:has(input:checked) { background: rgba(165,180,252,.12); border-color: var(--primary); }
.rv-cell:has(input:checked) .rv-dot,
.rv-cell.on .rv-dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 2px #fff; }
.rv-cell:focus-within { outline: 2px solid rgba(14, 165, 233, .45); outline-offset: 1px; }
.rv-hint { font-size: 12px; color: #8f94ba; margin-top: 6px; }

/* 自由文本 */
.rv-note { margin-top: 8px; }
.rv-note-label { font-weight: 600; margin-bottom: 6px; }
.rv-note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-note-grid label { font-size: 12px; color: #8f94ba; }
.rv-note-grid textarea { width: 100%; box-sizing: border-box; }
.rv-note-count { font-size: 12px; color: #7c81a6; text-align: right; }
.rv-note-note { font-size: 12px; color: #8f94ba; margin-top: 4px; }

/* 三句话脚手架 */
.rv-scaffold { background: rgba(165,180,252,.12); border: 1px solid rgba(165,180,252,.4); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; color: #a5b4fc; }
.rv-scaffold ul { margin: 6px 0 0; padding-left: 20px; }
.rv-scaffold li { margin: 2px 0; }

/* 上周闭环 */
.rv-followup { border-left: 3px solid var(--primary); background: #1e234d; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.rv-followup-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-followup-text { font-weight: 600; }
.rv-followup-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.rv-inline { flex: 1 1 260px; min-width: 180px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.rv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

.rv-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #1e234d; color: #a7adcb; font-size: 12px; }
.rv-verified { color: var(--ok); font-size: 12px; font-weight: 600; }

/* 下周重点 */
.rv-nf-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.rv-nf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-nf-idx { width: 20px; text-align: center; color: #7c81a6; font-weight: 600; }
.rv-nf-text { flex: 1 1 300px; min-width: 200px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.rv-nf-domain { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.rv-nf-carry { background: rgba(165,180,252,.12); border: 1px dashed #a5b4fc; border-radius: 8px; padding: 6px 8px; }
.rv-nf-carrytext { flex: 1 1 260px; }

/* 服务项目勾选 */
.rv-proj-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.rv-proj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.rv-proj-missing { color: #7c81a6; font-style: italic; }

.rv-gray { padding: 10px; background: #20254e; color: #8f94ba; border-radius: 8px; font-size: 13px; }
.rv-warn { background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.25); color: #fcd34d; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 4px; }
.rv-notice { border-color: var(--warn); }

.rv-action-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* 证据面板 */
.rv-evidence .rv-ev-head { justify-content: space-between; }
.rv-ev-snap { font-size: 12px; color: #8f94ba; margin-bottom: 8px; }
.rv-ev-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rv-ev-row:last-child { border-bottom: 0; }
.rv-ev-icon { width: 22px; text-align: center; }
.rv-ev-label { font-weight: 600; font-size: 13px; }
.rv-ev-line { font-size: 12px; color: #a7adcb; }
.rv-ev-gray { font-size: 12px; color: #7c81a6; background: #20254e; border-radius: 6px; padding: 4px 8px; margin-top: 4px; }

.rv-closure .rv-bar { height: 10px; background: #2a2f55; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.rv-closure .rv-bar > span { display: block; height: 100%; background: var(--primary); }
.rv-g6 { background: rgba(165,180,252,.12); border: 1px solid rgba(165,180,252,.4); color: #a5b4fc; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* ---------- 学生端只读 Review ---------- */
.svr-mentor-text { font-size: 15px; line-height: 1.6; }
.svr-group { margin-bottom: 10px; }
.svr-group-title { font-weight: 600; color: #c3c8e2; margin-bottom: 4px; }
.svr-rate-line { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.svr-rate-line:last-child { border-bottom: 0; }
.svr-rate-label { flex: 1 1 auto; }
.svr-rate-val { margin-left: auto; text-align: right; }
.svr-rate-val.na { font-style: italic; color: #7c81a6; }
.svr-note-line { font-size: 13px; color: #a7adcb; padding: 4px 0; }
.svr-focus, .svr-follow { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.svr-evidence { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.svr-evidence summary { cursor: pointer; font-weight: 600; }
.svr-ev-body { margin-top: 8px; }
.svr-ev-body .rv-ev-line { padding: 2px 0; }

/* ---------- 社会服务项目 ---------- */
.sp-card { }
.sp-group { font-weight: 600; color: #c3c8e2; margin: 10px 0 6px; font-size: 13px; }
.sp-item { position: relative; padding: 8px 0 10px 18px; border-left: 2px solid var(--line); margin-left: 6px; }
.sp-item.done { border-left-style: dashed; opacity: .92; }
.sp-dot { position: absolute; left: -7px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.sp-item.done .sp-dot { background: #7c81a6; }
.sp-item-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-item-name { font-weight: 600; }
.sp-item-sub { margin-top: 2px; }
.sp-item-outcome { margin-top: 4px; font-size: 13px; color: #a7adcb; }
.sp-item-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sp-verified { color: var(--ok); font-size: 12px; font-weight: 600; }
.sp-verified.off { color: #7c81a6; font-weight: 500; }
.sp-role-up { margin-top: 10px; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); color: #6ee7b7; border-radius: 8px; padding: 8px 12px; font-size: 13px; }

/* 服务项目弹层 */
.sp-mask { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow: auto; }
.sp-modal { background: var(--card); border-radius: var(--radius); width: 100%; max-width: 620px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.sp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sp-modal-head h3 { margin: 0; font-size: 15px; }
.sp-modal-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sp-modal-body .grid { gap: 10px; }
.sp-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sp-auto-hint { font-size: 12px; color: #8f94ba; margin-top: 4px; }

/* 在读学校内联编辑 */
.sch-editor { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sch-editor input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; min-width: 200px; }

/* ---------- 窄屏（含 iPad 横屏 1100px）：证据移顶、单列；五格 radio 不截断 ---------- */
@media (max-width: 1180px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-col-side { position: static; order: -1; }   /* 证据移到表单顶部（默认展开） */
  .rv-note-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rv-cell { flex-basis: 30%; font-size: 12px; }
  .rv-cell-en, .rv-cell-zh { font-size: 11px; }
}

/* ---------- v1.16.1：C6 二次机会标签 + 证据推算来源小字 ---------- */
/* 二次机会：区别于普通顺延的蓝色调，一眼看得出「这是最后一次机会」 */
.rv-tag-retry { background: rgba(251,146,60,.12); color: var(--warn); border: 1px solid rgba(251,146,60,.4); font-weight: 600; }
/* 推算来源标注：比正文更小，只是脚注，不抢阅读。
   ⚠️ 颜色刻意不用更浅的 #7c81a6 —— 实测它在白卡（--card:#ffffff）上对比度只有 2.54:1，
      低于 WCAG AA 4.5:1，11px 小字基本看不清。改用全站既有弱化色 var(--ink-500,#8f94ba)
      （4.83:1，过 AA），仍是明显弱于正文（.rv-ev-line 是 #a7adcb，7.56:1），不影响「脚注」定位。 */
.rv-ev-note { display: inline-block; font-size: 11px; line-height: 1.35; color: var(--ink-500, #8f94ba); margin-top: 2px; }
/* 小字里的中英两行：英文在上、中文在下，行距收紧，避免把证据面板撑高。
   中文行不覆写颜色，直接继承 .bi > .zh 既有规则（var(--ink-500)），保持全站一致。 */
.rv-ev-note .bi { display: block; }
.rv-ev-note .bi > .en { font-size: 10.5px; }
.rv-ev-note .bi > .zh { font-size: 11px; }

/* ---------- v1.16.1：学生档案三字段（性别 / 生日 / 兴趣爱好） ---------- */
/* 命名前缀 .prf-*；只读单元格与编辑器容器都复用 v1.16 的 .sch-*（同一套内联编辑手势）。 */

/* 多行值：兴趣爱好允许换行（textarea 收的原样保留），但不能把表格撑破。
   `pre-wrap` 而非 `<br>` 拼接 —— 前者不额外引入 HTML 注入面（队伍既有纪律）。 */
.prf-multi {
  display: inline-block;
  max-width: 100%;
  white-space: pre-wrap;      /* 保留用户敲的换行 */
  overflow-wrap: break-word;  /* 超长单词 / 超长 URL 也要断，避免 iPad 1100px 下撑破卡片 */
  word-break: break-word;
  vertical-align: top;
}
/* 生日：用等宽字体，YYYY-MM-DD 的八个字符对齐，读起来不像正文 */
.prf-date { font-variant-numeric: tabular-nums; }

/* 内联编辑器容器：与 .sch-editor 同一套，只是字段多了套 ±教师们三种控件宽度 */
.prf-editor { align-items: flex-start; }
.prf-editor .prf-input {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  color: var(--ink-900);
}
/* 性别下拉：选项会被 paintOptions() 渲染成「Male · 男」，比原本宽不少 */
.prf-editor .prf-select { width: auto; min-width: 168px; }
/* ⚠️ `<input type="date">` 的坑：基类 `input[type="date"] { width: 100% }`（:317）在
   inline-flex 容器里会按容器宽度撑开，而 Chrome 的原生日期控件要求「内容宽 + 日历图标宽」
   同时可见；宽度不够时它会先把日历图标挤掉，再挤掉年月日分隔符。
   这里给它一个**确定的**宽度而不是百分比，并把 box-sizing 归位，保证图标不被裁。 */
.prf-editor .prf-date-input {
  width: 168px;
  flex: 0 0 168px;
  min-width: 0;               /* 覆盖 .sch-editor input 的 min-width:200px（会让它横向溢出） */
  box-sizing: border-box;
  line-height: 1.4;
}
/* 兴趣爱好多行框：窄屏时进一步让行；grow 上限交给父容器，不写死像素 */
.prf-editor .prf-textarea {
  width: 100%;
  max-width: 100%;
  min-height: 76px;
  line-height: 1.5;
  resize: vertical;
}
/* 让三种控件与「保存 / 取消」按钮在窄屏下各占一行，不挤成一坨 */
.prf-editor { flex-wrap: wrap; }

/* ---------- 窄屏（含 iPad 横屏 1100px）：档案行不撑破卡片 ---------- */
@media (max-width: 1180px) {
  .prf-editor .prf-date-input { flex: 1 1 168px; }
  .prf-editor .prf-select { flex: 1 1 168px; width: 168px; }
}

/* ==========================================================================
 * v1.17：学生课程表 / Student Timetable（DESIGN_v1.17 §6.4 T03）
 *
 * 设计约定：网格直接用 table.ktable（@346），本段只追加 tt-* 修饰类，
 * 零改动既有的表格 / 卡片 / 按钮样式。全部追加在文件末尾，避免既有行号漂移。
 * ======================================================================== */

/* 顶部的「在读学校」行：有值才渲染（为空整行不显示，不出现「—」占位） */
.tt-school {
  margin: 0 0 10px; font-size: 13px; color: var(--ink-500, #8f94ba);
}
.tt-school b { color: var(--ink, #f2f3fb); font-weight: 600; }

/* 网格本体：列宽由内容决定，格子不换行 */
/* v1.22（R1）：列数由 5 扩为 7（含周六/周日），min-width 同步放大，避免周末列被挤没 */
.tt-grid { table-layout: fixed; min-width: 940px; }
.tt-grid th, .tt-grid td { white-space: nowrap; }

/* 纵列表头「节次」与行标签「第 N 节」 */
.tt-grid .tt-c-period { width: 92px; }
.tt-grid .tt-period {
  background: #1e234d; color: var(--ink-500, #8f94ba); font-weight: 600; white-space: nowrap;
}
/* 日期列等宽，保证「周一…周日」不齐列时表格不歪（v1.22：7 列 → 各 12%） */
.tt-grid .tt-c-day { width: 12%; }
/* v1.22（Q32）：周末列浅底区分 —— 帮导师一眼分辨「校内 5 天」与「周末补课」 */
.tt-grid .tt-c-day.tt-weekend { background: #20254e; color: var(--ink-700, #c3c8e2); }
.tt-grid td.tt-weekend { background: #1e234d; }
.tt-grid td.tt-weekend.tt-empty::before { color: #2a2f55; }
/* 操作列（只读态不渲染该列） */
.tt-grid .tt-c-ops { width: 52px; text-align: center; }

/* 分时段标题：通栏、浅底、加粗 —— 学生在长表格里靠它定位自己在哪个时段 */
.tt-grid tr.tt-section-head th {
  background: #20254e;
  color: var(--ink-700, #c3c8e2);
  font-weight: 700;
  letter-spacing: .02em;
  border-top: 1px solid var(--line, #2a2f55);
}
/* 「午休」固定分隔行：通栏 + 居中 + 更浅的底色，一眼看出它不是一个可填的行 */
.tt-grid tr.tt-noon td {
  background: #1e234d;
  text-align: center;
  color: var(--ink-500, #8f94ba);
  font-weight: 600;
  padding: 6px 10px;
}
/* 该时段一行都没有时的空态 */
.tt-grid tr.tt-empty-row td {
  text-align: center;
  color: var(--ink-500, #8f94ba);
  background: var(--card);
}
.tt-grid tr.tt-empty-row td .bi { font-size: 12px; }

/* 可编辑格子：去掉 input 默认边框，看起来像「可以直接点的格子」，聚焦才亮边 */
.tt-cell {
  width: 100%; box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 13px; font-family: inherit; color: inherit;
  outline: none;
}
.tt-cell:hover { border-color: var(--line, #2a2f55); background: var(--card); }
.tt-cell:focus { border-color: #a5b4fc; background: var(--card); box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.tt-cell::placeholder { color: #7c81a6; }

/* 只读态格子（学科老师看到的就是它，不渲染 <input>）
   ⚠️ v1.25.4 修 P0：此处曾写 display:block —— td 脱离表格列流 → 整个网格塌成
   「只剩一列、每科一行、表格拉长几倍」的烂摊子（龙哥截图实锤）。td 必须保持
   table-cell，列宽由 .tt-c-day 的 12% 统一接管，只读态与编辑态布局完全一致。 */
.tt-cell-ro {
  min-height: 26px; padding: 4px 8px; color: var(--ink, #f2f3fb);
}
/* 只读态空格子：画一条短横线，让空白是「没排课」而不是「没渲染出来」 */
.tt-cell-ro.tt-empty::before { content: '—'; color: #3d4374; }

/* 「＋ 加一节」行：跟在所属时段的最后一行后面，视觉上就是「追加到末尾」 */
.tt-grid tr.tt-addrow td {
  border-bottom: 1px solid var(--line, #2a2f55);
  background: var(--card);
  padding: 6px 10px;
}
.tt-grid tr.tt-addrow td .btn { white-space: nowrap; }

/* 行右侧的「×」删行按钮：常态淡出，hover 才显红，避免 45 个格子旁一片红 */
.tt-grid .tt-del {
  padding: 2px 8px; font-size: 13px; line-height: 1.2;
  color: var(--ink-500, #8f94ba); background: var(--card);
  border: 1px solid var(--line, #2a2f55); border-radius: 6px; cursor: pointer;
}
.tt-grid .tt-del:hover { color: var(--danger, #f87171); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }

/* 课程表页底部提示（每个时段最多 8 行 / 格子共存草稿等） */
.tt-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-500, #8f94ba); }

/* ---------------- v1.25.4：分析报告折叠条目（details） ---------------- */
details.mi-fold > summary {
  cursor: pointer; list-style: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  min-height: 30px;
}
details.mi-fold > summary::-webkit-details-marker { display: none; }
details.mi-fold > summary .mi-fold-caret {
  margin-left: auto; font-size: 11px; color: var(--ink-400, #747aa0);
  transition: transform .15s ease; flex: none;
}
details.mi-fold[open] > summary .mi-fold-caret { transform: rotate(90deg); }
details.mi-fold[open] > summary { border-bottom: 1px solid var(--line, #2a2f55); padding-bottom: 8px; margin-bottom: 8px; }
.mi-fold-body { padding-top: 2px; }

/* ---------------- v1.25.7：周中计划页内嵌只读课表（折叠块，默认展开） ---------------- */
details.plan-tt > summary { cursor: pointer; list-style: none; }
details.plan-tt > summary::-webkit-details-marker { display: none; }
details.plan-tt > summary .mi-fold-caret {
  font-size: 11px; color: var(--ink-400, #747aa0);
  transition: transform .15s ease; flex: none;
}
details.plan-tt[open] > summary .mi-fold-caret { transform: rotate(90deg); }
details.plan-tt .tt-body { padding-top: 2px; }

/* ---------------- v1.25.7：AI 备考建议默认折叠 ---------------- */
details.ai-fold > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
details.ai-fold > summary::-webkit-details-marker { display: none; }
details.ai-fold > summary .mi-fold-caret {
  font-size: 11px; color: var(--ink-400, #747aa0);
  transition: transform .15s ease; flex: none;
}
details.ai-fold[open] > summary { margin-bottom: 4px; }
details.ai-fold[open] > summary .mi-fold-caret { transform: rotate(90deg); }
details.ai-fold[open] > summary .ai-fold-tip { display: none; }
details.ai-fold .ai-fold-body { padding-top: 6px; }

/* ---------------- v1.25.7：计划页「我的考试计划」摘要（周中计划 / 周反思共用） ---------------- */
.ex-digest { margin-bottom: 12px; }
.ex-digest .card-head { align-items: center; gap: 10px; flex-wrap: wrap; }
.ex-digest-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  padding: 7px 0; border-top: 1px solid var(--line, #2a2f55);
}
.ex-digest-row:first-of-type { border-top: 0; }
.ex-digest-subj { font-weight: 600; min-width: 64px; }
.ex-digest-date { color: var(--ink-700, #c3c8e2); }

/* ---------------- v1.25.4：每日行为分「任务分项」 ---------------- */
.ti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; }
.ti-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.ti-name { font-size: 13px; color: var(--ink-700, #c3c8e2); white-space: nowrap; }
.ti-sel {
  background: var(--card, #161a3f); color: var(--ink-900, #f2f3fb);
  border: 1px solid var(--line, #2a2f55); border-radius: 6px;
  padding: 3px 6px; font-size: 12px; font-family: inherit;
}

/* ------------------------------ 老师端档案页区块 ------------------------------ */
.tt-block { margin-bottom: 0; }
.tt-block .card-head { align-items: center; gap: 10px; flex-wrap: wrap; }
/* 摘要行：「已填 N 节 / N periods filled」 */
.tt-summary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-500, #8f94ba); white-space: nowrap;
}
/* 折叠/展开图标 */
.tt-toggle { display: inline-flex; align-items: center; gap: 4px; }
.tt-caret { display: inline-block; transition: transform .15s ease; font-size: 11px; }
.tt-caret.open { transform: rotate(90deg); }
/* 展开后的正文 */
.tt-body { margin-top: 10px; }
/* 代填提示条（X58） */
.tt-proxy {
  margin: 0 0 10px; padding: 8px 12px; border-radius: 8px;
  background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.25); color: #fcd34d; font-size: 12px;
}

/* ------------------------------ 窄屏 ------------------------------ */
/* iPad 竖屏 / 手机：格子最小宽度撑住，整表横向滚动（.table-wrap 已给 overflow-x） */
@media (max-width: 1180px) {
  .tt-grid { min-width: 820px; }
  .tt-grid .tt-c-period { width: 78px; }
}
@media (max-width: 720px) {
  /* 窄屏下「节次」列只留标签，不再和科目列抢宽度 */
  .tt-grid { min-width: 760px; font-size: 12px; }
  .tt-grid th, .tt-grid td { padding: 6px 6px; }
  .tt-cell { padding: 5px 6px; }
}


/* ============================================================================
 * v1.22：我的错题 v2（重做闭环 + IMA 配置）
 * 类名统一 mi- 前缀，避免与既有 ktable / card / tabs 冲突。
 * ========================================================================== */
.mi-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px; padding: 4px;
  background: #20254e; border-radius: 10px;
}
.mi-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-700, #c3c8e2);
  font-size: 14px; font-family: inherit; cursor: pointer;
}
.mi-tab:hover { background: #2a2f55; }
.mi-tab.active { background: var(--card); color: var(--ink, #f2f3fb); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.mi-tab-badge {
  display: inline-block; min-width: 18px; padding: 0 5px;
  border-radius: 9px; background: #f87171; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-family: var(--mono);
}

/* 状态徽标（窄容器 → 只放双语结构，不塞裸中文） */
.mi-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; line-height: 18px; white-space: nowrap;
  border: 1px solid transparent;
}
.mi-badge-pending { background: #20254e; color: #c3c8e2; border-color: #2a2f55; }
.mi-badge-in_progress { background: rgba(165,180,252,.12); color: #c7d2fe; border-color: rgba(165,180,252,.4); }
.mi-badge-mastered { background: rgba(52,211,153,.12); color: #34d399; border-color: rgba(52,211,153,.4); }
.mi-badge-relapsed { background: rgba(248,113,113,.12); color: #fca5a5; border-color: rgba(248,113,113,.4); }

/* 掌握度进度条 */
.mi-mastery { display: inline-flex; align-items: center; gap: 8px; }
.mi-mastery-track {
  display: inline-block; width: 64px; height: 6px; border-radius: 3px;
  background: #2a2f55; overflow: hidden; vertical-align: middle;
}
.mi-mastery-fill { display: block; height: 100%; border-radius: 3px; }
.mi-mastery-fill.good { background: #34d399; }
.mi-mastery-fill.mid { background: #fbbf24; }
.mi-mastery-fill.low { background: #f87171; }

/* 总览 KPI */
.mi-kpis { margin-bottom: 14px; }
.mi-kpi { text-align: center; }
.mi-kpi.warn { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }
.mi-kpi-num { font-size: 20px; font-weight: 700; font-family: var(--mono); color: var(--ink, #f2f3fb); }
.mi-kpi-sub { font-size: 14px; color: #f87171; }
.mi-kpi-label { margin-top: 4px; font-size: 12px; color: var(--ink-500, #8f94ba); }

/* 总览待办 */
.mi-todo-list { margin: 0; padding-left: 18px; }
.mi-todo-list li { margin: 6px 0; font-size: 13px; }
.mi-metric { display: flex; flex-direction: column; gap: 4px; }
.mi-metric b { font-size: 16px; font-family: var(--mono); }

/* 展开编辑区 */
.mi-row.mi-detail-open { background: #1e234d; }
.mi-ops { white-space: nowrap; }
.mi-ops .btn { margin-right: 4px; }
.mi-detail > td { background: #1e234d; padding: 12px 14px; }
.mi-detail-grid { display: flex; flex-direction: column; gap: 10px; }
.mi-detail-actions { display: flex; justify-content: flex-end; }
.mi-ta {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 8px 10px; border: 1px solid var(--line, #2a2f55); border-radius: 8px;
  font-family: inherit; font-size: 13px; line-height: 1.5; color: var(--ink, #f2f3fb);
}
.mi-ta:focus { outline: none; border-color: var(--brand, #a5b4fc); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* 重做计划卡片 */
.mi-redo-card {
  border: 1px solid var(--line, #2a2f55); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; background: var(--card);
}
.mi-redo-card.overdue { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }
.mi-redo-card.done { opacity: .75; }
.mi-redo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mi-round {
  display: inline-block; padding: 1px 7px; border-radius: 8px;
  background: rgba(106,90,232,.16); color: #a5b4fc; font-size: 12px; line-height: 18px;
}
.mi-redo-subject { font-weight: 600; }
.mi-due { margin-left: auto; font-size: 12px; color: var(--ink-500, #8f94ba); font-family: var(--mono); }
.mi-due.overdue { color: #f87171; font-weight: 600; }
.mi-redo-know { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.mi-chip {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: #20254e; color: #c3c8e2; font-size: 12px;
}
.mi-redo-stem { margin-top: 6px; font-size: 13px; color: var(--ink-700, #c3c8e2); }
.mi-redo-ops { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* IMA 同步 */
.mi-ima-status { margin: 4px 0 12px; }
.mi-ima-ops { margin-top: 12px; display: flex; gap: 8px; }
.mi-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* v1.23.3（H76/H77）：学生 IMA 页签只读绑定列表 + 管理端绑定表格新增表单 */
.mi-ima-steps { margin: 0 0 4px; padding-left: 22px; }
.mi-ima-steps li { margin: 4px 0; }
.mi-ima-bindings { display: grid; gap: 10px; margin-bottom: 4px; }
.mi-ima-binding { border: 1px solid var(--line, #2a2f55); border-radius: 10px; padding: 10px 12px; }
.mi-ima-binding .mi-redo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mi-ima-add { margin-top: 14px; border-top: 1px dashed var(--line, #2a2f55); padding-top: 12px; }
.mi-ima-add .mi-check { margin: 4px 0 8px; }

/* ===== v1.25：任务完成度（Task Completion Breakdown） ===== */
/* v1.25.13：老师端顶部冻结条（周导航 + KPI + 表题整体吸顶，方案同学生档案 .stu-ov-topbar） */
.tc-pin {
  position: sticky; top: 68px; z-index: 6;
  background: var(--bg);
  padding: 2px 0 12px;
  margin-bottom: 4px;
}
/* 吸顶空隙遮罩：铺在冻结条上方 12px 处，颜色=页面底色，视觉上就是"一个空行"（同 .stu-ov-topbar::before） */
.tc-pin::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}
/* 底部细线：滚动时区分冻结区与下方表格 */
.tc-pin::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line);
}
.tc-pin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.tc-pin-head h2 { margin: 0; }
.tc-scroll { overflow-x: auto; }
.tc-table { min-width: 1020px; }
.tc-th { white-space: nowrap; }
.tc-cell { vertical-align: top; }
.tc-name { white-space: nowrap; }
.tc-total, .tc-ops { white-space: nowrap; }
.tc-score { font-size: 15px; }
.tc-auto, .tc-manual { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.tc-auto .tc-tag, .tc-manual .tc-tag { font-size: 11px; }
.tc-raw { font-size: 11px; line-height: 1.35; }
.tc-sel { width: 100%; max-width: 132px; }
.tc-note { width: 100%; max-width: 132px; margin-top: 3px; font-size: 12px; }
.tc-hw { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.tc-num { width: 54px; }
.tc-ro { margin-top: 3px; font-size: 12px; }
.tc-grade {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 3px 9px; border-radius: 8px; color: #fff; font-weight: 700; line-height: 1.15;
}
.tc-grade-sub { font-size: 10px; font-weight: 400; opacity: .95; }
.tc-stu-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 14px; }
.tc-line {
  display: grid; grid-template-columns: 160px 1fr 130px 170px;
  gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line);
}
.tc-line-name { font-weight: 600; }
.tc-line-val { text-align: right; white-space: nowrap; }
.tc-line-note { text-align: right; }
.tc-bar-track { background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.tc-bar-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
/* v1.25.6：学生端自评编辑器占整行 */
.tc-self-edit {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px;
}
.tc-self-edit .tc-sel { max-width: 150px; }
.tc-self-edit .tc-note { max-width: 260px; margin-top: 0; flex: 1; min-width: 160px; }
@media (max-width: 720px) {
  .tc-line { grid-template-columns: 1fr; gap: 4px; }
  .tc-line-val, .tc-line-note { text-align: left; }
}

/* ==========================================================================
   v1.25.14（龙哥）：页面顶部「信息表头」+ 表格列头 全站冻结
   --------------------------------------------------------------------------
   背景：周 Review / 周报编辑 / 每日行为分 / 点评中心 / 我的错题 / 师生留言 等页面，
        顶部那一行信息（学生下拉 / 周导航 / 日期选择 / 页签 / 筛选）随长页面一起滚走 ——
        滑到一半既不知道在看哪位学生、也忘了停在哪一周、哪个日期。
   方案：与学生档案 .stu-ov-topbar（v1.25.9）、任务完成度 .tc-pin（v1.25.13）同一套口径：
        sticky 吸在系统顶栏正下方 12px + 页面底色遮缝（::before）+ 底部细线（::after）。
   顶层偏移口径：桌面 68px（顶栏 56 + 呼吸 12），窄屏 56px（顶栏 44 + 呼吸 12）。
   ========================================================================== */

/* ------------------------------ 1) 顶部信息条（裸条形态） ------------------------------
   用于：周导航 weekNavHtml、每日行为分日期条、我的错题页签等。
   这些条本身就是「控件行」，不额外套卡片 —— 直接吸在页面底色上，底部一条细线与正文分界。 */
.page-pin {
  position: sticky; top: 68px; z-index: 6;
  background: var(--bg);
  padding: 2px 0 10px;
  margin-bottom: 6px;
}
/* 吸顶空隙遮罩：铺在条上方 12px 处，颜色 = 页面底色，视觉上就是「一个空行」 */
.page-pin::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}
/* 底部细线：滚动时区分「冻结区」与「正文区」 */
.page-pin::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line);
}
/* v1.25.14：每日行为分 —— 左侧日期控件行 + 右侧「当日已录 N / M 人」徽标同处一行
   （原先是 .card > .card-head 的 flex 排布，脱离卡片后这里补回同一口径） */
.day-pin-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* v1.25.14：页签类吸顶条 —— 内层 .mi-tabs 自带上间距，外层吸顶条不再重复留白 */
.page-pin > .mi-tabs { margin-bottom: 0; }

/* ------------------------------ 2) 顶部工具条（卡片形态） ------------------------------
   用于：周 Review（.rv-toolbar）、周报编辑（.wrd-toolbar 外层 .card）、错题总览筛选卡等 ——
   它们本身就是一张卡片，吸顶时保留卡片外观，只把阴影加重、上边补一块底色遮缝。 */
.page-pin-card {
  position: sticky; top: 68px; z-index: 6;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .38);
}
.page-pin-card::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}

/* ------------------------------ 3) 师生留言顶部「当前学生」下拉 ------------------------------
   形态对齐学生档案 .stu-ov-topbar（同样式声明，独立类名避免两页互相牵连）。 */
.msg-pin {
  position: sticky; top: 68px; z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
/* 吸顶空隙遮罩 + 底部细线（与 .page-pin 同款，只是本体是带边框的卡片） */
.msg-pin::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}
.msg-pin-label { font-size: 12px; color: var(--ink-500); }
.msg-pin select { min-width: 220px; max-width: 360px; font-weight: 600; }
.msg-pin-meta { font-size: 12px; color: var(--ink-500); margin-left: auto; }

/* ------------------------------ 4) 表格列头吸顶 ------------------------------
   thead th 吸在（顶部吸顶条 + 12px 呼吸）之下：--pin-h 由 syncPinOffset() 实测写入，
   页面没有吸顶条时为 0，表头就贴在系统顶栏下方。
   ⚠️ sticky 不能被任何 overflow:auto/hidden 的祖先截断 —— 所以宽屏下放开 .table-wrap
      的横向滚动（见下方 media query），否则表头只会在表格容器内「假粘」。 */
table.ktable thead th {
  position: sticky;
  top: calc(68px + var(--pin-h));
  z-index: 5;
  background: #1e234d;   /* 必须不透明，否则行内容会从列头后面透出来 */
}
@media (min-width: 1200px) {
  .table-wrap { overflow-x: visible; }
}

/* ------------------------------ 5) 窄屏同步 ------------------------------ */
@media (max-width: 767px) {
  .page-pin,
  .page-pin-card,
  .msg-pin { top: 56px; }
  table.ktable thead th { top: calc(56px + var(--pin-h)); }
}

/* ==========================================================================
   v1.25.16（龙哥真机实测）：工具条「外层包裹层」吸顶修复
   --------------------------------------------------------------------------
   现象：v1.25.14 给周 Review / 我的周 Review / 周报编辑 的工具条加了 .page-pin-card，
        真机实测这三页「学生 / 周次」信息条照旧随页面滚走，完全没有冻结。
   根因（标准 CSS 行为，不是优先级问题）：
        这三页的工具条并不是 #content 的直接子元素，而是各自被一层固定 id 的
        「刷新容器」包着 —— `<div id="rvToolbar">` / `<div id="svrToolbar">` /
        `<div id="wrdToolbar">`（见 app.js renderReviewPage / renderStudentReviewPage /
        renderWeeklyReport，容器用于局部 innerHTML 刷新）。包裹层没有自己的高度，
        恒等于工具条自身高度 ⇒ 内层 sticky 的 containing block 高度 == 元素高度，
        可粘动范围 = 0，于是被「困死」在原地，永远不吸顶。
   修法：把吸顶职责上移给包裹层本身；内层退回静态定位，只保留卡片外观与浮起阴影。
        （其余页面 —— 每日行为分 / 我的错题页签 / 错题总览筛选 / 新生洽谈筛选 /
          周导航 weekNavHtml 全系 —— 都是 #content 直接子元素，不受影响，照旧生效。）
   ========================================================================== */
#rvToolbar,
#svrToolbar,
#wrdToolbar {
  position: sticky; top: 68px; z-index: 6;
  background: var(--bg);   /* 卡片圆角外露出的四角铺页面底色，滚动内容不透边 */
}
/* 内层工具条：不再自己 sticky（避免与外层嵌套 sticky 互扯），保留卡片视觉 */
#rvToolbar > .page-pin-card,
#svrToolbar > .page-pin-card,
#wrdToolbar > .page-pin-card {
  position: static;
}
/* 内层遮缝交给外层统一负责，避免双层重叠 */
#rvToolbar > .page-pin-card::before,
#svrToolbar > .page-pin-card::before,
#wrdToolbar > .page-pin-card::before { content: none; }
/* 包裹层上方 12px 呼吸区用页面底色遮缝（与 .page-pin 同一口径） */
#rvToolbar::before,
#svrToolbar::before,
#wrdToolbar::before {
  content: '';
  position: absolute; left: -1px; right: -1px; top: -12px; height: 12px;
  background: var(--bg);
}

@media (max-width: 767px) {
  #rvToolbar,
  #svrToolbar,
  #wrdToolbar { top: 56px; }
}
