:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 251, 245, 0.94);
  --text: #1d2530;
  --muted: #667084;
  --line: rgba(23, 32, 49, 0.12);
  --gold: #cb8a1f;
  --red: #cf4b3f;
  --blue: #2f6bd9;
  --ink: #233246;
  --shadow: 0 18px 44px rgba(27, 39, 55, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(207, 75, 63, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(47, 107, 217, 0.12), transparent 28%),
    linear-gradient(180deg, #fcfaf6 0%, var(--bg) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px;
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.tool-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 70, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.tool-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--blue));
  border-color: transparent;
}

.panel,
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
}

.hero-text,
.panel-head p,
.status-line {
  line-height: 1.7;
  color: var(--muted);
}

.hero-text {
  max-width: 880px;
  margin: 16px 0 0;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.source-pill {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(203, 138, 31, 0.1);
  border: 1px solid rgba(203, 138, 31, 0.24);
  color: #8a5910;
  font-weight: 700;
}

.source-pill.muted {
  background: rgba(35, 50, 70, 0.06);
  border-color: rgba(35, 50, 70, 0.14);
  color: var(--muted);
}

.panel {
  margin-top: 22px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.filter-form,
.stats-grid,
.city-summary-grid,
.city-summary-metrics {
  display: grid;
  gap: 16px;
}

.filter-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.span-2 {
  grid-column: span 2;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auto-login-card {
  justify-content: center;
  padding: 16px 18px;
  border: 1px solid rgba(47, 107, 217, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(47, 107, 217, 0.08), rgba(207, 75, 63, 0.08));
}

.auto-login-copy {
  display: grid;
  gap: 6px;
}

.auto-login-copy strong {
  color: var(--ink);
  font-size: 1rem;
}

.auto-login-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.field span {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(35, 50, 70, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

textarea {
  resize: vertical;
  min-height: 74px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(47, 107, 217, 0.18);
  border-color: rgba(47, 107, 217, 0.36);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--blue));
}

.ghost-button {
  color: var(--ink);
  background: rgba(35, 50, 70, 0.07);
}

.ghost-button:disabled {
  cursor: not-allowed;
  color: rgba(29, 37, 48, 0.4);
}

.city-toggle-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.city-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.city-toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.city-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(35, 50, 70, 0.07);
  color: var(--ink);
}

.city-toggle input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, #d35a4f, #405ec7);
}

.status-line {
  min-height: 28px;
  margin-top: 16px;
}

.status-line[data-state="loading"] {
  color: #9b6516;
}

.status-line[data-state="success"] {
  color: #1f7a52;
}

.status-line[data-state="error"] {
  color: #b43e36;
}

.warning-panel {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(203, 138, 31, 0.18);
  background: rgba(255, 244, 216, 0.88);
}

.warning-panel strong {
  display: block;
  margin-bottom: 8px;
}

.warning-list {
  margin: 0;
  padding-left: 20px;
  color: #8a5910;
  line-height: 1.7;
}

.is-hidden {
  display: none;
}

.stats-grid {
  margin-top: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.city-summary-grid {
  margin-top: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.city-summary-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
}

.stat-label {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-value {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.accent-gold {
  border-color: rgba(203, 138, 31, 0.22);
}

.accent-red {
  border-color: rgba(207, 75, 63, 0.22);
}

.accent-blue {
  border-color: rgba(47, 107, 217, 0.22);
}

.accent-ink {
  border-color: rgba(35, 50, 70, 0.22);
}

.accent-emerald {
  border-color: rgba(34, 139, 94, 0.22);
}

.accent-slate {
  border-color: rgba(88, 104, 125, 0.22);
}

.city-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.city-summary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.city-summary-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.city-summary-metrics strong {
  font-size: 1.1rem;
}

.city-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

.city-badge[data-city="上海"] {
  background: linear-gradient(135deg, #d15a4d, #c23a2f);
}

.city-badge[data-city="北京"] {
  background: linear-gradient(135deg, #4d76e2, #2b5ac2);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(35, 50, 70, 0.1);
  vertical-align: middle;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  background: rgba(35, 50, 70, 0.04);
}

.data-table tbody tr:hover {
  background: rgba(35, 50, 70, 0.04);
}

.assessment-table {
  min-width: 1420px;
}

.assessment-table thead th {
  text-align: center;
  vertical-align: middle;
}

.assessment-table thead th[colspan="3"] {
  background: rgba(221, 235, 247, 0.9);
}

.assessment-table thead tr:first-child th:nth-child(9) {
  background: rgba(255, 242, 204, 0.9);
}

.assessment-table thead tr:first-child th:nth-child(11) {
  background: rgba(255, 242, 204, 0.9);
}

.total-score-cell {
  background: rgba(255, 242, 204, 0.85);
  font-weight: 800;
}

.status-cell {
  min-width: 170px;
}

.status-cell.status-warning {
  background: rgba(255, 242, 204, 0.82);
}

.status-cell.status-danger {
  background: rgba(244, 204, 204, 0.82);
}

.status-cell.status-up {
  background: rgba(225, 239, 224, 0.78);
}

.status-cell.status-default {
  background: rgba(255, 249, 229, 0.78);
}

.before-adjustment-cell {
  background: rgba(221, 235, 247, 0.72);
}

.after-adjustment-cell {
  background: rgba(252, 228, 214, 0.72);
}

.table-select,
.table-input {
  border-radius: 12px;
  border: 1px solid rgba(35, 50, 70, 0.12);
  background: rgba(255, 255, 255, 0.94);
  padding: 9px 10px;
  min-width: 100%;
}

.school-list-cell {
  min-width: 240px;
  color: var(--muted);
}

.supervision-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supervision-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 70, 0.12);
  background: rgba(35, 50, 70, 0.05);
  color: var(--ink);
  font-weight: 700;
}

.filter-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.supervision-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.supervision-school-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supervision-summary-table {
  min-width: 920px;
}

.supervision-detail-table {
  min-width: 1680px;
}

.supervision-class-cell {
  min-width: 180px;
}

.supervision-feedback-cell {
  min-width: 320px;
  line-height: 1.65;
}

.empty-summary-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--muted);
  text-align: center;
}

.table-note-strong {
  font-weight: 700;
}

.table-note-muted {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge[data-status="verified-missing"] {
  color: #0f6a42;
  background: rgba(34, 139, 94, 0.14);
}

.status-badge[data-status="already-reviewed"] {
  color: #8a5c0d;
  background: rgba(203, 138, 31, 0.16);
}

.status-badge[data-status="teacher-no-schedule"],
.status-badge[data-status="student-not-found"],
.status-badge[data-status="missing-school"] {
  color: #b43e36;
  background: rgba(207, 75, 63, 0.14);
}

.status-badge[data-status="duplicate-report"],
.status-badge[data-status="multiple-candidates"] {
  color: #3551b5;
  background: rgba(47, 107, 217, 0.14);
}

.empty-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 28px 12px !important;
}

@media (max-width: 1180px) {
  .filter-form,
  .stats-grid,
  .city-summary-grid,
  .city-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: span 2;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-side {
    align-items: flex-start;
  }

  .supervision-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px;
  }

  .panel,
  .hero-card {
    padding: 18px;
    border-radius: 24px;
  }

  .filter-form,
  .stats-grid,
  .city-summary-grid,
  .city-summary-metrics {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .button-row {
    flex-direction: column;
  }

  .supervision-toolbar {
    align-items: stretch;
  }

  .filter-toggle {
    justify-content: center;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .tool-nav-link {
    width: 100%;
  }

  .supervision-stats-grid {
    grid-template-columns: 1fr;
  }
}
