/* ==========================================================================
   MRP · 红人合作助手 V3 - High-End SaaS Enterprise Design System
   References: Linear (Dark Obsidian & Accents) + Stripe (Data Grid & Badges) + Vercel (Minimalism & Controls)
   ========================================================================== */

:root {
  /* ---------- 调色板 (Linear & Stripe Slate Palette) ---------- */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --paper: #ffffff;
  --paper-subtle: #f8fafc;
  --paper-hover: #f1f5f9;
  --paper-elevated: #ffffff;

  /* 文字体系 */
  --ink: #0f172a;           /* 主文字 Slate-900 */
  --ink-secondary: #334155; /* 次级文字 Slate-700 */
  --muted: #64748b;         /* 辅助/说明 Slate-500 */
  --muted-light: #94a3b8;   /* 占位/边框 Slate-400 */
  --muted-dark: #475569;    /* 深辅助 Slate-600 */

  /* 边框体系 (精细微边框体系) */
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --line-strong: #cbd5e1;

  /* 主色调：现代科技电光蓝 (Vibrant Tech Azure) */
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-active: #1e40af;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --brand-glow: rgba(37, 99, 235, 0.16);

  /* 侧边栏：黑曜石深色系 (Obsidian Midnight - Linear Style) */
  --nav: #090d16;
  --nav-surface: #0f172a;
  --nav-line: rgba(255, 255, 255, 0.08);
  --nav-text: #94a3b8;
  --nav-text-hover: #f8fafc;
  --nav-active-bg: rgba(37, 99, 235, 0.16);
  --nav-active-border: #3b82f6;

  /* 业务状态体系 (Stripe Pastel Badges with Indicators) */
  --green: #059669;
  --green-dark: #047857;
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;
  --green-glow: rgba(5, 150, 105, 0.15);

  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;

  --red: #e11d48;
  --red-dark: #be123c;
  --red-soft: #fff1f2;
  --red-border: #fecdd3;

  --purple: #7c3aed;
  --purple-dark: #6d28d9;
  --purple-soft: #f5f3ff;
  --purple-border: #ddd6fe;

  --slate: #475569;
  --slate-soft: #f1f5f9;
  --slate-border: #e2e8f0;

  /* 现代圆角 */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  /* 多层级柔和投影体系 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.03), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.07), 0 8px 10px -6px rgba(15, 23, 42, 0.03), 0 0 0 1px rgba(15, 23, 42, 0.05);

  /* 排版字体 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.03) 0%, transparent 60%);
  color: var(--ink);
  overflow-x: hidden;
}

/* 优雅超窄滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  user-select: none;
}
a {
  color: inherit;
  text-decoration: none;
}
h1, h2, h3, h4, p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ==========================================================================
   整体布局 Layout
   ========================================================================== */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ---------- 侧边栏 Sidebar (Linear Obsidian Style) ---------- */
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--nav);
  background-image: linear-gradient(180deg, #090d16 0%, #0d131f 100%);
  color: #dbe6f4;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--nav-line);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  overflow-y: auto;
  z-index: 30;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.logo:hover {
  opacity: 0.92;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
  pointer-events: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logo-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
}
.logo-text small {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.4px;
  font-weight: 500;
}

.logo-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.nav-group {
  margin-bottom: 14px;
}
.nav-caption {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #64748b;
  text-transform: uppercase;
  padding: 8px 10px 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--nav-text);
  text-align: left;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--nav-text-hover);
  transform: translateX(1px);
}

.nav-item.active {
  background: var(--nav-active-bg);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--nav-active-border);
}

.nav-item .ico {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.nav-item:hover .ico {
  opacity: 1;
}
.nav-item.active .ico {
  opacity: 1;
  color: #60a5fa;
}

.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .count {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

/* 侧边栏底部连接状态卡片 */
.side-foot {
  margin-top: auto;
  padding: 12px 11px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
}
.side-foot > div:first-child {
  color: #cbd5e1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}
.side-foot > div:first-child::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
#side-env {
  font-size: 10.5px;
  color: #64748b;
  word-break: break-all;
}

/* ---------- 主体与顶栏 Topbar (Frosted Glass & Command Bar) ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.crumb {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.crumb b {
  color: var(--ink);
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 顶部快速搜索与全局动作快捷胶囊 (Raycast Style) */
.quick-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-search-trigger:hover {
  background: #ffffff;
  border-color: var(--brand-border);
  color: var(--brand);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}
.quick-search-trigger kbd {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted-dark);
}

.env-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted-dark);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-weight: 500;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 6px var(--green-glow);
}
.dot.amber {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.3);
}
.dot.red {
  background: var(--red);
  box-shadow: 0 0 6px rgba(225, 29, 72, 0.3);
}
.dot.grey {
  background: var(--muted-light);
  box-shadow: none;
}

.project-select {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
  min-width: 180px;
  max-width: 280px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.project-select:hover {
  border-color: var(--line-strong);
}
.project-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.content {
  padding: 24px 28px 48px;
  min-width: 0;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   页面头部 Page Head
   ========================================================================== */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}
.page-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.25;
}
.page-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 820px;
  line-height: 1.6;
}
.page-head .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ==========================================================================
   按钮系统 Button System (Vercel & Linear Style)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}
.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn.secondary {
  border-color: var(--line-strong);
  color: var(--ink-secondary);
  background: #ffffff;
}
.btn.secondary:hover {
  border-color: #94a3b8;
  background: var(--bg-subtle);
  color: var(--ink);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border-color: transparent;
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--brand-soft);
  color: var(--brand-hover);
}

.btn.danger {
  background: #ffffff;
  color: var(--red);
  border-color: var(--red-border);
}
.btn.danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 6px;
}
.btn.xs {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 5px;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--ink);
  border-color: var(--line-strong);
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}

/* ==========================================================================
   卡片与统计看板 Card & Metric Stats (Stripe & Linear Style)
   ========================================================================== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  min-width: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  border-color: #cbd5e1;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card-head p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}
.card-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-body {
  padding: 18px 20px;
}
.card-body.flush {
  padding: 0;
}

/* 统计卡片网格 */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat .k {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat .v {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat .v small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}
.stat .f {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* 统计卡片主题色边框强化 */
.stat.accent {
  border-top: 3px solid var(--brand);
}
.stat.accent .v {
  color: var(--brand);
}
.stat.good {
  border-top: 3px solid var(--green);
}
.stat.good .v {
  color: var(--green);
}
.stat.warn {
  border-top: 3px solid var(--amber);
}
.stat.warn .v {
  color: var(--amber);
}
.stat.bad {
  border-top: 3px solid var(--red);
}
.stat.bad .v {
  color: var(--red);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-side {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

/* ==========================================================================
   徽标与标签系统 Badges & Source Tags (Stripe Pastel Dots)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: var(--radius-pill);
  background: var(--slate-soft);
  color: var(--slate);
  border: 1px solid var(--slate-border);
  white-space: nowrap;
}
.badge-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  opacity: 0.9;
}
.badge.green .badge-dot { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.badge.blue .badge-dot { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }
.badge.amber .badge-dot { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
.badge.red .badge-dot { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.6); }
.badge.purple .badge-dot { background: #8b5cf6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.6); }

.src-ico {
  font-size: 9px;
  font-weight: 800;
  margin-right: 2px;
}
.badge.green {
  background: var(--green-soft);
  color: var(--green-dark);
  border-color: var(--green-border);
}
.badge.amber {
  background: var(--amber-soft);
  color: var(--amber-dark);
  border-color: var(--amber-border);
}
.badge.red {
  background: var(--red-soft);
  color: var(--red-dark);
  border-color: var(--red-border);
}
.badge.blue {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-border);
}
.badge.purple {
  background: var(--purple-soft);
  color: var(--purple-dark);
  border-color: var(--purple-border);
}
.badge.grey {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

/* 数据来源标签 (区分已核验与申报) */
.src {
  font-size: 9.5px;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 5px;
  white-space: nowrap;
  vertical-align: 1px;
}
.src.self {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.src.verified {
  background: var(--green-soft);
  color: var(--green-dark);
  border: 1px solid var(--green-border);
}
.src.miss {
  background: var(--amber-soft);
  color: var(--amber-dark);
  border: 1px solid var(--amber-border);
}

.tag {
  display: inline-block;
  font-size: 11px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  margin: 2px 3px 2px 0;
}

/* ==========================================================================
   表格视图 Data Grid (Stripe Clean Tables)
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
}
th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tbody tr {
  transition: background 0.12s ease;
}
tbody tr:hover {
  background: #f8fafc;
}
tbody tr:last-child td {
  border-bottom: 0;
}

td b {
  font-weight: 600;
  color: var(--ink);
  display: block;
  font-size: 13px;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
td .row-acts {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.num {
  font-variant-numeric: tabular-nums;
}
.center {
  text-align: center;
}

/* ==========================================================================
   表单与输入控件 Form Controls (Vercel Focus Ring)
   ========================================================================== */
label.fld {
  display: block;
  margin-bottom: 13px;
}
label.fld > span {
  display: block;
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 600;
  margin-bottom: 5px;
}
input[type=text],
input[type=number],
input[type=date],
input[type=search],
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  background: #ffffff;
  width: 100%;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-xs);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  margin: 0;
  cursor: pointer;
}
.fld-row {
  display: flex;
  gap: 12px;
}
.fld-row > * {
  flex: 1;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.6;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin: 8px 0;
}
.check-row input {
  margin-top: 3px;
}

/* ==========================================================================
   弹窗与浮层 Dialog & Modal (Raycast Floating Window)
   ========================================================================== */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(760px, calc(100vw - 32px));
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  background: #ffffff;
  animation: dlgIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dlgIn {
  from { transform: scale(0.96) translateY(8px); }
  to { transform: scale(1) translateY(0); }
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dlg-head {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.dlg-head h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.dlg-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.dlg-body {
  padding: 20px;
}
.dlg-foot {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  z-index: 2;
}
.wide {
  width: min(1040px, calc(100vw - 32px));
}

/* ==========================================================================
   步骤指示器 Steps (Onboarding Wizard)
   ========================================================================== */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg-subtle);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  background: transparent;
  transition: all 0.15s ease;
}
.step span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.step.on {
  background: #ffffff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.step.on span {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* 全局提示 Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  z-index: 60;
  max-width: 90vw;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.toast .ok {
  color: #34d399;
  font-weight: 700;
}

/* 提示框 Alert */
.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin: 12px 0;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert.info {
  background: var(--brand-soft);
  color: #1d4ed8;
  border: 1px solid var(--brand-border);
}
.alert.warn {
  background: var(--amber-soft);
  color: #b45309;
  border: 1px solid var(--amber-border);
}
.alert.error {
  background: var(--red-soft);
  color: #be123c;
  border: 1px solid var(--red-border);
}
.alert.ok {
  background: var(--green-soft);
  color: #047857;
  border: 1px solid var(--green-border);
}

/* 空状态 */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty p {
  font-size: 12px;
  max-width: 480px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

/* 进度胶囊条 */
.bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.bar.green > i { background: var(--green); }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }

.parts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.part-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.part-row:last-child {
  border-bottom: 0;
}
.part-row .lb {
  width: 96px;
  color: var(--muted);
  font-weight: 500;
}
.part-row .bar {
  flex: 1;
}
.part-row .pt {
  width: 64px;
  text-align: right;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 18px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding: 0 0 16px 0;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #93c5fd;
}
.tl-item b {
  font-size: 12.5px;
  color: var(--ink);
}
.tl-item p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* 键值对 */
.kv {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv .k {
  width: 110px;
  color: var(--muted);
  flex: 0 0 110px;
  font-weight: 500;
}
.kv .v {
  flex: 1;
  word-break: break-all;
  color: var(--ink);
}

/* 标签页 Tabs */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: none;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 550;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}
.tab:hover {
  color: var(--ink);
}
.tab.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* 引用块 / 代码框 */
.quote {
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 340px;
  overflow: auto;
  color: var(--ink-secondary);
}
.codebox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.chip {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--muted-dark);
  border: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mini {
  font-size: 11px;
  color: var(--muted);
}

/* 拖拽上传区域 */
.drop {
  border: 2px dashed #93c5fd;
  background: #eff6ff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: #1e40af;
  font-size: 12.5px;
  transition: all 0.15s ease;
}
.drop.drag {
  background: #dbeafe;
  border-color: #2563eb;
  transform: scale(1.01);
}

/* 分段控制器 */
.seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--line);
}
.seg button {
  border: 0;
  background: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.15s ease;
}
.seg button:hover {
  color: var(--ink);
}
.seg button.on {
  background: #ffffff;
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted-dark);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  line-height: 1.6;
}

footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
}

/* ---------- 首页快捷动作卡片 ---------- */
.quick {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.quick:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quick b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.quick span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.6;
}

.quick.primary {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.quick.primary b {
  color: #ffffff;
}
.quick.primary span {
  color: #bfdbfe;
}
.quick.primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* 批次选择按钮项 */
.batch-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}
.batch-item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  transform: translateY(-1px);
}

/* 频道候选卡片 */
.cands {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.cand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #f8fafc;
  transition: border-color 0.15s ease;
}
.cand:hover {
  border-color: var(--line-strong);
}
.cand-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  font-size: 12.5px;
  line-height: 1.6;
}
.cand-main b {
  font-size: 13.5px;
  color: var(--ink);
}
.cand-main small {
  color: var(--muted);
  word-break: break-all;
}
.cand .btn {
  flex-shrink: 0;
}

/* 检索筛选条件：两列紧凑布局 */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fld.sub span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.fld.sub input,
.fld.sub select {
  font-size: 12px;
  padding: 6px 9px;
  height: 32px;
}

/* ==========================================================================
   高端组件增强 High-End SaaS Components (Linear / Stripe Grade)
   ========================================================================== */

/* ---------- 顶部 Hero 项目横幅 ---------- */
.hero-banner {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px -4px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}
.hero-main h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
  margin: 4px 0 10px;
}
.hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-pill {
  font-size: 11.5px;
  color: var(--muted-dark);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.hero-pill b {
  color: var(--ink);
  font-weight: 700;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* 统计卡片微图标 */
.stat-ico {
  color: var(--muted-light);
}
.stat.accent .stat-ico { color: var(--brand); }
.stat.good .stat-ico { color: var(--green); }
.stat.warn .stat-ico { color: var(--amber); }
.stat.bad .stat-ico { color: var(--red); }

/* 结论分布列表 */
.dist-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12px;
}
.dist-count {
  font-weight: 600;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}
.dist-count small {
  color: var(--muted);
  font-weight: 400;
}

/* 到期跟进事项列表 */
.due-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s ease;
}
.due-item:last-child {
  border-bottom: 0;
}
.due-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 12.5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--brand-border);
}
.due-info {
  flex: 1;
  min-width: 0;
}
.due-title {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  display: block;
}
.due-meta {
  text-align: right;
  flex-shrink: 0;
}
.due-date {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* 置换消耗指标网格 */
.spend-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.spend-box {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.spend-box.highlight {
  background: #ffffff;
  border-color: var(--brand-border);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.spend-val {
  font-size: 20px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.spend-val.accent { color: var(--brand); }
.spend-val.good { color: var(--green); }

/* 风险卡点列表 */
.risk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.risk-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.risk-item:hover {
  background: #fef3c7;
}
.risk-ico-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fde68a;
  color: #b45309;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.risk-main {
  flex: 1;
  min-width: 0;
}
.risk-main b {
  font-size: 12px;
  color: #92400e;
  display: block;
}
.risk-main p {
  color: #b45309;
}

/* SOP 流程阶段工作流 */
.workflow-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.wf-step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}
.wf-step:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}
.wf-step.active {
  background: linear-gradient(135deg, rgba(37,99,235,0.02) 0%, rgba(37,99,235,0.06) 100%);
  border-color: var(--brand-border);
}
.wf-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--muted-dark);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wf-step.active .wf-badge {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.wf-step.done .wf-badge {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}
.wf-content b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}
.wf-content p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 4px 0 12px;
  line-height: 1.5;
}

/* 红人表格展示项 */
.creator-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 13px;
  flex-shrink: 0;
  background: #f1f5f9;
  color: var(--ink-secondary);
  border: 1px solid var(--line);
}
.avatar-youtube {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}
.avatar-instagram {
  background: #fce7f3;
  color: #db2777;
  border-color: #fbcfe8;
}
.avatar-tiktok {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.creator-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.creator-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.creator-name-row b {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.plat-pill {
  font-size: 9.5px;
  font-weight: 650;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: capitalize;
}
.plat-youtube { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.plat-instagram { background: #fdf2f8; color: #db2777; border: 1px solid #fce7f3; }
.plat-tiktok { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }

.score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.score-badge.good { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.score-badge.accent { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.score-badge.bad { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.score-badge.grey { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; }
.score-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-bar {
  width: 52px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.mini-bar i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
}

.verify-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.verify-cell small {
  color: var(--muted);
  font-size: 11px;
}
.verify-cell small b {
  display: inline;
  color: var(--ink);
  font-weight: 600;
}

.batch-item.active {
  border-color: var(--brand);
  background: #eff6ff;
  box-shadow: 0 0 0 1px var(--brand);
}

/* ---------- 响应式断点 ---------- */
@media (max-width: 1280px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-side {
    grid-template-columns: 1fr;
  }
  .grid-2, .grid-3, .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    width: 100%;
    flex: none;
    padding: 10px 14px;
    z-index: 30;
  }
  .logo {
    padding: 2px 4px 10px;
  }
  .logo-text small {
    display: none;
  }
  .nav-group {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
  }
  .nav-caption, .side-foot {
    display: none;
  }
  .nav-item {
    white-space: nowrap;
    margin: 0;
    border-radius: var(--radius-sm);
    font-size: 12px;
    padding: 8px 10px;
  }
  .topbar {
    height: 52px;
    padding: 0 14px;
  }
  .content {
    padding: 18px 14px 36px;
  }
  .page-head {
    display: block;
  }
  .page-head .actions {
    margin-top: 14px;
    justify-content: flex-start;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat .v {
    font-size: 22px;
  }
  .card-head, .card-body {
    padding: 14px;
  }
  dialog {
    width: calc(100vw - 20px);
  }
  footer {
    padding: 12px 14px 20px;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .env-dot, .quick-search-trigger span {
    display: none;
  }
  .project-select {
    max-width: 160px;
    min-width: 110px;
  }
}

/* ===== 合并层修正：表格密度、数字不折行、操作列吸附右侧 ===== */
th, td { padding: 9px 9px; }
.table-wrap table { min-width: 0; }
td .row-acts { flex-wrap: nowrap; gap: 4px; }
td .row-acts .btn.xs { padding: 4px 7px; font-size: 11px; }
.avatar { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
.creator-cell { gap: 8px; }
.score-cell { gap: 7px; }
.mini-bar { width: 46px; }
.plat-pill { padding: 1px 5px; font-size: 10px; }
.num, .verify-cell small, .score-meta .mini, .creator-info small { white-space: nowrap; }
.creator-cell { align-items: center; }
.creator-info { min-width: 0; }
.table-wrap th:last-child, .table-wrap td:last-child {
  position: sticky; right: 0; background: #fff;
  box-shadow: -10px 0 12px -12px rgba(15, 23, 42, .35);
}
.table-wrap thead th:last-child { background: #f8fafc; }
.table-wrap tbody tr:hover td:last-child { background: #f7fbff; }
.hero-pill svg { opacity: .75; }
#side-env { line-height: 1.6; }
.batch-bar { background: linear-gradient(180deg, #fbfdff, #f6f9fc); }

/* 审核表在 1440 宽内完整显示：压缩次要列，保留全部事实与操作 */
.grid-side { grid-template-columns: 268px minmax(0, 1fr); }
.creator-name-row b { max-width: 168px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-info small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.verify-cell small { font-size: 10.5px; }
.score-cell { flex-direction: column; align-items: flex-start; gap: 3px; }
.score-meta { display: flex; flex-direction: column; gap: 2px; }
td .row-acts .btn.xs { padding: 3px 6px; font-size: 10.5px; }
.verify-cell { max-width: 158px; }
.verify-cell small { white-space: normal; line-height: 1.45; }

/* 窄屏（≤1280）恢复单列堆叠，避免上面的密度覆盖把响应式挤掉 */
@media (max-width: 1280px) {
  .grid-side { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

/* Shared workspace theme. app.css supplies the existing business components. */
:root {
  --project-contours: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20440%20310%22%20fill%3D%22none%22%3E%3Cdefs%3E%3Cpath%20id%3D%22c%22%20d%3D%22M-116%20-8C-118%20-40%20-108%20-58%20-85%20-65C-54%20-77%20-40%20-91%20-4%20-82C31%20-75%2055%20-55%2082%20-39C108%20-23%20131%209%20120%2028C110%2049%2077%2048%2048%2060C10%2076%20-9%2072%20-41%2060C-78%2045%20-112%2023%20-116%20-8Z%22%2F%3E%3C%2Fdefs%3E%3Cg%20transform%3D%22translate%28220%20155%29%20rotate%2816%29%22%20stroke%3D%22%23bce8ac%22%20stroke-opacity%3D%22.29%22%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.150%29%22%20stroke-width%3D%224.40%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.196%29%22%20stroke-width%3D%223.37%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.242%29%22%20stroke-width%3D%222.73%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.288%29%22%20stroke-width%3D%222.29%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.334%29%22%20stroke-width%3D%221.98%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.380%29%22%20stroke-width%3D%221.74%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.426%29%22%20stroke-width%3D%221.55%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.472%29%22%20stroke-width%3D%221.40%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.518%29%22%20stroke-width%3D%221.27%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.564%29%22%20stroke-width%3D%221.17%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.610%29%22%20stroke-width%3D%221.08%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.656%29%22%20stroke-width%3D%221.01%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.702%29%22%20stroke-width%3D%220.94%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.748%29%22%20stroke-width%3D%220.88%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.794%29%22%20stroke-width%3D%220.83%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.840%29%22%20stroke-width%3D%220.79%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.886%29%22%20stroke-width%3D%220.74%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.932%29%22%20stroke-width%3D%220.71%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%280.978%29%22%20stroke-width%3D%220.67%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.024%29%22%20stroke-width%3D%220.64%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.070%29%22%20stroke-width%3D%220.62%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.116%29%22%20stroke-width%3D%220.59%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.162%29%22%20stroke-width%3D%220.57%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.208%29%22%20stroke-width%3D%220.55%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.254%29%22%20stroke-width%3D%220.53%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.300%29%22%20stroke-width%3D%220.51%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.346%29%22%20stroke-width%3D%220.49%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.392%29%22%20stroke-width%3D%220.47%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.438%29%22%20stroke-width%3D%220.46%22%2F%3E%3Cuse%20href%3D%22%23c%22%20transform%3D%22scale%281.484%29%22%20stroke-width%3D%220.44%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  font-size: 100%;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --bg: #f5f7f6;
  --bg-subtle: #f1f5f3;
  --ink: #192d2a;
  --ink-secondary: #354a46;
  --muted: #59706a;
  --line: #dce5e1;
  --line-strong: #bdccc6;
  --brand: #14614f;
  --brand-hover: #0c4c3e;
  --brand-active: #113f36;
  --brand-soft: #e9f4ed;
  --brand-border: #b9d6c8;
  --brand-glow: rgb(26 108 83 / 16%);
  --shadow: 0 1px 2px rgb(26 64 49 / 4%);
}
body { background: var(--bg); overflow-x: visible; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(button, a, summary, select, input, textarea):focus-visible {
  outline: 3px solid #278672;
  outline-offset: 3px;
}
.skip-link { position: fixed; top: 6px; left: 12px; z-index: 100; padding: 10px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.main { width: 0; }
.sidebar {
  width: 216px; flex-basis: 216px; height: 100dvh; padding: 0;
  color: var(--ink-secondary); background: #fdfefd; border-color: var(--line); box-shadow: none; overflow: hidden;
}
.brand-row { min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.logo { padding: 0; gap: 10px; }
.brand-symbol { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #194a40; color: #d6fba1; }
.brand-type { display: grid; }
.brand-type strong { font: 780 1.35rem/1.05 Inter, Arial, sans-serif; letter-spacing: -.06em; color: #14352d; }
.brand-type small { margin-top: 3px; color: var(--muted); font-size: .75rem; font-weight: 600; }
#nav { overflow-y: auto; flex: 1; padding: 0 12px 12px; scrollbar-width: thin; }
.nav-group { display: block; margin: 0 0 7px; padding: 0; }
.nav-caption { display: block; color: #647770; font-size: .75rem; letter-spacing: .07em; padding: 9px 10px 4px; }
.nav-item { color: #425650; font-weight: 520; font-size: .88rem; padding: 5px 12px; min-height: 32px; border-radius: 7px; margin: 1px 0; gap: 11px; }
.nav-item:hover { background: #f0f5f2; color: var(--brand); transform: none; }
.nav-item.active { color: #125740; background: #e5f1e7; box-shadow: none; }
.nav-item.active .ico { color: var(--brand); }
.nav-item .count, .nav-item.active .count { color: #275846; background: #e1ece3; font-size: .75rem; box-shadow: none; }
.side-foot { display: block; flex-shrink: 0; width: 100%; background: #f6f8f6; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 21px; }
.side-foot .env-dot { display: inline-flex; color: #334b41; background: transparent; border: 0; padding: 0; font-size: .81rem; }
.side-foot .dot { box-shadow: none; }
#side-env { color: var(--muted); font-size: .75rem; margin: 2px 0 0 12px; }
.menu-trigger, .drawer-close { display: none; }
.topbar { padding: 0 clamp(18px, 2.8vw, 46px); height: 60px; flex-shrink: 0; background: #fff; }
.crumb { gap: 11px; min-width: 0; white-space: nowrap; }
.crumb-brand { font-family: Inter, Arial, sans-serif; font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.crumb-divider { color: #a4b4ac; }
.crumb b { color: var(--ink-secondary); font-size: .875rem; border: 0; padding: 0; background: none; }
.quick-search-trigger, .settings-trigger, .project-select { height: 35px; box-shadow: none; font-size: .82rem; }
.quick-search-trigger { background: #fff; color: var(--ink-secondary); }
.quick-search-trigger kbd { font-family: inherit; font-size: .75rem; padding: 0 4px; background: #f4f6f5; }
.project-select { max-width: 242px; min-width: 125px; }
select, select.project-select {
  appearance: none; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2359706a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; padding-right: 30px;
}
.content { padding: 28px clamp(18px, 2.8vw, 46px) 38px; max-width: 1660px; min-height: calc(100vh - 122px); }
.content:focus { outline: none; }
.content[aria-busy="true"] { cursor: progress; }
.page-head { align-items: center; }
.page-head .eyebrow { display: none; }
.page-head h1, .overview-head h1 { color: var(--ink); font-size: clamp(1.65rem, 2.1vw, 2.1rem); line-height: 1.25; letter-spacing: -.055em; font-weight: 710; }
.page-head p, .overview-head p { font-size: .9rem; color: var(--muted); line-height: 1.6; margin-top: 5px; }
.btn { min-height: 38px; font-size: .875rem; }
.btn.primary, .btn.primary:hover { background: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.secondary, .icon-btn { box-shadow: none; }
.btn.sm, .btn.xs, td .row-acts .btn.xs { min-height: 30px; font-size: .8rem; }
.btn.xs, td .row-acts .btn.xs { padding: 3px 8px; }
.link { font-size: .83rem; }
.card { box-shadow: var(--shadow); border-radius: 14px; }
.card-head { flex-wrap: wrap; padding: 17px 20px; }
.card-head h2 { font-size: 1.04rem; }
.card-head p, .mini, .hint, td small, .verify-cell small { font-size: .78rem; line-height: 1.55; }
.card-head .link { margin-left: auto; }
.card-head .right { min-width: 0; flex-wrap: wrap; }
.card-body, .fld-row > *, .grid-side > *, .grid-2 > *, .grid-3 > *, .split > * { min-width: 0; }
.card-body { overflow-wrap: anywhere; }
input:not([type]), input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  max-width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; font: inherit; font-size: .9rem; color: var(--ink); background-color: #fff; padding: 8px 10px;
}
select, select.project-select { padding-right: 28px; }
input:not([type]) { width: 100%; }
label.fld > span, .check-row { font-size: .875rem; }
table { font-size: .875rem; }
th { font-size: .8rem; letter-spacing: 0; }
td b { font-size: .88rem; }
th, td { padding: 10px; }
.badge, .src, .plat-pill { font-size: .75rem; }
.badge .badge-dot { box-shadow: none !important; }
.stat { border-color: var(--line); }
.stat .k, .stat .f { font-size: .8rem; letter-spacing: 0; }
.stat .v { color: var(--ink); }
.stat:hover { transform: none; box-shadow: var(--shadow); }
.tabs, .steps { max-width: 100%; overflow-x: auto; }
.dlg-foot:empty { display: none; }
footer { margin-top: auto; padding-inline: clamp(18px, 2.8vw, 46px); color: var(--muted); font-size: .75rem; }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.overview-actions { display: flex; gap: 16px; align-items: center; }
.overview-actions time { display: inline-flex; gap: 7px; align-items: center; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.overview-actions .btn { padding: 0 16px; }
.project-banner {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 150px; padding: 24px 29px; border-radius: 15px; background: #1b4942; color: #fff;
}
.project-banner::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background: var(--project-contours) right 37% center / auto 250% no-repeat, linear-gradient(104deg, #153d39 15%, #1a4941 57%, #225a4c 100%);
}
.project-context, .project-facts { display: flex; align-items: center; flex-wrap: wrap; }
.project-context { gap: 8px; font-size: .81rem; color: #d6eade; font-weight: 520; }
.project-context svg { color: #d5efa4; }
.project-context span { color: #96b9a7; }
.project-summary { min-width: 0; }
.project-summary h2 { font-size: clamp(1.4rem, 2.1vw, 2rem); font-weight: 650; line-height: 1.35; letter-spacing: -.035em; margin: 8px 0 13px; overflow-wrap: anywhere; color: white; }
.project-facts { color: #d2e1d9; gap: 5px 0; font-size: .79rem; }
.project-facts span { padding: 0 12px; border-left: 1px solid #749182; line-height: 1.1; }
.project-facts span:first-child { padding-left: 0; border: 0; }
.project-facts b { color: #f1f7ed; font-weight: 600; margin-left: 3px; }
.reserve { flex: 0 0 clamp(162px, 17%, 210px); padding: 13px 16px; background: #19463efa; border: 1px solid #4a7062; border-radius: 10px; }
.reserve-title { display: flex; align-items: baseline; justify-content: space-between; font-size: .85rem; font-weight: 580; color: #e4f0e6; }
.reserve-title b { font: 640 1.28rem/1 Inter, Arial, sans-serif; color: #ddf6a7; }
.reserve-track { height: 4px; background: #547468; margin: 10px 0 5px; border-radius: 8px; overflow: hidden; }
.reserve-track i { display: block; height: 100%; background: #d1ed99; border-radius: inherit; }
.reserve small { font-size: .75rem; color: #e0e9de; }
.overview-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin: 16px 0 20px; }
.metric { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 15px 15px 13px; color: var(--ink); text-align: left; }
.metric:hover { border-color: #9abda9; box-shadow: 0 2px 6px #18452f0d; }
.metric-label { display: flex; gap: 8px; align-items: center; font-size: .875rem; font-weight: 580; }
.metric-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; }
.metric-icon.pine { color: #286f5b; background: #e4f1e8; }
.metric-icon.leaf { color: #517239; background: #ebf1dc; }
.metric-icon.sand { color: #936820; background: #faf0d7; }
.metric-icon.lilac { color: #68598a; background: #efebf8; }
.metric-icon.rose { color: #a45c49; background: #faece7; }
.metric-value { font: 620 clamp(1.75rem, 2.3vw, 2.28rem)/1.05 Inter, Arial, sans-serif; letter-spacing: -.055em; margin: 10px 0 6px; }
.metric-value small { font: 500 .78rem/1 system-ui,sans-serif; color: var(--muted); margin-left: 6px; }
.metric-note { color: var(--muted); font-size: .76rem; }
.board-pair { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: 16px; }
.board-card { margin-bottom: 16px; }
.board-card .card-head { padding: 17px 20px 13px; }
.board-card .card-body { padding: 4px 20px 12px; }
.agenda-row { display: flex; align-items: center; gap: 13px; padding: 9px 0; border-bottom: 1px solid #e8eeeb; }
.agenda-row:last-child { border: 0; }
.agenda-date { display: grid; place-items: center; width: 42px; min-height: 40px; background: #f1f5f2; border: 1px solid #e2eae3; border-radius: 8px; flex-shrink: 0; }
.agenda-date b { font: 650 1.1rem/1.05 Inter, Arial, sans-serif; color: #365b4e; margin-top: 4px; }
.agenda-date small { font-size: .7rem; line-height: 1.2; color: #526a5e; margin-bottom: 3px; }
.agenda-detail { min-width: 0; flex: 1; }
.agenda-detail strong, .agenda-detail small { display: block; overflow-wrap: anywhere; }
.agenda-detail strong { font-size: .91rem; font-weight: 620; }
.agenda-detail small { font-size: .78rem; color: var(--muted); }
.board-card .audit-visual { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(14px, 2.5vw, 48px); padding: 22px 20px; }
.audit-ring { display: grid; place-items: center; width: clamp(104px,10vw,144px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from -90deg, var(--segments)); flex: none; }
.audit-ring > div { display: grid; align-content: center; justify-items: center; width: 75%; height: 75%; border-radius: 50%; background: #fff; }
.audit-ring strong { font: 600 1.95rem/1.15 Inter, Arial, sans-serif; letter-spacing: -.055em; }
.audit-ring small { color: var(--muted); font-size: .76rem; }
.audit-legend { flex: 1; min-width: 124px; max-width: 258px; margin: 0; padding: 0; list-style: none; }
.audit-legend li { display: grid; grid-template-columns: 9px 1fr auto 36px; gap: 7px; align-items: center; margin: 6px 0; font-size: .85rem; }
.audit-legend i { width: 8px; height: 8px; border-radius: 3px; }
.audit-legend b { font-size: .82rem; font-weight: 600; }
.audit-legend small { text-align: right; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.board-empty { min-height: 170px; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: var(--muted); }
.board-empty b { color: var(--ink-secondary); font-size: 1rem; }
.board-empty p { font-size: .83rem; margin-bottom: 5px; }
.spend-box.highlight, .risk-item, .risk-item:hover { box-shadow: none; background: #f6f8f5; border-color: var(--line); }
.risk-main b { color: var(--ink-secondary); font-size: .88rem; }
.risk-main p { color: var(--muted); }
.risk-item .btn { background: #fff; color: var(--brand); border-color: var(--line-strong); }
.risk-item .btn:hover { background: var(--brand-soft); }
.workflow-stepper { grid-template-columns: repeat(auto-fit,minmax(min(230px,100%),1fr)); }
.wf-step.active { background: #f7faf6; }
.wf-step.active .wf-badge { box-shadow: none; }
.review-tools { display: flex; gap: 12px; align-items: start; }
.review-tools details { flex: 1; overflow: hidden; }
.review-tools summary { padding: 13px 16px; color: var(--ink-secondary); font-size: .9rem; font-weight: 600; cursor: pointer; }
.review-tools summary small { margin-left: 5px; font-size: .77rem; color: var(--muted); font-weight: 450; }
.review-tools details[open] summary { border-bottom: 1px solid var(--line); }
.review-tools .active { background: var(--brand-soft); border-color: var(--brand); }
.review-layout .table-wrap table { min-width: 850px; }
.review-layout .table-wrap:has(td[colspan]) table { min-width: 0; }
.review-layout .table-wrap:has(td[colspan]) thead { display: none; }
@media (min-width: 1050px) {
  .grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1190px) {
  .metric { padding: 12px; }
  .metric-label { gap: 5px; }
  .overview-metrics { gap: 8px; }
}
@media (max-width: 1049px) {
  .overview-metrics { grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); }
  .grid-side { grid-template-columns: minmax(0,1fr) !important; }
  .board-pair { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .overview-actions time { display: none; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .main { width: 100%; }
  .app > .sidebar { display: none; }
  .menu-trigger, .drawer-close { display: grid; place-items: center; width: 40px; height: 40px; background: transparent; border: 0; }
  #mobile-menu { position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; width: min(300px,86vw); max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; animation: none; }
  #mobile-menu .sidebar { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; }
  #mobile-menu::backdrop { background: #10272077; backdrop-filter: none; }
  .menu-open { overflow: hidden; }
  .nav-item { min-height: 42px; padding: 7px 12px; }
  .topbar { height: 57px; gap: 8px; }
  .page-head { display: flex; flex-wrap: wrap; }
  .page-head .actions { margin: 0 0 0 auto; }
  .table-wrap { overscroll-behavior-x: contain; }
  .table-wrap th:last-child, .table-wrap td:last-child { position: static; box-shadow: none; }
  .table-wrap td { min-width: 66px; }
  .table-wrap td:has(input[type=checkbox]) { min-width: 32px; }
  .review-layout .table-wrap table, .table-wrap table { width: max-content; min-width: 100%; }
  .review-layout .table-wrap:has(td[colspan]) table { width: 100%; }
  .content { padding-top: 22px; }
}
@media (max-width: 700px) {
  .board-pair, .grid-2, .grid-3, .split { grid-template-columns: minmax(0,1fr) !important; }
  .overview-metrics, .stats { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .overview-metrics .metric:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
  .overview-metrics .metric:last-child .metric-note { grid-column: 1; margin-left: 33px; }
  .overview-metrics .metric:last-child .metric-value { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .project-banner { padding: 19px; flex-wrap: wrap; gap: 13px; }
  .project-summary { flex: 1 1 100%; }
  .project-summary h2 { margin-block: 6px 10px; }
  .reserve { flex: 0 1 100%; padding: 0; border: none; background: none; display: grid; grid-template-columns: auto minmax(30px,1fr) auto; align-items: center; gap: 10px; }
  .reserve-title { gap: 6px; font-size: .77rem; }
  .reserve-title b { font-size: .85rem; }
  .reserve-track { margin: 0; }
  .reserve small { font-size: .73rem; }
  .project-banner::before { background-size: auto 205%, auto; background-position: right -90px center, center; }
  .top-right { min-width: 0; flex: 1; justify-content: flex-end; gap: 6px; }
  .topbar { padding-inline: 10px; }
  .crumb-brand, .crumb-divider, .quick-search-trigger { display: none; }
  .project-select { min-width: 0; width: auto; max-width: min(46vw,230px); flex-shrink: 1; }
  .settings-trigger { width: 38px; height: 40px; border: 0; }
  .overview-head { flex-wrap: wrap; margin-bottom: 13px; }
  .overview-head p { font-size: .83rem; }
  .overview-actions .btn { min-height: 40px; }
  .project-facts { gap: 8px 12px; }
  .project-facts span, .project-facts span:first-child { border: 0; padding: 0; }
  .stats .stat { padding: 12px; }
  .page-head .actions { width: 100%; }
  .content { padding: 19px 14px 28px; }
  .card-head, .card-body { padding: 14px; }
  .card-head .right { width: 100%; margin-left: 0; }
  .card-head .right input, .card-head .right select { flex: 1; min-width: 90px; }
  .review-tools { display: block; }
  .review-tools .card { margin-bottom: 8px; }
  .review-layout > .card { margin-top: 12px; }
  .fld-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; }
  .steps { flex-wrap: wrap; }
  .dlg-body, .dlg-head, .dlg-foot { padding: 12px; }
  .dlg-body input:not([type=checkbox]), .dlg-body textarea, .dlg-body select { font-size: 1rem; }
  .dlg-body [style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) !important; }
  .review-tools summary, .btn, .icon-btn { min-height: 40px; }
  .review-layout table .btn, .table-wrap table .btn { min-height: 34px; }
  .spend-stats-grid { grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 6px; }
  .spend-box { min-width: 0; padding: 8px; }
  .spend-val { font-size: 1.04rem; }
  .risk-item { gap: 7px; padding: 8px; }
  .risk-item .risk-ico-box { display: none; }
}
@media (max-width: 380px) {
  .reserve { grid-template-columns: 1fr 1fr; }
  .reserve small { grid-column: 1/-1; }
  .reserve-title { justify-content: flex-start; }
  .card-head { gap: 7px; }
  .board-card .audit-visual { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.quick-search-trigger, .quick-search-trigger kbd, .settings-trigger { flex-shrink: 0; white-space: nowrap; }
select.project-select { width: auto; }
.board-card { display: flex; flex-direction: column; }
.board-card .audit-visual { flex: 1; }
.reserve { min-width: 188px; }
@media (max-width: 700px) {
  .overview-head:has(.overview-actions) { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; align-items: center; }
  .overview-head:has(.overview-actions) > div:first-child { display: contents; }
  .overview-head .overview-actions { grid-column: 2; grid-row: 1; }
  .overview-head:has(.overview-actions) p { grid-column: 1/-1; grid-row: 2; margin: 0; }
  .project-facts { display: grid; grid-template-columns: max-content max-content; gap: 6px 18px; }
  .project-banner::before { background-image: linear-gradient(90deg,#153d39f2,#19443978 75%),var(--project-contours); background-position: center,right -120px center; background-size: auto, auto 205%; }
}
#access-dialog { width: min(425px,calc(100vw - 28px)); border: 0; overflow: auto; }
#access-dialog::backdrop { background: rgb(29 55 45 / 34%); backdrop-filter: blur(4px); }
.access-cover { color: #e2f1e6; padding: 25px; background: linear-gradient(90deg,#173e38,transparent),var(--project-contours) right -20px center / 80% auto no-repeat,#214e43; display: flex; align-items: baseline; gap: 10px; font-size: .875rem; }
.access-wordmark { font: 750 1.65rem/1 Inter,Arial,sans-serif; color: #d8f5a4; letter-spacing: -.06em; }
#access-form { padding: 24px; }
#access-title { font-size: 1.45rem; letter-spacing: -.025em; }
#access-description { font-size: .9rem; color: var(--muted); margin: 4px 0 20px; }
#access-token { width: 100%; padding: 10px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 1rem; }
.access-error { font-size: .875rem; color: var(--red-dark); }
.access-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }


/* 全站统一：指标卡金额字号（组件类名接管，覆盖内联 font-size） */
.stat .v .money { font-size: 21px; letter-spacing: -0.02em; }
.stat .k > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
