:root,
html[data-theme="light"] {
  /* P1-tech：冷灰底 + 暖橙 accent */
  --bg: #f4f5f7;
  --bg-deep: #e8eaee;
  --card: #ffffff;
  --text: #0b0d12;
  --text-2: #1c2230;
  --muted: #5c6578;
  --muted-2: #8b93a7;
  --border: #e2e5ec;
  --border-strong: #c9ceda;
  --accent: #ff5a1f;
  --accent-hover: #e04a14;
  --accent-soft: rgba(255, 90, 31, 0.12);
  --ok: #12b76a;
  --warn: #f79009;
  --bad: #f04438;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(11, 13, 18, 0.03), 0 18px 48px rgba(11, 13, 18, 0.06);
  --shadow-sm: 0 1px 2px rgba(11, 13, 18, 0.04), 0 4px 16px rgba(11, 13, 18, 0.03);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --hairline: 1px solid var(--border);
  --grid-line: rgba(11, 13, 18, 0.045);
  --glow-1: rgba(255, 90, 31, 0.14);
  --glow-2: rgba(11, 13, 18, 0.05);
  --topbar-bg: rgba(255, 255, 255, 0.8);
  --input-bg: #ffffff;
  --mark-from: #222733;
  --mark-to: #0b0d12;
  --aside-from: #171a22;
  --aside-to: #0b0d12;
  --table-head: rgba(244, 245, 247, 0.85);
  --chip-bg: rgba(11, 13, 18, 0.04);
  --title-grad-from: #0b0d12;
  --title-grad-to: #2a3140;
  /* type scale */
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 28px;
  --fs-display: clamp(42px, 6.8vw, 64px);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.6;
  --tracking-tight: -0.03em;
  --tracking-display: -0.042em;
}

/* 深色模式 — 夜晚 / 手动 */
html[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-deep: #151922;
  --card: #12151c;
  --text: #f2f4f8;
  --text-2: #e4e7ee;
  --muted: #9aa3b5;
  --muted-2: #6b7386;
  --border: #252a36;
  --border-strong: #343b4a;
  --accent: #ff6a35;
  --accent-hover: #ff814f;
  --accent-soft: rgba(255, 106, 53, 0.16);
  --ok: #32d583;
  --warn: #fdb022;
  --bad: #f97066;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25);
  --hairline: 1px solid var(--border);
  --grid-line: rgba(255, 255, 255, 0.045);
  --glow-1: rgba(255, 90, 31, 0.18);
  --glow-2: rgba(80, 120, 255, 0.06);
  --topbar-bg: rgba(12, 14, 20, 0.82);
  --input-bg: #0e1118;
  --mark-from: #2a3040;
  --mark-to: #12151c;
  --aside-from: #10131a;
  --aside-to: #080a0e;
  --table-head: rgba(18, 21, 28, 0.95);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --title-grad-from: #f7f8fb;
  --title-grad-to: #b8c0d0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: var(--lh-body);
  font-feature-settings: "ss01" on, "cv11" on;
  position: relative;
  font-size: var(--fs-md);
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.9;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 18%, #000 15%, transparent 72%);
}
.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, var(--glow-1), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, var(--glow-2), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(255, 90, 31, 0.05), transparent 55%);
}
#app { position: relative; z-index: 1; }

/* 主题切换 FAB — 全局可见 */
.theme-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  border: var(--hairline);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.theme-fab:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.theme-fab:active { transform: translateY(0); }
.theme-fab-icon {
  font-size: 15px;
  line-height: 1;
  width: 1.2em;
  text-align: center;
}
.theme-fab-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}
html[data-theme-mode="auto"] .theme-fab {
  border-color: rgba(255, 90, 31, 0.28);
}
html[data-theme-mode="auto"] .theme-fab-label {
  color: var(--accent);
}

.hidden { display: none !important; }
.view { min-height: 100vh; }
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* —— mark —— */
.mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--mark-from) 0%, var(--mark-to) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.05em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 10px 28px rgba(11,13,18,0.2);
  position: relative;
  flex-shrink: 0;
}
.mark::after {
  content: "";
  position: absolute;
  inset: auto 6px 6px auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 90, 31, 0.22);
}
.mark.sm { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
.mark.xs {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 8px;
  display: inline-flex;
}
.mark.xs::after { width: 5px; height: 5px; inset: auto 4px 4px auto; box-shadow: none; }

/* —— auth —— */
#view-auth, #view-bind {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-shell {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  background: var(--card);
  border: var(--hairline);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.auth-aside {
  background:
    radial-gradient(420px 280px at 18% 18%, rgba(255, 90, 31, 0.24), transparent 58%),
    linear-gradient(165deg, var(--aside-from) 0%, var(--aside-to) 100%);
  color: #f5f6f8;
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 440px;
}
.auth-aside .eyebrow {
  margin: 0 0 12px;
  font-size: 10.5px;
  color: rgba(245, 246, 248, 0.5);
  letter-spacing: 0.16em;
}
.auth-aside h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: var(--tracking-tight);
  font-weight: 650;
  line-height: var(--lh-tight);
}
.auth-aside-desc {
  margin: 12px 0 0;
  color: rgba(245, 246, 248, 0.58);
  font-size: 14px;
  line-height: 1.55;
  max-width: 22em;
}
.auth-aside-foot {
  margin-top: auto;
  font-size: 10px;
  color: rgba(245, 246, 248, 0.38);
  letter-spacing: 0.18em;
}
.auth-card {
  width: 100%;
  padding: 40px 34px 30px;
  background: var(--card);
}
.auth-card.solo {
  max-width: 420px;
  border: var(--hairline);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.logo {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.sub {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 3px 0 0;
  line-height: 1.4;
}
.tabs {
  display: flex;
  gap: 3px;
  background: var(--bg);
  padding: 3px;
  border-radius: 12px;
  margin: 22px 0 20px;
  border: var(--hairline);
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.form label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 13px;
  letter-spacing: 0.04em;
}
.form input, .search {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 13px;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  letter-spacing: -0.01em;
}
.form input::placeholder, .search::placeholder { color: var(--muted-2); }
.mono-input { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.form input:focus, .search:focus {
  border-color: rgba(255, 90, 31, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn {
  border: 0;
  border-radius: 11px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  margin-top: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 10px 24px rgba(255, 90, 31, 0.28);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost {
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover { color: var(--text); }
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.outline:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; font-weight: 550; }
.msg {
  min-height: 1.2em;
  font-size: 13px;
  color: var(--bad);
  margin-top: 12px;
  text-align: center;
}

/* —— main shell —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--topbar-bg);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: var(--hairline);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 2px; }
.brand-home-link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-name {
  font-weight: 650;
  letter-spacing: -0.025em;
  font-size: 13.5px;
}
.brand-sep { color: var(--border-strong); margin: 0 8px; font-weight: 300; }
.brand-page {
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}
.who {
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: var(--hairline);
  letter-spacing: -0.01em;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.notif-btn {
  position: relative;
  border: var(--hairline);
  background: var(--card);
  border-radius: 10px;
  width: 36px;
  height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.notif-btn:hover { border-color: var(--border-strong); }
.notif-icon { font-size: 14px; line-height: 1; }
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.notif-panel {
  position: absolute;
  top: 52px;
  right: 16px;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 480px);
  background: var(--card);
  border: var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: var(--hairline);
  font-size: 13px;
}
.notif-list {
  overflow-y: auto;
  padding: 6px;
}
.notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread {
  background: var(--accent-soft);
  border-color: rgba(255, 90, 31, 0.15);
}
.notif-item .n-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.notif-item .n-body {
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.45;
  max-height: 7.5em;
  overflow: hidden;
}
.notif-item .n-time {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 6px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.nav {
  display: flex;
  gap: 3px;
  padding: 16px 28px 0;
  max-width: 1120px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { color: var(--text); background: rgba(11,13,18,0.04); }
.nav-item.active {
  background: var(--text);
  color: var(--bg);
}
html[data-theme="dark"] .nav-item.active {
  background: #f2f4f8;
  color: #0b0d12;
}
.content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 28px 80px;
}
.page-kicker {
  margin: 0 0 8px;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.16em;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(26px, 3.2vw, 32px);
  letter-spacing: var(--tracking-tight);
  font-weight: 650;
  margin: 0 0 8px;
  line-height: var(--lh-tight);
  color: var(--text);
}
.hero.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.muted {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.patrol-line {
  margin-top: 6px !important;
  font-size: 12.5px !important;
  color: var(--accent) !important;
  font-weight: 500;
}

/* —— KPI cards —— */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 20px;
}
.kpi {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 16px 20px;
  box-shadow: var(--shadow-sm);
  border: var(--hairline);
  position: relative;
  overflow: hidden;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kpi:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(255, 90, 31, 0.25));
}
.kpi .label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
  font-weight: 500;
  line-height: 1.35;
}
.kpi .value {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.045em;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
  font-feature-settings: "tnum" on;
}
.kpi .value.ok { color: var(--ok); }
.kpi .value.bad { color: var(--bad); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-sm);
  border: var(--hairline);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text-2);
  letter-spacing: -0.02em;
}
.card-kicker {
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.12em;
  font-weight: 500;
}
.card-pad {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2px;
  box-shadow: var(--shadow-sm);
  border: var(--hairline);
  overflow: hidden;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  letter-spacing: -0.01em;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  color: var(--muted-2);
  font-weight: 560;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--table-head);
}
td { color: var(--text-2); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 90, 31, 0.025); }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.tag.ok { background: rgba(18, 183, 106, 0.1); color: #027a48; }
.tag.warn { background: rgba(247, 144, 9, 0.12); color: #b54708; }
.tag.bad { background: rgba(240, 68, 56, 0.1); color: #b42318; }
.tag.gray { background: var(--bg-deep); color: var(--muted); }
.search { max-width: 220px; }
.hero-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.row-click { cursor: pointer; }
.row-click:hover td { background: var(--accent-soft) !important; }
.name-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}
.row-click:hover .name-link {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.bad-num { color: var(--bad); font-variant-numeric: tabular-nums; }
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: var(--hairline);
  border-radius: var(--radius);
}

/* person drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 18, 0.45);
  backdrop-filter: blur(2px);
}
html[data-theme="dark"] .drawer-backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: var(--card);
  border-left: var(--hairline);
  box-shadow: var(--shadow);
  padding: 22px 22px 40px;
  overflow-y: auto;
  animation: drawer-in 0.2s ease;
}
@keyframes drawer-in {
  from { transform: translateX(12px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.drawer-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.drawer-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.drawer-kpis .kpi {
  min-height: 0;
  padding: 12px 10px 12px 14px;
}
.drawer-kpis .kpi .value { font-size: 20px; margin-top: 8px; }
.drawer-section { margin-bottom: 22px; }
.drawer-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.cal-months { display: flex; flex-direction: column; gap: 14px; }
.cal-month {
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
}
.cal-month-head {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.cal-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cal-day {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  background: var(--card);
  border: var(--hairline);
  color: var(--text-2);
}
.cal-day.miss {
  background: rgba(240, 68, 56, 0.12);
  border-color: rgba(240, 68, 56, 0.28);
  color: var(--bad);
}
.cal-day.ok-day {
  background: rgba(18, 183, 106, 0.12);
  border-color: rgba(18, 183, 106, 0.28);
  color: var(--ok);
}

/* analysis — 疏朗布局 */
.analysis-body { margin-top: 4px; }
.analysis-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.dept-chip {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
  font-weight: 600;
}
.analysis-name {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.035em;
  font-weight: 650;
  line-height: 1.15;
}
.risk-row { display: flex; flex-wrap: wrap; gap: 8px; max-width: 360px; justify-content: flex-end; }
.analysis-kpis { margin: 0 0 14px; gap: 10px; }
.analysis-kpis.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi.tight { padding: 14px 14px 12px 16px; min-height: 0; }
.kpi.tight .value { font-size: 24px; margin-top: 6px; }
.muted.sm, .sm { font-size: 12.5px !important; }
.summary-text {
  margin: 0 0 18px;
  line-height: 1.55;
  font-size: 14px;
  color: var(--text-2);
  max-width: 72ch;
}
.summary-text.one-line { margin-bottom: 20px; }
.analysis-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.analysis-sections .span-2 { grid-column: 1 / -1; }
.card.soft { padding: 16px 18px; }
.card.soft .card-head { margin-bottom: 10px; padding-bottom: 8px; }
.table-wrap.tight table { font-size: 12.5px; }
.table-wrap.tight th, .table-wrap.tight td { padding: 8px 10px; }
tr.row-self td { background: var(--accent-soft); font-weight: 600; }

.dim-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.dim-row { display: flex; flex-direction: column; gap: 4px; }
.dim-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dim-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.dim-score { font-size: 12px; color: var(--muted); }
.dim-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
}
.dim-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ff8f5a);
}
.ai-box { display: flex; flex-direction: column; gap: 12px; }
.ai-overall {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: start;
}
.ai-rationale { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.ai-foot { margin-top: 2px; }
.ai-bullets { margin: 0; padding-left: 1.1em; font-size: 13px; color: var(--text-2); }
.ai-bullets.warn { color: var(--warn); }

.corpus-intro { font-size: 13px; margin-bottom: 12px; line-height: 1.5; color: var(--text-2); }
.corpus-list { display: flex; flex-direction: column; gap: 8px; }
.corpus-card {
  border: var(--hairline);
  border-radius: 12px;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}
.corpus-card summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
}
.corpus-card summary::-webkit-details-marker { display: none; }
.corpus-card[open] summary { border-bottom: var(--hairline); }
.corpus-text {
  margin: 0;
  padding: 12px 14px 14px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  max-height: 140px;
  overflow: auto;
}
.appeal-list { margin: 0 0 12px; padding-left: 1.1em; font-size: 13px; }
.appeal-list li { margin: 4px 0; }
.appeal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.appeal-form input {
  border: var(--hairline);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}
.appeal-form input[name="reason"] { flex: 1; min-width: 160px; }
select.search {
  appearance: none;
  background: var(--input-bg);
}

/* 今日内容风险预警 */
.risk-alert {
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.risk-alert.loading { opacity: 0.85; }
.risk-alert.level-ok {
  border-color: rgba(18, 183, 106, 0.35);
  background: linear-gradient(180deg, rgba(18, 183, 106, 0.08), var(--card) 48%);
}
.risk-alert.level-warn {
  border-color: rgba(247, 144, 9, 0.4);
  background: linear-gradient(180deg, rgba(247, 144, 9, 0.1), var(--card) 50%);
}
.risk-alert.level-high {
  border-color: rgba(240, 68, 56, 0.45);
  background: linear-gradient(180deg, rgba(240, 68, 56, 0.1), var(--card) 52%);
}
.risk-alert-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.risk-alert-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.risk-headline {
  margin: 0 0 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  font-weight: 550;
  max-width: 80ch;
}
.risk-meta { margin-bottom: 10px; }
.risk-focus {
  margin: 0 0 12px;
  padding-left: 1.15em;
  font-size: 13px;
  color: var(--text-2);
}
.risk-focus:empty { display: none; }
.risk-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.risk-card {
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
}
.risk-card.high { border-color: rgba(240, 68, 56, 0.28); }
.risk-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.risk-card p {
  margin: 6px 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.risk-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.risk-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.risk-empty {
  grid-column: 1 / -1;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .risk-items { grid-template-columns: 1fr; }
}

/* 总经理申诉复核 */
.appeals-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.appeal-review-card {
  background: var(--card);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.appeal-review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.appeal-reason {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.appeal-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: var(--hairline);
}
.appeal-result-input {
  flex: 1;
  min-width: 160px;
  border: var(--hairline);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}
@media (max-width: 900px) {
  .analysis-sections { grid-template-columns: 1fr; }
  .analysis-sections .span-2 { grid-column: auto; }
  .analysis-kpis.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .ai-overall { grid-template-columns: 1fr; }
}

/* —— brand home —— */
.brand-hero {
  text-align: left;
  padding: 44px 0 32px;
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: var(--hairline);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2.2s ease-in-out infinite;
}
.badge-div { opacity: 0.35; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.9); }
}
.brand-title {
  margin: 0 0 14px;
  font-size: var(--fs-display);
  font-weight: 680;
  letter-spacing: var(--tracking-display);
  line-height: 1.02;
  color: var(--text);
  background: linear-gradient(180deg, var(--title-grad-from) 0%, var(--title-grad-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tagline {
  margin: 0 0 30px;
  max-width: 36em;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  font-weight: 450;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn.cta-wide {
  width: auto;
  min-width: 168px;
  margin-top: 0;
  padding: 12px 24px;
  border-radius: 11px;
  font-size: 14px;
}

/* mission / vision */
.brand-mv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 36px;
}
.mv-card {
  background: var(--card);
  border: var(--hairline);
  border-radius: 18px;
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  overflow: hidden;
}
.mv-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.07), transparent 70%);
  pointer-events: none;
}
.mv-card:hover {
  border-color: rgba(255, 90, 31, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.mv-card.accent-edge {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(140deg, rgba(255, 90, 31, 0.65), rgba(11, 13, 18, 0.08) 55%) border-box;
  border: 1px solid transparent;
}
.mv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mv-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.01em;
}
.mv-card.accent-edge .mv-chip {
  background: var(--accent-soft);
  border-color: rgba(255, 90, 31, 0.18);
  color: var(--accent-hover);
}
.mv-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  font-weight: 500;
}
.mv-text {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 19.5px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: var(--lh-snug);
  color: var(--text);
  flex: 1;
  max-width: 22em;
}

/* values */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  font-weight: 600;
}
.section-title {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}
.section-kicker {
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.14em;
  padding-bottom: 3px;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.value-card {
  background: var(--card);
  border: var(--hairline);
  border-radius: 16px;
  padding: 18px 16px 18px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s, box-shadow 0.16s;
  position: relative;
  overflow: hidden;
}
.value-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity 0.16s;
}
.value-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.value-card:hover::before { opacity: 1; }
.value-card .v-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.value-card .v-idx {
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 600;
  min-width: 1.6em;
}
.value-card .v-bar {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.value-card .v-title {
  font-size: 16.5px;
  font-weight: 650;
  margin: 0 0 10px;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}
.value-card .v-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
  flex: 1;
  letter-spacing: 0.005em;
  font-weight: 450;
}

.brand-footer {
  text-align: left;
  color: var(--muted-2);
  font-size: 10.5px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  letter-spacing: 0.12em;
}

@media (max-width: 1100px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .brand-mv { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; max-width: 420px; }
  .auth-aside { min-height: auto; padding: 28px 24px; }
}
@media (max-width: 520px) {
  .values-grid { grid-template-columns: 1fr; }
  .content { padding: 16px 16px 48px; }
  .topbar { padding: 12px 16px; }
  .nav { padding: 10px 16px 0; }
  .hero-actions { width: 100%; }
  .btn.cta-wide { flex: 1; text-align: center; }
  .kpi .value { font-size: 26px; }
  .mv-card { min-height: 0; padding: 18px 18px 20px; }
  .value-card { min-height: 0; }
  .theme-fab { right: 12px; bottom: 12px; padding: 9px 12px; }
  .theme-fab-label { display: none; }
}
