/* ============================================================
   德育量化管理系统 · 样式表
   浅色主题 / 桌面侧栏 + 移动端抽屉
   ============================================================ */

:root {
  --bg: #f1f4fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf1f8;
  --border: #e3e8f1;
  --border-strong: #cdd6e4;

  --text: #0f172a;
  --text-2: #4a5769;
  --text-3: #8a95a7;

  --brand: #1f4fd8;
  --brand-600: #1a43b8;
  --brand-soft: #e8eeff;
  --brand-soft-2: #f2f6ff;

  --add: #0f9d58;
  --add-soft: #e4f6ec;
  --sub: #e5484d;
  --sub-soft: #fdecec;
  --warn: #c47f00;
  --warn-soft: #fdf3e0;
  --info: #0b7fb8;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 7px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px -14px rgba(15, 23, 42, .16);
  --shadow-lg: 0 20px 60px -20px rgba(15, 23, 42, .34), 0 2px 8px rgba(15, 23, 42, .06);

  --sidebar-w: 238px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, p, figure { margin: 0; }
button { font-family: inherit; font-size: inherit; }
a { color: var(--brand); text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd6e4; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b4c0d2; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 启动屏 ---------------- */
.app-root { min-height: 100vh; }
.boot-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.boot-logo {
  width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(145deg, #2a5ce8, #1634a8);
  color: #fff; font-size: 27px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -12px rgba(31, 79, 216, .75);
}
.boot-text { color: var(--text-3); font-size: 13px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--brand-soft); border-top-color: var(--brand);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 登录页 ---------------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.auth-hero {
  background:
    radial-gradient(1200px 500px at 10% 0%, #2a5ce8 0%, transparent 60%),
    linear-gradient(160deg, #1b3fa8 0%, #12295f 60%, #0d1d45 100%);
  color: #fff;
  padding: 56px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.auth-hero::before {
  content: ""; position: absolute; right: 60px; top: -120px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .mark {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .22);
}
.auth-brand .name { font-size: 16px; font-weight: 600; letter-spacing: .4px; }
.auth-hero-body { position: relative; z-index: 1; max-width: 460px; }
.auth-hero-body h1 {
  font-size: 36px; line-height: 1.3; font-weight: 700; letter-spacing: -.5px;
  margin-bottom: 16px;
}
.auth-hero-body p { color: rgba(255, 255, 255, .74); font-size: 15px; line-height: 1.85; }
.auth-features { position: relative; z-index: 1; display: grid; gap: 12px; }
.auth-feature { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: rgba(255, 255, 255, .86); }
.auth-feature .dot {
  flex: none; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center; font-size: 11px; margin-top: 1px;
}

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px; background: var(--surface);
}
.auth-card { width: 100%; max-width: 366px; }
.auth-card h2 { font-size: 23px; font-weight: 700; letter-spacing: -.3px; }
.auth-card .sub { color: var(--text-3); font-size: 13.5px; margin-top: 6px; margin-bottom: 26px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.55; }
.field .err { font-size: 12px; color: var(--sub); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(31, 79, 216, .12); }
.input::placeholder { color: #a9b3c2; }
.input:disabled { background: var(--surface-3); color: var(--text-3); }
textarea.input { resize: vertical; min-height: 78px; line-height: 1.65; }

.otp-row { display: flex; gap: 9px; }
.otp-row .input { flex: 1; }
.otp-row .btn { flex: none; white-space: nowrap; }

.split { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-3); font-size: 12px; }
.split::before, .split::after { content: ""; height: 1px; background: var(--border); flex: 1; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s, transform .06s;
  user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: #bcc7d8; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(31, 79, 216, .7);
}
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-600); }
.btn-soft:hover { background: #dde7ff; border-color: transparent; }
.btn-danger { color: var(--sub); border-color: #f4c8c9; background: var(--sub-soft); }
.btn-danger:hover { background: #fbdedf; border-color: #eeb3b5; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-xs { padding: 5px 9px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 15px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------- 应用外壳 ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  display: flex; flex-direction: column;
}
.sidebar-head {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--border); flex: none;
}
.sidebar-head .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(145deg, #2a5ce8, #1634a8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.sidebar-head .title { font-size: 14.5px; font-weight: 650; letter-spacing: .1px; line-height: 1.25; }
.sidebar-head .subtitle { font-size: 11px; color: var(--text-3); font-weight: 400; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group-label {
  font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .8px;
  text-transform: uppercase; padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: var(--radius-sm); color: var(--text-2); cursor: pointer;
  font-weight: 500; margin-bottom: 2px; transition: background .13s, color .13s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item .badge-count {
  margin-left: auto; font-size: 11px; background: var(--surface-3); color: var(--text-2);
  padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.nav-item.active .badge-count { background: #d5e1ff; color: var(--brand-600); }

.sidebar-foot { flex: none; border-top: 1px solid var(--border); padding: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .13s;
}
.user-chip:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, #4b7bf0, #1f4fd8); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.avatar.lg { width: 46px; height: 46px; font-size: 17px; }
.user-chip .u-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.user-chip .u-role { font-size: 11.5px; color: var(--text-3); line-height: 1.3; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); flex: none; position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar h1 { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.topbar .crumbs { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.hamburger { display: none; }

.content { flex: 1; padding: 22px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 200px; }
.page-head h2 { font-size: 20px; font-weight: 680; letter-spacing: -.3px; }
.page-head p { color: var(--text-3); font-size: 13px; margin-top: 3px; }

.scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 45;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------------- 卡片 / 网格 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14.5px; font-weight: 650; }
.card-head .sub { font-size: 12px; color: var(--text-3); }
.card-head .grow { flex: 1; min-width: 0; }
.card-body { padding: 18px; }
.card-body.tight { padding: 10px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }

/* ---------------- 统计卡 ---------------- */
.stat { padding: 16px 17px; }
.stat .k { font-size: 12.5px; color: var(--text-3); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -1px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat .v .unit { font-size: 14px; font-weight: 600; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.stat.accent { background: linear-gradient(150deg, #f4f7ff, #ffffff); border-color: #dbe4fb; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 650; font-size: 12px; color: var(--text-2);
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl .num { font-variant-numeric: tabular-nums; }
table.tbl .right { text-align: right; }
table.tbl .center { text-align: center; }
table.tbl .nowrap { white-space: nowrap; }

.empty { padding: 52px 20px; text-align: center; color: var(--text-3); }
.empty .ico { font-size: 30px; opacity: .35; margin-bottom: 10px; }
.empty p { font-size: 13.5px; }
.empty .btn { margin-top: 14px; }

/* ---------------- 徽章 / 标签 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge-add { background: var(--add-soft); color: #0a7a44; }
.badge-sub { background: var(--sub-soft); color: #c02a30; }
.badge-brand { background: var(--brand-soft); color: var(--brand-600); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: var(--surface-3); color: var(--text-3); }

.score-pill {
  display: inline-block; min-width: 52px; text-align: center;
  padding: 3px 9px; border-radius: 7px; font-weight: 700;
  font-variant-numeric: tabular-nums; font-size: 13px;
}
.score-pill.add { background: var(--add-soft); color: #0a7a44; }
.score-pill.sub { background: var(--sub-soft); color: #c02a30; }

.lvl { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 650; }

/* ---------------- 筛选栏 ---------------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.filters .f { display: flex; flex-direction: column; gap: 5px; }
.filters .f label { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.filters .f .input, .filters .f select { padding: 8px 11px; font-size: 13px; min-width: 130px; }
.filters .grow { flex: 1; min-width: 150px; }

/* ---------------- 进度 / 条形图 ---------------- */
.bar-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.bar-row .bar-label { width: 88px; flex: none; font-size: 13px; color: var(--text-2); font-weight: 550; }
.bar-row .bar-track { flex: 1; height: 9px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.3,1); }
.bar-row .bar-val { width: 62px; flex: none; text-align: right; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); }
.rank-row:hover { background: var(--surface-2); }
.rank-no {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2);
}
.rank-no.r1 { background: linear-gradient(145deg, #f7c948, #e8a600); color: #fff; }
.rank-no.r2 { background: linear-gradient(145deg, #c3cddb, #97a5b8); color: #fff; }
.rank-no.r3 { background: linear-gradient(145deg, #e0a878, #c07d45); color: #fff; }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border);
}
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface);
  border: 2.5px solid var(--border-strong);
}
.tl-item.add::before { border-color: var(--add); }
.tl-item.sub::before { border-color: var(--sub); }
.tl-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .44);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .18s; overflow-y: auto;
}
.modal-backdrop.in { opacity: 1; }
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  transform: translateY(10px) scale(.985); transition: transform .2s cubic-bezier(.2,.8,.3,1);
  margin: auto;
}
.modal-backdrop.in .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 17px 20px;
  border-bottom: 1px solid var(--border); flex: none;
}
.modal-head h3 { font-size: 15.5px; font-weight: 660; flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border); flex: none; background: var(--surface-2);
  border-radius: 0 0 16px 16px;
}
.modal-foot .left { margin-right: auto; }
.confirm-msg { font-size: 14px; color: var(--text-2); line-height: 1.75; }

/* ---------------- 提示 ---------------- */
.toast-host {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: center;
  pointer-events: none; width: min(94vw, 420px);
}
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 15px;
  border-radius: var(--radius-sm); background: #101828; color: #fff;
  box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500;
  opacity: 0; transform: translateY(-10px); transition: all .22s cubic-bezier(.2,.8,.3,1);
  width: 100%; pointer-events: auto;
}
.toast.in { opacity: 1; transform: none; }
.toast.ok { background: #0b7a44; }
.toast.err { background: #b3242a; }
.toast.warn { background: #8a5a00; }
.toast .t-ico { flex: none; font-weight: 700; }

/* ---------------- 杂项 ---------------- */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.bold { font-weight: 650; }
.tnum { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 550;
  background: var(--surface-3); color: var(--text-2); cursor: pointer; border: 1px solid transparent;
  transition: all .13s;
}
.chip:hover { background: #e4e9f2; }
.chip.on { background: var(--brand-soft); color: var(--brand-600); border-color: #c3d3fb; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tab {
  padding: 12px 14px; font-size: 13.5px; font-weight: 550; color: var(--text-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text-2); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }

.pick-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.pick-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid #eef1f6; cursor: pointer; font-size: 13.5px;
}
.pick-item:last-child { border-bottom: none; }
.pick-item:hover { background: var(--surface); }
.pick-item input { width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.pick-item .cls { color: var(--text-3); font-size: 12px; margin-left: auto; }

.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.status-dot.on { background: var(--add); }
.status-dot.off { background: #b8c2d1; }
.status-dot.wait { background: var(--warn); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

.notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft-2); border: 1px solid #dbe4fb; font-size: 13px; color: var(--text-2);
  line-height: 1.7;
}
.notice.warn { background: var(--warn-soft); border-color: #f2ddb6; }
.notice .n-ico { flex: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.8,.3,1); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { padding: 34px 20px; background: var(--bg); }
  .auth-card { background: var(--surface); padding: 26px 22px; border-radius: 18px; box-shadow: var(--shadow); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 23px; }
  .page-head h2 { font-size: 18px; }
  .filters { padding: 12px 14px; }
  .filters .f, .filters .f .input, .filters .f select { width: 100%; min-width: 0; }
  .filters .f { flex: 1 1 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal-foot { border-radius: 0; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- 打印（违纪登记表等） ---------------- */
#print-host { display: none; }
.print-sheet { font-family: "SimSun", "Songti SC", serif; color: #000; font-size: 14px; }
.print-sheet h1 { text-align: center; font-size: 22px; margin: 0 0 6px; letter-spacing: 2px; }
.print-sheet .ps-sub { text-align: center; font-size: 13px; margin-bottom: 14px; }
.print-sheet table { width: 100%; border-collapse: collapse; }
.print-sheet td, .print-sheet th { border: 1px solid #000; padding: 8px 10px; vertical-align: top; line-height: 1.7; }
.print-sheet th { width: 92px; font-weight: 700; text-align: center; vertical-align: middle; }
.print-sheet .ps-tall { height: 110px; white-space: pre-wrap; }
.print-sheet .ps-sign { text-align: right; margin-top: 18px; padding-right: 8px; }
@media print {
  body.printing > *:not(#print-host) { display: none !important; }
  body.printing #print-host { display: block; }
  @page { size: A4; margin: 16mm; }
}

/* 量化考核网格 */
.qt-grid th, .qt-grid td { padding: 6px 6px; text-align: center; white-space: nowrap; font-size: 13px; }
.qt-grid td:first-child { text-align: left; }
.qt-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.qd-cell { min-width: 54px; padding: 4px 6px; border: 1px dashed var(--border); border-radius: 6px; background: var(--surface);
  color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.qd-cell:hover { border-color: var(--brand); background: var(--brand-soft); }
.qd-cell .stu { display: block; font-size: 11px; color: var(--muted); }
.tbl tr.row-on td { background: var(--brand-soft); }
.qi { width: 54px; padding: 4px 4px; border: 1px solid var(--border); border-radius: 6px; text-align: center;
  font: inherit; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--text); }
.qi:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
