/* HITun OS v2.0 高定排版秩序与组件基底（Linear/Stripe 精密终端 × 临床期刊画报美学）
 * 铁律：零 side-tab 彩条 · 零 3px 廉价卡片顶帽 · 零 AI 紫蓝渐变 · 1px 极细发丝分隔 · ≥4x 字号张力 · 严格中文断词 */

:root {
  --font-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-editorial: "Source Han Serif SC", "Songti SC", "Noto Serif SC", Georgia, "PingFang SC", serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  /* 4 级高跨度字号阶梯 */
  --text-anchor: 56px;
  --text-hero: 42px;
  --text-kpi: 28px;
  --text-page: 21px;
  --text-card: 15.5px;
  --text-body: 13.5px;
  --text-meta: 12px;
  --text-code: 11.5px;

  /* 圆角阶梯（非单一圆角） */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  /* 动效曲线 */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* 默认兜底（由 theme-internal / theme-client 完整接管） */
  --bg-page: #F7F9FC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F0F4F9;
  --bg-hover: #F4F7FC;
  --bg-inset: #EBF0F6;
  --border-subtle: #E8EEF5;
  --border-color: #DCE4EE;
  --border-strong: #C5D2E2;
  --text-primary: #0F2942;
  --text-secondary: #334E68;
  --text-muted: #526A84;
  --text-faint: #7A90A8;
  --accent: #1A56A8;
  --accent-hover: #14458A;
  --accent-strong: #0B1A2B;
  --accent-soft: #EBF2FC;
  --accent-border: #C4DAF6;
  --highlight: #FFDA37;
  --highlight-ink: #3D2E00;
  --chart-1: #1A56A8;
  --chart-2: #5485C4;
  --chart-3: #9BBBE3;
  --chart-grid: #E8EEF5;
  --success: #0D7047;
  --success-bg: #E8F6EF;
  --success-border: #BDE5D2;
  --warn: #9A5104;
  --warn-bg: #FEF5E6;
  --warn-border: #F6D8A8;
  --danger: #B91C2E;
  --danger-bg: #FCECED;
  --danger-border: #F5C2C7;
  --gold: #8A5A00;
  --gold-bg: #FFF4CC;
  --gold-border: #F3D97C;
  --shadow-card: none;
  --shadow-popover: 0 14px 36px rgba(11, 26, 43, 0.14), 0 2px 8px rgba(11, 26, 43, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-code); }
.num { font-variant-numeric: tabular-nums; }
.hi-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

/* ── 登录门面（高定不对称双栏：左舞台唯一柔光焦点 · 右精密工作台选择） */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  background: #F7F9FC;
}

.login-hero {
  background: #0B1A2B;
  color: #F7F9FC;
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* 唯一克制表现装置：右上角高模糊+径向遮罩深海蓝微光（边缘完全溶解进底色） */
.login-hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(26, 86, 168, 0.45) 0%, rgba(26, 86, 168, 0.12) 45%, transparent 72%);
  filter: blur(72px);
  -webkit-mask-image: radial-gradient(circle at center, #000 35%, transparent 75%);
  mask-image: radial-gradient(circle at center, #000 35%, transparent 75%);
  pointer-events: none;
}

.login-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: auto 0;
  padding: 36px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFDA37;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-en {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8FB4DE;
  font-weight: 600;
}

.brand-cn {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 2px;
}

.hero-title {
  font-size: var(--text-hero);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  max-width: 560px;
}

.hero-desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: #A4BCD4;
  max-width: 500px;
}

/* 建筑级无框数据标尺（1px 发丝线替代塑料毛玻璃框） */
.hero-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.38fr);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 26px;
  margin-top: 8px;
  max-width: 560px;
}

.hero-stat {
  padding-right: 20px;
}
.hero-stat + .hero-stat {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-num {
  font-size: 36px;
  line-height: 1.08;
  font-weight: 600;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.hero-stat:last-child .hero-stat-num { color: #FFDA37; }

.hero-stat-label {
  font-size: 12px;
  color: #8FB4DE;
  margin-top: 8px;
  white-space: nowrap;
}

.hero-foot-index {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #7D9AB8;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 18px;
  letter-spacing: 0.02em;
}

/* 右侧登录与角色选择器 */
.login-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: #F7F9FC;
}

.login-card {
  width: 100%;
  max-width: 472px;
  background: #FFFFFF;
  border: 1px solid #DCE4EE;
  border-radius: var(--radius-lg);
  padding: 36px 36px 30px;
  box-shadow: 0 20px 50px -24px rgba(11, 26, 43, 0.14);
}

.login-card-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0F2942;
  letter-spacing: -0.02em;
}
.login-card-head p {
  font-size: 12.5px;
  color: #526A84;
  margin-top: 5px;
}

.login-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.req-mark { color: var(--danger); margin-left: 3px; }
.field-hint { font-size: 11.5px; color: var(--text-muted); }
.field-err { font-size: 11.5px; color: var(--danger); font-weight: 500; }

.field input, .field select, .field textarea, .ctrl-input, .ctrl-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-surface);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:hover, .field select:hover, .field textarea:hover, .ctrl-input:hover, .ctrl-select:hover {
  border-color: var(--border-strong);
}
.field input:focus, .field select:focus, .field textarea:focus, .ctrl-input:focus, .ctrl-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[readonly] { background: var(--bg-subtle); color: var(--text-muted); }

.form-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
}

.quick-roles {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E8EEF5;
}
.quick-roles-title {
  font-size: 11.5px;
  color: #526A84;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quick-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quick-role-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #E8EEF5;
  background: #FFFFFF;
  border-radius: 8px;
  cursor: pointer;
  color: #0F2942;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  font-family: inherit;
}
.quick-role-btn:hover {
  border-color: #1A56A8;
  background: #F4F7FC;
}
.qr-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.qr-dot { width: 6px; height: 6px; border-radius: 50%; background: #1A56A8; flex-shrink: 0; }
.qr-name { font-size: 12.5px; font-weight: 600; color: #0F2942; white-space: nowrap; }
.qr-sub { font-size: 11px; color: #526A84; padding-left: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.quick-client-sep {
  margin: 12px 0 10px;
  border-top: 1px solid #E8EEF5;
}
.quick-role-btn.is-client {
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FDFCFA;
  border: 1px solid #E7E5E0;
}
.quick-role-btn.is-client .qr-dot { background: #C8102E; width: 7px; height: 7px; }
.quick-role-btn.is-client .qr-name { color: #141416; font-size: 13px; }
.quick-role-btn.is-client .qr-sub { color: #5C5750; font-size: 11.5px; display: block; margin-top: 2px; padding-left: 0; }
.quick-role-btn.is-client .qr-arrow { color: #C8102E; transition: transform 0.15s ease; }
.quick-role-btn.is-client:hover {
  background: #FBEBED;
  border-color: #C8102E;
}
.quick-role-btn.is-client:hover .qr-arrow { transform: translateX(3px); }

/* ── 主应用布局（侧栏 + 极净内容区） */
.app-shell { display: flex; min-height: 100vh; position: relative; }
.watermark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.9; }

.sidebar {
  width: 244px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
  background: var(--sb-bg);
  color: var(--sb-text);
  border-right: 1px solid var(--sb-border);
}

.sidebar-brand {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sb-border);
}
.sb-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--sb-text-active); }
.sb-sub { font-size: 11.5px; color: var(--sb-text); opacity: 0.85; margin-top: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--sb-text);
  width: 100%;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
  font-family: inherit;
}
.nav-item:hover { background: var(--sb-item-hover); color: var(--sb-text-active); }
.nav-item.active {
  background: var(--sb-item-active);
  color: var(--sb-text-active);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13.5px;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--sb-text-active); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11.5px; color: var(--sb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 9;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-heading { font-size: var(--text-page); font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }

.main-content {
  padding: 26px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1520px;
  width: 100%;
}

/* ── 12 列不对称 Bento 栅格体系 */
.bento-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.flex-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ── 精密卡片（1px 发丝边框、零廉价顶彩帽） */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.card-title { font-size: var(--text-card); font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.card-sub { font-size: var(--text-meta); color: var(--text-muted); margin-top: 4px; }

/* 次级紧凑 KPI 行（绝无 3px 彩色顶条） */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.kpi-value { font-size: var(--text-kpi); font-weight: 700; color: var(--text-primary); margin: 8px 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }
.kpi-hint { font-size: 12px; color: var(--text-muted); }

/* ── 驾驶舱 Hero Anchor & Risk Queue & Command List */
.hero-bento-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: center;
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.anchor-number {
  font-size: var(--text-anchor);
  line-height: 1.04;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  margin: 10px 0 12px;
}
.anchor-unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 8px;
  letter-spacing: 0;
}
.matrix-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.legend-left { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-stage { display: flex; align-items: center; justify-content: center; }

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
  margin-top: 20px;
  padding-top: 16px;
}
.pipe-item {
  cursor: pointer;
  padding: 4px 12px 4px 0;
  transition: opacity 0.14s ease;
}
.pipe-item + .pipe-item {
  border-left: 1px solid var(--border-subtle);
  padding-left: 16px;
}
.pipe-item:hover .pipe-val { color: var(--accent); }
.pipe-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.pipe-val { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* 风控待办队列（纯发丝分隔终端列表） */
.queue-list { display: flex; flex-direction: column; }
.queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.14s ease;
  border-radius: 6px;
}
.queue-row:last-child { border-bottom: none; }
.queue-row:hover { background: var(--bg-hover); }
.queue-left { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.queue-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.queue-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.queue-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.queue-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.queue-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }

.integrity-foot {
  margin-top: 14px;
  padding: 9px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 角色快捷指令台（Linear Command List） */
.cmd-list { display: flex; flex-direction: column; gap: 8px; }
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.cmd-item:hover { border-color: var(--accent-border); background: var(--bg-hover); }
.cmd-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cmd-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cmd-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.cmd-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ── 客户期刊封面与画报档案卡 */
.vol-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--highlight);
  color: var(--highlight-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.editorial-lead {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 20px;
}
.meta-ledger {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.meta-ledger-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.meta-ledger-row:first-child { padding-top: 2px; }
.meta-ledger-row:last-child { border-bottom: none; padding-bottom: 2px; }
.meta-ledger-k { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.meta-ledger-v { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.meta-ledger-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* 客户画报卡片网格 */
.account-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.16s ease, transform 0.16s var(--ease-out-expo), box-shadow 0.16s ease;
}
.doc-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1.5px);
  box-shadow: 0 10px 26px -14px rgba(20, 20, 22, 0.12);
}
.doc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.doc-card-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}
.doc-name { font-size: 15.5px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-sub-tags { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.doc-facts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.doc-fact-row { display: flex; align-items: center; gap: 8px; }
.doc-fact-row .hi-icon { color: var(--text-muted); }
.doc-card-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.doc-price-block { display: flex; flex-direction: column; gap: 4px; }
.doc-price-num {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.doc-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.doc-fans { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 横向坐标柱图组件 */
.hbar-chart { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.hbar-gridlines {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 128px;
  right: 88px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.hbar-gridlines span { width: 1px; border-left: 1px dashed var(--chart-grid); height: 100%; }
.hbar-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 120px 1fr 82px;
  align-items: center;
  gap: 12px;
  padding: 5px 6px;
  border-radius: 6px;
  transition: background 0.14s ease;
}
.hbar-row.is-click { cursor: pointer; }
.hbar-row.is-click:hover { background: var(--bg-hover); }
.hbar-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}
.hbar-rank.is-top { background: var(--highlight); color: var(--highlight-ink); }
.hbar-track { height: 8px; background: var(--bg-subtle); border-radius: 99px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 99px; transition: width 0.35s var(--ease-out-expo); }
.hbar-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.hbar-val strong { font-size: 13px; color: var(--text-primary); }
.hbar-val em { font-style: normal; font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* ── 按钮、分段控件、徽章与通知块（彻底消灭 border-left side-tab） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.52; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger:hover:not(:disabled) { filter: brightness(0.92); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: inherit; border-color: rgba(255, 255, 255, 0.14); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.btn-sm { padding: 5.5px 11px; font-size: 12px; }
.btn-block { width: 100%; }

.seg-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-inset);
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.seg-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(11, 26, 43, 0.08);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}
.tag-ok { background: var(--success-bg); color: var(--success); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-gold { background: var(--gold-bg); color: var(--gold); }

/* 温和全边框提示盒（零 border-left side-tab！） */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.callout .hi-icon { color: var(--accent); margin-top: 2px; }
.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn);
}
.callout-warn .hi-icon { color: var(--warn); }
.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.callout-danger .hi-icon { color: var(--danger); }

/* ── 防折行精密双行报价单元格（含税主行 + 不含税辅行，1440px 零横向溢出） */
.price-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

/* ── 四列精密 KPI 状态条（雷达 / 实盘验证 / 零Token爬虫调度） */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.kpi-card .kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.kpi-card .kpi-value { font-size: 26px; line-height: 1.15; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi-card .kpi-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
@media (max-width: 1100px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.price-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.price-muted { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.price-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 精密数据表格（表头吸顶 + 极细行线 + 数字右对齐防折行） */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-primary);
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover td { background: var(--bg-hover); }
table.data-table tr.row-warn td { background: #FFFBF2; }
table.data-table tr.row-danger td { background: #FFF5F6; }

table.data-table th.col-num,
table.data-table td.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.data-table th.col-nowrap,
table.data-table td.col-nowrap { white-space: nowrap; }
table.data-table th.col-ops,
table.data-table td.col-ops { text-align: right; white-space: nowrap; width: 1%; }

.cell-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.color-swatch {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  vertical-align: middle;
  margin-right: 6px;
}

/* ── 子页签（Linear 极简底线风格） */
.sub-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.sub-tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  transition: background 0.14s ease, color 0.14s ease;
}
.sub-tab:hover:not(.active) { background: var(--bg-subtle); color: var(--text-primary); }
.sub-tab.active { background: var(--accent); color: #FFFFFF; }

/* ── 筛选工具栏 */
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.search-box {
  position: relative;
  width: 280px;
}
.search-box .hi-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input { padding-left: 34px; }
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6.5px 11px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.check-pill:hover { border-color: var(--border-strong); }

/* ── 右侧详情抽屉 */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 26, 43, 0.40);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}
.drawer-panel {
  width: min(880px, 95vw);
  background: var(--bg-surface);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(11, 26, 43, 0.18);
  animation: slideInRight 180ms var(--ease-out-expo);
}
@keyframes slideInRight {
  from { transform: translateX(24px); opacity: 0.7; }
  to { transform: translateX(0); opacity: 1; }
}
.drawer-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.drawer-body { padding: 22px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }

/* ── 高定居中模态框（零 window.prompt 体系） */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 26, 43, 0.42);
  backdrop-filter: blur(4px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-panel {
  width: min(510px, 94vw);
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 160ms var(--ease-out-expo);
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.modal-body { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }

.seg-radio { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-radio-item {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
}
.seg-radio-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.seg-radio-item input { accent-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-primary); cursor: pointer; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* ── 上传拖拽区 / 代码盒 / 轻提示 */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  background: var(--bg-subtle);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--accent); background: var(--bg-hover); }

pre.code-box {
  background: #0B1A2B;
  color: #E2ECF8;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
}

.toast-box { position: fixed; right: 24px; bottom: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px;
  border-radius: 8px;
  background: #0B1A2B;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-popover);
}
.toast.ok { background: #0D7047; }
.toast.err { background: #B91C2E; }
.empty-inline { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

@media (max-width: 1120px) {
  .span-8, .span-7, .span-5, .span-4, .span-6 { grid-column: span 12; }
  .hero-bento-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 28px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { width: 206px; }
  .main-content { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── P0 内部高频工作台扩展样式（高级筛选抽屉、批量操作条、排序表头、报价车、联系方式、v11 对照） */
.filter-drawer {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filter-range {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-range input {
  width: 78px;
  padding: 5.5px 8px;
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-primary);
}
.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
}
table.data-table thead th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.14s ease, background 0.14s ease;
}
table.data-table thead th.sortable-th:hover {
  color: var(--accent);
  background: var(--bg-hover);
}
.sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 10.5px;
  color: var(--accent);
}
.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  white-space: nowrap;
}
.ext-link:hover {
  filter: brightness(0.95);
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
}
.fact-item-k {
  font-size: 11.5px;
  color: var(--text-muted);
}
.fact-item-v {
  margin-top: 2px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}
.v11-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.contact-list {
  display: flex;
  flex-direction: column;
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
}
.contact-row:last-child { border-bottom: none; }
.pager-jump {
  width: 66px;
  padding: 5px 8px;
  text-align: center;
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-primary);
}
.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.row-chk {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* 10 列精密账号对照表防溢出（1440px 零横向滚动裁切 + 长 UID/医院名优雅省略） */
table.data-table.accounts-table thead th { padding: 10px 9px; }
table.data-table.accounts-table td { padding: 10px 9px; }
.cell-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
