/* ================= FAVAN Scribe 发凡司录 — 设计系统 ================= */
:root {
  --teal: #14cdc5;
  --blue: #2868d8;
  --purple: #6c50c7;
  --amber: #ffb241;
  --ink: #16243a;
  --ink-2: #44546d;
  --ink-3: #8694ab;
  --line: #e3e9f2;
  --bg: #f2f5fa;
  --card: #ffffff;
  --green: #1fa97c;
  --red: #e05656;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(22, 36, 58, 0.07);
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }
input, select, textarea {
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(20, 205, 197, 0.35); border-color: var(--teal); }
textarea { resize: vertical; line-height: 1.7; }

.app { display: flex; min-height: 100vh; }

/* ================= 侧边栏 ================= */
.sidebar {
  width: 218px; flex-shrink: 0;
  background: linear-gradient(178deg, #0e1c30 0%, #122a44 70%, #14304b 100%);
  color: #dbe6f5; display: flex; flex-direction: column;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 2px 6px 16px; }
.brand-logo {
  width: 104px; background: #fff; border-radius: 10px;
  padding: 8px 10px 6px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}
.brand-logo img { width: 100%; display: block; object-fit: contain; }
.brand-name { text-align: center; line-height: 1.45; }
.brand-name strong { display: block; font-size: 0.88rem; letter-spacing: 1px; color: #fff; }
.brand-name span { font-size: 0.7rem; color: #8fa6c4; letter-spacing: 2.5px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 0.92rem;
  color: #b9c9de; transition: background 0.15s, color 0.15s; position: relative; text-align: left;
}
.nav button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav button.active { background: rgba(20, 205, 197, 0.16); color: #fff; }
.nav button.active .nav-icon { background: var(--teal); color: #06302e; }
.nav-icon {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1); color: #9fb3cc;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700;
}
.nav-divider { margin: 14px 8px 6px; font-size: 0.7rem; color: #6e84a3; letter-spacing: 2px; }
.badge {
  position: absolute; right: 10px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--amber); color: #4d3404;
  font-size: 0.7rem; font-weight: 700; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.sidebar-foot .chip {
  font-size: 0.75rem; color: #9fb3cc; background: rgba(255, 255, 255, 0.07);
  border-radius: 8px; padding: 6px 10px; text-align: center;
}
.sidebar-foot .chip.ok { color: #7be8d2; background: rgba(20, 205, 197, 0.14); }
.sidebar-foot .chip.logout { cursor: pointer; color: #f0b9b9; }
.sidebar-foot .chip.logout:hover { background: rgba(224, 86, 86, 0.22); color: #ffd9d9; }

/* ================= 登录 ================= */
.login-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(150deg, #0e1c30 0%, #122a44 55%, #14506b 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: 22px; padding: 34px 38px 26px;
  width: 380px; max-width: 92vw; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: 12px;
}
.login-logo { width: 130px; margin: 0 auto 2px; }
.login-card h1 { font-size: 1.12rem; letter-spacing: 0.5px; }
.login-card .sub { color: var(--ink-3); font-size: 0.85rem; margin-top: -6px; }
.login-card input { text-align: center; font-size: 1rem; padding: 11px 12px; }
.login-error { color: var(--red); font-size: 0.85rem; font-weight: 600; }
.login-error.ok { color: #0e9a92; }
.login-forgot { background: none; border: none; box-shadow: none; color: var(--ink-3); font-size: 0.82rem; font-weight: 500; cursor: pointer; padding: 0; margin-top: -4px; align-self: center; text-decoration: underline; }
.login-forgot:hover { color: var(--teal); }
.login-card .hint { margin-top: 2px; }
#loginPane, #resetPane, #resetStep2 { display: flex; flex-direction: column; gap: 12px; }
#loginPane[hidden], #resetPane[hidden], #resetStep2[hidden] { display: none; }

/* 启动遮罩：会话校验完成前盖住一切，消除登录态闪现 */
.boot-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(150deg, #0e1c30 0%, #122a44 55%, #14506b 100%);
  display: flex; align-items: center; justify-content: center;
}
.boot-overlay[hidden] { display: none; }
.boot-card { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boot-logo { width: 120px; opacity: 0.96; }
.boot-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: #14cdc5;
  animation: bootspin 0.8s linear infinite;
}
.boot-text { font-size: 0.84rem; letter-spacing: 1.5px; color: #9fc2d2; }
@keyframes bootspin { to { transform: rotate(360deg); } }

/* ================= 主区域 ================= */
.content { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.view { display: none; animation: fadeIn 0.22s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.surface {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px;
}
.surface.narrow { max-width: 640px; }
.surface-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.surface-header h2 { font-size: 1.18rem; }
.surface-header .sub { color: var(--ink-3); font-size: 0.85rem; margin-top: 3px; }
.block-title { font-size: 0.92rem; margin: 16px 0 8px; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.intake-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 1100px) { .two-col, .intake-grid { grid-template-columns: 1fr; } }

/* ================= 通用控件 ================= */
.btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
button.primary {
  background: linear-gradient(135deg, var(--teal), #0fb3ac); color: #fff;
  padding: 10px 22px; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(20, 205, 197, 0.35);
}
button.primary:hover { filter: brightness(1.05); }
button.secondary { background: var(--blue); color: #fff; padding: 9px 18px; border-radius: 12px; font-weight: 600; }
button.quiet { background: #eef2f8; color: var(--ink-2); padding: 9px 16px; border-radius: 12px; font-weight: 500; }
button.quiet:hover { background: #e3eaf4; }
button.danger { background: #fdebeb; color: var(--red); padding: 9px 16px; border-radius: 12px; font-weight: 600; }
.mini-button { background: #eef2f8; color: var(--ink-2); padding: 6px 12px; border-radius: 9px; font-size: 0.82rem; }
.mini-button.primary-mini { background: var(--teal); color: #fff; }
.pill {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: #eef2f8; color: var(--ink-2);
}
.pill.green { background: rgba(31, 169, 124, 0.13); color: var(--green); }
.pill.purple { background: rgba(108, 80, 199, 0.12); color: var(--purple); }
.pill.amber { background: rgba(255, 178, 65, 0.18); color: #9a6206; }
.pill.red { background: rgba(224, 86, 86, 0.12); color: var(--red); }
.hint { color: var(--ink-3); font-size: 0.8rem; margin-top: 8px; line-height: 1.6; }
.field-label { display: block; font-size: 0.82rem; color: var(--ink-2); margin: 12px 0 6px; font-weight: 600; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 10px 0; }
.form-grid label { font-size: 0.8rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-row label {
  flex-direction: row; align-items: center; gap: 5px; font-weight: 500;
  background: #f3f6fb; padding: 6px 10px; border-radius: 9px; cursor: pointer;
}
.check-row input[type="checkbox"] { width: auto; }
.cf-add-btn {
  background: #fff; border: 1.5px dashed var(--teal); color: #0fb3ac;
  padding: 6px 14px; border-radius: 9px; font-size: 0.85rem; font-weight: 600;
}
.cf-add-btn:hover { background: rgba(20, 205, 197, 0.08); }

/* 阶段反馈 表单紧凑布局 */
.stage-basic { grid-template-columns: repeat(3, minmax(180px, 1fr)); margin-bottom: 14px; }
.stage-block { margin-bottom: 14px; }
@media (max-width: 760px) { .stage-basic { grid-template-columns: 1fr; } }

/* 模考数据联动卡片 */
.mock-link-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.mock-link-card {
  display: flex; gap: 9px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  min-width: 280px; flex: 1 1 280px; max-width: 440px; transition: all 0.15s; background: #fff;
}
.mock-link-card:hover { border-color: var(--teal); }
.mock-link-card.on { border-color: var(--teal); background: rgba(20, 205, 197, 0.06); }
.mock-link-card input[type="checkbox"] { width: auto; margin-top: 3px; }
.mock-link-card .ml-title { font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mock-link-card .ml-date { color: var(--ink-3); font-weight: 400; font-size: 0.78rem; }
.mock-link-card .ml-tag { padding: 1px 8px; font-size: 0.68rem; }
.mock-link-card .ml-meta { font-size: 0.78rem; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

.metric-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.metric {
  background: #f5f8fc; border-radius: 12px; padding: 12px 18px; min-width: 96px;
  display: flex; flex-direction: column; gap: 2px;
}
.metric strong { font-size: 1.35rem; color: var(--blue); }
.metric span { font-size: 0.76rem; color: var(--ink-3); }

.fold { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fold summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.fold[open] summary { margin-bottom: 10px; }
/* 阶段反馈「生成 / 重新生成阶段报告」——做成醒目的青色主行动条 */
#stageGenFold { margin-top: 16px; border: none; border-radius: 14px; padding: 0; transition: box-shadow 0.15s; }
#stageGenFold > summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--teal), #0fb3ac); color: #fff;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.01em; line-height: 1.3;
  padding: 14px 20px; border-radius: 13px; cursor: pointer; margin: 0;
  box-shadow: 0 6px 18px rgba(20, 205, 197, 0.28);
}
#stageGenFold > summary::-webkit-details-marker { display: none; }
#stageGenFold > summary::marker { content: ""; }
#stageGenFold > summary:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(20, 205, 197, 0.38); }
#stageGenFold[open] { padding: 0 16px 16px; box-shadow: 0 0 0 1px var(--line), 0 8px 22px rgba(20, 205, 197, 0.12); }
#stageGenFold[open] > summary { border-radius: 13px 13px 0 0; box-shadow: none; margin: 0 -16px 14px; }

.plain-list { padding-left: 18px; line-height: 1.9; font-size: 0.9rem; color: var(--ink-2); }

/* ================= 司录采集 ================= */
.source-toggle { display: inline-flex; background: #e8edf6; border-radius: 15px; padding: 5px; gap: 4px; }
.source-toggle button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 11px; font-size: 1rem; font-weight: 700;
  color: var(--ink-3); transition: all 0.18s;
}
.source-toggle button::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: 0.4;
}
.source-toggle button[data-source="teaching"]:hover { color: var(--blue); }
.source-toggle button[data-source="service"]:hover { color: var(--green); }
.source-toggle button[data-source="teaching"].active {
  background: linear-gradient(135deg, #2868d8, #4a8de0); color: #fff;
  box-shadow: 0 4px 14px rgba(40, 104, 216, 0.4);
}
.source-toggle button[data-source="service"].active {
  background: linear-gradient(135deg, #1fa97c, #14cdc5); color: #fff;
  box-shadow: 0 4px 14px rgba(31, 169, 124, 0.4);
}
.source-toggle button.active::before { opacity: 1; background: #fff; }

/* 匹配栏与录入框跟随端口变色 */
.capture-surface[data-source="teaching"] .match-bar {
  background: linear-gradient(120deg, rgba(40, 104, 216, 0.08), rgba(74, 163, 223, 0.06));
  border-color: rgba(40, 104, 216, 0.3);
}
.capture-surface[data-source="service"] .match-bar {
  background: linear-gradient(120deg, rgba(31, 169, 124, 0.09), rgba(20, 205, 197, 0.07));
  border-color: rgba(31, 169, 124, 0.35);
}
.capture-surface[data-source="teaching"] .composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40, 104, 216, 0.14); }
.capture-surface[data-source="service"] .composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 169, 124, 0.14); }

.capture-surface { position: relative; }
.drop-overlay {
  position: absolute; inset: 0; z-index: 40; border-radius: var(--radius);
  background: rgba(40, 104, 216, 0.10); backdrop-filter: blur(2px);
  border: 2.5px dashed var(--blue);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--blue); }
.drop-inner .drop-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem;
  animation: dropBob 1s ease-in-out infinite;
}
.drop-inner strong { font-size: 1.05rem; color: var(--ink); }
.drop-inner span { font-size: 0.82rem; color: var(--ink-2); }
@keyframes dropBob { 50% { transform: translateY(5px); } }

.match-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(120deg, rgba(20, 205, 197, 0.08), rgba(40, 104, 216, 0.07));
  border: 1px solid rgba(20, 205, 197, 0.25); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 14px;
}
.match-main { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--blue)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.match-main strong { display: block; font-size: 0.98rem; }
.match-main small { color: var(--ink-3); font-size: 0.78rem; }
.match-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.date-inline { display: flex; flex-direction: column; gap: 3px; font-size: 0.68rem; color: var(--ink-3); font-weight: 600; }
.date-inline input { padding: 5px 9px; font-size: 0.82rem; width: auto; background: rgba(255,255,255,0.7); }

.composer { border: 1.5px solid var(--line); border-radius: 16px; background: #fbfcfe; position: relative; }
.composer .attachment-strip { border-radius: 16px 16px 0 0; }
.composer:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 205, 197, 0.15); }
.composer textarea { border: none; background: transparent; min-height: 150px; padding: 16px 18px; font-size: 0.98rem; }
.composer textarea:focus { outline: none; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.composer-left { display: flex; align-items: center; gap: 10px; position: relative; }
.plus-button {
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; font-weight: 600;
  background: #eef2f8; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center;
}
.plus-button:hover { background: var(--teal); color: #fff; }
.mic-button {
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.05rem;
  background: rgba(224, 86, 86, 0.1); display: inline-flex; align-items: center; justify-content: center;
}
.mic-button:hover { background: var(--red); }
.attachment-menu {
  position: absolute; bottom: 46px; left: 0; z-index: 30;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(22, 36, 58, 0.18);
  padding: 8px; display: flex; flex-direction: column; min-width: 190px;
}
.attachment-menu button { text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 0.9rem; }
.attachment-menu button:hover { background: #f0f5fb; }
.composer-meta { font-size: 0.78rem; color: var(--ink-3); }
.attachment-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 8px; background: #eef2f8;
  border-radius: 10px; padding: 5px 8px 5px 6px; font-size: 0.8rem; max-width: 260px;
}
.attach-chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.attach-chip .att-ico { width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 7px; font-size: 0.95rem; }
.attach-chip .att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.attach-chip .att-done { flex-shrink: 0; font-size: 0.7rem; font-weight: 600; color: var(--green); background: rgba(31,169,124,0.12); border-radius: 6px; padding: 2px 6px; }
.attach-chip .x { flex-shrink: 0; color: var(--ink-3); font-weight: 700; padding: 0 2px; cursor: pointer; }
.attach-chip .x:hover { color: var(--red); }
.quick-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; flex-wrap: wrap; }
.sample-group { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-smart-btn {
  background: linear-gradient(135deg, rgba(108, 80, 199, 0.12), rgba(20, 205, 197, 0.14));
  color: #5b43b8; border: 1px solid rgba(108, 80, 199, 0.28);
  padding: 9px 18px; border-radius: 12px; font-weight: 700; font-size: 0.92rem; transition: all 0.15s;
}
.ai-smart-btn:hover { background: linear-gradient(135deg, rgba(108, 80, 199, 0.2), rgba(20, 205, 197, 0.22)); }
.ai-smart-btn:disabled { opacity: 0.6; cursor: default; }
.dictate-status { font-size: 0.82rem; color: var(--green); font-weight: 600; animation: blink 1.2s infinite; }
.dictate-status.rec { color: var(--red); }
@keyframes blink { 50% { opacity: 0.45; } }

.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-card { background: #f5f8fc; border-radius: 12px; padding: 10px 12px; }
.role-card span { font-size: 0.72rem; color: var(--ink-3); display: block; }
.role-card span em { font-style: normal; color: var(--ink-2); font-weight: 700; }
.role-card strong { font-size: 0.9rem; }
/* 对象库角色卡：多老师 / 多助教逐位 chip，卡片随内容自适应高度 */
.object-roles { align-items: stretch; }
/* 三个角色卡用颜色区分、加左侧色条与浅色底，避免一片灰、提升可读性 */
.object-roles .role-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line); }
.object-roles .role-card > span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; }
.object-roles .role-teacher { background: rgba(40, 104, 216, 0.06); border-left-color: #2868d8; }
.object-roles .role-teacher > span { color: #2868d8; }
.object-roles .role-assistant { background: rgba(31, 169, 124, 0.07); border-left-color: #1fa97c; }
.object-roles .role-assistant > span { color: #1a9d73; }
.object-roles .role-counselor { background: rgba(224, 163, 60, 0.10); border-left-color: #e0a33c; }
.object-roles .role-counselor > span { color: #c98a1e; }
.object-roles .role-counselor strong { font-weight: 700; color: var(--ink); }
.role-card .staff-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.staff-pill { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.staff-pill em { font-style: normal; font-size: 0.68rem; font-weight: 700; color: var(--ink-3); }
.staff-pill em.resp { color: #1fa97c; }
.staff-pill em.duty { color: #c77b1a; }
/* 对象库班级分组头 + 班级筛选 chip */
/* 对象库班级分组头：醒目色条 —— 左侧粗色条 + 同色渐变底 + 加粗班级名，按学科配色，让每个班级一眼可辨。
   背景必须不透明（渐变下垫一层 #fff），否则吸顶滚动时上下分组头会半透明重叠、文字糊在一起。 */
.ob-class-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.86rem; font-weight: 800; color: var(--ink); border-radius: 9px; padding: 9px 13px; margin: 14px 0 9px; position: sticky; top: 0; z-index: 2; border-left: 5px solid var(--teal); background: #fff; }
.ob-class-head:first-child { margin-top: 2px; }
.ob-class-head .obh-name { letter-spacing: 0.01em; }
.ob-class-head em { font-style: normal; font-size: 0.72rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
/* 英语班：品牌蓝色条 */
.ob-class-head.subj-eng { border-left-color: #2868d8; background: linear-gradient(90deg, rgba(40,104,216,0.16), rgba(40,104,216,0.05)), #fff; }
.ob-class-head.subj-eng .obh-name { color: #1f55b0; }
/* 数学班：品牌紫色条 */
.ob-class-head.subj-math { border-left-color: #6c50c7; background: linear-gradient(90deg, rgba(108,80,199,0.16), rgba(108,80,199,0.05)), #fff; }
.ob-class-head.subj-math .obh-name { color: #553cae; }
.chip-btn.cls { background: #fff; border: 1px solid var(--line); }
.chip-btn.cls.on { background: linear-gradient(135deg, var(--teal), #0fb3ac); color: #fff; border-color: transparent; }
.chip-btn em { font-style: normal; opacity: 0.7; margin-left: 2px; }
/* 主数据班级筛选栏 */
.accounts-table code, .pwd-cell { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); background: rgba(20,205,197,0.12); border-radius: 6px; padding: 2px 8px; }
/* AI 建卷：多选后列出已选文件名 */
.file-names { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.file-names:empty { display: none; }
.file-names .fn-count { font-size: 0.76rem; font-weight: 700; color: var(--ink-2); }
.file-names .fn-item { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink); background: rgba(20,205,197,0.08); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; word-break: break-all; }
.file-names .fn-item em { font-style: normal; color: var(--ink-3); font-size: 0.72rem; }
.file-names .fn-del { margin-left: auto; flex-shrink: 0; background: none; border: none; box-shadow: none; color: var(--ink-3); font-size: 0.82rem; cursor: pointer; padding: 0 2px; line-height: 1; }
.file-names .fn-del:hover { color: var(--red); }
.acc-rolechips { align-items: center; margin: 4px 0 10px; }
.acc-rolechips .mf-label { font-size: 0.78rem; color: var(--ink-3); font-weight: 700; margin-right: 2px; }
.acc-pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 0.85rem; color: var(--ink-2); }
.acc-pager select { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); }
.acc-pager .mini-button[disabled] { opacity: 0.45; cursor: not-allowed; }
.master-filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.master-filterbar .mf-label { font-size: 0.78rem; color: var(--ink-3); font-weight: 700; margin-right: 2px; }
.master-filterbar .mf-divider { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.master-filterbar .mf-clear { color: var(--ink-3); }
.master-filterbar .caret { font-size: 0.68rem; opacity: 0.7; margin-left: 1px; }
/* 主数据批量多选删除 */
.master-bulkbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 9px 14px; background: #f5f8fc; border-radius: 10px; }
.student-chip .stu-mini { font-size: 0.7rem; font-weight: 600; padding: 2px 9px; border-radius: 7px; cursor: pointer; line-height: 1.5; white-space: nowrap; }
.student-chip .stu-mini.transfer { background: rgba(20, 205, 197, 0.14); color: #0e9a92; }
.student-chip .stu-mini.transfer:hover { background: rgba(20, 205, 197, 0.26); }
.student-chip .stu-mini.del { background: #fdecec; color: #d64545; }
.student-chip .stu-mini.del:hover { background: #f9d9d9; }
.master-bulkbar .bulk-all { display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.master-bulkbar .bulk-count { font-size: 0.86rem; color: var(--ink-2); }
.master-bulkbar .bulk-count strong { color: var(--teal); }
.course-check, .master-bulkbar input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--teal); flex-shrink: 0; margin: 0; }
.course-block .cbh-title .course-check { align-self: center; }
.mini-button.danger { background: #fde8e8; color: #d64545; }
.mini-button.danger:hover { background: #f9d4d4; }
/* 账号表：行内可编辑用户名 + 角色下拉 + 多选 */
.accounts-table .acc-check { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; margin: 0; }
.accounts-table .acc-user { width: 100%; min-width: 150px; padding: 5px 9px; font-size: 0.85rem; }
.accounts-table .acc-role { padding: 5px 8px; font-size: 0.85rem; }
.accounts-table td { vertical-align: middle; }
/* 外部数据导入：拖拽上传区 */
.import-dropzone { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px 16px; transition: all 0.15s; margin-bottom: 4px; }
.import-dropzone .hint { margin: 8px 0 0; }
.import-dropzone.dragover { border-color: var(--teal); background: rgba(20, 205, 197, 0.06); }
.import-dropzone.dragover .hint { color: var(--teal); }
.import-class-table { font-size: 0.8rem; }
.import-class-table th, .import-class-table td { padding: 5px 8px; white-space: nowrap; }
.import-class-table td:first-child { white-space: normal; min-width: 220px; }
.student-search { margin: 14px 0 10px; font-size: 0.92rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-btn {
  font-size: 0.82rem; font-weight: 600; color: var(--ink-2);
  background: #eef2f8; border-radius: 999px; padding: 5px 14px; transition: all 0.15s;
}
.chip-btn:hover { background: #e3eaf4; }
.chip-btn.on { background: linear-gradient(135deg, var(--teal), #0fb3ac); color: #fff; }
.s-id { font-size: 0.7rem; color: var(--ink-3); font-weight: 400; background: #f0f3f8; border-radius: 5px; padding: 1px 6px; }
.student-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.student-card {
  display: flex; justify-content: space-between; align-items: center;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.student-card:hover { border-color: var(--teal); }
.student-card.active { border-color: var(--teal); background: rgba(20, 205, 197, 0.07); }
.student-card .s-name { font-weight: 600; font-size: 0.92rem; }
.student-card .s-meta { font-size: 0.75rem; color: var(--ink-3); }

.rec-bar { display: inline-flex; align-items: center; gap: 8px; background: rgba(224, 86, 86, 0.07); border: 1px solid rgba(224, 86, 86, 0.25); border-radius: 10px; padding: 5px 10px; }

/* ================= 织理 / 审核 ================= */
/* 状态标签页（未审核 / 已审核 / 全部） */
.status-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.status-tabs .stab {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.88rem; font-weight: 600; color: var(--ink-2);
  background: #eef2f8; border-radius: 10px; padding: 7px 16px; transition: all 0.15s;
}
.status-tabs .stab:hover { background: #e3eaf4; }
.status-tabs .stab.on { background: var(--ink); color: #fff; }
.status-tabs .stab em { font-style: normal; font-size: 0.78rem; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9px;
  background: rgba(0,0,0,0.08); }
.status-tabs .stab.on em { background: rgba(255,255,255,0.25); }
.status-tabs .stab-flag.on { background: var(--red); }

/* ===== 助教审核 · 左右两栏 ===== */
.review-surface { max-width: none; }
.review-2pane { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; margin-top: 6px; }

/* 左栏：班级 / 学生花名册 */
.review-roster-pane { position: sticky; top: 8px; }
.roster-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.rfilter { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); background: #eef2f8; border-radius: 9px; padding: 5px 11px; transition: all 0.15s; }
.rfilter:hover { background: #e3eaf4; }
.rfilter.on { background: var(--ink); color: #fff; }
.rfilter.flagged.on { background: var(--red); }
.rfilter em { font-style: normal; opacity: 0.7; margin-left: 3px; }
.roster-summary { font-size: 0.82rem; color: var(--ink-2); margin: 2px 2px 10px; }
.roster-summary em { font-style: normal; font-weight: 700; color: var(--ink); }
.roster-summary .amber { color: #c77b1a; }
.roster-summary .red { color: #d64545; }
.roster-list { display: flex; flex-direction: column; max-height: 72vh; overflow-y: auto; padding-right: 2px; }
.roster-course { display: flex; justify-content: space-between; align-items: center; font-size: 0.76rem; font-weight: 700; color: var(--ink-3); margin: 14px 4px 6px; }
.roster-course:first-child { margin-top: 2px; }
.roster-course em { font-style: normal; background: #eef2f8; border-radius: 20px; padding: 1px 8px; }
.roster-stu { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; background: #f6f8fc; margin-bottom: 6px; border: 1px solid transparent; transition: all 0.15s; }
.roster-stu:hover { background: #eef2f8; }
.roster-stu.on { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 2px rgba(20,205,197,0.14); }
.roster-stu .rs-avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.roster-stu .rs-info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.roster-stu .rs-name { font-size: 0.92rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-stu .rs-sub { font-size: 0.72rem; color: var(--ink-3); }
.roster-stu .rs-badges { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; flex-shrink: 0; }
.rs-badge { font-size: 0.68rem; font-weight: 600; padding: 1px 8px; border-radius: 20px; white-space: nowrap; }
.rs-badge.amber { background: #fff4e0; color: #c77b1a; }
.rs-badge.red { background: #fde8e8; color: #d64545; }
.rs-badge.green { background: #e3f7f0; color: #1fa97c; }
.roster-empty { color: var(--ink-3); font-size: 0.84rem; text-align: center; padding: 30px 14px; line-height: 1.7; }
/* 对象库「全部班级 ▾」下拉 */
.class-dropdown { position: relative; display: inline-block; }
/* 班级筛选触发器：白底 + 班级图标，区别于「全部学员」实心 chip，明确是按班级筛选 */
.chip-btn.cls-trigger { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; }
.chip-btn.cls-trigger::before { content: "▦"; color: var(--teal); font-size: 0.92rem; line-height: 1; }
.chip-btn.cls-trigger:hover { background: #fff; border-color: var(--teal); }
.chip-btn.cls-trigger.on { background: linear-gradient(135deg, var(--teal), #0fb3ac); color: #fff; border-color: transparent; }
.chip-btn.cls-trigger.on::before { color: #fff; }
.cls-trigger .caret { font-size: 0.68rem; opacity: 0.7; margin-left: 1px; }
.class-dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 264px; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(22,36,58,0.16); padding: 6px; }
/* 阶段反馈可搜索班级下拉：右对齐避免溢出屏幕，搜索框固定在顶部、列表内部滚动 */
.stage-class-menu { left: auto; right: 0; min-width: 320px; max-height: none; overflow: visible; }
.cdm-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.86rem; }
.cdm-search:focus { outline: 2px solid rgba(20,205,197,0.35); border-color: var(--teal); }
.cdm-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.cdm-empty { padding: 14px; text-align: center; color: var(--ink-3); font-size: 0.85rem; }
/* 菜单内的班级名用明显的品牌色调表达，加粗；数量做成 chip 角标 */
.cdm-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; color: #0c8f89; }
.cdm-item:hover { background: rgba(20, 205, 197, 0.08); }
.cdm-item.on { background: rgba(20, 205, 197, 0.14); color: #0a807b; }
/* 「全部班级（不限）」是汇总项，保持中性色，区别于具体班级 */
.cdm-item[data-classid=""] { color: var(--ink-2); }
.cdm-item em { font-style: normal; flex-shrink: 0; font-size: 0.72rem; font-weight: 700; color: var(--ink-2); background: #eef2f8; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.cdm-item.on em { color: #0a807b; background: rgba(20, 205, 197, 0.2); }

/* 右栏：选中学生详情（审核 + 出日报，始终可见） */
.review-detail { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; color: var(--ink-3); font-size: 0.9rem; line-height: 1.8; text-align: center; }
.detail-empty .de-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.rg-stu { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rg-avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.rg-stu-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.rg-stu-meta strong { font-size: 1.12rem; line-height: 1.25; color: var(--ink); }
.rg-stu-meta small { font-size: 0.8rem; color: var(--ink-3); }
.rg-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rg-head-right .mini-button { padding: 5px 12px; }
.mini-button.icon-btn { padding: 4px 8px; font-size: 0.9rem; line-height: 1; }
.review-detail .record-item { margin-bottom: 8px; }
.review-detail .rg-records .record-item:last-child { margin-bottom: 0; }
.review-detail .rg-records { margin-bottom: 4px; }
.rg-report { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rg-report-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rg-step { font-size: 0.84rem; font-weight: 700; color: var(--ink-2); }
.growth-input { width: 100%; min-height: 64px; margin-bottom: 10px; }
.rg-gen { width: 100%; }
.rg-note { font-size: 0.76rem; color: var(--ink-3); margin-top: 8px; }
.rg-flag-hint { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.84rem; color: var(--ink-3); }
@media (max-width: 760px) { .review-2pane { grid-template-columns: 1fr; } .review-roster-pane { position: static; } }
.loom-summary { font-size: 0.88rem; color: var(--ink-2); background: rgba(20, 205, 197, 0.07); border-radius: 9px; padding: 7px 11px; margin: 0 0 10px; }
.loom-records { display: flex; flex-direction: column; }
.loom-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.loom-row:last-child { border-bottom: none; }
.loom-row .d-name {
  flex-shrink: 0; width: 84px; text-align: center;
  font-size: 0.8rem; font-weight: 700;
  background: #f1f4f9; border-radius: 8px; padding: 6px 5px; cursor: default;
}
.loom-row .d-content { flex: 1; font-size: 0.95rem; line-height: 1.65; color: var(--ink-2); min-height: 0; }
/* 织理详情内的批次卡片 */
.review-detail .loom-list { gap: 14px; }
.review-detail .loom-batch { padding: 14px 16px; }
.loom-batch-head .lb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loom-batch-head .lb-meta .meta { color: var(--ink-3); font-size: 0.8rem; }
.loom-row .stars-host { flex-shrink: 0; cursor: pointer; padding-top: 3px; }
.record-item.editing { border-color: var(--teal); background: rgba(20, 205, 197, 0.04); }
.loom-list { display: flex; flex-direction: column; gap: 16px; }
.loom-batch { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.loom-batch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.loom-batch-head .who { font-weight: 700; }
.loom-batch-head .meta { color: var(--ink-3); font-size: 0.8rem; }
.loom-raw { background: #f7f9fc; border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 12px; line-height: 1.7; }
.dim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.dim-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.dim-card .d-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dim-card .d-name { font-size: 0.8rem; font-weight: 700; color: var(--purple); }
.dim-card .d-content { font-size: 0.88rem; line-height: 1.65; color: var(--ink-2); width: 100%; border: none; background: transparent; padding: 0; min-height: 48px; }
.dim-card .d-content:focus { outline: 1px dashed var(--teal); }
.stars { color: var(--amber); font-size: 0.85rem; letter-spacing: 1px; cursor: pointer; user-select: none; }
.stars .off { color: #d8dfe9; }

.record-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; max-height: 460px; overflow-y: auto; }
.record-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.record-item.approved { border-color: rgba(31, 169, 124, 0.5); background: rgba(31, 169, 124, 0.04); }
.record-item.flagged { border-color: rgba(224, 86, 86, 0.5); background: rgba(224, 86, 86, 0.04); }
.record-item .r-body { min-width: 0; }
.record-item .r-dim { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.record-item .r-dimname { font-size: 1.04rem; font-weight: 700; }
.record-item .r-content { font-size: 0.95rem; color: var(--ink-2); line-height: 1.65; margin-top: 4px; }
/* 同色系来源标签 chip：教学端 / 服务端 / 成长寄语 */
.zone-tag { font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 8px; letter-spacing: 0.02em; flex-shrink: 0; }
.zone-tag.teaching { background: rgba(40, 104, 216, 0.12); color: #2868d8; }
.zone-tag.service { background: rgba(31, 169, 124, 0.12); color: #1fa97c; }
.zone-tag.growth { background: rgba(20, 205, 197, 0.14); color: #0e9a92; }
.record-item .r-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.record-item.editing .r-actions { justify-content: flex-start; }
.record-item .r-actions .mini-button { padding: 4px 12px; }
.review-editor { min-height: 90px; }
.review-editor.tall { min-height: 200px; }

/* ================= 报告 ================= */
/* 报告头部：班级筛选 + 学员报告导航 + 工具栏 */
.hdr-field { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-2); font-weight: 600; }
.hdr-field select { width: auto; padding: 7px 10px; }
/* 两级报告导航：上排学员、下排该生日期 */
.report-nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding: 10px 12px; background: #f5f8fc; border-radius: 12px; }
.rn-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.rn-dates { padding-top: 9px; border-top: 1px dashed var(--line); }
.report-nav-label { font-size: 0.74rem; color: var(--ink-3); font-weight: 700; margin-right: 2px; min-width: 64px; }
.report-nav-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.84rem; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; transition: all 0.15s;
}
.report-nav-chip:hover { border-color: var(--teal); color: var(--teal); }
.report-nav-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.report-nav-chip em { font-style: normal; font-size: 0.72rem; color: var(--ink-3); }
.report-nav-chip.on em { color: rgba(255,255,255,0.7); }
/* 学员（上排）选中＝品牌青；日期（下排）选中＝深墨，两级视觉分明 */
.rn-stu.on { background: linear-gradient(135deg, var(--teal), #0fb3ac); border-color: transparent; color: #06302e; }
.rn-stu.on em { color: rgba(6,48,46,0.65); }
.rn-date { padding: 4px 11px; }
.report-toolbar { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.report-host { margin-top: 6px; }
/* 报告修改表单 */
.report-edit { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.report-edit .edit-title { font-size: 1.02rem; margin-bottom: 14px; }
.report-edit .edit-records { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.report-edit .edit-rec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.report-edit .edit-rec-head { display: flex; gap: 10px; margin-bottom: 8px; }
.report-edit .edit-rec-head select { width: auto; flex: 1; }
.report-edit .edit-rec-head select:last-child { flex: 0 0 110px; }
.report-edit .edit-rec-content { min-height: 56px; }
.report-card {
  max-width: 860px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow);
}
.report-head {
  background: linear-gradient(120deg, #0e1c30, #1b3a5c 60%, #14506b);
  color: #fff; padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.report-head .rh-left { display: flex; gap: 16px; align-items: center; }
.report-head img { width: 70px; height: 58px; background: #fff; border-radius: 12px; padding: 8px 10px; object-fit: contain; }
.report-head h1 { font-size: 1.25rem; letter-spacing: 0.5px; }
.report-head .rh-sub { color: #9fc3d8; font-size: 0.85rem; margin-top: 4px; }
.report-head .rh-right { text-align: right; font-size: 0.82rem; color: #c2d8e6; line-height: 1.7; }
.report-body { padding: 26px 30px; }
.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.score {
  border-radius: 14px; padding: 14px; background: #f6f9fc;
  border-top: 4px solid var(--score-color, var(--teal));
}
.score span { font-size: 0.78rem; color: var(--ink-3); display: block; }
.score strong { font-size: 1.3rem; color: var(--ink); }
.report-section { margin-bottom: 18px; padding-left: 14px; border-left: 4px solid var(--section-color, var(--teal)); }
.report-section h3 { font-size: 0.95rem; margin-bottom: 5px; }
.report-section p, .report-section li { font-size: 0.9rem; color: var(--ink-2); line-height: 1.75; }
.report-section ul { padding-left: 18px; }
.visual-panel { background: #f8fafd; border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.visual-panel h3 { font-size: 0.9rem; margin-bottom: 10px; color: var(--ink-2); }
.report-zone {
  border: 1px solid var(--line); border-left: 4px solid var(--zone-color, var(--teal));
  border-radius: 12px; padding: 14px 18px 6px; margin-bottom: 16px;
}
.report-zone .zone-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.report-zone .zone-head strong { font-size: 1rem; color: var(--zone-color, var(--ink)); }
.report-zone .zone-head span { font-size: 0.75rem; color: var(--ink-3); letter-spacing: 1px; }
.report-zone .report-section { border-left: none; padding-left: 0; margin-bottom: 14px; }
.task-banner {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255, 178, 65, 0.12); border: 1px solid rgba(255, 178, 65, 0.45);
  border-radius: 12px; padding: 13px 18px; margin-bottom: 16px;
}
.task-banner span { flex-shrink: 0; font-weight: 700; font-size: 0.9rem; color: #9a6206; }
.task-banner p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.7; margin: 0; }
.delta-up { color: var(--green); font-weight: 700; }
.delta-down { color: var(--red); font-weight: 700; }
.delta-flat { color: var(--ink-3); }
.parent-msg {
  background: linear-gradient(120deg, rgba(20, 205, 197, 0.07), rgba(108, 80, 199, 0.06));
  border-radius: 14px; padding: 18px 20px; margin-top: 6px;
}
.parent-msg h3 { font-size: 0.95rem; margin-bottom: 8px; color: var(--purple); }
.parent-msg p { font-size: 0.92rem; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; }
.report-foot {
  padding: 14px 30px 20px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--ink-3);
}
.empty-tip { text-align: center; color: var(--ink-3); padding: 50px 20px; font-size: 0.92rem; line-height: 2; }

/* 模考报告表格 */
.score-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 0.88rem; }
.score-table th, .score-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: center; }
.score-table th { background: #f2f6fb; color: var(--ink-2); font-size: 0.8rem; }
.score-table td strong { color: var(--blue); font-size: 1.05rem; }
.bar-track { background: #e8edf5; border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), var(--blue)); }

/* ================= 模考工作台 ================= */
.exam-switch { display: inline-flex; background: #eef2f8; border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.exam-switch button { padding: 7px 16px; border-radius: 9px; font-size: 0.86rem; font-weight: 600; color: var(--ink-3); }
.exam-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(22, 36, 58, 0.12); }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .mock-grid { grid-template-columns: 1fr; } }
.mock-panel { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.mock-panel h3 { font-size: 0.98rem; margin-bottom: 10px; }
.paper-item, .task-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; margin-bottom: 8px;
}
.paper-item .p-name, .task-item .t-name { font-weight: 600; font-size: 0.9rem; }
.paper-item .p-meta, .task-item .t-meta { font-size: 0.76rem; color: var(--ink-3); }
/* 题库卡片：编辑/删除按钮固定宽度、不被长文案挤压、不换行、靠上对齐，保持上下整齐 */
.paper-item { align-items: flex-start; }
.paper-item > div:first-child { min-width: 0; }
.paper-item > .btn-row { flex-shrink: 0; flex-wrap: nowrap; gap: 8px; margin: 0; }
.paper-item > .btn-row .mini-button { white-space: nowrap; min-width: 56px; text-align: center; }
.key-entry label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.key-entry input { font-family: "SF Mono", Menlo, monospace; letter-spacing: 2px; text-transform: uppercase; }
.answer-card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--blue); text-decoration: none; margin-top: 8px; }
.view-link {
  color: var(--blue); font-size: 0.85rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; padding: 4px 4px;
}
.view-link:hover { color: var(--purple); }
.view-link.printed { color: var(--ink-3); text-decoration-color: var(--line); }
.grading-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.g-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-family: "SF Mono", Menlo, monospace;
  padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line);
}
.g-chip em { font-style: normal; color: var(--ink-3); font-size: 0.66rem; }
.g-chip.ok { background: rgba(31, 169, 124, 0.1); border-color: rgba(31, 169, 124, 0.35); color: #137a58; }
.g-chip.bad { background: rgba(224, 86, 86, 0.1); border-color: rgba(224, 86, 86, 0.4); color: #b03a3a; }
.g-chip.blank { background: #f2f5fa; color: var(--ink-3); }
.bubble-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.bubble-q {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--line); border-radius: 9px; padding: 3px 6px; background: #fff;
}
.bubble-q em { font-style: normal; font-size: 0.68rem; color: var(--ink-3); min-width: 16px; text-align: right; margin-right: 2px; }
.bubble {
  width: 23px; height: 23px; border-radius: 50%;
  font-size: 0.7rem; font-weight: 600; background: #eef2f8; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.bubble:hover { background: #dbe5f2; }
.bubble.sel { background: var(--blue); color: #fff; }
.bubble-q.flagged { border-color: var(--amber); background: rgba(255, 178, 65, 0.14); }
.ans-count { font-weight: 400; color: var(--ink-3); font-size: 0.78rem; }
/* 手动建卷：分区头 + 题数 + 已选计数 */
.np-section { margin-top: 12px; }
.np-sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 6px; }
.np-sec-head .np-sec-name { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.np-count { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--ink-3); }
.np-count input { width: 58px; text-align: center; font-size: 0.82rem; }
.np-filled { font-size: 0.74rem; color: var(--ink-3); margin-left: auto; }

/* 报告双图区（环形 + 趋势） */
.viz-duo { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.viz-duo h3 { font-size: 0.85rem; margin-bottom: 8px; color: var(--ink-2); text-align: center; }
.viz-duo .viz-cell.wide h3 { text-align: left; }
@media (max-width: 700px) { .viz-duo { grid-template-columns: 1fr; } }

/* 概览面板：综合环形 + 课堂/课后双指数 */
.overview-grid { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.overview-grid h3 { font-size: 0.85rem; margin-bottom: 8px; color: var(--ink-2); text-align: center; }
.ov-main { text-align: center; }
.ov-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; }
.ov-port { display: flex; flex-direction: column; gap: 5px; }
.ov-tag { font-size: 0.78rem; color: var(--ink-3); font-weight: 600; }
.ov-port strong { font-size: 1.5rem; color: var(--p, var(--ink)); line-height: 1; }
.ov-dims { grid-column: 1 / -1; margin-top: 4px; }
.ov-trend { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ov-trend h3 { font-size: 0.85rem; margin-bottom: 8px; color: var(--ink-2); }
@media (max-width: 760px) { .overview-grid { grid-template-columns: 1fr; } .ov-split { grid-template-columns: 1fr 1fr; } }

/* 报告分区（课堂反馈 / 课后反馈） */
.report-zone { border: 1px solid var(--line); border-left: 4px solid var(--zone-color, #2868d8); border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; }
.report-zone .zone-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.report-zone .zone-head strong { font-size: 1.02rem; color: var(--zone-color, #2868d8); }
.report-zone .zone-head span { font-size: 0.76rem; color: var(--ink-3); }
.report-zone .report-section { margin-bottom: 12px; padding-left: 12px; border-left-width: 3px; }
.report-zone .report-section:last-child { margin-bottom: 0; }
.zone-empty { font-size: 0.85rem; color: var(--ink-3); background: #f7f9fc; border-radius: 9px; padding: 12px 14px; line-height: 1.6; }
.task-banner { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, rgba(255,178,65,0.14), rgba(224,127,60,0.08)); border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; }
.task-banner span { font-weight: 700; color: #9a6206; white-space: nowrap; }
.task-banner p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.6; }
.card-preview { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }

/* ================= 归藏 ================= */
.vault-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.vault-selall { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.vault-selall input, .vault-cb { width: auto; }
.vault-table tr.row-sel td { background: rgba(20, 205, 197, 0.06); }
.vault-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.vault-table th, .vault-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.vault-table th { color: var(--ink-3); font-size: 0.76rem; font-weight: 600; }
.vault-table tr:hover td { background: #f7fafd; }

/* ================= 主数据 ================= */
.staff-block { margin-top: 14px; }
.staff-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.staff-head strong { font-size: 0.85rem; color: var(--ink-2); }
.staff-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.staff-row input { flex: 1; min-width: 0; }
.staff-row .staff-tag { flex-shrink: 0; font-size: 0.72rem; font-weight: 700; color: var(--ink-3); background: #eef2f8; border-radius: 7px; padding: 4px 9px; }
.staff-row .staff-tag.resp { color: var(--green); background: rgba(31,169,124,0.12); }
.staff-row .x { flex-shrink: 0; color: var(--ink-3); font-weight: 700; cursor: pointer; padding: 0 6px; font-size: 1.1rem; }
.staff-row .x:hover { color: var(--red); }

.edit-course-btn { padding: 7px 16px; font-size: 0.86rem; }
.course-block { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
/* 主数据班级卡：与对象库统一的学科色条 —— 左侧粗色条 + 同色班级名 */
.course-block.subj-eng { border-left: 5px solid #2868d8; }
.course-block.subj-eng .c-name { color: #1f55b0; }
.course-block.subj-math { border-left: 5px solid #6c50c7; }
.course-block.subj-math .c-name { color: #553cae; }
.course-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.course-block-head .cbh-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.course-block-head .c-name { font-weight: 800; font-size: 1.32rem; color: var(--ink); letter-spacing: -0.01em; }
.course-block-head .c-meta { font-size: 0.82rem; color: var(--ink-3); margin-top: 6px; }
/* 科目 / 课程形式 彩色标签 */
.subj-chip, .mode-chip, .cls-chip { font-size: 0.78rem; font-weight: 700; padding: 3px 11px; border-radius: 20px; line-height: 1.5; }
.cls-chip { background: rgba(20, 205, 197, 0.14); color: #0e9a92; }
.subj-chip.eng { background: rgba(40, 104, 216, 0.12); color: #2868d8; }
.subj-chip.math { background: rgba(224, 127, 60, 0.15); color: #cf7320; }
.mode-chip.klass { background: rgba(108, 80, 199, 0.13); color: #6c50c7; }
.mode-chip.one { background: rgba(31, 169, 124, 0.14); color: #1fa97c; }
/* 角色卡片按角色配色（仅主数据卡片内，不影响对象库） */
.course-block .role-card { border-left: 3px solid var(--line); }
.course-block .role-card span { font-weight: 700; font-size: 0.74rem; }
.course-block .role-card strong { font-size: 0.98rem; }
.course-block .role-card.role-teacher { border-left-color: #2868d8; }
.course-block .role-card.role-teacher span { color: #2868d8; }
.course-block .role-card.role-assistant { border-left-color: #1fa97c; }
.course-block .role-card.role-assistant span { color: #1fa97c; }
.course-block .role-card.role-counselor { border-left-color: #e0a33c; }
.course-block .role-card.role-counselor span { color: #c98a1e; }
/* 课时进度条 */
.hours-bar { background: #f5f8fc; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.hours-bar .hb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 0.8rem; }
.hours-bar .hb-head span { color: var(--ink-3); font-weight: 600; }
.hours-bar .hb-head strong { color: var(--ink); font-size: 0.88rem; }
.hours-bar .hb-head em { margin-left: auto; font-style: normal; color: var(--ink-3); }
.hours-bar .hb-head em.low { color: var(--red); font-weight: 700; }
.hours-bar .hb-track { height: 8px; background: #e4eaf3; border-radius: 6px; overflow: hidden; }
.hours-bar .hb-fill { height: 100%; background: linear-gradient(90deg, #2868d8, #14cdc5); border-radius: 6px; transition: width 0.3s; }
.hours-bar .hb-fill.high { background: linear-gradient(90deg, #e0843c, #e05656); }
.student-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.student-chip { background: #f3f6fb; border-radius: 9px; padding: 6px 10px; font-size: 0.82rem; display: inline-flex; gap: 8px; align-items: center; }
.student-chip .x { color: var(--ink-3); cursor: pointer; font-weight: 700; }
.student-chip .x:hover { color: var(--red); }

/* ================= Toast / 打印 ================= */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 12px;
  font-size: 0.88rem; box-shadow: 0 10px 30px rgba(22, 36, 58, 0.35); z-index: 99;
  max-width: 80vw;
}
#printHost { display: none; }
@media print {
  html, body { background: #fff !important; }
  body > .app, .toast { display: none !important; }
  #printHost { display: block; background: #fff; }
  #printHost .report-card { border: none; box-shadow: none; max-width: 100%; border-radius: 0; background: #fff; }
  /* 报告各区块尽量不被跨页切断 */
  #printHost .report-zone, #printHost .visual-panel, #printHost .parent-msg,
  #printHost .task-banner, #printHost .report-section, #printHost .score-table tr { break-inside: avoid; }
  .report-head, .score, .bar-fill, .stars, .ov-port .bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 12mm; }
}
