:root {
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-soft: #eef5f1;
  --surface-warm: #fffaf0;
  --line: #d9e5df;
  --line-strong: #b8cbc3;
  --text: #172421;
  --muted: #687a73;
  --brand: #147a68;
  --brand-strong: #0b5f52;
  --brand-soft: #dff1eb;
  --accent: #c77b2a;
  --accent-soft: #fff0cf;
  --danger: #b94a3f;
  --danger-soft: #ffe8e4;
  --info: #2e7fa3;
  --shadow: 0 14px 34px rgba(33, 56, 50, 0.08);
  --shadow-soft: 0 8px 20px rgba(33, 56, 50, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(223, 241, 235, 0.72) 0, rgba(246, 248, 244, 0) 320px),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: 0; }
p { line-height: 1.75; }

.hidden { display: none !important; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}
.hint { color: var(--muted); font-size: 13px; line-height: 1.7; }

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 32px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(15, 30, 25, 0.06);
  margin: 0 auto;
}
.login-card h1 { margin-bottom: 4px; font-size: 22px; font-weight: 700; }
.login-card .login-subtitle { font-size: 12px; color: var(--muted); margin: -2px 0 6px; }
.login-card .eyebrow { font-size: 11px; color: var(--brand); font-weight: 700; letter-spacing: 0.06em; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.login-card input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-family: inherit; }
.login-card input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.login-card .primary-btn { padding: 10px; font-size: 14px; font-weight: 700; }
.login-card .hint { font-size: 11px; color: var(--muted); text-align: center; margin: 4px 0 0; }
.login-remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin: -4px 0 2px;
}
.login-remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.file-mode-card {
  gap: 14px;
}
.file-mode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 26px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { margin-bottom: 0; font-size: 26px; }
.topbar-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 14px 6px 4px;
  margin-left: -4px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}
.topbar-brand:hover { background: rgba(20, 122, 104, .08); }
.topbar-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.topbar-brand-eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.topbar-brand-title { color: var(--ink); font-size: 22px; font-weight: 800; line-height: 1.2; }
.module-btn.is-active {
  background: linear-gradient(135deg, #16a085, #0e7965) !important;
  color: #fff !important;
  border-color: #0d6b5a !important;
  box-shadow: 0 3px 12px rgba(22, 160, 133, .4), inset 0 1px 0 rgba(255,255,255,.15);
}
.module-btn.is-active:hover {
  background: linear-gradient(135deg, #138f76, #0a6856) !important;
  box-shadow: 0 4px 16px rgba(22, 160, 133, .48) !important;
}
.topbar-actions, .topbar-action-group, .profile-actions, .feedback-header, .feedback-actions, .filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar-actions { justify-content: flex-end; }
.topbar-action-group {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 250, 248, .86);
}
.main-actions {
  background: linear-gradient(180deg, rgba(223, 241, 235, .86), rgba(255, 255, 255, .86));
}
.utility-actions {
  background: #fff;
}
.user-pill {
  padding: 8px 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

/* ===== 按钮系统（V1.2.2 美化增强版） ===== */
.primary-btn, .ghost-btn, .danger-btn, .text-btn, .icon-btn, .module-btn, .utility-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .1s ease, color .2s ease;
}

/* 主按钮：品牌绿，高饱和度，醒目不灰 */
.primary-btn {
  color: #fff !important;
  background: linear-gradient(135deg, #16a085 0%, #0e7965 100%) !important;
  border-color: #0d6b5a !important;
  box-shadow: 0 2px 10px rgba(22, 160, 133, .35), inset 0 1px 0 rgba(255,255,255,.15);
}
/* 新增学生按钮：ID 级别强制绿色，防止任何覆盖 */
#addStudentBtn {
  color: #fff !important;
  background: linear-gradient(135deg, #16a085 0%, #0e7965 100%) !important;
  border-color: #0d6b5a !important;
  box-shadow: 0 2px 10px rgba(22, 160, 133, .35), inset 0 1px 0 rgba(255,255,255,.15) !important;
}
.primary-btn:hover {
  background: linear-gradient(135deg, #138f76 0%, #0a6856 100%) !important;
  border-color: #095547 !important;
  box-shadow: 0 4px 16px rgba(22, 160, 133, .45), inset 0 1px 0 rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.primary-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(22, 160, 133, .25) !important; }
#addStudentBtn:hover {
  background: linear-gradient(135deg, #138f76 0%, #0a6856 100%) !important;
  border-color: #095547 !important;
  box-shadow: 0 4px 16px rgba(22, 160, 133, .45), inset 0 1px 0 rgba(255,255,255,.1) !important;
  transform: translateY(-1px);
}

/* 描边按钮：深色文字 + 可见边框，绝不显灰 */
.ghost-btn {
  color: var(--text);
  background: #fff;
  border-color: #c0ccc6;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ghost-btn:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
  box-shadow: 0 2px 8px rgba(20, 122, 104, .12);
}
.ghost-btn:active { background: #d0ebe3; border-color: var(--brand); }

/* 模块按钮：品牌色底，清晰可辨 */
.module-btn {
  color: var(--brand-strong);
  background: linear-gradient(180deg, #e8f5f2, #dff1eb);
  border-color: #b8dcd2;
  box-shadow: 0 1px 3px rgba(20, 122, 104, .08);
}
.module-btn:hover {
  background: linear-gradient(180deg, #d4ede8, #c6e8de);
  border-color: #95c4b6;
  color: #0a5449;
  box-shadow: 0 2px 8px rgba(20, 122, 104, .14);
}
.module-btn:active { background: #c1e0d6; border-color: #7fb5a5; }

/* 工具按钮：深色文字，不显灰 */
.utility-btn {
  color: #4a5f57;
  background: #fff;
  border-color: #d8e2dc;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.utility-btn:hover {
  color: var(--text);
  background: var(--surface-soft);
  border-color: #c0ccc6;
}

/* 危险按钮：醒目红色 */
.danger-btn {
  color: #fff !important;
  background: linear-gradient(135deg, #d4443a 0%, #b8322a 100%) !important;
  border-color: #a02b24 !important;
  box-shadow: 0 2px 10px rgba(212, 68, 58, .3), inset 0 1px 0 rgba(255,255,255,.12);
}
.danger-btn:hover {
  background: linear-gradient(135deg, #c23c33 0%, #9e2b24 100%) !important;
  border-color: #8a2520 !important;
  box-shadow: 0 4px 14px rgba(212, 68, 58, .38), inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.danger-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(212, 68, 58, .22) !important; }

/* 文字按钮 */
.text-btn {
  color: var(--brand);
  background: transparent;
  padding: 0 4px;
  min-height: auto;
  font-weight: 600;
}
.text-btn:hover { color: var(--brand-strong); text-decoration: underline; }

/* 图标按钮（× 关闭等）：小巧克制 */
.icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  font-weight: 400;
  background: var(--surface-soft);
  border-radius: 8px;
  color: var(--muted);
  box-shadow: none;
}
.icon-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.icon-btn:active { transform: scale(.94); }

/* 统一 disabled 态 */
.primary-btn:disabled, .ghost-btn:disabled, .danger-btn:disabled,
.module-btn:disabled, .utility-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 122, 104, .12);
}
textarea { resize: vertical; line-height: 1.75; }

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  max-width: 1720px;
  margin: 0 auto;
}
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.toolbar, .stats-grid article, .profile-panel, .info-card, .tab-panel, .summary-card, .feedback-card, .student-card, .record-card, .empty-state, .print-card, .bank-card, .upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.toolbar { padding: 16px; background: linear-gradient(180deg, #fff, #fbfdfb); }
.filter-row label { flex: 1 1 140px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-grid article, .info-card { padding: 14px; box-shadow: none; }
.stats-grid span, .info-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.stats-grid strong { display: block; margin-top: 3px; font-size: 26px; line-height: 1.1; color: var(--brand-strong); }

.list-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.list-header h2, .section-heading h3 { margin-bottom: 0; }
.section-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.student-list { display: grid; gap: 10px; }
.student-card { width: 100%; padding: 14px; text-align: left; }
.student-card.active { border-color: var(--brand); background: linear-gradient(180deg, #fff, #f0fbf7); box-shadow: 0 0 0 3px rgba(20, 122, 104, 0.13); }
.student-card h3 { margin: 0 0 8px; font-size: 18px; }
.student-card p { margin-bottom: 10px; color: var(--muted); line-height: 1.55; }
.tag-line { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; color: var(--brand-strong); background: var(--brand-soft); border: 1px solid rgba(20, 122, 104, .08); border-radius: 999px; font-size: 12px; font-weight: 800; }

.empty-state { display: grid; place-content: center; min-height: calc(100vh - 118px); padding: 32px; text-align: center; }
.detail-content { display: grid; gap: 16px; }
.profile-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(223, 241, 235, .8), rgba(255, 250, 240, .65)),
    #fff;
}
.profile-panel h2 { margin-bottom: 8px; font-size: 32px; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.info-card { background: #fff; }
.info-card strong { display: block; margin-top: 6px; overflow-wrap: anywhere; line-height: 1.45; }

.tabs { display: flex; gap: 8px; padding: 5px; background: rgba(238, 245, 241, .9); border: 1px solid var(--line); border-radius: 8px; position: sticky; top: 106px; z-index: 8; }
.tab-btn { flex: 1 1 0; border: 0; border-radius: 7px; min-height: 44px; color: var(--muted); background: transparent; font-weight: 900; white-space: nowrap; }
.tab-btn.active { color: var(--brand-strong); background: #fff; box-shadow: 0 8px 18px rgba(33, 56, 50, 0.08); }
.tab-back-btn { flex: 0 0 auto; min-width: 76px; min-height: 44px; border-radius: 7px; color: var(--brand-strong); background: #fff; border: 1px solid var(--line); font-weight: 900; }
.tab-back-btn:hover { background: rgba(33, 56, 50, .06); }
.tab-panel { padding: 20px; }
.section-heading p { margin: 6px 0 0; color: var(--muted); line-height: 1.7; max-width: 820px; }

.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #f7fbf9; font-size: 13px; white-space: nowrap; }
td { overflow-wrap: anywhere; line-height: 1.65; }
.star { color: var(--accent); font-weight: 900; white-space: nowrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.growth-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.growth-overview article {
  padding: 15px;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.growth-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.growth-overview strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-strong);
  font-size: 28px;
  line-height: 1.12;
}
.growth-overview p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.subject-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.subject-tab, .subject-current {
  min-width: 92px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.subject-tab.active {
  background: #fff;
  color: var(--brand-strong);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.subject-current {
  background: #fff;
  color: var(--brand-strong);
  border-color: var(--line);
}
.knowledge-map {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.knowledge-space {
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f3faf7 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.knowledge-space header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.knowledge-space h4 { margin-bottom: 2px; }
.knowledge-space p { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.knowledge-space header strong {
  display: grid;
  justify-items: end;
  color: var(--brand-strong);
  font-size: 30px;
}
.knowledge-space header strong span {
  color: var(--muted);
  font-size: 12px;
}
.knowledge-space svg {
  display: block;
  width: 100%;
  min-height: 560px;
  margin-top: 6px;
}
.knowledge-space.compact svg {
  min-height: 360px;
}
.curriculum-map {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.curriculum-map > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.curriculum-map h4 { margin-bottom: 4px; }
.curriculum-map p {
  margin: 0;
  color: var(--muted);
}
.curriculum-score {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  color: var(--brand-strong);
}
.curriculum-score strong {
  font-size: 30px;
  line-height: 1;
}
.curriculum-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.curriculum-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.curriculum-summary-strip span {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}
.curriculum-summary-strip b {
  color: var(--brand-strong);
  font-size: 20px;
}
.curriculum-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.curriculum-module-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.curriculum-module-card.has-weak {
  background: #fff8f6;
  border-color: #efc2bc;
}
.curriculum-module-card.is-complete {
  background: #f3fbf7;
  border-color: #b8decf;
}
.curriculum-module-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.curriculum-module-card h5 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
}
.curriculum-module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.curriculum-module-card header strong {
  color: var(--brand-strong);
  font-size: 18px;
}
.curriculum-module-card meter {
  width: 100%;
  height: 8px;
}
.curriculum-node-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.curriculum-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.curriculum-chip b {
  flex: 0 0 auto;
  color: inherit;
  font-size: 12px;
}
.curriculum-chip.mastered {
  background: #eaf8f1;
  border-color: #adddca;
  color: #0b6c50;
}
.curriculum-chip.fuzzy {
  background: #fff8df;
  border-color: #ead286;
  color: #86620b;
}
.curriculum-chip.weak {
  background: #ffecea;
  border-color: #e9aaa3;
  color: #9b3128;
}
.curriculum-chip.unlit {
  background: #f4f7f8;
  color: #70807a;
}
.english-map {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.english-map > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.english-map h4 { margin-bottom: 4px; }
.english-map p {
  margin: 0;
  color: var(--muted);
}
.english-skill-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.english-empty-note {
  padding: 12px 14px;
  background: #fff7e6;
  border: 1px solid #efd191;
  border-radius: 8px;
  color: #7b5a12;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.7;
}
.english-skill-strip span {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d6e8ef;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}
.english-skill-strip b {
  color: var(--info);
  font-size: 20px;
}
.english-lanes {
  display: grid;
  gap: 12px;
}
.english-lane {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  background: #fff;
  border: 1px solid #d6e8ef;
  border-radius: 8px;
}
.english-lane > header {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  background: #edf7fb;
  border-radius: 8px;
}
.english-lane > header strong {
  color: #155f7a;
  font-size: 16px;
}
.english-lane > header span {
  color: var(--muted);
  font-weight: 900;
}
.english-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
}
.english-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dbe8ed;
  border-radius: 8px;
  background: #f8fbfd;
  color: #647680;
  font-size: 13px;
  font-weight: 850;
}
.english-node b {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: #fff;
  font-size: 11px;
}
.english-node.mastered { background: #eaf8f1; border-color: #adddca; color: #0b6c50; }
.english-node.fuzzy { background: #fff8df; border-color: #ead286; color: #86620b; }
.english-node.weak { background: #ffecea; border-color: #e9aaa3; color: #9b3128; }
.english-node.unlit { background: #f4f7f8; color: #70807a; }
.space-bg {
  fill: #f7fbf8;
}
.space-edge {
  stroke: #9db8af;
  stroke-width: 2;
  stroke-linecap: round;
}
.space-edge.relation {
  stroke: #c9953b;
  stroke-dasharray: 8 8;
  stroke-width: 2.5;
  opacity: 0.75;
}
.space-node circle {
  filter: url(#spaceShadow);
  stroke-width: 2;
}
.space-node text {
  fill: #fff;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}
.space-node.knowledge text {
  font-size: 10px;
}
.space-node .node-star {
  fill: #21313b;
  font-size: 11px;
}
.space-node.module .node-star {
  fill: #31423d;
  font-size: 12px;
  font-weight: 900;
}
.space-node.core circle { fill: url(#ballCore); stroke: #07564d; }
.space-node.module circle { fill: url(#ballModule); stroke: #135c77; }
.space-node.mastered circle { fill: url(#ballMastered); stroke: #0d7a55; }
.space-node.fuzzy circle { fill: url(#ballFuzzy); stroke: #9d7306; }
.space-node.weak circle { fill: url(#ballWeak); stroke: #a53027; }
.space-node.unlit circle { fill: url(#ballUnlit); stroke: #8294a0; }
.space-node.unlit text { fill: #22323d; }
.knowledge-network {
  padding: 16px;
  background: linear-gradient(180deg, #fbfefd 0%, #eef7f3 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.knowledge-network header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.knowledge-network h4 { margin-bottom: 2px; }
.knowledge-network p { margin-bottom: 0; color: var(--muted); }
.knowledge-network header strong { font-size: 26px; color: var(--brand-strong); }
.knowledge-network svg {
  display: block;
  width: 100%;
  min-height: 300px;
}
.network-line {
  stroke: #bed0d8;
  stroke-width: 2;
  stroke-dasharray: 4 7;
}
.network-line.main {
  stroke: #8eb1ac;
  stroke-width: 3;
  stroke-dasharray: none;
}
.network-center {
  fill: #0f766e;
  stroke: #0b5f59;
  stroke-width: 2;
  filter: url(#nodeGlow);
}
.network-center-text,
.network-center-sub,
.module-label,
.network-node text {
  font-weight: 900;
  pointer-events: none;
}
.network-center-text { fill: #fff; font-size: 16px; }
.network-center-sub { fill: #d8fbf4; font-size: 13px; }
.module-orbit {
  fill: #fff;
  stroke: #9fbcc6;
  stroke-width: 2;
}
.module-label { fill: #203040; font-size: 13px; }
.network-node circle {
  stroke-width: 2;
  filter: url(#nodeGlow);
}
.network-node text { font-size: 11px; }
.network-node.mastered circle { fill: #d8f3e5; stroke: #16845d; }
.network-node.mastered text { fill: #0b5b3a; }
.network-node.learning circle { fill: #fff1c2; stroke: #bb8c00; }
.network-node.learning text { fill: #775600; }
.network-node.weak circle { fill: #ffe0dc; stroke: #d45b4d; }
.network-node.weak text { fill: #8a2d22; }
.network-node.unlit circle { fill: #eef3f5; stroke: #b7c6ce; }
.network-node.unlit text { fill: #617080; }
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.dot.mastered { background: #16845d; }
.dot.fuzzy { background: #d19a16; }
.dot.learning { background: #bb8c00; }
.dot.weak { background: #d45b4d; }
.dot.unlit { background: #b7c6ce; }
.map-modules-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.map-modules-compact article {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.map-modules-compact strong,
.map-modules-compact span {
  display: grid;
}
.map-modules-compact span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.map-modules-compact meter { width: 100%; margin-top: 8px; }
.timeline-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.timeline-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.timeline-panel h4 { margin-bottom: 2px; }
.timeline-panel p { margin-bottom: 0; color: var(--muted); }
.timeline-list { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.timeline-item > span {
  color: var(--brand-strong);
  font-weight: 900;
}
.timeline-item strong { display: block; margin-bottom: 3px; }
.timeline-item em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.65;
}
.knowledge-evidence-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.knowledge-evidence-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.knowledge-evidence-panel h4 { margin-bottom: 4px; }
.knowledge-evidence-panel header p {
  margin: 0;
  color: var(--muted);
}
.knowledge-evidence-panel header span {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  background: var(--brand-soft);
  border-radius: 8px;
}
.evidence-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.evidence-source-list article {
  padding: 14px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.evidence-source-list article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.evidence-source-list article > div p { margin: 0; }
.evidence-source-list dl {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}
.evidence-source-list dl div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}
.evidence-source-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.evidence-source-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.bank-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.bank-supplement {
  margin-top: 16px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fff, #f7fbf9);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.bank-supplement > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  user-select: none;
}
.bank-supplement > summary::-webkit-details-marker { display: none; }
.bank-supplement > summary::before {
  content: ▶;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
  display: inline-block;
}
.bank-supplement[open] > summary::before { transform: rotate(90deg); }
.bank-supplement-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.bank-supplement-tag {
  font-size: 12px;
  color: var(--muted);
  background: #eef5ee;
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
}
.bank-supplement[open] .bank-supplement-tag { display: none; }
.bank-supplement-hint {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.bank-supplement .bank-toolbar { margin-top: 4px; }

.bank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.bank-card {
  padding: 16px;
  box-shadow: none;
}
.bank-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.bank-card h4 {
  margin-bottom: 4px;
}
.bank-card p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.7;
}
.bank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.practice-recommendation-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7fbf9);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.practice-recommendation-panel h4 {
  margin: 0 0 4px;
}
.practice-recommendation-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.practice-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.practice-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.practice-card-head strong,
.practice-card-head span {
  display: block;
}
.practice-card-head span {
  margin-top: 4px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}
.practice-card ol {
  margin: 10px 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.75;
}
.practice-card-head { margin-bottom: 6px; }
.practice-card-reason {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.practice-card-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.practice-card-result { margin-top: 8px; }
.practice-card-loading {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.practice-card-error {
  margin: 0;
  color: #b3261e;
  font-size: 13px;
}
.practice-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f4f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.practice-result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
}
.practice-result-source {
  font-weight: 800;
  color: var(--brand-strong);
}
.practice-result-reason { flex: 1 1 auto; }
.practice-result-section h5 {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text);
  font-weight: 800;
}
.practice-result-section p {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
}
.practice-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.practice-result-textarea {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}
.practice-result-textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.practice-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.practice-panel-source {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.practice-paper-area { margin-top: 16px; }
.practice-paper-loading,
.practice-paper-error {
  margin: 0;
  font-size: 13px;
}
.practice-paper-error { color: #b3261e; }
.practice-paper {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.practice-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.practice-paper-head h4 { margin: 0 0 4px; }
.practice-paper-head p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.practice-paper-source { color: var(--brand-strong) !important; font-weight: 800; }
.practice-paper-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.practice-paper-questions {
  display: grid;
  gap: 12px;
}
.practice-paper-question {
  padding: 12px 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.practice-paper-question header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
}
.practice-paper-qno {
  font-weight: 800;
  color: var(--brand-strong);
}
.practice-paper-qtype {
  padding: 1px 8px;
  background: #eef5ee;
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand-strong);
  font-weight: 800;
}
.practice-paper-qkp {
  color: var(--muted);
  font-size: 13px;
}
.practice-paper-qstem,
.practice-paper-qhint,
.practice-paper-notes {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
}
.practice-paper-qstem { min-height: 60px; font-size: 15px; }
.practice-paper-qhint { min-height: 40px; }
.practice-paper-notes { min-height: 50px; }
.practice-paper-qstem:focus,
.practice-paper-qhint:focus,
.practice-paper-notes:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.practice-paper-hint-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.practice-paper-teacher-notes h5 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.practice-paper-footer {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.record-list { display: grid; gap: 12px; margin-top: 16px; }
.record-card { padding: 16px; box-shadow: none; background: #fff; }
.record-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.record-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.record-card dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.record-card dd { margin: 4px 0 0; overflow-wrap: anywhere; line-height: 1.75; }

.upload-box {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
}
.recording-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  background: #fffaf0;
  border: 1px solid #ead7a6;
  border-radius: 8px;
}
.recording-box strong {
  display: block;
  margin-bottom: 4px;
  color: #77540c;
  font-size: 15px;
}
.recording-box p {
  margin: 0;
  color: #80642c;
  line-height: 1.65;
}
.recording-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.upload-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.upload-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  box-shadow: none;
}
.upload-card img {
  width: 140px;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.upload-audio-preview {
  width: 140px;
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}
.upload-audio-preview span {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}
.upload-audio-preview audio {
  width: 100%;
  max-width: 118px;
}
.upload-card h4 { margin-bottom: 4px; overflow-wrap: anywhere; line-height: 1.4; }
.upload-card p { margin-bottom: 8px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.65; }
.upload-card-list { display: grid; gap: 16px; }
.upload-batch-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #f3f8f6;
}
.upload-batch-toolbar .primary-btn { margin-left: auto; }
.upload-select-all, .upload-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}
.upload-select-all input, .upload-select input { width: 18px; height: 18px; accent-color: var(--primary); }
.upload-card-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.upload-card-title h4 { flex: 1; }
.analysis-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.analysis-photo-grid > div { min-width: 0; }
.analysis-photo-grid > div > span { display: block; margin-bottom: 6px; font-weight: 800; color: var(--primary); }
.analysis-photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.analysis-photo-grid p { font-size: 13px; overflow-wrap: anywhere; }

.print-heading-inline {
  margin-top: 18px;
}

.analysis-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
}
.analysis-photo {
  display: grid;
  gap: 8px;
  align-content: start;
}
.analysis-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.analysis-photo p, .analysis-note p, .suggestion-card p { margin-bottom: 0; color: var(--muted); overflow-wrap: anywhere; }
.analysis-inputs { display: grid; gap: 12px; align-content: start; }
.analysis-results { display: grid; gap: 12px; }
.analysis-note, .suggestion-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.analysis-note pre {
  margin: 10px 0 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.readable-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.readable-output section {
  padding: 14px;
  background: #f9fcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.readable-output h4 {
  margin-bottom: 6px;
  color: var(--brand-strong);
}
.readable-output p {
  white-space: pre-wrap;
  line-height: 1.8;
}
.raw-output {
  margin-top: 10px;
  color: var(--muted);
}
.raw-output summary {
  cursor: pointer;
  font-weight: 800;
}
.raw-output pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.analysis-profile-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #9bcfc2;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f2faf7;
}
.analysis-profile-result strong { color: var(--brand-strong); }
.analysis-profile-result p { margin: 4px 0 0; color: var(--muted); }
.analysis-blocked {
  padding: 14px;
  border: 1px solid #d89b43;
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff8e8;
  color: #5f461d;
}
.analysis-blocked p {
  margin: 6px 0 0;
  color: #6c5733;
}
.analysis-suggestions { display: grid; gap: 10px; }
.analysis-suggestions > h4 {
  margin: 4px 0 2px;
}
.suggestion-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.structured-evidence {
  display: grid;
  gap: 10px;
}
.structured-evidence > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.structured-evidence span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.structured-evidence strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.structured-evidence p {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.suggestion-calibration {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.suggestion-calibration summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}
.suggestion-calibration-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}
.suggestion-calibration-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.suggestion-calibration-fields select,
.suggestion-calibration-fields input {
  width: 100%;
  min-width: 0;
}
.secondary-suggestions {
  padding: 12px 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.secondary-suggestions summary {
  cursor: pointer;
  font-weight: 800;
}
.secondary-suggestions p {
  margin: 8px 0 0;
}
.empty-mini {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.practice-paper-progress-area {
  margin: 12px 0 14px;
}
.practice-paper-progress-area:empty { display: none; }

.diagnostic-report-card {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.diagnostic-report {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(223, 241, 235, .95), rgba(255, 250, 240, .72)),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.diagnostic-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.diagnostic-title h3 {
  margin: 0;
  font-size: 22px;
}
.diagnostic-level-badge {
  min-width: 112px;
  display: grid;
  place-items: center;
  padding: 12px 14px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  text-align: center;
}
.diagnostic-level-badge strong {
  font-size: 28px;
  line-height: 1;
}
.diagnostic-level-badge span {
  font-size: 13px;
  font-weight: 900;
}
.diagnostic-level-badge.tone-good { background: var(--info); }
.diagnostic-level-badge.tone-watch { background: var(--accent); }
.diagnostic-level-badge.tone-weak { background: var(--danger); }
.diagnostic-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.diagnostic-meta span {
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}
.diagnostic-section {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.diagnostic-section h4 {
  margin: 0 0 12px;
  color: var(--brand-strong);
  font-size: 16px;
}
.diagnostic-dimensions {
  display: grid;
  gap: 12px;
}
.diagnostic-dimension {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dimension-name {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 8px;
}
.dimension-name span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  font-weight: 900;
}
.dimension-name strong { font-size: 17px; }
.dimension-name em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.dimension-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dimension-columns > div {
  padding: 10px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dimension-columns h5 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
}
.dimension-columns ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dimension-columns li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.dimension-columns p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.fake-check {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  background: #fff;
}
.fake-check.is-checked {
  position: relative;
  background: var(--brand);
  border-color: var(--brand);
}
.fake-check.is-checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.level-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}
.level-card.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: var(--brand);
}
.diagnostic-judgement {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.diagnostic-judgement h4 { grid-column: 1 / -1; }
.diagnostic-judgement div {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.diagnostic-judgement strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-strong);
}
.diagnostic-judgement p {
  margin: 0;
  color: var(--muted);
}
.diagnostic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.diagnostic-tags span {
  padding: 8px 12px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c7e5dc;
  border-radius: 999px;
  font-weight: 900;
}
.diagnostic-parent-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}
.print-card .diagnostic-report {
  margin-top: 18px;
  box-shadow: none;
}

.weekly-grid { display: grid; grid-template-columns: minmax(250px, 320px) minmax(280px, .95fr) minmax(340px, 1.15fr); gap: 14px; margin-top: 16px; align-items: start; }
.summary-card, .feedback-card { padding: 18px; box-shadow: none; }
.summary-card { background: linear-gradient(180deg, #ffffff, #f5fbf8); }
.summary-card dl { display: grid; gap: 12px; margin: 0; }
.summary-card div {
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.summary-card div:last-child { padding-bottom: 0; border-bottom: 0; }
.summary-card dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.summary-card dd { margin: 2px 0 0; font-weight: 900; line-height: 1.65; overflow-wrap: anywhere; }
.professional-report {
  display: grid;
  gap: 12px;
}
.professional-report section {
  padding: 14px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.professional-report h5 {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 14px;
}
.professional-report p {
  margin: 0;
  color: var(--muted);
}
.professional-report ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.professional-report li {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.professional-report li:last-child { padding-bottom: 0; border-bottom: 0; }
.professional-report li strong { color: var(--text); }
.professional-report li span { color: var(--muted); line-height: 1.75; }
.parent-feedback-card {
  background: linear-gradient(180deg, #fffefa, #ffffff);
}
#feedbackText {
  margin-top: 12px;
  min-height: 360px;
  padding: 16px;
  line-height: 1.9;
  background: #fffdf8;
}
.feedback-actions { margin-top: 12px; justify-content: flex-end; }
.feedback-actions select { max-width: 160px; }
.custom-card-edit label {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.custom-card-edit label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  font-family: inherit;
}
.feedback-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}
.evidence-mini {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fbfa;
}
.evidence-mini strong {
  color: var(--brand-strong);
  font-size: 13px;
}
.evidence-mini span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.evidence-mini.pending {
  background: #fffaf0;
  border-color: #f1d9a8;
}
.evidence-mini.pending strong { color: #8c5b18; }
.evidence-mini.ready {
  background: #eff8f5;
  border-color: #b9dcd2;
}

.print-card { padding: 30px; box-shadow: none; line-height: 1.85; }
.print-card h2 { font-size: 28px; }
.print-highlight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 6px;
}
.print-highlight article {
  padding: 14px;
  background: #f5fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.print-highlight span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.print-highlight strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.print-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

dialog { width: min(780px, calc(100vw - 28px)); border: 0; border-radius: 8px; padding: 0; box-shadow: 0 28px 70px rgba(19, 40, 35, .28); }
dialog::backdrop { background: rgba(15, 35, 31, .46); backdrop-filter: blur(3px); }
.dialog-form { display: grid; gap: 16px; padding: 20px; background: #fff; }
.dialog-form header, .dialog-form footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dialog-form header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.dialog-form footer {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
}
.footer-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.footer-link:hover { color: var(--text); }
.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.icp-link,
.login-legal-footer a {
  color: var(--muted);
  text-decoration: none;
}
.icp-link:hover,
.login-legal-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}
.login-legal-footer {
  position: absolute;
  right: 20px;
  bottom: 16px;
  left: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1060px) {
  .workspace { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .tabs { position: static; }
  .student-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .growth-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-toolbar, .bank-list, .practice-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-grid { grid-template-columns: 1fr; }
  .diagnostic-meta, .dimension-columns, .diagnostic-judgement { grid-template-columns: 1fr; }
  .diagnostic-dimension { grid-template-columns: 1fr; }
  .upload-box, .upload-list { grid-template-columns: 1fr; }
  .recording-box { align-items: stretch; flex-direction: column; }
  .analysis-layout { grid-template-columns: 1fr; }
  .readable-output { grid-template-columns: 1fr; }
  .curriculum-module-grid, .english-skill-strip { grid-template-columns: 1fr; }
  .english-lane { grid-template-columns: 1fr; }

  /* ===== 移动端 Master-Detail 布局（≤720px） ===== */
  .workspace.mobile-student-selected { grid-template-columns: 1fr; }
  .workspace.mobile-student-selected .sidebar { display: none; }
  .workspace.mobile-student-selected .detail {
    position: relative;
    width: 100%;
    max-width: none;
    overflow-y: auto;
  }
  /* 手机端返回按钮：仅小屏 + 选中学生时显示 */
  .mobile-back-btn {
    display: none;
    width: 100%;
    margin-bottom: 14px;
    justify-content: flex-start;
    background: linear-gradient(135deg, #f8f9fa, #eef2f5);
    border-color: #d0d7de;
    color: var(--text);
    font-weight: 600;
  }
  @media (max-width: 720px) {
    .workspace.mobile-student-selected .mobile-back-btn { display: inline-flex; }
  }
}
@media (max-width: 720px) {
  .topbar, .profile-panel, .section-heading, .record-card header { align-items: stretch; flex-direction: column; }
  .workspace { padding: 14px; }
  .topbar { position: static; padding: 16px; }
  .topbar h1 { font-size: 23px; }
  .topbar-actions { width: 100%; align-items: stretch; }
  .topbar-actions > .user-pill {
    flex: 0 0 auto;
    align-self: flex-start;
    min-height: 34px;
    padding: 5px 10px;
    text-align: left;
  }
  .topbar-action-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .topbar-action-group > * { width: 100%; min-width: 0; justify-content: center; text-align: center; }
  .profile-panel h2 { font-size: 26px; }
  .tab-panel { padding: 16px; }
  .stats-grid, .student-list, .info-grid, .weekly-grid, .form-grid, .record-card dl, .growth-overview, .bank-toolbar, .bank-list, .practice-card-grid { grid-template-columns: 1fr; }
  .diagnostic-title { align-items: stretch; flex-direction: column; }
  .diagnostic-level-badge { width: 100%; }
  .level-grid { grid-template-columns: 1fr; }
  .knowledge-space svg, .knowledge-network svg { min-height: 300px; }
  .knowledge-space header, .knowledge-network header { flex-direction: column; }
  .upload-card { grid-template-columns: 112px minmax(0, 1fr); }
  .upload-card img { width: 112px; }
  .upload-audio-preview { width: 112px; }
  .print-highlight { grid-template-columns: 1fr; }
  .timeline-panel header, .timeline-item { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; position: static; }
  .tab-btn { min-width: 112px; }
  dialog { width: calc(100vw - 16px); }
  .app-footer,
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .workspace { padding: 10px; }
  .upload-card { grid-template-columns: 1fr; }
  .upload-card img { width: 100%; }
  .upload-batch-toolbar { align-items: stretch; flex-direction: column; }
  .upload-batch-toolbar .primary-btn { margin-left: 0; width: 100%; }
  .upload-card-title { flex-direction: column; gap: 8px; }
  .analysis-photo-grid { grid-template-columns: 1fr; }
  .upload-audio-preview { width: 100%; }
  .primary-btn, .ghost-btn, .danger-btn, .module-btn, .utility-btn { width: 100%; }
  .row-actions .primary-btn, .row-actions .ghost-btn, .row-actions .danger-btn,
  .workflow-actions .primary-btn, .workflow-actions .ghost-btn, .workflow-actions .danger-btn {
    width: auto;
  }
}
/* ===== 家长转发版 学科成长诊断卡 ===== */
.parent-card-wrap {
  margin-top: 16px;
}
.parent-card {
  position: relative;
  padding: 22px 22px 18px;
  background:
    linear-gradient(180deg, rgba(223, 241, 235, .85) 0, rgba(255, 250, 240, .55) 100%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  overflow: hidden;
}
.parent-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}
.parent-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.parent-card-header-left { min-width: 0; }
.parent-card .eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 6px;
}
.parent-card-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-strong);
  letter-spacing: 0;
}
.parent-card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.parent-card-meta .dot {
  margin: 0 4px;
  color: var(--line-strong);
}
.parent-card-level {
  flex: 0 0 auto;
  min-width: 120px;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 2px;
  padding: 12px 14px;
  text-align: center;
  color: #fff;
  background: var(--brand);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(20, 122, 104, .18);
}
.parent-card-level-label {
  font-size: 11px;
  letter-spacing: 0;
  opacity: .85;
}
.parent-card-level strong {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.parent-card-level-title {
  font-size: 13px;
  font-weight: 900;
}
.parent-card-level-range {
  font-size: 11px;
  opacity: .8;
}
.parent-card-level.tone-good { background: var(--info); }
.parent-card-level.tone-watch { background: var(--accent); }
.parent-card-level.tone-weak { background: var(--danger); }
.parent-card-headline {
  margin: 14px 0 16px;
  padding: 12px 14px;
  color: var(--text);
  background: #fffefa;
  border: 1px dashed #ecd6a3;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 700;
}
.parent-card-triplet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.parent-card-tile {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.parent-card-tile h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  color: var(--brand-strong);
}
.parent-card-tile h4 .custom-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff7e6;
  color: #c8761a;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.parent-card-tile.tile-strong h4 { color: var(--brand-strong); }
.parent-card-tile.tile-weak h4 { color: var(--accent); }
.parent-card-tile.tile-next h4 { color: var(--info); }
.parent-card-tile ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.parent-card-tile li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.tile-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--brand);
}
.tile-dot.dot-strong { background: var(--brand); }
.tile-dot.dot-weak { background: var(--accent); }
.tile-dot.dot-next { background: var(--info); }
.parent-card-section {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.parent-card-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: var(--brand-strong);
}
.parent-card-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.parent-card-bar {
  display: grid;
  gap: 6px;
}
.parent-card-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.parent-card-bar-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}
.parent-card-bar-head strong { flex: 1 1 auto; }
.parent-card-bar-head em {
  font-style: normal;
  color: var(--brand-strong);
  font-weight: 900;
}
.parent-card-bar-track {
  position: relative;
  height: 8px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}
.parent-card-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--brand);
}
.parent-card-bar-fill.tone-good { background: var(--brand); }
.parent-card-bar-fill.tone-watch { background: var(--accent); }
.parent-card-bar-fill.tone-weak { background: var(--danger); }
.parent-card-evidence {
  display: grid;
  gap: 10px;
}
.parent-card-evidence-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.parent-card-evidence-item.evidence-fallback {
  grid-template-columns: 1fr;
  background: #fffaf0;
  border-color: #f1d9a8;
}
.evidence-fallback-line {
  margin: 0;
  color: #8a5a1c;
  font-size: 13px;
  line-height: 1.7;
}
.parent-card-evidence-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.parent-card-evidence-item p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}
.evidence-tag {
  display: inline-block;
  width: max-content;
  padding: 2px 8px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c7e5dc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.evidence-tag.teacher {
  color: #8a5a1c;
  background: #fff0cf;
  border-color: #f1d9a8;
}
.parent-card-coop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: linear-gradient(180deg, #f5fbf8, #ffffff);
}
.parent-card-coop h4 {
  margin: 0 0 6px;
}
.parent-card-coop p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}
.parent-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.parent-card-brand {
  margin: 0;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 800;
}
.parent-card-brand span {
  color: var(--muted);
  font-weight: 700;
}
.parent-card-contact {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* 老师内部区降级样式 */
.internal-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafdfb;
}
.internal-section-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.internal-section-summary::-webkit-details-marker { display: none; }
.internal-section-summary::before {
  content: "▾";
  display: inline-block;
  color: var(--brand);
  font-size: 14px;
  transition: transform .15s ease;
}
.internal-section:not([open]) .internal-section-summary::before { transform: rotate(-90deg); }
.internal-section-title {
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 900;
}
.internal-section-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.internal-section-body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--line);
}

/* 移动端折叠/堆叠 */
@media (max-width: 1060px) {
  .parent-card-header { grid-template-columns: 1fr; }
  .parent-card-level { width: 100%; min-width: 0; }
  .parent-card-triplet { grid-template-columns: 1fr; }
  .parent-card-bars { grid-template-columns: 1fr; }
  .parent-card-coop { grid-template-columns: 1fr; }
  .parent-card-evidence-item { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .parent-card { padding: 18px 16px 14px; }
  .parent-card-title { font-size: 20px; }
  .parent-card-section { padding: 12px; }
  .parent-card-coop { gap: 10px; }
}

@media print {
  body { background: #fff; }
  .topbar, .sidebar, .profile-panel, .info-grid, .tabs, .no-print,
  .bank-toolbar, .bank-list, .practice-card-grid, .practice-card, .practice-result,
  .weekly-grid, .diagnostic-report-card, .internal-section,
  .section-heading { display: none !important; }
  .workspace { display: block; padding: 0; }
  .tab-panel, .print-card { border: 0; box-shadow: none; padding: 0; }
  #practicePaper { border: 0; box-shadow: none; padding: 0; }
  .practice-paper-question { break-inside: avoid; page-break-inside: avoid; background: #fff; }
  .practice-paper-qstem, .practice-paper-qhint, .practice-paper-notes { border: 0; padding: 0; }
  .parent-card { box-shadow: none; border-color: #d9e5df; page-break-inside: avoid; }
  .parent-card-section { break-inside: avoid; page-break-inside: avoid; }
  .parent-card-triplet, .parent-card-bars, .parent-card-coop, .parent-card-evidence { break-inside: avoid; page-break-inside: avoid; }
  .print-extra-note { margin: 12px 0 0; padding: 10px 12px; color: var(--muted); background: #f5fbf8; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; line-height: 1.7; break-inside: avoid; page-break-inside: avoid; }
  @page { margin: 14mm; }
}

/* ===== 练习生成进度条 / 质量自检 ===== */
.practice-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: #f1f6fb;
  border: 1px solid #d6e3ee;
  border-radius: 8px;
  margin: 4px 0 8px;
}
.practice-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text);
}
.practice-progress-title { font-weight: 700; }
.practice-progress-percent { color: var(--brand-strong); font-weight: 700; }
.practice-progress-bar {
  width: 100%;
  height: 6px;
  background: #d6e3ee;
  border-radius: 999px;
  overflow: hidden;
}
.practice-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.practice-progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.practice-progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.practice-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4d1de;
  flex: 0 0 auto;
  transition: background 0.2s ease;
}
.practice-progress-item.is-done { color: var(--text); }
.practice-progress-item.is-done .practice-progress-dot { background: var(--brand-strong); }
.practice-progress-item.is-active { color: var(--brand-strong); font-weight: 600; }
.practice-progress-item.is-active .practice-progress-dot {
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(45, 110, 175, 0.18);
  animation: practice-progress-pulse 1.1s ease-in-out infinite;
}
.practice-progress-item.is-pending .practice-progress-label { opacity: 0.7; }
@keyframes practice-progress-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.quality-check {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
}
.quality-check.is-pass { border-color: #c9e2cf; background: #f3faf4; }
.quality-check.is-warn { border-color: #f1d6a8; background: #fff8ec; }
.quality-check-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.quality-check-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: #d8e7d8;
  color: #2e6b3a;
}
.quality-check-badge.is-warn { background: #f4d8a8; color: #8a5a1c; }
.quality-check-template {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: #e6eef7;
  color: var(--brand-strong);
}
.quality-check-template.is-general { background: #f1eadf; color: #8a6a2a; }
.quality-check-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--text);
}
.quality-check-item {
  display: grid;
  grid-template-columns: 16px auto 1fr;
  gap: 6px;
  align-items: baseline;
}
.quality-check-mark { font-weight: 800; }
.quality-check-item.is-pass .quality-check-mark { color: #2e6b3a; }
.quality-check-item.is-warn .quality-check-mark { color: #b87a16; }
.quality-check-label { font-weight: 600; }
.quality-check-detail { color: var(--muted); }
.quality-check-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 4px;
  font-size: 12px;
}
.quality-check-coverage-cell {
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef3f7;
  color: var(--muted);
}
.quality-check-coverage-cell.is-pass { background: #e1efe5; color: #2e6b3a; }
.quality-check-coverage-cell.is-warn { background: #f1eadf; color: #8a6a2a; }

@media print {
  .practice-progress, .quality-check { display: none; }
}


/* ===== 组班工作台 ===== */
.class-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  max-width: 1720px;
  margin: 0 auto;
}
.class-sidebar { display: flex; flex-direction: column; gap: 14px; }
.class-sidebar-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.class-sidebar-header > div { flex: 1 1 180px; min-width: 0; }
.class-sidebar-header .primary-btn { min-width: 96px; }
.class-sidebar-header h2 { margin: 4px 0 6px; font-size: 20px; }
.class-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}
.class-list { display: grid; gap: 10px; }
.class-card {
  width: 100%;
  text-align: left;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.class-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.class-card.active { border-color: var(--brand); background: linear-gradient(180deg, #fff, #f0fbf7); box-shadow: 0 0 0 3px rgba(20, 122, 104, 0.13); }
.class-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.class-card h3 { margin: 0; font-size: 17px; }
.class-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.class-card-meta { font-size: 13px; }
.class-card-period { font-size: 12px; }
.class-type-pill {
  display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(199, 123, 42, .2);
  border-radius: 999px; font-size: 12px; font-weight: 800;
}
.back-to-students { margin-top: 4px; }

.class-detail { display: flex; flex-direction: column; gap: 16px; }
.class-detail-content { display: grid; gap: 16px; }
.class-detail-loading { padding: 30px; text-align: center; color: var(--muted); }
.class-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(223, 241, 235, .85), rgba(255, 250, 240, .65)), #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.class-detail-header h2 { margin: 4px 0 6px; font-size: 26px; }
.class-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.class-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.class-stat-grid article, .class-summary-card, .class-layer-card, .class-reminders > div, .class-paper-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}
.class-stat-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.class-stat-grid strong { display: block; margin-top: 4px; font-size: 24px; line-height: 1.1; color: var(--brand-strong); }

.class-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.class-summary-card h3, .class-layers h3, .class-reminders h3, .class-student-table h3, .class-paper-section h3 { margin: 0 0 6px; font-size: 16px; }
.class-chip-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.class-chip {
  display: grid; gap: 2px; padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.class-chip.weak { background: var(--danger-soft); border-color: rgba(185, 74, 63, .25); }
.class-chip.strong { background: var(--brand-soft); border-color: rgba(20, 122, 104, .25); }
.class-chip strong { color: var(--text); }
.class-chip span { color: var(--muted); font-size: 12px; }
.class-suggestion-list { padding-left: 20px; margin: 8px 0 0; }
.class-suggestion-list li { margin-bottom: 4px; }
.class-anchor { margin-top: 10px; padding: 8px 10px; background: var(--surface-warm); border: 1px solid rgba(199, 123, 42, .2); border-radius: 6px; }

.class-layer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.class-layer-card header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.class-layer-card h4 { margin: 0; font-size: 15px; }
.class-layer-card header span { color: var(--muted); font-size: 12px; font-weight: 800; }
.class-layer-card.layer-bucha { border-color: rgba(185, 74, 63, .35); background: linear-gradient(180deg, #fff, var(--danger-soft)); }
.class-layer-card.layer-peiliang { border-color: rgba(199, 123, 42, .35); background: linear-gradient(180deg, #fff, var(--accent-soft)); }
.class-layer-card.layer-peiyu { border-color: rgba(20, 122, 104, .35); background: linear-gradient(180deg, #fff, var(--brand-soft)); }
.class-layer-students { color: var(--muted); margin: 6px 0; line-height: 1.6; }
.class-layer-actions { padding-left: 18px; margin: 6px 0; }
.class-layer-actions li { margin-bottom: 4px; }
.class-layer-focus { margin: 6px 0 0; color: var(--text); font-size: 13px; }

.class-reminders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.class-reminders ul { padding-left: 18px; margin: 6px 0 0; }
.class-reminders li { margin-bottom: 6px; }

.level-pill {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 800;
}
.level-pill.level-peiyu { color: var(--brand-strong); background: var(--brand-soft); }
.level-pill.level-peiliang { color: var(--accent); background: var(--accent-soft); }
.level-pill.level-bucha { color: var(--danger); background: var(--danger-soft); }

.class-paper-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.class-paper-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.class-paper-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.class-paper-item header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.class-paper-idx {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 900; font-size: 13px;
}
.class-paper-layer { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 800; }
.class-paper-item ul { padding-left: 18px; margin: 6px 0 0; }
.class-paper-item li { margin-bottom: 2px; }
.class-paper-future { margin-top: 10px; color: var(--muted); font-size: 12px; }

/* 班级 dialog 学生多选 */
.class-student-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}
.class-student-picker legend { padding: 0 6px; color: var(--brand-strong); font-weight: 800; font-size: 13px; }
.class-picker-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.class-picker-toolbar input { flex: 1 1 200px; min-height: 36px; }
.class-picker-meta { color: var(--muted); font-size: 12px; }
.class-picker-section {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 4px;
}
.class-picker-item.is-warn { background: var(--danger-soft); border-color: rgba(185, 74, 63, .35); }
.class-picker-item input[disabled] { opacity: .35; }
.class-picker-warn { color: var(--danger); font-size: 12px; font-weight: 800; margin-left: auto; }
.class-picker-hint { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin: 4px 0 0; }
#classPickerMeta a { color: var(--brand); text-decoration: underline; margin-left: 4px; }
.class-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.class-picker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  min-width: 0;
}
.class-picker-item.is-match { background: var(--brand-soft); border-color: rgba(20, 122, 104, .25); }
.class-picker-item.is-selected { background: var(--accent-soft); border-color: rgba(199, 123, 42, .35); }
.class-picker-item input { width: auto; min-height: 0; margin: 0; }
.class-picker-name { font-weight: 800; min-width: 0; }
.class-picker-meta { color: var(--muted); font-size: 12px; }

@media (max-width: 1060px) {
  .class-workspace { grid-template-columns: 1fr; }
  .class-summary-grid, .class-layer-grid, .class-reminders, .class-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-picker-list { grid-template-columns: 1fr; }
  .class-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .class-detail-header, .class-paper-header { flex-direction: column; align-items: stretch; }
  .class-stat-grid, .class-summary-grid, .class-layer-grid, .class-reminders { grid-template-columns: 1fr; }
  .class-detail-actions > * { flex: 1 1 100%; }
  .class-workspace { padding: 14px; }
}

/* ============== 经营信息层样式 ============== */
.crm-workspace {
  display: grid;
  gap: 18px;
  padding: 20px 26px 40px;
  background: var(--bg);
}
.crm-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.crm-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crm-header-actions .primary-btn,
.crm-header-actions .ghost-btn { min-width: 96px; }
.crm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.crm-stats article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: none;
}
.crm-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.crm-stats strong { display: block; margin-top: 4px; color: var(--brand-strong); font-size: 24px; }
.crm-stats em { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-style: normal; }
.crm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.crm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: none;
}
.crm-card header h3 { margin: 0 0 4px; font-size: 16px; }
.crm-card header p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.crm-card-wide { grid-column: 1 / -1; }
.crm-list { display: grid; gap: 8px; }
.crm-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 10px;
  background: var(--surface-soft);
  border-radius: 8px;
}
.crm-row-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.crm-row-tail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-pill {
  display: inline-flex; align-items: center;
  padding: 4px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: 12px; font-weight: 800;
}
.crm-pill-warn { background: var(--danger-soft); color: var(--danger); }
.empty-line { color: var(--muted); font-size: 13px; margin: 6px 0; }

/* 学生详情：课时余额提示 */
.business-hint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 6px;
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.business-hint-label { color: var(--muted); font-size: 12px; font-weight: 800; }
.business-hint strong { color: var(--brand-strong); font-size: 18px; }
.business-hint-warn { color: var(--danger); font-size: 12px; font-weight: 800; }
.business-hint-meta { color: var(--muted); font-size: 12px; }

/* 学生详情：经营信息面板 */
.business-panel {
  margin: 8px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}
.business-panel[hidden] { display: none; }
.business-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-soft);
}
.business-panel > summary::-webkit-details-marker { display: none; }
.business-panel-title { font-weight: 900; color: var(--brand-strong); }
.business-panel-meta { color: var(--muted); font-size: 12px; }
.business-panel-body { padding: 12px 16px; display: grid; gap: 14px; }
.business-section h4 { margin: 0 0 4px; font-size: 15px; }

/* 购买记录 */
.enrollment-list { display: grid; gap: 8px; }
.enrollment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
}
.enrollment-card.is-low { border-color: var(--danger-soft); background: #fff7f6; }
.enrollment-card header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.enrollment-card-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.enrollment-card-tail { display: flex; gap: 6px; flex-wrap: wrap; }
.enrollment-card footer {
  margin-top: 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px;
}

/* 课消记录 */
.consumption-list { display: grid; gap: 6px; }
.consumption-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--surface-soft);
  border-radius: 8px;
}
.consumption-row.is-revoked { opacity: .65; }
.consumption-row-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.consumption-row-tail { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* 今日辅导：课消字段 */
.consumption-field {
  margin: 8px 0 4px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 0;
  background: var(--surface-soft);
}
.consumption-field > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.consumption-field > summary::-webkit-details-marker { display: none; }
.consumption-field-title { font-weight: 900; color: var(--brand-strong); }
.consumption-field-hint { color: var(--muted); font-size: 12px; }
.consumption-field-body { padding: 0 12px 12px; display: grid; gap: 10px; }
.consumption-toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* 班级工作台：课消卡片 */
.class-consumption-card { border-top: 3px solid var(--brand-soft); }
.class-consumption-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.class-consumption-list li { padding: 4px 0; }

@media (max-width: 1060px) {
  .crm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-grid { grid-template-columns: 1fr; }
  .crm-card-wide { grid-column: auto; }
}
@media (max-width: 720px) {
  .crm-workspace { padding: 14px 14px 32px; }
  .crm-stats { grid-template-columns: 1fr 1fr; }
  .crm-header { align-items: stretch; flex-direction: column; }
  .crm-header-actions { width: 100%; }
  .crm-header-actions .primary-btn,
  .crm-header-actions .ghost-btn { flex: 1 1 auto; width: auto; }
  .business-panel-body { padding: 12px; }
  .enrollment-card header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .crm-stats { grid-template-columns: 1fr; }
}

/* 课时余额提示：中性变体（无在用购买记录） */
.business-hint.business-hint-neutral {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}
.business-hint.business-hint-neutral strong { color: var(--text); }
/* 课时余额提示：低余额预警态 */
.business-hint.business-hint-warn-state { background: var(--danger-soft); border-color: var(--danger-soft); }
/* 课时余额/经营信息面板在打印报告中隐藏 */
@media print {
  .business-hint, .business-panel { display: none !important; }
}
/* ============== 账号管理 ============== */
.account-workspace {
  display: grid;
  gap: 18px;
  padding: 20px 26px 40px;
  background: var(--bg);
}
.account-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.account-stats article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.account-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.account-stats strong { display: block; margin-top: 4px; color: var(--brand-strong); font-size: 22px; }
.account-stats em { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-style: normal; }
.account-toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}
.account-toolbar label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.account-toolbar input, .account-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
.account-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}
.account-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.account-table th, .account-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.account-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.account-table tbody tr:hover { background: var(--surface-soft); }
.account-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--brand-strong);
}
.account-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.account-actions .ghost-btn { padding: 4px 10px; font-size: 13px; }
.account-actions .ghost-btn:disabled { opacity: .45; cursor: not-allowed; }
.account-self-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.account-empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

@media (max-width: 960px) {
  .account-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-workspace { padding: 14px 14px 32px; }
  .analysis-profile-result { align-items: stretch; flex-direction: column; }
  .analysis-profile-result .ghost-btn { width: 100%; }
  .suggestion-calibration-fields { grid-template-columns: 1fr; }
}

/* ===== v135 班级管理：课次内容 / 红绿灯卡片墙 / 周试听 ===== */
.class-lesson-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.lesson-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lesson-section-header h3 { margin: 0; font-size: 16px; }
.lesson-section-header .hint { flex: 1; min-width: 200px; }
.lesson-section-header .primary-btn { margin-left: auto; }
.lesson-list { display: flex; flex-direction: column; gap: 8px; }
.lesson-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.lesson-item.is-open { border-color: var(--accent); }
.lesson-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--bg, #f7f8fa);
  user-select: none;
}
.lesson-item-head:hover { background: var(--accent-soft); }
.lesson-date {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.lesson-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-meta { color: var(--muted, #8a8f98); font-size: 12px; white-space: nowrap; }
.lesson-caret { color: var(--muted, #8a8f98); transition: transform .15s; }
.lesson-item.is-open .lesson-caret { transform: rotate(180deg); }
.lesson-body { padding: 12px 14px 14px; border-top: 1px dashed var(--line); }
.lesson-fields p { margin: 4px 0; }
.lesson-kp-chip {
  display: inline-block;
  padding: 1px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}
.lesson-files { margin: 10px 0; }
.lesson-file-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.lesson-file-kind {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--line);
  white-space: nowrap;
}
.lesson-file-link { color: var(--accent); text-decoration: none; }
.lesson-file-link:hover { text-decoration: underline; }
.lesson-file-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 8px 0;
}
.lesson-file-upload .hint { flex-basis: 100%; margin: 0; }
.lesson-stat-table { margin: 10px 0 0; }
.lesson-stat-table select, .lesson-stat-table input[type="text"] {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  max-width: 140px;
}
.lesson-item-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* 红绿灯卡片墙 */
.tlight-sum { display: inline-flex; align-items: center; gap: 3px; }
.traffic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 10px 0 4px;
}
.tlight-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  min-width: 0;
}
.tlight-card:hover { border-color: var(--accent); }
.tlight-card.red { border-left-color: #e5484d; }
.tlight-card.yellow { border-left-color: #f5a623; }
.tlight-card.green { border-left-color: #30a46c; }
.tlight-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: var(--line);
}
.tlight-dot.red { background: #e5484d; }
.tlight-dot.yellow { background: #f5a623; }
.tlight-dot.green { background: #30a46c; }
.tlight-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tlight-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlight-reason {
  font-size: 11px;
  color: var(--muted, #8a8f98);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tlight-meta { font-weight: 700; font-size: 12px; color: var(--muted, #8a8f98); white-space: nowrap; }

/* 周试听 */
.class-trial-section { margin: 0; }
.trial-card { display: flex; flex-direction: column; gap: 8px; }
.trial-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trial-input label { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.trial-input input[type="number"] { width: 84px; }
.trial-input input[type="text"] { flex: 1; min-width: 180px; }
.trial-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 96px;
  padding: 8px 4px 0;
}
.trial-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 34px;
}
.trial-bar-value { font-size: 12px; font-weight: 700; }
.trial-bar i {
  display: block;
  width: 20px;
  background: var(--accent-soft, #dbeafe);
  border: 1px solid var(--accent, #3b82f6);
  border-radius: 3px 3px 0 0;
  transition: height .2s;
}
.trial-bar.is-current i { background: var(--accent, #3b82f6); }
.trial-bar-label { font-size: 11px; color: var(--muted, #8a8f98); white-space: nowrap; }
.trial-bars .hint { align-self: center; margin: 0; }

/* 课次对话框 */
.lesson-dialog-upload {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 720px) {
  .traffic-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .lesson-section-header .primary-btn { margin-left: 0; }
  .trial-input input[type="text"] { flex-basis: 100%; }
  .trial-bars { overflow-x: auto; }
}

/* ===== v137 课次按教材单元分组（借鉴"阳光学习能量站"单元组织） ===== */
.lesson-unit-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.lesson-unit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--accent-soft);
  flex-wrap: wrap;
}
.lesson-unit-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-unit-meta {
  font-size: 12px;
  color: var(--muted, #687a73);
  white-space: nowrap;
}
.lesson-unit-bar {
  flex: 1;
  min-width: 120px;
  max-width: 240px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.lesson-unit-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width .3s;
}
.lesson-unit-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.lesson-unit-group .lesson-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 720px) {
  .lesson-unit-bar { max-width: 100%; }
}

/* ===== v139 今日待办（老师分组 + 任务优先级） ===== */
.today-todo-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.todo-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.todo-bar-title {
  font-size: 14px;
  font-weight: 700;
}
.todo-bar-stat {
  font-size: 12px;
  color: var(--muted, #687a73);
}
.todo-bar-stat b { color: #1f2421; font-weight: 700; margin: 0 1px; }
.todo-bar-stat b + b { margin-left: 6px; }

/* 老师 chips 筛选 */
.todo-teacher-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--accent-soft);
  border-radius: 8px;
  flex-wrap: wrap;
}
.todo-teacher-label { font-size: 12px; color: var(--muted, #687a73); }
.todo-teacher-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.todo-teacher-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #687a73);
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}
.todo-teacher-chip:hover { border-color: var(--accent); }
.todo-teacher-chip.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.todo-teacher-chip-n {
  font-size: 10px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
}
.todo-teacher-chip.on .todo-teacher-chip-n { background: rgba(255, 255, 255, 0.25); }
.todo-teacher-toggle-all {
  border: none;
  background: transparent;
  color: var(--muted, #687a73);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}
.todo-teacher-toggle-all:hover { color: var(--accent); }

/* 三大组卡片 */
.todo-groups { display: flex; flex-direction: column; gap: 10px; }
.todo-group { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.todo-group-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.todo-group-card:hover { background: var(--accent-soft); }
.todo-group-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.todo-group-icon.red    { background: #e5484d; }
.todo-group-icon.yellow { background: #f5a623; }
.todo-group-icon.blue   { background: #3b82f6; }
.todo-group-main { flex: 1; min-width: 0; }
.todo-group-label { font-size: 14px; font-weight: 700; line-height: 1.2; }
.todo-group-cap   { font-size: 11px; color: var(--muted, #687a73); margin-top: 2px; }
.todo-group-count {
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.todo-group-count.red    { background: #e5484d; }
.todo-group-count.yellow { background: #f5a623; }
.todo-group-count.blue   { background: #3b82f6; }
.todo-group-count.zero   { background: var(--line); color: var(--muted, #687a73); }
.todo-group-arrow {
  font-size: 14px;
  color: var(--muted, #687a73);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.todo-group-card[aria-expanded="true"] .todo-group-arrow { transform: rotate(-180deg); }

/* 展开后的名单 */
.todo-group-panel { border-top: 1px solid var(--line); background: #fafbfa; }
.todo-rows { display: flex; flex-direction: column; }
.todo-row-item {
  display: grid;
  grid-template-columns: 4px 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.todo-row-item:last-child { border-bottom: none; }
.todo-row-item:hover { background: var(--accent-soft); }
/* 行首色条：按紧急度 */
.todo-row-priority {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--line);
}
.todo-row-item.prio-urgent .todo-row-priority { background: #e5484d; }
.todo-row-item.prio-remind .todo-row-priority { background: #f5a623; }
.todo-row-item.prio-follow .todo-row-priority { background: #3b82f6; }
/* 跳转目标高亮动画：3 秒高亮边框 + 微脉冲 */
@keyframes todoJumpFlash {
  0%   { box-shadow: 0 0 0 0 rgba(20, 122, 104, 0.0); border-color: var(--line); }
  10%  { box-shadow: 0 0 0 4px rgba(20, 122, 104, 0.18); border-color: var(--brand); }
  50%  { box-shadow: 0 0 0 6px rgba(20, 122, 104, 0.10); border-color: var(--brand); }
  100% { box-shadow: 0 0 0 0 rgba(20, 122, 104, 0); border-color: var(--line); }
}
.todo-jump-flash {
  animation: todoJumpFlash 1.6s ease-out 2;
  border-radius: 8px;
}
.todo-row-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.todo-row-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--muted, #687a73);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.todo-row-tag:hover {
  filter: brightness(0.95);
  border-color: currentColor;
  transform: translateY(-1px);
}
.todo-row-tag.tag-red    { background: #fee4e2; color: #b42318; }
.todo-row-tag.tag-yellow { background: #fef0c7; color: #b54708; }
.todo-row-tag.tag-blue   { background: #d1e9ff; color: #175cd3; }
.todo-row-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.todo-row-name:hover { color: var(--brand-strong); text-decoration: underline; }
.todo-row-meta { font-size: 11px; color: var(--muted, #687a73); white-space: nowrap; }
.todo-row-arrow { color: var(--muted, #98a2b3); font-size: 16px; }
.todo-row-item:hover .todo-row-arrow { color: var(--accent); }

.todo-empty { font-size: 12px; color: var(--muted, #687a73); padding: 10px 14px; }
.todo-empty-ok { color: #30a46c; font-weight: 600; }
.todo-loading { font-size: 12px; color: var(--muted, #687a73); padding: 6px 2px; }

@media (max-width: 720px) {
  .todo-row-item { grid-template-columns: 1fr auto; row-gap: 4px; }
  .todo-row-tags { grid-column: 1 / -1; }
  .todo-row-meta { grid-column: 1 / -1; }
  .todo-row-arrow { display: none; }
}

/* ===== v138 学生卡片掌握进度 ===== */
.wall-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.wall-progress-label {
  font-size: 11px;
  color: var(--muted, #687a73);
  white-space: nowrap;
}
.wall-progress-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.wall-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* ===== v138 班级教材进度（课次区顶部） ===== */
.lesson-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg, #f7f8fa);
  flex-wrap: wrap;
}
.lesson-progress-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}
.lesson-progress-bar {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.lesson-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width .3s;
}
.lesson-progress-meta {
  font-size: 12px;
  color: var(--muted, #687a73);
  white-space: nowrap;
}

/* ===== v138 知识库导入按钮 ===== */
.bank-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.bank-import-actions label.ghost-btn {
  cursor: pointer;
  margin: 0;
}
/* ===== v140 跳转提示横幅 + 登录页极简化 ===== */
.todo-jump-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #fff7ed, #fef3c7);
  border: 1px solid #fde9b8;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  animation: todoJumpSlide 0.25s ease-out;
}
@keyframes todoJumpSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.todo-jump-note-close {
  border: 0;
  background: transparent;
  color: #92400e;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}
.todo-jump-note-close:hover { opacity: 1; }

/* 极简登录页 */
.login-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf5f1 0%, #f6f8f4 60%);
}
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}
.login-legal-footer {
  margin-top: auto;
  padding: 12px;
  font-size: 11px;
  text-align: center;
  opacity: 0.6;
}
.login-legal-footer a { color: inherit; text-decoration: none; }
.login-legal-footer a:hover { text-decoration: underline; }

/* 小屏兜底 */
@media (max-width: 720px) {
  .todo-row-item { grid-template-columns: 1fr auto; row-gap: 4px; }
  .todo-row-tags { grid-column: 1 / -1; }
  .todo-row-meta { grid-column: 1 / -1; }
  .todo-row-arrow { display: none; }
  .bank-import-actions { margin-left: 0; flex-wrap: wrap; }
}

/* ===== v140 校区看板布局修复（之前缺失导致聚堆） ===== */
.dashboard-workspace {
  padding: 20px 24px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dash-header .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin: 0 0 2px;
  text-transform: uppercase;
}
.dash-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.dash-header .hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.dash-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-range-group {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.dash-range-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.dash-range-btn:hover { background: var(--accent-soft); color: var(--accent); }
.dash-range-btn.is-active {
  background: var(--brand);
  color: #fff;
}

/* KPI 卡片网格 */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dash-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-kpi-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(20, 122, 104, 0.08);
}
.dash-kpi-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dash-kpi-card strong {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--brand-strong);
}
.dash-kpi-card em {
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
}

/* 通用面板 */
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.dash-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.dash-panel-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.dash-panel-hint {
  font-size: 11px;
  color: var(--muted);
}
.dash-caliber-note {
  margin: 0;
  padding: 8px 16px;
  font-size: 11px;
  color: #b54708;
  background: #fef7e6;
  border-bottom: 1px solid #fde9b8;
}

/* 趋势图 */
.dash-trend {
  padding: 12px 16px 16px;
}
.dash-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.dash-chart-legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.dash-chart-count-hint { margin-left: auto; }
.dash-trend-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

/* 两栏布局 */
.dash-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.dash-cols .dash-panel { margin-bottom: 0; }

/* 警告/排行行 */
.dash-alerts, .dash-revenue { padding: 8px 16px 14px; }
.dash-alert-row, .dash-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.dash-alert-row:last-child, .dash-rank-row:last-child { border-bottom: none; }
.dash-alert-row > div, .dash-rank-meta {
  flex: 1;
  min-width: 0;
}
.dash-alert-row strong, .dash-rank-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.dash-alert-meta, .dash-rank-meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.dash-alert-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}
.dash-alert-danger {
  color: #fff;
  background: var(--danger);
}
.dash-rank-bar {
  flex: 0 0 120px;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.dash-rank-bar i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
}
.dash-rank-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-strong);
  white-space: nowrap;
}
.dash-rank-num span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

/* 表格通用 */
.dash-matrix, .dash-baseline { padding: 8px 16px 14px; }
.dash-matrix-scroll, .dash-baseline-scroll { overflow-x: auto; }
.dash-matrix-table, .dash-baseline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dash-matrix-table th, .dash-baseline-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.dash-matrix-table td, .dash-baseline-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.dash-matrix-table tr:last-child td,
.dash-baseline-table tr:last-child td { border-bottom: none; }
.dash-matrix-table strong { color: var(--brand-strong); }
.dash-dist {
  min-width: 80px;
  font-size: 11px;
  color: var(--muted);
}
.dash-dist-bar {
  display: block;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
  margin-bottom: 3px;
  opacity: 0.6;
}
.dash-delta-pos { color: #30a46c; font-weight: 600; }
.dash-delta-neg { color: var(--danger); font-weight: 600; }
.dash-baseline-source {
  font-size: 11px;
  color: var(--muted);
  max-width: 180px;
}

.empty-line {
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* 响应式 */
@media (max-width: 960px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dashboard-workspace { padding: 12px; }
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-header { align-items: flex-start; }
}

/* ===== v141 学生档案卡片墙（细条平铺、UI 统一） ===== */
.wall-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}
.wall-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.wall-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* 关键：grid 平铺，2 列（中等屏 3 列，大屏 4 列） */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.wall-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.wall-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(20, 122, 104, 0.08);
}
.wall-card:active { transform: scale(0.995); }

/* 头部：头像 + 姓名年级 + 星级 */
.wall-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.wall-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.wall-avatar.tag-math     { background: #2f7dd1; }
.wall-avatar.tag-chinese  { background: #c0392b; }
.wall-avatar.tag-english  { background: #16a085; }
.wall-avatar.tag-physics  { background: #7d3c98; }
.wall-avatar.tag-chemistry{ background: #e67e22; }
.wall-avatar.tag-biology  { background: #27ae60; }
.wall-avatar.tag-history  { background: #8b6914; }
.wall-avatar.tag-geography{ background: #16a085; }
.wall-avatar.tag-default  { background: #6b7c8c; }

.wall-card-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wall-card-name-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wall-card-name-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}
.wall-card-stars {
  flex-shrink: 0;
  font-size: 12px;
  color: #f5a623;
  letter-spacing: 1px;
}

/* 第二行：最近记录 + 本周记录数 */
.wall-card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.wall-card-line-l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.wall-card-line-r {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--brand-strong);
  background: var(--brand-soft);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
}

/* 第三行：状态/标签 chips */
.wall-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.wall-chip-line {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.wall-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
}
.wall-chip-warn {
  background: #fef0c7;
  color: #b54708;
  border-color: #fde9b8;
}
.wall-chip-ok {
  background: #d1f5e0;
  color: #1a7f4c;
  border-color: #b8ead0;
}
.wall-chip-tag {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(20, 122, 104, .15);
}

/* 进度条 */
.wall-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.wall-progress-label {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.wall-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.wall-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 2px;
  transition: width 0.3s;
}

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


/* ===== v143 恢复 v139 误删的样式（来自 styles.css.bak.v138） ===== */
.login-subtitle {
margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.login-error {
margin: 0;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 3px solid #dc2626;
  border-radius: var(--radius-sm);
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}
.primary-btn:active, .ghost-btn:active, .danger-btn:active, .icon-btn:active, .module-btn:active, .utility-btn:active {
transform: translateY(0); box-shadow: var(--shadow-soft);
}
.sidebar::-webkit-scrollbar {
width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
background: var(--line-strong, #b8cbc3); border-radius: 999px;
}
.stats-grid article::before {
content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--brand);
}
.stats-grid article:nth-child(2)::before {
background: var(--info);
}
.stats-grid article:nth-child(3)::before {
background: var(--accent);
}
.student-card:hover {
transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--line-strong);
}
.student-card-bar {
flex: 0 0 5px;
  align-self: stretch;
  background: var(--brand);
}
.student-card-bar.tag-math {
background: var(--math);
}
.student-card-bar.tag-chinese {
background: var(--chinese);
}
.student-card-bar.tag-english {
background: var(--english);
}
.student-card-bar.tag-science {
background: var(--science);
}
.student-card-body {
padding: 13px 14px; min-width: 0; flex: 1;
}
.student-meta {
display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--muted); line-height: 1.5;
}
.student-rec {
display: block; font-size: 12px; color: var(--brand-strong); margin-bottom: 8px; font-weight: 700;
}
.student-rec.muted {
color: var(--muted); font-weight: 500;
}
.student-card.active .student-card-body {
background: linear-gradient(180deg, #fff, #f2fbf7);
}
.tag-math {
color: var(--math); background: var(--math-soft); border-color: rgba(64, 158, 255, .18);
}
.tag-chinese {
color: var(--chinese); background: var(--chinese-soft); border-color: rgba(224, 90, 82, .18);
}
.tag-english {
color: var(--english); background: var(--english-soft); border-color: rgba(139, 92, 181, .18);
}
.tag-science {
color: var(--science); background: var(--science-soft); border-color: rgba(82, 184, 122, .18);
}
.tag-success {
color: var(--success); background: var(--success-soft); border-color: rgba(45, 184, 122, .18);
}
.tag-warning {
color: var(--warning); background: var(--warning-soft); border-color: rgba(230, 162, 60, .18);
}
.tag-danger {
color: var(--danger); background: var(--danger-soft); border-color: rgba(201, 70, 58, .18);
}
.tag-info {
color: var(--info); background: var(--info-soft); border-color: rgba(64, 158, 255, .18);
}
.empty-state-visual {
margin-bottom: 8px;
}
.empty-illustration {
position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 8px;
  background: linear-gradient(135deg, var(--brand-soft), var(--surface));
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}
.empty-emoji {
font-size: 56px;
  filter: drop-shadow(0 6px 12px rgba(18, 138, 116, .18));
}
.empty-emoji-small {
position: absolute;
  font-size: 22px;
  opacity: .8;
  animation: float 3s ease-in-out infinite;
}
.empty-emoji-small:nth-of-type(2) {
animation-delay: .4s;
}
.empty-emoji-small:nth-of-type(3) {
animation-delay: .8s;
}
.empty-emoji-small:nth-of-type(4) {
animation-delay: 1.2s;
}
.empty-state h2 {
margin: 12px 0 8px;
  font-size: var(--text-xl);
  color: var(--text);
}
.empty-state p {
margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
}
.empty-state-tips {
display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 20px;
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
}
.empty-state-tips span {
color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}
.student-tabs {
display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f3faf7, #ffffff);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 9;
}
.student-tab {
display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.student-tab:hover {
border-color: var(--brand);
}
.student-tab.active {
border-color: var(--brand);
  background: linear-gradient(180deg, #fff, #f0fbf7);
  box-shadow: 0 0 0 3px rgba(20, 122, 104, 0.13);
  color: var(--brand-strong);
}
.student-tab-name {
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.student-tab-close {
display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.student-tab-close:hover {
background: #fde8e8; color: #b91c1c;
}
.analysis-return-banner {
display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid #cde9dd;
  border-radius: 10px;
  background: linear-gradient(180deg, #f2fbf6, #ffffff);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.analysis-return-banner .ghost-btn {
white-space: nowrap;
}
tbody tr:nth-child(even) {
background: #fafcfb;
}
tbody tr:hover {
background: var(--brand-soft); transition: background var(--transition-fast);
}
tbody tr:last-child td {
border-bottom: none;
}
.star-rater {
display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.star-rater-star {
display: inline-block;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #d4d4d4;
  background: transparent;
  border: none;
  padding: 2px 0;
  transition: color 0.12s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.star-rater-star:hover,
.star-rater-star:focus {
outline: none; transform: scale(1.15);
}
.star-rater-star.is-on {
color: var(--accent, #c46a1e);
}
.star-rater-label {
font-size: 12px; color: #666; margin-left: 4px; white-space: nowrap;
}
.record-card header h4 {
color: var(--brand-strong); font-size: 15px;
}
.dim-remove-btn {
position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 67, 54, 0);
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s, color .2s;
}
.dimension-name:hover .dim-remove-btn,
.dim-remove-btn:focus-visible {
opacity: 1;
}
.dim-remove-btn:hover {
background: #fde8e8;
  color: #b91c1c;
}
.dim-hidden-count {
font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.dim-restore-bar {
display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
}
.dim-restore-hint {
font-size: 13px;
  color: #b45309;
  font-weight: 700;
}
.dim-all-hidden {
text-align: center;
  color: var(--muted);
  padding: 24px 0;
  font-size: 13px;
}
.feedback-direct-edit {
margin-top: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #fff7ed, #fff);
  border: 1px solid #fcd9a8;
  border-left: 4px solid #c77b2a;
  border-radius: 10px;
}
.feedback-direct-edit .feedback-header {
margin-bottom: 8px;
}
.feedback-direct-edit .feedback-header h4 {
color: #8a4d12; margin: 0;
}
.feedback-direct-edit .hint {
font-size: 12px; color: var(--muted); line-height: 1.6;
}
.feedback-direct-edit textarea {
display: block;
  width: 100%;
  margin: 10px 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
.three-lists-sync-control {
margin-top: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f0fbf7, #ffffff);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand, #147a68);
  border-radius: 10px;
}
.three-lists-sync-control .feedback-header h4 {
color: var(--brand-strong, #0b5f52); margin: 0;
}
.three-lists-sync-control .sync-state {
margin-left: 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.three-lists-sync-control.is-custom .sync-state {
color: #8a4d12; font-weight: 800;
}
.soft-score-grid {
display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 12px;
}
.soft-score-grid label {
margin-top: 0;
}
.soft-score-edit select.soft-score-select {
display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.soft-score-edit label textarea {
background: #fffefa;
}
dialog.wide-dialog {
width: min(900px, calc(100vw - 28px));
}
.pick-bank-list {
max-height: 55vh; overflow-y: auto; display: grid; gap: 6px; padding: 4px 2px;
}
.pick-bank-item {
display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfd; cursor: pointer;
}
.pick-bank-item:hover {
border-color: var(--brand); background: #f2faf6;
}
.pick-bank-item input {
width: 16px; height: 16px; accent-color: var(--brand);
}
.pick-bank-title {
font-weight: 700; color: var(--text);
}
.pick-bank-meta {
margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap;
}
.pick-bank-count {
font-size: 13px; color: var(--muted); font-weight: 700;
}
.pick-bank-empty {
text-align: center; color: var(--muted); padding: 30px 0;
}
.dim-dialog {
width: 320px;
}
.dim-dialog h3 {
display: flex; align-items: center; gap: 6px; font-size: 16px;
}
.dim-dialog-hint {
margin: 0; font-size: 12px; color: #888; line-height: 1.5;
}
.dim-dialog input {
width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  font-weight: 600;
  color: #147a68;
}
.dim-dialog input:focus {
outline: none;
  border-color: var(--brand, #147a68);
  box-shadow: 0 0 0 3px rgba(20, 122, 104, 0.15);
}
.dim-edit-btn {
margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--brand, #147a68);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.dim-edit-btn:hover {
background: var(--brand-deep, #0f5c4f);
}
.dim-ov-tag {
font-size: 11px;
  color: #c26b1e;
  background: #fdf0e0;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
  font-weight: 600;
}
.parent-card-bar.is-overridden .parent-card-bar-fill {
background: #c26b1e;
}
.parent-card-bar.is-overridden .parent-card-bar-head em {
color: #c26b1e;
}
.parent-card-progress h4 {
display: flex; align-items: center; justify-content: space-between;
}
.parent-star-chart {
padding: 6px 2px 2px;
}
.parent-star-chart svg {
display: block;
}
.parent-star-legend {
display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft, #667);
}
.parent-star-legend-item {
display: inline-flex;
  align-items: center;
  gap: 5px;
}
.parent-star-legend-item i {
width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.parent-star-legend-item em.star-up {
font-style: normal;
  color: var(--brand-strong, #2f7dd1);
  font-weight: 800;
}
.parent-star-chart-empty {
padding: 14px;
  border: 1px dashed var(--line, #d5dee8);
  border-radius: 10px;
  background: var(--surface-soft, #f5f7fa);
  color: var(--text-soft, #667);
  font-size: 13px;
  line-height: 1.6;
}
.parent-star-chart-singles {
display: grid;
  gap: 8px;
}
.parent-star-single {
display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.parent-star-single-name {
color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parent-star-single-stars {
color: #f0b429;
  letter-spacing: 1px;
  white-space: nowrap;
}
.parent-star-single-stars i {
color: #dfe5ec;
  font-style: normal;
}
.parent-card-crm h4 {
display: flex; align-items: center; justify-content: space-between;
}
.parent-crm-line {
margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.parent-crm-pending {
margin: 0 0 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}
.parent-crm-empty {
padding: 10px 12px;
  font-size: 13px;
  color: var(--text-soft, #667);
  background: var(--surface-soft, #f5f7fa);
  border-radius: 8px;
}
.parent-activity {
margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e3e3e3;
}
.parent-activity h5 {
margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #147a68;
}
.parent-activity-row {
display: flex;
  gap: 10px;
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.55;
}
.parent-activity-label {
flex: 0 0 84px;
  color: #666;
}
.parent-activity-val {
flex: 1;
  color: #333;
  word-break: break-word;
}
.parent-crm-enrolls {
list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.parent-crm-enroll {
display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.parent-crm-enroll-name {
font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parent-crm-enroll-bar {
position: relative;
  height: 6px;
  background: var(--surface-soft, #eef2f6);
  border-radius: 999px;
  overflow: hidden;
}
.parent-crm-enroll-bar i {
position: absolute;
  inset: 0 auto 0 0;
  background: var(--brand, #2f7dd1);
  border-radius: 999px;
}
.parent-crm-enroll-meta {
font-variant-numeric: tabular-nums;
  color: var(--text-soft, #667);
  font-size: 12px;
}
.parent-evidence-gallery {
display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.parent-evidence-media {
margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.parent-evidence-media a {
display: block;
  width: 100%;
  height: 96px;
  overflow: hidden;
  border-radius: 7px;
  background: #eef4f2;
}
.parent-evidence-media img {
width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.parent-evidence-media a:hover img {
transform: scale(1.04);
}
.parent-evidence-media audio {
width: 100%;
  height: 96px;
  display: block;
}
.parent-evidence-media figcaption {
padding: 6px 4px 2px;
  margin: 0;
  color: #5b6b66;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parent-card-coop-grid {
display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.parent-card-coop-grid h4 {
margin: 0 0 6px;
}
.parent-card-coop-grid p {
margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}
.seg-badge {
display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--brand, #2f7dd1);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  vertical-align: 1px;
}
.parent-card-section h4 .seg-badge {
vertical-align: -1px;
}
.parent-card-level-block .parent-card-bars {
margin-top: 2px;
}
.parent-level-text {
margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft, #f5f7fa);
  border: 1px solid var(--line, #d5dee8);
  color: var(--brand-strong, #2f7dd1);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}
.parent-card-soft h4 {
display: flex; align-items: center;
}
.parent-soft-empty {
padding: 12px 14px;
  border: 1px dashed var(--line, #d5dee8);
  border-radius: 10px;
  background: var(--surface-soft, #f5f7fa);
  color: var(--text-soft, #667);
  font-size: 13px;
  line-height: 1.6;
}
.parent-soft-empty p {
margin: 0;
}
.parent-soft-dims {
display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.parent-soft-dim {
display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line, #d5dee8);
  border-radius: 8px;
  background: #fcfdfe;
}
.parent-soft-name {
font-size: 13px;
  font-weight: 700;
  color: var(--text, #333);
}
.parent-soft-stars {
color: var(--accent, #e8a33d);
  font-size: 15px;
  letter-spacing: 1px;
}
.parent-soft-stars i {
font-style: normal; color: var(--line-strong, #d5dee8);
}
.parent-soft-level {
display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft, #eaf2fb);
  color: var(--brand-strong, #2f7dd1);
  font-size: 13px;
  font-weight: 800;
}
.parent-soft-comment {
margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand, #2f7dd1);
  background: var(--surface-soft, #f5f7fa);
  border-radius: 4px;
  color: var(--text, #333);
  font-size: 13px;
  line-height: 1.7;
}
.parent-card-result .parent-card-triplet {
margin-bottom: 14px;
}
.parent-target-text {
margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef8f2;
  border: 1px solid #cfeade;
  color: #1f7a4d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}
.ocr-usage-summary {
display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.ocr-sum-card {
padding: 12px;
  background: var(--surface-soft, #f5f7fa);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.ocr-sum-card strong {
display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 4px;
}
.ocr-sum-card span {
font-size: 22px; font-weight: 900; color: var(--brand-strong);
}
.ocr-sum-card.is-warn span {
color: #b91c1c;
}
.ocr-usage-body {
display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.ocr-usage-body h4 {
font-size: 14px; margin: 0 0 8px; color: var(--text);
}
.ocr-chart-block, .ocr-recent-block {
background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.ocr-bars {
display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px;
}
.ocr-bar-col {
flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
}
.ocr-bar-track {
width: 100%; max-width: 34px; height: 110px; display: flex; align-items: flex-end; background: #f0f3f1; border-radius: 4px; overflow: hidden;
}
.ocr-bar-fill {
width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px;
}
.ocr-bar-label {
font-size: 10px; color: var(--muted); white-space: nowrap;
}
.ocr-bar-val {
font-size: 11px; font-weight: 700; color: var(--text);
}
.ocr-loading {
color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0;
}
.ocr-recent-list {
max-height: 360px; overflow-y: auto; display: grid; gap: 6px;
}
.ocr-row {
display: grid;
  grid-template-columns: 90px 64px 56px 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfdfd;
}
.ocr-row.is-warn {
background: #fef3c7; border-color: #f59e0b;
}
.ocr-row-time {
color: var(--muted);
}
.ocr-row-student {
font-weight: 700;
}
.ocr-row-conf {
font-weight: 700;
}
.ocr-row-status {
font-weight: 700;
}
.ocr-row.is-warn .ocr-row-status {
color: #b45309;
}
.ocr-row-text {
color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggestion-actions {
display: flex;
  gap: 8px;
  align-items: center;
}
.suggestion-actions .primary-btn,
.suggestion-actions .ghost-btn {
flex: 1;
  white-space: nowrap;
}
.student-card-wall {
padding: 6px 2px 24px; animation: fadeInUp .25s ease;
}
.wall-card-top {
display: flex; align-items: center; gap: 12px;
}
.wall-avatar.tag-science {
background: linear-gradient(135deg, #7a5cbf, #573f94);
}
.wall-card-title {
flex: 1; min-width: 0;
}
.wall-card-title h3 {
margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wall-card-title p {
margin: 3px 0 0; font-size: 12px; color: #67736e;
}
.wall-avg {
font-size: 13px; color: var(--accent, #d4882a); white-space: nowrap;
}
.mini-stars {
color: var(--accent, #d4882a); letter-spacing: 1px; font-size: 13px;
}
.wall-card-rec {
font-size: 12px; color: #55605b; line-height: 1.5;
  background: #f4f7f5; border-radius: 8px; padding: 7px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wall-card-rec .muted {
color: #9aa5a0;
}
.wall-card-weak {
display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 24px;
}
.wall-label {
font-size: 11px; color: #8a9490; flex: 0 0 auto;
}
.tag-weak {
background: #fdeceb; color: #c0392b; border-color: #f2c4c0;
}
.tag-ok {
background: var(--brand-soft); color: var(--brand-strong); border-color: #bfe3d8;
}
.wall-card-foot {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 10px; border-top: 1px dashed #e2e8e4;
  font-size: 12px; color: #8a9490;
}
.wall-card-foot .tag {
font-size: 11px;
}
.dash-rev-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.dash-rev-grid article {
background: #f6f9f7; border-radius: 10px; padding: 12px 14px; text-align: center;
}
.dash-rev-grid span {
display: block; font-size: 12px; color: #67736e; margin-bottom: 4px;
}
.dash-rev-grid strong {
font-size: 18px; color: var(--brand-strong);
}
.dash-rev-grid .dash-rev-main {
background: var(--brand-soft);
}
.dash-rev-grid .dash-rev-main strong {
color: var(--brand); font-size: 22px;
}
.dash-rev-hint {
font-size: 11px; color: #8a9490; margin: 10px 0 0;
}
.dash-rev-hint.muted {
color: #b0bab5;
}
.dash-baseline-table td strong {
color: var(--brand-strong);
}
.workspace.wall-mode {
grid-template-columns: minmax(0, 1fr);
}
.workspace.wall-mode > .sidebar {
display: none;
}
.wall-toolbar-slot {
margin-bottom: 14px;
}
.wall-toolbar-slot .toolbar {
display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 14px;
  row-gap: 10px;
}
.wall-toolbar-slot .toolbar > label {
flex: 1 1 280px; margin: 0;
}
.wall-toolbar-slot .toolbar .filter-row {
flex: 2 1 340px; margin: 0;
}
.dash-rank-row + .dash-rank-row {
border-top: 1px dashed var(--line, #e3e9f0);
}
.api-usage-cols {
display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px;
}
.api-usage-cols .ocr-chart-block {
margin: 0;
}
.api-usage-cols .ocr-chart-block h4 {
margin: 0 0 8px; font-size: 13px; color: var(--text, #26313d);
}
.class-health-panel {
background: var(--surface, #fff);
  border: 1px solid var(--line, #e3e9f0);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow, 0 1px 3px rgba(16,32,48,.06));
  padding: 14px 16px;
}
.class-health-panel .dash-panel-header {
display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.class-health-panel .dash-panel-header h3 {
margin: 0; font-size: 15px;
}
.class-health-panel .dash-panel-hint {
font-size: 12px; color: #8a95a5;
}
.class-health-range {
margin-left: auto;
}
.class-health-panel .dash-alerts {
display: flex; flex-direction: column; gap: 6px;
}
.class-health-panel .dash-alert-row {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 10px; background: #f6f9fc; border: 1px solid #e8eef5;
}
.class-health-panel .dash-alert-row.dash-alert-danger {
background: #fdf1f0; border-color: #f3cfcb;
}
.class-health-panel .dash-alert-row strong {
font-size: 13.5px;
}
.class-health-panel .dash-alert-meta {
display: block; font-size: 12px; color: #8a95a5; margin-top: 2px;
}
.class-health-panel .dash-alert-pill {
border: 1px solid #2f7dd1; color: #2f7dd1; background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.class-health-panel .dash-alert-pill:hover {
background: #eaf3fc;
}
.class-health-panel .dash-alert-pill:disabled {
opacity: .5; cursor: default;
}
.class-health-panel .dash-caliber-note {
margin: 10px 0 0; font-size: 11.5px; color: #a3adba;
}
.cls-trend {
font-weight: 600; font-size: 13px;
}
.cls-trend.up {
color: #1a9c5d;
}
.cls-trend.down {
color: #d2504a;
}
.cls-trend.flat {
color: #98a3b3;
}
.cls-att-bad {
color: #c2543e; font-size: 12px; font-weight: 600;
}
.cls-att-ok {
color: #6fae8f; font-size: 12px;
}
.att-badge {
display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.att-badge.att-请假 {
background: #fdf3e4; color: #b07a1f;
}
.att-badge.att-缺席 {
background: #fdecec; color: #c2543e;
}
@media (max-width: 720px) {
  .soft-score-grid {
grid-template-columns: 1fr;
  }
  .parent-card-coop-grid {
gap: 10px;
  }
  .parent-soft-dims {
grid-template-columns: 1fr;
  }
  .wall-card-title h3 {
font-size: 14px;
  }
  .dash-rev-grid {
grid-template-columns: 1fr;
  }
  .wall-toolbar-slot .toolbar > label {
flex: 1 1 100%;
  }
  .wall-toolbar-slot .toolbar .filter-row {
flex: 1 1 100%;
  }
  .api-usage-cols {
grid-template-columns: 1fr;
  }
  .class-health-panel .dash-alert-row {
flex-direction: column; align-items: flex-start;
  }
  .class-health-range {
margin-left: 0;
  }
}
@media (max-width: 1060px) {
  .student-tabs {
position: static;
  }
  .parent-card-coop-grid {
grid-template-columns: 1fr;
  }
  .ocr-usage-summary {
grid-template-columns: repeat(2, 1fr);
  }
  .ocr-usage-body {
grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  dialog.wide-dialog {
width: calc(100vw - 12px);
  }
  .star-rater-star {
font-size: 22px; padding: 4px 3px;
  }
}
@media print {
  .parent-card-triplet, .parent-card-bars, .parent-card-coop-grid, .parent-card-evidence {
break-inside: avoid; page-break-inside: avoid;
  }
}

/* ===== v144 家长反馈周选择器 ===== */
.weekly-week-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.weekly-week-picker input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
}
.weekly-week-picker input[type="date"]:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: transparent;
}
.weekly-week-picker .ghost-btn {
  padding: 5px 10px;
  font-size: 12px;
}
.weekly-week-hint {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .weekly-week-picker { width: 100%; }
  .weekly-week-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== v145 逐题分析 + 试卷来源（只增不改区，部署前 diff 校验旧内容零变动） ===== */
.upload-source-select {
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #243b53);
  cursor: pointer;
  flex-shrink: 0;
}
.upload-card-title .upload-source-select { margin-left: 4px; }
.question-editor {
  border-top: 1px dashed var(--line, #d9e2ec);
  margin-top: 10px;
  padding-top: 10px;
  width: 100%;
}
.question-draft-hint {
  color: #b45309;
  font-size: 12px;
  margin: 0 0 6px;
}
.question-empty-hint {
  color: var(--muted, #627d98);
  font-size: 12px;
  margin: 4px 0;
}
.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line, #eee);
}
.question-row.is-draft {
  background: #fef9ec;
  border-radius: 8px;
  border-bottom: 1px solid #f5e3bd;
  margin: 4px 0;
}
.question-no-input { width: 64px; flex-shrink: 0; }
.question-text-input { flex: 1 1 160px; min-width: 140px; }
.question-no-input, .question-text-input {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 6px;
}
.question-kp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 200px;
  min-width: 160px;
}
.question-kp-chip { position: relative; padding-right: 4px; }
.question-kp-chip.is-bank { border: 1px solid rgba(47, 133, 90, 0.35); }
.question-kp-chip button {
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  padding: 0 1px;
  font-size: 12px;
  line-height: 1;
}
.question-kp-chip button:hover { color: #c0392b; }
.question-kp-add-btn {
  border: 1px dashed var(--line, #9fb3c8);
  background: none;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--muted, #486581);
  cursor: pointer;
}
.question-kp-add-btn:hover { border-color: var(--brand, #2f855a); color: var(--brand, #2f855a); }
.question-difficulty-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 6px;
  flex-shrink: 0;
}
.question-star-rater { flex-shrink: 0; }
.question-del-btn { padding: 3px 10px; flex-shrink: 0; }
.question-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, #d9e2ec);
}
.question-kp-picker {
  width: 100%;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}
.question-kp-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.question-kp-search {
  width: 100%;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 6px;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.question-kp-list {
  max-height: 168px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 6px;
}
.question-kp-option {
  border: 1px solid var(--line, #cbd2d9);
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.question-kp-option:hover { border-color: var(--brand, #2f855a); color: var(--brand, #2f855a); }
.question-kp-none { font-size: 12px; color: var(--muted, #627d98); }
.question-kp-custom {
  display: flex;
  gap: 8px;
  border-top: 1px dashed var(--line, #d9e2ec);
  padding-top: 8px;
}
.question-kp-custom input {
  flex: 1;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 6px;
}
.tag-info { background: #e3f2fd; color: #1565c0; }
.tag-success { background: #e6f4ea; color: #2f855a; }
.tag-warning { background: #fdf3e0; color: #b45309; }
.tag-danger { background: #fdecea; color: #c0392b; }

/* ===== v146 忽略 AI 建议（不入档） ===== */
.suggestion-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.suggestion-card.is-dismissed { opacity: .55; }
.suggestion-card.is-dismissed .suggestion-calibration { display: none; }
