:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #dde3ea;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --blue: #1d4ed8;
  --sidebar-width: 156px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: #102a2a;
  color: #eef6f6;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.userbox {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 9px;
  margin-bottom: 14px;
}
.userbox span { display: block; color: #b9caca; margin-top: 4px; font-size: 13px; }

nav { display: grid; gap: 6px; }
.sidebar-divider {
  border-top: 1px solid rgba(255,255,255,.18);
  margin: 8px 2px;
}
nav a, .ghost {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eef6f6;
  padding: 8px 9px;
  text-align: left;
  text-decoration: none;
  font-size: 13.5px;
}
nav a:hover, .ghost:hover { background: rgba(255,255,255,.1); }
.ghost { margin-top: 18px; cursor: pointer; }
.logout-form {
  margin: 10px 0 0;
}
.logout-form .ghost {
  margin-top: 0;
}

.app-version {
  margin-top: auto;
  padding: 14px 9px 0;
  color: #9fb7b7;
  font-size: 11.5px;
  line-height: 1.7;
}
.app-version span {
  display: block;
}

.main {
  margin-left: var(--sidebar-width);
  padding: 20px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-width));
  min-width: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
h1 { margin: 0; font-size: 24px; }
h2 { margin: 0 0 16px; font-size: 18px; }
.page-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel, .metrics > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.panel { padding: 18px; margin-bottom: 18px; overflow-x: auto; max-width: 100%; }
.narrow { max-width: 560px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metrics div { padding: 16px; }
.metrics span { color: var(--muted); font-size: 13px; }
.metrics strong { display: block; font-size: 28px; margin-top: 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 8px 7px;
  text-align: left;
  vertical-align: top;
}
th { background: #edf4f3; font-weight: 700; }

button, .link-button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .link-button:hover { background: var(--brand-dark); }
.link-button.secondary {
  background: #e7eff0;
  color: var(--brand-dark);
}
.link-button.secondary:hover { background: #d5e3e5; }
.link-button.small {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  font-size: 13px;
  white-space: nowrap;
}
.video-play-button {
  line-height: 1.2;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--text);
}
input[type="checkbox"] {
  width: auto;
  padding: 0;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.permission-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.permission-checks .inline-check {
  min-width: 110px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  background: #eef2ff;
  color: #373199;
}
.badge.pass { background: #dcfce7; color: #166534; }
.badge.pending { background: #fff7ed; color: #963512; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.neutral { background: #f1f5f9; color: #64748b; }
.badge.block-fit {
  display: table;
  margin-top: 5px;
}
.error { color: #b42318; }
.message { color: #047857; }
.empty {
  color: var(--muted);
  text-align: center;
}
.muted-line {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.system-actions {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.ab-test-controls {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 120px auto auto auto;
  gap: 12px;
  align-items: end;
}
.ab-force-check {
  align-self: center;
  margin-top: 18px;
}
.ab-test-metrics {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}
.ab-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
.ab-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.ab-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}
.ab-summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}
.risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ab-test-table-panel {
  overflow-x: auto;
}
.ab-test-table {
  min-width: 1480px;
}
.ab-test-table th:nth-child(1),
.ab-test-table td:nth-child(1) { width: 110px; }
.ab-test-table th:nth-child(3),
.ab-test-table td:nth-child(3) { width: 150px; }
.ab-test-table th:nth-child(5),
.ab-test-table td:nth-child(5),
.ab-test-table th:nth-child(6),
.ab-test-table td:nth-child(6) { width: 250px; }
.ab-test-table th:nth-child(7),
.ab-test-table td:nth-child(7),
.ab-test-table th:nth-child(8),
.ab-test-table td:nth-child(8) { width: 150px; }
.compact-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}
.app-homework-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.app-homework-note .muted-line {
  flex-basis: 100%;
  margin: 0;
}
.muted-inline {
  color: var(--muted);
  font-size: 12px;
}
.table-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.table-section-head h2 {
  margin-bottom: 0;
}
.app-homework-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
}
.app-homework-controls label {
  min-width: 180px;
}
.app-homework-controls.run-controls {
  margin-bottom: 0;
}
.app-homework-metrics {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.full-video-metrics {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.app-progress-panel {
  display: grid;
  gap: 10px;
}
.app-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}
.app-progress-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}
.app-progress-grid span,
.app-progress-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.app-progress-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  word-break: break-word;
}
.app-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}
.app-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}
.app-summary-grid span,
.app-summary-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.app-summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}
.app-homework-table-panel {
  overflow-x: auto;
}
.app-homework-table {
  min-width: 1660px;
  table-layout: fixed;
}
.full-video-table th:nth-child(1),
.full-video-table td:nth-child(1) { width: 130px; }
.full-video-table th:nth-child(2),
.full-video-table td:nth-child(2) { width: 175px; }
.full-video-table th:nth-child(3),
.full-video-table td:nth-child(3) { width: 115px; }
.full-video-table th:nth-child(4),
.full-video-table td:nth-child(4) { width: 150px; }
.full-video-table th:nth-child(5),
.full-video-table td:nth-child(5) { width: 155px; }
.full-video-table th:nth-child(6),
.full-video-table td:nth-child(6) { width: 170px; }
.full-video-table th:nth-child(7),
.full-video-table td:nth-child(7) { width: 165px; }
.full-video-table th:nth-child(8),
.full-video-table td:nth-child(8) { width: 240px; }
.full-video-table th:nth-child(9),
.full-video-table td:nth-child(9) { width: 230px; }
.full-video-table th:nth-child(10),
.full-video-table td:nth-child(10) { width: 160px; }
.app-keywords,
.app-asr-summary,
.app-match-cell {
  word-break: break-word;
}
.block {
  display: block;
}
.dedup-match {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.dedup-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  margin-right: 4px;
}
.nowrap {
  white-space: nowrap;
}
.system-actions form {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
}
.system-actions span {
  color: var(--muted);
  font-size: 13px;
}
.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.progress-head h2 {
  margin-bottom: 0;
}
.progress-head strong {
  color: var(--brand-dark);
  font-size: 20px;
}
.progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf0;
}
.progress-bar span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: var(--brand);
  transition: width .2s ease;
}
.progress-text {
  margin-top: 10px;
}
.log-tail {
  margin: 0;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  border-radius: 6px;
  background: #0f172a;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.5;
}
.subtle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.path-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
  flex: 1;
}
.group-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}
.row-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) auto;
  gap: 8px;
  align-items: center;
}
.wecom-student-form {
  margin: 0;
}
.wecom-mapping-table th,
.wecom-mapping-table td {
  vertical-align: middle;
}
.wecom-mapping-table th:first-child,
.wecom-mapping-table td:first-child {
  width: 150px;
  min-width: 150px;
}
.guardian-select {
  min-width: 180px;
}
.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}
.section-title {
  margin-top: 20px;
}
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.pending-assignment-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pending-assignment-table th,
.pending-assignment-table td {
  vertical-align: middle;
}
.pending-assignment-table th:nth-child(1),
.pending-assignment-table td:nth-child(1) {
  width: 150px;
  min-width: 150px;
}
.pending-assignment-table th:nth-child(4),
.pending-assignment-table td:nth-child(4) {
  width: 72px;
  min-width: 72px;
}
.pending-assignment-table th:nth-child(5),
.pending-assignment-table td:nth-child(5) {
  width: 180px;
  min-width: 180px;
}
.inline-save-form {
  margin: 0;
}
.checkbox-list {
  display: grid;
  gap: 8px;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}
.cycle-settings-table {
  table-layout: fixed;
  min-width: 1120px;
}
.cycle-settings-table th,
.cycle-settings-table td {
  padding: 7px 6px;
}
.cycle-settings-table td {
  vertical-align: middle;
}
.cycle-settings-table input,
.cycle-settings-table select {
  padding: 7px 8px;
}
.cycle-class-column { width: 9%; }
.cycle-group-column { width: 13%; }
.cycle-order-column { width: 5%; }
.cycle-lead-column { width: 14%; }
.cycle-textbook-column { width: 22%; }
.cycle-count-column { width: 7%; }
.cycle-time-column { width: 8%; }
.cycle-summary-column { width: 14%; }
.cycle-group-select {
  max-width: 100%;
  min-width: 0;
}
.cycle-edit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.cycle-settings-form .cycle-edit-only {
  display: none;
  width: 42px;
  min-width: 42px;
  text-align: center;
}
.cycle-settings-form.is-editing .cycle-edit-only {
  display: table-cell;
}
.cycle-settings-form:not(.is-editing) [data-cycle-editable="1"]:disabled {
  color: var(--text);
  background: #f8fafc;
  opacity: 1;
}
.row-remove-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #b42318;
  font-size: 20px;
  line-height: 1;
}
.row-remove-button:hover {
  background: #fee4e2;
}
.cycle-time-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}
.textbook-scope-cell {
  min-width: 240px;
}
.textbook-picker {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  min-width: 220px;
}
.textbook-option {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}
.textbook-option input {
  width: auto;
  flex: 0 0 auto;
}
.textbook-option span {
  overflow-wrap: anywhere;
}
.textbook-package-panel {
  margin-top: 4px;
}
.textbook-package-table td:first-child {
  font-weight: 600;
}
.job-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tabset,
.tab-panel {
  min-width: 0;
  max-width: 100%;
}

.ledger-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}
.ledger-table th,
.ledger-table td {
  max-width: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ledger-table th {
  line-height: 1.35;
}
.ledger-table .col-checkin-time { width: 5.3%; }
.ledger-table .col-task-title { width: 9.2%; }
.ledger-table .col-series { width: 4.2%; }
/* 指令21：A6.2 台账专用——内容类型窄、教材宽（A3 表沿用 col-task-title/col-series 不受影响） */
.ledger-table .col-content-type { width: 5.5%; }
.ledger-table .col-textbook { width: 18%; }
.ledger-table .col-audio-source { width: 4.2%; }
.ledger-table .col-duration { width: 6%; }
.ledger-table .col-screening { width: 11%; }
.ledger-table .col-info { width: 3.6%; }
.ledger-table .col-score { width: 3%; }
.ledger-table .col-status { width: 7%; }
.ledger-table .col-video { width: 4.2%; }
.ledger-table .col-action { width: 6.8%; }
.ledger-table .col-advice { width: 26.5%; }
.ledger-table td:nth-child(7),
.ledger-table td:nth-child(8),
.ledger-table td:nth-child(9),
.ledger-table td:nth-child(10),
.ledger-table td:nth-child(11) {
  text-align: center;
}
.screening-main {
  font-weight: 700;
  color: var(--text);
}
.ledger-table .duration-cell {
  line-height: 1.45;
  white-space: nowrap;
}
.screening-details {
  margin-top: 5px;
}
.screening-details summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}
.screening-details .subtle {
  margin-top: 5px;
}
.info-cell {
  color: var(--brand-dark);
  font-weight: 700;
}
.advice-cell {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.65;
}
.ledger-table .subtle {
  word-break: normal;
  overflow-wrap: anywhere;
}
.ledger-table .inline-save-form {
  margin-bottom: 5px;
}
.ledger-table .job-status {
  max-width: 86px;
  line-height: 1.4;
}
.ledger-table .link-button.small {
  white-space: normal;
  justify-content: center;
  text-align: center;
}
.ledger-table .status-select {
  max-width: 100%;
}
.status-form {
  margin: 0;
}
.status-select {
  width: 86px;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  border: 0;
  cursor: pointer;
}
.status-select.pass {
  background: #dcfce7;
  color: #166534;
}
.status-select.pending {
  background: #fff7ed;
  color: #963512;
}
.history-panel {
  overflow-x: hidden;
}
.history-table-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.history-table {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}
.history-table th,
.history-table td {
  vertical-align: middle;
}
.history-table tbody tr {
  min-height: 82px;
}
.history-table tbody td {
  height: 82px;
}
.history-student-col {
  width: 136px;
  min-width: 136px;
}
.history-chart-col {
  width: 216px;
  min-width: 216px;
  max-width: none;
}
.history-period-col {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}
.history-period-col span,
.history-period-col small {
  display: block;
}
.history-period-col small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.3;
}
.history-total-col {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center;
}
.history-student-name {
  font-weight: 700;
}
.history-bars {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  height: 58px;
  width: auto;
  min-width: 200px;
  max-width: none;
  padding: 4px 0;
}
.history-bar {
  flex: 0 0 8px;
  width: 8px;
  border-radius: 4px 4px 2px 2px;
  background: var(--brand);
}
.history-bar.empty {
  background: #fbbf24;
  opacity: .55;
}
.history-count-cell {
  text-align: center;
  font-weight: 700;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding-left: 4px;
  padding-right: 4px;
}
.history-count-cell.zero-cell {
  background: #fef3c7;
  color: #92400e;
}
.history-count-cell.total-cell {
  background: #f8fafc;
  color: var(--brand-dark);
}
.history-reply-tag {
  display: inline-block;
  margin-top: 4px;
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.history-reply-tag.replied {
  background: #dcfce7;
  color: #166534;
}
.history-reply-tag.missing {
  background: #fee2e2;
  color: #991b1b;
}
.history-reply-tag.need-confirm {
  background: #fef3c7;
  color: #92400e;
}
.bulk-textbook-form {
  margin: 0;
}
.page-actions {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
}
.status-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.log-block {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f172a;
  color: #d1e7e7;
  padding: 12px;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: auto;
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--brand-dark); }

.tabs-panel {
  padding-top: 12px;
  overflow-x: hidden;
}
.tabset {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
  overflow-x: hidden;
}
.tabset > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tabset > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 8px 12px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
}
.tabset > label .class-tab-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}
.tabset > label .class-tab-name,
.tabset > label .class-tab-lead {
  min-width: 0;
  overflow-wrap: anywhere;
}
.tabset > label .class-tab-lead {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.tabset > label > span:not(.class-tab-title) {
  min-width: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--muted);
  padding: 2px 7px;
  text-align: center;
  font-size: 12px;
}
.tabset > input:checked + label {
  border-color: var(--brand);
  background: #e8f3f2;
  color: var(--brand-dark);
  font-weight: 700;
}
.tabset > input:checked + label .class-tab-lead {
  color: #4d6b70;
}
.tabset > input:checked + label > span:not(.class-tab-title) {
  background: var(--brand);
  color: #fff;
}
.tab-panel {
  display: none;
  order: 2;
  width: 100%;
  overflow-x: hidden;
}
.tabset > input:checked + label + .tab-panel { display: block; }

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px;
}
.login-panel {
  width: min(420px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(16,24,40,.12);
}
.login-panel h1 { font-size: 24px; margin-bottom: 4px; }
.login-footer { margin-top: 0; padding-top: 0; }

.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.open { display: flex; }
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .72);
}
.video-modal-panel {
  position: relative;
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  background: #0f172a;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .32);
  overflow: hidden;
}
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
}
.ghost-light {
  border: 1px solid rgba(255,255,255,.32);
  background: transparent;
  color: #fff;
  padding: 7px 11px;
}
.ghost-light:hover { background: rgba(255,255,255,.12); }
.video-modal video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  background: #000;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.compact-table {
  width: 100%;
  min-width: 920px;
}
.compact-table th,
.compact-table td {
  font-size: 13px;
  line-height: 1.45;
}
.truth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}
.truth-rows td,
.temp-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.temp-metrics {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.temp-note {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 13px;
}
.temp-section {
  overflow-x: hidden;
}
.temp-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.temp-section-head h2 {
  margin-bottom: 4px;
}
.temp-table {
  min-width: 1180px;
}
.temp-table th:nth-child(1),
.temp-table td:nth-child(1) {
  width: 68px;
}
.temp-table th:nth-child(5),
.temp-table td:nth-child(5) {
  width: 58px;
}
.temp-textbook {
  min-width: 220px;
  max-width: 340px;
}
.temp-details-table {
  margin-top: 12px;
}
.temp-section summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 700;
}
.temp-diff-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  background: #fff;
}
.temp-diff-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.temp-diff-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.temp-compare-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
}
.temp-compare-table th,
.temp-compare-table td {
  border-top: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.temp-compare-table thead th {
  border-top: 0;
  background: #eef6f5;
  color: #334155;
  font-weight: 700;
}
.temp-compare-table tbody th {
  width: 132px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}
.temp-compare-table thead th:first-child {
  width: 132px;
}
.temp-compare-table tbody tr.changed th,
.temp-compare-table tbody tr.changed td {
  background: #fff7ed;
}
.temp-detail-toggle {
  margin-top: 10px;
  border-top: 1px dashed #d8e2ea;
  padding-top: 8px;
}
.temp-detail-toggle summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 700;
  width: fit-content;
}
.temp-detail-toggle .temp-compare-table {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }
  .main { margin-left: 0; padding: 16px; max-width: none; }
  .metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .truth-grid,
  .temp-metrics {
    grid-template-columns: 1fr;
  }
  .temp-diff-head {
    display: block;
  }
  .temp-diff-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }
  .temp-compare-table {
    font-size: 12px;
  }
  .temp-compare-table th,
  .temp-compare-table td {
    padding: 7px 8px;
  }
  .temp-compare-table tbody th,
  .temp-compare-table thead th:first-child {
    width: 88px;
  }
  .status-grid { grid-template-columns: 1fr; }
  .grid-form { grid-template-columns: 1fr; }
  .page-header {
    display: block;
  }
  .page-header .link-button {
    display: inline-block;
    margin-top: 12px;
  }
}

/* 测试方案对比页（A6.2 vs A6.3 并排） */
.compare-summary { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.compare-stat { display: flex; flex-direction: column; line-height: 1.3; }
.compare-stat .k { font-size: 12px; color: #6b7280; }
.compare-stat .v { font-size: 20px; font-weight: 600; }
.compare-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.compare-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.compare-head .who strong { font-size: 15px; }
.compare-head .who .muted-line { margin-left: 8px; }
.compare-head .scoreline { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.score-diff { font-weight: 600; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; }
.score-diff.up { background: #dcfce7; color: #166534; }
.score-diff.down { background: #ffedd5; color: #9a3412; }
.compare-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.badge.follow { background: #fde68a; color: #92400e; }
.compare-col { border: 1px solid #eef0f3; border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.compare-col .col-title { font-weight: 600; font-size: 13px; color: #334155; margin-bottom: 6px; }
.compare-col .kv { font-size: 13px; margin: 2px 0; }
.compare-col .kv.small { color: #6b7280; font-size: 12px; }
.compare-col .kv .mismatch { color: #b91c1c; font-weight: 600; }
.compare-col .asr { margin-top: 8px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto; color: #1f2937; }
@media (max-width: 900px) { .compare-cols { grid-template-columns: 1fr; } }

/* 指令31：通过标准 4 阈值横向并排（窄屏自动换行不塌） */
.pass-thresholds-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 12px; }
.pass-thresholds-row label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pass-thresholds-row input { width: 5em; }

/* 指令32：班级信息设置-主班老师多选 */
.lead-teacher-picker { display: flex; flex-direction: column; gap: 3px; max-height: 108px; overflow-y: auto; min-width: 140px; }
.lead-teacher-option { display: flex; align-items: center; gap: 5px; color: var(--text); font-size: 13px; white-space: nowrap; }
.lead-teacher-option input { width: auto; }
