﻿/* =============================================================
   哈尔滨迅达外语文化学校 · 运营管理系统
   Design System — Fresh Electric Blue / Clean SaaS
   主色对齐「电光蓝」观感；登录页左栏允许轻微径向柔光，
   业务后台仍以平涂为主，避免整站花哨渐变。
   ============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&display=swap");

:root {
  /* ---------- 主色：高饱和电光蓝（更鲜、更新） ---------- */
  --brand-900: #0b2a6b;
  --brand-800: #0e3a8c;
  --brand-700: #144bb8;
  --brand-600: #1866ff; /* Primary */
  --brand-500: #3b7fff;
  --brand-200: #c9dbff;
  --brand-100: #e3edff;
  --brand-50: #eef4ff;
  --brand-25: #f5f8ff;

  /* ---------- 辅助色 ---------- */
  --steel-600: #5a6a85;
  --steel-100: #e6ebf3;
  --sky-600: #2f6fd6;
  --sky-50: #eaf2ff;

  /* ---------- 中性色 ---------- */
  --n-0: #ffffff;
  --n-25: #fafbfc;
  --n-50: #f7f9fc;
  --n-75: #f3f6fa;
  --n-100: #ebeef5;
  --n-200: #e2e7ef;
  --n-300: #d0d7e2;
  --n-400: #94a0b4;
  --n-500: #6b7689;
  --n-700: #3a4354;
  --n-900: #151b28;

  /* ---------- 语义色 ---------- */
  --ok-600: #1f8a5b;
  --ok-50: #e8f7ef;
  --warn-600: #b7791f;
  --warn-50: #f7f1e4;
  --danger-600: #c23b3b;
  --danger-50: #fceeee;
  --sub-600: #9a7040;
  --sub-50: #f6efe4;
  --chart-1: #1866ff;
  --chart-2: #5b8def;
  --chart-3: #2f9a72;
  --chart-4: #8a93a3;

  /* ---------- 圆角 ---------- */
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;

  /* ---------- 阴影：高模糊 + 极低透明度，仅做层级 ---------- */
  --sh-1: 0 1px 2px rgba(27, 34, 51, 0.03);
  --sh-2: 0 1px 2px rgba(27, 34, 51, 0.03), 0 10px 28px rgba(27, 34, 51, 0.04);
  --sh-pop: 0 2px 6px rgba(27, 34, 51, 0.04), 0 20px 56px rgba(27, 34, 51, 0.09);

  /* ---------- 版式 ---------- */
  --font: "Inter", "Noto Sans SC", -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei UI", sans-serif;

  --nav-w: 244px;
  --topbar-h: 64px;

  --dur: 0.16s;
  --sh-hover: 0 2px 4px rgba(27, 34, 51, 0.04), 0 14px 32px rgba(27, 34, 51, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--n-50);
  color: var(--n-900);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

a:hover {
  color: var(--brand-700);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

dl,
dt,
dd {
  margin: 0;
}

/* ---------- 图标：2px 描边，圆角端点 ---------- */

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- 文字层级（三级字重） ---------- */

.t-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--n-900);
}

.t-section {
  font-size: 14px;
  font-weight: 500;
  color: var(--n-900);
}

.t-body {
  font-size: 14px;
  font-weight: 400;
  color: var(--n-700);
}

.t-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--n-500);
}

.t-caption {
  font-size: 12px;
  font-weight: 400;
  color: var(--n-400);
}

.muted {
  color: var(--n-500);
}

.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) ease, border-color var(--dur) ease,
    color var(--dur) ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--brand-600);
  color: var(--n-0);
}

.btn-primary:hover {
  background: var(--brand-700);
  color: var(--n-0);
}

.btn-primary:active {
  background: var(--brand-800);
}

.btn-secondary {
  background: var(--n-0);
  border-color: var(--n-200);
  color: var(--n-700);
}

.btn-secondary:hover {
  background: var(--n-25);
  border-color: var(--n-300);
  color: var(--n-900);
}

.btn-quiet {
  background: transparent;
  color: var(--n-500);
}

.btn-quiet:hover {
  background: var(--n-100);
  color: var(--n-900);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

.btn:focus-visible,
.field:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(43, 76, 134, 0.12);
}

/* ---------- 表单 ---------- */

.field,
input[type="text"],
input[type="search"],
input[type="number"],
select,
textarea {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-900);
  font-size: 14px;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}

input::placeholder {
  color: var(--n-400);
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

select {
  appearance: none;
  padding-right: 30px;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap .icon {
  position: absolute;
  right: 9px;
  width: 16px;
  height: 16px;
  color: var(--n-400);
  pointer-events: none;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--n-400);
  pointer-events: none;
}

.search-wrap input {
  padding-left: 34px;
  width: 240px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--n-700);
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-600);
}

/* ---------- 标签 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--n-100);
  color: var(--n-500);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tag .icon {
  width: 12px;
  height: 12px;
}

.tag-ok {
  background: var(--ok-50);
  color: var(--ok-600);
}

.tag-warn {
  background: var(--warn-50);
  color: var(--warn-600);
}

.tag-danger {
  background: var(--danger-50);
  color: var(--danger-600);
}

.tag-info {
  background: var(--sky-50);
  color: var(--sky-600);
}

.tag-brand {
  background: var(--brand-50);
  color: var(--brand-600);
}

.tag-sub {
  background: var(--sub-50);
  color: var(--sub-600);
}

/* 实心状态标签：扫读更强，仍保持低饱和 */
.tag-solid {
  color: #fff;
}

.tag-solid.tag-ok {
  background: var(--ok-600);
  color: #fff;
}

.tag-solid.tag-warn {
  background: var(--warn-600);
  color: #fff;
}

.tag-solid.tag-danger {
  background: var(--danger-600);
  color: #fff;
}

.tag-solid.tag-live {
  background: #c07a22;
  color: #fff;
}

.tag-solid.tag-muted {
  background: var(--n-500);
  color: #fff;
}

.tag-solid.tag-sub {
  background: #d4b07a;
  color: #5c3d16;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--n-0);
  border: 1px solid var(--n-200);
  font-size: 12px;
  color: var(--n-700);
  white-space: nowrap;
}

.pill b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pill-danger b {
  color: var(--danger-600);
}

.pill-warn b {
  color: var(--warn-600);
}

.pill-brand b {
  color: var(--brand-600);
}

.link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.link-action:hover {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--n-100);
}

.card-head h2 {
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.card-body-flush {
  padding: 0;
}

/* ---------- 应用壳层 ---------- */

.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: var(--n-75);
  border-right: 1px solid var(--n-200);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--n-200);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-600);
  color: var(--n-0);
  font-size: 15px;
  font-weight: 600;
}

.brand-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--n-900);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 400;
  color: var(--n-400);
  letter-spacing: 0.02em;
}

.nav-group {
  margin-top: 18px;
}

.nav-group-label {
  padding: 0 10px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--n-400);
  letter-spacing: 0.04em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  margin-bottom: 3px;
  border-radius: var(--r-md);
  color: var(--n-700);
  font-size: 14px;
  font-weight: 400;
  transition: background var(--dur) ease, color var(--dur) ease;
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  color: var(--n-400);
  transition: color var(--dur) ease;
}

.nav-item:hover {
  background: var(--n-100);
  color: var(--n-900);
}

.nav-item:hover .icon {
  color: var(--n-500);
}

.nav-item.active {
  background: var(--brand-600);
  color: var(--n-0);
  font-weight: 500;
}

.nav-item.active .icon,
.nav-item.active:hover .icon {
  color: var(--n-0);
}

.nav-item.active:hover {
  background: var(--brand-600);
  color: var(--n-0);
}

.nav-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--n-200);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--r-md);
}

.avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- 主区 ---------- */

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--n-50);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 28px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-200);
}

.topbar-l h1 {
  font-size: 17px;
  font-weight: 600;
}

.topbar-l .sub {
  font-size: 12px;
  color: var(--n-500);
  margin-top: 1px;
}

.topbar-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- 校区切换：普通控件，与顶栏主/次按钮一致 ---------- */
.campus-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.campus-switch-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--n-700);
  white-space: nowrap;
}

.campus-switch select {
  min-width: 140px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-900);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.campus-switch select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(24, 102, 255, 0.12);
}

.campus-switch .btn {
  height: 36px;
  padding: 0 14px;
}

/* 非管理员：校区只读展示，不给切换入口 */
.campus-switch-static {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-50);
  color: var(--n-900);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.page {
  flex: 1;
  padding: 24px 28px 40px;
}

.page-section + .page-section {
  margin-top: 20px;
}

/* ---------- 指标卡 ---------- */

.kpis {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.5fr 1.1fr;
  gap: 16px;
}

.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 18px 20px 16px 22px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease,
    border-color var(--dur) ease;
}

.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-600);
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-hover);
  border-color: var(--brand-200);
}

.kpi-attend::before {
  background: var(--ok-600);
}

.kpi-debt::before {
  background: var(--danger-600);
}

.kpi-revenue::before {
  background: var(--brand-600);
}

.kpi-salary::before {
  background: var(--steel-600);
}

.kpi-featured {
  background: var(--brand-25);
  border-color: var(--brand-200);
  min-height: 148px;
  padding-top: 20px;
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--n-500);
}

.kpi-label .icon {
  width: 16px;
  height: 16px;
  color: var(--n-400);
}

.kpi-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--n-75);
  color: var(--n-500);
  flex: 0 0 auto;
}

.kpi-featured .kpi-ico {
  background: var(--n-0);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
}

.kpi-debt .kpi-ico {
  background: var(--danger-50);
  color: var(--danger-600);
}

.kpi-attend .kpi-ico {
  background: var(--ok-50);
  color: var(--ok-600);
}

.kpi-value {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--n-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.kpi-featured .kpi-value {
  font-size: 34px;
  color: var(--brand-700);
}

.kpi-debt .kpi-value {
  color: var(--danger-600);
}

.kpi-value small {
  font-size: 14px;
  font-weight: 400;
  color: var(--n-400);
}

.kpi-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.kpi-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--n-500);
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-600);
}

.kpi-delta .icon {
  width: 14px;
  height: 14px;
}

.spark {
  width: 72px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--brand-600);
}

.ring {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.ring-text {
  font-size: 11px;
  font-weight: 600;
  fill: var(--n-900);
  font-variant-numeric: tabular-nums;
}

/* ---------- 预警摘要 ---------- */

/* ---------- 差额交叉验证 ---------- */

.verify-card {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 0;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.verify-lead {
  padding: 18px 20px;
  border-right: 1px solid var(--n-100);
  background: var(--n-50);
}

.verify-lead .t-label {
  margin-bottom: 6px;
}

.verify-lead h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--n-900);
  margin: 0 0 8px;
}

.verify-lead p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--n-500);
}

.verify-eq {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--n-500);
}

.verify-eq b {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--danger-600);
}

.verify-parts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.verify-part {
  padding: 18px 16px;
  border-right: 1px solid var(--n-100);
}

.verify-part:last-child {
  border-right: 0;
}

.verify-part .k {
  font-size: 12px;
  font-weight: 500;
  color: var(--n-500);
}

.verify-part .v {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--n-900);
}

.verify-part .s {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--n-400);
}

.verify-part.is-drop .v { color: var(--danger-600); }
.verify-part.is-miss .v { color: var(--warn-600); }
.verify-part.is-debt .v { color: var(--sky-600); }

a.verify-part {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

a.verify-part:hover {
  background: var(--n-50);
}

.verify-part.is-focus {
  background: var(--brand-50);
  box-shadow: inset 0 0 0 2px var(--brand-100);
}

.verify-part .go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-600);
}

.verify-compact .verify-lead {
  padding: 16px 18px;
}

.verify-compact .verify-part {
  padding: 16px 14px;
}

.verify-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.verify-bar .eq {
  font-size: 13px;
  color: var(--n-500);
}

.verify-bar .eq b {
  color: var(--danger-600);
  font-variant-numeric: tabular-nums;
}

.verify-bar .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  max-width: min(480px, calc(100% - 32px));
  padding: 12px 16px;
  background: var(--n-900);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: var(--sh-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast a {
  color: #9ec0ff;
  margin-left: 8px;
}

.verify-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 4px;
}

.verify-mini .box {
  padding: 12px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  background: var(--n-50);
}

.verify-mini .box dt {
  font-size: 11px;
  color: var(--n-500);
}

.verify-mini .box dd {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.verify-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .verify-card {
    grid-template-columns: 1fr;
  }

  .verify-lead {
    border-right: 0;
    border-bottom: 1px solid var(--n-100);
  }

  .verify-parts {
    grid-template-columns: 1fr;
  }

  .verify-part {
    border-right: 0;
    border-bottom: 1px solid var(--n-100);
  }

  .verify-part:last-child {
    border-bottom: 0;
  }
}

.alert-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.alert-bar .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--n-700);
  margin-right: 4px;
}

.alert-bar .meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--n-400);
}

/* ---------- 栅格 ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 0.92fr 1.28fr 1.1fr;
  gap: 16px;
}

.card-soft {
  background: var(--n-75);
}

.card-soft .card-head {
  border-bottom-color: var(--n-200);
}

/* ---------- 表格 ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 13px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--n-500);
  background: #f4f7fb;
  border-bottom: 1px solid var(--n-200);
  white-space: nowrap;
}

.table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--n-100);
  color: var(--n-700);
  white-space: nowrap;
  vertical-align: middle;
}

.table tbody tr {
  transition: background var(--dur) ease;
}

.table tbody tr:nth-child(even) {
  background: var(--n-25);
}

.table tbody tr:hover {
  background: var(--brand-25);
}

.table .cell-money {
  color: var(--brand-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table th.cell-money,
.table th.is-right,
.table td.cell-money,
.table td.is-right,
.table td.num {
  text-align: right;
}

.hours-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}

.hours-cell .num {
  width: 22px;
  font-weight: 600;
  color: var(--n-900);
}

.hours-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--n-100);
  overflow: hidden;
}

.hours-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand-600);
}

.row-action {
  opacity: 0;
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 500;
  transition: opacity var(--dur) ease;
}

.table tbody tr:hover .row-action {
  opacity: 1;
}

.table tbody tr.is-selected {
  background: var(--brand-25);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .cell-strong {
  color: var(--n-900);
  font-weight: 500;
}

.table .cell-actions {
  text-align: right;
}

.table-class {
  table-layout: fixed;
  width: 100%;
  min-width: 1180px;
}

.table-class th,
.table-class td {
  white-space: nowrap;
  font-size: 13px;
  padding: 12px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-class th:nth-child(1),
.table-class td:nth-child(1) {
  width: 118px;
  text-align: left;
}

.table-class th:nth-child(2),
.table-class td:nth-child(2) {
  width: 72px;
  text-align: left;
}

.table-class th:nth-child(n+3):nth-child(-n+10),
.table-class td:nth-child(n+3):nth-child(-n+10) {
  width: 56px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.table-class th:nth-child(n+11):nth-child(-n+13),
.table-class td:nth-child(n+11):nth-child(-n+13) {
  width: 84px;
  text-align: right;
}

.table-class th:nth-child(14),
.table-class td:nth-child(14) {
  width: 56px;
  text-align: right;
}

.table-class td.num .tag {
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
}

.modal-wide {
  width: min(720px, calc(100vw - 32px));
}

.table-wrap {
  overflow-x: auto;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.table-wrap-sticky {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-sticky-2 {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 960px;
}

.table-sticky-2 th,
.table-sticky-2 td {
  background: var(--n-0);
}

.table-sticky-2 tbody tr:nth-child(even) th,
.table-sticky-2 tbody tr:nth-child(even) td {
  background: var(--n-25);
}

.table-sticky-2 thead th {
  background: var(--n-50);
}

.table-sticky-2 th:nth-child(1),
.table-sticky-2 td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 148px;
  box-shadow: 1px 0 0 var(--n-200);
}

.table-sticky-2 th:nth-child(2),
.table-sticky-2 td:nth-child(2) {
  position: sticky;
  left: 148px;
  z-index: 2;
  min-width: 96px;
  box-shadow: 1px 0 0 var(--n-200);
}

.table-sticky-2 thead th:nth-child(1),
.table-sticky-2 thead th:nth-child(2) {
  z-index: 3;
}

.table-sticky-2 tbody tr:hover td:nth-child(1),
.table-sticky-2 tbody tr:hover td:nth-child(2) {
  background: var(--brand-25);
}

.panel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  background: var(--n-100);
  border-radius: var(--r-md);
}

.panel-tab {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  color: var(--n-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}

.panel-tab:hover {
  color: var(--n-900);
  background: rgba(255,255,255,.55);
}

.panel-tab.active {
  background: var(--n-0);
  color: var(--brand-700);
  box-shadow: var(--sh-1);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  text-align: center;
}

.empty-state .empty-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 4px;
}

.empty-state h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--n-900);
}

.empty-state p {
  margin: 0 0 8px;
  max-width: 360px;
  color: var(--n-500);
  font-size: 13px;
  line-height: 1.5;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person .avatar {
  width: 32px;
  height: 32px;
}

.person .who {
  line-height: 1.35;
}

.person .who b {
  font-weight: 500;
  color: var(--n-900);
}

.person .who span {
  display: block;
  font-size: 12px;
  color: var(--n-400);
}

/* ---------- 列表 / 时间线 ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 14px 18px;
  border-bottom: 1px solid var(--n-100);
  position: relative;
}

.list li:last-child {
  border-bottom: 0;
}

.list li.todo-danger,
.list li.todo-warn,
.list li.todo-normal {
  padding-left: 18px;
}

.list li.todo-danger::before,
.list li.todo-warn::before,
.list li.todo-normal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.list li.todo-danger::before {
  background: var(--danger-600);
}

.list li.todo-warn::before {
  background: var(--warn-600);
}

.list li.todo-normal::before {
  background: var(--n-300);
}

.list li.todo-danger {
  background: #fcf6f5;
}

.list li.todo-warn {
  background: #fbf8f1;
}

.todo-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.list .li-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--n-100);
  color: var(--n-500);
}

.list .li-icon .icon {
  width: 16px;
  height: 16px;
}

.li-icon-warn {
  background: var(--warn-50);
  color: var(--warn-600);
}

.li-icon-ok {
  background: var(--ok-50);
  color: var(--ok-600);
}

.li-icon-brand {
  background: var(--brand-50);
  color: var(--brand-600);
}

.list .li-main {
  min-width: 0;
  flex: 1;
}

.list .li-main b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--n-900);
}

.list .li-main span {
  font-size: 13px;
  color: var(--n-500);
}

/* ---------- 课程行 / 时间轴 ---------- */

.slot {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 12px;
  align-items: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--n-100);
}

.slot:has(.slot-rail) {
  grid-template-columns: 56px 18px 1fr auto;
}

.slot.slot-compact {
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
}

.slot.slot-compact .slot-main span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--n-500);
}

.slot:nth-child(even) {
  background: var(--n-25);
}

.slot:last-child {
  border-bottom: 0;
}

.slot.is-live {
  background: var(--brand-25);
}

.slot-time {
  padding-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-900);
  font-variant-numeric: tabular-nums;
}

.slot.is-live .slot-time {
  color: var(--brand-600);
}

.slot-rail {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100%;
  padding-top: 8px;
}

.slot-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -16px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--n-200);
}

.slot:last-child .slot-rail::before {
  bottom: 8px;
}

.slot-dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--n-300);
  box-shadow: 0 0 0 3px var(--n-0);
}

.slot.is-live .slot-dot {
  background: #c07a22;
  box-shadow: 0 0 0 3px var(--brand-25);
}

.slot.is-done .slot-dot {
  background: var(--ok-600);
}

.slot-main {
  min-width: 0;
  padding-top: 1px;
}

.slot-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.slot-main b {
  font-size: 14px;
  font-weight: 600;
  color: var(--n-900);
}

.slot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-meta {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--steel-100);
  color: var(--steel-600);
  font-size: 12px;
}

.slot-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--warn-600);
}

/* ---------- 数据条（纯色，无渐变） ---------- */

.meter-row {
  display: grid;
  grid-template-columns: 80px 1fr 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--n-700);
}

.meter-row:last-child {
  margin-bottom: 0;
}

.meter {
  height: 6px;
  border-radius: 3px;
  background: var(--n-100);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand-600);
}

.meter i.tone-2 {
  background: var(--brand-500);
}

.meter i.tone-3 {
  background: var(--steel-600);
}

.meter i.tone-4 {
  background: var(--n-300);
}

.meter-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--n-500);
}

/* ---------- 详情：标签 / 值 ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
}

.detail-item {
  min-width: 0;
}

.detail-item dt {
  font-size: 12px;
  font-weight: 400;
  color: var(--n-500);
}

.detail-item dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--n-900);
  word-break: break-word;
}

.detail-item dd.num {
  font-variant-numeric: tabular-nums;
}

.divider {
  height: 1px;
  background: var(--n-100);
  border: 0;
  margin: 20px 0;
}

/* ---------- 页签（下划线式） ---------- */

.tabs {
  display: flex;
  gap: 22px;
  padding: 0 20px;
  border-bottom: 1px solid var(--n-200);
}

.tab {
  position: relative;
  height: 42px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--n-500);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: color var(--dur) ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.tab:hover {
  color: var(--n-900);
}

.tab.active {
  color: var(--brand-600);
  font-weight: 500;
}

.tab.active::after {
  background: var(--brand-600);
}

/* ---------- 工具条 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--n-100);
}

.toolbar .spacer {
  margin-left: auto;
}

/* ---------- 弹层（详情） ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 34, 51, 0.28);
}

.overlay[hidden] {
  display: none;
}

.modal {
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-pop);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 16px;
}

.modal-head .avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.modal-head .who {
  flex: 1;
  min-width: 0;
}

.modal-head h2 {
  font-size: 16px;
  font-weight: 600;
}

.modal-head .who p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--n-500);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--n-100);
  background: var(--n-25);
}

.modal-foot .spacer {
  margin-right: auto;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  padding: 12px 14px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
}

.stat-box dt {
  font-size: 12px;
  color: var(--n-500);
}

.stat-box dd {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--n-900);
  font-variant-numeric: tabular-nums;
}

/* ---------- 点名 ---------- */

.roll-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--n-100);
}

.roll-item:last-child {
  border-bottom: 0;
}

.roll-main {
  flex: 1;
  min-width: 0;
}

.roll-main b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--n-900);
}

.roll-main span {
  font-size: 12px;
  color: var(--n-500);
}

.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  background: var(--n-75);
}

.seg button {
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--n-500);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--dur) ease, color var(--dur) ease;
}

.seg button:hover {
  color: var(--n-900);
}

.seg button.on {
  background: var(--n-0);
  color: var(--brand-600);
  font-weight: 500;
  box-shadow: var(--sh-1);
}

.seg button.on-warn {
  background: var(--n-0);
  color: var(--warn-600);
  font-weight: 500;
  box-shadow: var(--sh-1);
}

.seg button.on-danger {
  background: var(--n-0);
  color: var(--danger-600);
  font-weight: 500;
  box-shadow: var(--sh-1);
}

/* ---------- 移动端 ---------- */

.m-root {
  min-height: 100vh;
  background: var(--n-50);
}

.m-app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--n-50);
  border-left: 1px solid var(--n-200);
  border-right: 1px solid var(--n-200);
}

.m-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-200);
}

.m-top .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.m-top .m-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--n-900);
}

.m-top .m-sub {
  font-size: 11px;
  color: var(--n-400);
}

.m-top .m-right {
  margin-left: auto;
  text-align: right;
  font-size: 12px;
  color: var(--n-500);
}

.m-top .m-right b {
  display: block;
  font-weight: 500;
  color: var(--n-900);
}

.m-switch {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  background: var(--n-0);
}

.m-switch button {
  flex: 1;
  height: 32px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-500);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--dur) ease, color var(--dur) ease,
    border-color var(--dur) ease;
}

.m-switch button.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--n-0);
  font-weight: 500;
}

.m-tabs {
  display: flex;
  gap: 18px;
  padding: 0 16px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-200);
  overflow-x: auto;
}

.m-tabs button {
  position: relative;
  height: 40px;
  border: 0;
  background: none;
  color: var(--n-500);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.m-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.m-tabs button.active {
  color: var(--brand-600);
  font-weight: 500;
}

.m-tabs button.active::after {
  background: var(--brand-600);
}

.m-body {
  flex: 1;
  padding: 16px 16px 24px;
}

.m-panel {
  display: none;
}

.m-panel.active {
  display: block;
}

.m-lead {
  margin-bottom: 16px;
}

.m-lead h1 {
  font-size: 18px;
  font-weight: 600;
}

.m-lead p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--n-500);
}

.m-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.m-stat {
  padding: 12px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  text-align: center;
}

.m-stat b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--n-900);
  font-variant-numeric: tabular-nums;
}

.m-stat span {
  font-size: 11px;
  color: var(--n-500);
}

.m-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.m-card.is-active {
  border-color: var(--brand-200);
  background: var(--brand-25);
}

.m-card h3 {
  font-size: 14px;
  font-weight: 500;
}

.m-card .meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--n-500);
}

.m-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.m-actions .btn {
  width: 100%;
  height: 42px;
}

.m-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--n-0);
  border-top: 1px solid var(--n-200);
}

.m-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 11px;
  border: 0;
  background: none;
  color: var(--n-400);
  font-size: 11px;
  cursor: pointer;
  transition: color var(--dur) ease;
}

.m-nav button .icon {
  width: 20px;
  height: 20px;
}

.m-nav button.active {
  color: var(--brand-600);
  font-weight: 500;
}

.m-foot {
  padding: 14px 16px 20px;
  text-align: center;
  font-size: 11px;
  color: var(--n-400);
}

/* ---------- 文档 / 规范页 ---------- */

.doc {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 28px 72px;
}

.doc-head {
  margin-bottom: 28px;
}

.doc-head h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc-head p {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--n-500);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.entry {
  display: block;
  padding: 20px;
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  color: inherit;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.entry:hover {
  border-color: var(--brand-200);
  box-shadow: var(--sh-2);
  color: inherit;
}

.entry .entry-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: 14px;
}

.entry h3 {
  font-size: 15px;
  font-weight: 600;
}

.entry p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--n-500);
  line-height: 1.6;
}

.entry .go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-600);
}

.entry .go .icon {
  width: 15px;
  height: 15px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.swatch {
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--n-0);
}

.swatch i {
  display: block;
  height: 56px;
}

.swatch span {
  display: block;
  padding: 9px 10px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--n-500);
}

.swatch span b {
  display: block;
  font-weight: 500;
  color: var(--n-900);
  font-size: 12px;
}

.rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-list li {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--n-100);
  font-size: 13px;
  color: var(--n-700);
}

.rule-list li:last-child {
  border-bottom: 0;
}

.rule-list .icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--ok-600);
}

.rule-list.deny .icon {
  color: var(--danger-600);
}

.spec-table td:first-child {
  color: var(--n-500);
  width: 180px;
}

/* ---------- 环形图（SVG 纯色，零渐变） ---------- */

.donut-panel {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  align-items: center;
}

.donut-wrap {
  position: relative;
  width: 148px;
  height: 148px;
}

.donut-wrap svg {
  width: 148px;
  height: 148px;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.donut-center span {
  font-size: 11px;
  color: var(--n-500);
}

.donut-center b {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--n-100);
  font-size: 13px;
  color: var(--n-700);
}

.legend li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.legend li:first-child {
  padding-top: 0;
}

.legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend .amt {
  font-weight: 600;
  color: var(--n-900);
  font-variant-numeric: tabular-nums;
}

.legend .pct {
  width: 36px;
  text-align: right;
  color: var(--n-500);
  font-variant-numeric: tabular-nums;
}

.donut-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--n-100);
  font-size: 12px;
  color: var(--n-500);
}

.donut-foot b {
  color: var(--brand-600);
  font-weight: 600;
}

.page-stamp {
  margin-top: 18px;
  text-align: right;
  font-size: 12px;
  color: var(--n-400);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1240px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3,
  .entry-grid,
  .swatches {
    grid-template-columns: repeat(2, 1fr);
  }

  .donut-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border: 1px solid var(--n-200);
    border-radius: var(--r-sm);
    background: var(--n-0);
    color: var(--n-900);
    cursor: pointer;
    flex-shrink: 0;
  }

  .topbar-l {
    display: flex;
    align-items: flex-start;
  }

  .nav {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform var(--dur) ease;
    border-right: 1px solid rgba(255,255,255,.06);
  }

  .app.nav-open .nav {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(27, 34, 51, 0.35);
  }

  .nav-foot {
    display: block;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1025px) {
  .nav-toggle {
    display: none;
  }

  .nav-backdrop {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .campus-switch {
    width: 100%;
    flex-wrap: wrap;
    margin: 4px 0 0;
  }

  .campus-switch select {
    flex: 1;
    min-width: 120px;
  }

  .page {
    padding: 16px;
  }

  .kpis,
  .grid-3,
  .entry-grid,
  .rules,
  .detail-grid,
  .swatches,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .search-wrap input {
    width: 100%;
  }

  .doc {
    padding: 24px 16px 48px;
  }

  .m-app {
    max-width: none;
    border: 0;
  }
}

/* ---------- 侧栏：同系深蓝（比封面略沉，不刺眼）+ 白字 ---------- */
/* 不要在这里写 position，否则会覆盖窄屏下 .nav 的 fixed 抽屉定位；
   基础态的 sticky 与窄屏的 fixed 都已为下面的 ::before/::after 提供定位参照。 */
.nav.is-dark {
  background: linear-gradient(180deg, #1448b0 0%, #0f3a8f 42%, #0c2f78 100%);
  border-right: 1px solid rgba(8, 28, 72, 0.35);
  overflow: hidden;
  box-shadow: none;
}
.nav.is-dark::before {
  content: "";
  position: absolute;
  inset: -20% auto auto 8%;
  width: 72%;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.nav.is-dark::after {
  content: "";
  position: absolute;
  right: -32%;
  bottom: -20%;
  width: 68%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 20, 55, 0.35) 0%, rgba(5, 20, 55, 0) 72%);
  pointer-events: none;
}
.nav.is-dark > * {
  position: relative;
  z-index: 1;
}
.nav.is-dark .brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  padding-bottom: 18px;
  margin-bottom: 6px;
}
.nav.is-dark .brand-mark {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: none;
}
.nav.is-dark .brand-name {
  color: #fff;
  font-size: 13px;
}
.nav.is-dark .brand-sub {
  color: rgba(255, 255, 255, 0.62);
  opacity: 1;
  font-weight: 500;
}
.nav.is-dark .nav-group-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
}
.nav.is-dark .nav-item {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}
.nav.is-dark .nav-item .icon {
  stroke: rgba(255, 255, 255, 0.55);
  color: rgba(255, 255, 255, 0.55);
}
.nav.is-dark .nav-item:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}
.nav.is-dark .nav-item:hover .icon {
  stroke: #fff;
  color: #fff;
}
.nav.is-dark .nav-item.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #7eb0ff;
}
.nav.is-dark .nav-item.active .icon,
.nav.is-dark .nav-item.active:hover .icon {
  stroke: #fff;
  color: #fff;
}
.nav.is-dark .nav-item.active:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.nav.is-dark .nav-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
  padding-top: 14px;
}
.nav.is-dark .nav-user {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 10px;
}
.nav.is-dark .nav-user .t-section {
  color: #fff;
}
.nav.is-dark .nav-user .t-caption {
  color: rgba(255, 255, 255, 0.55);
}
.nav.is-dark .avatar {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}
.nav.is-dark .nav-foot .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 500;
}
.nav.is-dark .nav-foot .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

@media (max-width: 1024px) {
  /* 抽屉高度锁死 100vh，矮屏上菜单可能装不下，要能滚到底部的「退出登录」。
     ::after 用负偏移做投影，会把可滚动区域撑高，窄屏下直接去掉。 */
  .nav.is-dark {
    overflow: hidden auto;
  }

  .nav.is-dark::after {
    display: none;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--n-0);
}

.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 44px 40px;
  color: #fff;
  background: var(--brand-600);
  overflow: hidden;
}

/* 仅登录左栏：轻微径向柔光，模拟参考图「中心更亮」 */
.auth-hero::before {
  content: "";
  position: absolute;
  inset: -20% auto auto 20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 68%);
  pointer-events: none;
}

.auth-hero::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -28%;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11,42,107,.28) 0%, rgba(11,42,107,0) 70%);
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-hero-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: 18px;
}

.auth-hero-brand .name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-hero h1 {
  margin: 0;
  max-width: 14em;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.auth-hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.auth-hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.92);
}

.auth-hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
  flex-shrink: 0;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  background: var(--n-0);
}

.auth-panel-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.auth-card {
  width: min(400px, 100%);
  padding: 8px 4px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.auth-card h1 {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--n-900);
  letter-spacing: -0.02em;
}

.auth-card .auth-lead {
  margin: 0 0 28px;
  color: var(--n-500);
  font-size: 14px;
}

.auth-card .form-field {
  margin-bottom: 16px;
}

.auth-card .form-field label {
  font-size: 13px;
  color: var(--n-700);
  font-weight: 500;
}

.auth-card .form-field input {
  height: 46px;
  border-radius: 8px;
  border-color: var(--n-200);
  background: var(--n-0);
}

.auth-card .form-field input:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(24, 102, 255, 0.14);
}

.auth-card .btn-primary {
  height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.auth-card .btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
}

.auth-demo {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--n-100);
  color: var(--n-500);
  font-size: 12px;
  line-height: 1.75;
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    padding: 28px 24px;
    gap: 28px;
  }

  .auth-hero h1 {
    font-size: 24px;
  }
}
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 12px;
  color: var(--n-500);
  margin-bottom: 6px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  padding: 0 12px;
  font: inherit;
  background: var(--n-0);
}
.form-field textarea { height: 88px; padding: 10px 12px; }
.flash {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--ok-50);
  color: var(--ok-600);
  font-size: 13px;
  margin-bottom: 14px;
}
.flash.is-error { background: var(--danger-50); color: var(--danger-600); }
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.week-col {
  background: var(--n-50);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  min-height: 180px;
  padding: 10px;
}
.week-col h4 {
  font-size: 12px;
  color: var(--n-500);
  margin: 0 0 8px;
}
.lesson-chip {
  display: block;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: var(--r-sm);
  background: var(--n-0);
  border: 1px solid var(--n-200);
  font-size: 12px;
  color: var(--n-900);
  text-decoration: none;
}

/* ---------- 全站页脚 ---------- */
.site-footer {
  margin-top: auto;
  padding: 14px 28px;
  border-top: 1px solid var(--n-200);
  background: var(--n-50);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  color: var(--n-500);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer-inner a {
  color: inherit;
  text-decoration: none;
}

.site-footer-inner a:hover {
  color: var(--brand-600);
  text-decoration: underline;
}

.site-footer--auth {
  width: 100%;
  margin-top: auto;
  padding: 16px 20px 20px;
  background: transparent;
  border-top: 1px solid var(--n-100);
}

.site-footer--mobile {
  margin: 20px 0 8px;
  padding: 14px 4px 72px;
  background: transparent;
  border-top: 1px solid var(--n-200);
}

.site-footer--mobile .site-footer-inner {
  gap: 6px 12px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .site-footer-inner {
    gap: 4px 12px;
    font-size: 11px;
  }
}
