/* app/static/css/app.css — D-10 死令:pre/code 禁止被 white-space 规则吞原文。 */
/* 2026-04-24 · DFORCE OS 第二轮视觉重写(参照 design-ref/前端2/*.png)
   - 默认深海军蓝 + 青蓝渐变 dark · light 作降级保留
   - 圆角 16px / 卡片 rounded-2xl · 内描边 + 微弱内发光
   - 品牌渐变:cyan #22D3FF → blue #5B8DFF
*/
:root {
  /* 默认 = 浅色降级版(纯白 + 暖灰)· dark 才是主目标态 */
  --bg-base:   #F4F6FB;
  --bg-grid:   rgba(15, 23, 42, 0.04);
  --glow-a:    rgba(91, 141, 255, 0.10);
  --glow-b:    rgba(34, 211, 255, 0.08);
  --glow-c:    rgba(167, 139, 250, 0.08);
  --card-bg:   #FFFFFF;
  --card-bg-soft: #F8FAFC;
  --border:    rgba(15, 23, 42, 0.08);
  --border-soft: rgba(15, 23, 42, 0.04);
  --ink-900:   #0F172A;
  --ink-800:   #1E293B;
  --ink-700:   #334155;
  --ink-600:   #475569;
  --ink-500:   #64748B;
  --ink-400:   #94A3B8;
  --ink-300:   #CBD5E1;
  --ink-200:   #E2E8F0;
  --ink-100:   #F1F5F9;
  --ink-50:    #F8FAFC;
  --brand:     #3B6FE5;
  --brand-600: #2A56C2;
  --brand-50:  #EEF3FF;
  --brand-100: #DCE6FF;
  --ok:        #15803D;
  --warn:      #B45309;
  --err:       #B91C1C;
  /* 渐变(品牌主色 = cyan→blue;辅助 = teal/pink/orange/violet) */
  --grad-brand: linear-gradient(135deg, #22D3FF 0%, #5B8DFF 100%);
  --grad-teal:  linear-gradient(135deg, #2DD4BF 0%, #14B8A6 100%);
  --grad-pink:  linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
  --grad-amber: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  --grad-violet:linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
}
html.dark {
  --bg-base:   #070C18;          /* 深海军 · 接近 black 但带蓝相 */
  --bg-grid:   rgba(91, 141, 255, 0.04);
  --glow-a:    rgba(34, 211, 255, 0.10);   /* cyan halo */
  --glow-b:    rgba(91, 141, 255, 0.08);   /* blue halo */
  --glow-c:    rgba(167, 139, 250, 0.06);  /* violet halo */
  --card-bg:   #0F1A30;          /* 卡面 · 比 bg 亮一档 */
  --card-bg-soft: #142139;       /* 卡内子区域 */
  --border:    rgba(91, 141, 255, 0.14);   /* 蓝调描边 */
  --border-soft: rgba(91, 141, 255, 0.08);
  --ink-900:   #E8F0FA;          /* 主文 · 接近白带蓝 */
  --ink-800:   #D5DEEE;
  --ink-700:   #B5C2D8;
  --ink-600:   #8392AE;
  --ink-500:   #6A7A95;
  --ink-400:   #4F5D78;          /* placeholder / 弱化 */
  --ink-300:   #3A4862;
  --ink-200:   #2A364F;
  --ink-100:   #1F2A45;
  --ink-50:    #142139;
  --brand:     #5B8DFF;          /* 主交互蓝 */
  --brand-600: #3B6FE5;
  --brand-50:  rgba(91, 141, 255, 0.10);
  --brand-100: rgba(91, 141, 255, 0.18);
  --ok:        #22C55E;
  --warn:      #F59E0B;
  --err:       #F87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, Roboto, sans-serif;
  color: var(--ink-900);
  background: var(--bg-base);
  transition: background 0.35s ease, color 0.2s ease;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, var(--glow-a), transparent 45%),
    radial-gradient(circle at 82% 8%, var(--glow-c), transparent 40%),
    radial-gradient(circle at 60% 90%, var(--glow-b), transparent 50%);
  background-size: 56px 56px, 56px 56px, 100% 100%, 100% 100%, 100% 100%;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 95%);
          mask-image: radial-gradient(ellipse at center, #000 40%, transparent 95%);
}
body > * { position: relative; z-index: 1; }
/* 2026-04-22:.layout 和 .sidebar-backdrop 取消 stacking context 隔离,
   让 sidebar(layout 内 fixed z:1010)能自然盖在 backdrop(z:990)上,
   否则 layout 自身 z:1 把内部 sidebar 压扁在 body 层(被 backdrop 990 遮)。*/
body > .layout, body > .sidebar-backdrop { z-index: auto; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }
/* Top bar 在新布局里彻底退位 — 只有 mobile 显示 · desktop 隐藏 */
.topbar {
  display: none;
}
@media (max-width: 1279px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 20px;
    background: var(--card-bg); color: var(--ink-900);
    border-bottom: 1px solid var(--border);
  }
}
.topbar .brand { font-size: 16px; font-weight: 600; }

/* Layout:宽屏不再硬截 1600,让内容吃满 · xl 起才横向 · 否则竖向 */
.layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: none;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 40px);
}
@media (min-width: 1280px) {
  .layout { flex-direction: row; gap: 24px; padding: 24px; }
  .layout.layout-no-sidebar { flex-direction: column; }
}
/* 登录页 · 视窗居中卡片(无 sidebar 时的满宽居中壳) */
.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
html.dark .login-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 12px rgba(0,0,0,0.4);
}
.login-card h2 {
  margin: 0 0 20px;
  font-size: 20px;
  color: var(--ink-900);
}

.sidebar {
  background: transparent;
  border: none;
  overflow: visible;
  max-height: none;
  position: static;
  flex-shrink: 0;
}
@media (min-width: 1280px) {
  .sidebar {
    width: 288px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
}

.content {
  flex: 1;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============ 卡片(card)基类 · rounded-2xl + 边框 + 阴影 ============ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark .card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}
.card-hero {
  padding: 20px 24px;
}
.card-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-400);
}
.card-title {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.card-description {
  font-size: 13px; line-height: 1.6;
  color: var(--ink-500);
  max-width: 640px;
}

/* ============ Phase 7.1 第六波 · 侧边栏卡片化 ============ */
.sidebar-inner { display: flex; flex-direction: column; gap: 20px; }
.sidebar-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 12px;
}
html.dark .sidebar-section {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}

/* 品牌头卡片(section.brand)*/
.sidebar-brand {
  padding: 20px 20px 16px;
}
.sidebar-brand-top {
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand-logo {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 58, 230, 0.18);
}
.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
html.dark .sidebar-brand-logo { background: rgba(255,255,255,0.06); }
.sidebar-brand-text { flex: 1; min-width: 0; }
.sidebar-brand-eyebrow {
  font-size: 10px; font-weight: 700;
  color: var(--ink-500);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.sidebar-brand-name {
  margin-top: 2px;
  font-size: 16px; font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-600);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { background: var(--ink-100); color: var(--ink-900); }

/* ============ Hero Card(主区顶部标题卡 · Phase 7.1 第七波)============ */
.hero-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark .hero-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}
/* DFORCE 基准 Hero 深色卡 · 暖米底首页 / 汇总看板顶部
   特指性 >= .content > section(0,1,1)才能覆盖全局卡片化样式 */
.content > section.hero-card-dark,
.hero-card-dark {
  background: #1a1d28;
  border-color: #1a1d28;
  color: #f5f3ee;
  overflow: hidden;
  padding: 0;
}
.hero-card-dark::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 320px; height: 320px;
  background: radial-gradient(closest-side, rgba(217,119,87,0.35), transparent 70%);
  pointer-events: none;
}
.hero-card-dark::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 10%;
  width: 260px; height: 260px;
  background: radial-gradient(closest-side, rgba(138,111,161,0.35), transparent 70%);
  pointer-events: none;
}
.hero-card-dark .hero-card-top-line {
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
}
.hero-card-dark .hero-card-eyebrow {
  color: rgba(245,243,238,0.7);
}
.hero-card-dark .hero-card-eyebrow::before {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
}
.hero-card-dark .hero-card-title { color: #f5f3ee; }
.hero-card-dark .hero-card-description { color: rgba(245,243,238,0.7); }
.hero-card-dark .hero-card-actions .hero-search input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: #f5f3ee;
}
.hero-card-top-line {
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(to right, transparent, var(--ink-300), transparent);
  pointer-events: none;
}
.hero-card-inner {
  position: relative;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 1024px) {
  .hero-card-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
  }
}
.hero-card-text { flex: 1; min-width: 0; }
.hero-card-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-card-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-400);
}
.hero-card-title {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.2;
}
@media (min-width: 640px) {
  .hero-card-title { font-size: 28px; }
}
.hero-card-description {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-500);
  max-width: 640px;
}
.hero-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-card-actions .hero-search {
  position: relative;
  min-width: 240px;
}
.hero-card-actions .hero-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--ink-900);
  font-size: 14px;
}
.hero-card-actions .hero-search::before {
  content: '';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-size: contain;
}
.hero-card-actions select,
.hero-card-actions input[type="date"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--ink-900);
  font-size: 14px;
}
.sidebar-brand-status {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px; line-height: 1.5;
  color: var(--ink-600);
}
.sidebar-brand-status-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  color: var(--ink-500);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.sidebar-brand-status-head::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.sidebar-section-title {
  font-size: 11px; font-weight: 700;
  color: var(--ink-500);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px 12px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  /* 2026-04-22:从 ink-600 加深到 ink-800 提升对比 · 解决"灰色"反馈 */
  color: var(--ink-800);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
html.dark .sidebar-link { color: var(--ink-700); }
.sidebar-link:hover { background: var(--ink-100); color: var(--ink-900); }
.sidebar-link.active {
  background: var(--ink-900);
  color: var(--card-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}
html.dark .sidebar-link.active {
  background: var(--brand-100);
  color: var(--ink-900);
}
.sidebar-link-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  stroke-width: 1.8;
}
/* 2026-04-22:sidebar 底部账号卡 + 退出登录(danger)*/
.sidebar-account {
  margin-top: auto;  /* flex column 里推到底 */
}
.sidebar-account-name {
  display: flex; align-items: center; flex-wrap: wrap;
  padding: 6px 8px 8px; font-size: 13px; color: var(--ink-700);
  margin-bottom: 4px;
}
.sidebar-link.sidebar-link-danger {
  color: var(--err);
}
.sidebar-link.sidebar-link-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}
html.dark .sidebar-link.sidebar-link-danger {
  color: #fca5a5;
}
html.dark .sidebar-link.sidebar-link-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
}
.sidebar-badge {
  margin-left: auto;
  background: var(--err);
  color: #fff;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}
/* 组织树 */
.org-tree { list-style: none; margin: 0; padding: 0; }
.org-depts, .org-groups { list-style: none; margin: 0; padding: 0; }
.org-center-row, .org-dept-row { display: flex; align-items: stretch; }
.org-toggle {
  width: 24px;
  background: none;
  border: none;
  color: var(--ink-400);
  cursor: pointer;
  font-size: 10px;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.org-toggle:hover { color: var(--brand); }
.org-toggle-placeholder {
  width: 24px;
  color: var(--ink-300);
  text-align: center;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.org-caret { display: inline-block; }
.org-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 4px;
  color: var(--ink-700);
  text-decoration: none;
  font-size: 13px;
  border-radius: 10px;
  min-width: 0;
  transition: background 0.15s ease;
}
.org-link:hover { background: var(--ink-100); }
.org-link.active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}
html.dark .org-link.active { color: #b8c4ff; }
.org-center > .org-center-row > .org-link { font-weight: 600; color: var(--ink-900); }
.org-link-dept { padding-left: 8px; font-size: 12.5px; color: var(--ink-600); }
.org-link-group {
  padding-left: 44px;
  font-size: 12px;
  color: var(--ink-500);
}
.org-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-500);
  background: var(--ink-100);
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  font-weight: 500;
}
.org-dept-row .org-toggle { margin-left: 16px; }

/* DFORCE 基准 · 4 中心各自色点(sort_order 1-4 固定映射) */
.center-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
  background: var(--ink-400);
}
.org-center[data-center-id="1"] .center-dot { background: #D97757; } /* 商务中心 · 橙 */
.org-center[data-center-id="2"] .center-dot { background: #5B8C5A; } /* 渠道中心 · 绿 */
.org-center[data-center-id="3"] .center-dot { background: #4C5578; } /* 运营中心 · 藏青 */
.org-center[data-center-id="4"] .center-dot { background: #C79A3A; } /* 技术中心 · 金 */
.org-center[data-center-id="5"] .center-dot { background: #8A6FA1; } /* AI效能中心 · 紫 */

/* 通用窄表单容器(修改密码等)· 自适应宽屏 · input 撑满 */
.simple-form-wrap {
  width: 100%;
  max-width: 820px;
  margin: 32px auto;
}
.simple-form-wrap input,
.simple-form-wrap select,
.simple-form-wrap textarea {
  width: 100%;
  box-sizing: border-box;
}
.simple-form-wrap .form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.simple-form-wrap .form-field { margin-bottom: 16px; }
.simple-form-wrap .btn { width: 100%; justify-content: center; padding: 10px 16px; }

/* 填报表单 · 自适应宽屏 · textarea 撑满 · 段落标题放大 */
.report-form-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}
.report-form-wrap textarea,
.report-form-wrap input[type="text"],
.report-form-wrap input[type="number"],
.report-form-wrap select {
  width: 100%;
  box-sizing: border-box;
}
.report-form-wrap textarea {
  min-height: 140px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
}
.report-form-wrap .section-group {
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
}
.report-form-wrap .section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 12px;
}
.report-form-wrap .anchor-header {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink-500);
  margin: 4px 0 16px;
  white-space: pre;
}

/* 员工编辑表单 · 充分利用宽屏 · 两列字段 */
.employee-form-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
.employee-form-wrap .form-field { margin-bottom: 14px; }
.employee-form-wrap .form-field input,
.employee-form-wrap .form-field select {
  width: 100%;
  box-sizing: border-box;
}
.employee-form-wrap .form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.employee-form-wrap .checkbox-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.employee-form-wrap .checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-weight: 400;
}
.employee-form-wrap .checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}
@media (min-width: 900px) {
  .employee-form-wrap .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .employee-form-wrap .form-grid .form-field { margin-bottom: 14px; }
  .employee-form-wrap .form-grid .form-field-full { grid-column: 1 / -1; }
}

/* 漏报名单按部门分组折叠(QA-2026-04-22 修) */
.missed-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.missed-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.missed-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.missed-group-head:hover { background: var(--ink-100); }
.missed-group-caret {
  width: 16px;
  color: var(--ink-500);
  font-size: 11px;
}
.missed-group-name { flex: 1; }
.missed-group-count {
  font-size: 11px;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}
html.dark .missed-group-count { color: #fcd34d; background: rgba(251,191,36,0.12); }
.missed-group-list {
  list-style: none;
  margin: 0;
  padding: 4px 14px 12px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  border-top: 1px solid var(--border);
}
.missed-group-list li { font-size: 13px; }
.missed-group-list .drill-link {
  color: var(--brand-600);
  text-decoration: none;
}
.missed-group-list .drill-link:hover { text-decoration: underline; }

/* 移动端抽屉 · sidebar 从左滑入(<1280px) */
.sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
}
@media (max-width: 1279px) {
  .sidebar-toggle { display: inline-flex; align-items: center; }
  .layout > .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    /* 2026-04-22:bg-base + 显式 opacity 1 覆盖 backdrop · z-index 拉到 1010 防被压 */
    background: var(--bg-base) !important;
    color: var(--ink-900);
    z-index: 1010 !important;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    /* 关键:确保 sidebar 内全部子元素可点(不被父级 pointer-events 拦截)*/
    pointer-events: auto;
  }
  .layout > .sidebar * { pointer-events: auto; }
  /* mobile sidebar 展开后 · link/text 颜色确保够对比 */
  .layout > .sidebar.sidebar-open .sidebar-link {
    color: var(--ink-800);
  }
  .layout > .sidebar.sidebar-open .sidebar-link:hover {
    background: var(--ink-100);
    color: var(--ink-900);
  }
  .sidebar-backdrop {
    /* 同 850 行已定义 z-index:1000 · 这里降到 990 防覆盖 sidebar */
    z-index: 990 !important;
  }
  .layout > .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 小屏:sidebar 顺序置顶作为抽屉式容器 · 不再隐藏 */
@media (max-width: 1279px) {
  .sidebar-section { padding: 12px 10px; }
  .sidebar-brand { padding: 16px; }
}

/* 主内容区 · 所有 page <section> 默认卡片化(各页 template 不改 · 全局加壳)*/
.content > section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
/* welcome/dashboard 壳 · flex column 下让 wrap 填满宽,其中的子 section 再走卡片化 */
.dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.dashboard-wrap > section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark .dashboard-wrap > section {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}
/* 控制条卡 · breadcrumb + AI 摘要 + tab + picker 合并卡内间距 */
.dashboard-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dashboard-controls .scope-breadcrumb { margin: 0; }
.dashboard-controls .dashboard-tab-nav { margin: 0; }
.dashboard-controls > form,
.dashboard-controls .picker-form { margin: 0; }
/* picker 4-列横排 · 时段 + 中心 + 部门 + 组 */
.dashboard-picker-form { margin: 0; }
.picker-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.picker-row .form-field { margin: 0; }
.picker-row select:disabled,
.picker-row input:disabled {
  background: var(--ink-100);
  color: var(--ink-400);
  cursor: not-allowed;
}
html.dark .content > section {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}

.footer {
  display: none; /* 新布局里 footer 省略 · 保留 version 放到 sidebar brand 里 */
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--ink-900);
  background: var(--ink-900);
  color: var(--card-bg);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
html.dark .btn,
html.dark a.btn,
html.dark button.btn {
  /* 2026-04-24:夜间 "立即填报 / 开始填写" 等按钮强制对比 · 不被其他 a dark 规则覆盖 */
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
  text-decoration: none;
}
html.dark .btn:hover { opacity: 0.92; }

.form-field { margin-bottom: 12px; }
.form-field label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--ink-700); }
.form-field input {
  width: 100%; max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--ink-900);
  transition: border-color 0.2s;
}
.form-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.error { color: #dc2626; font-size: 12px; margin-top: 4px; }

/* ============ Phase 2: Admin UI 扩展 ============ */

/* 试用期色块 (UI-SPEC §3 Trial badge) */
.badge-trial {
  display: inline-block;
  background: #64748b;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

/* 输入框 focus (UI-SPEC §Color Input border focus) */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
  border-color: #1f2937;
}
.form-field select {
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

/* Topbar 用户菜单 (UI-SPEC §3) */
.topbar-user-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 12px;
}
.topbar-user-btn:hover { background: rgba(255,255,255,0.08); border-radius: 4px; }
.topbar-dropdown {
  position: absolute;
  top: 56px;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  min-width: 140px;
  z-index: 100;
}
.topbar-dropdown a {
  display: block;
  padding: 10px 16px;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.topbar-dropdown a:hover { background: #f6f7f9; }

/* Admin 表格 (UI-SPEC §4) · 外层容器允许横向滚动避免溢出 */
.content > section:has(> table.admin-table),
.content > section.admin-table-wrap {
  overflow-x: auto;
}

/* 2026-04-30 · 长名单统一改造:固定高度 + 内部滚动 + 表头粘顶 */
.scroll-table-wrap {
  max-height: 480px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.sticky-thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card-bg, #fff);
}
html.dark .sticky-thead { background: var(--card-bg, #1f2937); }
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}
table.admin-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--card-bg-soft);
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
table.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}
table.admin-table tr:hover td { background: #f9fafb; }

/* 状态 badge (UI-SPEC §4 Status badge) */
.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
}
.badge-status.active    { background: #dcfce7; color: #166534; }
.badge-status.trial     { background: #e0f2fe; color: #0369a1; }
.badge-status.suspended { background: #fef3c7; color: #92400e; }
.badge-status.left      { background: #f3f4f6; color: #6b7280; }

/* 身份 badge — Phase 7.1 第四波 · 员工列表 + /reports 头部
   2026-04-22:6 选 1 modifier(总经理紫 / 副总浅紫 / 主管蓝 / 副主管浅蓝 /
   组长绿 / 组员灰)· identity_class(user) helper 出 className · light + dark 双套 */
.badge-identity {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 500;
  white-space: nowrap;
}
.badge-identity.identity-gm         { background:#f3e8ff; color:#6b21a8; }   /* 总经理 · 紫 */
.badge-identity.identity-vp         { background:#ede9fe; color:#6d28d9; }   /* 副总 · 浅紫 */
.badge-identity.identity-supervisor { background:#dbeafe; color:#1d4ed8; }   /* 主管 · 蓝 */
.badge-identity.identity-deputy     { background:#e0f2fe; color:#0369a1; }   /* 副主管 · 浅蓝 */
.badge-identity.identity-leader     { background:#dcfce7; color:#15803d; }   /* 组长 · 绿 */
.badge-identity.identity-member     { background:#f3f4f6; color:#4b5563; }   /* 组员 · 灰 */

/* 操作链接 (UI-SPEC §4) */
.op-link { font-size: 13px; margin-right: 8px; text-decoration: underline; cursor: pointer; }
.op-link.primary { color: #1f2937; }
.op-link.muted { color: #6b7280; text-decoration: none; }
.op-link.danger { color: #dc2626; text-decoration: none; }

/* 按钮 secondary (UI-SPEC §Color) */
.btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-danger {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

/* Toolbar (UI-SPEC §4) */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar input[type="search"] {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  width: 220px;
}
.toolbar select {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* 强制改密 banner (UI-SPEC §2) */
.banner-warn {
  background: #fefce8;
  border: 1px solid #ca8a04;
  color: #713f12;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Modal (UI-SPEC §4 离职/重置密码对话框) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  margin-top: 20vh;
}
.modal-box h3 { margin-top: 0; font-size: 16px; font-weight: 600; }
.modal-box .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Dept/Group 卡片 (UI-SPEC §7) */
.org-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
html.dark .org-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.3);
}
.org-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink-900);
}
.dept-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.dept-row > strong {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 70px;
}
.dept-row:last-child { border-bottom: none; }
.group-chip {
  display: inline-block;
  background: #f6f7f9;
  color: #374151;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
}

/* Helper text (UI-SPEC §5 副职 helper) */
.helper-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Empty state (UI-SPEC §4 空列表) */
.empty-state {
  text-align: center;
  padding: 48px 0;
  color: #6b7280;
  font-size: 14px;
}
.empty-state h3 { color: #374151; font-size: 15px; margin-bottom: 8px; }

/* D-10 死令:下面规则保护 Phase 7 导出的 [REPORT-ORG:X] [LEVEL:LX] [DATE:Y] 锚点行
   和【今日结果】【死锁阻碍】【专项复盘】【明日动作】四段式分隔符,
   禁止任何人改成 pre-wrap / normal。 */
.content pre,
.content code {
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============================================================
   Phase 3: 报告填报(UI-SPEC §New CSS Tokens — 10+ 新 class)
   CLAUDE.md §4 死令:.anchor-header white-space: pre 禁删
   ============================================================ */

/* 报告卡片(首页待提交入口 + /reports 列表;D-14 + UC-Q1)*/
.report-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid transparent;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.report-card .report-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px;
}
.report-card .report-card-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}
.report-card-urgent {
  border-left: 4px solid #d97706;  /* UC-Q1 urgent 边框色 */
}

/* 四段式区块(/reports/new + /reports/{id} 详情 + admin template_edit;UC-Q2)*/
.section-group {
  background: #f9fafb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px;
}

/* 报告状态徽章(4 种 + 配色为防与 Phase 2 .badge-status.left 混淆使用偏蓝灰 draft)*/
.status-badge-draft,
.status-badge-submitted,
.status-badge-locked,
.status-badge-overdue {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.status-badge-draft     { background: #f1f5f9; color: #475569; }
.status-badge-submitted { background: #dcfce7; color: #166534; }
.status-badge-locked    { background: #e0f2fe; color: #0369a1; }
.status-badge-overdue   { background: #fee2e2; color: #dc2626; }

/* 人名 chip(上级 warning 条展开名单;UC-Q4)*/
.name-chip {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  margin: 2px 4px 2px 0;
}

/* 锚点行(详情页 + 新建页预览;CLAUDE.md §4 死令 + D-10/D-11)*/
.anchor-header {
  font-family: Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre;  /* 死令:不得改 pre-wrap / normal */
}

/* 倒计时文本(tabular-nums 防数字抖动)*/
.countdown {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #713f12;
}

/* JSON 编辑器 textarea(admin template_edit;UC-Q3)*/
.json-editor {
  font-family: Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  width: 100%;
  min-height: 400px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  resize: vertical;
  background: #fafafa;
}
.json-editor:focus {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
}

/* ============================================================
   Phase 4: 分层审阅流程
   --------------------------------------------------------------
   顺序:
   1. .review-chain        审阅链容器
   2. .review-timeline     时间轴 + 圆点 + chip-action 联动
   3. .chip-{neutral|success|danger|warning|final}  审阅动作 chip
   4. .annotation-input    批注 textarea
   5. .review-actions      三按钮栏(已阅/批注/批注并升级)
   6. .banner-final        L4 终审金色 banner
   7. .topbar-badge        topbar 徽角标
   8. .reviews-tab         L4 双 tab 切换

   死令保留:
   - 不修改 .content pre/code 既有规则(line 261-268)
   - .timeline-content 用 white-space: pre-wrap(保护批注换行)
   ============================================================ */

/* === 1. .review-chain(审阅链容器)=== */
.review-chain {
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
  padding-top: 24px;
}
.review-chain .review-chain-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px;
}
.review-chain .review-chain-empty {
  font-size: 13px;
  color: #6b7280;
  padding: 16px 0;
  text-align: center;
}

/* === 2. .review-timeline(正序时间轴)=== */
.review-timeline {
  position: relative;
  padding-left: 20px;
  margin: 0;
  list-style: none;
}
.review-timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e5e7eb;
}
.review-timeline-item {
  position: relative;
  padding: 8px 0;
  min-height: 36px;
}
.review-timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #6b7280;
}
.review-timeline-item.item-escalate::before { border-color: #dc2626; }
.review-timeline-item.item-missed::before   { border-color: #92400e; background: #fef3c7; }
.review-timeline-item.item-final::before    { border-color: #eab308; background: #fef9c3; }
.review-timeline-item .timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.review-timeline-item .timeline-reviewer {
  font-weight: 600;
  color: #1f2937;
}
.review-timeline-item .timeline-time {
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.review-timeline-item .timeline-content {
  margin-top: 4px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  white-space: pre-wrap;  /* 保护批注换行,不破坏 D-10 死令 */
}
.review-timeline-item.item-system .timeline-reviewer {
  color: #92400e;
}

/* === 3. .chip-*(审阅动作 chip)=== */
.chip-neutral,
.chip-success,
.chip-danger,
.chip-warning,
.chip-final {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
.chip-neutral { background: #f3f4f6; color: #374151; }
.chip-success { background: #dcfce7; color: #166534; }
.chip-danger  { background: #fee2e2; color: #dc2626; }
.chip-warning { background: #fef3c7; color: #92400e; }
.chip-final   { background: #fef9c3; color: #713f12; border: 1px solid #eab308; }

/* === 4. .annotation-input(批注 textarea)=== */
.annotation-input {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
  background: #fff;
  resize: vertical;
  font-family: inherit;
}
.annotation-input:focus {
  outline: 2px solid #1f2937;
  outline-offset: 2px;
  border-color: #1f2937;
}
.annotation-input::placeholder { color: #9ca3af; }
.annotation-input[disabled] {
  background: #f6f7f9;
  color: #6b7280;
  cursor: not-allowed;
}

/* === 5. .review-actions(三按钮栏)=== */
.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.review-actions .btn-escalate {
  border-color: #dc2626;
  background: #fff;
  color: #dc2626;
}
.review-actions .btn-escalate:hover { background: #fef2f2; }
.review-actions .btn[disabled],
.review-actions .btn-secondary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === 6. .banner-final(L4 终审金色 banner)=== */
.banner-final {
  background: #fef9c3;
  border: 1px solid #eab308;
  color: #713f12;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner-final::before {
  content: '★';
  font-size: 14px;
  color: #eab308;
}

/* === 7. .topbar-badge(topbar 徽角标)=== */
.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
  vertical-align: middle;
}
.topbar-badge-link {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.topbar-badge-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* === 8. .reviews-tab(L4 双 tab 切换)=== */
.reviews-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}
.reviews-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.reviews-tab:hover { color: #374151; }
.reviews-tab.active {
  color: #1f2937;
  font-weight: 600;
  border-bottom-color: #1f2937;
}
.reviews-tab .tab-count {
  margin-left: 6px;
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.reviews-tab.active .tab-count {
  color: #1f2937;
}

/* ============ Phase 5: 汇总面板与下钻 ============
 * Dashboard CSS tokens(11 组 · UI-SPEC §New CSS Tokens verbatim)
 *   1. .kpi-card / .kpi-alert / .kpi-zero / .kpi-card-sm(KPI 指标卡 + 小卡变体)
 *   2. .placeholder-card(月/季占位卡,Phase 6 AI 待接入)
 *   3. .scope-breadcrumb(下钻面包屑,› 分隔)
 *   4. .drill-link(下钻触发链接,虚线下划线)
 *   5. .dashboard-tab-nav / .dashboard-tab(4 tab 切换 — 对齐 Phase 4 .reviews-tab)
 *   6. .simulate-chip + .banner-simulate(admin 模拟视角双处提示 — Q2 并存)
 *   7. .kpi-row(KPI 卡片行布局)
 *   8. .v1-regex-note / .blocker-list / .deviation-list(死锁 TOP3 / 偏差 list)
 *   9. .report-preview mark(异常数下钻关键词高亮)
 *  10. .banner-info(个人层下钻预览提示条 — Q7)
 *  11. .picker-helper(周 picker 浏览器兜底提示 — Q6)
 * ============ */

/* === Phase 5: Dashboard CSS tokens === */

/* 1.1 KPI 标准卡片(D-12 日维度 4 指标、D-13 周维度指标、D-14 月/季维度通用指标)*/
.kpi-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 220px;
  flex: 1;
}
.kpi-card .kpi-label {
  color: #6b7280;
  font-size: 13px;
  margin: 0 0 8px;
}
.kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
/* 12px 专用于数据型辅助信息(KPI 副标"共 X 应交 / Y 已交 / Z 逾期"),
 * 与 13px 静态 label 的语义分离:12 = 动态数字上下文,13 = 静态字段名 */
.kpi-card .kpi-meta {
  color: #6b7280;
  font-size: 12px;
  margin: 8px 0 0;
}

/* 1.2 异常数命中态(Q8:N>0 红底红字 + 左边 3px 强调)*/
.kpi-card.kpi-alert {
  background: #fef2f2;
  border-color: #dc2626;
  border-left: 3px solid #dc2626;
}
.kpi-card.kpi-alert .kpi-value { color: #dc2626; }

/* 1.3 异常数零命中态(Q8:N=0 白底 value 弱化灰,不用浅灰底避免与占位卡片混淆)*/
.kpi-card.kpi-zero .kpi-value { color: #9ca3af; }

/* 1.4 个人层下钻小卡变体(Q7:布局 A 顶部一行 3 张 160px 小卡)*/
.kpi-card-sm {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  width: 160px;
  flex: 0 0 160px;
}
.kpi-card-sm .kpi-label { color: #6b7280; font-size: 12px; margin: 0 0 4px; }
.kpi-card-sm .kpi-value {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}
.kpi-card-sm.kpi-zero .kpi-value { color: #9ca3af; }

/* 2. 月/季维度占位卡片(D-14 + Q5 Unicode ⚠)*/
.placeholder-card {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 220px;
  flex: 1;
}
.placeholder-card .placeholder-label {
  font-style: italic;
  color: #9ca3af;
  font-size: 14px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.placeholder-card .placeholder-label::before {
  content: '\26A0';
  font-size: 16px;
  color: #9ca3af;
}
.placeholder-card .placeholder-note {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* 3. 下钻面包屑(D-10 query 驱动,CTX §specifics 每级可点回跳)
 *   Q1:分隔符 '›' U+203A,hover 仅下划线不变色 */
.scope-breadcrumb {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
}
.scope-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}
.scope-breadcrumb a:hover {
  text-decoration: underline;
}
.scope-breadcrumb .sep {
  margin: 0 8px;
  color: var(--ink-300);
}
.scope-breadcrumb .sep::before {
  content: '\203A';
}
.scope-breadcrumb .current {
  color: var(--ink-900);
  font-weight: 500;
}
html.dark .scope-breadcrumb a { color: #9eb0ff; }

/* 4. 下钻链接(漏报名单里的姓名、KPI 数字可点击等 — D-10 query 更新)*/
.drill-link {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline dashed;
}
.drill-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 5. Dashboard 4 tab(D-11 日/周/月/季切换,Q3:对齐 Phase 4 .reviews-tab 2px 下边线)*/
.dashboard-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin: 16px 0 20px;
}
.dashboard-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.dashboard-tab:hover { color: #374151; }
.dashboard-tab.active {
  color: #1f2937;
  font-weight: 600;
  border-bottom-color: #1f2937;
}

/* 6.1 topbar 模拟视角 chip(Q2:黄底警示,紧挨用户菜单左侧)*/
.simulate-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #713f12;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.4;
  margin-right: 8px;
}
.simulate-chip a {
  color: #713f12;
  text-decoration: underline;
  font-weight: 500;
}
.simulate-chip a:hover {
  color: #451a03;
}

/* 6.2 content 区顶部常驻模拟中横幅(Q2:并存方案,避免 admin 误操作)*/
.banner-simulate {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  color: #713f12;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner-simulate::before {
  content: '\26A0';
  font-size: 16px;
  color: #b45309;
}
.banner-simulate a {
  margin-left: auto;
  color: #713f12;
  text-decoration: underline;
  font-weight: 600;
}
.banner-simulate a:hover {
  color: #451a03;
}

/* 7. KPI 卡片行(横向 flex,自动换行)*/
.kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* 8.1 v1 正则版 inline 注释(D-13:UI 显式标注"v1 正则版,Phase 6 替换")
 *     Q4:inline 放在 <h3> 右侧,左 margin 8px
 *     DO NOT extend — Phase 5 inline 标注专用(v1 正则版说明),11px 不允许扩散到其他场景 */
.v1-regex-note {
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
  margin-left: 8px;
  font-weight: 400;
}

/* 8.2 死锁 TOP3 / 偏差 list 容器(CTX D-13 周维度两个指标)*/
.blocker-list,
.deviation-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.blocker-list li,
.deviation-list li {
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 12px;
}
.blocker-list .blocker-rank,
.deviation-list .deviation-rank {
  font-weight: 600;
  color: #6b7280;
  min-width: 20px;
  font-variant-numeric: tabular-nums;
}
.blocker-list .blocker-target,
.deviation-list .deviation-metric {
  color: #1f2937;
  font-weight: 500;
}
.blocker-list .blocker-count,
.deviation-list .deviation-gap {
  margin-left: auto;
  color: #dc2626;
  font-weight: 600;
  font-size: 12px;
}

/* 9. 异常数卡片点击下钻后,命中报告预览内的关键词 <mark> 高亮
 *    (CTX §Claude's Discretion:异常数下钻展示命中报告列表 + 高亮关键词)*/
.report-preview mark {
  background: #fef3c7;
  color: #dc2626;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 500;
}

/* 10. 下钻到"个人"层的区分提示条(Q7 区分 A:浅灰 info 条)*/
.banner-info {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner-info::before {
  content: '\1F4CC';
  font-size: 14px;
}
.banner-info a {
  margin-left: auto;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
.banner-info a:hover {
  text-decoration: underline;
}

/* 11. Tab 内 picker 的 helper 文字(Q6:周 picker Firefox/Safari 兜底,
 *     提示用户手输 YYYY-Www 格式)*/
.picker-helper {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ============================================================
   Phase 6: AI 摘要段 tokens(D-12 降级黄条 + AI 蓝条)
   --------------------------------------------------------------
   - .ai-summary-banner           section 容器(公共 padding/border/margin)
   - .ai-summary-ai               source='ai' 蓝色 info 样式
   - .ai-summary-rule             source='rule' 黄色降级样式
   - .ai-summary-degraded-prefix  「AI 降级:以下为规则拼接摘要」前缀
   - .ai-summary-body             摘要正文 <p> (消除 margin)
   - .ai-summary-body mark        Phase 5 highlight_anomalies 的 <mark>关键词</mark>
                                  红底深红字,对齐 .report-preview mark 的异常配色
   ============================================================ */

.ai-summary-banner {
  padding: 12px 16px;
  margin: 0 0 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.ai-summary-ai {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.ai-summary-rule {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}

.ai-summary-degraded-prefix {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 13px;
}

.ai-summary-body {
  margin: 0;
}

.ai-summary-body mark {
  background: #fca5a5;
  color: #7f1d1d;
  padding: 0 2px;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   Phase 7.1 第六波 · 暗色模式 token 覆盖层
   参照 docs/reference/05-UI-目标.html 的 html.dark [class*="bg-white"]
   模式 · 原有 CSS 硬编码白底/灰底/灰字在 dark 下强制切 token
   ═══════════════════════════════════════════════════════════════════ */
html.dark .kpi-card,
html.dark .kpi-card-sm,
html.dark .modal-box,
html.dark .admin-table,
html.dark .empty-state,
html.dark .report-card,
html.dark .dashboard-section,
html.dark .section-group,
html.dark .review-card,
html.dark .final-banner {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
}
html.dark .kpi-card .kpi-value,
html.dark .kpi-card-sm .kpi-value,
html.dark .admin-table td,
html.dark .admin-table th {
  color: var(--ink-900) !important;
}
html.dark .kpi-card .kpi-label,
html.dark .kpi-card .kpi-meta,
html.dark .kpi-card-sm .kpi-label,
html.dark .kpi-card-sm .kpi-meta,
html.dark .dashboard-tab,
html.dark .helper-text,
html.dark .section-title {
  color: var(--ink-500) !important;
}
html.dark .kpi-card.kpi-zero .kpi-value,
html.dark .kpi-card-sm.kpi-zero .kpi-value {
  /* 2026-04-24:原 ink-400 (#4F5D78) 在 card-bg 上对比度不够 · 调到更亮的 ink-600 */
  color: var(--ink-600) !important;
  opacity: 0.75;
}

/* 2026-04-24 夜间模式兜底:报告详情/列表里硬编码 #374151 / #1f2937 / #6b7280 深灰色文字
 * 在深色底上看不清 · 全局反转为 var(--ink-900) / var(--ink-500) · 对齐主题 token */
html.dark [style*="color:#374151"],
html.dark [style*="color: #374151"],
html.dark [style*="color:#1f2937"],
html.dark [style*="color: #1f2937"],
html.dark [style*="color:#111827"],
html.dark [style*="color: #111827"] {
  color: var(--ink-900) !important;
}
html.dark [style*="color:#6b7280"],
html.dark [style*="color: #6b7280"],
html.dark [style*="color:#9ca3af"],
html.dark [style*="color: #9ca3af"],
html.dark [style*="color:#4b5563"],
html.dark [style*="color: #4b5563"] {
  color: var(--ink-500) !important;
}
html.dark [style*="background:#fff"],
html.dark [style*="background: #fff"],
html.dark [style*="background:#FFFFFF"],
html.dark [style*="background:white"] {
  background: var(--card-bg) !important;
}
html.dark [style*="border:1px solid #e5e7eb"],
html.dark [style*="border: 1px solid #e5e7eb"],
html.dark [style*="border-top:1px solid #e5e7eb"],
html.dark [style*="border-bottom:1px solid #e5e7eb"] {
  border-color: var(--border) !important;
}
html.dark .admin-table thead {
  background: var(--card-bg-soft) !important;
}
html.dark .admin-table tr:hover td {
  background: var(--ink-100) !important;
}
html.dark .admin-table td {
  border-bottom-color: var(--border) !important;
}
html.dark .banner-warn {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}
html.dark .banner-final {
  background: rgba(234, 179, 8, 0.12) !important;
  border-color: rgba(234, 179, 8, 0.45) !important;
}
html.dark .banner-info {
  background: rgba(56, 189, 248, 0.10) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #7dd3fc !important;
}
html.dark .ai-summary-banner {
  background: var(--card-bg-soft) !important;
  border-color: var(--border) !important;
  color: var(--ink-700) !important;
}
html.dark .ai-summary-banner mark {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fecaca !important;
}
html.dark .dashboard-tab.active {
  color: var(--ink-900) !important;
  border-bottom-color: var(--brand) !important;
}
html.dark .simulate-chip {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fcd34d !important;
}
html.dark .badge-status.active {
  background: rgba(16, 185, 129, 0.18) !important; color: #6ee7b7 !important;
}
html.dark .badge-status.trial {
  background: rgba(56, 189, 248, 0.14) !important; color: #7dd3fc !important;
}
html.dark .badge-status.left {
  background: var(--ink-100) !important; color: var(--ink-400) !important;
}
html.dark .badge-identity {
  background: rgba(30, 58, 230, 0.22) !important; color: #c7d1ff !important;
}
html.dark .badge-identity.identity-gm         { background: rgba(168, 85, 247, 0.22) !important; color:#e9d5ff !important; }
html.dark .badge-identity.identity-vp         { background: rgba(139, 92, 246, 0.20) !important; color:#ddd6fe !important; }
html.dark .badge-identity.identity-supervisor { background: rgba(59, 130, 246, 0.22) !important; color:#bfdbfe !important; }
html.dark .badge-identity.identity-deputy     { background: rgba(14, 165, 233, 0.20) !important; color:#bae6fd !important; }
html.dark .badge-identity.identity-leader     { background: rgba(34, 197, 94, 0.22) !important; color:#bbf7d0 !important; }
html.dark .badge-identity.identity-member     { background: rgba(148, 163, 184, 0.20) !important; color:#cbd5e1 !important; }
html.dark .op-link.primary { color: var(--ink-800) !important; }
html.dark .op-link.muted   { color: var(--ink-500) !important; }
html.dark .op-link.danger  { color: #fca5a5 !important; }
html.dark .btn-secondary {
  background: var(--card-bg) !important; color: var(--ink-700) !important;
  border-color: var(--border) !important;
}
html.dark .btn-danger {
  background: rgba(239, 68, 68, 0.18) !important; color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
html.dark a { color: #9eb0ff; }
html.dark a:hover { color: #c7d1ff; }
/* tables 内链接(漏报名单)单独加强 · 避免 #9eb0ff 太亮 */
html.dark .missed-list a,
html.dark .content section a {
  color: #93a7ff;
}

/* ════════════════════════════════════════════════════════════════════
   DFORCE OS 视觉强化层 · 2026-04-24(参照 design-ref/前端2/*.png)
   覆盖在前面所有规则之上 · 不删旧规则,只新加 token-driven 修正
   ════════════════════════════════════════════════════════════════════ */

/* ─── 全局背景:暗色加深 + 蓝色 halo 网格 ─────────────────────── */
html.dark body { background: var(--bg-base); }
html.dark body::before {
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(ellipse 600px 400px at 15% 10%, var(--glow-a), transparent 70%),
    radial-gradient(ellipse 500px 350px at 85% 5%, var(--glow-b), transparent 75%),
    radial-gradient(ellipse 700px 500px at 70% 90%, var(--glow-c), transparent 80%);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%, 100% 100%;
  opacity: 0.95;
}

/* ─── 品牌 Logo · 青蓝 halo 光晕 ────────────────────────────── */
.sidebar-brand-logo {
  position: relative;
  background: linear-gradient(135deg, #1A2B4F 0%, #243A6E 100%);
  box-shadow:
    0 0 0 1px rgba(91, 141, 255, 0.40),
    0 0 24px rgba(34, 211, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html.dark .sidebar-brand-logo {
  background: linear-gradient(135deg, #1A2B4F 0%, #243A6E 100%);
}
.sidebar-brand-eyebrow {
  background: var(--grad-brand);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  letter-spacing: 0.16em;
}
.sidebar-brand-name {
  font-size: 17px;
  letter-spacing: 0.02em;
}

/* ─── 侧栏 active item:渐变描边 + 内发光 ──────────────────── */
html.dark .sidebar-link.active,
.sidebar-link.active {
  background:
    linear-gradient(135deg, rgba(34, 211, 255, 0.10), rgba(91, 141, 255, 0.10));
  color: var(--ink-900);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(91, 141, 255, 0.55),
    0 0 24px rgba(91, 141, 255, 0.18);
}
html.dark .sidebar-link.active::before,
.sidebar-link.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--grad-brand);
  border-radius: 0 3px 3px 0;
}
.sidebar-link-icon { color: var(--ink-500); }
.sidebar-link.active .sidebar-link-icon { color: #5DC9FF; }

/* ─── 侧栏底部 用户 pill(渐变头像圆 + 名字 + 角色)─────────── */
.sidebar-account {
  padding: 10px;
  background: linear-gradient(135deg, rgba(34,211,255,0.06), rgba(91,141,255,0.06));
  border: 1px solid rgba(91, 141, 255, 0.20);
  border-radius: 14px;
}
html.dark .sidebar-account {
  background: linear-gradient(135deg, rgba(34,211,255,0.08), rgba(91,141,255,0.10));
}
.sidebar-account-name {
  margin: 0; padding: 4px 4px 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-900);
}
.sidebar-account .sidebar-link {
  font-size: 13px;
  padding: 8px 10px;
}

/* ─── KPI 卡:4 色渐变变体 + 大数字 ──────────────────────── */
.kpi-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  overflow: hidden;
  isolation: isolate;
}
.kpi-card::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(91,141,255,0.30), transparent 60%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
.kpi-card > * { position: relative; z-index: 1; }
.kpi-card .kpi-label,
.kpi-card .kpi-card-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.kpi-card .kpi-value,
.kpi-card .kpi-card-value {
  font-size: 38px; font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink-900);
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}
.kpi-card .kpi-meta,
.kpi-card .kpi-card-foot {
  font-size: 12px;
  color: var(--ink-500);
  margin: 0;
  line-height: 1.5;
}
/* 第 N 张卡渐变(KPI 4 张一组)*/
html.dark .kpi-row .kpi-card:nth-child(4n+1) .kpi-value,
html.dark .kpi-row .kpi-card:nth-child(4n+1) .kpi-card-value {
  background: var(--grad-brand);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
html.dark .kpi-row .kpi-card:nth-child(4n+2) .kpi-value,
html.dark .kpi-row .kpi-card:nth-child(4n+2) .kpi-card-value {
  background: var(--grad-teal);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
html.dark .kpi-row .kpi-card:nth-child(4n+3) .kpi-value,
html.dark .kpi-row .kpi-card:nth-child(4n+3) .kpi-card-value {
  background: var(--grad-amber);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
html.dark .kpi-row .kpi-card:nth-child(4n+4) .kpi-value,
html.dark .kpi-row .kpi-card:nth-child(4n+4) .kpi-card-value {
  background: var(--grad-pink);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ─── 主按钮:cyan→blue 渐变 + glow ──────────────────────── */
.btn,
button.btn {
  background: var(--grad-brand);
  color: #fff;
  border: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 4px 16px rgba(91, 141, 255, 0.30);
  transition: filter 0.2s ease, transform 0.1s ease;
}
.btn:hover { filter: brightness(1.08); opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── Topbar(全宽搜索 + 模拟视角 + 钟 + 用户 pill)──────── */
@media (min-width: 1280px) {
  .topbar {
    display: flex !important;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 24px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    color: var(--ink-900);
    position: sticky; top: 0; z-index: 50;
  }
  .topbar .brand { display: none; }
  .topbar .sidebar-toggle { display: none; }
  .layout > .content > .topbar-inline { display: flex; }
}
.topbar .topbar-search {
  flex: 1; max-width: 520px;
  margin: 0 auto;
  position: relative;
}
.topbar .topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink-900);
  font-size: 13px;
}
.topbar .topbar-search input::placeholder { color: var(--ink-500); }
.topbar .topbar-search::before {
  content: '';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A7A95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-size: contain;
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar-pill-btn:hover {
  background: var(--brand-50);
  color: var(--ink-900);
  border-color: rgba(91,141,255,0.35);
}
.topbar-bell {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink-700);
  cursor: pointer;
  position: relative;
}
.topbar-bell .topbar-bell-dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px;
  background: #F87171;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}
.topbar-user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; color: var(--ink-900);
  cursor: pointer;
}
.topbar-user-pill .avatar-mini {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar-breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-500);
}
.topbar-breadcrumb .crumb-current { color: var(--ink-900); font-weight: 500; }
.topbar-breadcrumb .crumb-sep { color: var(--ink-400); }

/* ─── 头像渐变圆(表/列表里的姓名首字)─────────────────── */
.avatar-circ {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.avatar-circ.av-cyan   { background: var(--grad-brand); }
.avatar-circ.av-teal   { background: var(--grad-teal); }
.avatar-circ.av-pink   { background: var(--grad-pink); }
.avatar-circ.av-amber  { background: var(--grad-amber); }
.avatar-circ.av-violet { background: var(--grad-violet); }

/* ─── 表格深色化 + hover ───────────────────────────────── */
html.dark .admin-table thead th {
  background: var(--card-bg-soft) !important;
  color: var(--ink-500) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border) !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
html.dark .admin-table tbody tr {
  background: transparent !important;
  border-bottom: 1px solid var(--border-soft) !important;
}
html.dark .admin-table tbody tr:hover {
  background: rgba(91,141,255,0.04) !important;
}
html.dark .admin-table td { color: var(--ink-800) !important; }

/* ─── 状态 chip 重绘 ─────────────────────────────────── */
html.dark .status-badge-submitted,
html.dark .badge-status.active {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #86EFAC !important;
  border: 1px solid rgba(34,197,94,0.25) !important;
  border-radius: 999px !important; padding: 2px 10px !important;
  font-size: 11px !important;
}
html.dark .status-badge-locked {
  background: rgba(91, 141, 255, 0.14) !important;
  color: #BFDBFE !important;
  border: 1px solid rgba(91,141,255,0.30) !important;
  border-radius: 999px !important; padding: 2px 10px !important;
}
html.dark .status-badge-draft {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #CBD5E1 !important;
  border: 1px solid rgba(148,163,184,0.25) !important;
  border-radius: 999px !important; padding: 2px 10px !important;
}
html.dark .status-badge-overdue {
  background: rgba(248, 113, 113, 0.14) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(248,113,113,0.30) !important;
  border-radius: 999px !important; padding: 2px 10px !important;
}

/* ─── Hero card 深色精修 ──────────────────────────────── */
html.dark .hero-card {
  background: linear-gradient(135deg, #0F1A30 0%, #142139 100%);
  border-color: rgba(91, 141, 255, 0.18);
}
html.dark .hero-card-title {
  font-size: 26px;
  background: linear-gradient(135deg, #E8F0FA 0%, #B5C2D8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ─── 登录页:halo logo + 居中欢迎卡 ──────────────────── */
.login-shell {
  background:
    radial-gradient(ellipse 700px 500px at 50% 30%, rgba(91,141,255,0.18), transparent 70%),
    radial-gradient(ellipse 500px 400px at 30% 80%, rgba(34,211,255,0.12), transparent 75%);
}
html.dark .login-shell { background-color: var(--bg-base); }
.login-shell .login-card {
  background: linear-gradient(135deg, #0F1A30 0%, #142139 100%);
  border: 1px solid rgba(91, 141, 255, 0.22);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(91,141,255,0.10),
    0 32px 80px -20px rgba(7, 12, 24, 0.60);
  padding: 36px 32px;
}
html.dark .login-shell .login-card {
  background: linear-gradient(135deg, #0F1A30 0%, #142139 100%);
  color: var(--ink-900);
}
.login-shell .login-card h2 {
  font-size: 22px;
  background: linear-gradient(135deg, #E8F0FA 0%, #B5C2D8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.login-shell .login-card .login-card-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: -8px 0 24px;
}
.login-shell .login-card .form-field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(91, 141, 255, 0.20);
  border-radius: 10px;
  color: var(--ink-900);
  padding: 12px 14px 12px 40px;
  font-size: 14px;
}
.login-shell .login-card .form-field input:focus {
  outline: none;
  border-color: rgba(91, 141, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 141, 255, 0.15);
}
.login-shell .login-card .form-field {
  position: relative;
}
.login-shell .login-card .form-field::before {
  content: '';
  position: absolute;
  left: 14px; top: calc(50% + 6px); transform: translateY(-50%);
  width: 16px; height: 16px;
  opacity: 0.6;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
}
.login-shell .login-card .form-field.field-user::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238392AE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.login-shell .login-card .form-field.field-pw::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238392AE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}
.login-shell .login-card .btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: 12px;
  letter-spacing: 0.4em;
  margin-top: 4px;
}
.login-halo-logo {
  width: 96px; height: 96px;
  margin: 0 auto 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1A2B4F 0%, #243A6E 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(91, 141, 255, 0.40),
    0 0 60px rgba(91, 141, 255, 0.45),
    0 0 120px rgba(34, 211, 255, 0.20);
}
.login-halo-logo img {
  width: 110%; height: 110%;
  object-fit: contain;
}
.login-brand-block {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand-name {
  font-size: 28px; font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  letter-spacing: 0.02em;
}
.login-brand-eyebrow {
  font-size: 13px; font-weight: 600;
  margin: 8px 0 0;
  background: var(--grad-brand);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  letter-spacing: 0.4em;
}
.login-brand-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: 8px 0 0;
}

/* ─── 移动 topbar 适配新色板 ─────────────────────────── */
@media (max-width: 1279px) {
  .topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
  }
  .sidebar-toggle {
    width: 36px; height: 36px;
    background: var(--card-bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink-700);
    font-size: 18px;
    cursor: pointer;
  }
}

/* ─── 公共:输入/select/textarea 深色对齐 ─────────────── */
html.dark input[type="text"],
html.dark input[type="password"],
html.dark input[type="email"],
html.dark input[type="date"],
html.dark input[type="number"],
html.dark select,
html.dark textarea {
  background: var(--card-bg-soft);
  color: var(--ink-900);
  border: 1px solid var(--border);
  border-radius: 8px;
}
html.dark input::placeholder,
html.dark textarea::placeholder { color: var(--ink-500); }
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
  outline: none;
  border-color: rgba(91, 141, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 141, 255, 0.15);
}

/* ─── btn-secondary 在新底上的对比 ───────────────────── */
html.dark .btn-secondary {
  background: var(--card-bg-soft) !important;
  border: 1px solid var(--border) !important;
  color: var(--ink-700) !important;
  font-weight: 500;
  border-radius: 10px;
}
html.dark .btn-secondary:hover {
  background: var(--ink-100) !important;
  color: var(--ink-900) !important;
  border-color: rgba(91,141,255,0.35) !important;
}

/* ─── Topbar 全尺寸可见 + content 嵌入 ─────────────────── */
.content > .topbar {
  display: flex !important;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 18px;
  margin: 0 0 4px;
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: sticky; top: 12px; z-index: 50;
  backdrop-filter: blur(8px);
}
@media (max-width: 1279px) {
  .content > .topbar { top: 8px; padding: 0 14px; gap: 8px; }
}
.content > .topbar .brand,
.content > .topbar > .topbar-nav { display: none; }
.content > .topbar .topbar-search input {
  background: var(--card-bg);
}
html.dark .content > .topbar {
  background: linear-gradient(180deg, rgba(15,26,48,0.85) 0%, rgba(20,33,57,0.85) 100%);
  border-color: rgba(91, 141, 255, 0.18);
}
.content > .topbar > .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 1280px) {
  .content > .topbar > .sidebar-toggle { display: none; }
}
.content > .topbar > .topbar-breadcrumb { flex-shrink: 0; }
@media (max-width: 767px) {
  .content > .topbar > .topbar-search { display: none; }
}

/* ─── topbar dropdown · 用户菜单 ──────────────────────── */
.topbar-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.30);
  padding: 6px;
  z-index: 100;
}
.topbar-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-800);
  text-decoration: none;
  border-radius: 8px;
}
.topbar-dropdown a:hover {
  background: var(--brand-50);
  color: var(--ink-900);
}
html.dark .topbar-dropdown {
  background: var(--card-bg);
  border-color: rgba(91,141,255,0.20);
}

/* ─── content 列顶部 padding 收紧(topbar 已替代)─────── */
.content { padding-top: 0; }

/* ─── sidebar 在新底色上的视觉(去掉默认 padding,让 brand 顶到顶)─ */
@media (min-width: 1280px) {
  .sidebar { top: 12px; max-height: calc(100vh - 24px); }
  .sidebar-inner {
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg-soft) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    display: flex; flex-direction: column;
    gap: 4px;
    min-height: calc(100vh - 24px);
  }
  html.dark .sidebar-inner {
    background: linear-gradient(180deg, #0F1A30 0%, #142139 100%);
    border-color: rgba(91, 141, 255, 0.18);
  }
}
.sidebar-section {
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
}
.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.sidebar-section.sidebar-brand { padding: 16px 12px 12px; }
.sidebar-section.sidebar-account { margin-top: auto; padding: 8px; }

/* ════════════════════════════════════════════════════════════════════
   DFORCE OS · 通片 polish 层 · 2026-04-24 v2
   每板块 / 每按钮 / 每表 / 每筛选 / 每下钻 都过一遍
   ════════════════════════════════════════════════════════════════════ */

/* ─── KPI 卡:simpler 单色渐变数字 + 4 色 surface 点缀 ─────── */
html.dark .kpi-card .kpi-value,
html.dark .kpi-card .kpi-card-value {
  background: linear-gradient(135deg, #67E8F9 0%, #5B8DFF 60%, #A78BFA 100%) !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 12px rgba(91, 141, 255, 0.20));
}
/* 4 色 nth-child 给 surface(顶部 1px 渐变光带)*/
.kpi-card { position: relative; }
html.dark .kpi-row .kpi-card::before,
html.dark .content > section .kpi-card::before,
html.dark .kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 12px; right: 12px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
  opacity: 0.85;
}
html.dark .kpi-row .kpi-card:nth-child(4n+2)::before { background: var(--grad-teal); }
html.dark .kpi-row .kpi-card:nth-child(4n+3)::before { background: var(--grad-amber); }
html.dark .kpi-row .kpi-card:nth-child(4n+4)::before { background: var(--grad-pink); }
html.dark .kpi-row .kpi-card:nth-child(5n)::before   { background: var(--grad-violet); }

/* alert / zero 状态 */
html.dark .kpi-card.kpi-alert {
  border-color: rgba(248, 113, 113, 0.40);
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.10), inset 0 0 0 1px rgba(248,113,113,0.18);
}
html.dark .kpi-card.kpi-alert .kpi-value {
  background: linear-gradient(135deg, #FCA5A5 0%, #F87171 100%) !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
}
html.dark .kpi-card.kpi-zero .kpi-value {
  background: linear-gradient(135deg, #94A3B8 0%, #64748B 100%) !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
}

/* ─── 章节标题(h3)+ section 头部统一节奏 ─────────────── */
html.dark .content section h3,
html.dark .content > section > h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
}
html.dark .content section h3::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--grad-brand);
  border-radius: 2px;
  display: inline-block;
}

/* ─── 工具栏 / form 控件 容器卡片化(toolbar / dashboard-controls) ──── */
html.dark .toolbar,
html.dark .dashboard-controls,
html.dark form.dashboard-picker-form,
html.dark .picker-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

/* ─── select / input 在工具栏内的紧凑样式 ───────────────── */
html.dark .toolbar select,
html.dark .toolbar input,
html.dark form.dashboard-picker-form select,
html.dark form.dashboard-picker-form input {
  background: var(--card-bg-soft);
  color: var(--ink-900);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

/* ─── 链接样式 · 蓝调 + 下划线 hover ───────────────────── */
html.dark .content section a:not(.btn):not(.sidebar-link):not(.op-link):not(.topbar-bell):not(.topbar-pill-btn):not(.topbar-user-pill):not(.drill-link) {
  color: #93C5FD;
  text-decoration: none;
}
html.dark .content section a:not(.btn):not(.sidebar-link):not(.op-link):not(.topbar-bell):hover {
  color: #BFDBFE;
  text-decoration: underline;
}
html.dark .drill-link {
  color: #67E8F9 !important;
  text-decoration: none;
  font-weight: 500;
}
html.dark .drill-link:hover {
  color: #A5F3FC !important;
  text-decoration: underline;
}
html.dark .op-link.primary {
  color: #93C5FD !important;
  text-decoration: none;
  font-weight: 500;
}
html.dark .op-link.primary:hover {
  color: #DBEAFE !important;
  text-decoration: underline;
}

/* ─── AI 摘要卡片 / banner ─────────────────────────────── */
html.dark .ai-summary-banner,
html.dark .ai-summary-ai,
html.dark .ai-summary-rule {
  background: linear-gradient(135deg, rgba(34,211,255,0.05) 0%, rgba(91,141,255,0.05) 100%) !important;
  border: 1px solid rgba(91, 141, 255, 0.22) !important;
  border-radius: 14px;
  padding: 16px 18px;
  color: var(--ink-800);
}
html.dark .ai-summary-degraded-prefix {
  color: #FCD34D !important;
  font-weight: 600;
}
html.dark mark {
  background: rgba(248, 113, 113, 0.20);
  color: #FECACA;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

/* ─── chip / badge 通用增强 ───────────────────────────── */
html.dark .chip-success {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #86EFAC !important;
  border: 1px solid rgba(34,197,94,0.30) !important;
}
html.dark .chip-warning {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #FCD34D !important;
  border: 1px solid rgba(245,158,11,0.30) !important;
}
html.dark .chip-danger {
  background: rgba(248, 113, 113, 0.14) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(248,113,113,0.30) !important;
}
html.dark .chip-neutral {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #CBD5E1 !important;
  border: 1px solid rgba(148,163,184,0.30) !important;
}
html.dark .chip-final {
  background: rgba(91, 141, 255, 0.14) !important;
  color: #BFDBFE !important;
  border: 1px solid rgba(91,141,255,0.30) !important;
}
html.dark .chip-success,
html.dark .chip-warning,
html.dark .chip-danger,
html.dark .chip-neutral,
html.dark .chip-final {
  border-radius: 999px !important;
  padding: 2px 10px !important;
  font-size: 11px !important;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── 模拟视角 chip ────────────────────────────────── */
html.dark .simulate-chip {
  background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(245,158,11,0.10)) !important;
  border: 1px solid rgba(245,158,11,0.45) !important;
  color: #FCD34D !important;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── modal · 高对比浮层 ──────────────────────────── */
html.dark .modal-overlay {
  background: rgba(7, 12, 24, 0.80) !important;
  backdrop-filter: blur(8px);
}
html.dark .modal-box {
  background: linear-gradient(135deg, #0F1A30 0%, #142139 100%) !important;
  border: 1px solid rgba(91, 141, 255, 0.30) !important;
  border-radius: 16px !important;
  box-shadow:
    0 0 0 1px rgba(91,141,255,0.10),
    0 32px 80px -20px rgba(7, 12, 24, 0.80) !important;
  color: var(--ink-900);
}

/* ─── 报告卡 · report-card ──────────────────────────── */
html.dark .report-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html.dark .report-card:hover {
  border-color: rgba(91, 141, 255, 0.40);
  box-shadow: 0 0 24px rgba(91, 141, 255, 0.10);
}
html.dark .report-card-urgent {
  background: linear-gradient(135deg, rgba(248,113,113,0.10), rgba(248,113,113,0.04));
  border-color: rgba(248, 113, 113, 0.40);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.18) inset, 0 0 24px rgba(248, 113, 113, 0.10);
}

/* ─── 下钻 / org-tree 结构清晰化 ──────────────────── */
html.dark .org-link {
  color: var(--ink-800);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  flex: 1;
}
html.dark .org-link:hover {
  background: rgba(91, 141, 255, 0.10);
  color: var(--ink-900);
}
html.dark .org-link.active {
  background: linear-gradient(135deg, rgba(34,211,255,0.12), rgba(91,141,255,0.12));
  color: var(--ink-900);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(91, 141, 255, 0.40);
}
html.dark .org-link-dept { font-size: 12.5px; color: var(--ink-700); }
html.dark .org-link-group { font-size: 12px; color: var(--ink-600); }
html.dark .org-count {
  background: rgba(91, 141, 255, 0.16);
  color: #BFDBFE;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
}
html.dark .org-toggle {
  background: none;
  border: none;
  color: var(--ink-500);
  cursor: pointer;
  padding: 0 2px;
}
html.dark .org-caret { font-size: 10px; }

/* ─── 面包屑 · scope-breadcrumb ─────────────────────── */
html.dark .scope-breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-500);
  padding: 8px 14px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 12px;
}
html.dark .scope-breadcrumb a {
  color: #93C5FD !important;
  text-decoration: none;
}

/* ─── dashboard-tab(日/周/月/季 切换)─────────────── */
html.dark .dashboard-tab-nav {
  display: inline-flex;
  gap: 0;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
html.dark .dashboard-tab {
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 500;
  color: var(--ink-600) !important;
  border: none !important;
  background: transparent !important;
  border-radius: 8px !important;
  text-decoration: none;
}
html.dark .dashboard-tab:hover {
  color: var(--ink-900) !important;
}
html.dark .dashboard-tab.active {
  background: var(--grad-brand) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(91, 141, 255, 0.30);
}

/* ─── reviews-tabs(L3 直属/L2 代审/历史)─────────── */
html.dark .reviews-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
html.dark .reviews-tab {
  padding: 6px 14px !important;
  font-size: 13px !important;
  color: var(--ink-600) !important;
  border-radius: 8px !important;
  text-decoration: none;
}
html.dark .reviews-tab.active {
  background: var(--grad-brand) !important;
  color: #fff !important;
}

/* ─── 进度条(部门提交进度 · 完成率)──────────────── */
html.dark .dept-row {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

/* ─── 表单 · simple-form-wrap / employee-form-wrap ─── */
html.dark .simple-form-wrap,
html.dark .employee-form-wrap,
html.dark .report-form-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
html.dark .form-field label {
  color: var(--ink-700);
  font-weight: 500;
}
html.dark .form-field input,
html.dark .form-field select,
html.dark .form-field textarea {
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-900);
  border-radius: 8px;
}
html.dark .form-field input:focus,
html.dark .form-field select:focus,
html.dark .form-field textarea:focus {
  outline: none !important;
  border-color: rgba(91, 141, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(91, 141, 255, 0.15) !important;
}

/* ─── anchor-header · 报告锚点 · 死令保留 white-space: pre ─── */
html.dark .anchor-header {
  background: rgba(91, 141, 255, 0.06) !important;
  color: #DBEAFE !important;
  border: 1px solid rgba(91, 141, 255, 0.22) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: "JetBrains Mono", "Consolas", "Cascadia Mono", monospace !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
  /* white-space: pre 保留(死令)*/
}

/* ─── countdown · 倒计时 ────────────────────────────── */
html.dark .countdown {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(248, 113, 113, 0.12);
  color: #FCA5A5;
  border: 1px solid rgba(248, 113, 113, 0.30);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── empty state ──────────────────────────────────── */
html.dark .empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-500);
  font-size: 13px;
  background: var(--card-bg-soft);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* ─── badge-trial 试用期 ──────────────────────────── */
html.dark .badge-trial {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #FCD34D !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px !important;
  font-size: 11px !important;
  padding: 1px 8px !important;
}

/* ─── helper-text / picker-helper ───────────────── */
html.dark .helper-text,
html.dark .picker-helper {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.6;
}

/* ─── name-chip / group-chip(组织标签)────────── */
html.dark .name-chip,
html.dark .group-chip {
  display: inline-flex; align-items: center;
  background: rgba(91, 141, 255, 0.10);
  color: #BFDBFE;
  border: 1px solid rgba(91, 141, 255, 0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  margin-right: 4px;
}

/* ─── pagination · 数字按钮 ────────────────────── */
html.dark .pagination a,
html.dark .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px;
  margin: 0 2px;
  padding: 0 8px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-700);
  text-decoration: none;
  font-size: 12px;
}
html.dark .pagination a:hover {
  background: rgba(91, 141, 255, 0.12);
  color: var(--ink-900);
  border-color: rgba(91,141,255,0.30);
}
html.dark .pagination .current,
html.dark .pagination span.current {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

/* ─── 头像首字 · table 列里的头像圆 ─────────────── */
html.dark td .avatar-circ,
html.dark .avatar-circ {
  box-shadow: 0 0 0 1px rgba(91, 141, 255, 0.20),
              0 2px 8px rgba(91, 141, 255, 0.18);
}

/* ─── action button group(批准/驳回/通过 等)──── */
html.dark .review-actions button,
html.dark .review-actions .btn,
html.dark .review-actions a {
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── 滚动条:再调一次匹配新底色 ─────────────── */
html.dark ::-webkit-scrollbar-thumb {
  background: rgba(91, 141, 255, 0.20);
  border-radius: 8px;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 141, 255, 0.40);
}

/* ─── status badge 半透明胶囊统一 ─────────────── */
html.dark .badge-status {
  border-radius: 999px !important;
  padding: 2px 10px !important;
  font-size: 11px !important;
  font-weight: 500;
}

/* ─── card-eyebrow 样式精修 ────────────────── */
html.dark .card-eyebrow,
html.dark .kpi-card-eyebrow,
html.dark .kpi-label {
  color: var(--ink-500) !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

/* ─── 内嵌回复 / suggestion-card 边框柔化 ────── */
html.dark .suggestion-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
}

/* ─── responsive 修正:mobile 下侧栏关闭 + content 全宽 ─── */
@media (max-width: 1279px) {
  .content > .topbar { border-radius: 12px; }
  .layout { padding: 16px; gap: 12px; }
}

/* ─── hero-card-eyebrow 渐变小亮点 ─────────── */
html.dark .hero-card-eyebrow {
  color: var(--ink-500) !important;
}
html.dark .hero-card-eyebrow::before {
  background: var(--grad-brand);
  box-shadow: 0 0 8px rgba(91, 141, 255, 0.50);
}

/* ─── topbar-badge / sidebar-badge 红点统一 ────── */
html.dark .topbar-badge,
html.dark .sidebar-badge {
  background: linear-gradient(135deg, #F87171, #DC2626);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
}

/* ─── ws-pre 死令保留(锚点 / 报告 pre 区)────── */
html.dark pre.anchor-header { white-space: pre; }

/* ─── 代码 / 等宽显示统一 ─────────────────── */
html.dark code, html.dark pre {
  font-family: "JetBrains Mono", "Consolas", "Cascadia Mono", monospace;
  background: rgba(91, 141, 255, 0.06);
  color: #DBEAFE;
  border: 1px solid rgba(91, 141, 255, 0.18);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ─── 表格里 op-link 无下划线干净 ─────────── */
html.dark .admin-table a { text-decoration: none; }
html.dark .admin-table a:hover { text-decoration: underline; }

/* ─── 选中行高亮 ────────────────────────── */
html.dark .admin-table tr.selected,
html.dark .admin-table tr.row-selected {
  background: rgba(91, 141, 255, 0.10) !important;
}

/* ─── focus ring 全局 ───────────────────── */
html.dark *:focus-visible {
  outline: 2px solid rgba(91, 141, 255, 0.55) !important;
  outline-offset: 2px;
  border-radius: 4px;
}
html.dark .btn:focus-visible {
  outline-offset: 3px;
}

/* ════════════════════════════════════════════════════════════════════
   DFORCE OS · Dark 模式 inline-style 覆盖层 · 2026-04-24 v2 polish2
   templates 里残留的 hardcoded 浅色 inline 全靠这里覆盖,不再逐文件改
   ════════════════════════════════════════════════════════════════════ */

/* 浅色背景 → 深卡背景 */
html.dark [style*="background:#fff"]:not(.kpi-card):not(.btn),
html.dark [style*="background: #fff"]:not(.kpi-card):not(.btn),
html.dark [style*="background:#FFF"],
html.dark [style*="background: white"],
html.dark [style*="background:white"],
html.dark [style*="background:#fafafa"],
html.dark [style*="background:#f9fafb"],
html.dark [style*="background:#f8f9fa"],
html.dark [style*="background:#f6f7f9"],
html.dark [style*="background:#f3f4f6"],
html.dark [style*="background:#f5f3ee"] {
  background: var(--card-bg-soft) !important;
  color: var(--ink-900) !important;
}
/* 浅色边框 → 深边框 */
html.dark [style*="border:1px solid #e5e7eb"],
html.dark [style*="border: 1px solid #e5e7eb"],
html.dark [style*="border:1px solid #d1d5db"],
html.dark [style*="border-color:#e5e7eb"],
html.dark [style*="border-color: #e5e7eb"] {
  border-color: var(--border) !important;
}
html.dark [style*="border-bottom:1px solid #e5e7eb"],
html.dark [style*="border-bottom:1px solid #f3f4f6"] {
  border-bottom-color: var(--border-soft) !important;
}
/* 警告色块 amber 系 → dark amber */
html.dark [style*="background:#fef3c7"],
html.dark [style*="background:#fef9c3"] {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #FCD34D !important;
}
html.dark [style*="border-color:#fcd34d"] {
  border-color: rgba(245, 158, 11, 0.40) !important;
}
html.dark [style*="color:#92400e"] {
  color: #FCD34D !important;
}
/* 错误色块 red 系 → dark red */
html.dark [style*="background:#fee2e2"],
html.dark [style*="background:#fef2f2"] {
  background: rgba(248, 113, 113, 0.14) !important;
  color: #FCA5A5 !important;
}
html.dark [style*="color:#dc2626"] { color: #FCA5A5 !important; }
html.dark [style*="color: #dc2626"] { color: #FCA5A5 !important; }
html.dark [style*="color:#b91c1c"] { color: #FECACA !important; }
/* 灰文 ink-500 系 */
html.dark [style*="color:#6b7280"],
html.dark [style*="color: #6b7280"],
html.dark [style*="color:#4b5563"],
html.dark [style*="color: #4b5563"],
html.dark [style*="color:#374151"],
html.dark [style*="color: #374151"],
html.dark [style*="color:#9ca3af"] {
  color: var(--ink-500) !important;
}
/* OK 绿文 */
html.dark [style*="color:#15803d"] { color: #86EFAC !important; }
html.dark [style*="color:#16a34a"] { color: #86EFAC !important; }
html.dark [style*="color:#10b981"] { color: #86EFAC !important; }
html.dark [style*="color:#059669"] { color: #86EFAC !important; }
/* 黄文 / orange */
html.dark [style*="color:#d97706"] { color: #FCD34D !important; }
html.dark [style*="color:#f59e0b"] { color: #FCD34D !important; }
/* 蓝调链接 */
html.dark [style*="color:#1d4ed8"],
html.dark [style*="color:#2563eb"],
html.dark [style*="color:#3b82f6"] {
  color: #93C5FD !important;
}

/* code/pre 包 inline 浅底 */
html.dark code[style*="background:#f6f7f9"],
html.dark code[style*="background:#f3f4f6"] {
  background: rgba(91, 141, 255, 0.10) !important;
  color: #DBEAFE !important;
}

/* readonly input 覆盖 */
html.dark input[readonly][style*="background:#f6f7f9"] {
  background: rgba(91, 141, 255, 0.06) !important;
  color: var(--ink-500) !important;
  border-color: var(--border) !important;
}

/* btn-secondary 风格的覆盖型 cancel 按钮(reports/new 里那些) */
html.dark button[style*="background:#fff"][style*="color:#374151"] {
  background: var(--card-bg-soft) !important;
  color: var(--ink-700) !important;
  border-color: var(--border) !important;
}

/* banner-warn 里被 inline 改成纯红的(reports/new line 186) */
html.dark .banner-warn[style*="background:#fee2e2"] {
  background: rgba(248, 113, 113, 0.10) !important;
  color: #FCA5A5 !important;
  border-color: rgba(248, 113, 113, 0.40) !important;
}

/* banner-info amber 警告 */
html.dark .banner-info {
  background: rgba(91, 141, 255, 0.08) !important;
  color: var(--ink-800) !important;
  border: 1px solid rgba(91, 141, 255, 0.25) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}
html.dark .banner-warn {
  background: rgba(245, 158, 11, 0.10) !important;
  color: #FCD34D !important;
  border: 1px solid rgba(245, 158, 11, 0.40) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}
html.dark .banner-final {
  background: rgba(91, 141, 255, 0.10) !important;
  color: #BFDBFE !important;
  border: 1px solid rgba(91, 141, 255, 0.30) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}
html.dark .banner-simulate {
  background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(245,158,11,0.08)) !important;
  color: #FCD34D !important;
  border: 1px solid rgba(245,158,11,0.45) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
}

/* report-card-overdue (legacy, 没在 polish 层覆盖)*/
html.dark .report-card-overdue {
  border-color: rgba(248, 113, 113, 0.30) !important;
}

/* 报告 detail 页 anchor + content 区美化 */
html.dark .report-preview {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
}

/* 表头 background 覆盖 — 任何 tr style background:#f9fafb */
html.dark tr[style*="background:#f9fafb"],
html.dark thead tr {
  background: var(--card-bg-soft) !important;
}
html.dark thead tr th {
  color: var(--ink-500) !important;
  font-weight: 600 !important;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* 报告填报表单 .annotation-input / json-editor 等 */
html.dark .annotation-input,
html.dark .json-editor {
  background: var(--card-bg-soft) !important;
  color: var(--ink-900) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

/* input type=date 的日历图标在 dark 下 invert(浏览器默认黑色) */
html.dark input[type="date"]::-webkit-calendar-picker-indicator,
html.dark input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) brightness(1.1);
  cursor: pointer;
}

/* ─── 表格里 hover 高亮(再加强对比)──────────────── */
html.dark .admin-table tbody tr:hover td {
  background: rgba(91, 141, 255, 0.06) !important;
}

/* ─── status-badge 通用回归(覆盖 inline color)─── */
html.dark .status-badge-overdue {
  background: rgba(248, 113, 113, 0.16) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(248,113,113,0.30) !important;
  border-radius: 999px !important;
  padding: 2px 10px !important;
}

/* ─── footer / version 文字 ────────────────────── */
html.dark .footer,
html.dark p[style*="v0.1.0"],
html.dark p[style*="version"] {
  color: var(--ink-500) !important;
}

/* ─── reports/new.html AI 起草按钮(蓝调浅底)──────── */
html.dark button[style*="background:#eff6ff"],
html.dark button[style*="background: #eff6ff"] {
  background: rgba(91, 141, 255, 0.10) !important;
  color: #93C5FD !important;
  border-color: rgba(91, 141, 255, 0.40) !important;
  border-radius: 8px !important;
}
html.dark button[style*="border:1px solid #60a5fa"] {
  border-color: rgba(91, 141, 255, 0.40) !important;
}
html.dark button[style*="color:#1e40af"],
html.dark button[style*="color: #1e40af"] {
  color: #93C5FD !important;
}

/* ─── modal 内 code(临时密码)────────────────── */
html.dark .modal-box code {
  background: rgba(91, 141, 255, 0.12) !important;
  color: #BFDBFE !important;
  border: 1px solid rgba(91, 141, 255, 0.30) !important;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

/* ─── employee-edit readonly 字段 ───────────── */
html.dark input[readonly] {
  background: rgba(91, 141, 255, 0.04) !important;
  color: var(--ink-500) !important;
  border-color: var(--border) !important;
  cursor: not-allowed;
}

/* ─── reports/new 大表单 polish ───────────── */
html.dark .report-form-wrap label,
html.dark form label {
  color: var(--ink-700);
  font-weight: 500;
  font-size: 13px;
}
html.dark .role-switcher {
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
html.dark .role-switcher select {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--ink-900) !important;
  border-radius: 8px !important;
}

/* ─── 新建员工 / 重置密码按钮 modal-actions ──── */
html.dark .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ─── 评审动作按钮组(reviews 页)─────────── */
html.dark .review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
html.dark .review-actions button {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
}
html.dark .review-actions button.btn-secondary {
  background: var(--card-bg-soft) !important;
  color: var(--ink-700) !important;
  border: 1px solid var(--border) !important;
}

/* ─── 全局 sticky topbar 视觉再加强 ─────── */
html.dark .content > .topbar {
  box-shadow: 0 4px 24px rgba(7, 12, 24, 0.40);
}

/* ─── helper-text 小字 ─────────────────── */
html.dark .helper-text {
  color: var(--ink-500) !important;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.5;
}

/* ─── timeline / review-chain ─────────── */
html.dark .review-timeline {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
html.dark .review-timeline-item {
  padding: 12px 0 12px 24px;
  border-left: 2px solid var(--border);
  position: relative;
  margin-left: 8px;
}
html.dark .review-timeline-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 16px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(91, 141, 255, 0.40);
}
html.dark .review-timeline-item:last-child {
  border-left-color: transparent;
}

/* ─── 异常 mark / blocker / deviation list ──── */
html.dark .blocker-list,
html.dark .deviation-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
html.dark .blocker-list li,
html.dark .deviation-list li {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.20);
  border-radius: 8px;
  color: var(--ink-800);
  font-size: 13px;
}

/* ─── card-eyebrow / 卡片小副标题 重申 ──── */
html.dark .card-eyebrow::before {
  background: var(--grad-brand) !important;
}

/* ─── 图标 stroke 默认色 ─────────────── */
html.dark svg { stroke: currentColor; }

/* ─── 列表项 hover 态(各种 ul/ol)──── */
html.dark ul.org-tree li,
html.dark .missed-group-list li {
  transition: background 0.12s ease;
}
html.dark .missed-group-head {
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-900);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  width: 100%;
  text-align: left;
}
html.dark .missed-group-head:hover {
  background: rgba(91, 141, 255, 0.10);
  border-color: rgba(91, 141, 255, 0.30);
}
html.dark .missed-group-count {
  background: rgba(248, 113, 113, 0.16);
  color: #FCA5A5;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: auto;
}
html.dark .missed-group-list {
  list-style: none;
  padding: 0 0 0 24px;
  margin: 0 0 14px;
}
html.dark .missed-group-list li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-800);
}
html.dark .missed-name {
  color: #93C5FD !important;
  text-decoration: none;
}
html.dark .missed-name:hover { text-decoration: underline; }
html.dark .missed-group-caret {
  color: var(--ink-500);
  font-size: 11px;
}
html.dark .missed-group-name {
  font-weight: 600;
  color: var(--ink-900);
}

/* ════════════════════════════════════════════════════════════════════
   DFORCE OS · 1:1 重写组件层 · 2026-04-24 v3
   02-desktop:KPI 图标卡 / 进度条 / 部门进度行 / 实时动态
   ════════════════════════════════════════════════════════════════════ */

/* ─── KPI icon 卡 · 02-desktop 每张卡 icon + label 在顶 ─────── */
.kpi-icon-card { padding: 16px 18px; }
.kpi-icon-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.kpi-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.kpi-icon-cyan   { background: var(--grad-brand); }
.kpi-icon-blue   { background: var(--grad-brand); }
.kpi-icon-teal   { background: var(--grad-teal); }
.kpi-icon-pink   { background: var(--grad-pink); }
.kpi-icon-amber  { background: var(--grad-amber); }
.kpi-icon-violet { background: var(--grad-violet); }
.kpi-icon-card .kpi-label {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ink-500) !important;
}
.kpi-icon-card .kpi-value {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.kpi-icon-card .kpi-meta {
  margin: 0;
  font-size: 12px;
  color: var(--ink-500);
}

/* ─── 进度条 · KPI 完成率 + 部门进度共用 ───────── */
.kpi-bar {
  background: rgba(91, 141, 255, 0.10);
  border-radius: 999px;
  overflow: hidden;
  height: 6px;
  width: 100%;
  margin-top: 4px;
}
.kpi-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: width 0.4s ease;
}

/* ─── 部门进度行 · 02-desktop 部门提交进度 ───── */
html.dark .dept-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 50px;
  gap: 12px;
  align-items: center;
  padding: 0;
  border-bottom: none;
}
html.dark .dept-row + .dept-row {
  margin-top: 0;
}

/* ─── 实时动态 list 行 hover ──────────────── */
html.dark .card ul li {
  transition: background 0.12s ease;
}

/* ─── KPI icon 卡:覆盖前面 polish 层的 ::before 顶 bar(避免冲突)── */
html.dark .kpi-icon-card::before { display: none !important; }

/* ─── h3 inside .card 的 margin reset ──── */
html.dark .card > h3:first-child {
  margin-top: 0 !important;
}

/* ─── pending-card · 03-desktop 待填报红/橙/蓝 banner ───── */
.pending-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 0;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.pending-card-bar {
  width: 4px; align-self: stretch;
  background: var(--ink-300);
  margin-left: 0;
  border-radius: 0 4px 4px 0;
  flex-shrink: 0;
}
.pending-card.pending-overdue {
  background: linear-gradient(135deg, rgba(248,113,113,0.14) 0%, rgba(248,113,113,0.04) 100%);
  border-color: rgba(248, 113, 113, 0.40);
}
.pending-card.pending-overdue .pending-card-bar { background: var(--grad-pink); }
.pending-card.pending-urgent {
  background: linear-gradient(135deg, rgba(245,158,11,0.10) 0%, rgba(245,158,11,0.03) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}
.pending-card.pending-urgent .pending-card-bar { background: var(--grad-amber); }
.pending-card.pending-normal {
  border-color: rgba(91, 141, 255, 0.20);
}
.pending-card.pending-normal .pending-card-bar { background: var(--grad-brand); }

/* ─── hero-card-actions 按钮间距(reports 列表)──── */
html.dark .hero-card-actions .btn,
html.dark .hero-card-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── queue-card · 04-desktop reviewer 队列卡 ──── */
.queue-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.queue-card:hover {
  border-color: rgba(91, 141, 255, 0.40);
  box-shadow: 0 0 24px rgba(91, 141, 255, 0.10);
}
.queue-card.queue-card-urgent {
  background: linear-gradient(135deg, rgba(245,158,11,0.10) 0%, rgba(245,158,11,0.03) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}
.queue-card.queue-card-overtime {
  background: linear-gradient(135deg, rgba(248,113,113,0.14) 0%, rgba(248,113,113,0.04) 100%);
  border-color: rgba(248, 113, 113, 0.40);
}

/* ─── badge-identity 字号收紧 ──── */
html.dark .badge-identity {
  font-size: 10px !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-weight: 600;
}

/* ─── 员工管理 row action 按钮(07-desktop)──── */
.emp-action-btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--card-bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-600);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.emp-action-btn:hover {
  background: rgba(91, 141, 255, 0.10);
  color: #93C5FD;
  border-color: rgba(91, 141, 255, 0.40);
}
.emp-action-btn.emp-action-danger:hover {
  background: rgba(248, 113, 113, 0.10);
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.40);
}

/* ─── 报告 detail 2 列布局 mobile 堆叠 ─── */
@media (max-width: 1023px) {
  .content section[style*="grid-template-columns:minmax(0,2fr) minmax(0,1fr)"],
  .content div[style*="grid-template-columns:minmax(0,2fr) minmax(0,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* dashboard-tab 当 span(纯展示)样式 */
html.dark span.dashboard-tab {
  background: transparent !important;
  color: var(--ink-500) !important;
  cursor: default;
}
html.dark span.dashboard-tab.active {
  background: var(--grad-brand) !important;
  color: #fff !important;
}

/* ════════════════════════════════════════════════════════════════════
   登录页 split 布局 · 2026-04-24 · 参照 01-desktop / m02-mobile
   ════════════════════════════════════════════════════════════════════ */
.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  margin: -20px;
  position: relative;
  overflow: hidden;
  /* 完全统一的暗背景(单色)— 装饰光晕通过 :before / .login-bg-* 叠加 */
  background: #060B17;
}
html:not(.dark) .login-split {
  background: linear-gradient(135deg, #F0F4FB 0%, #E8EEF8 100%);
}
/* aurora 装饰层 — 跨整个 split,无方向偏好,达成「无分界」感 */
.login-bg-aurora {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 1200px 800px at 50% -10%, rgba(34, 211, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 1400px 900px at 50% 110%, rgba(91, 141, 255, 0.18), transparent 55%);
  z-index: 0;
}
html:not(.dark) .login-bg-aurora {
  background:
    radial-gradient(ellipse 1200px 800px at 50% -10%, rgba(91, 141, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 1400px 900px at 50% 110%, rgba(34, 211, 255, 0.10), transparent 55%);
}
/* dot pattern 网格 — 跨整个 split,均匀分布 */
.login-bg-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(91, 141, 255, 0.10) 1px, transparent 1.5px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 1200px 800px at center, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 1200px 800px at center, #000 30%, transparent 80%);
  z-index: 0;
}
html:not(.dark) .login-bg-grid {
  background-image:
    radial-gradient(circle, rgba(15, 23, 42, 0.08) 1px, transparent 1.5px);
}

/* 主题切换按钮 — 浮在右上角,绝对定位 */
.login-theme-toggle {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(91, 141, 255, 0.30);
  color: #E8F0FA;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(6px);
}
.login-theme-toggle:hover {
  background: rgba(91, 141, 255, 0.18);
  border-color: rgba(91, 141, 255, 0.55);
}
html:not(.dark) .login-theme-toggle {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #1E293B;
}
html:not(.dark) .login-theme-toggle:hover {
  background: rgba(91, 141, 255, 0.12);
  border-color: rgba(91, 141, 255, 0.40);
}
@media (min-width: 1280px) {
  .login-split { margin: -24px; }
}

/* ── LEFT 半 · 品牌 · 仅 ≥1024 显示 · 透明共享 split bg ── */
.login-side {
  position: relative;
  background: transparent;
  z-index: 1;
}
.login-side-inner {
  position: relative;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.login-side-bottom {
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.16em;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}
html:not(.dark) .login-side-bottom { color: #6B7280; }
.login-side-version {
  display: inline-flex; align-items: center; gap: 6px;
}
.login-side-version::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(91, 141, 255, 0.50);
}
.login-side-tagline {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: #B5C2D8;
  letter-spacing: 0.04em;
}
html:not(.dark) .login-side-tagline { color: #475569; }

.login-side-top {
  display: flex; align-items: center; gap: 12px;
}
.login-side-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1A2B4F 0%, #243A6E 100%);
  box-shadow:
    0 0 0 1px rgba(91, 141, 255, 0.40),
    0 0 28px rgba(34, 211, 255, 0.50);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.login-side-logo img {
  width: 110%; height: 110%; object-fit: contain;
}
.login-side-brand {
  font-size: 17px; font-weight: 700; color: #FFFFFF;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(7, 12, 24, 0.50);
}
.login-side-eyebrow {
  font-size: 11px;
  background: linear-gradient(135deg, #22D3FF 0%, #5B8DFF 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  letter-spacing: 0.3em;
  font-weight: 800;
  margin-top: 4px;
}

.login-side-center { max-width: 540px; }
.login-side-status {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34, 211, 255, 0.10);
  border: 1px solid rgba(34, 211, 255, 0.30);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 10px; font-weight: 700;
  color: #67E8F9;
  letter-spacing: 0.24em;
  margin-bottom: 28px;
}
.login-side-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.80);
  animation: pulse 2s ease-in-out infinite;
}

.login-side-headline {
  margin: 0;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #FFFFFF;
  text-shadow: 0 4px 24px rgba(7, 12, 24, 0.50);
}
.login-side-headline-grad {
  background: linear-gradient(135deg, #67E8F9 0%, #5B8DFF 60%, #A78BFA 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(91, 141, 255, 0.30));
}
.login-side-sub {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: #B5C2D8;
  max-width: 480px;
}

.login-side-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(91, 141, 255, 0.16);
}
.login-stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.login-stat-cyan  { color: #67E8F9; text-shadow: 0 0 24px rgba(103,232,249,0.30); }
.login-stat-pink  { color: #F472B6; text-shadow: 0 0 24px rgba(244,114,182,0.30); }
.login-stat-amber { color: #FBBF24; text-shadow: 0 0 24px rgba(251,191,36,0.30); }
.login-stat-label {
  font-size: 11px;
  color: #6A7A95;
  letter-spacing: 0.16em;
  margin-top: 6px;
  font-weight: 500;
}

/* 核心理念 blockquote — 2026-04-24 用户保留 */
.login-side-creed {
  margin: 28px 0 0;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(34,211,255,0.10), rgba(91,141,255,0.06));
  border-left: 3px solid #5B8DFF;
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  line-height: 2.0;
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 0.10em;
  font-style: normal;
  max-width: 520px;
  text-shadow: 0 1px 4px rgba(7, 12, 24, 0.40);
}
html:not(.dark) .login-side-creed {
  background: linear-gradient(135deg, rgba(91,141,255,0.10), rgba(34,211,255,0.06));
  color: #1E3A8A;
  text-shadow: none;
}

/* ── RIGHT 半 · 登录卡 · 完全透明 fuse 进 split bg ── */
.login-main {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 32px;
  background: transparent;
  position: relative;
}
.login-mobile-brand { display: none; }

.login-card-v2 {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(135deg, rgba(15,26,48,0.85) 0%, rgba(20,33,57,0.85) 100%) !important;
  border: 1px solid rgba(91, 141, 255, 0.25) !important;
  border-radius: 20px !important;
  padding: 36px 36px !important;
  box-shadow:
    0 0 0 1px rgba(91, 141, 255, 0.06),
    0 32px 80px -20px rgba(7, 12, 24, 0.60) !important;
  backdrop-filter: blur(12px);
}
html:not(.dark) .login-card-v2 {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow:
    0 0 0 1px rgba(91, 141, 255, 0.04),
    0 32px 80px -20px rgba(15, 23, 42, 0.20) !important;
}
html:not(.dark) .login-card-v2 .login-card-h2 {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  -webkit-background-clip: text; background-clip: text;
}
html:not(.dark) .login-card-v2 .form-field input {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  color: #0F172A !important;
}
html:not(.dark) .login-card-v2 .form-field input::placeholder { color: #94A3B8; }
html:not(.dark) .login-side-brand,
html:not(.dark) .login-side-headline {
  color: #0F172A;
  text-shadow: none;
}
html:not(.dark) .login-side-tagline { color: #475569; }
html:not(.dark) .login-side-status {
  background: rgba(34, 211, 255, 0.12);
  border-color: rgba(34, 211, 255, 0.40);
  color: #0E7490;
}
.login-card-h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  margin: 0 0 8px !important;
  background: linear-gradient(135deg, #E8F0FA 0%, #B5C2D8 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  letter-spacing: -0.01em;
}
.login-card-v2 .login-card-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 24px;
}
.login-card-v2 .form-field {
  margin-bottom: 16px;
  position: relative;
}
.login-card-v2 .form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.login-card-v2 .form-field input {
  width: 100%;
  max-width: none !important;
  padding: 11px 14px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(91, 141, 255, 0.18) !important;
  border-radius: 10px !important;
  color: var(--ink-900) !important;
  font-size: 14px !important;
}
.login-card-v2 .form-field input::placeholder { color: var(--ink-400); }
.login-card-v2 .form-field input:focus {
  border-color: rgba(91, 141, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(91, 141, 255, 0.15) !important;
  background: rgba(91, 141, 255, 0.04) !important;
  outline: none !important;
}

.login-forgot-link {
  font-size: 12px;
  color: #93C5FD !important;
  text-decoration: none;
}
.login-forgot-link:hover { color: #BFDBFE !important; text-decoration: underline; }

.field-pw { position: relative; }
.login-pw-toggle {
  position: absolute;
  right: 12px; bottom: 10px;
  background: none;
  border: none;
  color: var(--ink-500);
  cursor: pointer;
  padding: 4px;
  display: inline-flex; align-items: center;
}
.login-pw-toggle:hover { color: var(--ink-700); }

.login-submit-btn {
  width: 100%;
  padding: 13px !important;
  font-size: 14px !important;
  letter-spacing: 0.5em !important;
  margin-top: 10px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-help-block {
  margin-top: 22px;
  padding: 12px 16px;
  background: rgba(91, 141, 255, 0.06);
  border-left: 3px solid rgba(91, 141, 255, 0.40);
  border-radius: 0 8px 8px 0;
  font-size: 11px;
  color: var(--ink-500);
  line-height: 1.8;
}

.login-totp-input {
  font-family: 'JetBrains Mono', 'Consolas', monospace !important;
  letter-spacing: 8px !important;
  text-align: center !important;
  font-size: 20px !important;
  padding: 14px !important;
}

.login-back-link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--ink-500);
  font-size: 12px;
  cursor: pointer;
}
.login-back-link:hover { color: var(--ink-700); }

.login-footer {
  margin-top: 32px;
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.05em;
}

/* mobile / tablet < 1024:左半隐藏,移动 brand 显示 */
@media (max-width: 1023px) {
  .login-split {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .login-side { display: none; }
  .login-mobile-brand {
    display: block;
    text-align: center;
    margin-bottom: 24px;
  }
  .login-mobile-brand .login-halo-logo {
    margin: 0 auto 16px;
    width: 80px; height: 80px;
    overflow: hidden;
    border-radius: 22px;
  }
  .login-mobile-brand .login-halo-logo img {
    width: 110%; height: 110%;
    object-fit: contain;
  }
  .login-mobile-brand .login-brand-name { font-size: 22px; }
  .login-card-v2 { padding: 28px !important; }
}
@media (max-width: 1399px) {
  .login-side-headline { font-size: 44px; }
  .login-side-inner { padding: 40px 40px; }
}
