:root {
  --bg: #f4f7fb;
  --ink: #152033;
  --muted: #687386;
  --blue: #1d5fd0;
  --red: #e92732;
  --orange: #f37b1d;
  --yellow: #d9a300;
  --green: #11a970;
  --teal: #17b8c2;
  --violet: #7c5cff;
  --line: #dce5f2;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(25, 44, 78, 0.12);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
select {
  font: inherit;
}

.screen {
  min-height: 100vh;
}

.app-screen {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  padding: 28px 20px;
  color: #e8f1ff;
  background: linear-gradient(180deg, #123c81, #10284e);
}

.sidebar h2 {
  margin-bottom: 34px;
  font-size: 26px;
}

.sidebar nav {
  display: grid;
  gap: 12px;
}

.sidebar b {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #c8d8f1;
}

.sidebar b.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.workspace {
  min-width: 0;
  padding: 30px 38px 34px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, auto);
  align-items: start;
  gap: 26px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
  color: #6f849d;
}

h1 {
  color: #142542;
  font-size: 40px;
  line-height: 1.12;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid #d9e2f0;
  background: #ffffff;
}

.view-switch button {
  min-width: 82px;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #526176;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.view-switch button.active {
  background: var(--blue);
  color: #ffffff;
}

.filters,
.table-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.manager-filters {
  max-width: 820px;
}

.filters label,
.table-filters label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #d9e2f0;
  background: #ffffff;
  color: #516175;
  font-size: 16px;
}

.filters select,
.table-filters select {
  min-width: 82px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #21324a;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.kpi-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.kpi,
.card {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.kpi {
  min-height: 132px;
  padding: 20px;
}

.kpi small,
.kpi span {
  display: block;
  color: #687386;
}

.kpi b {
  display: block;
  margin: 8px 0;
  font-size: 44px;
  line-height: 1;
}

.red-card {
  border-top: 8px solid var(--red);
}

.orange-card {
  border-top: 8px solid var(--orange);
}

.yellow-card {
  border-top: 8px solid var(--yellow);
}

.blue-card {
  border-top: 8px solid var(--blue);
}

.green-card {
  border-top: 8px solid var(--green);
}

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 22px;
  margin-bottom: 22px;
}

.lower-area {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.card {
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.card-head h3 {
  color: #1e2d43;
  font-size: 22px;
}

.card-head span {
  color: #7d8797;
}

.compare-card {
  min-width: 0;
}

.compare-card .card-head {
  align-items: flex-start;
}

.compare-card .card-head h3 {
  max-width: 270px;
  line-height: 1.25;
}

.compare-chart {
  position: relative;
  height: 334px;
  padding: 8px 10px 30px 34px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
}

.compare-chart svg {
  width: 100%;
  height: 288px;
}

.compare-chart line {
  stroke: #dce5f2;
  stroke-width: 1;
}

.compare-chart polyline {
  fill: none;
  stroke-width: 5;
}

.red-line {
  stroke: var(--red);
}

.orange-line {
  stroke: var(--orange);
}

.yellow-line {
  stroke: var(--yellow);
}

.green-line {
  stroke: var(--green);
}

.axis {
  position: absolute;
  left: 12px;
  color: #7b8797;
  font-size: 14px;
}

.y20 {
  top: 32px;
}

.y10 {
  top: 109px;
}

.y5 {
  top: 165px;
}

.y0 {
  top: 219px;
}

.college-labels {
  position: absolute;
  right: 16px;
  bottom: 8px;
  left: 54px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  color: #59677a;
  font-size: 13px;
  text-align: center;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 14px;
  color: #657386;
}

.legend span::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  content: "";
}

.legend .red-dot::before {
  background: var(--red);
}

.legend .orange-dot::before {
  background: var(--orange);
}

.legend .yellow-dot::before {
  background: var(--yellow);
}

.legend .green-dot::before {
  background: var(--green);
}

.legend .blue-dot::before {
  background: var(--blue);
}

.legend .teal-dot::before {
  background: var(--teal);
}

.legend .violet-dot::before {
  background: var(--violet);
}

.overview-card {
  min-width: 0;
}

.overview-visual {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 260px;
}

.total-ring {
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 50%, transparent 51%),
    conic-gradient(var(--red) 0 38deg, var(--orange) 38deg 139deg, var(--yellow) 139deg 360deg);
}

.total-ring b,
.total-ring span {
  display: block;
  text-align: center;
}

.total-ring b {
  font-size: 48px;
  line-height: 1;
}

.total-ring span {
  margin-top: 8px;
  color: #657386;
}

.overview-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  height: 230px;
  align-items: end;
}

.overview-bars article {
  display: grid;
  justify-items: center;
  gap: 8px;
  height: 100%;
  color: #657386;
}

.overview-bars i {
  display: block;
  width: 52px;
  min-height: 12px;
  align-self: end;
  border-radius: 6px 6px 0 0;
}

.overview-bars b {
  color: #1f2d44;
  font-size: 24px;
}

.red-bar {
  background: var(--red);
}

.orange-bar {
  background: var(--orange);
}

.yellow-bar {
  background: var(--yellow);
}

.blue-bar {
  background: var(--blue);
}

.economy-ring,
.academic-ring {
  background:
    radial-gradient(circle, #fff 0 50%, transparent 51%),
    conic-gradient(var(--red) 0 64deg, var(--orange) 64deg 206deg, var(--yellow) 206deg 360deg);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.summary-grid article {
  min-height: 78px;
  padding: 14px;
  border: 1px solid #e4ebf5;
  background: #f8fbff;
}

.summary-grid b,
.summary-grid span {
  display: block;
}

.summary-grid b {
  font-size: 30px;
  line-height: 1;
}

.summary-grid span {
  margin-top: 8px;
  color: #657386;
}

.action-type-summary {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  max-height: 190px;
  overflow: auto;
}

.action-type-summary article {
  min-height: 72px;
}

.action-type-summary b {
  font-size: 28px;
}

.action-type-summary span {
  line-height: 1.25;
}

.action-stack-card {
  min-width: 0;
}

.stacked-type-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  gap: 12px;
  min-height: 300px;
  padding: 16px 12px 12px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
  align-items: end;
}

.stacked-type-chart article {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  color: #657386;
}

.stacked-type-chart b {
  color: #1f2d44;
  font-size: 18px;
}

.stacked-type-chart span {
  width: 100%;
  min-height: 36px;
  color: #526176;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.stacked-bar {
  display: flex;
  flex-direction: column-reverse;
  width: 34px;
  min-height: 16px;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #dfe8f4;
}

.stacked-bar i {
  display: block;
  width: 100%;
}

.red-segment {
  background: var(--red);
}

.orange-segment {
  background: var(--orange);
}

.yellow-segment {
  background: var(--yellow);
}

.action-wide-area {
  display: block;
}

.action-distribution-card {
  width: 100%;
}

.inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #657386;
  font-size: 15px;
  font-weight: 700;
}

.inline-filter select {
  width: 180px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe5f1;
  border-radius: 0;
  background: #fff;
  color: #1f2d44;
  font: inherit;
}

.level-distribution-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  min-height: 260px;
  padding: 20px 26px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
  align-items: end;
}

.level-distribution-chart article {
  display: grid;
  justify-items: center;
  gap: 10px;
  height: 100%;
  color: #657386;
}

.level-distribution-chart i {
  display: block;
  width: 54px;
  min-height: 0;
  align-self: end;
  border-radius: 6px 6px 0 0;
}

.level-distribution-chart b {
  color: #1f2d44;
  font-size: 22px;
}

.trend-chart {
  height: 270px;
  padding: 10px 14px 34px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
}

.trend-chart svg {
  width: 100%;
  height: 220px;
}

.trend-chart line {
  stroke: #dce5f2;
}

.trend-chart polyline {
  fill: none;
  stroke-width: 5;
}

.trend-red {
  stroke: var(--red);
}

.trend-orange {
  stroke: var(--orange);
}

.trend-yellow {
  stroke: var(--yellow);
}

.week-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: #657386;
  font-size: 14px;
  text-align: center;
}

.grade-card {
  min-width: 0;
}

.grade-bars {
  display: grid;
  gap: 18px;
}

.grade-bars article {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  gap: 12px;
  align-items: center;
  color: #526176;
}

.grade-bars i {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #28d5e7);
}

.grade-bars b {
  color: #1f2d44;
}

.grouped-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  height: 250px;
  align-items: end;
  padding: 18px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
}

.grouped-chart article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 24px 1fr 26px;
  gap: 8px;
  align-items: end;
  justify-items: center;
  height: 100%;
  color: #657386;
}

.grouped-chart article span,
.grouped-chart article b {
  grid-column: 1 / -1;
}

.grouped-chart article b {
  color: #1f2d44;
  font-size: 18px;
}

.grouped-chart i {
  display: block;
  width: 34px;
  min-height: 0;
  border-radius: 5px 5px 0 0;
}

.grouped-chart .meal {
  background: var(--teal);
}

.grouped-chart .subsidy {
  background: var(--violet);
}

.layer-split {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e4ebf5;
}

.mini-head {
  margin-bottom: 14px;
}

.mini-head h3 {
  font-size: 20px;
}

.student-card {
  margin-bottom: 22px;
  min-width: 0;
}

.scope-note {
  display: inline-flex;
  margin: -8px 0 14px;
  padding: 7px 10px;
  border-left: 4px solid var(--blue);
  background: #f4f8ff;
  color: #526176;
  font-size: 15px;
}

.table-filters {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.table-filters label {
  min-height: 34px;
  font-size: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  color: #516175;
  background: #edf3fb;
  text-align: left;
}

th,
td {
  padding: 11px 9px;
  border-bottom: 1px solid #e4ebf5;
  line-height: 1.35;
}

th {
  white-space: nowrap;
}

td:first-child,
td:nth-child(4),
td:nth-child(5),
td:nth-child(7) {
  white-space: nowrap;
}

.badge,
.status-badge,
.status-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 28px;
  border-radius: 999px;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.badge {
  color: #ffffff;
}

.badge.red {
  background: var(--red);
}

.badge.orange {
  background: var(--orange);
}

.badge.yellow {
  background: var(--yellow);
}

.status-badge.yes {
  background: #eaf8f2;
  color: #0f8c5c;
}

.status-badge.no {
  background: #fff1f1;
  color: #d62832;
}

.status-select {
  min-width: 62px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  appearance: auto;
  text-align: center;
}

.status-select.yes {
  background: #eaf8f2;
  color: #0f8c5c;
}

.status-select.no {
  background: #fff1f1;
  color: #d62832;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.action-card p {
  margin-top: 8px;
  color: #657386;
  line-height: 1.6;
  font-size: 18px;
}

button {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

button.ghost {
  border: 1px solid #cfdbea;
  background: #fff;
  color: var(--blue);
}

.detail-button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #cfdbea;
  border-radius: 5px;
  background: #ffffff;
  color: var(--blue);
  font-size: 14px;
}

.detail-drawer[hidden] {
  display: none;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 48, 0.28);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  height: 100%;
  padding: 28px;
  background: #ffffff;
  box-shadow: -18px 0 40px rgba(20, 34, 54, 0.18);
}

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

.drawer-head h3 {
  font-size: 28px;
}

.icon-button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cfdbea;
  background: #ffffff;
  color: #526176;
  font-size: 14px;
}

.detail-grid {
  display: grid;
  gap: 12px;
}

.detail-grid article {
  padding: 14px;
  border: 1px solid #e4ebf5;
  background: #f8fbff;
}

.detail-grid b,
.detail-grid span {
  display: block;
}

.detail-grid b {
  margin-bottom: 7px;
  color: #1f2d44;
}

.detail-grid span {
  color: #657386;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .workspace {
    padding: 28px 32px 34px;
  }

  .page-head {
    grid-template-columns: minmax(320px, 1fr) minmax(360px, auto);
  }

  .content-split,
  .lower-area {
    grid-template-columns: 1fr;
  }

  .compare-card .card-head h3 {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .app-screen {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .page-head {
    grid-template-columns: 1fr;
  }

  .filters,
  .table-filters {
    justify-content: flex-start;
  }

  .content-split,
  .kpi-grid.four {
    grid-template-columns: 1fr;
  }

  .action-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
