:root {
  --bg: #eef2ed;
  --card: #fbfcf8;
  --ink: #1c2b2f;
  --muted: #5b6a70;
  --line: #d9dfd2;
  --accent: #155e75;
  --accent-2: #0f766e;
  --danger: #a11d33;
  --sidebar-top: #173748;
  --sidebar-bottom: #245873;
  --shadow: 0 12px 28px rgba(24, 43, 47, 0.08);
  --sidebar-width: 320px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% 0%, #fff2c9 0%, transparent 68%),
    linear-gradient(180deg, #f4f7f1 0%, #e8efea 100%);
}

a {
  color: inherit;
}

.admin-page {
  position: relative;
}

.admin-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 32, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 18;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.24s ease;
  align-items: start;
}

.admin-page.sidebar-collapsed .admin-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

.admin-sidebar {
  min-height: 100vh;
  padding: 28px 22px 28px 28px;
  color: #fff;
  background:
    radial-gradient(480px 360px at 0% 0%, rgba(255, 225, 147, 0.18), transparent 66%),
    linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom));
  overflow-y: auto;
  transition: transform 0.24s ease, opacity 0.24s ease, visibility 0.24s ease;
}

.admin-page.sidebar-collapsed .admin-sidebar {
  transform: translateX(calc(-1 * var(--sidebar-width)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar-head {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-sidebar h1,
.main-hero h1,
.hero-panel h2,
.panel h2,
.login-card h1 {
  margin: 0;
}

.sidebar-text,
.muted {
  color: var(--muted);
}

.admin-sidebar .sidebar-text,
.login-card .muted {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.nav-tab-btn {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 14px 16px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.nav-tab-btn span {
  font-size: 15px;
  font-weight: 700;
}

.nav-tab-btn small {
  color: rgba(255, 255, 255, 0.72);
}

.nav-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 24px rgba(4, 20, 31, 0.18);
}

.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.admin-sidebar .panel {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.admin-sidebar .panel h2 {
  font-size: 16px;
}

.admin-sidebar .quick-links a {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-panel.compact {
  margin-top: 18px;
}

.admin-content,
.main-shell {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.admin-content {
  min-width: 0;
  align-content: start;
}

.main-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px;
}

.main-hero,
.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.main-shell .main-hero {
  padding: 30px 30px 24px;
  border: 1px solid rgba(21, 94, 117, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(620px 240px at 3% -8%, rgba(255, 237, 172, 0.6), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 248, 0.92));
  box-shadow: 0 16px 34px rgba(19, 40, 53, 0.08);
}

.main-shell .main-hero .muted {
  margin-top: 12px;
  max-width: 760px;
  line-height: 1.7;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.hero-actions,
.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions a,
.quick-links a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  text-decoration: none;
}

.main-shell .hero-actions {
  gap: 12px;
}

.main-shell .hero-actions a {
  border: 1px solid rgba(20, 84, 103, 0.18);
  background: #fff;
  color: #133a4a;
  font-weight: 600;
}

.rating-dashboard-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 16px;
}

.rating-dashboard-links button {
  min-width: 72px;
  border-radius: 999px;
  border: 1px solid rgba(21, 94, 117, 0.18);
  background: #fff;
  color: #155e75;
  font-weight: 700;
}

.rating-dashboard-links button:hover,
.rating-dashboard-links button:focus-visible {
  background: #155e75;
  color: #fff;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.main-shell .panel {
  border-color: rgba(26, 77, 96, 0.12);
  min-width: 0;
}

.panel > .eyebrow + h2 {
  margin-top: 8px;
}

.panel > h2 + .muted,
.panel > .section-head + .muted {
  margin-top: 10px;
}

.hero-panel {
  position: relative;
}

.admin-header {
  align-items: stretch;
}

.admin-header pre {
  flex: 0 1 420px;
}

.compact {
  margin-top: 18px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #3a7a8e;
}

.admin-sidebar .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.field-list,
.field-row,
.section-head,
.stack-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.field-list {
  flex-direction: column;
}

.section-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 14px;
}

.stack-list {
  flex-direction: column;
}

.stack-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
  border: 1px solid var(--line);
}

.stack-item strong,
.stack-item p {
  display: block;
  margin: 0;
}

.stack-item p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

input,
select,
button {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 14px;
  background: #fff;
  font: inherit;
}

input,
select {
  flex: 1 1 180px;
  min-width: 0;
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(21, 94, 117, 0.18);
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.secondary:hover {
  box-shadow: 0 8px 18px rgba(24, 43, 47, 0.08);
}

button.danger {
  background: linear-gradient(135deg, #8d1830, var(--danger));
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 16px 28px rgba(20, 43, 54, 0.18);
  transition: left 0.2s ease, top 0.2s ease;
}

pre {
  margin: 0;
  min-width: 280px;
  max-width: 520px;
  background: #10202a;
  color: #d9fbf4;
  border-radius: 18px;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

.import-progress-modal {
  display: grid;
  margin-top: 8px;
}

.import-progress-modal[hidden] {
  display: none !important;
}

.import-progress-dialog {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(21, 94, 117, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: 0 16px 30px rgba(13, 37, 48, 0.1);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.import-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.import-progress-head h3 {
  margin: 0;
  font-size: 18px;
}

.import-progress-close {
  min-width: 88px;
}

.import-progress-step {
  margin: 0;
  font-weight: 700;
  color: #1f4657;
}

.import-progress-message {
  margin: 0;
  color: #465a63;
  line-height: 1.55;
}

.import-progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5edf1;
}

.import-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f7090, #0f766e);
  transition: width 0.24s ease;
}

.import-progress-modal[data-state="success"] .import-progress-fill {
  background: linear-gradient(90deg, #1b8f3d, #31b35b);
}

.import-progress-modal[data-state="failed"] .import-progress-fill {
  background: linear-gradient(90deg, #ae1f35, #d74a5f);
}

.import-progress-detail {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  max-height: min(35vh, 300px);
  border-radius: 12px;
  padding: 10px 12px;
  background: #11242f;
  color: #d9fbf4;
  overflow: auto;
}

.grid {
  display: grid;
  gap: 20px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.main-shell .two-col {
  align-items: start;
}

.main-shell .analysis-panels {
  grid-template-columns: 1fr;
  gap: 18px;
}

.single-school-dashboard {
  display: grid;
  gap: 22px;
}

.single-school-dashboard[hidden] {
  display: none !important;
}

.radar-panel[hidden] {
  display: none !important;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.radar-stage-wrap {
  min-width: 0;
}

.radar-stage {
  position: relative;
  min-height: clamp(430px, 58vw, 520px);
  padding: 14px 12px 18px;
  border-radius: 22px;
  border: 1px solid rgba(21, 94, 117, 0.14);
  background:
    radial-gradient(380px 160px at 50% 0%, rgba(255, 238, 184, 0.48), transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  overflow: hidden;
}

.radar-chart-wrap {
  position: relative;
  width: min(100%, 380px);
  margin: 16px auto 8px;
}

.radar-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
}

.radar-ring {
  fill: rgba(19, 116, 108, 0.03);
  stroke: rgba(21, 94, 117, 0.12);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(21, 94, 117, 0.12);
  stroke-width: 1;
}

.radar-scale-label {
  fill: #6b7e87;
  font-size: 11px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2px;
}

.radar-scale-label--compact {
  font-size: 9px;
  stroke-width: 1.5px;
}

.radar-shape {
  fill: rgba(21, 94, 117, 0.18);
  stroke: #155e75;
  stroke-width: 2;
}

.radar-shape-benchmark {
  fill: rgba(107, 114, 128, 0.12);
  stroke: rgba(107, 114, 128, 0.75);
  stroke-width: 1.5;
}

.radar-dot {
  fill: #0f766e;
  stroke: #fff;
  stroke-width: 2;
}

.radar-dot-benchmark {
  fill: #6b7280;
  stroke: #ffffff;
  stroke-width: 1.5;
  opacity: 0.9;
}

.radar-legend,
.board-radar-hover-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 10px 12px;
  color: #55656d;
  font-size: 11px;
}

.radar-legend span,
.board-radar-hover-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-legend .swatch,
.board-radar-hover-legend .swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.radar-legend .swatch.current,
.board-radar-hover-legend .swatch.current {
  background: rgba(21, 94, 117, 0.3);
  border: 1px solid #155e75;
}

.radar-legend .swatch.benchmark,
.board-radar-hover-legend .swatch.benchmark {
  background: rgba(107, 114, 128, 0.18);
  border: 1px solid rgba(107, 114, 128, 0.72);
}

.radar-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radar-label,
.radar-summary-item {
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(21, 94, 117, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #123e4d;
  box-shadow: 0 8px 18px rgba(21, 94, 117, 0.08);
}

.radar-label:hover,
.radar-label:focus,
.radar-summary-item:hover,
.radar-summary-item:focus {
  transform: none;
  box-shadow: 0 10px 20px rgba(21, 94, 117, 0.12);
}

.radar-label.is-active,
.radar-summary-item.is-active {
  border-color: #155e75;
  background: #eef7fa;
}

.radar-label span,
.radar-summary-item span {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.radar-label strong,
.radar-summary-item strong {
  font-size: 16px;
  line-height: 1;
}

.radar-label strong.delta-up,
.board-radar-mini-label strong.delta-up {
  color: #cf2b2b;
}

.radar-label strong.delta-down,
.board-radar-mini-label strong.delta-down {
  color: #1f8a43;
}

.radar-label {
  position: absolute;
  width: clamp(84px, 22vw, 108px);
  right: auto;
  bottom: auto;
}

.radar-label--top {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-label--top-right {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-label--bottom-right {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-label--bottom {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-label--bottom-left {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-label--top-left {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.radar-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.radar-detail {
  min-width: 0;
}

.radar-detail-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(21, 94, 117, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.radar-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.radar-detail-copy,
.radar-detail-rule {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.radar-detail-rule {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f2f7f5;
}

.radar-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: #155e75;
  color: #fff;
  font-weight: 700;
}

.radar-detail-metrics {
  display: grid;
  gap: 10px;
}

.radar-metric-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dde7e2;
  background: #fff;
}

.radar-metric-head,
.radar-metric-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.radar-metric-head span,
.radar-metric-meta span {
  color: var(--muted);
  font-size: 12px;
}

.radar-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.radar-summary-item {
  width: 100%;
}

.radar-weight-shell {
  display: grid;
  gap: 16px;
}

.radar-profile-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radar-profile-btn {
  min-width: 68px;
  border-radius: 999px;
}

.radar-profile-btn.is-active {
  background: linear-gradient(135deg, #1b6f88, #0f766e);
}

.radar-weight-toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.radar-weight-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.radar-weight-card {
  display: grid;
  gap: 14px;
}

.radar-weight-head h3 {
  margin: 0 0 6px;
}

.radar-weight-head p,
.radar-weight-head small {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.radar-weight-metrics {
  display: grid;
  gap: 10px;
}

.radar-weight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
}

.radar-weight-label {
  display: grid;
  gap: 3px;
}

.radar-weight-label small {
  color: var(--muted);
}

.main-shell .analysis-card {
  padding: 20px 20px 16px;
  border-radius: 20px;
  border: 1px solid rgba(21, 94, 117, 0.14);
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(255, 241, 195, 0.36), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.main-shell .analysis-card h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.dashboard-kpi-grid .kpi-card {
  border: 1px solid rgba(21, 94, 117, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 247, 0.96));
  box-shadow: 0 10px 22px rgba(20, 52, 64, 0.08);
}

.dashboard-kpi-grid .metric-main {
  letter-spacing: -0.01em;
}

.main-shell .two-col > .panel {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.main-shell #gradesTable,
.main-shell #coursesTable {
  min-width: 0;
}

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

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workflow-step,
.kpi-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f4faf7 100%);
  box-shadow: var(--shadow);
}

.workflow-step strong,
.workflow-step p {
  display: block;
  margin: 8px 0 0;
}

.workflow-step p {
  color: var(--muted);
  line-height: 1.6;
}

.step-index {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #3a7a8e;
}

.tab-section-wrap {
  display: grid;
  gap: 22px;
}

.tab-section {
  display: none;
  gap: 20px;
}

.tab-section.is-active {
  display: grid;
}

.tab-section .panel + .panel {
  margin-top: 2px;
}

.panel-note {
  padding-bottom: 18px;
}

.upload-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.export-panels {
  align-items: start;
}

.export-entry-panel {
  border-color: rgba(21, 94, 117, 0.16);
}

.upload-panel p {
  margin: 0;
}

.field-row {
  align-items: center;
}

.main-shell .panel:first-of-type .field-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(220px, 1fr) auto auto;
  gap: 14px;
}

.main-shell .panel:first-of-type .field-row > * {
  width: 100%;
}

.board-filters {
  grid-template-columns: minmax(180px, 0.95fr) minmax(220px, 1.25fr) minmax(150px, 0.8fr) auto auto auto !important;
}

.main-shell #loadBtn,
.main-shell #singleExportBtn,
.main-shell #boardRefreshBtn,
.main-shell #boardExportBtn {
  min-width: 132px;
}

.main-shell #batchTime {
  margin-top: 14px;
}

.field-row > button {
  flex: 0 0 auto;
  min-width: 122px;
  white-space: nowrap;
}

.field-row > input[type="file"] {
  flex: 1 1 100%;
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #41525a;
  white-space: nowrap;
}

.compare-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  min-height: 0;
}

.text-link-btn {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  font-weight: 700;
}

.text-link-btn:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
  text-decoration: underline;
}

.board-school-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #b9cdd6;
  background: #f7fbfd;
  color: #114e63;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  cursor: pointer;
}

.board-school-btn:hover {
  transform: none;
  box-shadow: none;
  background: #eaf5f9;
}

.board-radar-hover {
  position: absolute;
  z-index: 60;
  width: min(360px, calc(100vw - 20px));
  border-radius: 16px;
  border: 1px solid rgba(21, 94, 117, 0.2);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(18, 41, 51, 0.2);
  padding: 10px;
  pointer-events: none;
  transition: none;
  animation: none;
}

.board-radar-hover[hidden] {
  display: none !important;
}

.board-radar-hover.loading {
  pointer-events: none;
}

.board-radar-hover-body {
  display: grid;
  gap: 8px;
  animation: none;
}

.board-radar-hover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.board-radar-hover-head strong {
  font-size: 13px;
  line-height: 1.2;
  color: #143f4e;
}

.board-radar-hover-head span {
  font-size: 11px;
  color: #687b84;
}

.board-radar-hover-stage {
  border: 1px solid rgba(21, 94, 117, 0.14);
  border-radius: 12px;
  background:
    radial-gradient(220px 110px at 50% 0%, rgba(255, 238, 184, 0.4), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  padding: 8px 8px 6px;
}

.board-radar-hover-layout {
  position: relative;
  width: 240px;
  max-width: 100%;
  margin: 0 auto;
}

.board-radar-hover-svg {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}

.board-radar-hover-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.board-radar-mini-label {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 76px;
  min-height: 34px;
  padding: 3px 4px;
  border: 1px solid rgba(21, 94, 117, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(15, 57, 71, 0.08);
}

.board-radar-mini-label span {
  font-size: 9px;
  line-height: 1.15;
  color: #5a6d75;
  text-align: center;
}

.board-radar-mini-label strong {
  font-size: 11px;
  line-height: 1;
  color: #134857;
  font-variant-numeric: tabular-nums;
}

.panel .section-head + .field-row {
  margin-top: 6px;
}

.panel .field-row + .field-row {
  margin-top: 10px;
}

.panel .field-row + #schoolsTable,
.panel .field-row + #sourcesTable,
.panel .field-row + #batchesTable {
  margin-top: 14px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.metric-cell {
  display: grid;
  gap: 8px;
}

.metric-cell.compact {
  gap: 5px;
}

.metric-main,
.metric-text {
  display: block;
  min-height: 16px;
  line-height: 1.35;
}

.metric-compare-inline {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 16px;
  align-items: center;
}

.metric-compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metric-compare-chip b {
  font-weight: 700;
  color: #7a8695;
}

.metric-compare-chip.up {
  color: #d92d20;
}

.metric-compare-chip.dn {
  color: #2f9e44;
}

.metric-compare-chip.na {
  color: #7d8c93;
}

.kpi-card .metric-main {
  font-size: 34px;
  line-height: 1.15;
}

.metric-rating-average {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #eef1f2;
  color: #738187;
  font-size: 11px;
  line-height: 1.2;
}

.metric-rating-average span {
  color: #7b888e;
  font-size: 11px;
}

.metric-rating-average b {
  color: #5b696f;
  font-weight: 700;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #dbe2d6;
  background: #fff;
}

.main-shell #gradesTable .table-scroll,
.main-shell #boardTable .table-scroll,
.main-shell #coursesTable .table-scroll {
  max-height: min(70vh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
}

.main-shell #gradesTable thead th,
.main-shell #boardTable thead th,
.main-shell #coursesTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.main-shell #gradesTable th,
.main-shell #gradesTable td,
.main-shell #boardTable th,
.main-shell #boardTable td,
.main-shell #coursesTable th,
.main-shell #coursesTable td {
  text-align: center;
  vertical-align: middle;
}

.main-shell #gradesTable .metric-cell,
.main-shell #boardTable .metric-cell,
.main-shell #coursesTable .metric-cell {
  justify-items: center;
}

.main-shell #gradesTable .metric-main,
.main-shell #boardTable .metric-main,
.main-shell #coursesTable .metric-main,
.main-shell #gradesTable .metric-text,
.main-shell #boardTable .metric-text,
.main-shell #coursesTable .metric-text {
  font-size: 12px;
  line-height: 1.2;
}

.main-shell #gradesTable .metric-compare-inline,
.main-shell #boardTable .metric-compare-inline,
.main-shell #coursesTable .metric-compare-inline {
  justify-content: center;
}

.main-shell #gradesTable .metric-compare-chip b,
.main-shell #boardTable .metric-compare-chip b,
.main-shell #coursesTable .metric-compare-chip b {
  display: none;
}

.main-shell #gradesTable .metric-text,
.main-shell #boardTable .metric-text,
.main-shell #coursesTable .metric-text {
  text-align: center;
}

.main-shell #gradesTable .th-with-sort,
.main-shell #boardTable .th-with-sort,
.main-shell #coursesTable .th-with-sort {
  justify-content: center;
}

.main-shell #boardTable table {
  min-width: 980px;
}

.main-shell #boardTable th.board-col-school {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #f7faf6;
  min-width: 150px;
  box-shadow: 2px 0 0 rgba(21, 94, 117, 0.08);
}

.main-shell #boardTable td.board-col-school {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 150px;
  box-shadow: 2px 0 0 rgba(21, 94, 117, 0.08);
}

.main-shell #boardTable tr.board-rating-summary-row td {
  background: #fff8df;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(146, 64, 14, 0.18);
}

.main-shell #boardTable tr.board-rating-summary-row td.board-col-school {
  background: #fff1c2;
}

.board-rating-summary-label {
  color: #92400e;
  font-weight: 800;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #f7faf6;
}

.th-with-sort {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.th-label {
  line-height: 1.15;
  text-align: center;
}

.th-sort-group {
  display: inline-flex;
  gap: 4px;
}

.sort-mini-btn {
  min-height: 20px;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid #c5d2d8;
  background: #eef3f5;
  color: #5a6a73;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.sort-mini-btn:hover {
  background: #e2ecef;
  box-shadow: none;
  transform: none;
}

.sort-mini-btn.active {
  border-color: #35748d;
  color: #12485d;
  background: #d7e8ef;
}

.sort-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  line-height: 0;
}

.sort-arrow.up {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
}

.sort-arrow.down {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
}

.sort-arrow.neutral {
  position: relative;
  width: 8px;
  height: 12px;
}

.sort-arrow.neutral::before,
.sort-arrow.neutral::after {
  content: "";
  position: absolute;
  left: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.sort-arrow.neutral::before {
  top: 0;
  border-bottom: 5px solid currentColor;
}

.sort-arrow.neutral::after {
  bottom: 0;
  border-top: 5px solid currentColor;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.empty {
  padding: 16px;
  border-radius: 14px;
  background: #f2f5f2;
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(460px, calc(100vw - 32px));
}

.login-card {
  padding: 28px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(160deg, #173748, #245873);
  box-shadow: 0 24px 48px rgba(18, 34, 46, 0.24);
}

.login-card .field-list {
  margin-top: 20px;
}

.login-card input,
.login-card button {
  width: 100%;
}

.school-manage-shell {
  max-width: 1360px;
  padding-top: 22px;
}

.school-manage-header {
  align-items: center;
}

.school-manage-header .actions {
  justify-content: flex-end;
}

.school-semester-table input {
  width: 100%;
  min-width: 120px;
}

@media (max-width: 1280px) {
  .main-shell .two-col {
    grid-template-columns: 1fr;
  }

  .radar-layout,
  .radar-weight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .three-col,
  .kpi-grid,
  .workflow-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-shell .panel:first-of-type .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .board-filters {
    grid-template-columns: 1fr 1fr !important;
  }

  .compare-toggle {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .main-shell #loadBtn,
  .main-shell #singleExportBtn,
  .main-shell #boardRefreshBtn,
  .main-shell #boardExportBtn {
    grid-column: 1 / -1;
  }

  .radar-stage {
    min-height: 500px;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    height: 100dvh;
    z-index: 24;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 18px 0 32px rgba(12, 26, 34, 0.24);
  }

  .admin-page.sidebar-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-page.sidebar-open .admin-sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .admin-page.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-content,
  .main-shell {
    padding: 78px 16px 20px;
  }

  .admin-content {
    gap: 16px;
    min-width: 0;
  }

  .tab-section-wrap {
    gap: 16px;
  }

  .hero-panel,
  .admin-header {
    flex-direction: column;
    gap: 16px;
  }

  .admin-header pre {
    width: 100%;
    max-width: none;
  }

  .two-col,
  .three-col,
  .kpi-grid,
  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .main-hero {
    flex-direction: column;
  }

  .main-shell .main-hero {
    padding: 22px 18px;
  }

  .main-shell .hero-actions {
    width: 100%;
  }

  .main-shell .hero-actions a {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .main-shell .panel:first-of-type .field-row {
    grid-template-columns: 1fr;
  }

  .main-shell #loadBtn,
  .main-shell #singleExportBtn,
  .main-shell #boardRefreshBtn,
  .main-shell #boardExportBtn {
    grid-column: auto;
  }

  .main-shell table {
    min-width: 860px;
  }

  .admin-header pre {
    width: 100%;
    min-width: 0;
  }

  .section-head {
    gap: 12px;
  }

  .admin-page.sidebar-open .sidebar-toggle {
    left: calc(min(86vw, 340px) + 10px);
  }

  .admin-page:not(.sidebar-open) .sidebar-toggle {
    left: 14px;
  }

  .admin-content .panel,
  .school-manage-content .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .school-semester-table {
    min-width: 920px;
  }

  .radar-stage {
    min-height: 480px;
  }

  .radar-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .radar-stage {
    min-height: 452px;
  }

  .radar-chart-wrap {
    width: min(100%, 260px);
  }

  .radar-label {
    width: 88px;
    padding: 7px 8px;
  }

  .radar-label span {
    font-size: 11px;
  }

  .radar-summary {
    grid-template-columns: 1fr;
  }

  .radar-weight-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .admin-page:not(.sidebar-collapsed) .sidebar-toggle {
    left: calc(var(--sidebar-width) + 16px);
  }

  .admin-page.sidebar-collapsed .sidebar-toggle {
    left: 18px;
  }

  .admin-page.sidebar-open::before {
    opacity: 0;
    pointer-events: none;
  }

  .admin-page.sidebar-collapsed .admin-content {
    padding-left: 28px;
  }
}

@media (max-width: 640px) {
  .panel,
  .login-card {
    padding: 18px;
    border-radius: 18px;
  }

  .main-shell {
    padding: 14px 12px 18px;
    gap: 14px;
  }

  .main-shell .main-hero {
    padding: 18px 14px;
  }

  .kpi-card .metric-main {
    font-size: 28px;
  }

  .metric-compare-inline {
    gap: 6px;
  }

  .metric-compare-chip {
    font-size: 11px;
  }

  .kpi-card {
    padding: 14px;
    border-radius: 14px;
  }

  .main-shell table {
    min-width: 660px;
  }

  .radar-stage {
    min-height: 430px;
    padding: 10px 8px 14px;
  }

  .radar-chart-wrap {
    width: min(100%, 246px);
    margin-top: 12px;
  }

  .radar-legend {
    gap: 8px;
    margin: 6px 6px 10px;
    font-size: 10px;
  }

  .radar-label {
    width: 84px;
    padding: 6px 7px;
  }

  .radar-label strong {
    font-size: 14px;
  }

  th,
  td {
    padding: 7px 5px;
    font-size: 10px;
  }

  .main-shell #gradesTable .metric-main,
  .main-shell #boardTable .metric-main,
  .main-shell #coursesTable .metric-main,
  .main-shell #gradesTable .metric-text,
  .main-shell #boardTable .metric-text,
  .main-shell #coursesTable .metric-text {
    font-size: 10px;
  }

  .main-shell #gradesTable .metric-compare-chip,
  .main-shell #boardTable .metric-compare-chip,
  .main-shell #coursesTable .metric-compare-chip {
    font-size: 9px;
  }

  .sidebar-toggle {
    top: 14px;
    left: 14px;
  }

  .field-row,
  .actions {
    gap: 10px;
  }

  input,
  select,
  button {
    width: 100%;
  }

  pre {
    min-width: 0;
  }
}

@media (hover: none), (pointer: coarse) {
  .board-radar-hover {
    display: none !important;
  }
}
