: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: ui-monospace, "SF Mono", Menlo, Consolas, "Microsoft YaHei Mono", monospace;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", 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% — 会把导航 tab/行内操作按钮撑成整行橙条 */
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 16px rgba(255, 90, 31, 0.22);
}
.btn.primary:hover { background: var(--accent-hover); }
/* 表单主按钮仍可通栏 */
.form > .btn.primary,
.form .btn.primary:last-of-type,
.auth-card .btn.primary,
.auth-shell .btn.primary {
  width: 100%;
  margin-top: 6px;
}
.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 · 侧栏工作台 —— */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-body {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  min-height: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  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;
}
/* 侧栏导航（桌面） / 顶栏芯片（移动见 media） */
.nav.side-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 200px;
  flex: 0 0 200px;
  padding: 18px 12px 32px 16px;
  border-right: var(--hairline);
  background: color-mix(in srgb, var(--bg-deep) 55%, var(--card));
  position: sticky;
  top: 52px;
  align-self: flex-start;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* 组内按钮全隐藏时整组消失 */
.nav-group:not(:has(.nav-item:not(.hidden))) {
  display: none;
}
.nav-group-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 0 10px 6px;
  font-family: var(--mono);
}
.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  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;
  text-align: left;
  width: 100%;
}
.nav-item:hover { color: var(--text); background: rgba(11,13,18,0.05); }
html[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,0.05); }
.nav-item.active {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
html[data-theme="dark"] .nav-item.active {
  background: #f2f4f8;
  color: #0b0d12;
}
.content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 20px 24px 64px;
}
body.on-home .nav.side-nav {
  /* 文化首页仍可侧栏切走 */
}

/* 页头：标题区 + 工具，替代大 hero 平铺 */
.page-chrome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: var(--hairline);
}
.page-chrome h1 {
  font-size: clamp(22px, 2.6vw, 26px);
  letter-spacing: var(--tracking-tight);
  font-weight: 650;
  margin: 0 0 4px;
  line-height: var(--lh-tight);
  color: var(--text);
}
.page-chrome .page-meta {
  margin: 2px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.4;
}
.page-chrome-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.page-foot-hint {
  margin-top: 16px !important;
  padding-top: 12px;
  border-top: var(--hairline);
}

/* KPI 条：紧凑横条感 */
.kpi-strip {
  margin: 0 0 16px !important;
}
.kpi-strip.kpi-grid {
  gap: 8px;
}
.kpi-strip .kpi {
  padding: 12px 14px 12px 16px;
  min-height: 0;
  border-radius: 12px;
}
.kpi-strip .kpi .value {
  font-size: 22px;
  margin-top: 4px;
}

/* 工作台 Tab：总览分区，告别一屏平铺 */
.work-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  background: var(--bg-deep);
  border: var(--hairline);
  border-radius: 12px;
  position: sticky;
  top: 52px;
  z-index: 12;
  backdrop-filter: blur(8px);
}
.work-tab {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.work-tab:hover { color: var(--text); }
.work-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.work-tab-panels { min-height: 200px; }
.work-pane[hidden] { display: none !important; }
.work-pane:not(.active) { display: none; }
.work-pane.active { display: block; animation: pane-in 0.16s ease; }
@keyframes pane-in {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.list-surface {
  background: var(--card);
  border: var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.list-surface .table-wrap {
  border-radius: 0;
}
.surface-primary {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}
.surface-muted {
  background: var(--bg-deep);
  border-radius: 12px;
  border: var(--hairline);
}
.card-hint {
  margin: 0 0 8px !important;
  padding: 0 2px;
}
.stats-stack { display: flex; flex-direction: column; gap: 12px; }
.stats-pair { gap: 12px; }
.toolbar-sticky {
  position: sticky;
  top: 108px;
  z-index: 5;
  background: var(--card);
  padding: 8px 0 !important;
  margin-bottom: 8px !important;
}

.page-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(22px, 2.8vw, 28px);
  letter-spacing: var(--tracking-tight);
  font-weight: 650;
  margin: 0 0 6px;
  line-height: var(--lh-tight);
  color: var(--text);
}
.hero.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: var(--hairline);
}
.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: 10px;
  margin: 12px 0 14px;
}
.kpi {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 14px 12px 16px;
  box-shadow: none;
  border: var(--hairline);
  position: relative;
  overflow: hidden;
  min-height: 0;
  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: 14px;
  padding: 14px 16px 12px;
  box-shadow: none;
  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: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.card h2 {
  font-size: 13.5px;
  font-weight: 650;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}
.table-dense table {
  font-size: 12.5px;
}
.table-dense th,
.table-dense td {
  padding: 8px 10px;
}
.table-dense th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head);
  backdrop-filter: blur(6px);
}
.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; }

/* 排班查询：按中心/部门着色，方便总监找自己人 */
.shift-center-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 560;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
tr.shift-center-cth td { background: rgba(33, 150, 243, 0.08); }
tr.shift-center-jb td { background: rgba(255, 193, 7, 0.12); }
tr.shift-center-tx td { background: rgba(156, 39, 176, 0.08); }
tr.shift-center-cj td { background: rgba(0, 150, 136, 0.09); }
tr.shift-center-tt td { background: rgba(63, 81, 181, 0.09); }
tr.shift-center-bh td { background: rgba(121, 85, 72, 0.09); }
tr.shift-center-zh td { background: rgba(96, 125, 139, 0.1); }
tr.shift-center-bl td { background: rgba(255, 152, 0, 0.1); }
tr.shift-center-other td { background: rgba(158, 158, 158, 0.07); }
.shift-center-chip.shift-center-cth { background: #BBDEFB; color: #0d47a1; }
.shift-center-chip.shift-center-jb { background: #FFE082; color: #e65100; }
.shift-center-chip.shift-center-tx { background: #E1BEE7; color: #6a1b9a; }
.shift-center-chip.shift-center-cj { background: #B2DFDB; color: #004d40; }
.shift-center-chip.shift-center-tt { background: #C5CAE9; color: #1a237e; }
.shift-center-chip.shift-center-bh { background: #D7CCC8; color: #3e2723; }
.shift-center-chip.shift-center-zh { background: #CFD8DC; color: #263238; }
.shift-center-chip.shift-center-bl { background: #FFCC80; color: #e65100; }
.shift-center-chip.shift-center-other { background: #EEEEEE; color: #424242; }
table.shifts-by-center tr.shift-center-cth:hover td,
table.shifts-by-center tr.shift-center-jb:hover td,
table.shifts-by-center tr.shift-center-tx:hover td,
table.shifts-by-center tr.shift-center-cj:hover td,
table.shifts-by-center tr.shift-center-tt:hover td,
table.shifts-by-center tr.shift-center-bh:hover td,
table.shifts-by-center tr.shift-center-zh:hover td,
table.shifts-by-center tr.shift-center-bl:hover td,
table.shifts-by-center tr.shift-center-other:hover td {
  filter: brightness(0.97);
}

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);
}

/* 挑刺悬赏详情抽屉 */
.fb-drawer-panel {
  width: min(560px, 100%);
}
.fb-drawer-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.fb-drawer-body .fb-full-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  max-height: none;
  font-size: 13.5px;
  line-height: 1.6;
}
.fb-meta-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.fb-meta-grid dt {
  color: var(--muted);
  margin: 0;
}
.fb-meta-grid dd {
  margin: 0;
  word-break: break-word;
}
.fb-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.fb-shots a {
  display: block;
  border: var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  width: 120px;
  height: 90px;
  background: var(--bg);
}
.fb-shots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fb-hermes-box {
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, var(--bg));
  margin-bottom: 14px;
}
.fb-hermes-box h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.fb-hermes-rec {
  display: inline-block;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-right: 6px;
}
.fb-hermes-rec.adopt { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.fb-hermes-rec.reject { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.fb-hermes-rec.needs_info,
.fb-hermes-rec.defer,
.fb-hermes-rec.merge {
  background: color-mix(in srgb, var(--warn, #d97706) 22%, transparent);
  color: var(--warn, #d97706);
}
.fb-row-click {
  cursor: pointer;
}
.fb-row-click:hover td {
  background: color-mix(in srgb, var(--accent, #3b82f6) 6%, transparent);
}
/* ── 挑刺列表：防止长文案/多按钮撑破页面 ── */
#fb-mine-list,
#fb-admin-list,
#fb-backlog-list {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#fb-mine-list table.data,
#fb-admin-list table.data,
#fb-backlog-list table.data {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
#fb-mine-list td,
#fb-admin-list td,
#fb-backlog-list td,
#fb-mine-list th,
#fb-admin-list th,
#fb-backlog-list th {
  overflow: hidden;
  vertical-align: top;
  word-break: break-word;
}
/* 审核台列宽：条目主列吃空间，操作列固定 */
#fb-admin-list table.data col.fb-col-item { width: 42%; }
#fb-admin-list table.data col.fb-col-who { width: 12%; }
#fb-admin-list table.data col.fb-col-hermes { width: 10%; }
#fb-admin-list table.data col.fb-col-sim { width: 8%; }
#fb-admin-list table.data col.fb-col-act { width: 28%; }
/* 覆盖全局 th,td { white-space:nowrap }，否则标题永不换行 */
#fb-admin-list td.fb-item-cell,
#fb-mine-list td.fb-item-cell,
#fb-backlog-list td.fb-item-cell,
#fb-admin-list td.fb-item-cell *,
#fb-mine-list td.fb-item-cell *,
#fb-backlog-list td.fb-item-cell * {
  white-space: normal !important;
}
.fb-item-cell .fb-no {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  white-space: normal !important;
}
.fb-item-cell .fb-title-cell,
.fb-title-cell {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  margin: 2px 0 4px;
  max-width: 100%;
  /* 不用 -webkit-box：与 nowrap 继承冲突且部分内核会落成 flow-root */
  display: block;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* 最多约 2 行，超出省略 */
  max-height: calc(1.4em * 2);
  overflow: hidden;
}
.fb-item-cell .fb-meta-line {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal !important;
}
.fb-body-cell {
  max-width: 100%;
  white-space: normal !important;
  line-height: 1.4;
  font-size: 12.5px;
  color: var(--muted);
  display: block;
  max-height: calc(1.4em * 2);
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* 行内操作：横排密按钮，不堆成高塔 */
#fb-admin-list td.fb-act-cell,
#fb-backlog-list td.fb-act-cell {
  overflow: visible;
  white-space: normal;
}
#fb-admin-list .fb-act-cell,
#fb-backlog-list .fb-act-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
}
#fb-admin-list .fb-act-cell .btn,
#fb-backlog-list .fb-act-cell .btn {
  margin: 0;
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 4px 8px;
  font-size: 11.5px;
}
/* 详情抽屉标题过长 */
#fb-drawer-title {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  max-width: calc(100% - 48px);
}
/* 主内容区永远可收缩，宽表不撑破 shell */
.content,
.panel,
.card,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}
/* 宽表（排班/知识库）限制在 content 内横向滚，不撑整页 */
.panel .table-wrap,
.panel .list-surface {
  max-width: 100%;
  overflow-x: auto;
}

/* 移动：审核台改卡片流，避免 7 列表格横切视口 */
@media (max-width: 768px) {
  #fb-admin-list table.data thead {
    display: none;
  }
  #fb-admin-list table.data,
  #fb-admin-list table.data tbody,
  #fb-admin-list table.data tr,
  #fb-admin-list table.data td {
    display: block;
    width: 100% !important;
    max-width: 100%;
  }
  #fb-admin-list table.data tr {
    border: var(--hairline);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--card);
  }
  #fb-admin-list table.data td {
    border: 0 !important;
    padding: 2px 0 !important;
  }
  #fb-admin-list table.data td.fb-act-cell {
    margin-top: 8px;
    padding-top: 8px !important;
    border-top: var(--hairline) !important;
  }
  #fb-admin-list .fb-act-cell .btn {
    min-height: 34px;
  }
  /* 卡片化后给次要列加标签，避免「未分析 / —」裸飘 */
  #fb-admin-list table.data td:nth-child(2)::before {
    content: "提交 ";
    color: var(--muted-2);
    font-size: 11px;
  }
  #fb-admin-list table.data td:nth-child(3)::before {
    content: "Hermes ";
    color: var(--muted-2);
    font-size: 11px;
  }
  #fb-admin-list table.data td:nth-child(4)::before {
    content: "相似 ";
    color: var(--muted-2);
    font-size: 11px;
  }
  /* tab 条不把 primary 撑满 */
  #panel-feedback .hero-tools .btn.primary,
  .hero-tools .btn.primary,
  .page-chrome-tools .btn.primary,
  td .btn.primary {
    width: auto !important;
    flex: 0 0 auto;
    margin-top: 0;
  }
}

/* 任意 hero-tools / 行内：primary 永不通栏（修整行橙条） */
.hero-tools > .btn.primary,
.page-chrome-tools > .btn.primary,
.fb-act-cell > .btn.primary,
td > .btn.primary,
[data-fb-tab].btn.primary {
  width: auto !important;
  margin-top: 0;
  flex: 0 0 auto;
}

/* 挑刺投稿：文件选择可点、可点区域足够大 */
#form-feedback .fb-file-label {
  display: block;
  cursor: pointer;
}
#form-feedback #fb-files {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: var(--hairline);
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
}
#form-feedback #btn-fb-submit {
  margin-top: 12px;
  min-height: 44px;
}
#form-feedback #fb-submit-msg.msg.ok {
  color: var(--ok, #027a48);
}
#form-feedback #fb-submit-msg.msg.bad {
  color: var(--bad);
}

/* 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);
  cursor: pointer;
}
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;
  z-index: 1;
  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 {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  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; }
/* 日历日状态：合格 / 缺交 / 请假休息 */
.cal-day.ok-day { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.cal-day.miss { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.cal-day.pending-day {
  background: color-mix(in srgb, var(--warn, #d97706) 22%, transparent);
  color: var(--warn, #d97706);
}
.cal-day.leave-day { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.cal-day.unk-day { background: var(--border); color: var(--muted); }
.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);
  /* button reset when cal-day is <button> */
  padding: 0;
  margin: 0;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
button.cal-day:hover,
button.cal-day:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-1px);
}
button.cal-day.is-selected {
  box-shadow: 0 0 0 2px var(--accent);
}
.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);
}

/* 当日详情卡（抽屉内） */
.day-detail-card {
  border: var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg);
}
.day-detail-card .dd-date {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.day-detail-card .dd-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.day-detail-card .dd-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.day-detail-card .dd-grid .dd-k {
  color: var(--muted);
}
.day-detail-card .dd-grid .dd-v {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.day-detail-card .dd-tip {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2, var(--muted));
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft, var(--border)) 55%, transparent);
}
.day-detail-card .dd-tip.bad {
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--text);
}
.day-detail-card .dd-tip.ok {
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}
.day-detail-card .dd-tip.warn {
  background: color-mix(in srgb, var(--warn, #d97706) 14%, transparent);
}
.day-detail-card .dd-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* 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;
  word-break: break-word;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  max-height: min(70vh, 520px);
  overflow: auto;
}

/* 总览 · 已交日报正文 */
.reports-day-card .card-head.row-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.reports-day-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.reports-day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding: 0 2px 8px;
  -webkit-overflow-scrolling: touch;
}
.panel-workbench .reports-day-card {
  margin: 0;
  box-shadow: none;
}
.report-item {
  border: var(--hairline);
  border-radius: 12px;
  background: var(--bg);
  padding: 12px 14px;
}
.report-item.is-open {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.report-item .ri-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}
.report-item .ri-name {
  font-weight: 650;
  color: var(--text);
  font-size: 14.5px;
}
.report-item .ri-dept {
  color: var(--muted);
  font-size: 12.5px;
}
.report-item .ri-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-item .ri-preview {
  margin: 8px 0 10px;
  color: var(--text-2, var(--muted));
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 3.9em;
  overflow: hidden;
}
.report-item.is-open .ri-preview { display: none; }
.report-item .ri-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.report-item .ri-body-wrap {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: var(--hairline);
}
.report-item.is-open .ri-body-wrap { display: block; }
.report-item .ri-body {
  margin: 0 0 10px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--card);
  border: var(--hairline);
  border-radius: 10px;
  max-height: min(55vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* 日报全文弹层（总经理总览主路径） */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.report-modal.hidden { display: none !important; }
.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 18, 0.5);
  backdrop-filter: blur(2px);
}
.report-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  background: var(--card);
  border: var(--hairline);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.18s ease;
}
@media (min-width: 720px) {
  .report-modal {
    align-items: center;
    padding: 24px;
  }
  .report-modal-panel {
    border-radius: 16px;
    max-height: min(86vh, 860px);
  }
}
.report-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: var(--hairline);
  flex-shrink: 0;
}
.report-modal-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.report-modal-body {
  margin: 0;
  padding: 16px 18px;
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  min-height: 180px;
}
.report-modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: var(--hairline);
  flex-shrink: 0;
}
.days-table-hint tr.row-click:hover td {
  background: color-mix(in srgb, var(--accent-soft, var(--border)) 35%, transparent);
}

/* 抽屉内日报正文 */
.day-report-body {
  margin-top: 12px;
  border: var(--hairline);
  border-radius: 12px;
  background: var(--bg);
  padding: 12px 14px;
}
.day-report-body .dr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.day-report-body .dr-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  max-height: min(55vh, 420px);
  overflow: auto;
}
.day-report-body .dr-loading,
.day-report-body .dr-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.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: 8px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  align-content: start;
}
@media (max-width: 720px) {
  .risk-items { grid-template-columns: 1fr; max-height: min(65vh, 560px); }
}
.risk-card {
  border: var(--hairline);
  border-radius: 11px;
  padding: 11px 12px;
  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; }
}

/* —— mobile shell (phone / WeCom webview) —— */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }
  .brand-page { display: none; }
  .brand-sep { display: none; }
  .who {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    margin-right: 0;
    padding: 4px 8px;
  }
  .top-actions {
    margin-left: auto;
    gap: 4px;
  }
  .top-actions .theme-topbar { display: none; }
  .top-actions #btn-logout {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* 移动：侧栏收成顶栏横向分组芯片 */
  .app-body {
    flex-direction: column;
    max-width: none;
  }
  .nav.side-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    flex: none;
    max-height: none;
    position: sticky;
    top: 52px;
    z-index: 15;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: var(--hairline);
    background: var(--topbar-bg);
    backdrop-filter: saturate(160%) blur(16px);
    scrollbar-width: none;
    align-items: center;
  }
  .nav.side-nav::-webkit-scrollbar { display: none; }
  .nav-group {
    flex-direction: row;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
    padding-right: 8px;
    border-right: 1px solid var(--border);
  }
  .nav-group:last-child { border-right: 0; }
  .nav-group-label {
    display: none;
  }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 11px;
    font-size: 12.5px;
    text-align: center;
  }

  .content {
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
  .work-tabs {
    top: 100px;
  }
  .page-chrome {
    flex-direction: column;
    align-items: stretch;
  }
  .page-chrome-tools {
    justify-content: stretch;
  }
  .page-chrome-tools .search,
  .page-chrome-tools input[type="date"] {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }

  .hero.row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero h1 {
    font-size: 22px;
    line-height: 1.2;
  }
  .hero-tools {
    width: 100%;
  }
  .hero-tools .search,
  .hero-tools select,
  .hero-tools input[type="date"] {
    max-width: none;
    width: 100%;
    flex: 1 1 100%;
    min-height: 40px;
  }
  .hero-tools .btn {
    min-height: 40px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi {
    padding: 12px 12px 14px;
  }
  .kpi .value { font-size: 22px; }

  .grid-2,
  .mine-grid {
    grid-template-columns: 1fr;
  }
  .account-identity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
  }
  table {
    font-size: 12px;
    min-width: 480px;
  }
  th, td {
    padding: 9px 10px;
  }
  /* 姓名列尽量不截断过狠 */
  td.name-link { white-space: nowrap; }

  .card-pad { border-radius: 12px; }
  .card-head {
    flex-wrap: wrap;
    gap: 4px;
  }

  .drawer-panel {
    width: min(100vw, 100%);
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }
  .drawer {
    align-items: flex-end;
  }

  .notif-panel {
    right: 8px;
    left: 8px;
    width: auto;
    top: 56px;
  }

  .theme-fab {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: 12px;
    z-index: 25;
  }

  .auth-shell {
    max-width: none;
    min-height: 100dvh;
    padding: 0;
  }
  .auth-aside {
    display: none;
  }
  .auth-card,
  .auth-card.solo {
    margin: 0;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    padding: 28px 20px max(28px, env(safe-area-inset-bottom));
    box-shadow: none;
  }

  .brand-hero { padding: 24px 0 20px; }
  .brand-title { font-size: 28px; }
  .brand-tagline { font-size: 14px; }

  .empty-state.pad { padding: 20px 12px; }

  /* 触摸目标 */
  .btn.sm { min-height: 36px; padding: 8px 12px; }
  .btn-urge-one { min-height: 36px; }
}

@media (max-width: 380px) {
  .who { display: none; }
  .kpi-grid { gap: 6px; }
  .kpi .value { font-size: 20px; }
}

/* 员工态：管理导出等已由 JS 隐藏；补样式 */
body.role-employee .nav-mgmt { display: none !important; }
body.role-employee #btn-run-ai { display: none !important; }
body.role-manager .nav-emp { display: none !important; }

/* —— payroll rulebook · versioned review —— */
.payroll-subnav {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin: 0 0 18px;
  border: var(--hairline);
  border-radius: 11px;
  background: var(--bg-deep);
}
.payroll-subnav-item {
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 600 12.5px/1.2 var(--font);
  cursor: pointer;
}
.payroll-subnav-item:hover { color: var(--text); }
.payroll-subnav-item.active {
  color: var(--text);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.payroll-rules-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.payroll-rules-header h1 {
  margin: 0 0 5px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.payroll-rules-header p { margin-top: 0; }
.payroll-rules-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.payroll-rules-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 15px 17px;
  margin-bottom: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.payroll-rules-version-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.payroll-rules-version-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.payroll-rules-version-main strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  color: var(--text);
}
.payroll-rules-version-meta {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 11.5px;
}
.payroll-rules-document { margin-bottom: 12px; }
.payroll-rules-document-body {
  max-height: min(58vh, 640px);
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border-top: var(--hairline);
  background: var(--bg);
  color: var(--text);
  font: 12px/1.65 var(--mono);
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.payroll-rules-document .msg { margin: 8px 14px 12px; }
.payroll-rules-page-msg {
  min-height: 0;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.payroll-rules-page-msg:empty { display: none; }
.payroll-rules-page-msg.ok { color: var(--ok); }
.payroll-rules-page-msg.warn { color: var(--warn); }
.payroll-rules-page-msg.bad { color: var(--bad); }
.payroll-rules-attention-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.payroll-rules-attention-list:empty { display: none; }
.payroll-rules-attention-item {
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--warn) 7%, var(--card));
  color: var(--text);
  font-size: 12px;
}
.payroll-rules-attention-item.danger {
  border-color: color-mix(in srgb, var(--bad) 38%, var(--border));
  background: color-mix(in srgb, var(--bad) 7%, var(--card));
}
.payroll-rules-attention-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
.payroll-rules-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}
.payroll-rules-alert p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.payroll-rules-alert-danger {
  border-color: color-mix(in srgb, var(--bad) 42%, var(--border));
  background: color-mix(in srgb, var(--bad) 8%, var(--card));
}
.payroll-rule-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.payroll-rule-badge.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.payroll-rule-badge.danger {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.payroll-rule-badge.ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}
.payroll-rules-pending { margin-bottom: 14px; }
.payroll-rules-pending-body { padding: 13px 14px 15px; }
.payroll-rules-reason {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: var(--hairline);
}
.payroll-rules-reason > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.payroll-rules-reason p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.payroll-rules-change-list {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.payroll-rule-version-row {
  display: grid;
  grid-template-columns: minmax(54px, auto) minmax(120px, auto) minmax(150px, auto) minmax(180px, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 10px 11px;
  border: var(--hairline);
  border-radius: 9px;
  background: var(--bg);
  font-size: 12px;
}
.payroll-rule-version-state {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.payroll-rule-version-state.scheduled {
  color: var(--accent);
  background: var(--accent-soft);
}
.payroll-rule-version-state.superseded {
  color: var(--muted);
  background: var(--chip-bg);
}
.payroll-rule-version-state.rejected {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.payroll-rule-version-reason {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.payroll-rule-change {
  display: grid;
  grid-template-columns: minmax(130px, .9fr) minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: var(--hairline);
  border-radius: 9px;
  background: var(--bg);
  font-size: 12px;
}
.payroll-rule-change.is-attention {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--border));
}
.payroll-rule-change-label {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.payroll-rule-change-before,
.payroll-rule-change-after {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0;
}
.payroll-rule-change-after { color: var(--text); }
.payroll-rule-change-arrow { color: var(--muted-2); text-align: center; }
.payroll-rules-review-note {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
}
.payroll-rules-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.payroll-rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
  align-items: start;
}
.payroll-rules-main {
  min-width: 0;
  padding: 14px;
  border: var(--hairline);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.payroll-rules-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 12px;
  border-bottom: var(--hairline);
}
.payroll-rules-section-head h2 { margin: 0 0 3px; font-size: 17px; }
.payroll-rules-section-head p { margin: 0; }
.payroll-rules-modules {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.payroll-rules-draft {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid var(--border-strong);
}
.payroll-rules-draft.is-scheduled-base {
  border-top-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.payroll-rules-draft .payroll-rules-section-head {
  padding-left: 2px;
  padding-right: 2px;
}
.payroll-rules-loading {
  padding: 30px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.payroll-rule-module {
  border: var(--hairline);
  border-radius: 11px;
  overflow: hidden;
  background: var(--card);
}
.payroll-rule-module > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  background: var(--bg);
}
.payroll-rule-module > summary::-webkit-details-marker { display: none; }
.payroll-rule-module > summary::after {
  content: "展开";
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
}
.payroll-rule-module[open] > summary::after { content: "收起"; }
.payroll-rule-module-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.payroll-rule-module-title strong { font-size: 13.5px; }
.payroll-rule-module-title span {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payroll-rule-module-body { padding: 5px 13px 9px; }
.payroll-rule-field,
.payroll-rule-empty {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 10px 16px;
  min-height: 46px;
  padding: 8px 0;
  border-bottom: var(--hairline);
}
.payroll-rule-field:last-child,
.payroll-rule-empty:last-child { border-bottom: 0; }
.payroll-rule-field.is-attention {
  margin: 0 -7px;
  padding-left: 7px;
  padding-right: 7px;
  border-radius: 8px;
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--bad) 7%, transparent);
}
.payroll-rule-field-label {
  min-width: 0;
}
.payroll-rule-field-label strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}
.payroll-rule-field-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.payroll-rule-field-value {
  min-width: 0;
  color: var(--text);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.payroll-rule-field-value.readonly {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--bg);
  font-weight: 550;
}
.payroll-rule-field-value input,
.payroll-rule-field-value select,
.payroll-rule-field-value textarea {
  width: 100%;
  min-height: 38px;
  margin: 0;
}
.payroll-rule-field-value textarea {
  resize: vertical;
  line-height: 1.45;
}
.payroll-rule-group {
  margin: 5px 0 7px;
  padding: 8px 10px 5px;
  border-left: 2px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-radius: 0 8px 8px 0;
}
.payroll-rule-group-title {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.payroll-rule-array-item {
  margin-top: 7px;
  padding: 2px 9px 4px;
  border: var(--hairline);
  border-radius: 8px;
  background: var(--card);
}
.payroll-rule-array-item-title {
  margin: 7px 0 0;
  color: var(--muted-2);
  font: 600 10.5px/1.3 var(--mono);
  letter-spacing: .04em;
}
.payroll-rules-proposal {
  position: sticky;
  top: 68px;
}
.payroll-rules-proposal-form {
  display: grid;
  gap: 12px;
  padding: 13px 14px 15px;
}
.payroll-rules-proposal-form p { margin: 0; }
.payroll-rules-proposal-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.payroll-rules-proposal-form .btn { width: 100%; }
.payroll-rules-dirty {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}
.payroll-rules-dirty.is-dirty {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.payroll-workflow-note {
  display: inline-block;
  max-width: 230px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  vertical-align: middle;
}
.payroll-workflow-preview {
  margin-top: 3px;
  color: var(--warn);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}
.payroll-review-evidence {
  min-width: 210px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.payroll-review-evidence strong { color: var(--text); }
.payroll-review-critical {
  color: var(--danger);
  font-weight: 700;
}
.payroll-review-critical strong { color: inherit; }
.btn.outline.payroll-review-reject {
  border-color: color-mix(in srgb, var(--bad) 42%, var(--border));
  color: var(--bad);
}
.btn.outline.payroll-review-reject:hover {
  background: color-mix(in srgb, var(--bad) 9%, transparent);
}
.payroll-payment-upload {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 960px) {
  .payroll-rules-layout { grid-template-columns: 1fr; }
  .payroll-rules-proposal { position: static; }
}

@media (max-width: 640px) {
  .payroll-subnav { display: flex; width: 100%; }
  .payroll-subnav-item { flex: 1 1 0; min-height: 40px; }
  .payroll-rules-header { flex-direction: column; align-items: stretch; }
  .payroll-rules-header .btn { min-height: 40px; }
  .payroll-rules-header-actions { justify-content: stretch; }
  .payroll-rules-header-actions .btn { flex: 1 1 100%; }
  .payroll-rules-document .card-head { align-items: flex-start; }
  .payroll-rules-document-body { max-height: 54vh; padding: 12px; }
  .payroll-rules-version { align-items: flex-start; flex-direction: column; }
  .payroll-rules-version-meta { justify-content: flex-start; }
  .payroll-rules-alert { align-items: stretch; flex-direction: column; }
  .payroll-rules-alert .payroll-rule-badge { align-self: flex-start; }
  .payroll-rules-reason { grid-template-columns: 1fr; gap: 3px; }
  .payroll-rule-change {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .payroll-rule-version-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .payroll-rule-change-arrow { text-align: left; }
  .payroll-rule-change-arrow::after { content: "变更为"; }
  .payroll-rule-change-arrow { font-size: 0; }
  .payroll-rule-change-arrow::after { font-size: 10.5px; color: var(--muted-2); }
  .payroll-rules-review-actions .btn { flex: 1 1 100%; min-height: 42px; }
  .payroll-rule-module > summary { min-height: 52px; }
  .payroll-rule-module-title { display: block; }
  .payroll-rule-module-title span { display: block; margin-top: 2px; }
  .payroll-rule-field,
  .payroll-rule-empty {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px 0;
  }
  .payroll-rule-field-value input,
  .payroll-rule-field-value select,
  .payroll-rule-field-value textarea { min-height: 42px; }
}
.empty-state.pad {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
/* =========================================================
   个人工作台 PHUB · 审美：专业工具感 + 低噪音 + 3 秒知下一步
   层级：Chrome → Banner → Hero → Stats → Tabs → Pane
   ========================================================= */
.hub-panel {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 28px;
}

/* —— 顶栏：问候即标题，动作收敛 —— */
.hub-chrome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.hub-chrome-text { min-width: 0; flex: 1 1 200px; }
.hub-greet {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.hub-title {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 680;
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
  color: var(--text);
}
.hub-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.4;
}
.hub-chrome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* —— 管理 banner：一条信息，不是第二套卡片 —— */
.hub-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}
.hub-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}
.hub-banner-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  min-width: 0;
}
.hub-banner-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hub-banner-num.is-bad { color: var(--bad); }
.hub-banner-num.is-ok { color: var(--ok); }
.hub-banner-text {
  font-size: 13px;
  color: var(--text-2);
}
.hub-banner-meta {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.hub-banner-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* —— Hero：唯一强焦点 —— */
.hub-hero {
  margin: 0 0 12px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  box-shadow: var(--shadow-sm);
}
.hub-hero-body { min-height: 72px; }
.hub-loading {
  color: var(--muted);
  font-size: 13.5px;
  padding: 12px 0;
}
.hub-hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 20px;
  align-items: center;
}
.hub-hero-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.hub-hero-status .tag {
  font-size: 12.5px;
  padding: 4px 10px;
}
.hub-hero-shift {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hub-hero-day {
  font-size: 12px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.hub-hero-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 36em;
}
.hub-hero-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.hub-hero-cta {
  justify-self: end;
  align-self: center;
}
.hub-hero-cta .btn {
  min-height: 44px;
  min-width: 132px;
  padding: 0 18px;
  font-weight: 650;
}
.hub-cta-idle {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 13px;
}
.hub-deep-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-deep);
  font-size: 12.5px;
}

/* —— 统计：一行数字，不是 KPI 砖墙 —— */
.hub-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 14px;
  background: var(--border);
  border: var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.hub-stat {
  background: var(--card);
  padding: 12px 10px 11px;
  text-align: center;
  min-width: 0;
}
.hub-stat .lab {
  display: block;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.hub-stat .val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.15;
}
.hub-stat .val.is-bad { color: var(--bad); }
.hub-stat .val.is-ok { color: var(--ok); }
.hub-stat .val.is-warn { color: var(--warn); }

/* —— Tabs —— */
.hub-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  background: var(--bg-deep);
  border: var(--hairline);
  border-radius: 12px;
  position: sticky;
  top: 52px;
  z-index: 8;
}
.hub-tab {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 8px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.hub-tab:hover { color: var(--text); }
.hub-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.hub-pane[hidden] { display: none !important; }
.hub-pane.active { display: block; animation: hub-pane-in 0.14s ease; }
@keyframes hub-pane-in {
  from { opacity: 0.5; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* —— 列表与块 —— */
.hub-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-list-compact { gap: 2px; }
.hub-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: var(--hairline);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.hub-row:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--accent) 5%, var(--card));
}
.hub-row-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hub-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.hub-row-detail {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.hub-empty {
  padding: 20px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--card);
  border: var(--hairline);
  border-radius: 12px;
}

.hub-inline-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.hub-tip {
  border: 0;
  background: var(--bg-deep);
  color: var(--text-2);
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  max-width: 100%;
}
.hub-tip:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.hub-soft-block {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-deep);
  border: var(--hairline);
}
.hub-soft-block.is-empty { display: none; }
.hub-soft-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.hub-soft-body { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.hub-soft-body ul {
  margin: 6px 0 0;
  padding-left: 1.15em;
}
.hub-soft-body li { margin: 3px 0; }
.hub-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.hub-soft-disc {
  font-size: 11.5px;
  color: var(--muted-2);
  margin: 0 0 6px;
}

.hub-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hub-block {
  background: var(--card);
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 12px 14px;
  min-width: 0;
}
.hub-block-full {
  margin-top: 12px;
  background: var(--card);
  border: var(--hairline);
  border-radius: 12px;
  padding: 12px 14px 14px;
}
.hub-block-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.hub-block-btn { margin-top: 10px; }

.hub-week table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.hub-week th {
  text-align: left;
  font-size: 10.5px;
  color: var(--muted-2);
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 6px 8px;
  border: 0;
  background: transparent;
}
.hub-week td {
  padding: 8px 6px;
  border-bottom: var(--hairline);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.hub-week tr:last-child td { border-bottom: 0; }
.hub-week tr.hub-row-focus td {
  background: var(--accent-soft);
}
.hub-week tr[data-day] { cursor: pointer; }
.hub-week tr[data-day]:hover td {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.hub-leave-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.hub-leave-chip {
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-deep);
}
.hub-leave-chip .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-leave-chip .value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hub-benefits {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.hub-benefits-details summary {
  color: var(--text-2);
  cursor: pointer;
  font-size: 12.5px;
}
.hub-benefits-details div {
  margin-top: 8px;
  white-space: pre-line;
}
.hub-announce-item {
  padding: 10px 0;
  border-bottom: var(--hairline);
}
.hub-announce-item:last-child { border-bottom: 0; }
.hub-announce-title {
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.hub-announce-item p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.hub-foot {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: var(--hairline);
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

/* PREF-REMIND · 个人提醒设置 */
.hub-remind-lead {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.hub-remind-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0 4px;
}
.hub-remind-mode-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}
.hub-remind-mode-pane[hidden] {
  display: none !important;
}
.hub-remind-alarm-tip {
  margin: 6px 0 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.hub-remind-alarm-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.hub-remind-alarm-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hub-remind-alarm-row input[type="time"],
.hub-remind-alarm-new {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  border: var(--hairline);
  background: var(--bg);
  color: var(--text);
}
.hub-remind-alarm-addrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hub-remind-alarm-empty {
  font-size: 12px;
  color: var(--muted-2);
  padding: 6px 0;
}
.hub-remind-status {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-deep);
  color: var(--text-2);
}
.hub-remind-status.warn {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 12%, transparent);
}
.hub-remind-status.ok {
  color: var(--text-2);
}
.hub-remind-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hub-remind-row.master {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13.5px;
}
.hub-remind-fs {
  border: var(--hairline);
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin: 0;
}
.hub-remind-fs legend {
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.hub-remind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
}
.hub-remind-grid.quiet {
  margin-top: 0;
}
.hub-remind-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.hub-remind-grid label select,
.hub-remind-grid label input[type="time"] {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  border: var(--hairline);
  background: var(--bg);
  color: var(--text);
}
.hub-remind-check {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  font-size: 12.5px !important;
  color: var(--text-2) !important;
  padding-top: 18px;
}
.hub-remind-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.4;
  word-break: break-all;
}
.hub-remind-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-remind-msg {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .hub-remind-grid {
    grid-template-columns: 1fr;
  }
  .hub-remind-check {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .hub-hero-row {
    grid-template-columns: 1fr;
  }
  .hub-hero-cta {
    justify-self: stretch;
  }
  .hub-hero-cta .btn {
    width: 100%;
  }
  .hub-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hub-split {
    grid-template-columns: 1fr;
  }
  .hub-week {
    max-width: 100%;
    overflow-x: auto;
  }
  .hub-week table {
    min-width: 100%;
    table-layout: fixed;
  }
  .hub-week th,
  .hub-week td {
    padding-left: 4px;
    padding-right: 4px;
    white-space: nowrap;
  }
  .hub-tabs {
    top: 48px;
  }
  .hub-chrome-actions .btn.sm {
    min-height: 36px;
  }
}

/* 企微/微信内置浏览器：引导系统浏览器打开 */
html.has-open-browser-bar #app {
  padding-bottom: 200px;
}
.open-browser-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(11,13,18,0.55) 30%);
  pointer-events: none;
}
.open-browser-bar .obb-inner {
  pointer-events: auto;
  max-width: 440px;
  margin: 0 auto;
  background: var(--card);
  border: var(--hairline);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.open-browser-bar.obb-collapsed { display: none; }
.obb-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.obb-desc { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.obb-desc b { color: var(--warn); }
.obb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.obb-btn {
  border: var(--hairline);
  background: var(--bg-deep);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}
.obb-btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.obb-btn.ghost { background: transparent; color: var(--muted); }
.obb-url {
  margin: 10px 0 0;
  font-size: 10px;
  color: var(--muted-2);
  word-break: break-all;
  font-family: var(--mono);
}
.obb-tip { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.obb-tip b { color: var(--accent); }

/* ---- 部门知识库 ---- */
.kb-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 860px) {
  .kb-layout { grid-template-columns: 1fr; }
}
.kb-lib-list { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.kb-lib-item {
  text-align: left;
  border: var(--hairline);
  background: var(--bg-deep);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
}
.kb-lib-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.kb-lib-name { font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-lib-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.kb-lib-desc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.kb-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  border: var(--hairline);
}
.kb-tag.pilot { color: var(--accent); border-color: var(--accent); }
.kb-tag.edit { color: var(--ok); border-color: var(--ok); }
.kb-main { display: flex; flex-direction: column; gap: 14px; }
.kb-upload-form label { display: block; margin-bottom: 10px; font-size: 13px; }
.kb-upload-form input[type="file"],
.kb-upload-form input[type="text"],
.kb-upload-form input:not([type]) {
  width: 100%;
  margin-top: 4px;
}
.kb-check { display: flex !important; align-items: center; gap: 8px; font-size: 13px; }
.kb-check input { width: auto !important; margin: 0 !important; }
.kb-search-row { display: flex; gap: 8px; padding: 12px; }
.kb-search-row input { flex: 1; }
.kb-try-hits { padding: 0 12px 12px; line-height: 1.45; }
.kb-hit { margin-bottom: 10px; padding-bottom: 8px; border-bottom: var(--hairline); }
.kb-actions { white-space: nowrap; }
.auth-register-hint { margin: 10px 0 0; line-height: 1.45; }
.agent-session-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: var(--hairline);
}
.agent-session-row:last-child { border-bottom: 0; }
.account-identity-card { margin-bottom: 14px; }
.account-identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}
.account-identity-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-deep);
}
.account-identity-item span { color: var(--muted); font-size: 11px; }
.account-identity-item strong { font-size: 13px; font-weight: 600; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.input-sm {
  border: var(--hairline);
  background: var(--bg-deep);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }
.btn.bad { color: var(--bad); }
