/* ==========================================================================
   ★ APQP 设计系统 v2（2026-11-05）
   --------------------------------------------------------------------------
   目标：解决「界面看起来 LOW」的三个根因
     ① emoji 当图标 → 改为 SVG 线框图标（icons.js）
     ② 内联样式满天飞（1330 处）→ 抽成语义化组件类
     ③ 没有视觉语言 → 建立统一的颜色/间距/圆角/阴影/字号刻度

   本层采用「后置覆盖」方式实现，不动原有规则 —— 保证向后兼容，
   避免一次改动影响几百处内联样式。
   ========================================================================== */

/* ---------- 设计令牌（语义化） ---------- */
:root {
  /* 表面 */
  --surface:        #ffffff;
  --surface-sunken: #f4f6fa;
  --surface-raised: #ffffff;
  --surface-hover:  #f8fafc;
  --surface-muted:  #f1f5f9;

  /* 描边 */
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;
  --border-subtle:  #eef2f7;

  /* 文字 */
  --text:           #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* 品牌 */
  --brand:          #2563eb;
  --brand-hover:    #1d4ed8;
  --brand-subtle:   #eff6ff;
  --brand-border:   #bfdbfe;

  /* 语义状态（带浅底 + 深字，保证对比度） */
  --ok:             #047857;   --ok-bg:     #ecfdf5;   --ok-border:   #a7f3d0;
  --warn:           #b45309;   --warn-bg:   #fffbeb;   --warn-border: #fde68a;
  --danger:         #be123c;   --danger-bg: #fff1f2;   --danger-border:#fecdd3;
  --info:           #0369a1;   --info-bg:   #f0f9ff;   --info-border: #bae6fd;
  --neutral:        #475569;   --neutral-bg:#f8fafc;   --neutral-border:#e2e8f0;

  /* 间距刻度（4px 基数） */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;

  /* 圆角刻度 */
  --r-sm: 5px;  --r-md: 8px;  --r-lg: 12px;  --r-xl: 16px;  --r-full: 999px;

  /* 阴影刻度 */
  --sh-xs: 0 1px 2px rgba(15,23,42,.05);
  --sh-sm: 0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --sh-md: 0 4px 12px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
  --sh-lg: 0 12px 28px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.05);
  --sh-ring: 0 0 0 3px rgba(37,99,235,.14);

  /* 字号刻度 */
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px;
  --fs-lg: 16px; --fs-xl: 19px; --fs-2xl: 24px; --fs-3xl: 30px;

  /* 侧边栏 */
  --nav-active-bg: rgba(37,99,235,.16);
  --nav-active-bar: #60a5fa;
}

/* ---------- 基础 ---------- */
body {
  color: var(--text);
  background: var(--surface-sunken);
  font-size: var(--fs-md);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;
}

/* ---------- SVG 图标基础 ---------- */
.ic {
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
  stroke-width: 2;
}
.nav-icon .ic { width: 18px; height: 18px; }
.btn .ic   { width: 15px; height: 15px; }
a .ic, .link .ic { pointer-events: none; }

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar {
  background: #0b1220;
  border-right: 1px solid rgba(148,163,184,.10);
  box-shadow: 1px 0 0 rgba(15,23,42,.04);
}

.sidebar-header {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.sidebar-header .logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .14em;
  background: linear-gradient(135deg, #60a5fa, #3b82f6 55%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.sidebar-header .company-name {
  font-size: var(--fs-xs);
  color: #64748b;
  margin-top: 5px;
  letter-spacing: .02em;
}

.sidebar-nav {
  padding: 10px 10px 16px;
  gap: 1px;
}

/* 导航分组标题 */
.nav-group-label {
  padding: 16px 12px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #475569;
}

.nav-item {
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: var(--r-md);
  border-left: none;
  color: #94a3b8;
  font-size: var(--fs-base);
  font-weight: 500;
  gap: 11px;
  position: relative;
  transition: background .16s ease, color .16s ease;
}
.nav-item .nav-icon {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color .16s ease;
  flex: none;
}
.nav-item:hover {
  background: rgba(148,163,184,.09);
  color: #e2e8f0;
}
.nav-item:hover .nav-icon { color: #94a3b8; }

.nav-item.active {
  background: var(--nav-active-bg);
  color: #ffffff;
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--nav-active-bar); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--nav-active-bar);
}

.sidebar-footer {
  border-top: 1px solid rgba(148,163,184,.12);
  padding: 12px 16px;
  background: rgba(15,23,42,.35);
}
.sidebar-footer .version {
  color: #475569;
  font-size: 10px;
  letter-spacing: .04em;
}
.user-role-display {
  background: rgba(148,163,184,.10);
  border: 1px solid rgba(148,163,184,.14);
  border-radius: var(--r-full);
  padding: 5px 12px;
  color: #cbd5e1;
  font-size: var(--fs-sm);
  gap: 6px;
}
.user-role-display .role-icon { color: #fbbf24; display:inline-flex; }

/* ==========================================================================
   顶栏
   ========================================================================== */
.top-bar {
  height: var(--header-height);
  padding: 0 24px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar .page-title {
  font-size: var(--fs-lg);
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
}
.menu-toggle {
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: background .15s ease;
}
.menu-toggle:hover { background: var(--surface-muted); }

.content-area {
  padding: 24px 28px 40px;
  max-width: 1560px;
  width: 100%;
}

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.card:hover { box-shadow: var(--sh-md); }

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}
.card-title {
  font-size: var(--fs-md);
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .ic { color: var(--text-muted); }
.card-body { padding: 18px 20px; }

/* 页头区块 */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header .ph-title {
  font-size: var(--fs-2xl);
  font-weight: 680;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.25;
}
.page-header .ph-sub {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.6;
}
.page-header .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  border-radius: var(--r-md);
  font-weight: 550;
  font-size: var(--fs-base);
  padding: 7px 14px;
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease,
              box-shadow .16s ease, transform .08s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--sh-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,.24);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-secondary);
  box-shadow: var(--sh-xs);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--gray-400);
  color: var(--text);
}

.btn-success { background: #059669; border-color: #059669; color: #fff; }
.btn-success:hover:not(:disabled) { background: #047857; }
.btn-warning { background: #d97706; border-color: #d97706; color: #fff; }
.btn-warning:hover:not(:disabled) { background: #b45309; }
.btn-danger  { background: #e11d48; border-color: #e11d48; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #be123c; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-muted); color: var(--text); }

.btn-sm { padding: 5px 11px; font-size: var(--fs-sm); }
.btn-xs { padding: 3px 9px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn .ic { width: 14px; height: 14px; }
.btn-sm .ic { width: 13px; height: 13px; }

/* ==========================================================================
   表格
   ========================================================================== */
.data-table {
  font-size: var(--fs-base);
  border-collapse: separate;
  border-spacing: 0;
}
.data-table th,
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.data-table thead th {
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: .02em;
  text-transform: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.data-table thead th:first-child { border-top-left-radius: var(--r-sm); }
.data-table thead th:last-child  { border-top-right-radius: var(--r-sm); }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td { color: var(--text-secondary); }
.data-table td strong, .data-table td b { color: var(--text); font-weight: 600; }

/* 表格容器（横向滚动 + 圆角裁切） */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.table-wrap .data-table thead th:first-child { border-top-left-radius: 0; }
.table-wrap .data-table thead th:last-child  { border-top-right-radius: 0; }

/* ==========================================================================
   徽标 / 状态
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.7;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge .ic { width: 12px; height: 12px; }
.badge-completed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge-in_progress,
.badge-progress { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-pending { background: var(--neutral-bg); color: var(--neutral); border-color: var(--neutral-border); }
.badge-approved { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-overdue { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

/* 状态圆点 */
.doc-status {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  display: inline-block;
  flex: none;
}
.doc-status.completed { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.16); }
.doc-status.in_progress { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.16); }
.doc-status.pending { background: #cbd5e1; box-shadow: 0 0 0 3px rgba(203,213,225,.35); }

/* ==========================================================================
   表单
   ========================================================================== */
.form-input, .form-select, .form-textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 7px 11px;
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--sh-ring);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-group { margin-bottom: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   弹窗 / 抽屉
   ========================================================================== */
.modal-overlay {
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal {
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: modalIn .18s cubic-bezier(.16,1,.3,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}
.modal-title { font-size: var(--fs-lg); font-weight: 650; letter-spacing: -.01em; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-muted);
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-container { gap: 8px; }
.toast {
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-base);
  animation: toastIn .2s cubic-bezier(.16,1,.3,1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   空状态 / 加载
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-muted);
}
.empty-state .es-icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg);
  background: var(--surface-muted);
  color: var(--text-muted);
}
.empty-state .es-icon .ic { width: 22px; height: 22px; }
.empty-state .es-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.empty-state .es-desc { font-size: var(--fs-sm); line-height: 1.7; }

/* ==========================================================================
   KPI / 统计块
   ========================================================================== */
.ppap-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ppap-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--sh-xs);
  transition: box-shadow .18s ease, transform .18s ease;
}
.ppap-kpi:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.ppap-kpi-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.ppap-kpi-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: 4px;
}
.ppap-kpi.is-warn .ppap-kpi-value { color: var(--warn); }
.ppap-kpi.is-ok .ppap-kpi-value { color: var(--ok); }

/* ==========================================================================
   细节：分隔线 / 滚动条 / 折叠块
   ========================================================================== */
.hr { height: 1px; background: var(--border-subtle); border: none; margin: 16px 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--r-full);
  border: 2px solid var(--surface-sunken);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

details > summary { transition: background .14s ease; }
details > summary:hover { background: var(--surface-hover); }
details > summary::-webkit-details-marker { display: none; }

/* 表单分节标题 */
.doc-form-section-title {
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--text);
  letter-spacing: .01em;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 阶段分组（details） */
.stage-doc-group > summary {
  border-radius: 0;
  transition: background .14s ease;
}
.stage-doc-group[open] > summary { border-bottom: 1px solid var(--border-subtle); }

/* 打印 */
@media print {
  .sidebar, .top-bar, .no-print, .app-footer { display: none !important; }
  .content-area { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  body { background: #fff; }
}

/* 响应式 */
@media (max-width: 1024px) {
  .content-area { padding: 18px 16px 32px; }
  .page-header .ph-title { font-size: var(--fs-xl); }
}
@media (max-width: 640px) {
  .top-bar { padding: 0 14px; }
  .content-area { padding: 14px 12px 28px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}

/* ==========================================================================
   ★ 图标尺寸（2026-11-05 追加）
   --------------------------------------------------------------------------
   icon() 不传 size 时不写 width/height → 由 CSS 用 1em 控制，
   这样图标自动跟随文字大小，视觉最协调。
   ========================================================================== */
.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  flex: none;
  stroke-width: 2;
}
/* emoji 被替换成的行内图标 */
.ic-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: -0.16em;
  margin-right: 1px;
  color: var(--text-muted);
}
.ic-inline .ic { width: 1em; height: 1em; }

/* 导航图标尺寸 */
.nav-icon .ic { width: 18px; height: 18px; }
.nav-icon { color: inherit; }

/* 按钮内图标 */
.btn .ic { width: 1em; height: 1em; }

/* 卡片标题里的图标 */
.card-title .ic { width: 16px; height: 16px; color: var(--text-muted); }

/* 徽标里的图标 */
.badge .ic { width: 12px; height: 12px; }

/* 状态圆点带文字时的间距 */
.doc-status + span { margin-left: 6px; }

/* 表格里的紧凑操作按钮 */
.data-table .btn-xs { opacity: .82; transition: opacity .14s ease; }
.data-table tr:hover .btn-xs { opacity: 1; }

/* 空状态图标 */
.empty-state .es-icon .ic { width: 22px; height: 22px; }
.empty-state .es-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  background: var(--surface-muted);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* 登录页 logo 改造 */
.login-logo { margin-bottom: 4px; }
.login-logo-mark {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .18em;
  background: linear-gradient(135deg, #60a5fa, #3b82f6 55%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-logo-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: .22em;
  margin-top: 2px;
}
.login-card {
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
}
.login-btn {
  border-radius: var(--r-md);
  font-weight: 600;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(37,99,235,.24);
  transition: background .16s ease, transform .08s ease;
}
.login-btn:hover { background: var(--brand-hover); }
.login-btn:active { transform: translateY(1px); }
.login-input {
  border-radius: var(--r-md);
  border-color: var(--border-strong);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--sh-ring);
}

/* ==========================================================================
   ★ 第二层：旧组件纳入设计系统（2026-11-05）
   --------------------------------------------------------------------------
   系统里有大量 B0~B20 时期写的组件类（stat-card / stage-cards / timeline 等），
   它们的配色/圆角/阴影是旧版的。这里统一提升质感，不改结构。
   ========================================================================== */

/* ---------- 统计卡片 ---------- */
.stats-grid { gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--sh-xs);
  gap: 14px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.stat-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); border-color: var(--border-strong); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex: none;
}
.stat-icon .ic { width: 20px; height: 20px; }
/* 图标底色改用浅色调 + 同色描边（比纯色块更协调） */
.stat-icon.blue   { background: var(--brand-subtle); color: var(--brand); }
.stat-icon.green  { background: var(--ok-bg);     color: var(--ok); }
.stat-icon.orange { background: var(--warn-bg);   color: var(--warn); }
.stat-icon.red    { background: var(--danger-bg); color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 3px; }

/* ---------- 阶段卡片 ---------- */
.stage-cards { gap: 12px; }
.stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: box-shadow .18s ease, transform .18s ease;
  overflow: hidden;
}
.stage-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.stage-card.current {
  border-color: var(--brand-border);
  box-shadow: 0 0 0 1px var(--brand-border), var(--sh-sm);
}
.stage-card .stage-name { color: var(--text); font-weight: 650; letter-spacing: -.01em; }

/* ---------- 进度条 ---------- */
.progress-bar {
  background: var(--surface-muted);
  border-radius: var(--r-full);
  overflow: hidden;
  height: 6px;
}
.progress-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: var(--r-full);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.progress-bar-fill.success { background: linear-gradient(90deg, #10b981, #059669); }

/* ---------- 徽标（旧版统一） ---------- */
.badge {
  border-radius: var(--r-full);
  font-weight: 600;
  letter-spacing: .01em;
}

/* ---------- 时间线 ---------- */
.timeline { position: relative; }
.timeline-item { position: relative; }

/* ---------- 分组标题（旧版） ---------- */
.section-title, .group-title {
  color: var(--text);
  font-weight: 650;
  letter-spacing: -.01em;
}

/* ---------- 表格容器：给 data-table 外面补一层圆角裁切 ---------- */
.table-card { overflow: hidden; }

/* ---------- 内联 primary 徽标 ---------- */
.badge-primary {
  background: var(--brand-subtle);
  color: var(--brand);
  border-color: var(--brand-border);
}

/* ---------- 输入框内的搜索图标 ---------- */
.search-box { position: relative; }
.search-box .ic {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 15px; height: 15px;
}
.search-box input { padding-left: 32px; }

/* ---------- 复选框（统一尺寸与主色） ---------- */
input[type="checkbox"], input[type="radio"] {
  width: 15px; height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: -2px;
}

/* ---------- 滚动容器 ---------- */
.scroll-y { overflow-y: auto; }

/* ---------- 页脚 ---------- */
.app-footer {
  padding: 16px 24px 22px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.app-footer a { color: var(--text-muted); text-decoration: none; }
.app-footer a:hover { color: var(--text-secondary); text-decoration: underline; }

/* ---------- 选中行 ---------- */
.data-table tbody tr.is-selected { background: var(--brand-subtle); }
.data-table tbody tr.is-selected:hover { background: #e0ecff; }

/* ---------- 键盘可达性 ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 页面头部图标 ---------- */
.page-header .ph-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--brand-subtle);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 2px;
}
.page-header .ph-icon .ic { width: 20px; height: 20px; }
