
/* ==================== v150.25：全站勾选框统一（深灰方框+白勾） ==================== */
/* 盘点：投标选择列/全选、供应商审批、付款计划勾选、合同签订、工作流任务、预算/利润选择列、
   待我处理、消息选择、回收站批次、权限弹窗、弹窗内 checkbox；桌面+移动端；
   状态：未选中(空框)/选中(深灰底白勾)/hover(边框加深)/focus(外圈)/disabled(半透明+not-allowed) */
input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong, #d9d7cd);
  border-radius: 4px;
  background: var(--bg-content, #fff);
  cursor: pointer;
  position: relative;
  flex: none;
  margin: 0;
  vertical-align: middle;
  transition: background-color 120ms ease, border-color 120ms ease;
}
input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--text-secondary, #5e5d59);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary, #5e5d59);
  outline-offset: 2px;
}
input[type="checkbox"]:checked {
  background: var(--text-secondary, #5e5d59);
  border-color: var(--text-secondary, #5e5d59);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
input[type="checkbox"]:disabled:checked {
  background: var(--text-disabled, #b3b1aa);
  border-color: var(--text-disabled, #b3b1aa);
}
/* 深色主题：方框底色适配 */
[data-theme="dark"] input[type="checkbox"] { background: var(--bg-content, #1b1c1e); }
[data-theme="dark"] input[type="checkbox"]:checked { background: var(--text-secondary, #d0d6e0); border-color: var(--text-secondary, #d0d6e0); }
[data-theme="dark"] input[type="checkbox"]:disabled:checked { background: var(--text-disabled, #62666d); border-color: var(--text-disabled, #62666d); }

/* 既有尺寸覆写保留（15px/16px/18px/20px 场景）——appearance:none 后尺寸仍然生效 */

/* ============================================================
   LISHI 一体化业务管理平台 — 深色优先设计系统（内容优先、克制）
   在 glass.css / app.css 之后加载，重映射全部设计令牌并
   覆盖玻璃效果。支持 [data-theme="dark"|"light"]。
   ============================================================ */

/* ============================================================
   LISHI 一体化业务管理平台 — 设计系统 v2（v62 Token 化）
   风格基准：安静、克制、精确的现代工作空间（内容优先、结构优于装饰）
   在 glass.css / app.css 之后加载，重映射全部设计令牌并覆盖玻璃效果。
   支持 [data-theme="dark"|"light"]；旧令牌名保留为别名以保证兼容。
   ============================================================ */

/* ------------------------- 深色主题（默认·Linear 式亮阶） ------------------------- */
:root {
  /* v84：浅色主题图表色（低饱和；dark 块已有对应值） */
  --chart-revenue: #a9b4c9;
  --chart-cost: #d4a85d;
  --chart-gross: #63b88c;
  --chart-margin: #6f9fc4;
  --chart-grid: rgba(31, 30, 29, 0.05);
  --chart-axis: rgba(31, 30, 29, 0.35);
  --chart-text: #87867f;
  --chart-donut-doing: #3b6fd4;   /* FIX-08：与 --status-doing 同源（进行中=蓝，非红） */
  --chart-donut-done: #2f9e6e;    /* FIX-08：与 --status-done 同源 */
  /* FIX-08：项目进度状态语义变量（首页指标/环形图/图例/列表标签/详情统一引用）
     进行中=蓝（业务进行中不是错误）；已结束=绿（稳定收尾）。错误/亏损仍走 --danger 独立语义 */
  --status-doing: #3b6fd4;
  --status-doing-soft: rgba(59, 111, 212, 0.12);
  --status-done: #2f9e6e;
  --status-done-soft: rgba(47, 158, 110, 0.12);
  --chart-bar-track: rgba(31, 30, 29, 0.055);
  --chart-bar-fill: #b9bd6e;
  /* 背景层级：暗画布 → 面板 → 抬升表面（借鉴 Linear 分层，避免纯黑大面积） */
  --bg: #101112;
  --bg-app: #101112;
  --bg-sidebar: #141516;
  --bg-topbar: #17181a;
  --bg-content: #191a1b;
  --bg-surface: #1f2022;
  --bg-surface-subtle: #232528;
  --bg-surface-hover: #26272a;
  --bg-surface-active: #2c2d30;
  --bg-selected: #323337;
  --bg-disabled: #222325;
  --bg-input: #1e1f21;

  /* 边框：半透明白细线（Linear 标志性做法） */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(255, 255, 255, 0.35);

  /* 文字四级灰阶 */
  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-tertiary: #8a8f98;
  --text-disabled: #62666d;
  --text-inverse: #0f1011;
  --text-1: var(--text-primary);
  --bg-surface-hover: rgba(255, 255, 255, 0.06);
  --bg-subtle: rgba(255, 255, 255, 0.10);

  /* 品牌（主按钮 = 反白） */
  --accent-primary: #f7f8f8;
  --accent-primary-hover: #ffffff;
  --accent-primary-active: #e4e6e9;
  --accent-primary-text: #0f1011;
  --brand-primary: #f7f8f8;
  --brand-primary-hover: #ffffff;
  --brand-primary-active: #e4e6e9;
  --brand-soft: rgba(255, 255, 255, 0.08);

  /* 状态语义色（v80g：整体降饱和——状态色不与主数据争夺注意力，仅以色相表意） */
  --info: #70add0;
  --info-soft: rgba(112, 173, 208, 0.14);
  --success: #63b88c;
  --success-soft: rgba(99, 184, 140, 0.14);
  --warning: #d4a85d;
  --warning-soft: rgba(212, 168, 93, 0.14);
  --danger: #d96670;
  --danger-hover: #e58a92;
  --danger-soft: rgba(217, 102, 112, 0.13);
  --profit-positive: #63b88c;
  --profit-negative: #d96670;

  /* 兼容旧令牌（glass.css / app.css 引用） */
  --glass: var(--bg-content);
  --glass-strong: var(--bg-sidebar);
  --glass-border: var(--border-default);
  --glass-input: var(--bg-input);
  --text: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-tertiary);
  --primary: var(--text-secondary);
  --primary-soft: var(--brand-soft);
  --success-soft-fixed: var(--success-soft);
  --shadow: none;
  --shadow-sm: none;
  --radius-lg: 12px;
  --radius: 10px;
  --radius-sm: 8px;
  --sidebar-w: 248px;

  /* 图表色（v80g：网格线降存在感，曲线降饱和但保持可辨） */
  --chart-revenue: #d0d6e0;
  --chart-cost: #d4a85d;
  --chart-gross: #63b88c;
  --chart-margin: #70add0;
  --chart-grid: rgba(255, 255, 255, 0.045);
  --chart-axis: rgba(255, 255, 255, 0.28);
  --chart-text: #858d97;

  color-scheme: dark;
}

/* 页面级标题：替代页面内联字号，确保首页、回收站及后续页面使用同一视觉层级。 */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-12, 12px);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.page-heading-copy { min-width: 0; }
.page-heading-title {
  margin: 0 0 2px;
  color: var(--text-primary);
  font-size: var(--font-page-title-size);
  font-weight: var(--font-page-title-weight);
  line-height: var(--font-page-title-line);
  letter-spacing: -0.005em;
}
.page-heading-subtitle {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .page-heading { margin-bottom: 10px; }
  .page-heading-title { font-size: 17px; line-height: 24px; }
  .page-heading-subtitle { font-size: 12px; line-height: 18px; }
}

/* ------------------------- 浅色主题（Claude 式暖纸色调） ------------------------- */
[data-theme='light'] {
  /* 背景：象牙白页面 + 羊皮纸侧栏 + 纯白内容卡 */
  --bg: #faf9f5;
  --bg-app: #faf9f5;
  --bg-sidebar: #f5f4ed;
  --bg-topbar: #faf9f5;
  --bg-content: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #faf9f5;
  --bg-surface-hover: #f0eee6;
  --bg-surface-active: #e8e6dc;
  --bg-selected: #f0eee6;
  --bg-disabled: #f5f4ed;
  --bg-input: #ffffff;

  /* 边框：奶油色调 */
  --border-subtle: #f0eee6;
  --border-default: #e8e6dc;
  --border-strong: #d9d7cd;
  --border-focus: #87867f;

  /* 文字：暖灰阶（黄棕底调，无冷蓝灰） */
  --text-primary: #1f1e1d;
  --text-secondary: #5e5d59;
  --text-tertiary: #87867f;
  --text-disabled: #b3b1aa;
  --text-inverse: #ffffff;
  --text-1: var(--text-primary);
  --bg-surface-hover: rgba(31, 30, 29, 0.05);   /* v150.24：冷灰→暖中性（全站选中/hover/操作列统一色温） */
  --bg-subtle: rgba(31, 30, 29, 0.08);   /* v150.24：冷灰→暖中性 */

  /* 品牌：Anthropic 近黑主按钮 */
  --accent-primary: #1f1e1d;
  --accent-primary-hover: #141413;
  --accent-primary-active: #30302e;
  --accent-primary-text: #ffffff;
  --brand-primary: #1f1e1d;
  --brand-primary-hover: #141413;
  --brand-primary-active: #30302e;
  --brand-soft: #f0eee6;

  /* 状态语义色（暖化） */
  --info: #4a76b8;
  --info-soft: #edf2f9;
  --success: #1a7f5a;
  --success-soft: #ebf4ef;
  --warning: #a86613;
  --warning-soft: #faf3e6;
  --danger: #b53333;
  --danger-hover: #9c2a2a;
  --danger-soft: #faeeee;
  --profit-positive: #1a7f5a;
  --profit-negative: #b53333;

  --primary-soft: var(--brand-soft);

  --chart-revenue: #5e5d59;
  --chart-cost: #c96442;
  --chart-gross: #1a7f5a;
  --chart-margin: #4a76b8;
  --chart-grid: rgba(31, 30, 29, 0.06);
  --chart-axis: rgba(31, 30, 29, 0.35);
  --chart-text: #87867f;

  color-scheme: light;
}

/* ------------------------- 公共 Token：字体 / 间距 / 圆角 / 阴影 / 层级 / 动效 ------------------------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-overlay: 0 16px 48px rgba(0, 0, 0, 0.16);

  --z-base: 0;
  --z-sticky: 20;
  --z-header: 30;
  --z-dropdown: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;

  --duration-fast: 120ms;
  --duration-normal: 160ms;
  --duration-slow: 220ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --motion-duration-instant: 80ms;
  --motion-duration-fast: 120ms;
  --motion-duration-base: 160ms;
  --motion-duration-slow: 220ms;
  --motion-ease-standard: var(--ease-standard);
  --motion-ease-enter: cubic-bezier(0, 0, .2, 1);
  --motion-ease-exit: cubic-bezier(.4, 0, 1, 1);
  --motion-ease-emphasized: cubic-bezier(.2, .8, .2, 1);
  --motion-distance-xs: 2px;
  --motion-distance-sm: 4px;
  --motion-distance-md: 8px;
  --motion-distance-lg: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------- 基础 ------------------------- */
body::before,
body::after {
  display: none; /* 移除渐变光斑背景 */
}
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
}
/* v65：Linear 式排版特征——OpenType 几何变体 + 标题轻微负字距 */
body {
  font-feature-settings: 'cv01', 'ss03';
}
h1, h2, h3 {
  letter-spacing: -0.01em;
}
* {
  font-variant-numeric: tabular-nums;
}

/* 玻璃效果收敛为实色表面 */
.glass,
.card {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.card--tight {
  padding: 14px 16px;
}

/* ------------------------- 桌面外壳 ------------------------- */
.d-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-default);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: var(--space-12) var(--space-10);
  /* 修复滚动侧栏 BUG：高度随内容自然拉伸，导航超出时内部滚动 */
  height: auto;
  min-height: 100vh;
  align-self: stretch;
}
.s-head {
  padding: var(--space-8) var(--space-10) 14px;
}
.s-title {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  color: var(--text-primary);
}
.s-sub {
  font-size: var(--font-size-2xs);
  color: var(--text-tertiary);
  margin-top: 1px;
}
.s-item {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  color: var(--text-secondary);
}
.s-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.s-item.active {
  background: var(--bg-surface-active);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}
.s-foot {
  border-top: 1px solid var(--border-default);
}
.s-user {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-md);
  color: var(--text-primary);
}
.s-meta {
  color: var(--text-tertiary);
}

.d-topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-default);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  height: var(--topbar-h);   /* v88：76px（var 统一来源，清除 56px 硬编码） */
  box-shadow: none;
}
.d-title {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.d-main {
  background: var(--bg);
}

/* 主内容区限宽居中 */
.d-page {
  padding: var(--space-20) 28px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ------------------------- 移动端外壳 ------------------------- */
.m-shell {
  background: var(--bg);
}
.topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-default);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.topbar .tb-title {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;   /* v80v：tb-title 升级 h1 语义，清除 UA margin */
}
.dock {
  background: var(--bg-topbar);
  border: 1px solid var(--border-default);
  box-shadow: var(--elevation-overlay);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: var(--radius-lg);
}
.dock a {
  color: var(--text-tertiary);
}
.dock a.active {
  color: var(--text-primary);
  background: var(--bg-surface-active);
  box-shadow: none;
}

/* ------------------------- 按钮 ------------------------- */
.btn {
  border-radius: var(--radius-sm);
  height: 36px;
  padding: 0 14px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color var(--motion-duration-fast) var(--ease-standard), border-color var(--motion-duration-fast) var(--ease-standard);
}
.btn--primary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  font-weight: 500;
}   /* v150.19 统一规范（以“上传文件”灰字状态为基准）：主/次按钮视觉完全一致；语义层级由位置与顺序表达 */
.btn--primary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.btn--primary:active {
  background: var(--bg-subtle);
}
.btn--ghost,
.btn--secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.btn--ghost:hover,
.btn--secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.btn--sm {
  height: 32px;
  font-size: var(--font-size-md);
  padding: 0 12px;
}
.btn--danger {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--profit-negative);
}
.btn--danger:hover {
  background: var(--danger-soft);
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.icon-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* 主按钮降级：页面内只允许一个主按钮，其余用次按钮 */
.range-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  height: 32px;
}
.range-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.scope-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

/* ------------------------- 输入与搜索 ------------------------- */
.input,
.select,
.search {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.input:focus,
.select:focus,
.search:focus-within {
  border-color: var(--border-strong);
  outline: none;
}
/* v89b：键盘焦点可见性修复——.input:focus 特异性压过全局 :focus-visible（outline:none 覆盖）；
   原位补齐（同特异性后置生效）：鼠标 focus=边框提示，键盘 focus-visible=outline 双重清晰 */
.input:focus-visible,
.select:focus-visible,
.search:focus-within:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.input::placeholder,
.search input::placeholder {
  color: var(--text-tertiary);
}
.search svg {
  color: var(--text-tertiary);
}
/* v68/T03：移动端搜索 input 自身高度铺满搜索容器（命中≥40px，Placeholder 垂直居中） */
@media (max-width: 767px) {
  .search input {
    height: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* ------------------------- 芯片 / 分段 / 筛选 ------------------------- */
.chip {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
.chip:hover {
  background: var(--bg-surface-hover);
}
.chip.active {
  background: var(--bg-surface-active);
  border-color: var(--border-strong);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}
.segment {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}
.segment button {
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
}
.segment button.active {
  background: var(--bg-surface-active);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  box-shadow: none;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.active-tag {
  background: var(--bg-surface-active);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

/* ------------------------- 标签 / 状态 ------------------------- */
/* v80i：显式行高 + min-height 22px——原 padding 2px 8px 且行高 normal，
   ASCII 内容 21px / 中文内容 23px（内容驱动行高，CJK 回退字体行盒更高）；
   规范化后全站 Tag 恒为 22px（§13：min-height 22 / line-height 18 / padding 0 8px） */
.tag {
  border-radius: var(--radius-xs);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 0 8px;
  border: 1px solid transparent;
  line-height: 18px;
  min-height: 22px;
}
.tag--draft { background: var(--bg-surface); color: var(--text-tertiary); border-color: var(--border-default); }
.tag--pending { background: var(--warning-soft); color: var(--warning); }
.tag--confirmed { background: var(--success-soft); color: var(--profit-positive); }
.tag--archived { background: var(--bg-surface); color: var(--text-secondary); border-color: var(--border-default); }
.tag--active { background: var(--success-soft); color: var(--profit-positive); }
.tag--suspended { background: var(--warning-soft); color: var(--warning); }
.tag--eliminated { background: var(--bg-surface); color: var(--text-tertiary); }
.tag--paid { background: var(--success-soft); color: var(--profit-positive); }
.tag--unpaid { background: var(--bg-surface); color: var(--text-secondary); }
.tag--partial { background: var(--warning-soft); color: var(--warning); }
.tag--overdue { background: var(--danger-soft); color: var(--profit-negative); }
.badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-tertiary);
}

/* 涨跌与毛利着色（柔和） */
.margin--good { color: var(--profit-positive); }
.margin--warn { color: var(--warning); }
.margin--bad { color: var(--profit-negative); }
.fb-m-delta.up { color: var(--profit-positive); }
.fb-m-delta.down { color: var(--profit-negative); }

/* ------------------------- 表格 ------------------------- */
.data-tbl {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.data-tbl thead th {
  background: var(--bg-surface);
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--border-default);
}
/* v33: 用户管理表格排版整齐——行等高 64px、单元格垂直居中、列对齐统一（用户左/其余居中）、名字+#编号行距固定 */
.user-tbl tbody tr { height: 64px; }
.user-tbl tbody td { vertical-align: middle; padding: var(--space-8) var(--space-12); }
.user-tbl thead th, .user-tbl tbody td { text-align: left; }
.user-tbl thead th:nth-child(n+2), .user-tbl tbody td:nth-child(n+2) { text-align: center; }
/* v33: 角色权限矩阵表头与单元格对齐（角色列左、权限列居中；nth-child 特异性高于 .data-tbl thead th） */
.perm-tbl thead th:nth-child(n+2) { text-align: center; }
.perm-tbl tbody td.center { text-align: center; }
.user-tbl tbody td:first-child { padding-top: 8px; padding-bottom: 8px; }
.user-tbl tbody td:first-child > div:first-child { line-height: 22px; }
.user-tbl tbody td:first-child > div:last-child { line-height: 16px; margin-top: 2px; }
/* v150: 手机端用户列表卡片（≤720 显示，表格隐藏）——与卡片体系同风格：白底/细边框/圆角/紧凑 */
.user-cards { display: none; }
.user-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-subtle, rgba(127,127,127,0.16));
  border-radius: 10px;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
}
.user-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.user-card__name { font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--text-primary); overflow-wrap: anywhere; }

.user-card__tags { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.user-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle, rgba(127,127,127,0.12)); }
.data-tbl tbody td {
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: var(--font-size-md);
}
.data-tbl tbody tr:last-child td {
  border-bottom: none;
}
.data-tbl tbody tr:hover {
  background: var(--bg-surface-hover);
}
.list-flat {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.list-flat .row {
  border-bottom: 1px solid var(--border-default);
}
.list-flat .row:hover {
  background: var(--bg-surface-hover);
}

/* ------------------------- 弹层 ------------------------- */
.modal-mask.closing {
  animation: maskOut var(--motion-duration-fast) var(--motion-ease-exit) forwards;
  pointer-events: none;
}
.modal-mask.closing .modal {
  animation: modalOut var(--motion-duration-fast) var(--motion-ease-exit) forwards;
}
@keyframes maskOut { to { opacity: 0; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(4px); } }
/* 按钮异步 loading：占位保尺寸，中性灰 spinner */
.btn--loading { position: relative; pointer-events: none; color: transparent; }
.btn--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgba(138, 143, 152, 0.9);
  border-top-color: transparent;
  animation: spin 800ms linear infinite;
}
.modal-mask {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); /* v66/T05：桌面与移动统一 16px 大浮层圆角 */
  box-shadow: var(--elevation-overlay);
  color: var(--text-primary);
}
.create-menu,
.dropdown-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-overlay);
}
.cm-item,
.menu-item {
  color: var(--text-secondary);
}
.cm-item:hover,
.menu-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.toast {
  background: var(--bg-surface-active);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  box-shadow: var(--elevation-overlay);
}

/* ------------------------- 首页（经营基本面） ------------------------- */
.alert-banner {
  background: var(--danger-soft);
  border: 1px solid rgba(240, 138, 138, 0.25);
  color: var(--profit-negative);
  border-radius: var(--radius-md);
}
.alert-banner.warn {
  background: var(--warning-soft);
  border-color: rgba(232, 179, 106, 0.25);
  color: var(--warning);
}
.fb-metric {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.fb-m-value { color: var(--text-primary); }
.fb-m-label { color: var(--text-tertiary); }
.fb-diag-item {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.fb-risk-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}
.fb-conc.ok { background: var(--success-soft); color: var(--profit-positive); }
.fb-conc.warn { background: var(--warning-soft); color: var(--warning); }
.fb-conc.bad { background: var(--danger-soft); color: var(--profit-negative); }
.fb-profit-card {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
}
.fb-profit-row1 {
  border-bottom: 1px solid var(--border-default);
}
.hero {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* 首页经营概览：以一张主面板承载数据，减少卡片套卡片，靠留白、分隔与数字层级组织信息。 */
.ov {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.ov-row {
  display: grid;
  gap: 0;
}
.ov-section + .ov-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border-default); }
.ov-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ov-section-title { color: var(--text-secondary); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); line-height: 1.4; letter-spacing: .01em; }
.ov-row--core { grid-template-columns: 1.2fr 1fr 1fr; }
.ov-row--sub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-row--metrics { gap: 0; }
/* v150.42：概览下半区布局优化——空态压缩 + fb-stack 填满 + 空态提示类 */
.chart-combo--empty { align-items: center; justify-content: center; }
.chart-combo--empty svg { height: 140px; width: auto; margin: 0 auto; display: block; }
.chart-trend-mini--empty svg { height: 80px; width: auto; display: block; }
.fb-stack--rank > .card { flex: 1 1 auto; }
.fb-stack--rank > .ok-line { flex: 0 0 auto; }
.ov-empty-hint {
  margin-top: 10px; padding: 9px 12px;
  border: 1px solid var(--border-default, #ecebe8); border-radius: 8px;
  font-size: 12.5px; color: #6b6b70;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* 业务线并列展示，不再嵌套三张重边框小卡 */
.ov-row--lines {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.ov-line-subs { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; font-size: 11px; color: var(--text-tertiary); line-height: 1.5; }
.ov-cell {
  padding: 2px 22px;
  min-width: 0;
}
.ov-cell + .ov-cell {
  border-left: 1px solid var(--border-default);
}
.ov-cell:first-child { padding-left: 0; }
.ov-cell--metric {
  display: flex;
  min-height: 88px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 22px;
  text-align: left;
}
.ov-row--core .ov-cell--primary {
  min-height: 104px;
  padding-left: 20px;
  border-left: 3px solid var(--profit-positive);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, var(--success-soft), transparent 88%);
}
.ov-row--core .ov-cell--metric:not(.ov-cell--primary) { padding-left: 24px; }
.ov-row--sub {
  min-height: 90px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface-subtle, var(--bg-content));
}
.ov-row--sub .ov-cell--metric { min-height: 90px; padding: 14px 22px; }
.ov-row--sub .ov-cell--metric:first-child { padding-left: 22px; }
.ov-row--sub .ov-value { font-size: 21px; }
.ov-row--sub .ov-cell--amount:last-child .ov-value { color: var(--profit-positive); }
.ov-row--lines .ov-cell--business { padding: 5px 22px; }
.ov-row--lines .ov-cell--business:first-child { padding-left: 0; }
.ov-row--lines .ov-label a { color: var(--text-primary) !important; font-size: 14px; font-weight: var(--font-weight-semibold); }
.ov-row--lines .ov-value { margin-top: 7px; }
.ov-row--lines .ov-line-subs { line-height: 1.5; }
.ov-label { font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); color: var(--text-tertiary); }
.ov-value {
  font-size: 26px;
  font-weight: 650;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.ov-value.sm { font-size: 18px; }
.ov-value.good { color: var(--profit-positive); }
.ov-delta { font-size: var(--font-size-xs); margin-top: 3px; color: var(--text-secondary); }
.ov--mobile-extra .fb-metrics { margin-bottom: 0; }
.ov-foot {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border-default);
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

/* 诊断条（嵌入趋势卡右栏/移动块） */
.diag-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  padding: 7px 0;
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
}
.diag-line:last-child { border-bottom: none; }
.diag-line b { color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.ok-line {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  color: var(--profit-positive);
  font-size: var(--font-size-md);
}

/* 紧凑榜单 */
.rank-list { display: flex; flex-direction: column; }
.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  padding: 9px 0;
  border-bottom: 1px solid var(--border-default);
  cursor: pointer;
  min-width: 0;
}
.rank-item:last-child { border-bottom: none; }
.rank-name {
  font-size: var(--font-size-md);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-val { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); white-space: nowrap; }
.rank-val.good { color: var(--profit-positive); }
.rank-val.bad { color: var(--profit-negative); }

/* ------------------------- 时间线 / 其他 ------------------------- */
.tl-item { border-bottom: 1px solid var(--border-default); }
.tl-dot { background: var(--bg-surface-active); color: var(--text-secondary); }
.kv-grid .kv { border-bottom: 1px solid var(--border-default); }
.po-summary { background: var(--bg-surface); border: 1px solid var(--border-default); }

/* Excel 页 */
.ex-stat {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.dropzone:hover { border-color: var(--text-tertiary); }

/* 空状态与骨架 */
.empty, .loading, .error-box { color: var(--text-tertiary); }

/* 滚动条（深色） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-surface-active); border-radius: var(--radius-xs); border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* 移动端指标不裁切已在 app.css 处理，此处仅对齐新色 */
@media (max-width: 767px) {
  .fb-metric { border-radius: var(--radius-md); }
}

/* ------------------------- 卡片头 / 空状态 / 榜单 / 用户菜单 ------------------------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
/* v80g：低权重「全部 ›」——tertiary 默认，hover 提升至 secondary，无下划线跳动 */
.more { font-size: var(--font-size-sm); color: var(--text-tertiary); cursor: pointer; transition: color 150ms ease; }
.more:hover { color: var(--text-secondary); }

.empty-block { text-align: center; padding: 48px 24px; max-width: 520px; margin: 24px auto; }
.empty-ico { color: var(--text-tertiary); margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: var(--font-weight-semibold); color: var(--text-primary); margin-bottom: 6px; }
.empty-hint { font-size: var(--font-size-md); color: var(--text-tertiary); line-height: 1.6; }

.ov--m-core { margin-bottom: 12px; }
.ov-value--xl { font-size: 28px; }
.ov-delta b { font-weight: var(--font-weight-semibold); }

/* 顶栏用户菜单（v150.19 图2：三段式——身份/主题/退出；左右基线统一） */
.user-menu { min-width: 240px; max-width: calc(100vw - 16px); padding: 6px; }
.um-section { padding: 9px 10px; }
.um-section + .um-section { border-top: 1px solid var(--border-subtle); margin-top: 4px; padding-top: 10px; }
.um-identity { min-width: 0; }
.um-name { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-meta { font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: 2px; }
.um-theme .um-label { display: block; font-size: var(--font-size-xs); color: var(--text-tertiary); margin: 0 0 6px; }
.um-theme .segment { display: flex; width: 100%; }
.um-theme .segment button { flex: 1 1 0; min-width: 0; padding: 7px 4px; white-space: nowrap; text-align: center; }   /* 三选项等宽完整显示 */
.tb-avatar { width: 36px; height: 36px; padding: 0; }
.avatar--sm { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-surface-active); color: var(--text-primary); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); }
.create-wrap { position: relative; }
.create-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; }
.create-menu.hidden { display: none; }

/* 诊断块 */
.diag-block { display: flex; flex-direction: column; }

/* 移动端核心块与 2×2 间距 */
@media (max-width: 767px) {
  .m-page .ov { padding: var(--space-16); }
  .ov-section + .ov-section { margin-top: 17px; padding-top: 16px; }
  .ov-section-head { margin-bottom: 9px; }
  .ov-row--core { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-row--sub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-row--metrics { gap: 0; }
  .ov-cell--metric { min-height: 76px; padding: 10px 10px; }
  .ov-row--core .ov-cell--primary { min-height: 86px; padding-left: 12px; }
  .ov-row--core .ov-cell--metric:not(.ov-cell--primary) { padding-left: 12px; }
  .ov-cell--metric .ov-value { font-size: clamp(16px, 4.7vw, 21px); overflow-wrap: anywhere; }
  .ov-row--core .ov-cell--primary .ov-value { font-size: clamp(21px, 6vw, 27px); }
  .ov-cell--metric .ov-value.sm { font-size: clamp(15px, 4vw, 18px); }
  .ov-cell--metric .ov-delta { font-size: 11px; }
  .ov-row--sub .ov-cell--metric { min-height: 74px; padding: 10px 12px; }
  .ov-row--sub .ov-cell--metric:first-child { padding-left: 12px; }
  .ov-row--sub .ov-cell--metric:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border-default); }
  .ov-row--sub .ov-value { font-size: clamp(15px, 4.3vw, 18px); }
  .ov-row--lines { grid-template-columns: 1fr; }
  .ov-row--lines .ov-cell--business,
  .ov-row--lines .ov-cell--business:first-child { padding: 12px 0; }
  .ov-row--lines .ov-cell--business + .ov-cell--business { border-left: 0; border-top: 1px solid var(--border-default); }
  .ov-row--lines .ov-value { margin-top: 4px; }
  .ov-line-subs { gap: 3px 10px; font-size: 10.5px; }
  .ov--mobile-extra { margin-bottom: 12px; }
  .ov--mobile-extra .fb-metric { padding: 11px 12px; }
  .fb-metrics--2x2 { gap: var(--space-10); margin-bottom: 12px; }
  .m-page .card { margin-bottom: 12px; }
  .fb-titlebar { padding: 2px 0 10px; }
}
/* 桌面卡片间距由 cockpit gap 控制 */
.cockpit > * { min-width: 0; }

/* 头像（中性色） */
.avatar--lg { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-surface-active); color: var(--text-primary); font-size: 20px; font-weight: var(--font-weight-semibold); }

/* 启动页跟随主题 */
.splash { background: var(--bg); }
.splash-name { color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.splash-sub { color: var(--text-tertiary); }
[data-theme='dark'] .splash-logo { filter: invert(1) brightness(0.92); }

/* 截图验收修复：分段控件紧凑、趋势切换不换行、侧栏头去重 */
.seg-wrap .segment { display: inline-flex; width: auto; }
.fb-trend-bar .segment { display: inline-flex; flex-wrap: nowrap; width: auto; max-width: 100%; }
.fb-trend-bar .segment button { white-space: nowrap; }
.segment button { white-space: nowrap; }

/* Excel 导入预览统计 + 手机记录卡 */
.imp-stats { display: flex; gap: var(--space-10); }
.imp-stat { flex: 1; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-10) var(--space-12); text-align: center; }
.imp-stat-v { font-size: 17px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.imp-stat-l { font-size: var(--font-size-2xs); color: var(--text-tertiary); margin-top: 2px; }
.imp-stat.bad .imp-stat-v { color: var(--profit-negative); }
.imp-stat.good .imp-stat-v { color: var(--profit-positive); }
.excel-actions { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.imp-card { margin-bottom: 10px; }
/* kv 行 */
.kv { display: flex; justify-content: space-between; gap: var(--space-12); padding: var(--space-8) 0; border-bottom: 1px solid var(--border-default); font-size: var(--font-size-md); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-tertiary); }
.kv .v { color: var(--text-primary); font-weight: var(--font-weight-medium); text-align: right; }

/* 手机端卡片头纵向排列，避免标题被分段控件挤压 */
@media (max-width: 767px) {
  .card-head { flex-direction: column; align-items: flex-start; gap: var(--space-8); }
  .card-head .fb-trend-bar { width: 100%; overflow-x: auto; }
  .card-head .fb-trend-bar .segment { width: auto; }
}

/* 产品详情头图：适中大小，左侧缩略 + 右侧信息，避免占位图占满整屏 */
.pd-hero { display: flex; justify-content: flex-start; }
.pd-hero-img { width: 200px; height: 200px; object-fit: cover; border-radius: var(--radius-md); background: var(--bg-surface); display: block; }
@media (max-width: 767px) { .pd-hero-img { width: 140px; height: 140px; } }

/* 侧栏头部：字标与副题上下居中（字标为宽字标，横排易失衡） */
.s-head {
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-10) 14px;
  text-align: center;
}
.s-head .brand-logo { display: block; }
.s-head .s-sub { margin-top: 0; font-size: 11px; letter-spacing: 1px; }

/* 图表精致化：限制最大宽度并居中，避免 viewBox 在宽卡内等比放大变稀 */
.chart-trend-main, .chart-trend-mini { max-width: 640px; margin: 0 auto; }
.chart-trend-main svg, .chart-trend-mini svg { display: block; width: 100%; height: auto; }

/* 价格审批卡片 */
.pa-card { border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 10px; background: var(--bg-surface); }
.pa-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-10); }
.pa-prices { display: flex; gap: var(--space-24); flex-wrap: wrap; margin-top: 10px; }
.pa-price { display: flex; align-items: center; gap: var(--space-6); font-size: var(--font-size-md); }
.pa-price .arrow { color: var(--text-tertiary); }
.pa-price .del { color: var(--text-tertiary); text-decoration: line-through; font-weight: var(--font-weight-medium); }
.pa-price .ins { color: var(--primary); font-weight: var(--font-weight-bold); }
.pa-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 8px; }

/* 产品库卡片网格：桌面 4 列、移动 2 列，图片随列宽自动缩小，一屏展示更多 */
.pc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-12); }
@media (min-width: 768px) {
  .pc-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-16); }
  .pc-grid .pc-thumb { border-radius: var(--radius-md); }
}

/* 比价引导横幅 */
.compare-hint { display: none; align-items: center; gap: var(--space-8); margin-bottom: 12px; padding: var(--space-12) 14px; border-radius: var(--radius-md); background: var(--primary-soft, rgba(22,119,255,0.08)); color: var(--primary); font-size: var(--font-size-md); }
.compare-hint svg { flex: 0 0 auto; }

/* 比价表格：左侧「维度」列横向滚动时固定，表头/正文左对齐、不换行 */
.cmp-scroll { overflow-x: auto; }
.cmp-table th.lab, .cmp-table td.lab {
  position: sticky;
  left: 0;
  text-align: left;
  white-space: nowrap;
  background: var(--bg-content);
  z-index: 1;
  min-width: 92px;
  font-weight: var(--font-weight-semibold);
}
.cmp-table td.lab { font-weight: var(--font-weight-medium); color: var(--text-2); }

/* 移动端「更多」导航抽屉 */
.dock-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); padding: var(--space-4) 0 8px; }
.dock-sheet-item {
  display: flex; align-items: center; gap: var(--space-10);
  padding: 13px 14px; border-radius: var(--radius-md); text-decoration: none;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  color: var(--text-primary); font-size: var(--font-size-base); font-weight: var(--font-weight-medium);
}
.dock-sheet-item:active { background: var(--bg-surface-active); }
.dock-sheet-item .ico { color: var(--primary); }

/* 移动端「更多」分组抽屉（与桌面侧栏同构：部门分组可折叠） */
.nav-drawer { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4) 0 8px; }
.nav-drawer .s-item {
  display: flex; align-items: center; gap: var(--space-12);
  padding: 11px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13.5px; font-weight: var(--font-weight-medium);
  text-decoration: none; transition: background-color var(--motion-duration-fast) var(--ease-standard), color var(--motion-duration-fast) var(--ease-standard), border-color var(--motion-duration-fast) var(--ease-standard);
}
.nav-drawer .s-item:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.nav-drawer .s-item.active { background: var(--bg-surface-hover); color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.nav-drawer .s-item .ico { flex: 0 0 auto; }
.nav-drawer .s-group-head {
  display: flex; align-items: center; gap: var(--space-12);
  padding: 11px 12px; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-secondary); font-size: 13.5px; font-weight: var(--font-weight-semibold);
  user-select: none;
}
.nav-drawer .s-group-head:hover { color: var(--text-primary); }
.nav-drawer .s-group-head.active { color: var(--primary); }
.nav-drawer .s-group-head .ico { flex: 0 0 auto; }
.nav-drawer .s-group-head .s-arrow { margin-left: auto; display: inline-flex; color: var(--text-tertiary); transition: transform var(--motion-duration-fast) var(--motion-ease-standard); }
.nav-drawer .s-group-head.open .s-arrow { transform: rotate(90deg); }
.nav-drawer .s-group-children { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; padding-left: 12px; }
.nav-drawer .s-group-children .s-item { padding-left: 14px; }
.nav-drawer .s-item--sub .s-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; background: var(--text-tertiary); }
.nav-drawer .s-item--sub.active .s-dot { background: var(--primary); }
/* v55：抽屉内软装二级分组（与桌面侧栏同款结构） */
.nav-drawer .s-subgroup { display: flex; flex-direction: column; }
.nav-drawer .s-group-head--l2 {
  display: flex; align-items: center; gap: var(--space-8);
  padding: 9px 12px 9px 22px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold);
  user-select: none;
}
.nav-drawer .s-group-head--l2:hover { color: var(--text-primary); }
.nav-drawer .s-group-head--l2.active { color: var(--primary); }
/* v56：二级分组自身被选中（进入投标/EPC 列表）→ 蓝字 + 浅色高亮背景，与普通菜单项选中态一致 */
.nav-drawer .s-group-head--l2.self-active { background: var(--bg-surface-hover); font-weight: var(--font-weight-semibold); }
.nav-drawer .s-group-head--l2 .s-group-label {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: inherit; text-decoration: none;
}
.nav-drawer .s-group-head--l2 .s-group-label:hover { color: inherit; }
.nav-drawer .s-group-head--l2 .s-arrow {
  margin-left: auto; display: inline-flex; align-items: center;
  color: var(--text-tertiary); transition: transform var(--motion-duration-fast) var(--motion-ease-standard); cursor: pointer;
}
.nav-drawer .s-group-head--l2.open .s-arrow { transform: rotate(90deg); }
.nav-drawer .s-group-children--l2 { padding-left: 30px; }
.nav-drawer .s-group-placeholder { margin: 0 0 4px 38px; padding: var(--space-8) var(--space-10); font-size: var(--font-size-sm); color: var(--text-tertiary); }

/* ============================================================
 * Lintel 风格外壳：白色文字侧栏 + 白色数据卡片 + 简洁顶部
 * ============================================================ */

/* 侧栏：白底、文字+图标、顶部 LISHI 字标 + 副题 */
:root { --sidebar-w: 236px; }
.d-sidebar {
  background: var(--bg-content);
  border-right: 1px solid var(--border-default);
  padding: 0 14px 12px;
  align-items: stretch;
}
.d-sidebar .s-head {
  width: 100%;
  box-sizing: border-box;
  height: 96px;
  min-height: 96px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: 0;
  margin: 0 0 8px;
  border-bottom: 1px solid rgba(17, 19, 24, 0.055);
  overflow: visible;
  text-align: center;
}
.d-sidebar .s-head .s-brand-wordmark {
  display: block;
  width: auto;
  height: 25px !important;
  max-height: 25px;
  user-select: none;
  -webkit-user-drag: none;
}
.d-sidebar .s-head .s-sub {
  display: block;
  margin: 0;
  color: #9297a3;
  font-size: 9px;
  font-weight: var(--font-weight-medium);
  line-height: 1;
  letter-spacing: .72px;
  white-space: nowrap;
  text-align: center;
}

.d-sidebar .s-nav { display: flex; flex-direction: column; gap: 2px; align-items: stretch; }
.d-sidebar .s-item {
  display: flex; align-items: center; gap: var(--space-12);
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13.5px; font-weight: var(--font-weight-medium);
  background: transparent; text-decoration: none; transition: background-color var(--motion-duration-fast) var(--ease-standard), color var(--motion-duration-fast) var(--ease-standard), border-color var(--motion-duration-fast) var(--ease-standard);
}
.d-sidebar .s-item .s-label { display: block; }
.d-sidebar .s-item .ico { color: inherit; flex: 0 0 auto; }
.d-sidebar .s-item:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.d-sidebar .s-item.active { background: var(--bg-surface-hover); color: var(--text-primary); font-weight: var(--font-weight-semibold); }

/* 部门分组：可折叠分组头 + 子栏目（缩进） + 空组占位 */
.d-sidebar .s-group-head {
  display: flex; align-items: center; gap: var(--space-12);
  padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-secondary); font-size: 13.5px; font-weight: var(--font-weight-semibold);
  transition: background-color var(--motion-duration-fast) var(--ease-standard), border-color var(--motion-duration-fast) var(--ease-standard); user-select: none;
}
.d-sidebar .s-group-head:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.d-sidebar .s-group-head.active { color: var(--primary); }
.d-sidebar .s-group-head .ico { flex: 0 0 auto; }
.d-sidebar .s-group-head .s-arrow {
  margin-left: auto; display: inline-flex; align-items: center;
  color: var(--text-tertiary); transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.d-sidebar .s-group-head.open .s-arrow { transform: rotate(90deg); }
.d-sidebar .s-group-children {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 4px; padding-left: 12px;
}
/* v26：分组子栏目用小圆点代替图标（整栏图标互不重复，一眼区分部门） */
.d-sidebar .s-group-children .s-item { font-weight: var(--font-weight-medium); padding-left: 14px; }
.d-sidebar .s-item--sub .s-dot {
  width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto;
  background: var(--text-tertiary);
}
.d-sidebar .s-item--sub.active .s-dot { background: var(--primary); }
/* v55：软装管理二级分组（投标/EPC 可折叠）——层级弱于部门头，缩进更深；label 为链接（点击跳转），箭头独立折叠 */
.d-sidebar .s-subgroup { display: flex; flex-direction: column; }
.d-sidebar .s-group-head--l2 {
  display: flex; align-items: center; gap: var(--space-8);
  padding: 7px 12px 7px 22px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold);
  transition: background-color var(--motion-duration-fast) var(--ease-standard), border-color var(--motion-duration-fast) var(--ease-standard); user-select: none;
}
.d-sidebar .s-group-head--l2:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.d-sidebar .s-group-head--l2.active { color: var(--primary); }
/* v56：二级分组自身被选中（进入投标/EPC 列表）→ 蓝字 + 浅色高亮背景，与普通菜单项选中态一致 */
.d-sidebar .s-group-head--l2.self-active { background: var(--bg-surface-hover); font-weight: var(--font-weight-semibold); }
.d-sidebar .s-group-head--l2 .s-group-label {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: inherit; text-decoration: none;
}
.d-sidebar .s-group-head--l2 .s-group-label:hover { color: inherit; }
.d-sidebar .s-group-head--l2 .s-arrow {
  margin-left: auto; display: inline-flex; align-items: center;
  color: var(--text-tertiary); transition: transform var(--motion-duration-fast) var(--motion-ease-standard); cursor: pointer;
}
.d-sidebar .s-group-head--l2.open .s-arrow { transform: rotate(90deg); }
.d-sidebar .s-group-children--l2 { padding-left: 30px; }
.d-sidebar .s-group-placeholder {
  margin: 0 0 4px 38px; padding: var(--space-8) var(--space-10); border-radius: var(--radius-sm);
  font-size: var(--font-size-sm); color: var(--text-tertiary);
}

/* 底部辅助（Settings / Support 风） */
.d-sidebar .s-foot { display: flex; flex-direction: column; gap: 2px; padding: 14px 0 2px; border-top: 1px solid var(--border-default); width: 100%; }
.d-sidebar .s-user-info { display: block; }

/* 顶部栏：白底、页面标题 + 右侧操作，简洁无重影 */
.d-topbar {
  background: var(--bg-content);
  border-bottom: 1px solid var(--border-default);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 0 24px;
}
.d-title { font-weight: var(--font-weight-semibold); font-size: 15px; line-height: 22px; color: var(--text-primary); }

/* 页面容器：白底 */
.d-page { background: var(--bg-app); }
.d-main { background: var(--bg-app); }

/* 卡片：白底、细边框、轻阴影（Lintel 白卡质感） */
.card {
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* ============================================================
 * 首页 Lintel 精排：页面标题 + 大数字趋势区 + 柔色分类数据条
 * ============================================================ */

/* 页面大标题区 */
.home-hero { margin-bottom: 4px; }
.home-hero h1 {
  margin: 0 0 2px;
  color: var(--text-primary);
  font-size: var(--font-page-title-size, 20px);
  font-weight: 600;
  line-height: var(--font-page-title-line, 28px);
  letter-spacing: -0.01em;
}
.home-hero .hero-sub {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

/* 趋势卡顶部：大数字 + 迷你趋势图（Lintel 大数字区） */
.trend-lead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-16); margin: 2px 0 14px; flex-wrap: wrap; }
.trend-lead .lead-num { font-size: 31px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; color: var(--text-primary); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.trend-lead .lead-num small { font-size: var(--font-size-xs); font-weight: var(--font-weight-regular); color: var(--text-tertiary); margin-left: 6px; }
.trend-lead .lead-delta { font-size: var(--font-size-sm); color: var(--success); margin-top: 6px; font-weight: var(--font-weight-semibold); }
.trend-lead .lead-delta.bad { color: var(--danger); }
.trend-lead .lead-chart { flex: 1; min-width: 240px; max-width: 520px; }
.trend-lead .lead-chart svg { display: block; width: 100%; height: auto; }

/* 柔色分类数据条（Lintel Pipeline Stage） */
/* v80n P1-01：部门项目数量——布局由卡片容器宽度决定（容器查询），窄栏纵向列表，宽容器最多两列 */
.stage-card { container-type: inline-size; }
.stage-card .stage-row { display: grid; grid-template-columns: 1fr; gap: var(--space-10); }
@container (min-width: 560px) { .stage-card .stage-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); } }
.stage-item { min-width: 0; }
.stage-item .st-name {
  min-width: 0; flex: 1 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* 单行省略，完整名称见 title */
}
.stage-item .st-val, .stage-item .st-pct { flex: 0 0 auto; white-space: nowrap; }
.stage-item .st-pct { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.stage-item .st-top { display: flex; align-items: baseline; gap: var(--space-8); margin-bottom: 6px; }
.stage-item .st-name { font-size: var(--font-size-md); color: var(--text-secondary); font-weight: var(--font-weight-medium); }
.stage-item .st-val { font-size: 16px; font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stage-item .st-pct { font-size: var(--font-size-xs); color: var(--text-tertiary); }
.stage-item .st-bar { height: 6px; border-radius: 999px; width: 100%; }
.stage-item .st-bar.c1 { background: #8876e8; }
.stage-item .st-bar.c2 { background: #6daac5; }
.stage-item .st-bar.c3 { background: #a98fd6; }
.stage-item .st-bar.c4 { background: #82c4b3; }
.stage-item .st-bar.c5 { background: #d98f9c; }
.stage-item .st-bar.c6 { background: #d4b06e; }

/* Lintel 简洁榜单：行分隔 + 状态点 */
.rank-list .rank-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); padding: var(--space-10) var(--space-6); margin: 0 -6px; border-bottom: 1px solid var(--border-subtle); }
.rank-list .rank-item:last-child { border-bottom: none; }
.rank-list .rank-name { font-weight: var(--font-weight-semibold); font-size: 13.5px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list .rank-val { font-weight: var(--font-weight-semibold); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.rank-list .rank-val.good { color: var(--success); }
.rank-list .rank-val.bad { color: var(--danger); }

/* 首页卡片标题（与 Lintel 一致：小标题 + 右上操作） */
.card .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card .card-title { font-weight: var(--font-weight-semibold); font-size: 15px; line-height: 1.4; color: var(--text-primary); }

/* ============================================================
 * 圆润外框设计语言（参考 Skymetrics：卡片悬浮于浅灰底）
 * 大圆角 + 柔和阴影 + 增大的内边距/间距
 * ============================================================ */

/* v62：卡片收敛为 12px 圆角 + 默认无阴影（结构优于装饰） */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: none;
  padding: var(--space-5);
}

/* 常用容器类同步圆角（表格容器 10px、其余 12px） */
.tbl-wrap, .search { border-radius: var(--radius-md); }
.pa-card, .fb-metric, .fb-titlebar, .stage-card {
  border-radius: var(--radius-lg);
}

/* 模块间距保持克制 */
.cockpit { gap: var(--space-5); }
.d-page { padding: var(--space-20) 28px var(--space-12); max-width: 1600px; margin: 0 auto; }   /* v102：统一 28px 页面左右内边距（原 space-6/8/12 贴边） */
.card + .card { margin-top: 0; }

/* 圆角控件统一：按钮 8px、输入 10px、标签 6px */
.btn { border-radius: var(--radius-sm); }
.chip, .select, .input { border-radius: var(--radius-md); }
.tag { border-radius: var(--radius-xs); }

/* v62：主按钮去除蓝色阴影，hover 使用明确 hover 色（不再用 opacity） */

/* 数据点少时：趋势图限宽居中，避免被拉伸成稀疏散点 */
.chart-trend-main { max-width: 520px; margin: 0 auto; }
.chart-trend-main svg { display: block; width: 100%; height: auto; }

/* 项目进度状态彩色标签（采购跟进视角） */
.prog-tag { display: inline-flex; align-items: center; gap: var(--space-4); padding: 3px 10px; border-radius: 999px; font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); white-space: nowrap; }
.prog-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prog-tag.prog-done { background: var(--status-done-soft); color: var(--status-done); }    /* 已结束 绿（FIX-08 语义变量） */
.prog-tag.prog-doing { background: var(--status-doing-soft); color: var(--status-doing); }  /* 进行中 蓝（FIX-08 语义变量） */
.prog-tag.prog-todo { background: rgba(142,142,160,0.14); color: #8e8ea0; }    /* 未来/待定 灰 */

/* 项目预算表（还原预算模板布局） */
.bs-head { padding: var(--space-20) 22px; }
.bs-title { font-size: 17px; font-weight: var(--font-weight-bold); text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--border-default); margin-bottom: 14px; }
.bs-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-10) 24px; }
.bs-kv { display: flex; gap: var(--space-10); font-size: 13.5px; }
.bs-kv .bs-k { color: var(--text-tertiary); flex: 0 0 64px; }
.bs-kv .bs-v { font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.bs-section { text-align: center; font-weight: var(--font-weight-semibold); letter-spacing: 2px; padding: var(--space-4) 0 12px; color: var(--text-primary); }
.bs-subtotal td { font-weight: var(--font-weight-bold); background: var(--bg-surface); }
.budget-sheet .card .tbl-wrap { border-radius: var(--radius-lg); }
.bs-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-12) 24px; padding: 18px 22px; }
.bs-summary .bs-kv .bs-v { font-size: 16px; font-weight: var(--font-weight-bold); color: var(--success); }
.bs-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-16); padding: 18px 22px; }
.bs-sign-cell { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 28px 12px 12px; color: var(--text-tertiary); font-size: var(--font-size-md); }
@media (max-width: 767px) { .bs-meta, .bs-summary { grid-template-columns: 1fr 1fr; } .bs-sign { grid-template-columns: 1fr; } }

/* 首页进度数量颜色区分：总数深色 / 进行中蓝 / 已结束绿 */
.ov-value.c-total { color: var(--text-primary); }
.ov-value.c-doing { color: var(--status-doing); }   /* FIX-08 */
.ov-value.c-done { color: var(--status-done); }     /* FIX-08 */
/* v150.42 v3：中标/未中标语义色（won=成功绿沿用 done 色系；lost=中性红灰，非错误红） */
.ov-value.c-won, .tiny .c-won { color: var(--status-done); }
.ov-value.c-lost, .tiny .c-lost { color: #a06b78; }

/* FIX-08：移除"进行中=红"覆盖（进行中不是错误态——红色保留给 danger/亏损语义）；
   进行中/已结束统一走 --status-doing/--status-done 语义变量 */

/* 预算表列对齐：去掉全局 min-width，固定布局 + 固定列宽 + 对齐，确保各列垂直对齐不溢出 */
.budget-sheet .data-tbl { min-width: 0; table-layout: fixed; width: 100%; }
.budget-sheet .data-tbl th, .budget-sheet .data-tbl td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: var(--space-10) var(--space-12); }
.budget-sheet .data-tbl .c-c { text-align: center; }
.budget-sheet .data-tbl .c-r, .budget-sheet .data-tbl .num { text-align: right; }
.budget-sheet .data-tbl th:not(.c-c):not(.c-r), .budget-sheet .data-tbl td:not(.c-c):not(.c-r):not(.num) { text-align: left; }
/* 采购成本表 8 列宽 */
.budget-sheet .bs-cost-tbl th:nth-child(1), .budget-sheet .bs-cost-tbl td:nth-child(1) { width: 46px; }
.budget-sheet .bs-cost-tbl th:nth-child(3), .budget-sheet .bs-cost-tbl td:nth-child(3) { width: 76px; }
.budget-sheet .bs-cost-tbl th:nth-child(5), .budget-sheet .bs-cost-tbl td:nth-child(5) { width: 112px; }
.budget-sheet .bs-cost-tbl th:nth-child(6), .budget-sheet .bs-cost-tbl td:nth-child(6) { width: 84px; }
.budget-sheet .bs-cost-tbl th:nth-child(7), .budget-sheet .bs-cost-tbl td:nth-child(7) { width: 100px; }
/* 项目费用表 4 列宽 */
.budget-sheet .bs-fee-tbl th:nth-child(1), .budget-sheet .bs-fee-tbl td:nth-child(1) { width: 46px; }
.budget-sheet .bs-fee-tbl th:nth-child(3), .budget-sheet .bs-fee-tbl td:nth-child(3) { width: 130px; }

/* 项目列表 / 项目预算列表：固定布局 + 固定列宽 + 对齐（去掉全局 min-width，消除溢出与空隙） */
.proj-tbl, .budget-list-tbl { min-width: 0; table-layout: fixed; width: 100%; }
.proj-tbl th, .proj-tbl td, .budget-list-tbl th, .budget-list-tbl td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-tbl .c-c, .budget-list-tbl .c-c { text-align: center; }
/* v80o：列宽由 colgroup 统一定义（表头/正文同源），项目名称列不设宽=吃剩余空间（≥220px），
   原 nth-child 写死 92/110px 是名称列被裁切的根因 */

/* Excel 数据页：导入(绿) / 导出(蓝) 分色辨别 */
.btn--import { background: #2f9e6e; color: #fff; border: 1px solid #2f9e6e; box-shadow: 0 1px 2px rgba(16,24,40,0.1), 0 4px 12px -4px rgba(47,158,110,0.3); }
.btn--import:hover { background: #288a5f; border-color: #288a5f; }
.btn--export { background: transparent; border: 1px solid #3b6fd4; color: #3b6fd4; }
.btn--export:hover { background: rgba(59,111,212,0.08); }

/* 项目/预算列表：列头与数据统一 padding，确保右对齐列的文字右缘完全对齐 */
.proj-tbl thead th, .proj-tbl tbody td, .budget-list-tbl thead th, .budget-list-tbl tbody td { padding: var(--space-10) var(--space-12); }

/* ============ 预算表排版优化：按内容居中 + 合理列宽 + 舒展留白 ============ */
.budget-sheet .tbl-wrap { overflow-x: auto; padding: var(--space-6) 2px; }
.budget-sheet .data-tbl { min-width: 0; table-layout: fixed; width: auto; margin: 0 auto; }
.budget-sheet .data-tbl th, .budget-sheet .data-tbl td { padding: 13px 14px; }
/* 采购成本表列宽（内容列给足，备注适度） */
.budget-sheet .bs-cost-tbl th:nth-child(1), .budget-sheet .bs-cost-tbl td:nth-child(1) { width: 48px; }
.budget-sheet .bs-cost-tbl th:nth-child(2), .budget-sheet .bs-cost-tbl td:nth-child(2) { width: 184px; }
.budget-sheet .bs-cost-tbl th:nth-child(3), .budget-sheet .bs-cost-tbl td:nth-child(3) { width: 84px; }
.budget-sheet .bs-cost-tbl th:nth-child(4), .budget-sheet .bs-cost-tbl td:nth-child(4) { width: 164px; }
.budget-sheet .bs-cost-tbl th:nth-child(5), .budget-sheet .bs-cost-tbl td:nth-child(5) { width: 116px; }
.budget-sheet .bs-cost-tbl th:nth-child(6), .budget-sheet .bs-cost-tbl td:nth-child(6) { width: 92px; }
.budget-sheet .bs-cost-tbl th:nth-child(7), .budget-sheet .bs-cost-tbl td:nth-child(7) { width: 104px; }
.budget-sheet .bs-cost-tbl th:nth-child(8), .budget-sheet .bs-cost-tbl td:nth-child(8) { width: 210px; }
/* 项目费用表列宽 */
.budget-sheet .bs-fee-tbl th:nth-child(1), .budget-sheet .bs-fee-tbl td:nth-child(1) { width: 48px; }
.budget-sheet .bs-fee-tbl th:nth-child(2), .budget-sheet .bs-fee-tbl td:nth-child(2) { width: 300px; }
.budget-sheet .bs-fee-tbl th:nth-child(3), .budget-sheet .bs-fee-tbl td:nth-child(3) { width: 150px; }
.budget-sheet .bs-fee-tbl th:nth-child(4), .budget-sheet .bs-fee-tbl td:nth-child(4) { width: 210px; }
/* 备注列允许换行（长备注不省略），其余列单行省略 */
.budget-sheet .bs-cost-tbl td:nth-child(8), .budget-sheet .bs-fee-tbl td:nth-child(4) { white-space: normal; }

/* 预算表在线编辑：小输入框 */
.input--sm { padding: 5px 8px; font-size: var(--font-size-sm); width: 100%; min-width: 0; }
.bs-edit-tbl td { vertical-align: middle; }
.bs-edit-tbl .input, .bs-edit-tbl select { width: 100%; }

/* ============ 预算表 v2：铺满卡片、消除两侧空白（备注列弹性） ============ */
.budget-sheet .data-tbl { width: 100%; margin: 0; }
.budget-sheet .tbl-wrap { padding: var(--space-6) 0; }
/* 采购成本表：备注列弹性（不设宽度），其余列固定 */
.budget-sheet .bs-cost-tbl th:nth-child(8), .budget-sheet .bs-cost-tbl td:nth-child(8) { width: auto; }
/* 项目费用表：费用项 + 备注列弹性铺满 */
.budget-sheet .bs-fee-tbl th:nth-child(2), .budget-sheet .bs-fee-tbl td:nth-child(2) { width: auto; }
.budget-sheet .bs-fee-tbl th:nth-child(4), .budget-sheet .bs-fee-tbl td:nth-child(4) { width: auto; min-width: 240px; }
.budget-sheet .bs-fee-tbl th:nth-child(3), .budget-sheet .bs-fee-tbl td:nth-child(3) { width: 170px; }

/* ============ 预算表 v3：均匀百分比列宽（按内容比例分配，消除拥挤与留白） ============ */
/* 采购成本表 8 列：序号5 品类19 数量8 供应商19 预算12 含税9 支出12 备注16 */
.budget-sheet .bs-cost-tbl th:nth-child(1), .budget-sheet .bs-cost-tbl td:nth-child(1) { width: 5%; }
.budget-sheet .bs-cost-tbl th:nth-child(2), .budget-sheet .bs-cost-tbl td:nth-child(2) { width: 19%; }
.budget-sheet .bs-cost-tbl th:nth-child(3), .budget-sheet .bs-cost-tbl td:nth-child(3) { width: 8%; }
.budget-sheet .bs-cost-tbl th:nth-child(4), .budget-sheet .bs-cost-tbl td:nth-child(4) { width: 19%; }
.budget-sheet .bs-cost-tbl th:nth-child(5), .budget-sheet .bs-cost-tbl td:nth-child(5) { width: 12%; }
.budget-sheet .bs-cost-tbl th:nth-child(6), .budget-sheet .bs-cost-tbl td:nth-child(6) { width: 9%; }
.budget-sheet .bs-cost-tbl th:nth-child(7), .budget-sheet .bs-cost-tbl td:nth-child(7) { width: 12%; }
.budget-sheet .bs-cost-tbl th:nth-child(8), .budget-sheet .bs-cost-tbl td:nth-child(8) { width: 16%; min-width: 0; }
/* 长文本列允许换行显示（不截断），行高自适应 */
.budget-sheet .bs-cost-tbl td:nth-child(2), .budget-sheet .bs-cost-tbl td:nth-child(4) { white-space: normal; }
/* 项目费用表 4 列：序号8 费用项40 预算22 备注30 */
.budget-sheet .bs-fee-tbl th:nth-child(1), .budget-sheet .bs-fee-tbl td:nth-child(1) { width: 8%; }
.budget-sheet .bs-fee-tbl th:nth-child(2), .budget-sheet .bs-fee-tbl td:nth-child(2) { width: 40%; min-width: 0; }
.budget-sheet .bs-fee-tbl th:nth-child(3), .budget-sheet .bs-fee-tbl td:nth-child(3) { width: 22%; }
.budget-sheet .bs-fee-tbl th:nth-child(4), .budget-sheet .bs-fee-tbl td:nth-child(4) { width: 30%; min-width: 0; }
.budget-sheet .bs-fee-tbl td:nth-child(2) { white-space: normal; }

/* ============ 预算表 v3.1：费用表列轨与成本表对齐（序号5 / 费用项46 / 预算33 / 备注16） ============ */
.budget-sheet .bs-fee-tbl th:nth-child(1), .budget-sheet .bs-fee-tbl td:nth-child(1) { width: 5%; }
.budget-sheet .bs-fee-tbl th:nth-child(2), .budget-sheet .bs-fee-tbl td:nth-child(2) { width: 46%; min-width: 0; }
.budget-sheet .bs-fee-tbl th:nth-child(3), .budget-sheet .bs-fee-tbl td:nth-child(3) { width: 33%; }
.budget-sheet .bs-fee-tbl th:nth-child(4), .budget-sheet .bs-fee-tbl td:nth-child(4) { width: 16%; min-width: 0; }

/* 负数金额（折扣/扣减行）红色加粗表达 */
.neg-money { color: #e5484d !important; font-weight: var(--font-weight-bold); }

/* ============ 投标管理 ============ */
.bid-list-tbl, .bid-sup-tbl { min-width: 0; table-layout: fixed; width: 100%; }
/* v141：v62 时代 px 列宽已删除，统一见 v5 段（v141 更新口径） */
.bid-sup-tbl th:nth-child(1), .bid-sup-tbl td:nth-child(1) { width: 54px; }
.bid-sup-tbl th:nth-child(2), .bid-sup-tbl td:nth-child(2) { width: 130px; }
.bid-sup-tbl th:nth-child(3), .bid-sup-tbl td:nth-child(3) { width: 110px; }
.bid-sup-tbl th:nth-child(4), .bid-sup-tbl td:nth-child(4),
.bid-sup-tbl th:nth-child(5), .bid-sup-tbl td:nth-child(5),
.bid-sup-tbl th:nth-child(6), .bid-sup-tbl td:nth-child(6) { width: auto; min-width: 120px; }
.bid-sup-tbl th:nth-child(7), .bid-sup-tbl td:nth-child(7) { width: 44px; }
.bid-sup-tbl td { vertical-align: middle; }
.bid-cat-card { margin-bottom: 12px; }
.bid-cat-name { font-weight: var(--font-weight-semibold); font-size: var(--font-size-base); max-width: 220px; }
.bid-sup-name { min-width: 0; }
.bid-sup-quote, .bid-sum-input { max-width: 130px; }
/* v80f：摘要卡分组栅格——4 组纵向排布，组内 4 列（≤1023 两列 / ≤767 单列） */
.bid-core--summary { display: flex; flex-direction: column; gap: var(--space-16); }
.bid-core-group { display: flex; flex-direction: column; gap: var(--space-8); }
.bid-core-group + .bid-core-group { padding-top: 12px; border-top: 1px solid var(--border-subtle, rgba(31, 30, 29, 0.14)); }
.bid-core-group-label { font-size: 11px; font-weight: var(--font-weight-semibold); letter-spacing: 0.04em; color: var(--text-tertiary); }
.bid-core-group-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-12) 16px; }
@media (max-width: 1023px) { .bid-core-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .bid-core-group-grid { grid-template-columns: 1fr; } }
/* 汇报/递交方式值（标签+安全链接）允许换行不撑破栅格 */
.bid-core-group-grid .bid-core-cell { min-width: 0; }
.bid-core-group-grid .bid-core-value { overflow-wrap: anywhere; }
.bid-core-cell { min-height: 58px; display: flex; flex-direction: column; justify-content: center; }
.bid-core-label { font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px; }
/* v24：核心卡数值 14px/500，与基本信息卡完全一致（彩色值只保留颜色，字号字重统一） */
.bid-core-value { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); color: var(--text-primary); }
/* 空值「—」：全站统一 14px/400 浅灰占位色 */
.bid-core-empty { font-size: var(--font-size-base); font-weight: var(--font-weight-regular); color: var(--text-tertiary); }
/* v80f：旧 .bid-core 5/3/2/1 列栅格随摘要卡分组化删除（核心卡布局见 v80f bid-core--summary 组栅格） */
.bid-files { display: flex; flex-direction: column; gap: var(--space-6); }
.bid-file-row { display: flex; align-items: center; gap: var(--space-10); padding: var(--space-6) var(--space-10); background: var(--bg-subtle, rgba(31, 30, 29, 0.06)); border-radius: var(--radius-sm); }
.bid-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bid-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-16) 24px; }
.bid-sum-cell { flex: 1 1 0; min-width: 0; }   /* v150.17：汇总格等分填满，消除右侧留白 */
.bid-sum-label { font-size: var(--font-size-sm); color: var(--text-tertiary); margin-bottom: 4px; }
.bid-sum-value { font-size: 19px; font-weight: var(--font-weight-bold); }
.bid-rem-view { display: block; min-height: 26px; line-height: 26px; }
/* 核心信息卡响应式降级：5 列（≥1200）→ 3 列（≤1199）→ 2 列（≤899）→ 1 列（≤767） */
@media (max-width: 767px) { .bid-sum { grid-template-columns: 1fr; } }

/* ============ 投标管理 v2：核心字段强调 + 标题栏 + 品类行对齐 ============ */
/* 问题1：核心字段差异化强调仅保留颜色（字号统一 16px/600 由 .bid-core-value 控制，禁止特殊大小） */
.bid-core-cell .bid-core-label { display: flex; align-items: center; gap: var(--space-6); }
.bid-core-cell--price .bid-core-value { color: var(--warning); }
.bid-core-cell--deadline .bid-core-value { color: var(--danger); }
.bid-core-cell--list .bid-core-value { color: var(--info); }
/* 问题3：品类清单卡片标题与首个品类卡间距；品类卡间统一间距 */
.bid-cat-list .card-head { margin-bottom: 14px; }
.bid-cat-card { margin-bottom: 12px; }
.bid-cat-card:last-child { margin-bottom: 0; }
/* 问题4：品类标题行对齐（输入框与按钮等高 32px，输入框固定 200px） */
.bid-cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: 10px; }
.bid-cat-name { height: 32px; width: 200px; font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
.bid-cat-title { font-weight: var(--font-weight-semibold); font-size: 15px; }
.bid-cat-head .btn--sm, .bid-cat-card .btn--sm { height: 32px; line-height: 30px; }
/* 顺手优化：报价/投标报价 input 文本模式对齐 */
.bid-sup-quote, .bid-sum-input { text-align: right; }

/* ============ 投标管理 v3 ============ */
/* 毛利率按中国习惯：正数(盈利)=红，负数(亏损)=绿（借用 profit 色变量，其值即红/绿） */
.bid-margin-pos { color: var(--profit-negative); font-weight: var(--font-weight-bold); }
.bid-margin-neg { color: var(--profit-positive); font-weight: var(--font-weight-bold); }
/* 汇总区对齐：输入框与数值等高（38px 行高），单元格基线一致 */
.bid-sum { align-items: center; }
.bid-sum-value { line-height: 38px; }
.bid-sum-input { height: 38px; font-size: 19px; font-weight: var(--font-weight-bold); text-align: right; padding: var(--space-6) var(--space-12); box-sizing: border-box; }
/* 供应商行删除按钮：明确删除入口，悬停图标变红 */
.bid-sup-tbl .btn--del { color: var(--text-tertiary); }
.bid-sup-tbl .btn--del:hover { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.bid-sup-tbl .btn--del:hover .ico { color: var(--danger); }
/* 品类清单外层卡片：裁切圆角，内层卡片完全落在 padding 内 */
.bid-cat-list { overflow: hidden; }
.bid-cat-card { box-sizing: border-box; width: 100%; margin-left: 0; margin-right: 0; }

/* ============ 投标管理 v4 ============ */
/* 供应商删除按钮：红色文字明确可辨 + 悬停浅红底 */
.bid-sup-tbl .bid-del-btn { color: var(--danger); border-color: transparent; }
.bid-sup-tbl .bid-del-btn:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
/* v28：列表删除文字按钮（红色，参照供应商删除样式） */
.bid-del-link {
  background: none; border: none; padding: 2px 4px; cursor: pointer;
  color: var(--danger); font-size: var(--font-size-md); font-weight: var(--font-weight-medium); white-space: nowrap;
}
.bid-del-link:hover { color: var(--danger); text-decoration: underline; }
/* v34：项目 / 项目预算列表删除（选择列 + 操作列 + 选中高亮，交互与投标列表一致） */
.proj-tbl th.sel-head, .proj-tbl td.sel-cell,
.budget-list-tbl th.sel-head, .budget-list-tbl td.sel-cell {
  width: 44px; min-width: 44px; text-align: center;
  padding-left: 0; padding-right: 0;   /* v80o：表头/行复选框中心线完全一致 */
}
.proj-tbl td.op-cell, .budget-list-tbl td.op-cell { white-space: nowrap; }
.proj-tbl tr.log-row.sel, .budget-list-tbl tr.log-row.sel { background: var(--bg-subtle, rgba(31, 30, 29, 0.08)); }
@media (max-width: 767px) {
  .proj-card.sel { background: var(--bg-subtle, rgba(31, 30, 29, 0.1)); }
  .proj-card-sel { display: inline-flex; align-items: center; }
  .proj-card-sel input[type=checkbox], .budget-list-tbl td.sel-cell input[type=checkbox] { width: 20px; height: 20px; }
  .proj-card .bid-del-link { min-height: 44px; display: inline-flex; align-items: center; }
}
/* 文件行：上传人/部门 + 时间，与下载按钮间距收紧，行内垂直居中 */
.bid-file-row { gap: var(--space-8); }
.bid-file-meta { flex: 0 0 auto; white-space: nowrap; }
/* 汇总区三列均分铺满，最右不留白（文本居中） */
.bid-sum { display: flex; gap: var(--space-20); align-items: center; }
.bid-sum-cell { flex: 1; text-align: center; min-width: 0; }
.bid-sum-input { width: 100%; max-width: none; text-align: center; }

/* ============ 投标管理 v5 ============ */
/* 七列统一分配 100%：适度收紧名称列，避免后段状态列被长名称列推得过靠右；两种状态列表共用此布局。 */
.bid-list-tbl th:nth-child(1), .bid-list-tbl td:nth-child(1) { width: 4%; }
.bid-list-tbl th:nth-child(2), .bid-list-tbl td:nth-child(2) { width: 36%; }
.bid-list-tbl th:nth-child(3), .bid-list-tbl td:nth-child(3) { width: 14%; text-align: left; }
.bid-list-tbl th:nth-child(4), .bid-list-tbl td:nth-child(4) { width: 13.5%; }
.bid-list-tbl th:nth-child(5), .bid-list-tbl td:nth-child(5) { width: 13.5%; }
.bid-list-tbl th:nth-child(6), .bid-list-tbl td:nth-child(6) { width: 9%; text-align: center; }
.bid-list-tbl th:nth-child(7), .bid-list-tbl td:nth-child(7) { width: 10%; text-align: center; }
/* 已中标列表：重新分配列轨，避免状态/操作列占用过宽造成中段空洞。
   合计 100%：选择 3.5 / 名称 36.5 / 金额 13 / 开工日期 14 / 进度 19 / 状态 7.5 / 操作 7.5。 */
.bid-list-tbl--completed th:nth-child(1), .bid-list-tbl--completed td:nth-child(1) { width: 3.5%; }
.bid-list-tbl--completed th:nth-child(2), .bid-list-tbl--completed td:nth-child(2) { width: 36.5%; }
.bid-list-tbl--completed th:nth-child(3), .bid-list-tbl--completed td:nth-child(3) { width: 13%; text-align: center; }
.bid-list-tbl--completed th:nth-child(4), .bid-list-tbl--completed td:nth-child(4) { width: 14%; text-align: center; }
.bid-list-tbl--completed th:nth-child(5), .bid-list-tbl--completed td:nth-child(5) { width: 19%; }
.bid-list-tbl--completed th:nth-child(6), .bid-list-tbl--completed td:nth-child(6) { width: 7.5%; text-align: center; }
.bid-list-tbl--completed th:nth-child(7), .bid-list-tbl--completed td:nth-child(7) { width: 7.5%; text-align: center; }
.bid-list-tbl--completed td.bid-wf-cell { padding-left: 12px; padding-right: 12px; }
/* 中等桌面/平板仍保持可读列宽，在表格容器内横向滚动，避免金额、徽标互相挤压。 */
@media (min-width: 768px) and (max-width: 1199px) {
  .bid-list-tbl--completed { min-width: 900px; }
  .bid-list-tbl--completed th:nth-child(1), .bid-list-tbl--completed td:nth-child(1) { width: 4.5%; }
  .bid-list-tbl--completed th:nth-child(2), .bid-list-tbl--completed td:nth-child(2) { width: 31.5%; }
  .bid-list-tbl--completed th:nth-child(3), .bid-list-tbl--completed td:nth-child(3) { width: 14%; }
  .bid-list-tbl--completed th:nth-child(4), .bid-list-tbl--completed td:nth-child(4) { width: 14%; }
  .bid-list-tbl--completed th:nth-child(5), .bid-list-tbl--completed td:nth-child(5) { width: 17%; }
  .bid-list-tbl--completed th:nth-child(6), .bid-list-tbl--completed td:nth-child(6) { width: 10%; }
  .bid-list-tbl--completed th:nth-child(7), .bid-list-tbl--completed td:nth-child(7) { width: 9%; }
}
.bid-wf-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 108px; text-align: left; }
.bid-wf-progress-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.bid-wf-progress-value { color: var(--success); font-size: 13px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bid-wf-progress-count { color: var(--text-tertiary); font-size: 11px; white-space: nowrap; }
.bid-wf-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--bg-surface-hover, #efeee9); box-shadow: inset 0 0 0 1px rgba(31, 30, 29, 0.04); }
.bid-wf-progress-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #45a985, var(--success)); transition: width 240ms ease; }
.bid-wf-stage { color: var(--text-tertiary); font-size: 10px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bid-wf-progress--retention .bid-wf-stage { color: var(--text-secondary); font-weight: var(--font-weight-medium); }
.bid-wf-stage--retention { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bid-wf-stage-badge { flex: 0 0 auto; padding: 1px 5px; border-radius: 4px; background: rgba(46, 125, 50, 0.09); color: var(--success, #2e7d32); font-size: 9px; line-height: 14px; }
.bid-wf-stage--retention > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bid-wf-progress--retention-completed .bid-wf-progress-value { color: var(--text-secondary); }
.bid-wf-progress--retention-completed .bid-wf-progress-fill { background: var(--success, #2e7d32); }
.bid-wf-stage--retention-completed { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bid-wf-stage--retention-completed .bid-wf-stage-badge { background: rgba(46, 125, 50, 0.12); color: var(--success, #2e7d32); font-size: 10px; line-height: 16px; font-weight: var(--font-weight-semibold); }
.bid-wf-stage--retention-completed > span:last-child { overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.bid-wf-progress--empty .bid-wf-progress-value { color: var(--text-tertiary); }
.bid-wf-progress--empty .bid-wf-progress-fill { background: var(--text-tertiary); opacity: 0.25; }
/* v29：选择列 checkbox 居中、行选中底色 */
.bid-list-tbl .bid-sel-head, .bid-list-tbl .bid-sel-cell { text-align: center; }
.bid-list-tbl .bid-sel-cell input[type=checkbox], .bid-list-tbl .bid-sel-head input[type=checkbox] { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.bid-list-tbl tr.log-row.sel { background: var(--bg-subtle, rgba(31, 30, 29, 0.08)); }
/* v29：批量删除选中条（吸底悬浮） */
.bid-selbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 60;
  display: flex; align-items: center; gap: var(--space-12);
  padding: var(--space-10) var(--space-16); border-radius: var(--radius-lg);
  background: var(--bg-surface); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.bid-selbar.hidden { display: none; }
.bid-selbar-count { font-size: 13.5px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.bid-selbar-del { min-height: 36px; }
/* 月份分组行：v104 起统一由下方「投标列表月份分组头 v2」区块管理（此处旧 muted 底色已废除） */
/* 品类表：所有单元格垂直居中；表头不裁切；审批列加宽；checkbox 水平+垂直居中 */
.bid-sup-tbl th { white-space: nowrap; overflow: visible; }
.bid-sup-tbl td { vertical-align: middle; }
.bid-sup-tbl th:nth-child(1), .bid-sup-tbl td:nth-child(1) { width: 72px; text-align: center; }
.bid-sup-tbl td.c-c { text-align: center; vertical-align: middle; }
.bid-sup-tbl input[type="checkbox"] { display: inline-block; vertical-align: middle; margin: 0; }
/* 删除列加宽（按钮完整落在卡片 padding 内，不溢出圆角） */
.bid-sup-tbl th:nth-child(7), .bid-sup-tbl td:nth-child(7) { width: 64px; }
.bid-sup-tbl { table-layout: fixed; width: 100%; box-sizing: border-box; }
.bid-cat-card .tbl-wrap { overflow: hidden; }

/* ============ 投标管理 v6：行内对齐 + 多行备注 ============ */
/* 行内控件统一 32px 高，td 垂直居中，上下边缘对齐 */
.bid-sup-tbl td { vertical-align: middle; }
.bid-sup-tbl .input--sm { height: 32px; box-sizing: border-box; }
.bid-sup-tbl .btn--sm { height: 32px; line-height: 30px; box-sizing: border-box; }
/* checkbox：flex 容器水平+垂直居中，随行高撑高仍居中 */
.bid-sup-tbl .bid-cb-wrap { display: flex; align-items: center; justify-content: center; min-height: 32px; }
.bid-sup-tbl .bid-cb-wrap input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
/* 多行备注 textarea：默认 1 行高，最多 ~4 行（96px）滚动，支持换行 */
.bid-sup-tbl .bid-rem-ta { min-height: 32px; max-height: 96px; resize: none; overflow-y: auto; white-space: pre-wrap; line-height: 1.5; padding: 5px 8px; }
.bid-sup-tbl .bid-rem-view { white-space: pre-wrap; line-height: 1.5; display: block; min-height: 26px; padding: 3px 0; }

/* ============ 投标管理 v6.1：行内对齐修正（checkbox 容器固定 32px，td padding 统一） ============ */
.bid-sup-tbl td { vertical-align: middle; padding: var(--space-8) var(--space-10); }
.bid-sup-tbl .bid-cb-wrap { display: flex; align-items: center; justify-content: center; height: 32px; box-sizing: border-box; }
.bid-sup-tbl .bid-cb-wrap input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.bid-sup-tbl .input--sm, .bid-sup-tbl .btn--sm, .bid-sup-tbl .bid-rem-ta { height: 32px; box-sizing: border-box; }

/* ============ 投标管理 v6.2：行内对齐根因修复（控件 vertical-align: middle，绕开 inline-block baseline 错位） ============ */
.bid-sup-tbl td input, .bid-sup-tbl td textarea, .bid-sup-tbl td button { vertical-align: middle; }

/* ============ 投标管理 v6.3：统一 line-height 基准 + inline-flex 容器，彻底对齐 ============ */
.bid-sup-tbl td { vertical-align: middle; padding: var(--space-8) var(--space-10); line-height: 32px; }
.bid-sup-tbl td input, .bid-sup-tbl td textarea, .bid-sup-tbl td button { vertical-align: middle; }
.bid-sup-tbl .bid-cb-wrap { display: inline-flex; align-items: center; justify-content: center; height: 32px; vertical-align: middle; }

/* ============ 投标管理 v6.4：备注 textarea 用 flex 包裹（textarea 的 middle 对齐浏览器处理特殊） ============ */
.bid-sup-tbl .bid-rem-wrap { display: inline-flex; align-items: center; min-height: 32px; vertical-align: middle; }
.bid-sup-tbl .bid-rem-wrap .bid-rem-ta { width: 100%; }

/* ============ 投标管理 v6.5：td 用 flex 容器（内容一律相对 td 中线垂直居中，彻底根治错位） ============ */
.bid-sup-tbl td { display: flex; align-items: center; padding: var(--space-8) var(--space-10); }
.bid-sup-tbl td.c-c, .bid-sup-tbl td.num { justify-content: center; }

/* ============ 投标管理 v6.6：统一内容区（line-height 30 + padding 0）让 middle 基准一致，单行完全对齐 ============ */
.bid-sup-tbl td { display: table-cell; vertical-align: middle; padding: var(--space-8) var(--space-10); line-height: 32px; }
.bid-sup-tbl .input--sm { height: 32px; padding: 0 8px; font-size: var(--font-size-md); line-height: 30px; box-sizing: border-box; }
.bid-sup-tbl .btn--sm { height: 32px; line-height: 30px; font-size: var(--font-size-md); box-sizing: border-box; }
.bid-sup-tbl .bid-cb-wrap { display: inline-flex; align-items: center; justify-content: center; height: 32px; vertical-align: middle; }
.bid-sup-tbl .bid-rem-wrap { display: inline-flex; align-items: center; min-height: 32px; vertical-align: middle; }
.bid-sup-tbl .bid-rem-ta { height: 32px; min-height: 32px; max-height: 96px; padding: 5px 8px; line-height: 1.5; }

/* ============ 投标管理 v6.7：td 子元素统一 vertical-align: top（顶部对齐，绕开 middle 基准差异） ============ */
.bid-sup-tbl td > * { vertical-align: top; }

/* ============ 投标管理 v6.8：高特异性统一所有 td 直接子元素 top 对齐（覆盖此前 middle 规则） ============ */
.bid-sup-tbl tbody td > * { vertical-align: top !important; }

/* ============ 投标管理 v6.9：button 改 inline-flex（与其余 inline-flex 容器同对齐基准） ============ */
.bid-sup-tbl td > button { display: inline-flex; align-items: center; justify-content: center; }

/* ============ 投标管理 v7：所有 td 内容统一 inline-flex 容器（同构对齐基准，彻底解决） ============ */
.bid-sup-tbl .bid-cell { display: inline-flex; align-items: center; min-height: 32px; width: 100%; box-sizing: border-box; vertical-align: top; }
.bid-sup-tbl .bid-cell--num { justify-content: flex-end; }
.bid-sup-tbl .bid-cell input { width: 100%; }

/* ============ 投标管理 v7.1：.bid-cell 强制 top 对齐（覆盖一切 middle 来源） ============ */
.bid-sup-tbl td > .bid-cell { vertical-align: top !important; }
.bid-sup-tbl td > .bid-cb-wrap, .bid-sup-tbl td > .bid-rem-wrap { vertical-align: top !important; }

/* ============ 投标管理 v7.2：容器改 block 级 flex（块级从 td 内容区顶部开始，完全避开 line box 偏移） ============ */
.bid-sup-tbl td > .bid-cell, .bid-sup-tbl td > .bid-cb-wrap, .bid-sup-tbl td > .bid-rem-wrap {
  display: flex; align-items: center; min-height: 32px; width: 100%; box-sizing: border-box; vertical-align: top;
}
.bid-sup-tbl td.c-c > * { justify-content: center; }
.bid-sup-tbl td.num > * { justify-content: flex-end; }

/* ============ 投标管理 v7.3：c-c/num 列 td 直接 flex 居中（checkbox/报价/删除） ============ */
.bid-sup-tbl td.c-c, .bid-sup-tbl td.num { display: flex; align-items: center; justify-content: center; }
.bid-sup-tbl td.c-c > *, .bid-sup-tbl td.num > * { width: auto !important; }

/* ============ 投标管理 v7.4：c-c/num td 固定 48px 高（与普通 td 行高一致，内容 flex 居中） ============ */
.bid-sup-tbl td.c-c, .bid-sup-tbl td.num { display: flex; align-items: center; justify-content: center; height: 48px; box-sizing: border-box; }

/* ============ 投标管理 v7.5：c-c/num td 高与普通 td（64px）一致 ============ */
.bid-sup-tbl td.c-c, .bid-sup-tbl td.num { height: 64px; }

/* ============ 投标管理 v7.6（最终对齐方案）：td=table-cell + line-height 48（line box 顶=内容顶）+ 子元素 inline-flex top ============ */
.bid-sup-tbl td { display: table-cell !important; vertical-align: middle; padding: var(--space-8) var(--space-10); line-height: 48px; height: auto; }
.bid-sup-tbl td.c-c, .bid-sup-tbl td.num { display: table-cell !important; height: auto; }
.bid-sup-tbl td > * { vertical-align: top !important; display: inline-flex; align-items: center; min-height: 32px; box-sizing: border-box; }
.bid-sup-tbl td > .bid-cell { width: 100%; }
.bid-sup-tbl td.c-c > *, .bid-sup-tbl td.num > * { justify-content: center; }

/* ============ 投标管理 v8：供应商清单改 CSS Grid（div 网格，内容垂直居中 100% 可控） ============ */
.bid-sup-grid { display: grid; grid-template-columns: 72px 1.2fr 110px 1fr 1fr 1fr 64px; gap: var(--space-4) 10px; align-items: center; padding: var(--space-6) var(--space-10); }
.bid-sup-grid > div { min-height: 32px; display: flex; align-items: center; }
.bid-sup-grid > div:first-child, .bid-sup-grid > div:nth-child(3), .bid-sup-grid > div:last-child { justify-content: center; }
.bid-sup-head { display: grid; grid-template-columns: 72px 1.2fr 110px 1fr 1fr 1fr 64px; gap: var(--space-4) 10px; padding: var(--space-8) var(--space-10); background: var(--bg-subtle, rgba(31, 30, 29, 0.08)); border-radius: var(--radius-sm) 8px 0 0; font-size: var(--font-size-sm); color: var(--text-tertiary); font-weight: var(--font-weight-semibold); }
.bid-sup-head-cell { text-align: center; overflow: visible; white-space: nowrap; }
.bid-sup-grid .input--sm, .bid-sup-grid .btn--sm, .bid-sup-grid .bid-rem-ta { height: 32px; box-sizing: border-box; }
.bid-sup-grid .bid-rem-ta { min-height: 32px; max-height: 96px; resize: none; overflow-y: auto; white-space: pre-wrap; line-height: 1.5; padding: 5px 8px; }
.bid-sup-grid .bid-rem-wrap { display: flex; align-items: center; min-height: 32px; width: 100%; }
.bid-sup-grid .bid-rem-wrap textarea { width: 100%; }
.bid-sup-grid .bid-cb-wrap { justify-content: center; }
.bid-sup-grid .bid-cell { width: 100%; min-width: 0; }
.bid-sup-grid .bid-cell input { width: 100%; }

/* ============ v51：品类增补/减项变动记录 ============ */
.bid-adj-block { margin: 4px 10px 8px; padding-top: 10px; border-top: 1px dashed var(--border-default, rgba(31, 30, 29, 0.22)); }
.bid-adj-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); margin-bottom: 6px; }
.bid-adj-title { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-secondary); }
.bid-adj-row { display: grid; grid-template-columns: 64px 1.4fr 110px 1fr 32px; gap: var(--space-6) 10px; align-items: center; padding: var(--space-4) 0; }
.bid-adj-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--font-size-2xs); font-weight: var(--font-weight-medium); text-align: center; white-space: nowrap; }
.bid-adj-pill--add { background: rgba(34,160,104,0.14); color: #22a068; }
.bid-adj-pill--deduct { background: rgba(225,76,70,0.14); color: #e14c46; }
/* v52：增补/减项按钮——绿＋/红－，描边+文字图标同色（与行内 pill 同色系），hover 浅色填充 */
.bid-adj-actions { margin-left: auto; }
.bid-adj-btn { display: inline-flex; align-items: center; gap: var(--space-4); white-space: nowrap; }
.bid-adj-btn .ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.bid-adj-btn--add { border-color: rgba(34,160,104,0.55); color: #22a068; }
.bid-adj-btn.bid-adj-btn--add:hover { background: rgba(34,160,104,0.06); color: #22a068; }
.bid-adj-btn--deduct { border-color: rgba(225,76,70,0.55); color: #e14c46; }
.bid-adj-btn.bid-adj-btn--deduct:hover { background: rgba(225,76,70,0.06); color: #e14c46; }
.bid-adj-row .input--sm { height: 32px; box-sizing: border-box; width: 100%; }
.bid-adj-row .bid-adj-name, .bid-adj-row .bid-adj-note { font-size: var(--font-size-md); color: var(--text-secondary); word-break: break-word; }
.bid-adj-row .bid-adj-amount { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.bid-adj-del { background: none; border: none; cursor: pointer; color: var(--text-tertiary); padding: var(--space-4); border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; }
.bid-adj-del:hover { color: #e14c46; background: rgba(225,76,70,0.1); }
.bid-adj-empty { padding: var(--space-6) 2px; }
.bid-cat-subtotal { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-10); margin: 0 10px 10px; padding-top: 8px; border-top: 1px solid var(--border-default, rgba(31, 30, 29, 0.22)); }
.bid-cat-subtotal-label { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-tertiary); }
.bid-cat-subtotal-value { font-size: 15px; font-weight: var(--font-weight-bold); color: var(--text-primary); }
@media (max-width: 767px) {
  .bid-adj-head { flex-wrap: wrap; row-gap: var(--space-6); }
  .bid-adj-actions { margin-left: auto; }
  .bid-adj-row { grid-template-columns: 1fr 1fr; gap: var(--space-6) 8px; padding: var(--space-8) 0; position: relative; }
  .bid-adj-row .bid-adj-pill { grid-column: 1 / 2; justify-self: start; }
  .bid-adj-row .bid-adj-name { grid-column: 2 / 3; }
  .bid-adj-row .bid-adj-amount { grid-column: 1 / 2; }
  .bid-adj-row .bid-adj-note { grid-column: 2 / 3; }
  .bid-adj-row .bid-adj-del { position: absolute; top: 8px; right: 0; grid-column: auto; }
  .bid-cat-subtotal { margin: 0 6px 10px; }
}

/* ============ 投标管理 v9：弹窗表单排版（form-field 全局规范 + bid-form 分组） ============ */
/* form-field 全局规范：字段间距 16px、label 与输入框 6px 留白、输入框 40px 高 */
.form-field { margin-bottom: 16px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label { display: block; height: 18px; line-height: 18px; margin-bottom: 10px; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-field .input { height: 40px; padding: 0 12px; box-sizing: border-box; width: 100%; font-size: var(--font-size-base); }
/* 投标弹窗容器与分组：名称/限制价 与 时间字段之间留更大分组间距 */
.bid-form { padding: var(--space-6) 2px 8px; }
.bid-form .form-group { margin-bottom: 20px; }
.bid-form .form-group:last-child { margin-bottom: 2px; }
/* 时间字段并排两列（窄屏 <640px 自动堆叠回单列） */
.bid-form .form-grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
@media (max-width: 639px) {
  .bid-form .form-grid { grid-template-columns: 1fr; }
}

/* ============ 投标管理 v9：招标方式/开发商 + 文件区三栏目 ============ */
/* 招标方式标签：清单(蓝) / 方案(琥珀)；v80i：显式行高——防止继承父值行 22px 后 Tag 撑高至 24px */
/* v80k：与全局 .tag 同规格（12px/500/22px）——消除双 Tag 体系；值行 22px 内恰好容纳 */
.bid-type-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: var(--font-weight-medium); margin-left: 0; vertical-align: middle; white-space: nowrap; box-sizing: border-box; }   /* v146 统一 */
.bid-type-tag--list { background: rgba(59,111,212,0.12); color: var(--info, #3b6fd4); }
.bid-type-tag--plan { background: rgba(255,171,0,0.14); color: var(--warning, #b57e10); }
/* v42：未中标/已完成列表的项目来源标签（投标=灰、EPC=青绿） */
.bid-src-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: var(--font-weight-medium); margin-left: 0; background: var(--bg-surface-hover, rgba(0,0,0,0.06)); color: var(--text-tertiary); white-space: nowrap; box-sizing: border-box; }   /* v146 与 type-tag 同规格（项目类型=中性灰） */
.bid-src-tag--epc { background: rgba(29,158,117,0.14); color: #0f6e56; }
/* 弹窗招标方式单选 */
.bid-type-sel { display: flex; gap: var(--space-12); padding-top: 2px; }
.bid-type-opt { display: inline-flex; align-items: center; gap: var(--space-6); font-size: 13.5px; cursor: pointer; color: var(--text-secondary); }
.bid-type-opt input[type="radio"] { width: 15px; height: 15px; margin: 0; }
/* 核心信息卡：grid 行自动等高（v18 起 10 字段 5 列×2 行，不再需要第 4 格左对齐特殊规则） */
/* 文件区三栏目：分组头部（子组标签 + 上传按钮） */
.bid-files-sec { display: flex; flex-direction: column; gap: var(--space-16); }
.bid-file-group { }
.bid-file-empty { padding: var(--space-6) 0; }

/* ============ 投标管理 v9.1：详情页间距统一（flex gap 16，禁占位符）+ 开发商字重 + 文件卡节奏 ============ */
/* 详情页顶级卡片统一 16px 间距（父容器 gap 控制） */
.bid-detail { display: flex; flex-direction: column; gap: var(--space-16); }
/* 文件区三卡与顶级间距一致 */
.bid-files-sec { gap: var(--space-16); }
/* v18：开发商值字号统一 16px/600（旧 15px/500 特殊规则移除） */

/* ============ 投标管理 v20：基本信息卡 + 文件栏目负责人 ============ */
/* ---- 基本信息卡：4 联系人 / 电话地址 / 备注多行，字号与核心卡统一 ---- */
.basic-grid { display: grid; gap: var(--space-12) 20px; margin-bottom: 14px; }
.basic-grid:last-child { margin-bottom: 0; }
.basic-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.basic-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* v59：已完成视图隐藏投标联系人 → 3 列均分不留空位 */
.basic-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.basic-field { min-width: 0; }
.basic-field--full { margin-top: 2px; }
/* v59：甲方联系人子区块（仅已完成视图）——表头+行内编辑，列宽均分，与供应商表视觉一致 */
.bid-client-sec { margin-bottom: 14px; }
.bid-client-box { display: flex; flex-direction: column; gap: var(--space-8); }
.bid-client-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); }
.bid-client-title { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.bid-client-tbl { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.bid-client-tbl-head, .bid-client-row { display: grid; grid-template-columns: 1fr 1fr 2fr 40px; gap: var(--space-8) 12px; align-items: center; padding: var(--space-8) var(--space-12); }
.bid-client-tbl-head { background: var(--bg-surface-hover); font-size: var(--font-size-xs); color: var(--text-tertiary); font-weight: var(--font-weight-semibold); }
.bid-client-row + .bid-client-row { border-top: 1px solid var(--border); }
.bid-client-cell { min-width: 0; }
.bid-client-cell--op { display: flex; justify-content: flex-end; }
.bid-client-input { width: 100%; box-sizing: border-box; height: 34px; font-size: var(--font-size-md); }
.bid-client-address { height: 34px; min-height: 34px; resize: none; overflow: hidden; line-height: 1.5; padding: 7px 10px; font-family: inherit; }
.bid-client-del { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: none; background: transparent; color: var(--text-tertiary); border-radius: var(--radius-xs); cursor: pointer; transition: background-color var(--motion-duration-fast) var(--ease-standard), color var(--motion-duration-fast) var(--ease-standard); }
.bid-client-del:hover { color: #d64545; background: rgba(214, 69, 69, .1); }
.bid-client-empty { padding: var(--space-10) var(--space-12); }
/* 375px：甲方联系人竖排小卡（姓名/电话/地址 各一行，删除右上角） */
@media (max-width: 767px) {
  .basic-grid--3 { grid-template-columns: 1fr; }
  .bid-client-tbl-head { display: none; }
  .bid-client-row { grid-template-columns: 1fr; gap: var(--space-8); padding: var(--space-12); position: relative; }
  .bid-client-row + .bid-client-row { border-top: 1px solid var(--border); }
  .bid-client-cell--op { position: absolute; top: 6px; right: 6px; }
  .bid-client-del { width: 34px; height: 34px; }
  .bid-client-input, .bid-client-address { height: 36px; min-height: 36px; }
}
.basic-label { font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px; display: flex; align-items: center; gap: var(--space-6); }
.basic-edit { min-width: 0; }
/* v21：值字号 14px/500（小于卡片标题 15px），一律左对齐 */
.basic-edit-view {
  font-size: var(--font-size-base); font-weight: var(--font-weight-medium); color: var(--text-primary); line-height: 1.5; text-align: left;
  padding: 5px 8px; border-radius: var(--radius-sm); border: 1px solid transparent;
  white-space: pre-wrap; word-break: break-word; min-height: 28px; cursor: text;
}
.basic-edit-view:hover { background: var(--bg-surface-hover); border-color: var(--border-default); }
/* v24：空值「—」全站统一 14px/400 浅灰 */
.basic-edit-view.is-empty { color: var(--text-tertiary); font-weight: var(--font-weight-regular); }
.basic-edit-input { width: 100%; box-sizing: border-box; }
.basic-edit textarea.basic-edit-input { min-height: 72px; resize: vertical; line-height: 1.6; }

/* ---- 文件栏目负责人：部门灰徽标 + 可编辑姓名（标题右侧、按钮左侧） ---- */
.file-section-left { display: flex; align-items: center; gap: var(--space-10); min-width: 0; flex: 1; }
.file-owner { display: inline-flex; align-items: center; gap: var(--space-8); min-width: 0; }
.file-dept-tag {
  font-size: var(--font-size-2xs); font-weight: var(--font-weight-semibold); color: var(--text-secondary);
  background: var(--bg-subtle, rgba(31, 30, 29, 0.12)); padding: 2px 9px; border-radius: 999px;
  white-space: nowrap; flex: 0 0 auto;
}
/* v21：负责人姓名 13px/400 次要文字色（略弱于栏目标题 15px，与部门徽标协调），同一行基线居中 */
.file-owner .basic-edit-view {
  font-size: var(--font-size-md); font-weight: var(--font-weight-regular); color: var(--text-secondary); padding: 3px 6px; min-height: 0; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
}
.file-owner .basic-edit-view:hover { color: var(--text-primary); }
/* v24：负责人占位（填写负责人）字号/字重/颜色与全站空值统一（14px/400 浅灰） */
.file-owner .basic-edit-view.is-empty { color: var(--text-tertiary); font-weight: var(--font-weight-regular); font-size: var(--font-size-base); }
.file-owner .basic-edit-input { width: 140px; }

/* 响应式：基本信息卡降级 4→2→1 列 */
@media (max-width: 1199px) { .basic-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .basic-grid--4, .basic-grid--2, .basic-grid--3 { grid-template-columns: 1fr; } }
/* 标题行：左侧标题、右侧上传按钮，同一行垂直居中；全栏目结构完全一致，杜绝逐卡片手写样式 */
.file-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  min-height: 36px;
  margin-bottom: 10px;
}
.file-section-title { font-weight: var(--font-weight-semibold); font-size: 15px; color: var(--text-primary); display: flex; align-items: center; min-width: 0; }
/* 按钮统一尺寸/样式：32px 高、inline-flex 双居中，与标题文字垂直居中 */
.file-section-header .btn--sm {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: 0 12px;
  box-sizing: border-box;
  line-height: 1;
  flex: 0 0 auto;
}
/* 移动端：所有文件栏目标题行统一改为纵向（标题上、按钮下），行为一致 */
@media (max-width: 767px) {
  .file-section-header { flex-direction: column; align-items: stretch; gap: var(--space-8); margin-bottom: 12px; }
  .file-section-header .btn--sm { align-self: flex-start; }
  .file-section-left { flex-wrap: wrap; }
}
/* 子组之间统一 16px；文件行间距一致（.bid-files 已 gap 6px） */
.bid-file-group + .bid-file-group { margin-top: 16px; }
.bid-file-empty { padding: var(--space-6) 0; }

/* 文件区三卡：清掉 .card 全局 margin-bottom:14px（glass.css），间距统一由 flex gap 16 控制，避免 16+14 叠加 */
.bid-files-sec > .card { margin-bottom: 0; }

/* ============ 投标列表月份分组头 v3（v104）：轻量分组标题 ============
   透明底（页面暖白透出）+ 日历图标 + 中等字重月份 + 轻量胶囊数量标签
   + 低对比分隔线；高度 52px；不再使用冷灰实心底（避免与禁用/选中态混淆） */
.bid-list-tbl tr.bid-month-row td {
  background: transparent;
  padding: var(--space-4) 14px;   /* v104b：4+44+4+1border≈54px（表格 strut 另有 ~8px 由 min-height 吸收） */
  border-top: none;
  border-bottom: 1px solid var(--border-subtle);
}
.bid-list-tbl tbody tr.bid-month-row:first-child td { border-top: none; }
.bid-month-head { display: flex; align-items: center; gap: var(--space-10); min-height: 44px; line-height: 1; }   /* v104b：line-height 1 防基线空隙撑高 */
.bid-month-head .ico svg { display: block; }
.bid-month-head .ico { color: var(--text-tertiary); flex: 0 0 auto; }
.bid-month-title { font-size: 15px; font-weight: var(--font-weight-semibold); color: var(--text-primary); letter-spacing: 0.2px; }
.bid-month-count {
  margin-left: auto; padding: 3px 12px; border-radius: 999px;
  background: var(--bg-surface-hover); border: 1px solid var(--border-subtle);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); color: var(--text-secondary); white-space: nowrap;
}
/* 移动端窄屏：分组头不换行、紧凑适配 */
@media (max-width: 767px) {
  .bid-list-tbl tr.bid-month-row td { padding: var(--space-8) 16px; }   /* v104：手机 16px 左右内边距与卡片对齐 */
  .bid-month-title { font-size: var(--font-size-base); }
}

/* ============ 投标详情卡片标题栏按钮对齐：actions 容器显式居中 + 按钮统一 32px inline-flex ============ */
.bid-detail .card .between .flex { align-items: center; }
.bid-detail .card .between .btn--sm {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: 0 12px;
  box-sizing: border-box;
  line-height: 1;
}
.bid-detail .card .between .btn--sm .ico { flex: 0 0 auto; }

/* 汇总底部说明（原 inline margin-top:10px 落成类，桌面视觉不变；手机端补充说明默认隐藏） */
.bid-sum-foot { margin-top: 10px; }
.bid-sum-foot-mobile { display: none; }

/* ============ 投标管理 v17：核心 10 字段 5 列 + 供应商联系方式 + 名称链接 ============ */
/* 供应商名称链接样式：正文色（黑）+ hover 下划线 + 单行省略（不破坏行高）；点击仍弹联系方式 */
.bid-sup-name-link {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary); font-weight: var(--font-weight-semibold); cursor: pointer; text-decoration: none; vertical-align: middle;
  font-size: var(--font-size-md);
}
.bid-sup-name-link:hover { text-decoration: underline; color: var(--text-primary); }

/* ============ 投标管理 v23：状态徽标 + 备注权限 + 基本信息网格 ============ */
/* 列表「状态」列绿色「已中标」徽标（对勾图标 + 文字，垂直居中、右对齐列尾） */
.bid-status-tag {
  display: inline-flex; align-items: center; gap: var(--space-4); vertical-align: middle;
  padding: 2px 10px; border-radius: 999px;
  background: var(--success-soft); color: var(--success);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); line-height: 1.5; white-space: nowrap;
}
.bid-status-tag--lost { background: rgba(160, 107, 120, 0.12); color: #a06b78; }
.bid-status-tag .ico { flex: 0 0 auto; }
/* 覆盖 app.css .data-tbl tbody td{vertical-align:top}：状态列徽标垂直居中 */
.data-tbl.bid-list-tbl tbody td { vertical-align: middle; }
.bid-list-tbl tr.log-row td { padding-top: 16px; padding-bottom: 16px; }   /* v143：行上下 16px（名称行高自然决定行高） */
.bid-del-link {
  min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--danger, #c0392b); font-size: 13px;
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  transition: background 160ms ease;
}
.bid-del-link:hover { background: rgba(192, 57, 43, 0.06); }
/* 详情页核心卡标题后的「已中标」徽标（与标题同行，略小） */
.bid-won-badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  background: var(--success-soft); color: var(--success);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); line-height: 1.6; vertical-align: middle;
}
/* 备注无权限：disabled 浅灰底 + 只读态 */
.bid-rem-ta--ro { background: var(--bg-subtle, rgba(31, 30, 29, 0.08)); color: var(--text-tertiary); cursor: not-allowed; opacity: 1; }
.bid-rem-ta--ro:disabled { -webkit-text-fill-color: var(--text-tertiary); }
/* 基本信息卡：字段值垂直方向中线对齐（行内高度一致） */
.basic-grid .basic-edit-view { display: flex; align-items: center; min-height: 30px; }

/* ============ 投标管理 v24：其他成本卡 + 汇总 5 格 ============ */
/* 其他成本：5 个金额字段均分一行（桌面），移动端单列折行 */
.bid-cost-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-12) 16px; }
/* v46：硬装费用卡 4 字段一行均分（桌面端 4 列，移动端单列堆叠） */
.bid-cost-grid--4 { grid-template-columns: repeat(4, 1fr); }
/* v60：硬装费用卡 6 字段 2 行×3 列（桌面端） */
.bid-cost-grid--3 { grid-template-columns: repeat(3, 1fr); }
/* v60：施工税/设计税只读小字（硬装费用卡内，实时刷新） */
.bid-hw-wrap { display: flex; flex-direction: column; gap: var(--space-10); }
.bid-hw-taxline { display: flex; gap: var(--space-24); flex-wrap: wrap; font-size: var(--font-size-xs); color: var(--text-tertiary); }
.bid-hw-taxitem b { color: var(--text-primary); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.bid-cost-field { min-width: 0; }
.bid-cost-label { font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 6px; text-align: center; }   /* v150.19（图4）：列内居中 */
.bid-cost-input { width: 100%; box-sizing: border-box; height: 36px; text-align: center; }
.bid-cost-read { font-size: 16px; font-weight: var(--font-weight-semibold); height: 36px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }   /* v150.19：与输入框等高 */
/* v58：自动值（税金/施工税/设计税）+ 自动标注 */
.bid-cost-auto { font-weight: var(--font-weight-semibold); }
.bid-cost-auto-value { color: var(--text-primary); }
.bid-cost-auto-tag { display: inline-block; font-size: 10px; font-weight: var(--font-weight-semibold); color: var(--primary); background: var(--bg-surface-hover); border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
/* v58：合同执行卡（仅已完成视图）——合同额大号加粗，保函/付款行栅格，375px 堆叠 */
.bid-contract-card { margin-bottom: 0; }
.bid-contract-inner { display: flex; flex-direction: column; gap: var(--space-16); }
.bid-contract-amount-row { display: flex; flex-direction: column; gap: var(--space-6); }
.bid-contract-amount-row .bid-cost-label { text-align: left; }
.bid-contract-amount-inp {
  width: 100%; box-sizing: border-box; height: 44px;
  font-size: 20px; font-weight: var(--font-weight-bold); color: var(--text-primary);
  padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-surface); font-variant-numeric: tabular-nums;
}
.bid-contract-amount-read { font-size: 22px; font-weight: var(--font-weight-bold); color: var(--text-primary); min-height: 44px; display: flex; align-items: center; }
.bid-bond { display: flex; flex-direction: column; gap: var(--space-8); }
.bid-bond-title { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); color: var(--text-primary); display: flex; align-items: center; gap: var(--space-8); }
/* v80c：.bid-bond-grid 权威定义移至文件末尾 v80b 节（display/gap/12 栏唯一来源，此处不再重复） */
.bid-contract-pays { display: flex; flex-direction: column; gap: var(--space-8); }
/* v80c：.bid-contract-pay-row 列模板由修饰类 --edit(7列)/--readonly(6列) 唯一提供（见 v80b 节），基础仅保留盒模型 */
.bid-contract-pay-row { display: grid; gap: var(--space-10) 14px; align-items: center; padding: var(--space-10) var(--space-12); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); }
.bid-contract-pay-amt { font-size: 16px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.bid-contract-check { display: inline-flex; align-items: center; gap: var(--space-6); font-size: var(--font-size-md); color: var(--text-secondary); cursor: pointer; user-select: none; white-space: nowrap; }
.bid-contract-check input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.bid-contract-total { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--primary); }
.bid-contract-sign { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: center; column-gap: var(--space-24); width: 100%; }
.bid-contract-sign .bid-cost-field { min-width: 0; }
.bid-contract-sign .bid-cost-label { text-align: left; }
.bid-contract-sign .bid-cost-read { justify-content: flex-start; }
.bid-contract-sign input.input { width: 100%; box-sizing: border-box; }
.bid-contract-sign > .bid-contract-check { justify-self: end; }
/* 汇总 5 格：3 列网格自动换行（第 2 行 2 格），移动端纵向堆叠（bid-sum 基类已 3 列） */
@media (max-width: 767px) {
  .bid-cost-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  /* v80c：.bid-bond-grid / .bid-contract-pay-row 移动端权威规则统一在 v80b 节，此处不再重复 */
  .bid-contract-sign { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-12); }
  .bid-contract-sign > .bid-contract-check { justify-self: start; }
  .bid-contract-amount-inp { font-size: 18px; }
}

/* 供应商联系方式弹窗：只读展示值（无编辑权限时） */
.bid-contact-view {
  padding: 9px 12px; border-radius: var(--radius-md); background: var(--bg-input); color: var(--text-primary);
  font-size: var(--font-size-base); min-height: 40px; display: flex; align-items: center; box-sizing: border-box;
  overflow-wrap: anywhere;
}

/* ============ 投标管理 v12：编辑弹窗招标方式间距 + 结果标记按钮 ============ */
/* radio 选项间距 ≥16px、radio-文字 6px、标签-选项 8px；选项组与开发商字段同行底边对齐 */
.bid-type-sel { gap: var(--space-16); padding-top: 8px; align-items: center; min-height: 40px; box-sizing: border-box; }
.bid-type-opt { gap: var(--space-6); }
/* 结果标记弹窗 radio 同规范 */
.bid-form .form-grid .form-field { align-self: start; }

/* ============ 公共 radio 规范（编辑弹窗招标方式 / 标记结果 及以后所有弹窗统一） ============ */
.radio-row { display: flex; flex-wrap: wrap; gap: var(--space-24); margin-top: 0; align-items: center; height: 40px; box-sizing: border-box; }
label.radio-option { display: inline-flex; align-items: center; gap: var(--space-8); cursor: pointer; font-size: 13.5px; color: var(--text-secondary); padding: 5px 10px; border-radius: var(--radius-sm); transition: background-color var(--motion-duration-fast) var(--ease-standard); user-select: none; height: auto; min-height: 20px; line-height: normal; white-space: nowrap; overflow: visible; margin-bottom: 0; font-weight: normal; }
label.radio-option:hover { background: var(--bg-subtle, rgba(31, 30, 29, 0.12)); }
label.radio-option input[type="radio"] { width: 15px; height: 15px; margin: 0; flex: 0 0 auto; }
/* v44：标记结果弹窗 —— 选项纵向堆叠。自包含：auto 高度 + min-height 兜底 + 完整内边距（上下 12px），
   并覆盖 .form-field label 的 height:18px / overflow:hidden / white-space:nowrap（该全局规则会压扁选项，已复发一次） */
.radio-stack { display: flex; flex-direction: column; gap: var(--space-10); }
.radio-stack label.radio-option--stack {
  display: flex;
  align-items: flex-start;
  gap: var(--space-10);
  height: auto;
  min-height: 48px;
  padding: var(--space-12);
  margin-bottom: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: normal;
  line-height: normal;
  white-space: normal;
  overflow: visible;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--motion-duration-fast) var(--motion-ease-standard), background-color var(--motion-duration-fast) var(--motion-ease-standard);
}
.radio-stack label.radio-option--stack:hover { background: var(--bg-subtle, rgba(31, 30, 29, 0.12)); }
.radio-stack label.radio-option--stack:has(input:checked) { border-color: var(--primary); background: var(--bg-subtle, rgba(31, 30, 29, 0.08)); }
.radio-stack label.radio-option--stack input[type="radio"] { width: 15px; height: 15px; margin: 3px 0 0; flex: 0 0 auto; }
.radio-opt-body { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.radio-opt-title { font-weight: var(--font-weight-bold); font-size: var(--font-size-base); color: var(--text-primary); line-height: 1.4; }
.radio-opt-desc { font-size: var(--font-size-xs); color: var(--text-secondary); line-height: 1.5; }

/* 手机版排序按钮：默认隐藏，仅 <768px 显示（桌面表头已可点击排序） */
.bid-sort-mob { display: none; }

/* ============ 手机版（<768px）适配专项：首页大数字 / 投标列表卡片 / 详情头部 / 品类供应商卡片 / 汇总堆叠 ============
   全部改动收敛在媒体查询内，桌面端（>1024px）不产生任何影响。 */
@media (max-width: 767px) {
  /* v27：弹窗左右各留 16px（不再贴边全宽），内容与按钮不贴屏幕边缘 */
  .modal { max-width: calc(100vw - 32px); margin: 0 16px; border-radius: var(--radius-xl); }
  /* ---- 1. 首页经营概览：大金额不溢出卡片 ---- */
  .home-fundamentals .trend-lead { gap: var(--space-10); }  .home-fundamentals .trend-lead .lead-num { font-size: clamp(20px, 6.8vw, 34px); min-width: 0; overflow-wrap: anywhere; }
  .home-fundamentals .ov--m-core .ov-delta { font-size: var(--font-size-sm); }
  .home-fundamentals .ov--m-core .ov-delta b { font-weight: var(--font-weight-semibold); overflow-wrap: anywhere; }
  .home-fundamentals .fb-metrics--2x2 .fb-m-value { font-size: clamp(15px, 4.4vw, 19px); }

  /* ---- 2. 投标列表：4 列表格 → 纵向卡片（月份分组头保留） ---- */
  .bid-sort-mob { display: inline-flex; }
  /* 手机版所有小按钮：inline-flex 双居中（文字不偏上/偏下） */
  .btn--sm { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-6); line-height: 1; }
  .bid-tbl-wrap { border: none; background: transparent; border-radius: 0; overflow: visible; }
  .bid-list-tbl { display: block; width: 100%; table-layout: auto; background: transparent; border: none; overflow: visible; }
  .bid-list-tbl thead { display: none; }
  .bid-list-tbl tbody { display: block; }
  .bid-list-tbl tbody tr { display: block; width: 100%; box-sizing: border-box; height: auto; }
  .bid-list-tbl tbody tr:hover { background: transparent; }
  /* iOS Safari keeps :hover after a tap; preserve the white card instead of
     exposing the page background. Selected rows keep their selected tint. */
  .bid-list-tbl tbody tr.log-row:not(.sel):hover { background: var(--bg-content); }
  /* 月份分组头：独立横幅 */
  .bid-list-tbl tr.bid-month-row { margin: 16px 2px 8px; border-radius: var(--radius-sm); padding: 0; }
  .bid-list-tbl tr.bid-month-row td { display: block; width: auto; padding: 9px 16px; }   /* v104：16px 与卡片对齐 */
  /* 月份分组头细节：图标透明无底块、与文字垂直居中；计数右对齐拉至最右端 */
  .bid-month-head { width: 100%; }
  .bid-month-head .ico { background: transparent; box-shadow: none; outline: none; border: none; display: inline-flex; align-items: center; line-height: 0; color: var(--text-tertiary); }
  .bid-month-head .ico svg { display: block; }
  .bid-month-head .ico svg, .bid-month-head .ico svg * { fill: none; }
  .bid-month-count { margin-left: auto; }
  /* 项目卡片 */
  .bid-list-tbl tr.log-row {
    background: var(--bg-content);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-12) 14px;
    margin-bottom: 10px;
  }
  .bid-list-tbl tr.log-row td { display: block; width: auto; border: none; padding: var(--space-4) 0; white-space: normal; }
  .bid-list-tbl tr.log-row td:first-child { padding-top: 0; }
  .bid-list-tbl tr.log-row td:first-child > div { display: inline; margin-right: 6px; }
  .bid-list-tbl tr.log-row td:not(:first-child) { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); }
  .bid-list-tbl tr.log-row td:not(:first-child)::before {
    content: attr(data-label);
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    flex: 0 0 auto;
  }
  .bid-list-tbl tr.log-row td.bid-wf-cell { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .bid-list-tbl tr.log-row td.bid-wf-cell::before { flex: 0 0 auto; }
  .bid-list-tbl tr.log-row td.bid-wf-cell .bid-wf-progress { width: 100%; min-width: 0; }
  .bid-list-tbl tr.log-row td.num, .bid-list-tbl tr.log-row td.c-c { text-align: left; }
  /* v28：操作列（删除按钮）卡片底部右侧，不挤压其他内容 */
  .bid-list-tbl tr.log-row td.bid-op-cell { justify-content: flex-end; }
  .bid-list-tbl tr.log-row td.bid-op-cell::before { content: none; }
  /* v29：手机版选择列（checkbox 卡片左上角，行选中时高亮卡片）；选中条吸底在 Dock 上方 */
  .bid-list-tbl tr.log-row td.bid-sel-cell { padding: 0 0 8px; }
  .bid-list-tbl tr.log-row td.bid-sel-cell::before { content: none; }
  .bid-list-tbl tr.log-row td.bid-sel-cell input[type=checkbox] { width: 20px; height: 20px; }
  .bid-list-tbl tr.log-row.sel { background: var(--bg-subtle, rgba(31, 30, 29, 0.1)); }
  .bid-selbar { bottom: 76px; width: calc(100vw - 32px); justify-content: space-between; }
  .bid-selbar-del { min-height: 44px; padding: 0 18px; }
  /* v30：取消选择按钮同样 ≥44px 可点区域 */
  .bid-selbar .btn--ghost { min-height: 44px; padding: 0 16px; }

  /* ---- 3. 投标详情头部：操作按钮移到标题下方单独一行 ---- */
  .bid-core-card .between { flex-direction: column; align-items: stretch; gap: var(--space-8); margin-bottom: 12px !important; }
  .bid-core-card .between .flex { width: 100%; flex-wrap: wrap; gap: var(--space-8); }
  .bid-core-card .between .btn--sm { flex: 1 1 auto; min-width: 84px; justify-content: center; }
  /* v18：数值字号桌面/移动端统一 16px/600（桌面基类已定义，此处仅保留徽标与标签的移动端微调） */
  .bid-core-cell .bid-core-label { font-size: var(--font-size-xs); color: var(--text-secondary); }

  /* ---- 4. 品类供应商：7 列网格 → 纵向卡片行 ---- */
  .bid-sup-head { display: none; }
  .bid-cat-head { flex-wrap: wrap; gap: var(--space-8); }
  .bid-cat-head .bid-cat-name { width: 100%; max-width: none; }
  .bid-cat-head .bid-cat-title { display: block; width: 100%; }
  .bid-sup-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      'cb name del'
      'quote quote quote'
      'rp rp rp'
      'rs rs rs'
      'rh rh rh';
    gap: var(--space-10) 10px;
    padding: var(--space-10) var(--space-4);
  }
  .bid-sup-grid > div { justify-content: flex-start; }
  .bid-sup-grid > div:first-child { grid-area: cb; justify-content: center; }
  .bid-sup-grid > div:nth-child(2) { grid-area: name; }
  .bid-sup-grid > div:nth-child(3) { grid-area: quote; }
  .bid-sup-grid > div:nth-child(4) { grid-area: rp; }
  .bid-sup-grid > div:nth-child(5) { grid-area: rs; }
  .bid-sup-grid > div:nth-child(6) { grid-area: rh; }
  .bid-sup-grid > div:nth-child(7) { grid-area: del; justify-content: flex-end; }
  /* 报价/备注字段：统一「标签行（tiny muted）在上 + 输入框 100% 在下」的上下结构，
     所有卡片字段顺序/标签样式/输入框宽度完全一致；不再左右并排（避免标签宽度差异导致输入框宽窄不一） */
  .bid-sup-grid > div[data-label] { flex-direction: column; align-items: stretch; gap: var(--space-4); }
  .bid-sup-grid > div[data-label]::before {
    content: attr(data-label);
    font-size: var(--font-size-2xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
  }
  .bid-sup-grid > div[data-label] > * { width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
  .bid-sup-grid .bid-rem-wrap { width: 100%; }
  .bid-sup-grid .bid-rem-wrap textarea { width: 100%; }
  /* 供应商卡片之间分隔线 */
  .bid-sup-grid + .bid-sup-grid { border-top: 1px solid var(--border-default); padding-top: 10px; }

  /* ---- 5. 汇总：三项统一「标签在上、数值/输入框在下」堆叠卡片 ---- */
  .bid-sum { flex-direction: column; gap: var(--space-12); align-items: stretch; }
  .bid-sum-cell { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-4); text-align: left; }
  .bid-sum-label { margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 「（已审批）/（手动）」手机端收进底部注释，标签保持单行短文案 */
  .bid-sum-label-note { display: none; }
  .bid-sum-value { text-align: left; }
  .bid-sum-input { text-align: left; height: 36px; }
  .bid-sum-foot { margin-top: 12px; }
  .bid-sum-foot-mobile { display: inline; }
}

/* ============================ v61：系统管理用户表自适应（T01）；v150.14：6 列列宽方案 ============================ */
/* v150.14 起用户表为 6 列（人员/部门岗位/账号状态/权限状态/最近登录/操作）——部门与角色合并为一列
   （此前两列显示相同内容）。「权限状态」由后端真实返回 allow/deny 计数（不再只显示「继承角色」）。
   6 列方案：col1-5 百分比合计 78% + col6 操作列 172px（sticky 右固定，见文件末 v150.13d 块）；
   ≤1280px 隐藏 col5 最近登录（v150.13c 媒体块）；≤720px 整表隐藏（手机卡片接管）。 */
.user-tbl.data-tbl { min-width: 0; width: 100%; table-layout: fixed; }
.user-tbl.data-tbl thead th, .user-tbl.data-tbl tbody td { padding: var(--space-10) var(--space-12); }
.user-tbl.data-tbl th:nth-child(1), .user-tbl.data-tbl td:nth-child(1) { width: 19%; overflow: hidden; }
.user-tbl.data-tbl th:nth-child(2), .user-tbl.data-tbl td:nth-child(2) { width: 17%; }
.user-tbl.data-tbl th:nth-child(3), .user-tbl.data-tbl td:nth-child(3) { width: 12%; }
.user-tbl.data-tbl th:nth-child(4), .user-tbl.data-tbl td:nth-child(4) { width: 19%; overflow: hidden; }
.user-tbl.data-tbl th:nth-child(5), .user-tbl.data-tbl td:nth-child(5) { width: 18%; }   /* v150.19：19/17/12/19/18+操作列，最近登录不被挤压 */

/* ============================ v136：用户表窄屏列宽修正（2026-09-17） ============================ */
/* v61 的列比例（操作列 14%≈50px）按桌面内容设计；390 视口下 50px 容纳不下
   「管理」按钮（btn--sm ≈60px），按钮溢出列后被页面 overflow-x:clip 裁切
   （用户实测右侧显示不全）。窄屏（≤720px）操作列固定 64px，其余列平分剩余
   空间（table-layout:fixed 语义）；列 1/4 的 ellipsis 截断保持不变。
   桌面（>720px）不受影响；perm-tbl 权限矩阵维持既有横向滚动方案。
   本块位于 v61 规则之后（同优先级靠源顺序胜出）。 */
@media (max-width: 720px) {
  .user-tbl.data-tbl th:nth-child(1), .user-tbl.data-tbl td:nth-child(1) { width: auto; }
  .user-tbl.data-tbl th:nth-child(2), .user-tbl.data-tbl td:nth-child(2) { width: auto; }
  .user-tbl.data-tbl th:nth-child(3), .user-tbl.data-tbl td:nth-child(3) { width: auto; }
  .user-tbl.data-tbl th:nth-child(4), .user-tbl.data-tbl td:nth-child(4) { width: auto; }
  .user-tbl.data-tbl th:nth-child(5), .user-tbl.data-tbl td:nth-child(5) { width: 64px; text-align: right; }
}
.user-tbl.data-tbl td > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================ v61：移动端预算表操作列固定（T02） ============================ */
/* 手机端预算列表为内部横向滚动宽表，删除入口默认在视口外且无提示。
   将操作列（末列）固定贴右缘：不改变滚动结构、不触发 document 级横滚，
   删除确认与 budget.delete 权限校验保持不变。 */
@media (max-width: 767px) {
  /* collapse 模式下 Chromium 中单元格 sticky 失效，需切换 separate（原表无垂直分隔线，视觉不受影响） */
  .budget-list-tbl { border-collapse: separate; border-spacing: 0; overflow-x: visible; }
  /* v61：sticky 单元格自身 overflow 必须 visible（全局 ellipsis 规则使其 hidden 时 sticky 不吸附） */
  .budget-list-tbl th:last-child,
  .budget-list-tbl td:last-child {
    position: sticky;
    overflow: visible;
    white-space: nowrap;
    right: 0;
    z-index: 1;
    background: var(--bg-surface, #fff);
    box-shadow: -10px 0 14px -12px rgba(0, 0, 0, 0.35);
  }
  .budget-list-tbl thead th:last-child { background: var(--bg-surface-hover, #eee); z-index: 2; }
  .budget-list-tbl tbody tr:hover td:last-child { background: var(--bg-surface, #fff); }
  /* 固定列显式宽度：table-layout:fixed 下 sticky 列可能被压成 0 宽导致按钮溢出 */
  .budget-list-tbl th:last-child,
  .budget-list-tbl td:last-child { width: 64px; min-width: 64px; max-width: 64px; text-align: center; }
}
/* v61：移动端预算表滑动提示（仅手机端显示；桌面宽表自然展示无需提示） */
.m-scroll-hint { display: none; }
@media (max-width: 767px) {
  .m-scroll-hint { display: block; margin-bottom: 6px; font-size: var(--font-size-xs); color: var(--text-tertiary); text-align: center; background: var(--bg-surface-hover, rgba(31, 30, 29, .08)); border-radius: var(--radius-sm); padding: 7px 10px; }
}

/* ============================ v63：移动端触控区域 + 可访问性 ============================ */

/* T05：键盘焦点清晰且克制（未删除系统 outline 前提下统一样式） */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ---- T01：分段控制器（首页趋势切换等）每项命中高度 ≥40px ---- */
@media (max-width: 767px) {
  .segment button {
    min-height: 40px;
    padding: 0 12px;
  }
  .segment button.active {
    font-weight: var(--font-weight-medium);
  }

  /* ---- T01：删除文字按钮——视觉紧凑不变，整行命中高度 ≥40px ---- */
  .bid-del-link,
  .proj-tbl .bid-del-link,
  .budget-list-tbl .bid-del-link {
    display: inline-block;
    min-height: 40px;
    line-height: 40px;
    padding: 0 8px;
    vertical-align: middle;
  }

  /* ---- T01：列表复选框——命中区 40×40，图形保持 20px（appearance:none 自绘） ----
     覆盖范围：投标(.bid-sel-*) / 项目·预算(.sel-head/.sel-cell) 表头与行内 */
  .bid-list-tbl .bid-sel-head input[type='checkbox'],
  .bid-list-tbl .bid-sel-cell input[type='checkbox'],
  .proj-tbl th.sel-head input[type='checkbox'],
  .proj-tbl td.sel-cell input[type='checkbox'],
  .budget-list-tbl th.sel-head input[type='checkbox'],
  .budget-list-tbl td.sel-cell input[type='checkbox'] {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
  }
  .bid-list-tbl .bid-sel-head input[type='checkbox']::before,
  .bid-list-tbl .bid-sel-cell input[type='checkbox']::before,
  .proj-tbl th.sel-head input[type='checkbox']::before,
  .proj-tbl td.sel-cell input[type='checkbox']::before,
  .budget-list-tbl th.sel-head input[type='checkbox']::before,
  .budget-list-tbl td.sel-cell input[type='checkbox']::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-xs);
    background: var(--bg-surface) center / 13px no-repeat;
  }
  .bid-list-tbl .bid-sel-head input[type='checkbox']:checked::before,
  .bid-list-tbl .bid-sel-cell input[type='checkbox']:checked::before,
  .proj-tbl th.sel-head input[type='checkbox']:checked::before,
  .proj-tbl td.sel-cell input[type='checkbox']:checked::before,
  .budget-list-tbl th.sel-head input[type='checkbox']:checked::before,
  .budget-list-tbl td.sel-cell input[type='checkbox']:checked::before {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  /* ---- T01：「我的」页演示身份初始化链接命中高度 ---- */
  .m-page a[href='#/init'] {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }
}

/* v63：移动端触控——以同等/更高优先级收口此前散落的尺寸覆盖 */
@media (max-width: 767px) {
  /* 按钮类统一 ≥40px 命中高度（主/次/文字/排序/筛选） */
  .d-page .btn,
  .m-page .btn,
  .filter-btn {
    min-height: 40px;
  }
  /* 投标列表选择框：压过上方 20px 规则，命中区 40×40、图形 20px 自绘 */
  .bid-list-tbl tr.log-row td.bid-sel-cell input[type='checkbox'],
  .bid-list-tbl .bid-sel-head input[type='checkbox'],
  .budget-list-tbl tr.log-row td.sel-cell input[type='checkbox'] {
    width: 40px;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    background: transparent;
    display: inline-grid;
    place-content: center;
  }
  .bid-list-tbl tr.log-row td.bid-sel-cell input[type='checkbox']::before,
  .bid-list-tbl .bid-sel-head input[type='checkbox']::before,
  .budget-list-tbl tr.log-row td.sel-cell input[type='checkbox']::before {
    content: '';
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-xs);
    background: var(--bg-surface) center / 13px no-repeat;
  }
  .bid-list-tbl tr.log-row td.bid-sel-cell input[type='checkbox']:checked::before,
  .bid-list-tbl .bid-sel-head input[type='checkbox']:checked::before,
  .budget-list-tbl tr.log-row td.sel-cell input[type='checkbox']:checked::before {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* v63：移动端顶栏（topbar）内按钮同样满足 40px 命中高度 */
@media (max-width: 767px) {
  .topbar .btn { min-height: 40px; padding: 0 14px; }
}

/* ============================ v68：移动端触控收口 ============================ */
/* 首页统计时间按钮：命中高度 44px，图标/文字/箭头垂直居中 */
@media (max-width: 767px) {
  .range-btn { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================ v62：消息中心 ============================ */
.msg-list { display: flex; flex-direction: column; gap: var(--space-10); }
.msg-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-16); padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); transition: background-color var(--motion-duration-fast) var(--ease-standard); }
.msg-item:hover { background: var(--bg-surface-hover); }
.msg-item--expired { border-color: rgba(236, 115, 115, 0.35); }
.msg-title-row { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.msg-proj { color: var(--text-primary); font-weight: var(--font-weight-semibold); text-decoration: none; }
.msg-proj:hover { text-decoration: underline; }
.msg-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.msg-amount { font-size: 15px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.msg-unread { width: 8px; height: 8px; border-radius: 50%; background: #ec7373; display: inline-block; flex: 0 0 auto; }
.msg-level { font-size: var(--font-size-2xs); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.msg-level--warning { background: var(--warning-soft); color: var(--warning); }
.msg-level--critical { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 767px) {
  .msg-item { flex-direction: column; align-items: stretch; }
  .msg-right { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ============================ v62/#4+#6：列表名防重叠（付款行列模板已收口至 v80b 节） ============================ */
/* v80c：v62 付款行 6 列 / v71 付款行 7 列的历史模板已删除，唯一权威见文件末尾 --edit/--readonly 修饰类 */
/* v141：列表项目名防重叠旧规则（flex 横排 + nowrap/ellipsis）已删除——名称区改为三层纵向结构，见文件末尾 v141 段 */

/* v62/#5：文件栏目拖拽高亮 */
.bid-file-group.drag-over { outline: 2px dashed var(--border-strong); outline-offset: -6px; border-radius: var(--radius-md); background: var(--bg-surface-hover); }
/* v62/#9 保函到期警示标签（红系小标签） */
.bid-valid-warn { margin-left: 4px; }

/* ============================ v71/#1+#3：联系人对齐 & 付款行 7 列 ============================ */
/* 联系人行内输入框与供应商表/变动记录同规格（32px 高、8px 圆角、13px 字号） */
.bid-client-row .input { height: 32px; min-height: 32px; font-size: var(--font-size-md); border-radius: var(--radius-sm); box-sizing: border-box; }
.bid-client-row textarea.input { height: auto; min-height: 32px; line-height: 1.45; }
/* v80c：v71 付款行 7 列历史模板已删除，唯一权威见文件末尾 --edit 修饰类 */

/* 联系人地址 textarea：以同排单行输入框为基准，文字居中；换行后由 autoGrow 扩展 */
.bid-client-row textarea.input.bid-client-address {
  height: 32px;
  min-height: 32px;
  line-height: 1.45;
  padding: 5px 12px;
  overflow: hidden;
  resize: none;
}

/* ============================ v69：回收站 ============================ */
.trash-tbl {
  width: 100%;
  min-width: 1258px;   /* v81：固定列和 978 + 名称列保底 280（不足时容器内横滚，sticky 操作列保持） */
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}
/* v81：列宽由 colgroup 单源承担（原 th:nth 九条宽度规则删除，防双源漂移） */
.trash-tbl td, .trash-tbl th { vertical-align: middle; }
.trash-tbl th:last-child,
.trash-tbl td.op-cell {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--bg-content);
  border-left: 1px solid var(--border-subtle);   /* v81：单条淡分隔线（原 -1px shadow 与边框叠加成粗竖线） */
}
.trash-tbl th:last-child { background: var(--bg-surface); }
.trash-tbl tbody tr:hover td.op-cell { background: var(--bg-surface-hover); }
.trash-tbl td.op-cell { white-space: nowrap; }
.trash-tbl td.op-cell .btn + .btn { margin-left: 6px; }
/* v81：名称两行稳定规格（主名 14/20/500 省略 + 批次 12/18 弱色），宽度由名称列控制 */
.trash-tbl .trash-name { max-width: none; min-width: 0; width: 100%; }
.trash-tbl .trash-name > div:first-child {
  font-size: var(--font-size-base); line-height: 20px; font-weight: var(--font-weight-medium);
  color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trash-tbl .trash-name .tiny {
  font-size: var(--font-size-xs); line-height: 18px; font-weight: var(--font-weight-regular);
  color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.trash-tbl thead th { height: 44px; }   /* v81：table 前缀提特异性，稳定覆写 .data-tbl thead th 40px */
.trash-tbl td.op-cell .btn + .btn { margin-left: 8px; }
.toast-action { margin-left: 12px; border: none; background: rgba(255,255,255,.16); color: inherit; padding: var(--space-4) var(--space-12); border-radius: var(--radius-xs); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); cursor: pointer; }
.toast-action:hover { background: rgba(255,255,255,.26); }
.toast--error .toast-action { background: rgba(0,0,0,.12); }
.trash-purge { color: var(--danger); }
@media (max-width: 767px) {
  .trash-tbl .btn--sm { min-height: 40px; }
}

/* ==================== v77：回收站批量操作 + 消息铃铛 ==================== */
/* 状态筛选 tabs（克制设计：文本 + 下划线 active） */
.trash-filters { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-16); }
/* v81：13px/500、高 34、active 600；text-shadow 恒定微描边使字重切换不产生宽度跳动 */
.trash-filter-tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-secondary); padding: 7px 12px; font-size: 13px; font-weight: 500; line-height: 20px; cursor: pointer;
  text-shadow: 0.35px 0 0 currentColor;
  border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
  transition: color var(--motion-fast, 120ms) var(--ease-out, ease-out);
}
.trash-filter-tab:hover { color: var(--text-primary); }
.trash-filter-tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 600; }
.trash-filter-tab:focus-visible { outline: 2px solid var(--accent, #6b7cff); outline-offset: 1px; }

/* 批量工具栏（40–44px，出现/消失 140ms 小动效） */
/* v81：隐藏时不占位（display:none），出现用 keyframe（原 opacity 占位导致 tabs→表格 64px 空白） */
.trash-bulkbar {
  display: none; align-items: center; gap: var(--space-10); flex-wrap: wrap;
  min-height: 42px; padding: var(--space-6) var(--space-12); margin-bottom: var(--space-16);
  border: 1px solid var(--border); border-radius: var(--radius-md, 10px);
  background: var(--surface-sunken, var(--surface, transparent));
}
.trash-bulkbar.visible {
  display: flex; pointer-events: auto;
  animation: trashBulkIn 140ms var(--ease-out, ease-out);
}
@keyframes trashBulkIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .trash-bulkbar.visible { animation: none; }
}
.trash-bulk-count { font-size: var(--font-size-md); font-weight: var(--font-weight-medium); color: var(--text-primary); }

/* 多选列 */
.trash-select-col { width: 34px; text-align: center; }
.trash-select-col input[type='checkbox'] { width: 15px; height: 15px; cursor: pointer; }
.trash-select-col input[type='checkbox']:focus-visible { outline: 2px solid var(--accent, #6b7cff); outline-offset: 2px; }
.trash-tbl tbody tr:hover .trash-select-col { background: transparent; } /* hover 不覆盖 checkbox 状态 */

/* 消息铃铛（桌面 + 移动端全局顶栏） */
.topbar-message-btn { position: relative; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.topbar-message-btn:focus-visible { outline: 2px solid var(--accent, #6b7cff); outline-offset: 2px; }
.topbar-message-btn:active { opacity: 0.75; }
.topbar-message-btn.has-unread { color: var(--accent, #6b7cff); }
.message-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-sm);
  background: var(--danger, #e5484d); color: #fff;
  font-size: 10px; font-weight: var(--font-weight-semibold); line-height: 16px; text-align: center;
  pointer-events: none;
}

/* ============================================================
 * v81 — 选择控件与列表选中态统一
 * 选择是品牌交互状态，不借用 info 蓝色；成功/警告/危险色只表达业务语义。
 * ============================================================ */
:root {
  --control-accent: var(--brand-primary);
  --control-accent-text: var(--accent-primary-text);
  --control-selected-bg: var(--bg-selected);
  --control-focus-ring: var(--border-focus);
}

/* 回收站筛选、消息入口与表单控件使用同一品牌交互色。 */
.trash-filter-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--control-accent);
}
.trash-filter-tab:focus-visible,
.topbar-message-btn:focus-visible {
  outline-color: var(--control-focus-ring);
}
.topbar-message-btn.has-unread { color: var(--control-accent); }

/* 桌面表格与移动卡片共用同一 40px 命中区、20px 图形和勾选颜色。 */
.bid-list-tbl .bid-sel-head input[type='checkbox'],
.bid-list-tbl .bid-sel-cell input[type='checkbox'],
.proj-tbl th.sel-head input[type='checkbox'],
.proj-tbl td.sel-cell input[type='checkbox'],
.budget-list-tbl th.sel-head input[type='checkbox'],
.budget-list-tbl td.sel-cell input[type='checkbox'],
.trash-select-col input[type='checkbox'],
.trash-card input[type='checkbox'] {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-grid;
  place-content: center;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
}

.bid-list-tbl .bid-sel-head input[type='checkbox']::before,
.bid-list-tbl .bid-sel-cell input[type='checkbox']::before,
.proj-tbl th.sel-head input[type='checkbox']::before,
.proj-tbl td.sel-cell input[type='checkbox']::before,
.budget-list-tbl th.sel-head input[type='checkbox']::before,
.budget-list-tbl td.sel-cell input[type='checkbox']::before,
.trash-select-col input[type='checkbox']::before,
.trash-card input[type='checkbox']::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
}

.bid-list-tbl .bid-sel-head input[type='checkbox']:checked::before,
.bid-list-tbl .bid-sel-cell input[type='checkbox']:checked::before,
.proj-tbl th.sel-head input[type='checkbox']:checked::before,
.proj-tbl td.sel-cell input[type='checkbox']:checked::before,
.budget-list-tbl th.sel-head input[type='checkbox']:checked::before,
.budget-list-tbl td.sel-cell input[type='checkbox']:checked::before,
.trash-select-col input[type='checkbox']:checked::before,
.trash-card input[type='checkbox']:checked::before {
  border-color: var(--control-accent);
  background: var(--control-accent);
  background-image: none;
}

.bid-list-tbl .bid-sel-head input[type='checkbox']:checked::after,
.bid-list-tbl .bid-sel-cell input[type='checkbox']:checked::after,
.proj-tbl th.sel-head input[type='checkbox']:checked::after,
.proj-tbl td.sel-cell input[type='checkbox']:checked::after,
.budget-list-tbl th.sel-head input[type='checkbox']:checked::after,
.budget-list-tbl td.sel-cell input[type='checkbox']:checked::after,
.trash-select-col input[type='checkbox']:checked::after,
.trash-card input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 6px;
  left: 15px;
  top: 15px;
  box-sizing: border-box;
  border-left: 2px solid var(--control-accent-text);
  border-bottom: 2px solid var(--control-accent-text);
  transform: rotate(-45deg);
  transform-origin: center;
}

.bid-list-tbl input[type='checkbox']:focus-visible,
.proj-tbl input[type='checkbox']:focus-visible,
.budget-list-tbl input[type='checkbox']:focus-visible,
.trash-select-col input[type='checkbox']:focus-visible,
.trash-card input[type='checkbox']:focus-visible {
  outline: 2px solid var(--control-focus-ring);
  outline-offset: 1px;
  border-radius: var(--radius-xs);
}

.bid-list-tbl tr.log-row.sel,
.proj-tbl tr.log-row.sel,
.budget-list-tbl tr.log-row.sel,
.bid-list-tbl tbody tr:has(.bid-sel-cell input[type='checkbox']:checked),
.proj-tbl tbody tr:has(.sel-cell input[type='checkbox']:checked),
.budget-list-tbl tbody tr:has(.sel-cell input[type='checkbox']:checked),
.trash-tbl tbody tr:has(.trash-select-col input[type='checkbox']:checked) {
  background: var(--control-selected-bg);
}

.trash-card:has(input[type='checkbox']:checked) {
  background: var(--control-selected-bg);
  border-color: var(--border-strong);
}

/* 选择列表的勾选态只绘制一个标准勾号；覆盖旧版 ::after 勾号，避免叠成乱码。 */
.bid-list-tbl .bid-sel-head input[type='checkbox']:checked::before,
.bid-list-tbl .bid-sel-cell input[type='checkbox']:checked::before,
.proj-tbl th.sel-head input[type='checkbox']:checked::before,
.proj-tbl td.sel-cell input[type='checkbox']:checked::before,
.budget-list-tbl th.sel-head input[type='checkbox']:checked::before,
.budget-list-tbl td.sel-cell input[type='checkbox']:checked::before,
.trash-select-col input[type='checkbox']:checked::before,
.trash-card input[type='checkbox']:checked::before {
  background-color: var(--control-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}
.bid-list-tbl .bid-sel-head input[type='checkbox']:checked::after,
.bid-list-tbl .bid-sel-cell input[type='checkbox']:checked::after,
.proj-tbl th.sel-head input[type='checkbox']:checked::after,
.proj-tbl td.sel-cell input[type='checkbox']:checked::after,
.budget-list-tbl th.sel-head input[type='checkbox']:checked::after,
.budget-list-tbl td.sel-cell input[type='checkbox']:checked::after,
.trash-select-col input[type='checkbox']:checked::after,
.trash-card input[type='checkbox']:checked::after {
  content: none !important;
}
@media (max-width: 480px) {
  .message-badge { top: -2px; right: -2px; } /* 390px：角标不被裁剪 */
}
@media (prefers-reduced-motion: reduce) {
  .trash-bulkbar { transition: none; }
  .trash-filter-tab { transition: none; }
}

/* ==================== v79：保函有效期范围（开始—结束） ==================== */
/* v80c：.bid-validity-* 旧规则（flex-end 基线/堆叠子标签/128px 定宽）已删除，权威见 v80b 节 */
@media (prefers-reduced-motion: reduce) {
  .bid-validity-warn { transition: none; animation: none; }
}

/* ============================================================
   v80 — 弹窗骨架 / 表单栅格 / 分组 / 单位 / 响应式
   在 theme.css 末尾追加，对所有 openModal 调用方生效。
   设计原则（来自任务规范）：
   - 标题固定顶部 / 内容独立滚动 / 底部操作区固定
   - 12 栏栅格，桌面双栏，平板/手机单栏
   - 标签 8px 间距、字段高 40px、单位明确
   - 背景滚动锁、单一滚动容器
   ============================================================ */

/* ----- 弹窗骨架：flex 列、头/体/脚分离 ----- */
.modal {
  display: flex;
  flex-direction: column;
  padding: 0;                       /* 覆盖 glass.css 的 22px 20px 24px */
  overflow: hidden;                 /* 覆盖 glass.css 的 overflow-y: auto */
  scrollbar-gutter: stable;
}
.modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-16) var(--space-24) 14px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 0;                 /* 覆盖 glass.css 的 14px */
}
.modal-head .title { font-size: 16px; font-weight: var(--font-weight-bold); color: var(--text-primary); }
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-20) var(--space-24) 24px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.modal-foot {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-12);
  padding: 14px 24px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.modal-foot .btn { min-height: 40px; }
/* 桌面端 760px 宽体弹窗（表单密集场景）；<768px 仍占满宽度 */
@media (min-width: 768px) {
  .modal--lg { max-width: 760px; }
}

/* ----- 12 栏栅格（与 glass.css 既有 .form-grid 1fr 1fr 区分） ----- */
.form-grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-16);
}
.f-span6  { grid-column: span 6; }
.f-span12 { grid-column: span 12; }
@media (max-width: 767px) {
  .form-grid12 { grid-template-columns: 1fr; }
  .f-span6, .f-span12 { grid-column: auto; }
}

/* ----- 业务分组（fieldset/legend 等价语义，使用 div + role 即可避免 reset） ----- */
.form-section {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}
.form-section:first-child { border-top: 0; padding-top: 4px; margin-top: 0; }
.form-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-tertiary);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.form-section .form-grid12 + .form-grid12 { margin-top: 10px; }

/* ----- 字段统一间距 / 控件高 ----- */
.bid-form { padding: 0; }           /* 覆盖原 padding，间距由栅格/字段自身控制 */
.bid-form .form-field { margin-bottom: 0; }
.bid-form .form-grid12 > .form-field { margin-bottom: 0; }
.form-field label { margin-bottom: 8px !important; }  /* 覆盖 theme.css 10px → 8px */
/* 单选组高度对齐输入框：父级 form-field 显式控制纵向节奏 */
.form-field .radio-row { margin-top: 0; }

/* ----- 输入框单位后缀（金额元 / 比例 %） ----- */
.field-unit { position: relative; }
.field-unit .input { padding-right: 36px; }
.field-unit .unit {
  position: absolute;
  right: 12px;
  top: 0;
  height: 40px;
  line-height: 40px;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  pointer-events: none;
  user-select: none;
}
.field-unit .input[readonly],
.field-unit .input:disabled { background: var(--bg-content); color: var(--text-secondary); }

/* ----- 文本域（地址/备注） ----- */
textarea.input {
  min-height: 72px;
  padding: var(--space-10) var(--space-12);
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
textarea.input--auto { resize: none; overflow: hidden; }  /* 自增高 */

/* ----- 联动框：与触发单选保持在同一分组内 ----- */
.mode-linked {
  margin-top: 10px;
  padding: var(--space-12) var(--space-12) 14px;
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.mode-linked.is-hidden { display: none; }
.mode-linked .form-field { margin-bottom: 0; }
.mode-linked .form-field label { margin-bottom: 6px !important; font-size: var(--font-size-xs); }

/* ----- 单选组无障碍语义：把 .radio-row 升级为 radiogroup ----- */
[role="radiogroup"] .radio-row { display: flex; flex-wrap: wrap; gap: var(--space-16) 24px; align-items: center; }

/* ----- 保证金分段模式：横向紧凑（segment + input 同列） ----- */
.deposit-mode {
  display: flex;
  align-items: stretch;
  gap: var(--space-8);
}
.deposit-mode .segment { flex: 0 0 auto; min-width: 156px; padding: 3px; }
.deposit-mode .segment button { padding: var(--space-6) var(--space-10); font-size: var(--font-size-sm); }
.deposit-mode .field-unit { flex: 1 1 auto; min-width: 0; }
.deposit-mode .field-unit .input { height: 40px; }

/* ----- 390px 移动端：字段全部单栏，单位/segment 不被挤压 ----- */
@media (max-width: 480px) {
  .modal-head { padding: 14px 16px 12px; }
  .modal-body { padding: var(--space-16) var(--space-16) 20px; }
  .modal-foot { padding: var(--space-12) var(--space-16); }
  .deposit-mode { flex-direction: column; align-items: stretch; }
  .deposit-mode .segment { width: 100%; }
  [role="radiogroup"] .radio-row { gap: var(--space-12) 16px; }
}

/* ----- 减少动效：尊重系统偏好（不破坏 reduced-motion） ----- */
@media (prefers-reduced-motion: reduce) {
  .modal-foot, .form-section, .mode-linked { transition: none; }
}

/* ============================================================
   v80b — 合同执行：保函行 12 栏栅格 / 日期范围组件 / 集中状态 / 付款行唯一模板
   ============================================================ */

/* ----- 保函行：金额 4 栏 │ 比例 2 栏 │ 有效期 6 栏（两组保函共用同一模板） ----- */
/* v80c：唯一权威定义（原 1931 行 repeat(3,1fr) 旧规则已删除并入此处） */
.bid-bond-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-12) 16px;
  align-items: start;
}
.bid-bond-grid .bid-cost-field--amount   { grid-column: span 4; min-width: 0; }
.bid-bond-grid .bid-cost-field--rate     { grid-column: span 2; min-width: 0; }
.bid-bond-grid .bid-cost-field--validity { grid-column: span 6; min-width: 0; }
.bid-bond-grid .bid-cost-label { margin-bottom: 6px; }
.bid-bond-grid .input { height: 40px; box-sizing: border-box; }  /* 原生日期控件与文本输入等高 */
.bid-bond-grid .bid-cost-input { width: 100%; min-width: 0; }

/* 状态行：固定槽位（min-height），出现/消失不推挤控件行 */
.bid-bond-status {
  min-height: 20px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: var(--space-10);
  flex-wrap: wrap;
  font-size: var(--font-size-xs);
}
.bid-bond-fielderr { color: var(--danger, #e5484d); font-size: var(--font-size-xs); }
.bond-status { font-size: var(--font-size-xs); }
.bond-status--error { color: var(--danger, #e5484d); font-weight: var(--font-weight-semibold); }
.bond-status--warn  { color: #d97706; }
.bond-status--info  { color: var(--text-tertiary); }
.bond-status--muted { color: var(--text-tertiary); }
.bond-status--dirty { color: #d97706; }   /* v80c：尚未保存 */

/* 日期范围组件：[开始日期] 至 [结束日期]，垂直居中、不拆散、不换行（桌面） */
/* v80c：display:flex 并入权威规则（原 2438 行旧块已删除，避免再依赖"后写覆盖"） */
.bid-validity-range { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--space-8); }
.bid-validity-cell { flex: 1 1 0; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: var(--space-6); }
.bid-validity-sub { flex: 0 0 auto; font-size: var(--font-size-xs); color: var(--text-tertiary); white-space: nowrap; }
.bid-validity-cell .input { flex: 1 1 auto; width: 100%; min-width: 0; height: 40px; }
.bid-validity-sep { flex: 0 0 auto; align-self: center; padding-bottom: 0; color: var(--text-tertiary); }
.bid-validity-range.is-invalid .input {
  border-color: var(--danger, #e5484d);
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.12);
}
@media (max-width: 767px) {
  .bid-bond-grid { grid-template-columns: 1fr; }
  .bid-bond-grid .bid-cost-field--amount,
  .bid-bond-grid .bid-cost-field--rate,
  .bid-bond-grid .bid-cost-field--validity { grid-column: auto; }
}
@media (max-width: 480px) {
  .bid-validity-range { flex-direction: column; align-items: stretch; }
  .bid-validity-sep { text-align: center; }
}

/* ----- 付款行：唯一权威模板。编辑态 7 列 / 只读态 6 列（无空白操作列） ----- */
/* v80c：原基础 5 列 + v62 6 列 + v71 7 列历史模板已全部删除，此处为唯一来源 */
@media (min-width: 768px) {
  .bid-contract-pay-row--edit {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1fr) auto auto auto;
  }
  .bid-contract-pay-row--readonly {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1fr) auto auto;
  }
  .bid-contract-pay-row .bid-cost-field { min-width: 0; }
  .bid-contract-pay-row .input { height: 36px; box-sizing: border-box; }
  .bid-contract-check { display: inline-flex; align-items: center; gap: var(--space-6); white-space: nowrap; }
  .bid-contract-check input[type="checkbox"] { margin: 0; flex: 0 0 auto; vertical-align: middle; }
  .bid-contract-pay-row--edit .bid-contract-pay-del { justify-self: center; }
  .bid-contract-pay-amt { text-align: right; }
}
@media (max-width: 767px) {
  .bid-contract-pay-row--edit,
  .bid-contract-pay-row--readonly {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-8);
    border-color: var(--border-subtle);
    border-radius: var(--radius-md);
  }
  .bid-contract-pay-row--edit .bid-contract-pay-del { justify-self: end; }
}

/* ============================================================
   v80d — Typography Token / 控件字体继承 / 状态与禁用态统一
   ============================================================ */
:root {
  --font-size-xs: 12px;
  --font-size-sm: 12.5px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
}
/* 原生控件（含 Safari date）继承页面字体栈，禁止浏览器默认字体 */
button, input, select, textarea { font-family: inherit; }
/* 禁用/只读：颜色降级但保持可读，禁止低 opacity 或 Safari text-fill 灰 */
input:disabled, input[readonly], textarea:disabled, textarea[readonly], select:disabled {
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  opacity: 1;
}
/* 合同执行区同级标签/子标签/分隔符/状态：同一字号字重体系 */
.bid-cost-label,
.bid-validity-sub {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-tertiary);
}
.bid-validity-sep { font-size: var(--font-size-xs); font-weight: var(--font-weight-regular); }
.bond-status { font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); }
.bond-status--error { font-weight: var(--font-weight-medium); }  /* v80d：状态仅以颜色区分，字重统一 */
/* v80f：bid-basic-fields / basic-info-value 随六类字段上移摘要卡而删除（孤儿规则清零） */

/* ============================================================
   v80g — 首页纯视觉品质升级（Linear 克制 / Stripe 数据层级）
   原则：只收敛视觉层级，不动信息架构 / 布局比例 / 业务逻辑
   ============================================================ */

/* ----- Elevation Token（v80n）：层级由组件语义决定，禁止按 col-4/col-8 列宽判级 -----
   --elevation-flat   嵌套结构容器：无阴影，仅边框+背景
   --elevation-card   同级业务数据卡 / 仪表盘卡：统一克制轻阴影
   --elevation-overlay Modal/Popover/Dropdown/Toast 浮层
   深色主题使用独立克制阴影（见下方 [data-theme='dark'] 覆盖），不照搬浅色 rgba */
:root {
  --elevation-flat: 0 0 0 rgba(0, 0, 0, 0);
  --elevation-card: 0 1px 1px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.08);
  --elevation-overlay: 0 12px 32px rgba(0, 0, 0, 0.28);   /* 值保持：原 modal/dropdown/dock 主流浮层阴影 */
}
[data-theme='dark'] {
  /* FIX-08：深色主题状态语义变量（对比度校准） */
  --status-doing: #7fa8e8;
  --status-doing-soft: rgba(127, 168, 232, 0.16);
  --status-done: #63b88c;
  --status-done-soft: rgba(99, 184, 140, 0.16);
  --elevation-card: 0 0 0 1px rgba(255, 255, 255, 0.045), 0 8px 24px rgba(0, 0, 0, 0.42);
  --elevation-overlay: 0 12px 32px rgba(0, 0, 0, 0.28);   /* 值保持：dark 暂与浅色一致 */
}
.ov {
  box-shadow: var(--elevation-card);
}
/* 同一仪表盘内所有一级卡（经营摘要/趋势/部门项目数量/合同金额排名）使用同一阴影语言 */
.cockpit > * > .card,
.cockpit > .card {
  box-shadow: var(--elevation-card);
}

/* ----- Sidebar：active 增加方位提示条（无悬浮阴影），hover 反馈收敛 ----- */
.s-item.active {
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.72);
}
.s-item {
  transition: color 160ms ease, background-color 160ms ease;
}

/* ----- Topbar：标题降重 + 权威背景（bg-topbar 而非 content 色） ----- */
.d-topbar {
  background: var(--bg-topbar);
  padding: 0 32px;   /* v88：1440+ 32px；1024–1439 24px；<1024 16px（见下方媒体查询） */
}
.d-title {
  /* v88：顶栏标题统一 16px/600/24px 行高（任务规格） */
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  line-height: 24px;
  color: var(--text-primary);
}
.d-topbar .icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }   /* v91：铃铛 36×36（60px 工具栏配比） */
.d-topbar .tb-avatar { width: 36px; height: 36px; }   /* v88：头像 36×36 */
@media (min-width: 1024px) and (max-width: 1439px) { .d-topbar { padding: 0 24px; } }
@media (max-width: 1023px) { .d-topbar { padding: 0 16px; } }

/* ----- Segmented control：密度收敛 + active 轻阴影 ----- */
.segment { padding: 3px; }
.segment button {
  min-height: 24px;
  padding: 0 10px;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.segment button:hover { background: rgba(255, 255, 255, 0.045); }
.segment button.active {
  background: var(--bg-surface-active);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* ----- 筛选控件：边框降为 control 级（0.09），hover 提亮 ----- */
.range-btn, .scope-badge {
  border-color: rgba(255, 255, 255, 0.09);
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.range-btn:hover, .scope-badge:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* ----- 交互状态：按钮轻微按压反馈（侧栏菜单项与列表行不缩放） ----- */
button { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
button:active { transform: scale(0.985); }
.s-item:active, .rank-item:active, .stage-item:active { transform: none; }

/* ----- 焦点可见性：双环 focus ring（深色底上清晰且克制） ----- */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 4px rgba(132, 151, 255, 0.55);
  border-radius: var(--radius-sm);
}

/* ----- Spinner：低对比（轨道弱、转动色 tertiary），减少眩光 ----- */
.spinner {
  border: 3px solid var(--border-default);
  border-top-color: var(--text-tertiary);
}

/* ----- 减少动态效果：全局尊重系统偏好 ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================= v80h：三主题系统优化 ========================= */

/* ----- 浅色主题阴影微调：暖纸底上深色基准阴影偏重，单独覆盖为更轻 ----- */
[data-theme='light'] {
  --shadow-sm: 0 2px 8px rgba(31, 30, 29, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 30, 29, 0.06);
  --shadow-overlay: 0 16px 48px rgba(31, 30, 29, 0.12);
}

/* ----- 主题切换过渡（180ms，仅具体属性，禁 transition:all）。
   说明：后写覆盖上方 button 150ms 规则，全站统一 180ms；
   .reduce-motion（glass.css）与 prefers-reduced-motion 均以 !important 压制，兼容无冲突 ----- */
body,
.d-sidebar,
.d-topbar,
.card,
.segment,
button,
input,
select,
textarea {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

/* ==================== v80i：全站排版一致性收口 ====================
   1) Typography Tokens：全站语义字号/字重/行高收敛到 :root 变量（层级逻辑与现状一致）
   2) 详情字段行高统一：.bid-core-value 显式 22px（消除 CJK 回退字体 normal 行高差 17/18/20px）
   3) 数字等宽：金额/比率 tabular-nums
   4) 字重收敛：数值强调 800 → 700（禁止 800/900）
   说明：仅几何与排版收敛，不改颜色/主题逻辑/信息架构 */
:root {
  --font-page-title-size: 18px;  --font-page-title-line: 26px;  --font-page-title-weight: 600;
  --font-object-title-size: 16px; --font-object-title-line: 24px; --font-object-title-weight: 650;
  --font-card-title-size: 15px;  --font-card-title-line: 22px;  --font-card-title-weight: 600;
  --font-section-title-size: 13px; --font-section-title-line: 20px; --font-section-title-weight: 600;
  --font-body-size: 14px;        --font-body-line: 22px;        --font-body-weight: 400;
  --font-field-value-size: 14px; --font-field-value-line: 22px; --font-field-value-weight: 500;
  --font-label-size: 12px;       --font-label-line: 18px;       --font-label-weight: 400;
  --font-table-header-size: 13px; --font-table-header-line: 20px; --font-table-header-weight: 500;
  --font-meta-size: 12px;        --font-meta-line: 18px;        --font-meta-weight: 400;
}

/* 详情字段：标签/值行高显式化——值行固定 22px，普通文本、CJK、空值「—」、内嵌 Tag 全部一致 */
.bid-core-label,
.basic-label {
  font-size: var(--font-label-size);
  line-height: var(--font-label-line);
  font-weight: var(--font-label-weight);
}
.bid-core-value {
  font-size: var(--font-field-value-size);
  line-height: var(--font-field-value-line);
  font-weight: var(--font-field-value-weight);
  min-height: var(--font-field-value-line);
}
/* 数字等宽：金额、比率、汇总输入 */
.num,
.bid-core-value,
.bid-sum-value,
.bid-sum-input {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
/* 字重收敛：数值强调 800 → 700（保持 19px 汇总强调层级，仅去除超规范字重） */
.bid-sum-value { font-weight: var(--font-weight-bold); }
.bid-margin-pos, .bid-margin-neg { font-weight: var(--font-weight-bold); }

/* ==================== v80j：排版收尾（日志表格 / 表头统一 / Segment 语义） ==================== */

/* ---- P1 操作记录表（#/logs）：fixed 布局 + colgroup 列宽 + 摘要两行截断 ----
   根因：全局 td { white-space: nowrap }（app.css:394）+ table-layout:auto + 摘要无截断，
   长 JSON/无空格串把「修改摘要」列撑到 4000+px。
   修复：仅限定 .data-tbl--logs；摘要列吃剩余宽度（min-width 1080 下 ≥346px），
   两行截断防撑高，完整内容经 title 悬停 + 行点击详情抽屉查看，不隐藏业务数据。 */
.data-tbl--logs { table-layout: fixed; }
.data-tbl--logs thead th { white-space: normal; }
.data-tbl--logs tbody td { white-space: normal; overflow-wrap: anywhere; }
.data-tbl--logs .col-summary { color: var(--text-secondary); }
.data-tbl--logs .clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---- P2 表头统一 40px：原 app.css 10px 与 8px 两套 padding 自然计算出 40/34.5/33.5 三种高度 ----
   统一为显式 40px（12px/500/18px 行高/水平 12px），数据行 64px 规则不受影响。 */
.data-tbl { border-collapse: separate; border-spacing: 0; }   /* v80o：collapse 下 fixed 表 th 高度会多计 1px；separate 全局统一（视觉无差，边框由 td border-bottom 承担） */
.data-tbl thead th {
  height: 40px;
  padding: 0 12px;
  line-height: 18px;
  vertical-align: middle;
  border-bottom: none;                                            /* v80o：border 在 fixed 布局下计盒外致 41px；改用 inset shadow 画线，全站 th 恒 40 */
  box-shadow: inset 0 -1px 0 var(--border-default);
}

/* ---- P2 Segment 语义固化（字重已在 glass.css 统一为 500，选中态由背景+文字色表达） ----
   尺寸档位：
   - 默认档 24px 内衬（容器 32px）：用户菜单主题切换器等小容器（v80g 密度收敛）
   - 30px 档（容器 34px）：首页趋势条 .fb-trend-bar .segment button（卡片内指标切换）
   - 36px：FilterButton（工具栏筛选，非 Segment 体系）
   禁止页面私设高度；aria-pressed 由共享 Segment() 组件统一输出。 */

/* ---- v80j 补正：white-space:normal 不应继承进表格内 Tag；截断行高压紧；筛选按钮显式 36px ---- */
.data-tbl--logs .tag { white-space: nowrap; }
.data-tbl--logs .clamp-2 { line-height: 16px; }
.filter-btn { height: 36px; }

/* ---- v80k 补正：值行 flex 居中——22px 内嵌 Tag 的 inline 基线对齐会把行盒撑高 ~1.3px ---- */
.bid-core-value { display: flex; align-items: center; flex-wrap: wrap; }

/* ---- v80n：Space Token（值=现行实际值，纯等价替换；gap 已迁移，padding 复合值后续收编） ---- */
:root {
  --space-4: 4px; --space-6: 6px; --space-8: 8px; --space-10: 10px;
  --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px;
}

/* ---- v80k：Typography Token 迁移补全（与 v80d :root 合并；值=现行实际值，纯等价替换） ---- */
:root {
  --font-size-2xs: 11.5px;
  --font-size-md: 13px;
  --font-weight-bold: 700;
}

/* ==================== v80m：执行方式信息完整化（详情 + 编辑弹窗） ==================== */

/* ---- 详情页：执行方式字段各占 1/2 行（四列网格跨 2 列）；≤767 单列（组栅格已有 1fr 断点） ---- */
.bid-core-cell--wide { grid-column: span 2; }
@media (max-width: 767px) { .bid-core-cell--wide { grid-column: auto; } }

/* 方式值容器：tag + 地址/链接 + 操作，顶部对齐支持多行地址；min-width:0 防撑破栅格 */
.mode-detail { display: flex; align-items: flex-start; gap: var(--space-6); flex-wrap: wrap; min-width: 0; }
/* 地址全文：完整展示、自然换行、禁止省略号；字号继承普通详情值 14px/500 */
.mode-addr { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
/* 线上链接：视觉可截断（宽度受限 + 省略号），完整值由 title 与复制提供 */
.mode-link { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 22px mini 操作按钮：与值行同高，不撑高字段值行（区别于 .btn 36/32 档） */
.bid-mini-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); background: transparent;
  font-size: var(--font-size-2xs); font-weight: var(--font-weight-medium);
  color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  font-family: inherit; text-decoration: none;
  transition: background-color var(--motion-duration-fast) var(--ease-standard), color var(--motion-duration-fast) var(--ease-standard);
}
.bid-mini-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.bid-mini-btn:disabled { opacity: 0.45; cursor: not-allowed; }
a.bid-mini-btn { text-decoration: none; }

/* ---- 编辑弹窗：执行方式分组（两组间 20px；条件输入区轻色语义分组） ---- */
.mode-group + .mode-group { margin-top: 20px; }
.mode-group .mode-linked {
  margin-top: 12px; padding: var(--space-12);
  background: var(--bg-subtle, rgba(31, 30, 29, 0.08));
  border: 1px solid var(--border-subtle, rgba(31, 30, 29, 0.14));
  border-radius: var(--radius-sm);
}
/* 地址 textarea：72–88px 起步、随内容自动增高、160px 封顶内部滚动（高度由 JS growTextarea 控制） */
.mode-addr-textarea { min-height: 72px; max-height: 160px; overflow-y: auto; resize: vertical; line-height: 1.6; }
/* URL 失焦校验失败态（红框提示；保存仍由后端 safeHttpUrlOrNull 白名单把关） */
.input-invalid { border-color: var(--danger) !important; }
.input-invalid:focus { outline-color: var(--danger); }

/* ---- v80m 补正：汇报方式 → 标书递交方式 两组间 20px（语义分组强调；其余 section 保持 6px 节奏） ---- */
.form-section--mode { margin-top: 20px; }

/* ==================== v80n：响应式可达性（趋势紧凑态 / 回收站卡片 / sticky 操作列） ==================== */

/* ---- P2-03：单周期趋势紧凑态——不伪装完整趋势，高度随数据状态收缩 ---- */
.trend-empty {
  padding: 28px 0 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--font-size-md);
}
.trend-empty .trend-empty-val { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); color: var(--text-primary); margin-bottom: 4px; font-variant-numeric: tabular-nums; }

/* ---- P1-04：回收站移动端卡片（与桌面表格同一数据源/同一选中集合） ---- */
.trash-cards { display: grid; gap: var(--space-10); }
.trash-card {
  display: flex; flex-direction: column; gap: var(--space-8);
  padding: var(--space-12) 14px;
  background: var(--bg-content);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  min-width: 0;
}
.trash-card .tc-top { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; min-width: 0; }
.trash-card .tc-top .trash-select-all--m { flex: 0 0 auto; }
.trash-card .tc-name { min-width: 0; font-weight: var(--font-weight-semibold); color: var(--text-primary); overflow-wrap: anywhere; }
.trash-card .tc-name .tiny { font-weight: var(--font-weight-regular); }
.trash-card .tc-meta { min-width: 0; }
.trash-card .tc-ops { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.trash-card .tc-ops .btn { min-height: 36px; }
.trash-card .tc-reason { color: var(--text-tertiary); }

/* ---- P2-01/P2-02：平板/窄桌面宽表——操作列 sticky + 可发现横滑（hint 由 JS 侧量后显示） ---- */
.m-scroll-hint { padding: 2px 2px 6px; }
@media (max-width: 1199px) {
  /* border-collapse: collapse 会使 td position:sticky 失效——sticky 列需要 separate（行边框由 td border-bottom 承担，视觉不变） */
  .proj-tbl, .budget-list-tbl { border-collapse: separate; border-spacing: 0; }
  .proj-tbl thead th:last-child,
  .proj-tbl td.op-cell,
  .budget-list-tbl thead th:last-child,
  .budget-list-tbl td.op-cell {
    position: sticky;
    right: 0;
    z-index: 1;
    width: 96px; min-width: 96px;   /* sticky+auto 布局会使无显式宽度的列塌缩为 0 */
    background: var(--bg-content);
    box-shadow: -1px 0 0 var(--border-default);
  }
  .proj-tbl thead th:last-child,
  .budget-list-tbl thead th:last-child { background: var(--bg-surface); }
  .data-tbl tbody tr:hover td.op-cell { background: var(--bg-surface-hover); }
}

/* ---- v80n：Modal 结构化滚动——body 内滚、Header/Footer 常驻可见（原整弹窗滚动，手机端 footer 被推出视口） ---- */
.modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.modal-foot { flex: 0 0 auto; }

/* ---- v83 收编：移动端 Segment 命中区（原 v80n 双重定义 40px 与 v83 块 36px 冲突，统一由 v83 块承担） ---- */

/* ==================== v80o：表格首列与两行文本规格 ==================== */
.proj-tbl .cell-name, .budget-list-tbl .cell-name {
  font-size: 14px; line-height: 20px;   /* v80o 规格：名称 14/20 */
  font-weight: var(--font-weight-semibold);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-tbl .cell-sub, .budget-list-tbl .cell-sub {
  font-size: var(--font-size-xs); line-height: 18px;
  font-weight: var(--font-weight-regular); color: var(--text-tertiary);
}
.proj-tbl td.num, .budget-list-tbl td.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
/* 首页标题行：copy 左、筛选右，同一 header 行，压缩大片空白 */
.home-heading { margin-bottom: 14px; align-items: center; }
.home-heading .page-heading-title { margin: 0; }
.home-heading .page-heading-subtitle { margin-top: 2px; }

/* ==================== v80o：表格首列宽度体系 ==================== */
/* fixed 布局下名称列 auto 轨道会被其余固定列总和挤压为 0（1024 实测）——
   名称 col 显式 220px + 表格 min-width 保底，窄容器由 .tbl-wrap 内部横滚（sticky 操作列已就位） */
.data-tbl--fixedmin { min-width: 1150px; }
/* budget colgroup 总和 990px——min-width 取 990 避免等比放大（fixed 布局下 col 宽随 min-width 比例缩放） */
.budget-list-tbl.data-tbl--fixedmin { min-width: 994px; }   /* 990 + 表格左右边框 4px，保证名称列内容 ≥220 */
.proj-tbl td:nth-child(2) > div:first-child,
.budget-list-tbl td:nth-child(2) > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-base);
  line-height: 20px;
  font-weight: var(--font-weight-medium);
}
.proj-tbl td:nth-child(2) .tiny,
.budget-list-tbl td:nth-child(2) .tiny {
  font-size: var(--font-size-xs);
  line-height: 18px;
  font-weight: var(--font-weight-regular);
  color: var(--text-tertiary);
}

/* ---- v80s 补正：桌面端搜索框命中区（T03 意图全局化）——原 .search input 无 padding/height 定义，
   裸奔 19px 高（触控不达标、与 43px 容器不匹配）；input 铺满容器、容器改由 input 撑高 ---- */
.search { padding-top: 0; padding-bottom: 0; }
.search input {
  height: 100%;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---- v80s 补正：桌面端搜索框命中区（T03 意图全局化）——原 .search input 无 padding/height 定义，
   裸奔 19px 高（触控不达标、与 43px 容器不匹配）；input 铺满容器、容器改由 input 撑高 ---- */
.search { padding-top: 0; padding-bottom: 0; }
.search input {
  height: 100%;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---- v80v：顶栏标题升级 h1 语义后的 UA margin 清零 ---- */
.d-title { margin: 0; }

/* ---- v80v 补正：顶栏无标题（topbarTitle=''）时 d-topbar 单子元素在 space-between 下靠左——
   操作区恒靠右（菜单下拉因此落入侧栏区域被遮挡的根因） ---- */
.d-actions { margin-left: auto; }

/* ==================== v81：回收站表格卡（单套边框 + 紧凑数据模块） ==================== */
.trash-table-card { padding: 0 !important; overflow: hidden; }   /* 表格贴卡边，圆角由卡 overflow 裁切 */
.trash-table-card .tbl-wrap { border: none; border-radius: 0; background: transparent; }
.trash-table-card .data-tbl thead th { background: var(--bg-surface); }
.trash-content { margin-top: 0; }

/* ---- v81：首页 PageHeader 分界线 + 到指标卡 16px（原 mb 14，缺分界） ---- */
.home-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-16);
}

/* ---- v81：logs 数据对象名单行省略（长名不撑行，行高稳定 64） ---- */
.data-tbl--logs .clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== v140：操作日志表格重排（类型/数据对象/摘要列不再重叠） ====================
   根因：类型列 84px + .data-tbl--logs .tag { white-space: nowrap }——长英文标识
   （contract_tax_add / workflow_task_update 等 15-21 字符）溢出单元格侵入数据对象列；
   旧策略（clamp-1 单行省略 + 行高压紧 64px）无法承载双行信息。
   v140 策略：类型列中文映射为主文案（tag）、等宽技术标识次行（可换行、轻底、受限本列）；
   数据对象主名完整换行 + 技术定位次行弱化；行高自适应（td 上下 14px + vertical-align: top）。 */
.data-tbl--logs tbody td {
  padding: 14px 12px;
  vertical-align: top;
  line-height: 20px;
}
.data-tbl--logs thead th { vertical-align: middle; }   /* 表头仍居中，与首行基线视觉一致 */
.data-tbl--logs td.vert-mid { vertical-align: middle; } /* 操作端/结果单行内容垂直居中 */
.data-tbl--logs .log-time { white-space: nowrap; }
.data-tbl--logs .log-time .tiny { line-height: 16px; }
/* 类型列：中文 tag 主行 + 等宽技术标识次行（任意位置可换行、绝不越出本列） */
.log-type-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 17px;
  color: var(--text-secondary);
  background: var(--bg-surface, rgba(127, 127, 127, 0.08));
  border-radius: 6px;
  padding: 2px 6px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  margin-top: 4px;
}
.data-tbl--logs .tag { white-space: nowrap; }   /* 中文短 tag 保持单行（映射后不再有长标识） */
/* 数据对象：主名完整换行（替换 v81 单行省略）；次行技术定位弱化（对象类型与编号分列显示） */
.data-tbl--logs .log-obj-name {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 500;
}
.data-tbl--logs .log-obj-tech {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-tertiary);
  overflow-wrap: anywhere;
  word-break: break-all;
  margin-top: 4px;
}
/* 摘要：3 行截断 + 展开/收起（默认人类可读摘要，展开看全部变更字段） */
.data-tbl--logs .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 18px;
}
.log-sum-toggle { margin-top: 6px; }

/* ---- v140：手机端操作日志卡片（label-value 结构，替代桌面表格压缩） ---- */
.log-card { padding: 16px; }
.log-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.log-card-head .log-type-code { margin-top: 4px; }
.log-card-kv { display: flex; gap: 12px; margin-top: 12px; font-size: 13px; line-height: 20px; }
.log-card-kv .k { flex: 0 0 64px; color: var(--text-tertiary); }
.log-card-kv .v { flex: 1; min-width: 0; color: var(--text-primary); overflow-wrap: anywhere; word-break: break-word; }
.log-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-subtle, rgba(127,127,127,0.14)); }
.log-card-toggle {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  background: none; border: none; color: var(--primary, #1677ff); cursor: pointer; font-size: 13px;
}

/* ==================== v82：列表工具栏搜索/筛选垂直对齐统一 ====================
   统一尺寸标准：搜索容器与 Segment 外框同为 42px（border-box）、圆角 10、边框 1px；
   Segment 按钮 34px；图标 20px 槽位 + line-height:0 消除 inline baseline 偏移；
   focus 单一化：容器 focus-within 品牌环，input 自身不再绘制第二层。 */

/* 1) 搜索框内部：图标去 baseline 偏移（实测 icon 中心偏上 1.5px，根因 inline svg descender） */
.search .ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex: 0 0 auto; }
.search .ico svg { display: block; }

/* 2) 搜索框 input：focus 单一化（容器环代替 UA 双层框） */
.search input { outline: none; }
.search input:focus,
.search input:focus-visible { outline: none; box-shadow: none; }
.search:focus-within {
  border-color: var(--control-accent);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* 3) 列表工具栏 Segment：外框 42 / 按钮 34（与搜索框同中心线） */
.pt-row .segment,
.pt-seg .segment {
  display: inline-flex;
  align-items: center;
  height: 42px;
  min-height: 42px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 10px;
}
.pt-row .segment button,
.pt-seg .segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 20px;
  box-sizing: border-box;
}
.pt-row .segment button.active,
.pt-seg .segment button.active { font-weight: var(--font-weight-medium); }

/* ---- v82 根因修复：.search 遗留 margin-bottom 12px（glass 旧单列布局产物）计入 flex 居中计算，
   使搜索框与同行筛选器中心线错位 6px——工具栏语境下清除 ---- */
.pt-row .search, .pt-seg .search { margin-bottom: 0; }

/* ==================== v83：趋势卡片头部专项（Card Header 统一） ====================
   根因：.fb-trend-bar 旧样式 display:block + margin-bottom:8px——margin 计入 card-head 的
   flex 居中计算，使 Segment 本体相对标题中心偏上 4px。改为 flex 行内控件 + 零 margin，
   尺寸收敛为紧凑规格（外框 36 / 按钮 28），Card Header 到图表 ≥20px。 */
.fb-trend-bar {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.fb-trend-bar .segment {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: 36px;
  min-height: 36px;
  padding: 3px;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--bg-surface);
}
.fb-trend-bar .segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  box-sizing: border-box;
}
.fb-trend-bar .segment button.active { font-weight: 600; }
/* Card Header 到图表 20px（仅趋势卡：head 内含 fb-trend-bar） */
.card-head:has(.fb-trend-bar) { margin-bottom: 20px; }
/* 移动端：标题一行、Segment 第二行可横滚、触控 ≥36 */
@media (max-width: 767px) {
  .fb-trend-bar { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .fb-trend-bar::-webkit-scrollbar { display: none; }
  .fb-trend-bar .segment button { min-height: 36px; }
}

/* ==================== v83：首页趋势卡头部（Card Header 统一 + 紧凑 Segment 权威规格） ====================
   权威定义（文件尾后序覆盖，避免 app.css 434 的 34/30px 旧档与文件中部历史规则再竞争）：
   卡片内边距 22/24/24；Card Header 24px 到图表；Segment 36/3/9 + 按钮 28/6/13px。 */

.trend-card { padding: 22px 24px 24px; }
.trend-card .card-head { margin-bottom: 20px; }
.fb-trend-bar .segment {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: 36px;
  min-height: 36px;
  padding: 3px;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--bg-surface);
}
.fb-trend-bar .segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}
.fb-trend-bar .segment button.active { font-weight: 600; }
@media (max-width: 767px) {
  .trend-card .card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }
  .trend-card .fb-trend-bar { width: 100%; max-width: 100%; overflow-x: auto; }
}

/* ==================== v84：统一分页（回收站 / 操作日志） ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  margin-top: 14px;
}
.pagination-total {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.pagination-pages { display: inline-flex; align-items: center; gap: 4px; }
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pagination-btn:hover:not(:disabled) { background: var(--bg-surface-hover); color: var(--text-primary); }
.pagination-btn.active {
  border-color: var(--border-default);
  background: var(--bg-surface-active);
  color: var(--text-primary);
  font-weight: 600;
}
.pagination-btn:disabled { color: var(--text-tertiary); opacity: .45; cursor: default; }
@media (max-width: 767px) {
  .pagination { align-items: flex-start; flex-direction: column; gap: 8px; overflow-x: auto; }
  .pagination-pages { min-width: max-content; }
  .pagination-btn { width: 36px; height: 36px; min-height: 36px; }
}

/* ==================== v84：首页图表（Donut / HBar / Combo） ==================== */
.chart-card { padding: 22px 24px 24px; }
.donut-body { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut-left { flex: 0 0 auto; }
.donut-center-num { font-size: 30px; font-weight: var(--font-weight-semibold); fill: var(--text-primary); font-variant-numeric: tabular-nums; }
.donut-center-label { font-size: 11px; fill: var(--text-tertiary); }
.donut-track { stroke: var(--chart-bar-track); }
.donut-seg { transition: stroke-dasharray 220ms var(--ease-out, ease-out); }
.donut-c-doing { stroke: var(--chart-donut-doing); }
.donut-c-done { stroke: var(--chart-donut-done); }
.donut-legend { display: flex; flex-direction: column; gap: 12px; min-width: 150px; flex: 1 1 auto; }
.donut-legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.donut-legend-item .donut-dot.donut-c-doing { background: var(--chart-donut-doing); }
.donut-legend-item .donut-dot.donut-c-done { background: var(--chart-donut-done); }
.donut-legend-label { min-width: 3em; }
.donut-legend-num { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: var(--font-weight-medium); color: var(--text-primary); }
.donut-legend-pct { width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-tertiary); }
/* Combo */
/* v150.42：趋势组合图限宽收敛——col-12 全宽下 SVG 等比 ~412px 过高；720px → ~270px。
   限容器（非仅 svg）：.chart-combo-head 图例随图收窄不错位；空态 140px 规则（特异性更高）不受影响 */
.chart-combo { max-width: min(720px, 100%); margin: 0 auto; }
.chart-combo-head { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg-bar { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-legend .lg-line { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.chart-trend-main-wrap { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
}

/* ==================== v84：消息中心（任务 / 消息 双栏目） ==================== */
.messages-page { display: flex; flex-direction: column; }
.messages-tabs, .messages-subtabs { display: flex; gap: var(--space-8); margin-bottom: var(--space-16); }
.messages-subtabs { margin-bottom: var(--space-12); }
.tab-btn {
  background: transparent; border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  color: var(--text-secondary); padding: 8px 16px; font-size: 13px; font-weight: 500; line-height: 20px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  transition: background-color var(--motion-fast, 120ms) ease, color var(--motion-fast, 120ms) ease, border-color var(--motion-fast, 120ms) ease;
}
.tab-btn:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
.tab-btn.active { color: var(--text-primary); background: var(--bg-surface-active); border-color: var(--border-strong); font-weight: 600; }
.tab-btn:focus-visible { outline: 2px solid var(--control-focus-ring, var(--border-focus)); outline-offset: 1px; }
.tab-btn--sub { padding: 6px 12px; min-height: 34px; border-radius: var(--radius-xs, 6px); }
.tab-count { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-tertiary); }
.tab-btn.active .tab-count { color: var(--text-secondary); }
.task-row {
  display: grid; grid-template-columns: 76px 1fr 210px 96px; align-items: center; gap: 14px;
  padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); min-height: 64px;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--bg-surface-hover); }
.task-row--done .task-title { color: var(--text-tertiary); }
.task-main { min-width: 0; }
.task-title { font-size: 14px; font-weight: var(--font-weight-medium); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; flex-direction: column; gap: 2px; }
.task-op { text-align: right; }
.task-op .btn { min-width: 72px; }
.empty-line { text-align: center; padding: 40px 0; }
.empty-line-title { font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }
.msg-actions { display: flex; justify-content: flex-end; margin-bottom: var(--space-12); }
@media (max-width: 767px) {
  .task-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .task-meta { flex-direction: row; gap: 12px; }
  .task-op { text-align: left; }
  .task-op .btn { min-width: 0; width: 100%; min-height: 36px; }
}

/* ==================== v85：联系人 5 列 + 付款计划结构化 ==================== */
/* 联系人：所属部门 160 / 姓名 180 / 电话 220 / 地址 剩余 / 操作 40（覆盖 1819 行 4 列模板）——v99b：仅桌面生效（手机单列由 1841 断点管理，此规则曾无 media 包裹导致手机溢出） */
@media (min-width: 768px) {
  .bid-client-tbl-head, .bid-client-row { grid-template-columns: 160px 180px 220px 1fr 40px; }
}
.bid-client-cell .input { text-overflow: ellipsis; }
/* 付款计划：次序(120+类型行) / 完成节点(flex) / 占比 110 / 付款额 170 / 计划时间 150 / 已收 64 / 已开票 64 / 操作 44 */
.bid-contract-pay-row--edit {
  grid-template-columns: 150px minmax(260px, 1.4fr) 100px 170px 152px 64px 64px 44px;
}
.bid-contract-pay-row--readonly { grid-template-columns: 150px minmax(260px, 1.4fr) 100px 170px 152px 64px 64px; }
.bid-pay-seq { gap: 2px; }
.bid-pay-seq-no { font-size: 13px; font-weight: var(--font-weight-semibold); color: var(--text-primary); white-space: nowrap; }
.bid-pay-total--warn { color: var(--danger, #e5484d); }
.bid-pay-date { min-height: 32px; }
.bid-pay-name { min-height: 28px; font-size: 12px; }
/* 移动端：单列卡片化（次序/类型 → 节点 → 占比 → 金额 → 时间 → checkbox → 删除） */
@media (max-width: 767px) {
  .bid-contract-pay-row--edit, .bid-contract-pay-row--readonly { grid-template-columns: 1fr; gap: 10px; padding: 14px 12px; }
  .bid-pay-seq-no { font-size: 14px; }
  .bid-contract-pay-row--edit .bid-contract-pay-del, .bid-contract-pay-row--readonly .bid-contract-pay-del { justify-self: end; }
  .bid-contract-check { min-height: 40px; }
  .bid-pay-date { min-height: 40px; }
}

/* ==================== v86：付款计划统一 9 列网格 + 消息 Tab 居中规格 ==================== */
/* 表头与行共用同一模板（任务§四：不允许两套宽度） */
.bid-pay-grid {
  display: grid;
  grid-template-columns: 108px minmax(120px, 0.8fr) minmax(220px, 1.6fr) 96px 170px 148px 72px 72px 48px;
  column-gap: 12px;
  align-items: center;
}
.bid-pay-grid--head {
  min-height: 42px;
  padding: 0 var(--space-12);
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-default);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  font-size: 12px; font-weight: var(--font-weight-medium); line-height: 20px; color: var(--text-tertiary);
}
.bid-pay-grid--head .ta-r { text-align: right; }
.bid-pay-grid--head .ta-c { text-align: center; }
.bid-contract-pay-row { min-height: 64px; padding: 10px var(--space-12); border: none; border-bottom: 1px solid var(--border-subtle); background: transparent; }
.bid-contract-pay-row:last-of-type { border-bottom: none; }
.bid-contract-pay-row .bid-cost-input { height: 38px; box-sizing: border-box; }
.bid-pay-cell { min-width: 0; }
.bid-pay-cell .input { width: 100%; text-overflow: ellipsis; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.bid-contract-pay-amt { font-variant-numeric: tabular-nums; font-weight: var(--font-weight-semibold); }
.bid-pay-rate-input { text-align: right; font-variant-numeric: tabular-nums; }
.bid-pay-del { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-tertiary); border-radius: var(--radius-sm); cursor: pointer; justify-self: center; }
.bid-pay-del:hover { background: rgba(229, 72, 77, 0.08); color: var(--danger, #e5484d); }
.bid-pay-cb { justify-content: center; min-height: 36px; }
.bid-pay-cb input[type='checkbox'] { width: 18px; height: 18px; margin: 0; }
.bid-pay-summary { display: inline-flex; align-items: center; gap: 14px; margin-left: auto; }
.bid-pay-summary-amt { font-size: 13px; color: var(--text-secondary); }
.bid-pay-summary-amt b { font-variant-numeric: tabular-nums; color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.bid-pay-add { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--border-default); border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; margin-top: var(--space-8); }
.bid-pay-add:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.bid-pay-add:focus-visible { outline: 2px solid var(--control-focus-ring, var(--border-focus)); outline-offset: 1px; }
/* 只读态金额弱背景统一 */
.bid-contract-pay-row--readonly .bid-contract-pay-amt { padding: 0 10px; }
/* ==================== v91：消息中心双层导航（一级下划线 / 二级胶囊） ==================== */
/* 一级：下划线式（容器 44px + 底部淡分隔线；无灰底无边框按钮） */
.messages-tabs { height: 44px; min-height: 44px; display: flex; align-items: stretch; gap: 32px; margin-bottom: 12px; border-bottom: 1px solid var(--border-subtle); }
.messages-tabs .tab-btn { min-width: 0; height: 44px; min-height: 44px; padding: 0 4px; border: none; border-radius: 0; background: transparent; font-size: 14px; font-weight: 500; position: relative; }
.messages-tabs .tab-btn:hover { background: transparent; color: var(--text-primary); }
.messages-tabs .tab-btn.active { background: transparent; border: none; font-weight: 600; color: var(--text-primary); }
.messages-tabs .tab-btn.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 999px; background: var(--text-primary); }
/* 二级：轻量胶囊（36-40；透明底 + subtle 边框；active 轻填充） */
.messages-subtabs { margin-bottom: var(--space-20); }
.messages-subtabs .tab-btn--sub { height: auto; min-height: 44px; padding: 8px 14px; border-radius: 8px; font-size: 13px; line-height: 1; background: transparent; border: 1px solid var(--border-subtle); gap: 6px; }   /* v103：44px 统一触控 + line-height 1 */
.messages-subtabs .tab-btn--sub:hover { border-color: var(--border-default); background: var(--bg-surface-hover); }
.messages-subtabs .tab-btn--sub.active { background: var(--bg-surface-active, var(--bg-surface-hover)); border-color: var(--border-default); font-weight: 600; color: var(--text-primary); }
@media (max-width: 767px) {
  .bid-pay-grid { grid-template-columns: 1fr; gap: 10px; }
  .bid-pay-grid--head { display: none; }
  .bid-contract-pay-row { min-height: 0; padding: 14px 12px; }
  .bid-pay-cell .input { width: 100%; }
  .bid-contract-check { min-height: 40px; }
}

/* v86 补正：窄视口容器内滚动（minmax 被压破导致列重叠裁切）+ 表格卡片化 */
.bid-contract-pays { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: 10px; }
.bid-contract-pays .bid-pay-grid { min-width: 1120px; }
.bid-contract-pays .bid-pay-grid--head { background: var(--bg-surface-subtle); }
@media (max-width: 767px) {
  .bid-contract-pays { overflow-x: visible; border: none; border-radius: 0; }
  .bid-contract-pays .bid-pay-grid { min-width: 0; }
}

/* ==================== v87：付款节点舒展卡 + 保函三态 ==================== */
/* .payment-node-list 唯一权威定义见 v92 payrow 段 */
.payment-node { padding: 16px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-content); }
.payment-node-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.payment-node-title { font-size: 15px; font-weight: var(--font-weight-semibold); line-height: 22px; color: var(--text-primary); }
.payment-node-actions { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.payment-node-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.payment-node-check input[type='checkbox'] { width: 18px; height: 18px; margin: 0; }
.payment-node-fields { display: grid; grid-template-columns: minmax(160px, 0.7fr) minmax(280px, 1.6fr) minmax(170px, 0.7fr); gap: 16px; align-items: end; }
.payment-node-finance { display: grid; grid-template-columns: minmax(160px, 0.6fr) minmax(220px, 1fr); gap: 16px; align-items: center; margin-top: 14px; }
.payment-field { min-width: 0; }
.payment-field-label { font-size: 12px; line-height: 18px; color: var(--text-tertiary); margin-bottom: 6px; }
.payment-field .input { width: 100%; height: 40px; box-sizing: border-box; font-size: 14px; line-height: 20px; padding: 0 12px; border-radius: 8px; }
.payment-field .bid-pay-date { min-height: 40px; height: 40px; }
.payment-node-amt { font-size: 16px; font-weight: var(--font-weight-semibold); line-height: 40px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.bid-pay-count { margin-left: 8px; }
.payment-empty { padding: 16px 0; text-align: center; }
.bid-pay-summary { display: inline-flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
/* 保函三态 */
.bond-card--empty { background: var(--bg-content); }
.bond-empty-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0 2px; flex-wrap: wrap; }
.bond-empty-text { font-size: 13px; color: var(--text-tertiary); }
.bond-remove { border: none; background: transparent; color: var(--danger, #e5484d); font-size: 12px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); margin-left: auto; }
.bond-remove:hover { background: rgba(229, 72, 77, 0.08); }
@media (max-width: 767px) {
  .payment-node { padding: 14px 12px; }
  .payment-node-fields, .payment-node-finance { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .payment-field .input, .payment-field .bid-pay-date { width: 100%; }
  .payment-node-actions { width: 100%; }
  .bond-empty-body { flex-direction: column; align-items: stretch; }
  .bond-empty-body .btn { min-height: 40px; }
}

/* ==================== 经营概览：页面内工具栏与紧凑快捷入口 ==================== */
.home-fundamentals { min-width: 0; }
.home-fundamentals .home-toolrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; margin-bottom: 10px; flex-wrap: wrap; }
.home-fundamentals .home-toolrow-note { font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.home-fundamentals .home-toolrow-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-fundamentals .home-live-status { color: var(--text-tertiary); font-size: 12px; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-refresh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; }
.home-fundamentals .home-refresh-btn:disabled { cursor: wait; opacity: .72; }
.home-fundamentals .home-refresh-btn:disabled .ico svg { animation: home-refresh-spin 900ms linear infinite; }
@keyframes home-refresh-spin { to { transform: rotate(360deg); } }
.home-fundamentals .ov { padding: 18px 22px; }
.home-fundamentals .ov-section + .ov-section { margin-top: 17px; padding-top: 15px; }
.home-fundamentals .ov-section-head { margin-bottom: 10px; }
.home-fundamentals .ov-cell--metric { min-height: 78px; padding: 10px 18px; }
.home-fundamentals .ov-row--core .ov-cell--primary { min-height: 88px; }
.home-fundamentals .ov-row--sub { min-height: 76px; }
.home-fundamentals .ov-row--sub .ov-cell--metric { min-height: 76px; padding: 10px 18px; }
.home-fundamentals .ov-row--sub .ov-cell--metric:first-child { padding-left: 18px; }
.home-fundamentals .ov-row--sub .ov-value { font-size: 19px; }
.home-fundamentals .ov-row--lines .ov-cell--business { padding: 3px 18px; }
.home-fundamentals .ov-line-subs { gap: 4px 10px; margin-top: 5px; }
.home-fundamentals .ov-foot { margin-top: 14px; padding-top: 10px; gap: 6px 14px; }
.home-fundamentals .ov-section-head--business { flex-wrap: wrap; gap: 8px 16px; }
.home-fundamentals .rank-item:focus-visible,
.home-fundamentals .more:focus-visible,
.home-fundamentals .ov-business-title:focus-visible,
.home-fundamentals .ov-business-count:focus-visible {
  outline: 2px solid var(--profit-positive);
  outline-offset: 2px;
}
.home-fundamentals .home-trend-chart .chart-combo { max-width: min(620px, 100%); }
.home-fundamentals .trend-card { padding: 17px 20px; }
.home-fundamentals .trend-card .card-head { margin-bottom: 10px; }
.home-fundamentals .trend-card--empty { min-height: 0; }
.home-fundamentals .home-trend-empty { display: flex; align-items: baseline; gap: 8px; min-height: 24px; padding: 2px 0 1px; flex-wrap: wrap; }
.home-fundamentals .home-trend-empty__title { color: var(--text-secondary); font-size: 13px; }
.home-fundamentals .home-trend-empty__hint { color: var(--text-tertiary); font-size: 12px; }
.home-fundamentals .home-rank-empty { min-height: 32px; display: flex; align-items: center; padding: 3px 0; }
.home-fundamentals .fb-stack--rank > .card { flex: 0 1 auto; }
.home-fundamentals .rank-item { transition: background-color 150ms ease, transform 150ms ease; border-radius: var(--radius-xs); color: inherit; text-decoration: none; }
.home-fundamentals .rank-item:hover { background: var(--bg-surface-hover); transform: translateX(2px); }
.home-fundamentals .rank-item:hover .rank-name { color: var(--text-primary); }
.home-fundamentals .ov-business-title,
.home-fundamentals .ov-business-count { color: inherit; text-decoration: none; }
.home-fundamentals .ov-business-count { display: block; width: max-content; transition: color 140ms ease; }
.home-fundamentals .ov-business-title:hover,
.home-fundamentals .ov-business-count:hover { color: var(--profit-positive); text-decoration: underline; text-underline-offset: 3px; }
.home-fundamentals .ov-row--lines .ov-label a.ov-business-title:hover { color: var(--profit-positive) !important; }
.messages-intro { margin-bottom: var(--space-12); line-height: 20px; }
.trash-intro { font-size: 13px; line-height: 20px; color: var(--text-secondary); margin-bottom: 16px; }
.empty-state-card { max-width: 600px; min-height: 220px; margin: 56px auto 0; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border-default); border-radius: 12px; background: var(--bg-content); }
.empty-state-icon { color: var(--text-tertiary); margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: var(--font-weight-semibold); line-height: 24px; margin-bottom: 6px; color: var(--text-primary); }
.empty-state-desc { font-size: 14px; line-height: 22px; color: var(--text-secondary); max-width: 440px; }
@media (min-width: 768px) and (max-width: 1023px) {
  .home-fundamentals .ov-section-head--business { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 767px) {
  .home-fundamentals .home-toolrow { min-height: 48px; }
  .home-fundamentals .home-toolrow-actions { width: 100%; justify-content: flex-end; gap: 8px; }
  .home-fundamentals .home-live-status { margin-right: auto; }
  .home-fundamentals .ov { padding: 15px 14px; }
  .home-fundamentals .ov-section-head--business { gap: 5px; }
  .home-fundamentals .trend-card { padding: 15px 14px; }
  .home-fundamentals .home-trend-empty { align-items: flex-start; flex-direction: column; gap: 2px; }
  .empty-state-card { margin-top: 32px; padding: 24px 16px; }
}
@media (min-width: 1024px) {
  .home-fundamentals .cockpit > .col-6 { grid-column: span 6; }
}
@media (prefers-reduced-motion: reduce) {
  .home-fundamentals .ov-business-count, .home-fundamentals .rank-item { transition: none !important; }
  .home-fundamentals .rank-item:hover { transform: none; }
  .home-fundamentals .home-refresh-btn:disabled .ico svg { animation: none; }
}

/* ==================== v89：合同执行区排版精修 ==================== */
/* 保函空态横卡：head（标题+添加按钮同行）+ 说明行 */
.bond-card--empty { border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface, var(--bg-content)); min-height: 76px; padding: 16px 18px; }
.bond-empty-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.bond-empty-title { font-size: 15px; font-weight: var(--font-weight-semibold); line-height: 22px; color: var(--text-primary); }
.bond-empty-add { min-height: 36px; }
.bond-empty-text { font-size: 13px; line-height: 20px; color: var(--text-secondary); margin-top: 4px; }
/* 付款计划 Section Header：完整高度、两级汇总、右安全距离 */
.payplan-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 14px 18px; flex-wrap: wrap; }
.payplan-header-left { display: flex; align-items: baseline; gap: 10px; }
.payplan-title { font-size: 16px; font-weight: var(--font-weight-semibold); line-height: 24px; color: var(--text-primary); }
.payplan-count { font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.payplan-header-right { display: flex; align-items: center; gap: 18px; padding-right: 18px; flex-wrap: wrap; }
.payplan-total { font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.payplan-total-amt { font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.payplan-total-amt b { font-size: 16px; line-height: 22px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; color: var(--text-primary); margin-left: 6px; }
.payplan-total.bid-pay-total--warn { color: inherit; }
/* 合同额、保函、付款计划由 .bid-contract-inner 的统一 gap 控制，避免叠加留白。 */
.payment-node-list { margin-top: 14px; }   /* v92：容器化定义见 payrow 段（gap 由 border-bottom 分隔取代） */
/* 节点卡精修：紧凑密度 + 输入 42 + 金额只读面板 + 比例后缀 */
.payment-node { padding: 18px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-content); transition: border-color 160ms ease; }
.payment-node:hover { border-color: var(--border-default); }
.payment-node-head { min-height: 34px; margin-bottom: 12px; }
.payment-node-title { font-size: 15px; }
.payment-node-check { min-height: 32px; gap: 8px; }
.payment-node-fields { grid-template-columns: minmax(180px, 1fr) minmax(300px, 2.2fr) minmax(190px, 1fr); gap: 16px; }
.payment-node-finance { grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr); gap: 16px; margin-top: 14px; }
.payment-field .input { height: 42px; border-radius: 8px; }
.payment-field .bid-pay-date { height: 42px; }
.pay-rate-wrap { position: relative; }
.pay-rate-wrap .bid-pay-rate-input { width: 100%; padding-right: 34px; }
.pay-rate-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-secondary); pointer-events: none; }
.payment-node-amt { font-size: 20px; font-weight: var(--font-weight-semibold); line-height: 42px; color: var(--text-primary); font-variant-numeric: tabular-nums; padding: 0 14px; background: var(--bg-surface-subtle, var(--bg-surface)); border-radius: 8px; min-height: 42px; box-sizing: border-box; display: inline-flex; align-items: center; }
.bid-pay-del { width: 32px; height: 32px; color: var(--text-tertiary); }
.bid-pay-del:hover { background: rgba(229, 72, 77, 0.1); color: var(--danger, #e5484d); }
.bid-pay-add { margin-top: 12px; min-height: 42px; border-radius: 10px; }
@media (max-width: 1100px) and (min-width: 768px) {
  .payment-node-fields { grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.8fr); }
  .payment-node-fields .payment-field:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .payment-node { padding: 14px 12px; }
  .pay-rate-suffix { line-height: 42px; }
}

/* v89b：断点补全——390 单列（v89 三列规则在源序上晚于 v87 的 767 单列，需在此重申）；首卡间距收紧 */
@media (max-width: 767px) {
  .payment-node-fields, .payment-node-finance { grid-template-columns: 1fr; }
}
.payment-node-list { margin-top: 6px; }

/* v90：保函分组——上下排列 100% 宽（v89 两列已撤销，此为唯一权威定义，无覆盖链） */
.bond-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ==================== v90：保函单行记录 + 付款横向行 ==================== */
/* 已设置保函：标题行 + 单行字段记录 */
.bond-record { border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-content); padding: 16px 18px; }
.bond-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; min-height: 32px; }
.bond-rec-title-group { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bond-rec-title { font-size: 15px; font-weight: var(--font-weight-semibold); line-height: 22px; color: var(--text-primary); }
.bond-rec-fields { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.6fr) minmax(190px, 1fr) minmax(190px, 1fr) auto; column-gap: 16px; align-items: end; }
.bond-rec-actions { min-width: 72px; align-self: start; }
.bond-rec-read { font-size: 14px; line-height: 42px; color: var(--text-primary); font-variant-numeric: tabular-nums; min-height: 42px; }
.bond-rec-fields .input { height: 42px; box-sizing: border-box; width: 100%; }
/* 付款：横向单行 9 列（次序/类型/节点/占比/金额/时间/已收/已开/发票）；删除按钮与次序同格 */
/* v92：付款计划公共列定义；大屏按比例分配空间，中等桌面使用紧凑列宽 */
.bid-contract-pays {
  /* v150.2：第 9 列为发票入口；次序格内放删除操作，表头与数据行保持 9 列一致 */
  --payment-columns: minmax(76px, 0.55fr) minmax(130px, 1fr) minmax(210px, 1.9fr) minmax(86px, 0.65fr) minmax(140px, 1.05fr) minmax(150px, 1.15fr) minmax(74px, 0.55fr) minmax(74px, 0.55fr) minmax(122px, 0.9fr);
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow-x: hidden;   /* v92：根治横向溢出（原 1270 固定宽 > 1144 容器） */
}
.payrow { display: grid; grid-template-columns: var(--payment-columns); column-gap: 12px; align-items: center; min-height: 88px; padding: 14px 16px; border: none; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: transparent; transition: background-color 160ms ease; }
.payrow > * { min-width: 0; }   /* v92：Grid 子项可收缩（防 min-content 撑开） */
.payrow:hover { background: var(--bg-surface-hover); }
.payrow:hover { border-color: var(--border-default); }
.payrow + .payrow { margin-top: 0; }
/* .payment-node-list 唯一权威定义见 v92 payrow 段 */
.payrow-seq { font-size: 14px; font-weight: var(--font-weight-semibold); line-height: 20px; color: var(--text-primary); }
.payrow .payment-field-label { display: none; }   /* 横向行模式：表头已提供列名 */
.payrow .payment-field .input, .payrow .bid-pay-date { height: 42px; width: 100%; box-sizing: border-box; }
.payrow-amt { font-size: 15px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; color: var(--text-primary); min-height: 42px; display: inline-flex; align-items: center; }
.payrow-check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.payrow-check input[type='checkbox'] { width: 16px; height: 16px; margin: 0; }
.payrow-check-ro { font-size: 13px; color: var(--text-secondary); text-align: center; }
.payrow .bid-pay-del { justify-self: center; }
/* 公共表头行 */
.payrow--head { grid-template-columns: var(--payment-columns); column-gap: 12px; min-height: 44px; padding: 10px 16px; background: var(--bg-surface-subtle, var(--bg-surface)); border-bottom: 1px solid var(--border-subtle); display: grid; }
.payment-node-list { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; background: var(--bg-content); }   /* v92：行连续容器（表头+数据行一体，整行背景左→右连续） */
.payrow:last-child { border-bottom: none; }
.payrow--head + .payment-node-list .payrow:first-child { border-top-left-radius: 0; border-top-right-radius: 0; }
.payrow-head-cell { font-size: 12px; font-weight: var(--font-weight-medium); line-height: 18px; color: var(--text-tertiary); }
/* 响应式：1024-1439 保函日期换行 / 付款两行 */
/* v92：1200-1499 两行（第一行：次序/类型/节点/时间；第二行：占比/金额/状态/操作） */
@media (min-width: 1200px) and (max-width: 1499px) {
  .bid-contract-pays { --payment-columns: minmax(56px, 0.7fr) minmax(90px, 1fr) minmax(145px, 1.5fr) 70px 90px 100px 50px 50px 80px; column-gap: 8px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .bond-rec-fields { grid-template-columns: minmax(200px, 1.2fr) minmax(110px, 0.6fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; }
  .payrow { grid-template-columns: minmax(90px, 0.8fr) minmax(140px, 1.2fr) minmax(200px, 2fr) 90px 160px 170px; row-gap: 10px; }
  .payrow .payrow-seq { grid-column: 1; }
  .payrow .payment-field:nth-child(6) { grid-column: 6; }
  .payrow .payrow-check, .payrow .bid-pay-del { grid-row: 2; }
  .payrow--head { display: none; }
  .payrow .payment-field-label { display: block; }
}
/* <1024 单列卡 */
@media (max-width: 1023px) {
  .bond-rec-fields { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .bond-rec-fields .payment-field:nth-child(5) { grid-column: 1 / -1; }
  .payrow { grid-template-columns: 1fr 1fr; row-gap: 10px; min-height: 0; }
  .payrow--head { display: none; }
  .payrow .payment-field-label { display: block; }
  .payrow .payrow-seq { font-size: 15px; grid-column: 1 / -1; }
  .payrow .bid-pay-del { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
}

/* v91：消息列表容器化 + 空状态归属列表容器 + 间距层级 */
.messages-intro { margin-bottom: 16px; }   /* 说明→一级 Tabs 16 */
.msg-list { border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; background: var(--bg-content); }
.msg-list .task-row { min-height: 72px; }
.msg-list + .pagination, .messages-section .pagination { margin-top: 12px; }
.empty-line { min-height: 280px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-content); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin-top: 0; }
.empty-line-title { font-size: 15px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.empty-line .tiny { font-size: 13px; line-height: 20px; }

/* ==================== v94：项目全流程进度 ==================== */
.wf-card { padding: 24px; }
.wf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.wf-head-left { display: flex; align-items: baseline; gap: 10px; }
.wf-title { font-size: 16px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.wf-count { font-size: 13px; color: var(--text-secondary); }
.wf-head-right { display: flex; align-items: baseline; gap: 8px; padding-right: 18px; }
.wf-overall-num { font-size: 24px; font-weight: var(--font-weight-semibold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.wf-track { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 12px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 16px; }
.wf-node { flex: 1 0 108px; min-width: 108px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px 6px; background: transparent; border: none; border-radius: 10px; cursor: pointer; position: relative; }
.wf-node:not(:last-child)::after { content: ''; position: absolute; top: 20px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--border-default); }
.wf-node--completed:not(:last-child)::after { background: var(--success, #2e7d32); }
.wf-node--selected { background: var(--bg-surface-hover); }
.wf-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: var(--font-weight-semibold); border: 2px solid var(--border-default); background: var(--bg-content); color: var(--text-tertiary); }
.wf-node--completed .wf-dot { background: var(--success, #2e7d32); border-color: var(--success, #2e7d32); color: #fff; }
.wf-node--in-progress .wf-dot, .wf-node--overdue .wf-dot { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; }
.wf-node--skipped .wf-dot { border-style: dashed; background: transparent; }
.wf-node--selected .wf-dot { box-shadow: 0 0 0 3px var(--primary-soft, rgba(37, 99, 235, 0.18)); }
.wf-node-name { font-size: 13px; line-height: 18px; color: var(--text-secondary); white-space: nowrap; }
.wf-node--in-progress .wf-node-name, .wf-node--completed .wf-node-name { color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.wf-node-status { font-size: 12px; line-height: 16px; white-space: nowrap; color: var(--text-tertiary); }
.wf-node-status--in-progress { color: var(--primary, #2563eb); font-weight: var(--font-weight-semibold); }
.wf-node-status--overdue { color: var(--danger, #e5484d); font-weight: var(--font-weight-semibold); }
.wf-node-status--completed { color: var(--success, #2e7d32); }
.wf-node-progress { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.wf-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.wf-detail-title { font-size: 15px; font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.wf-status-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.wf-status-tag--completed { background: rgba(46, 125, 50, 0.12); color: var(--success, #2e7d32); }
.wf-status-tag--in-progress { background: rgba(37, 99, 235, 0.12); color: var(--primary, #2563eb); }
.wf-status-tag--overdue { background: rgba(229, 72, 77, 0.12); color: var(--danger, #e5484d); }
.wf-status-tag--pending { background: var(--bg-surface-hover); color: var(--text-secondary); }
.wf-status-tag--skipped { background: var(--bg-surface-hover); color: var(--text-tertiary); }
.wf-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 12px 16px; align-items: end; }
.wf-dv { font-size: 14px; line-height: 22px; color: var(--text-primary); min-height: 22px; }
.wf-note-row { margin-top: 12px; }
.wf-note { width: 100%; box-sizing: border-box; resize: vertical; }
.wf-tasks { margin-top: 14px; border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.wf-tasks-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.wf-task-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.wf-task-check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
.wf-task-check input[type='checkbox'] { width: 16px; height: 16px; margin: 0; }
.wf-date { height: 40px; box-sizing: border-box; }
@media (max-width: 767px) {
  .wf-card { padding: 16px; }
  .wf-detail-grid { grid-template-columns: 1fr 1fr; }
  .wf-overall-num { font-size: 20px; }
}

/* ==================== v95：流程节点两色制（未完成白 / 已完成绿） ==================== */
.wf-node--in-progress .wf-dot, .wf-node--pending .wf-dot, .wf-node--overdue .wf-dot { background: var(--bg-content); border-color: var(--border-default); color: var(--text-primary); }   /* 未完成=白底中性边框正文数字（覆盖 v94 蓝实心） */
.wf-node--in-progress:not(:last-child)::after, .wf-node--pending:not(:last-child)::after, .wf-node--overdue:not(:last-child)::after { background: var(--border-default); }   /* 未完成连接线=中性 */
.wf-node--in-progress .wf-node-name { font-weight: var(--font-weight-semibold); }   /* 进行中/待开始区别=文字字重+状态文字（不靠第三种节点填充色） */
.wf-node--selected { background: var(--bg-surface-hover); box-shadow: none; }   /* 选中=极轻背景，无重阴影 */
.wf-node--selected .wf-dot { box-shadow: none; }
.wf-node--overdue .wf-node-status { color: var(--danger, #e5484d); }   /* 逾期仅状态文字红（节点圆保持白） */
.wf-node--retention-active .wf-node-name,
.wf-node--retention-active .wf-node-status { color: var(--success, #2e7d32); }
.wf-node--retention-active .wf-dot { border-color: var(--success, #2e7d32); background: rgba(46, 125, 50, 0.07); color: var(--success, #2e7d32); }
.wf-node--retention-active.wf-node--selected { background: rgba(46, 125, 50, 0.06); }
.wf-node--retention-completed .wf-node-name { color: var(--success, #2e7d32); font-weight: var(--font-weight-semibold); }
.wf-node--retention-completed .wf-dot { border-color: var(--success, #2e7d32); background: var(--success, #2e7d32); box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12); color: #fff; }
.wf-node--retention-completed .wf-node-status { color: var(--success, #2e7d32); font-weight: var(--font-weight-semibold); }
.wf-node--retention-completed.wf-node--selected { background: rgba(46, 125, 50, 0.075); }
.wf-node--retention-completed.wf-node--selected .wf-dot { box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.16); }
.wf-status-tag--retention { color: var(--success, #2e7d32); background: rgba(46, 125, 50, 0.1); }
.wf-status-tag--retention-completed { color: #176b4b; background: rgba(46, 125, 50, 0.12); font-weight: var(--font-weight-semibold); }
.wf-detail-head .wf-retention-action { min-height: 36px; margin-left: auto; padding-inline: 13px; border-color: var(--success, #2e7d32); background: var(--success, #2e7d32); color: #fff; font-weight: var(--font-weight-medium); }
.wf-detail-head .wf-retention-action:hover { filter: brightness(.95); }
.wf-detail-head .wf-retention-action:disabled { opacity: .65; }
.wf-detail-head .wf-retention-action--completed { border-color: rgba(46, 125, 50, 0.3); background: transparent; color: var(--success, #2e7d32); }
.wf-detail-head .wf-retention-action--completed:hover { background: rgba(46, 125, 50, 0.07); filter: none; }
.wf-retention-banner { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 0 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid rgba(46, 125, 50, 0.16); border-radius: 12px; background: linear-gradient(105deg, rgba(46, 125, 50, 0.075), rgba(46, 125, 50, 0.025)); }
.wf-retention-banner__icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: rgba(46, 125, 50, 0.12); color: var(--success, #2e7d32); }
.wf-retention-banner__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.wf-retention-banner__title { color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: var(--font-weight-semibold); }
.wf-retention-banner__desc { color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.wf-retention-banner__badge { align-self: start; margin-top: 1px; padding: 5px 9px; border-radius: 999px; color: var(--success, #2e7d32); background: rgba(46, 125, 50, 0.1); font-size: 11px; line-height: 16px; font-weight: var(--font-weight-medium); white-space: nowrap; }
.wf-retention-banner--completed { border-color: rgba(46, 125, 50, 0.24); background: linear-gradient(105deg, rgba(46, 125, 50, 0.11), rgba(46, 125, 50, 0.035)); }
.wf-retention-banner--completed .wf-retention-banner__icon { background: var(--success, #2e7d32); color: #fff; }
.wf-retention-banner--completed .wf-retention-banner__title { color: #176b4b; }
.wf-retention-banner--completed .wf-retention-banner__badge { color: #176b4b; background: rgba(46, 125, 50, 0.14); }
.wf-retention-banner--overdue { border-color: rgba(229, 72, 77, 0.18); background: linear-gradient(105deg, rgba(229, 72, 77, 0.065), rgba(229, 72, 77, 0.02)); }
.wf-retention-banner--overdue .wf-retention-banner__icon { background: rgba(229, 72, 77, 0.1); color: var(--danger, #e5484d); }
.wf-retention-banner--overdue .wf-retention-banner__badge { color: var(--danger, #e5484d); background: rgba(229, 72, 77, 0.1); }

/* ==================== v96：手机端专项（全流程 + 弹窗 + 触控 + 安全区） ==================== */
/* 流程节点条：手机端内部横向滚动 + scroll-snap + 边缘渐隐（页面本身不溢出） */
@media (max-width: 767px) {
  .wf-track { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: 14px; }
  .wf-node { scroll-snap-align: center; }
  .wf-node:first-child { scroll-snap-align: start; margin-left: 2px; }
  .wf-node:last-child { margin-right: 2px; }
  .wf-card { position: relative; }
  .wf-card::after { content: '左右滑动查看全部流程'; position: static; display: block; text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .wf-head { row-gap: 6px; padding-right: 0; }
  .wf-head-right { padding-right: 0; }
  /* 详情：≤480 单列（481-767 保持两列） */
  .wf-detail-grid { grid-template-columns: 1fr 1fr; }
  .wf-date { width: 100%; }
  /* 触控区域 ≥44px */
  .wf-node { min-height: 76px; }
  .wf-detail-head button { min-height: 44px; min-width: 44px; }
  .wf-task-check { min-height: 44px; }
  .wf-task-row { min-height: 44px; }
  .wf-note { min-height: 44px; }
}
@media (max-width: 480px) {
  .wf-detail-grid { grid-template-columns: 1fr; }   /* v96：≤480 单列（防挤压/截断） */
  .wf-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .wf-retention-banner { grid-template-columns: 30px minmax(0, 1fr); gap: 0 9px; padding: 12px; }
  .wf-retention-banner__icon { width: 28px; height: 28px; }
  .wf-retention-banner__badge { grid-column: 2; justify-self: start; margin-top: 8px; }
  .wf-detail-head .wf-retention-action { width: 100%; margin-left: 0; }
}

/* 质保金已回款：以结项状态收尾，避免整条流程与重复绿底同时抢占注意力 */
.wf-card--retention-settled .wf-head-right { align-items: center; }
.wf-card--retention-settled .wf-overall-num { color: var(--success, #2e7d32); font-size: 20px; }
.wf-card--retention-settled .wf-count { color: var(--success, #2e7d32); font-weight: var(--font-weight-semibold); }
.wf-card--retention-settled .wf-node--completed:not(:last-child)::after { height: 2px; background: var(--success, #2e7d32); }
.wf-card--retention-settled .wf-node--completed .wf-dot { color: #fff; background: var(--success, #2e7d32); border-color: var(--success, #2e7d32); }
.wf-card--retention-settled .wf-node--completed .wf-node-name { color: var(--text-primary); font-weight: var(--font-weight-semibold); }
.wf-card--retention-settled .wf-node--completed .wf-node-status--completed { color: var(--success, #2e7d32); font-weight: var(--font-weight-medium); }
.wf-card--retention-settled .wf-node--completed.wf-node--selected { background: var(--success-soft, rgba(31, 132, 99, 0.08)); }
.wf-card--retention-settled .wf-node--retention-completed .wf-dot { color: #fff; background: var(--success, #2e7d32); border-color: var(--success, #2e7d32); box-shadow: 0 0 0 4px var(--success-soft, rgba(31, 132, 99, 0.14)); }
.wf-card--retention-settled .wf-node--retention-completed .wf-node-name,
.wf-card--retention-settled .wf-node--retention-completed .wf-node-status { color: var(--success, #2e7d32); font-weight: var(--font-weight-semibold); }
.wf-card--retention-settled .wf-node--retention-completed.wf-node--selected { background: rgba(31, 132, 99, 0.045); }
.wf-card--retention-settled .wf-node--retention-completed.wf-node--selected .wf-dot { box-shadow: 0 0 0 4px var(--success-soft, rgba(31, 132, 99, 0.14)); }
.wf-detail-grid--settled { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
@media (min-width: 768px) {
  .wf-card--retention-settled .wf-node { flex: 1 0 84px; min-width: 84px; padding-inline: 4px; }
  .wf-card--retention-settled .wf-node-name { display: flex; min-height: 36px; align-items: center; justify-content: center; white-space: normal; text-align: center; line-height: 16px; overflow-wrap: anywhere; }
  .wf-card--retention-settled .wf-node-status { min-height: 30px; white-space: normal; line-height: 15px; }
}
@media (max-width: 480px) {
  .wf-detail-grid--settled { grid-template-columns: 1fr; }
}

/* v151：项目级合同增补/减项台账；样式仅作用于全流程增补阶段 */
.wf-adjustments { margin-top: 18px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface, #fff); }
.wf-adjustments-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.wf-adjustments-title { margin: 0; color: var(--text-primary); font-size: 15px; line-height: 22px; font-weight: var(--font-weight-semibold); }
.wf-adjustments-subtitle { margin: 3px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.wf-adjustment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-page, #faf9f6); }
.wf-adjustment-total { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 14px; border-right: 1px solid var(--border-subtle); }
.wf-adjustment-total:last-child { border-right: 0; }
.wf-adjustment-total > span { color: var(--text-secondary); font-size: 12px; line-height: 17px; }
.wf-adjustment-total > strong { color: var(--text-primary); font-size: 16px; line-height: 22px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.wf-adjustment-total--add > strong { color: var(--success, #218869); }
.wf-adjustment-total--deduct > strong { color: var(--text-primary); }
.wf-adjustment-total--adjusted { background: rgba(33, 136, 105, .055); }
.wf-adjustment-total--adjusted > strong { color: var(--success, #218869); font-size: 18px; }
.wf-adjustment-notice { margin: 12px 0 2px; padding: 9px 11px; border-radius: 8px; color: var(--text-secondary); background: var(--bg-page, #faf9f6); font-size: 12px; line-height: 18px; }
.wf-adjustment-list { margin-top: 12px; }
.wf-adjustment-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 2px; border-top: 1px solid var(--border-subtle); }
.wf-adjustment-row:last-child { padding-bottom: 2px; }
.wf-adjustment-row-main { min-width: 0; }
.wf-adjustment-row-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.wf-adjustment-direction, .wf-adjustment-status { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; line-height: 16px; white-space: nowrap; }
.wf-adjustment-direction--add { color: var(--success, #218869); background: rgba(33, 136, 105, .09); }
.wf-adjustment-direction--deduct { color: #8a6531; background: rgba(189, 145, 75, .12); }
.wf-adjustment-row-heading > strong { min-width: 0; color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: var(--font-weight-medium); overflow-wrap: anywhere; }
.wf-adjustment-status--draft { color: var(--text-secondary); background: var(--bg-page, #f3f2ef); }
.wf-adjustment-status--pending { color: #386db9; background: rgba(61, 117, 201, .1); }
.wf-adjustment-status--confirmed { color: var(--success, #218869); background: rgba(33, 136, 105, .09); }
.wf-adjustment-status--rejected { color: #a04d4d; background: rgba(176, 82, 82, .09); }
.wf-adjustment-status--voided { color: var(--text-tertiary); background: var(--bg-page, #f3f2ef); }
.wf-adjustment-row-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 5px; color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.wf-adjustment-row-description, .wf-adjustment-decision-note { margin: 6px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.wf-adjustment-decision-note { color: #9a5b3a; }
.wf-adjustment-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wf-adjustment-attachment { max-width: 100%; overflow: hidden; padding: 3px 8px; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-secondary); font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.wf-adjustment-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.wf-adjustment-amount { color: var(--text-primary); font-size: 16px; line-height: 22px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wf-adjustment-amount--add { color: var(--success, #218869); }
.wf-adjustment-amount--deduct { color: var(--text-primary); }
.wf-adjustment-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 3px; }
.wf-adjustment-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px 4px 4px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.wf-adjustment-empty strong { color: var(--text-primary); font-size: 13px; font-weight: var(--font-weight-medium); }
.wf-adjustment-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.wf-adjustment-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.wf-adjustment-field .input { width: 100%; box-sizing: border-box; }
.wf-adjustment-field--wide { grid-column: 1 / -1; }
.wf-adjustment-description { resize: vertical; }
.wf-adjustment-attachment-block { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.wf-adjustment-files { display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; padding: 9px 10px; border: 1px solid var(--border-subtle); border-radius: 8px; }
.wf-adjustment-file { display: flex; align-items: flex-start; gap: 8px; color: var(--text-primary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.wf-adjustment-file input { flex: 0 0 auto; margin: 2px 0 0; }
.wf-adjustment-no-files { padding: 10px; border: 1px dashed var(--border-subtle); border-radius: 8px; }
.wf-adjustment-error { min-height: 18px; margin-top: 8px; color: var(--danger, #b54747); }
.wf-adjustment-review { display: flex; flex-direction: column; gap: 10px; min-width: min(560px, 76vw); }
@media (max-width: 767px) {
  .wf-adjustments { margin-top: 14px; padding: 13px; }
  .wf-adjustment-summary { grid-template-columns: 1fr 1fr; }
  .wf-adjustment-total:nth-child(2) { border-right: 0; }
  .wf-adjustment-total:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  .wf-adjustment-row { grid-template-columns: 1fr; gap: 9px; align-items: start; }
  .wf-adjustment-row-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .wf-adjustment-actions { justify-content: flex-start; margin: 0 0 0 auto; }
  .wf-adjustment-form-grid { grid-template-columns: 1fr; }
  .wf-adjustment-field--wide { grid-column: auto; }
  .wf-adjustment-review { min-width: 0; }
}
@media (max-width: 480px) {
  .wf-adjustments-head { align-items: flex-start; flex-direction: column; }
  .wf-adjustments-head > .btn { width: 100%; min-height: 42px; }
  .wf-adjustment-total { padding: 10px; }
  .wf-adjustment-total > strong { font-size: 14px; }
  .wf-adjustment-total--adjusted > strong { font-size: 16px; }
  .wf-adjustment-actions { width: 100%; margin-left: 0; }
  .wf-adjustment-actions > .btn { flex: 1 1 auto; min-height: 40px; }
}
/* 弹窗：手机端 footer 固定可见 + 背景锁滚 + 安全区 */
@media (max-width: 767px) {
  .modal { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
  .modal-body, .modal-content { overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
  .modal-footer, .modal-actions { flex: 0 0 auto; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-mask { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-close, .modal-mask .close { min-width: 44px; min-height: 44px; }
}
body.modal-open { overflow: hidden; }   /* v96：弹窗打开时锁背景滚动（JS 切换类） */
/* 底部导航 safe-area：不遮挡最后一条数据 */
.d-tabbar, .m-tabbar, .mobile-tabbar { padding-bottom: max(env(safe-area-inset-bottom, 0px), 6px); }
/* 通用触控底线（手机）：小按钮/关闭类 ≥40px */
@media (max-width: 767px) {
  .btn--sm { min-height: 40px; }
  .bid-pay-del { width: 40px; height: 40px; }
  .input, select.input, .input[type='date'] { font-size: 16px; }   /* 防 iOS 聚焦自动放大 */
}

/* ==================== v98：内容一致性 mobile-kv 网格 ==================== */
.mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.mobile-kv { display: flex; flex-direction: column; min-width: 0; }
.mobile-kv-label { font-size: 11px; line-height: 16px; color: var(--text-tertiary); }
.mobile-kv-val { font-size: 13px; line-height: 18px; color: var(--text-primary); word-break: break-all; overflow-wrap: anywhere; }
@media (min-width: 768px) { .mobile-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ==================== v98：内容一致性 mobile-kv 网格 ==================== */
.mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.mobile-kv { display: flex; flex-direction: column; min-width: 0; }
.mobile-kv-label { font-size: 11px; line-height: 16px; color: var(--text-tertiary); }
.mobile-kv-val { font-size: 13px; line-height: 18px; color: var(--text-primary); word-break: break-all; overflow-wrap: anywhere; }
@media (min-width: 768px) { .mobile-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ==================== v99：移动端图6/图7 专项 ==================== */
/* 图6：联系人手机 label 显示（data-label ::before）+ 触控 44 */
@media (max-width: 767px) {
  .bid-client-cell { position: relative; }
  .bid-client-cell[data-label]::before { content: attr(data-label); display: block; font-size: 11px; line-height: 16px; color: var(--text-tertiary); margin-bottom: 2px; }
  .bid-client-cell .bid-client-input, .bid-client-cell .bid-client-address { width: 100%; min-width: 0; height: 40px; min-height: 40px; font-size: 16px; box-sizing: border-box; }
  .bid-client-del { width: 44px; height: 44px; top: 2px; right: 2px; }
  .bid-client-cell--addr { grid-column: 1 / -1; }
}
/* 图7：保函手机单列（金额/比例/开始/结束 各自单列，日期不交叠）+ 去空"操作"列 */
@media (max-width: 767px) {
  .bond-rec-fields { grid-template-columns: 1fr !important; row-gap: 12px; }
  .bond-rec-fields .payment-field, .bond-rec-fields .input { width: 100%; min-width: 0; box-sizing: border-box; }
  .bond-rec-actions { display: none; }   /* v99：手机不渲染空"操作"标签列；移除按钮在标题行右侧（bond-rec-head） */
  .bond-rec-head .bond-remove { min-height: 44px; }
}

/* ==================== v99：图8 付款节点手机 label + 状态区 + 白卡 ==================== */
@media (max-width: 1023px) {
  .payrow .payment-field { position: relative; }
  .payrow .payment-field-label { display: block !important; margin-bottom: 4px; }   /* v99：每个输入框永久 label */
  .payrow .pay-rate-wrap .input { width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
  .payrow .bid-pay-rate-input { text-align: right; }
  .payrow .payrow-amt { min-height: 40px; display: inline-flex; align-items: center; }
  .payrow .payrow-check { min-height: 44px; }   /* v99：状态区命中高度 */
  .payrow-check span { font-size: 13px; }
  .payrow { background: var(--bg-content) !important; }   /* v99：全部节点统一白卡（禁灰绿大背景） */
  .payrow:hover { background: var(--bg-content) !important; }
  .bid-pay-del { position: static; }
  .payrow .payrow-seq { font-weight: var(--font-weight-semibold); }
}

/* ==================== v99：图8 付款节点手机 label + 状态区 + 白卡 ==================== */
@media (max-width: 1023px) {
  .payrow .payment-field-label { display: block !important; margin-bottom: 4px; }   /* v99：每个输入框永久 label */
  .payrow .pay-rate-wrap .input { width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
  .payrow .bid-pay-rate-input { text-align: right; }
  .payrow .payrow-amt { min-height: 40px; display: inline-flex; align-items: center; }
  .payrow .payrow-check { min-height: 44px; }   /* v99：状态区命中高度 */
  .payrow-check span { font-size: 13px; }
  .payrow { background: var(--bg-content) !important; }   /* v99：全部节点统一白卡 */
  .payrow:hover { background: var(--bg-content) !important; }
  .bid-pay-del { position: static; }
  .payrow .payrow-seq { font-weight: var(--font-weight-semibold); }
}

/* v99b：payRow 手机 data-label ::before（桌面 label 在公共表头，不受影响） */
@media (max-width: 1023px) {
  .payrow .payment-field[data-label]::before { content: attr(data-label); display: block; font-size: 11px; line-height: 16px; color: var(--text-tertiary); margin-bottom: 4px; }
  .payrow .payment-field[data-label] .payment-field-label { display: none !important; }
}

/* ==================== v100：图7/8 付款节点手机卡片化 ==================== */
@media (max-width: 1023px) {
  .payrow:not(.payrow--head) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: end;
    padding: 12px !important;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
  }
  .payrow .payrow-seq {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: var(--font-weight-semibold); color: var(--text-primary);
    padding-bottom: 6px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 2px;
  }
  .payrow .payrow-seq .bid-pay-del { position: static; margin-left: auto; width: 44px; height: 44px; }
  .payrow .payment-field { min-width: 0; }
  .payrow .payment-field--full { grid-column: 1 / -1; }
  .payrow .payrow-checks { grid-column: 1 / -1; display: flex; gap: 16px; }   /* v100：已收/已开票同区两列 */
  .payrow .payrow-check { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ==================== v100：图9 增减项手机卡片化 ==================== */
@media (max-width: 767px) {
  .bid-adj-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
  .bid-adj-row:last-child { border-bottom: none; }
  .bid-adj-cell--head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .bid-adj-cell--head .bid-adj-del { margin-left: auto; }
  .bid-adj-cell[data-label]::before { content: attr(data-label); display: block; font-size: 11px; line-height: 16px; color: var(--text-tertiary); margin-bottom: 2px; }
  .bid-adj-cell--op { position: static; }
  .bid-adj-cell--op .bid-adj-del { width: 44px; height: 44px; }
  .bid-adj-cell .input { width: 100%; min-width: 0; font-size: 16px; box-sizing: border-box; }
  .bid-adj-pill--add { color: var(--success, #1a7f5a) !important; }
  .bid-adj-pill--deduct { color: var(--danger, #e5484d) !important; }
  /* 品类小计独立分隔 */
  .bid-cat-subtotal { border-top: 1px solid var(--border-default); margin-top: 10px; padding-top: 10px; }
}

/* ==================== v100：图4 我的页面 + 图2/3 顶栏按钮 ==================== */
@media (max-width: 767px) {
  /* 图4：权限说明卡片标题不贴顶栏（消除双标题观感） */
  .mine-section-title, .mine .card > .card-title, .mine-card-title { margin-top: 4px; }
  .mine .card { margin-bottom: 12px; }
  /* 设置项栅格：左名称+说明 / 右控件，375 不足时上下排列 */
  .mine-setting-row, .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
  .mine-setting-row > .seg, .set-row > .seg { flex: 0 0 auto; }
}
/* 图2/3：topbar 右侧按钮 375 不挤压标题 */
@media (max-width: 374px) {
  .topbar .tb-actions .btn .btn-text { display: none; }   /* 空间不足：按钮缩为图标 */
  .topbar .tb-title { font-size: 15px; }
}
.topbar .tb-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .tb-title-wrap { min-width: 0; overflow: hidden; }
.topbar .tb-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== v103：按钮文字居中专项 ==================== */
/* 图2：时间范围选项——方案 A：文字绝对居中，勾选图标绝对定位（不参与文字居中计算） */
.home-range-option {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding-inline: 40px;
  text-align: center; line-height: 1; white-space: nowrap; box-sizing: border-box;
}
.home-range-option__check { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
/* 图1：消息中心筛选按钮（tab-btn--sub 含计数 span）——统一 inline-flex 居中 + 44px */
.tab-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1; white-space: nowrap; box-sizing: border-box;
  min-height: 40px;
}
.messages-subtabs .tab-btn--sub { min-height: 44px; padding: 8px 14px; gap: 6px; }
.messages-subtabs .tab-btn--sub .tab-count { line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
/* 底部操作按钮：等高 44 + 文字居中 */
.modal-foot .btn, .modal-footer .btn, .modal-actions .btn, .sheet-actions .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1; box-sizing: border-box; }   /* v103b：modal-foot 为实际类名 */

/* v111：用户菜单退出登录项 */
.um-logout {
  width: 100%; margin-top: 10px; padding: 9px 12px;
  border: 1px solid var(--border-subtle); border-radius: 8px;
  background: transparent; color: var(--danger, #c0392b);
  font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; box-sizing: border-box;
}
.um-logout:hover { background: rgba(192, 57, 43, 0.06); border-color: var(--danger, #c0392b); }
.um-logout:active { transform: translateY(0.5px); }

/* v111b：操作日志类型标签——长 action 名（如 dingtalk-bind-create）在 fixed 列宽下 nowrap 溢出重叠 */
.log-tbl td .tag { white-space: normal; word-break: break-all; line-height: 1.4; }

/* ==================== v113b：顶栏元素水平线统一 ==================== */
/* 用户反馈：新建按钮与铃铛/头像不在一条水平线——根因是按钮 32px vs 图标钮 36/40px 中心虽对齐但顶底不齐，视觉可感知 */
.d-actions { align-items: center; }
.d-actions .btn--sm { height: 40px; min-height: 40px; padding-top: 0; padding-bottom: 0; }   /* v113b：.btn 基类显式 height 会压过 min-height——直接指定 40 与 icon-btn 同高 */
.d-actions .create-wrap, .d-actions .icon-btn { align-items: center; }

/* ==================== v115c：时间弹窗自定义日期区——字体统一 ==================== */
/* 修复：日期输入 16px 大字号 + 加粗大标签与弹窗整体（12px 灰标签/13px 控件）设计语言不一致 */
.home-range-custom .field .label {
  font-size: var(--font-size-sm); font-weight: 600; color: var(--text-2);
  padding-top: 9px; margin-bottom: 8px; display: inline-block;   /* 与组标签（按月/其他）同字号同留白 */
}
.home-range-custom .input { font-size: 13px !important; font-family: inherit; height: 38px; color: var(--text); }
.home-range-custom .input[type="date"] { font-family: inherit; line-height: 38px; }
.home-range-custom__to { font-size: var(--font-size-sm); color: var(--text-2); padding-bottom: 12px; }

/* ==================== v115c：时间弹窗自定义日期区——字体统一 ==================== */
/* 修复：日期输入 16px 大字号 + 加粗大标签与弹窗整体（12px 灰标签/13px 控件）设计语言不一致 */
.home-range-custom .field .label {
  font-size: var(--font-size-sm); font-weight: 600; color: var(--text-2);
  padding-top: 9px; margin-bottom: 8px; display: inline-block;   /* 与组标签（按月/其他）同字号同留白 */
}
.home-range-custom .input { font-size: 13px !important; font-family: inherit; height: 38px; color: var(--text); }
.home-range-custom .input[type="date"] { font-family: inherit; line-height: 38px; }
.home-range-custom__to { font-size: var(--font-size-sm); color: var(--text-2); padding-bottom: 12px; }

/* v115e：组标签字重显式收敛（h4 默认 bold 与字段标签 500 曾造成深浅不一） */
.home-range-group__label { font-weight: 600; }

/* ==================== v117 G05：列表轻量更新态 ==================== */
/* 已有内容刷新时保留可读性：仅轻微降透明度提示"正在更新"，无布局跳动；reduced-motion 下无过渡 */
.is-updating { opacity: 0.72; transition: opacity 120ms ease; pointer-events: none; }
.is-updating > * { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .is-updating { transition: none; } }

/* ==================== FIX-05/06/v118：桌面返回入口 + 项目名链接可访问性 ==================== */
/* 桌面顶栏返回按钮：与标题基线对齐，触控 40px */
.d-topbar .d-back { margin-right: 10px; flex: 0 0 auto; }
.d-topbar { gap: 0; }

/* 项目名链接：继承文本外观（不破坏表格密度），焦点态三模式可见（浅/深/强制颜色） */
.proj-link { color: inherit; text-decoration: none; }
.proj-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.proj-link:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (forced-colors: active) {
  .proj-link { text-decoration: underline; }               /* 强制颜色模式：链接语义可见 */
  .proj-link:focus-visible { outline-color: Highlight; }
}

/* ==================== FIX-r66：侧栏分组头导航化样式补充 ==================== */
/* 分组名改为 <a> 链接（进入分组首个子页）：保持原分组头视觉；键盘焦点态可见；箭头仍可点折叠 */
a.s-group-head { text-decoration: none; color: inherit; }
a.s-group-head:hover .s-label { color: var(--text); }
a.s-group-head:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: -2px;
  border-radius: var(--radius-sm, 6px);
}
@media (forced-colors: active) {
  a.s-group-head:focus-visible { outline-color: Highlight; }
}
.s-group-head .s-arrow { cursor: pointer; }

/* ============================ v137：项目名称完整可查看（2026-09-17） ============================ */
/* 桌面：名称两行钳制（超两行省略），悬停/键盘聚焦显示完整名称气泡（替代原生 title）；
   手机：名称独占一行 17px/600，标签独立一行，展开/收起按钮（≥44px 热区）。 */
/* v141：名称区三层纵向结构——完整名称自然换行（无 clamp/省略/nowrap）+ 标签独立行 + 副标题行。
   根因记录：v61 旧规则 .bid-name-cell .bid-name-text { white-space:nowrap; text-overflow:ellipsis }
   特异性 (0,2,0) 压过 v137 的 line-clamp:2 → 单行省略（「厦门市湖里区2024P05地块（」截断的根因）。 */
.bid-name-cell { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; }   /* v141：显式覆盖全局 .data-tbl td > div 的 nowrap/ellipsis（名称继承链） */
.bid-name-text {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;   /* v143：长英文/编号兜底断行；中文按正常规则断（避免单字孤行） */
  word-break: normal;
  line-break: auto;
  line-height: 1.45;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.bid-name-text.proj-link:hover { color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; }
.bid-name-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.bid-name-sub { font-size: 13px; line-height: 1.5; color: var(--text-tertiary); }

@media (max-width: 720px) {
  .bid-list-tbl tr.log-row td:first-child > div { display: block; }
  .bid-name-cell { padding: 2px 0 4px; }
  .bid-name-text { font-size: 16px; line-height: 1.45; }
}

/* ============================ v141：合同签订工作区（结构级重构 2026-09-18） ============================
   布局：分组独立网格（识别/分类/主体 2 列、时间 3 列，--cols 变量驱动）；金额 4 列指标摘要卡
   （总价最高权重 24px/700 + tabular）；税率表金额右对齐/税率居中/合计对列；错误三段式独立状态区；
   ≤1024 金额 2 列；≤900 分组单列；≤720 手机分项卡片化（tr 转卡片、合计独立）。 */
.cw-host { margin-top: 16px; }
.cw-inner { display: flex; flex-direction: column; gap: 24px; }
.cw-block { background: var(--bg-content); border: 1px solid var(--border-default); border-radius: 14px; padding: 24px 28px; }
.cw-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,0.14)); }
/* v150.19 finance form selection styling is scoped in app.css. */
.cw-block-title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.cw-block-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cw-editing-tag { font-size: 12px; color: #b4690e; background: rgba(180, 105, 14, 0.08); padding: 3px 10px; border-radius: 999px; }

/* ---- 基本信息：四分组均衡网格 ---- */
.cw-groups { display: flex; flex-direction: column; gap: 28px; }
.cw-group-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.cw-group-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px 48px; }
.cw-field { min-width: 0; }
.cw-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 6px; }
.cw-value { font-size: 15px; font-weight: 500; color: var(--text-1); line-height: 1.5; min-height: 22px; overflow-wrap: anywhere; word-break: break-word; }
.cw-field .input { width: 100%; box-sizing: border-box; }   /* 编辑控件填满所属网格列 */
.cw-field-hint { margin-top: 4px; font-size: 12px; color: var(--text-tertiary); }

/* ---- 合同金额：4 列指标摘要卡 ---- */
/* v150：金额卡 3 列均分撑满（v149 移除合同净值后仍遗留 4 列网格致右侧大面积空白） */
.cw-amount-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cw-amount-cell { padding: 16px 18px; border: 1px solid var(--border-subtle, rgba(127,127,127,0.16)); border-radius: 10px; background: var(--bg-surface, transparent); min-width: 0; }
.cw-amount-cell--primary { border-color: var(--text-1); box-shadow: 0 0 0 1px var(--text-1) inset; }
.cw-amount-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.cw-amount-num { font-size: 22px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cw-currency-tag { font-size: 12.5px; color: var(--text-tertiary); white-space: nowrap; }
.cw-amount-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; }

/* ---- 税率分项表 ---- */
.cw-tax-tbl { width: 100%; min-width: 0; table-layout: fixed; }
.cw-tax-tbl th { white-space: normal; line-height: 1.35; text-align: center; vertical-align: middle; }
.cw-tax-tbl th:nth-child(1), .cw-tax-tbl td:nth-child(1) { text-align: center; width: 8%; }
.cw-tax-tbl th:nth-child(2), .cw-tax-tbl td:nth-child(2) { text-align: left; width: 18%; }
.cw-tax-tbl th:nth-child(n+3), .cw-tax-tbl td:nth-child(n+3) { text-align: center; width: 18.5%; }
.cw-tax-tbl--editing th:nth-child(1), .cw-tax-tbl--editing td:nth-child(1) { width: 6.5%; }
.cw-tax-tbl--editing th:nth-child(2), .cw-tax-tbl--editing td:nth-child(2) { width: 15.5%; }
.cw-tax-tbl--editing th:nth-child(n+3), .cw-tax-tbl--editing td:nth-child(n+3) { width: 15.6%; }
.cw-tax-tbl td { padding: 14px 12px; vertical-align: middle; }
.cw-tax-tbl tfoot td { font-weight: 600; border-top: 1px solid var(--border-default); }
.cw-tax-input { width: 100%; min-width: 0; box-sizing: border-box; text-align: right; }
.cw-tax-name-input { width: 100%; min-width: 0; box-sizing: border-box; text-align: left; }
.cw-tax-name-view { overflow-wrap: anywhere; }
.cw-tax-rate { text-align: center; }
/* 税率编辑表内所有输入控件保持同高、同框，避免原生 select 显得矮一截。 */
.cw-tax-tbl .cw-tax-name-input,
.cw-tax-tbl .cw-tax-input {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  line-height: 20px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  vertical-align: middle;
}
.cw-tax-tbl select.cw-tax-rate {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.cw-tax-note { margin-top: 12px; }

/* ---- 错误三段式独立状态区 ---- */
.cw-mismatch { margin-top: 12px; border: 1px solid rgba(180, 105, 14, 0.35); background: rgba(180, 105, 14, 0.06); border-radius: 10px; padding: 12px 16px; }
.cw-mismatch-title { font-size: 13px; font-weight: 600; color: #b4690e; }
.cw-mismatch-rows { display: flex; gap: 32px; margin-top: 8px; flex-wrap: wrap; }
.cw-mismatch-rows .k { font-size: 12px; color: var(--text-tertiary); display: block; margin-bottom: 2px; }
.cw-mismatch-rows .v { font-size: 15px; font-weight: 600; color: #b4690e; }
.cw-mismatch-chip { font-size: 12px; color: #b4690e; background: rgba(180, 105, 14, 0.08); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* ---- 状态卡与通用 ---- */
/* v150.13（图2）：状态卡勾选框与文字组合整体居中；两卡等宽充满；触控≥44px */
.cw-status-group { display: flex; gap: 12px; }
.cw-status-opt { flex: 1 1 0; min-width: 0; min-height: 44px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-default); background: var(--bg-content); }
.cw-status-opt--on { border-color: var(--text-1); box-shadow: 0 0 0 1px var(--text-1) inset; }
.cw-status-opt:disabled { cursor: default; opacity: 0.85; }
.cw-status-main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cw-status-check { font-weight: 700; color: var(--text-tertiary); width: 20px; height: 20px; min-height: 0; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: 12px; flex: none; }
/* v150.14（图4）：状态色与选中态分离——待签约=琥珀（空心圆+待办圆点，不用绿勾）、已签约=绿色完成勾、未选中=中性空心圆 */
.cw-status-check--pending { color: var(--warning, #b9770a); }
.cw-status-check--pending.is-on::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cw-status-check--pending.is-on { border-color: var(--warning, #b9770a); }
.cw-status-check--signed { color: var(--text-tertiary); }
.cw-status-check--signed.is-on { color: var(--success, #2e7d32); border-color: var(--success, #2e7d32); }
.cw-status-opt--on { background: var(--bg-surface-hover, rgba(31, 30, 29, 0.06)); }
.cw-status-opt--pending.cw-status-opt--on { border-color: var(--warning, #b9770a); box-shadow: 0 0 0 1px var(--warning, #b9770a) inset; }
.cw-status-opt--signed.cw-status-opt--on { border-color: var(--success, #2e7d32); box-shadow: 0 0 0 1px var(--success, #2e7d32) inset; }
.cw-status-label { font-size: 14px; font-weight: 600; color: var(--text-1); }
.cw-status-desc { font-size: 12px; color: var(--text-tertiary); }
.cw-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.cw-errs { color: var(--danger, #c0392b); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  /* v150：3 列均分下中等宽度保持三列（金额数字 22px 在 1024px 仍充足；2+1 会孤立第三卡） */
  .cw-group-grid { gap: 16px 32px; }
}
@media (max-width: 900px) {
  .cw-group-grid { grid-template-columns: 1fr; }
  .cw-amount-edit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cw-block { padding: 16px; border-radius: 12px; }
  .cw-inner { gap: 16px; }
  .cw-status-group { flex-direction: column; }
  .cw-status-opt { width: 100%; }
  /* v150: 金额卡手机端单列（金额长数字不挤压；原 2 列会截断） */
  .cw-amount-grid { grid-template-columns: 1fr; gap: 10px; }
  .cw-amount-cell { padding: 12px 14px; }
  .cw-amount-num { font-size: 18px; }
  /* v150: 手机端用户列表——表格切卡片；底部留安全区不被导航遮挡 */
  .user-tbl { display: none; }
  .user-cards { display: block; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  /* 手机分项卡片化：tr 转卡片，thead 隐藏，td 变 label-value 行 */
  .cw-tax-tbl thead { display: none; }
  /* app.css 固定了所有表格行 64px；卡片化后每个税务字段纵向堆叠，必须恢复自然行高，否则行内容会互相覆盖。 */
  .cw-tax-tbl tbody tr, .cw-tax-tbl tfoot tr { display: block; width: 100%; height: auto; min-height: 0; box-sizing: border-box; border: 1px solid var(--border-default); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .cw-tax-tbl tfoot tr { background: var(--bg-surface, rgba(127,127,127,0.05)); }
  /* 重置桌面列百分比；卡片中的每个税额字段独占一行，才能稳定显示标签和值。 */
  .cw-tax-tbl tbody td:nth-child(n), .cw-tax-tbl tfoot td:nth-child(n) { width: 100%; min-width: 0; box-sizing: border-box; }
  .cw-tax-tbl td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: none; padding: 7px 0; text-align: right; }
  .cw-tax-tbl tfoot td:empty { display: none; }
  .cw-tax-tbl td::before { content: attr(data-label); color: var(--text-tertiary); font-size: 12px; text-align: left; }
  .cw-tax-tbl td.c-c { justify-content: flex-start; }
  .cw-tax-tbl td.c-c::before { content: none; }
  .cw-tax-tbl td.cw-tax-op { justify-content: flex-end; }
  .cw-tax-tbl td.cw-tax-op::before { content: none; }
  .cw-tax-input { width: 140px; }
  .cw-tax-name-input { width: 140px; min-width: 0; }
  .cw-tax-tbl td:nth-child(n+3) { text-align: right; }
  .cw-mismatch-rows { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cw-status-opt, .cw-status-check { transition: none; }
}

/* ==================== v141：stage 详情负责人/部门内联编辑 ==================== */
.wf-owner-view { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf-owner-edit { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wf-owner-edit .input { width: 100%; max-width: 320px; box-sizing: border-box; }
.wf-owner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-owner-err { color: var(--danger, #c0392b); min-height: 16px; }

/* v150.2：签约详情两列均分（grid 1fr 1fr、gap 28）——与上方状态卡两列对齐；紧凑内边距 24px 上下 */
.cw-signed-grid {
  margin-top: 20px; padding: 12px 16px;
  background: var(--bg-surface, rgba(127,127,127,0.05));
  border-radius: 10px;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 28px;
}
.cw-signed-info { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; padding: 0; background: none; border-radius: 0; }   /* v150.13：状态列与时间列各自内部垂直居中（以日期控件行高为参照） */
.cw-signed-label { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; }
.cw-signed-value { font-size: 14px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.cw-signed-none { color: var(--text-tertiary); }
@media (max-width: 720px) {
  .cw-signed-grid { grid-template-columns: 1fr; }
}

/* ==================== v143：负责人/部门编辑面板 ==================== */
.wf-owner-panel {
  border: 1px solid var(--border-subtle, rgba(127,127,127,0.16));
  background: var(--bg-content);
  border-radius: 10px;
  padding: 16px 18px;
  max-width: 100%;
  box-sizing: border-box;
}
.wf-owner-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wf-owner-panel-title { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.wf-owner-clear {
  background: none; border: none; cursor: pointer;
  color: var(--danger, #c0392b); font-size: 12.5px; font-weight: 500; font-family: inherit;
  padding: 6px 10px; border-radius: 8px; min-height: 32px;
  transition: background 160ms ease;
}
.wf-owner-clear:hover { background: rgba(192, 57, 43, 0.06); }
.wf-owner-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.wf-owner-field { min-width: 0; }
.wf-owner-field .cw-label { margin-bottom: 8px; }
.wf-owner-field .input { width: 100%; height: 44px; box-sizing: border-box; }
.wf-owner-panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 720px) {
  .wf-owner-fields { grid-template-columns: 1fr; }
  .wf-owner-field .input { height: 48px; }
  .wf-owner-panel-actions .btn { flex: 1; }
  .wf-owner-clear { min-height: 44px; }
}

/* ==================== v145：合同金额编辑区统一 + 税率状态摘要行 ==================== */
/* 币种 select 原生外观重置：与 input 同高同框、自定义克制下箭头（右居中） */
.cw-amount-edit-grid .input {
  height: 48px;
  box-sizing: border-box;
}
.cw-amount-edit-grid select.cw-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.cw-amount-edit-grid select.cw-select:hover { border-color: #c9c9c2; }
.cw-amount-edit-grid select.cw-select:focus-visible { outline: 2px solid #1677ff; outline-offset: 1px; }
/* 三列辅助文字预留等高，防字段上下跳动 */
.cw-amount-edit-grid .cw-field-hint { min-height: 19px; }
.cw-amount-edit-grid { gap: 16px 32px; }
/* 操作区收紧：减少输入区与按钮区空白 */
.cw-amount-edit-grid + .cw-errs { margin-top: 12px; }
.cw-errs:empty { margin-top: 0; min-height: 0; }
.cw-actions { margin-top: 12px; }
.cw-actions .btn { min-height: 44px; min-width: 88px; }

/* 税率不一致：标题下方独立状态摘要行（⚠ + 文案，浅暖橙底） */
.cw-mismatch-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(180, 105, 14, 0.07);
  border: 1px solid rgba(180, 105, 14, 0.22);
  font-size: 13px;
  color: #b4690e;
}
.cw-mismatch-summary-icon { line-height: 1; }

/* 差额警告卡：三列摘要 grid（金额/标签分列对齐，负数清晰） */
.cw-mismatch-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cw-mismatch-rows .v { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .cw-mismatch-rows { grid-template-columns: 1fr; gap: 10px; }
  .cw-amount-edit-grid .input { height: 48px; }
}


/* ==================== v149：合同状态卡字体/层级统一 + 金额卡去描边差异 ==================== */
.cw-status-opt { padding: 14px 18px; }
.cw-status-label { font-size: 15px; font-weight: 500; color: var(--text-1); line-height: 1.4; }
.cw-status-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; margin-top: 3px; }
/* v150.19：删除 v149 陈旧规则“--on 统一绿点”——分状态颜色（待签约琥珀/已签约绿）由 v150.14 块唯一表达 */
.cw-signed-info { margin-top: 20px; }
/* 金额卡：三指标同组件体系——总价仅轻背景强调，去除描边差异 */
.cw-amount-cell { border: 1px solid var(--border-subtle, rgba(127,127,127,0.16)); background: var(--bg-surface, transparent); }
.cw-amount-cell--primary { border-color: var(--border-subtle, rgba(127,127,127,0.16)); box-shadow: none; background: var(--bg-surface, rgba(127,127,127,0.05)); }
.cw-amount-num { font-size: 21px; font-weight: 700; }
.cw-amount-cell--primary .cw-amount-num { font-size: 21px; }

/* ==================== v149：软装财务管理 + 项目发票联动 ==================== */
.fin-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.fin-sum-card { text-align: left; padding: 14px 16px; border: 1px solid var(--border-subtle, rgba(127,127,127,0.16)); border-radius: 10px; background: var(--bg-content); cursor: pointer; font-family: inherit; transition: background 160ms ease; }
.fin-sum-card:hover { background: var(--bg-surface-hover, rgba(127,127,127,0.05)); }
.fin-sum-card--on { border-color: var(--text-1); box-shadow: 0 0 0 1px var(--text-1) inset; }
.fin-sum-num { font-size: 22px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.fin-sum-label { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.fin-filter { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fin-filter .input { min-width: 180px; }
.fin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fin-tabs { display: flex; gap: 4px; }
.fin-tab { border: none; background: none; padding: 8px 14px; font-size: 13.5px; font-weight: 500; color: var(--text-tertiary); cursor: pointer; border-radius: 8px; font-family: inherit; }
.fin-tab--on { background: var(--bg-surface, rgba(127,127,127,0.07)); color: var(--text-1); font-weight: 600; }
.fin-tbl .fin-proj-name { overflow-wrap: anywhere; word-break: break-word; font-weight: 500; }
.fin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.fin-create .form-field { margin-bottom: 12px; }
.fin-create .form-field label { display: block; font-size: 13px; color: var(--text-tertiary); margin-bottom: 6px; }
.fin-create .input { width: 100%; box-sizing: border-box; }
.fin-amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; }
.fin-calc { font-size: 13px; color: var(--text-2); margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.fin-sep { margin: 14px 0; border-top: 1px solid var(--border-subtle, rgba(127,127,127,0.14)); }
.fin-err { color: var(--danger, #c0392b); min-height: 16px; margin-top: 8px; }
.fin-detail .fin-d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fin-detail .fin-d-no { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fin-kv { display: flex; gap: 12px; font-size: 13.5px; line-height: 1.6; margin-top: 6px; }
.fin-kv .k { flex: 0 0 96px; color: var(--text-tertiary); }
.fin-kv .v { flex: 1; min-width: 0; color: var(--text-1); overflow-wrap: anywhere; }
.fin-warn { color: #b4690e; }
.fin-inv {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(130px, .75fr) minmax(150px, .85fr) auto;
  align-items: center;
  gap: 12px 20px;
  width: 100%; min-width: 0; box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 0;
  background: var(--bg-surface);
}
.fin-inv__field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fin-inv__label { color: var(--text-tertiary); font-size: 11px; line-height: 1.35; }
.fin-inv__value { color: var(--text-primary); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.fin-inv__number .fin-inv__value { font-weight: 600; }
.fin-inv-download { justify-self: end; white-space: nowrap; }
.fin-process { margin-top: 12px; }
.fin-process-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fin-complete .form-field { margin-bottom: 10px; }
.fin-complete .form-field label { display: block; font-size: 13px; color: var(--text-tertiary); margin-bottom: 6px; }
.fin-complete .input { width: 100%; box-sizing: border-box; }
.fin-tl-title { font-size: 13.5px; font-weight: 600; color: var(--text-1); margin: 12px 0 8px; }
.fin-tl-row { display: flex; gap: 12px; font-size: 12.5px; line-height: 1.6; }
/* 项目详情发票摘要卡 */
.fin-inv-card { margin-bottom: 16px; padding: 18px 20px; }
.fin-inv-card .cw-block-head { margin-bottom: 12px; border-bottom: none; padding-bottom: 0; }   /* v150.19（图1）：三项摘要无需分隔线，仅调标题间距（scoped，不动共用类） */
.fin-inv-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px 24px; text-align: center; }   /* v150.19（图3）：列内水平居中 */
.fin-inv-grid .cw-label { margin-bottom: 4px; justify-content: center; display: flex; }
.fin-inv-grid .cw-value { justify-content: center; display: flex; }
.fin-inv-grid .fin-inv-hint { justify-content: center; display: flex; }   /* v150.19 */
.fin-inv-grid .cw-value { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.fin-inv-list { margin-top: 12px; border-top: 1px solid var(--border-subtle, rgba(127,127,127,0.14)); padding-top: 8px; }
.fin-inv-item { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; }
@media (max-width: 720px) {
  .fin-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fin-inv-grid { grid-template-columns: 1fr; }
  .fin-amount-grid { grid-template-columns: 1fr; }
  .fin-inv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 11px 12px; }
  .fin-inv__number, .fin-inv-download { grid-column: 1 / -1; }
  .fin-inv-download { justify-self: start; }
}

/* ==================== v150：付款节点发票（入口/列表/预览弹窗） ==================== */
.bid-pay-inv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border-default); border-radius: 8px;
  background: var(--bg-content); color: var(--text-primary);
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background 160ms ease;
}
.bid-pay-inv-btn:hover { background: var(--bg-surface, rgba(127,127,127,0.06)); }
.inv-list { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.inv-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--border-subtle, rgba(127,127,127,0.16)); border-radius: 10px;
  padding: 12px 14px; background: var(--bg-content);
}
.inv-item__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.inv-item__name {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 600; color: var(--text-primary); font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(127,127,127,0.4);
  overflow-wrap: anywhere;
}
.inv-item__ops { display: flex; gap: 8px; flex: 0 0 auto; }
.inv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; color: var(--text-tertiary); }
.inv-empty__title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.inv-preview { display: flex; flex-direction: column; min-width: 0; }
.inv-preview__frame { width: 100%; height: min(68vh, 720px); border: 1px solid var(--border-subtle, rgba(127,127,127,0.16)); border-radius: 8px; background: #fff; }
.inv-preview--img { align-items: center; justify-content: center; background: var(--bg-surface, rgba(127,127,127,0.05)); border-radius: 8px; padding: 10px; }
.inv-preview__img { max-width: 100%; max-height: min(66vh, 700px); object-fit: contain; border-radius: 6px; cursor: zoom-in; transition: transform 180ms ease; }
.inv-preview__img:active { transform: scale(1.35); cursor: zoom-out; }
.inv-preview--unsupported { align-items: center; gap: 10px; padding: 36px 16px; color: var(--text-tertiary); }
.inv-preview__title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.inv-preview__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
@media (max-width: 720px) {
  .inv-item { flex-direction: column; align-items: stretch; }
  .inv-item__ops { justify-content: flex-end; }
  .inv-preview__frame { height: min(60vh, 520px); }
  .inv-preview__img:active { transform: none; }
}
/* v150.1：手机卡片管理按钮触控区 ≥44px（.user-card 前缀提高特异性，覆盖 .topbar .btn 等全局 min-height:40） */
/* v150.13b：卡片内全部操作按钮（含「人员权限 · 姓名」）统一 44px 触控区——按组件层级统一，不做单按钮补丁 */
.user-card .user-card__manage, .user-card .btn--sm { min-height: 44px; min-width: 44px; flex: 0 0 auto; }

/* v150.13c：窄桌面（≤1280px）人员列表免横向滚动——隐藏「最近登录」列（宽屏桌面与 ≤720px 手机卡片仍显示）
   并收紧单元格水平内边距；保证「操作」列（人员权限/管理按钮）始终在视口内（1080px 实测溢出 147px 致按钮不可见） */
@media (max-width: 1280px) {
  .user-tbl thead th:nth-child(5), .user-tbl tbody td:nth-child(5) { display: none; }
  .user-tbl thead th, .user-tbl tbody td { padding-left: var(--space-8); padding-right: var(--space-8); }
}

/* v150.13d：操作列 sticky 右固定——7 列表格在常见桌面宽度下可能横向溢出（tbl-wrap 滚动），
   sticky 使「人员权限/管理」按钮任何宽度始终可见，其余列经 tbl-wrap 横向滚动从其下方穿过。
   注意：Chromium 表格布局不把 sticky 单元格计入列宽 → 必须显式 width 保留列宽，否则坍缩为 0。
   背景取实色防透字；阴影提示右侧还有被遮内容。（列宽方案统一见 v150.13f 块） */
.user-tbl thead th:last-child, .user-tbl tbody td:last-child {
  position: sticky; right: 0; z-index: 2;
  width: 196px; min-width: 196px; max-width: 196px;
  background: var(--bg-content);
}   /* v150.19（图3）：去 border-left 竖线 + 表头/行同底色（竖痕根因=异色背景叠加边界线） */
/* v150.19：行 hover 含 sticky 操作列——操作列不形成独立色区 */
.user-tbl tbody tr:hover td { background: var(--bg-surface-hover); }
.user-tbl tbody tr:hover td:last-child { background: var(--bg-surface-hover); }
.user-tbl tbody tr.log-row.sel td:last-child { background: var(--bg-subtle); }
/* v150.13f：fixed 布局将剩余宽度归入末列——操作按钮居中使宽列视觉均衡 */
.user-tbl td:last-child .admin-user-actions { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 6px; }   /* v150.19（图2）：按钮独立间距 */
.user-tbl td:last-child .admin-user-actions .btn { min-width: 72px; justify-content: center; }   /* v150.19：等宽不贴边 */

/* ==================== v150.14（图1）：人员与权限页面结构级重构 ==================== */
/* 页头：标题+辅助说明+右侧次级操作（钉钉绑定）——不再悬空于筛选区 */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-head__title { font-size: 20px; font-weight: 700; color: var(--text-1); margin: 0; line-height: 1.3; }
.admin-head__desc { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
/* 统计摘要：紧凑单行（真实接口 stats），不造成页面下移 */
.admin-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-stat { flex: 1 1 150px; min-width: 140px; background: var(--bg-content); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 14px; }
.admin-stat__label { font-size: 12px; color: var(--text-secondary); }
.admin-stat__value { font-size: 20px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; margin-top: 2px; }
.admin-stat__value--ok { color: var(--success, #2e7d32); }
.admin-stat__value--off { color: var(--text-tertiary); }
/* 筛选工具栏：同一行 Grid；搜索占剩余空间；控件统一 44px；查询主操作/重置次操作 */
.admin-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.admin-toolbar__fields { display: flex; flex: 1 1 720px; min-width: 0; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-toolbar__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.admin-toolbar .input { height: 44px; }
.admin-toolbar__search { flex: 1 1 220px; min-width: 180px; }
.admin-toolbar__sel { flex: 0 1 150px; min-width: 132px; }
.admin-toolbar__btn { height: 44px; padding: 0 18px; }
/* 表格卡片 + 底部总数/分页同卡 */
.admin-tbl-card { padding: 0; overflow: hidden; }
.admin-tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border-subtle); flex-wrap: wrap; }
.admin-empty { padding: 32px; text-align: center; }
/* 人员/部门单元格层级：主信息+弱信息 */
.admin-user-name { font-weight: 600; }
.admin-user-dept { margin-bottom: 4px; }
/* 角色标签稳定色系（按岗位固定配色，不随刷新随机；深色主题提高文字亮度） */
.role-tag { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.role-tag--manager { background: rgba(31, 30, 29, 0.16); color: #3f3f66; }
.role-tag--biz { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.role-tag--soft { background: rgba(168, 85, 247, 0.14); color: #7e22ce; }
.role-tag--purchase { background: rgba(234, 88, 12, 0.14); color: #c2410c; }
.role-tag--it { background: rgba(13, 148, 136, 0.14); color: #0f766e; }
.role-tag--finance { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.role-tag--hard { background: rgba(120, 113, 108, 0.16); color: #57534e; }
.role-tag--none { background: rgba(127, 127, 127, 0.14); color: var(--text-secondary); }
[data-theme="dark"] .role-tag--manager { color: #b6b6e0; }
[data-theme="dark"] .role-tag--biz { color: #93c5fd; }
[data-theme="dark"] .role-tag--soft { color: #d8b4fe; }
[data-theme="dark"] .role-tag--purchase { color: #fdba74; }
[data-theme="dark"] .role-tag--it { color: #5eead4; }
[data-theme="dark"] .role-tag--finance { color: #86efac; }
[data-theme="dark"] .role-tag--hard { color: #d6d3d1; }
/* 权限状态标签：继承=中性灰 / 已自定义=中性蓝紫 / 停用=灰 */
.perm-tag { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.perm-tag--inherit { background: rgba(127, 127, 127, 0.10); color: var(--text-secondary); }
.perm-tag--custom { background: rgba(99, 102, 241, 0.12); color: #4338ca; }
[data-theme="dark"] .perm-tag--custom { color: #a5b4fc; }
.perm-tag--disabled { background: rgba(0, 0, 0, 0.06); color: var(--text-tertiary); }
[data-theme="dark"] .perm-tag--disabled { background: rgba(255, 255, 255, 0.08); }
/* 手机卡片操作区：主操作+次操作并列，触控 ≥44px */
.user-card__ops { display: flex; gap: 8px; }
.user-card__ops .btn { min-height: 44px; flex: 1 1 0; }

/* ==================== v150.15：关于页版本信息区 ==================== */
.about-version .kv { border-bottom: 1px dashed var(--border-subtle); }
.about-version .kv:last-of-type { border-bottom: none; }
.about-ver-toggle { margin: 8px 0 4px; }
.about-ver-warn { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--warning-soft, rgba(184, 134, 11, 0.12)); color: var(--warning, #b9770a); font-size: 13px; line-height: 1.6; }
.about-ver-error { color: var(--danger, #c0392b); }
.about-version .btn { min-height: 32px; }

/* ==================== v150.17（图3）：标准设置行（图标|文本|控件 垂直居中） ==================== */
.setting-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.setting-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-surface-hover, rgba(31, 30, 29, 0.08)); color: var(--text-secondary); flex: none; }
.setting-row__text { flex: 1 1 0; min-width: 0; }
.setting-row__title { font-weight: 600; font-size: 14px; color: var(--text-1); }
.setting-row__control { flex: none; }

/* ==================== v150.16：个人权限编辑器结构级重构（modal--upm） ==================== */
/* 弹窗尺寸：880px / 视口 90%；头部固定（modal-head）+ 主体独立滚动 + 底部操作栏固定；背景滚动锁由 overlay 提供 */
.modal--upm { width: min(880px, 96vw); max-width: 96vw; margin: 0 auto; height: min(90vh, 900px); display: flex; flex-direction: column; }   /* v150.16：margin 覆盖 2118 行手机 .modal 的 0 16px（避免被 flex 挤压） */
.modal--upm .modal-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
/* 人员摘要条 */
.upm2 { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.upm2-summary { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.upm2-summary__main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upm2-summary__name { font-weight: 700; font-size: 16px; }
.upm2-dirty-badge { background: var(--warning-soft, rgba(184, 134, 11, 0.14)); color: var(--warning, #b9770a); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.upm2-summary__stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.upm2-disabled-warn { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--danger-soft, rgba(192, 57, 43, 0.10)); color: var(--danger, #c0392b); font-size: 13px; }
/* 主体：左导航 + 内容（各自滚动） */
.upm2-main { flex: 1 1 0; min-height: 0; display: flex; }
.upm2-nav { flex: 0 0 176px; border-right: 1px solid var(--border-subtle); overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.upm2-nav__item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; min-height: 40px; border-radius: 8px; border: none; background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; text-align: left; }
.upm2-nav__item:hover { background: var(--bg-surface-hover, rgba(31, 30, 29, 0.08)); }
.upm2-nav__item.is-on { background: var(--bg-surface-hover, rgba(31, 30, 29, 0.10)); color: var(--text-1); font-weight: 600; }
.upm2-nav__count { font-size: 11px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.upm2-content-wrap { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.upm2-content { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 12px 16px; }
.upm2-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.upm2-search { flex: 1 1 0; min-width: 0; height: 40px; }
.upm2-count { white-space: nowrap; }
/* 模块分组 */
.upm2-module { margin-bottom: 14px; }
.upm2-module__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 4px; cursor: pointer; border-bottom: 1px solid var(--border-default); }
.upm2-module__title { font-weight: 700; font-size: 14px; color: var(--text-1); }
.upm2-module__meta { font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.upm2-module__batch { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
/* 权限项：名称+用途 | 三态 | 详情 */
.upm2-perm { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-subtle); }
.upm2-perm.is-highrisk { background: var(--warning-soft, rgba(184, 134, 11, 0.06)); }
.upm2-perm__info { flex: 1 1 0; min-width: 0; }
.upm2-perm__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14px; color: var(--text-1); }
.upm2-perm__purpose { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.upm2-risk-tag { background: var(--warning-soft, rgba(184, 134, 11, 0.14)); color: var(--warning, #b9770a); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.upm2-final { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.upm2-final--allow { background: var(--success-soft, rgba(46, 125, 50, 0.12)); color: var(--success, #2e7d32); }
.upm2-final--deny { background: rgba(0, 0, 0, 0.06); color: var(--text-tertiary); }
.upm2-final--off { background: rgba(0, 0, 0, 0.06); color: var(--text-tertiary); }
/* 三态选择器：等宽 + 图标 + 40px（手机 44px）；状态不只靠颜色（图标+aria-pressed） */
.upm2-seg { display: flex; gap: 4px; flex: 0 0 auto; }
.upm2-seg__btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 74px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-default); background: var(--bg-content); color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.upm2-seg__glyph { font-size: 12px; }
.upm2-seg__btn:hover { border-color: var(--border-strong); }
.upm2-seg__btn.is-on { border-color: var(--text-1); box-shadow: 0 0 0 1px var(--text-1) inset; color: var(--text-1); font-weight: 600; }
.upm2-seg__btn--allow.is-on { color: var(--success, #2e7d32); border-color: var(--success, #2e7d32); box-shadow: 0 0 0 1px var(--success, #2e7d32) inset; }
.upm2-seg__btn--deny.is-on { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); box-shadow: 0 0 0 1px var(--danger, #c0392b) inset; }
.upm2-seg__btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.upm2-perm__more { border: none; background: transparent; color: var(--text-tertiary); font-size: 12px; cursor: pointer; white-space: nowrap; min-height: 40px; }
.upm2-perm-detail { background: var(--bg-surface-subtle, rgba(31, 30, 29, 0.06)); border-radius: 8px; padding: 10px 14px; margin: -6px 0 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.8; }
.upm2-perm-detail__risk { color: var(--warning, #b9770a); }
.upm2-empty { text-align: center; padding: 40px 0; }
/* 常用组合 */
.upm2-combo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 4px; border-top: 1px dashed var(--border-subtle); }
/* 差异 + 底栏 */
.upm2-diff-host { border-top: 1px solid var(--border-subtle); padding: 8px 16px; background: var(--bg-surface-subtle, rgba(31, 30, 29, 0.05)); }
.upm2-warn { color: var(--danger, #c0392b); font-size: 13px; }
.upm2-diff__toggle { min-height: 32px; }
.upm2-diff__list { margin-top: 8px; font-size: 12px; line-height: 1.9; }
.upm2-diff__list .add { color: var(--success, #2e7d32); }
.upm2-diff__list .rev { color: var(--danger, #c0392b); }
.upm2-diff__risk { color: var(--warning, #b9770a); font-weight: 600; }
.upm2-reason { height: 34px; margin-top: 6px; }
.upm2-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border-subtle); }
.upm2-save, .upm2-revert { min-height: 40px; }
/* 手机 ≤720：全屏编辑器 + 顶部横向模块标签 + 三态撑满 */
@media (max-width: 720px) {
  .modal--upm { width: 100vw; max-width: 100vw; margin: 0; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-mask:has(.modal--upm) { padding: 0; }
  .upm2-main { flex-direction: column; }
  .upm2-nav { flex: 0 0 auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 8px 10px; }
  .upm2-nav__item { flex: 0 0 auto; min-height: 44px; }
  .upm2-content { padding: 10px 12px; }
  .upm2-perm { flex-wrap: wrap; }
  .upm2-perm__info { flex: 1 1 100%; }
  .upm2-seg { flex: 1 1 100%; }
  .upm2-seg__btn { flex: 1 1 0; min-width: 0; height: 44px; }
  .upm2-perm__more { min-height: 44px; }
  .upm2-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .upm2-reason { height: 40px; }
}

/* ==================== v150.2：付款计划发票列（Grid 第 9 列） ==================== */
.pay-inv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--border-default); border-radius: 8px;
  background: var(--bg-content); color: var(--text-primary);
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background 160ms ease;
}
.pay-inv-btn:hover { background: var(--bg-surface-hover, rgba(127,127,127,0.06)); }
.pay-inv-btn:focus-visible { outline: 2px solid #1677ff; outline-offset: 2px; }
.pay-inv-none { white-space: normal; line-height: 1.5; }
@media (max-width: 1023px) {
  .payrow .payment-field--inv { grid-column: 1 / -1; }
  .payrow .pay-inv-btn { width: 100%; min-height: 44px; }
}

/* v150.2：状态选择卡两列等宽（签约信息均分的上半部分，与 cw-signed-grid 对齐） */
.cw-status-group { gap: 16px; }
.cw-status-opt { flex: 1 1 0; min-width: 0; }

/* ==================== v150.4：软装财务管理筛选工具栏（Grid 同行、控件统一 h44） ==================== */
.fin-filter {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 200px auto auto auto;
  gap: 10px; align-items: center;
  margin: 24px 0 20px;                    /* 上距统计卡 24 / 下距标签栏 20 */
  padding: 12px; border: 1px solid var(--border-subtle, rgba(127,127,127,0.16));
  border-radius: 10px; background: var(--bg-content);
}
.fin-filter .fin-filter-input,
.fin-filter .fin-filter-select,
.fin-filter .fin-filter-btn {
  height: 44px; box-sizing: border-box; width: 100%; min-width: 0;
  font-size: 13.5px; line-height: 1; font-family: inherit;
  border-width: 1px; border-style: solid; border-color: var(--border-default);
  border-radius: 8px;
}
.fin-filter .fin-filter-input { padding: 0 12px; color: var(--text-primary); background: var(--bg-content); }
.fin-filter .fin-filter-input::placeholder { color: var(--text-tertiary); }
.fin-filter .fin-filter-input:focus-visible,
.fin-filter .fin-filter-select:focus-visible { outline: 2px solid #1677ff; outline-offset: -1px; border-color: transparent; }
.fin-filter .fin-filter-select {
  padding: 0 34px 0 12px; color: var(--text-primary); background: var(--bg-content);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer;
}
.fin-filter .fin-filter-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0 16px; white-space: nowrap; }
.fin-filter .fin-filter-btn:hover { filter: brightness(0.98); }
.fin-filter-actions { display: contents; }
/* 1024–1199：搜索独占第一行，状态+按钮第二行（等高不变） */
@media (min-width: 1024px) and (max-width: 1199px) {
  .fin-filter { grid-template-columns: minmax(280px, 1fr) 200px 88px 88px; }
}
/* ≤1023（含手机）：搜索单独一行；状态一行；查询/重置等宽各半 */
@media (max-width: 1023px) {
  .fin-filter { grid-template-columns: 1fr 1fr; }
  .fin-filter .fin-filter-input { grid-column: 1 / -1; }
  .fin-filter .fin-filter-select { grid-column: 1 / -1; }
  .fin-filter .fin-filter-mine { grid-column: 1 / -1; min-height: 40px; }
  .fin-filter .fin-filter-actions {
    display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px; width: 100%; min-width: 0;
  }
  .fin-filter .fin-filter-btn { min-height: 44px; }
}

/* v150.8：付款计划 已收到/已开票/发票 三列独立单元格（表头与行共用 --payment-columns） */
.payrow .payrow-cell-check { min-width: 0; display: flex; align-items: center; justify-content: flex-start; }
.payrow .pay-inv-btn { white-space: nowrap; height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* v150.8：财务页「待我处理」复选 + 筛选行微调 */
.fin-filter-mine { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-primary); white-space: nowrap; }
.fin-filter-mine input { width: 16px; height: 16px; }
/* 开票列表：固定并均衡分配列宽，避免浏览器按短内容挤压“项目”列；名称允许完整换行显示。 */
.fin-tbl { width: 100%; min-width: 0; table-layout: fixed; }
.fin-tbl th:nth-child(1), .fin-tbl td:nth-child(1) { width: 16%; }
.fin-tbl th:nth-child(2), .fin-tbl td:nth-child(2) { width: 22%; }
.fin-tbl th:nth-child(3), .fin-tbl td:nth-child(3) { width: 16%; }
.fin-tbl th:nth-child(4), .fin-tbl td:nth-child(4) { width: 14%; }
.fin-tbl th:nth-child(5), .fin-tbl td:nth-child(5) { width: 12%; }
.fin-tbl th:nth-child(6), .fin-tbl td:nth-child(6) { width: 9%; }
.fin-tbl th:nth-child(7), .fin-tbl td:nth-child(7) { width: 11%; }
.fin-tbl tbody td { white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.fin-tbl .fin-proj-name { white-space: normal; overflow-wrap: anywhere; word-break: normal; line-height: 1.45; }
/* 金额列右对齐（表头+值一致） */
.fin-tbl th:nth-child(4), .fin-tbl td:nth-child(4) { text-align: right; }
/* 操作列居中 */
.fin-tbl th:last-child, .fin-tbl td:last-child { text-align: center; }

/* 付款申请八列数据表：显式纳入“操作”列宽，避免前七列占满 100% 后操作按钮被裁切。 */
@media (min-width: 768px) {
  .tbl-wrap.pr-table-wrap { max-width: 100%; overflow-x: auto; }
  .pr-table.fin-tbl { width: 100%; min-width: 1040px; table-layout: fixed; }
  .pr-table.fin-tbl th:nth-child(1), .pr-table.fin-tbl td:nth-child(1) { width: 14%; }
  .pr-table.fin-tbl th:nth-child(2), .pr-table.fin-tbl td:nth-child(2) { width: 20%; }
  .pr-table.fin-tbl th:nth-child(3), .pr-table.fin-tbl td:nth-child(3) { width: 9%; }
  .pr-table.fin-tbl th:nth-child(4), .pr-table.fin-tbl td:nth-child(4) { width: 17%; }
  .pr-table.fin-tbl th:nth-child(5), .pr-table.fin-tbl td:nth-child(5) { width: 13%; }
  .pr-table.fin-tbl th:nth-child(6), .pr-table.fin-tbl td:nth-child(6) { width: 7%; }
  .pr-table.fin-tbl th:nth-child(7), .pr-table.fin-tbl td:nth-child(7) { width: 8%; }
  .pr-table.fin-tbl th:nth-child(8), .pr-table.fin-tbl td:nth-child(8) { width: 12%; }
  .pr-table.fin-tbl td:last-child { padding-inline: 8px; white-space: nowrap; }
  .pr-table.fin-tbl .fin-actions { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .pr-table.fin-tbl .fin-actions .btn { white-space: nowrap; }
}
@media (max-width: 767px) {
  .pr-table.fin-tbl { min-width: 0; }
}

/* v150.8：查询/重置按钮等宽（min-width 统一） */
.fin-filter .fin-filter-btn { min-width: 96px; }


/* ==================== v150.27：移动端统一整改（共享规范） ==================== */
/* 全局：确保底部导航 safe-area 不遮挡最后一张卡片 */
@media (max-width: 767px) {
  .m-shell { padding-bottom: calc(var(--dock-h, 60px) + env(safe-area-inset-bottom, 0px) + 12px); }

  /* 统计卡：降低高度与视觉重量 */
  .fin-summary { gap: 6px; }
  .fin-sum-card { padding: 8px 10px; min-height: unset; }
  .fin-sum-num { font-size: 18px; }
  .fin-sum-label { font-size: 11px; }
  .admin-stats { gap: 6px; }
  .admin-stat { padding: 6px 10px; }
  .admin-stat__value { font-size: 16px; }

  /* 筛选区紧凑化 */
  .admin-toolbar { gap: 6px; }
  .admin-toolbar .input, .admin-toolbar select.input, .admin-toolbar__btn { height: 40px; }
  .fin-filter { gap: 6px; }
  .fin-filter .input, .fin-filter-select, .fin-filter-btn { height: 40px; }

  /* 操作按钮不过大 */
  .admin-toolbar__btn { padding: 0 14px; }
  .fin-filter-btn { padding: 0 12px; }

  /* 表格 → 卡片过渡：确保最后一张不被遮挡 */
  .fin-tbl, .user-tbl, .bid-list-tbl { margin-bottom: 8px; }

  /* 消息中心：筛选紧凑 + 空状态降低 */
  .inbox-side { gap: 4px; }
  .inbox-side__item { padding: 8px 10px; min-height: unset; }
  .inv-empty { padding: 24px 16px; }
  .inv-empty__title { font-size: 14px; }

  /* 卡片内边距统一 */
  .card { padding: 12px; }
  .card--tight { padding: 10px; }
}

/* v150.27: 部门彩色徽标（复用 role-tag 色系，稳定映射） */
.dept-tag { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.dept-tag--none { background: var(--bg-surface-hover, rgba(31,30,29,0.05)); color: var(--text-tertiary, #8a8f98); }
[data-theme="dark"] .dept-tag--none { background: rgba(255,255,255,0.06); color: var(--text-tertiary, #8a8f98); }
.dept-tag--biz { background: rgba(59,130,246,0.14); color: #1d4ed8; }
.dept-tag--soft { background: rgba(168,85,247,0.14); color: #7e22ce; }
.dept-tag--purchase { background: rgba(234,88,12,0.14); color: #c2410c; }
.dept-tag--it { background: rgba(13,148,136,0.14); color: #0f766e; }
.dept-tag--finance { background: rgba(22,163,74,0.14); color: #15803d; }
.dept-tag--hard { background: rgba(120,113,108,0.16); color: #57534e; }
.dept-tag--manager { background: rgba(31,30,29,0.16); color: #3f3f66; }

/* v150.28：手机端页面级布局收口（截图复测：投标卡、消息中心、人员页、财务列表） */
@media (max-width: 767px) {
  /* m-shell 已统一为 Dock 留出滚动空间，不要再给 m-page 叠加第二份底部留白。 */

  /* 投标列表：桌面列宽/右对齐不得继承到手机卡片标题；无结果值时不渲染空的“状态”行。 */
  .bid-list-tbl tr.log-row td:nth-child(2) { width: auto !important; text-align: left !important; }
  .bid-list-tbl tr.log-row .bid-name-cell,
  .bid-list-tbl tr.log-row .bid-name-text { display: block; width: 100%; max-width: none; text-align: left !important; }
  .bid-list-tbl tr.log-row td.bid-status-cell[aria-hidden="true"] { display: none; }

  /* 管理员：不要留下“桌面表格已隐藏、但外层卡片/分页还在”的空白占位；手机卡片视图自带分页。 */
  .admin-tbl-card { display: none !important; }
  .user-cards { display: block; padding-bottom: 0; }
  .user-mobile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px 2px; }

  /* 人员筛选：用单列 Grid 明确排出「字段区 → 操作区」两行，避免窄屏下 flex
     主轴切换、旧桌面 basis/高度约束把查询操作推到视口底部。 */
  .admin-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; gap: 12px; width: 100%; min-width: 0; margin-bottom: 16px; }
  .admin-toolbar__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; min-width: 0; min-height: 0; height: auto; flex: none; align-content: start; }
  .admin-toolbar__fields > * { box-sizing: border-box; width: 100%; min-width: 0; }
  .admin-toolbar__search,
  .admin-toolbar__dept,
  .admin-toolbar__perm { grid-column: 1 / -1; }
  .admin-toolbar__search { flex: none; min-width: 0; font-size: 16px; }
  .admin-toolbar__sel { flex: none; min-width: 0; width: 100%; padding-inline: 12px; font-size: 15px; }
  .admin-toolbar__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; min-width: 0; min-height: 0; height: auto; flex: none; align-content: start; }
  .admin-toolbar__btn { width: 100%; min-width: 0; height: 48px !important; padding: 0 12px; white-space: nowrap; }
  .admin-toolbar .input,
  .admin-toolbar select.input { height: 48px !important; }

  /* 用户卡片放松信息节奏；最近登录采用“说明在上、时间在下”，避免两段细小文字挤在一条基线上。 */
  .user-card { padding: 18px 16px 16px; margin-bottom: 14px; border-radius: 14px; }
  .user-card__tags { gap: 10px; margin-top: 14px; }
  .user-card__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 14px; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-surface-hover, rgba(127,127,127,0.06)); }
  .user-card__meta-label { color: var(--text-tertiary); font-size: 12px; line-height: 1.4; }
  .user-card__meta-value { max-width: 100%; color: var(--text-secondary); font-size: 14px; font-weight: 600; line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
  .user-card__ops { gap: 10px; margin-top: 12px; }
  .user-card__ops .btn { min-height: 48px; }

  /* 软装财务：7 列数据表在手机转为字段卡片，不再裁切表头/操作列。 */
  .fin-tbl { display: block; width: 100%; table-layout: auto; overflow: visible; border: 0; background: transparent; }
  .fin-tbl thead { display: none; }
  .fin-tbl tbody { display: flex; flex-direction: column; gap: 10px; }
  .fin-tbl tbody tr { display: block; height: auto; padding: 8px 12px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-content); }
  .fin-tbl tbody tr:hover { background: var(--bg-content); }
  .fin-tbl tbody td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100% !important; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); text-align: right !important; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
  .fin-tbl tbody td:last-child { border-bottom: 0; }
  .fin-tbl tbody td[data-label]::before { content: attr(data-label); flex: 0 0 82px; color: var(--text-tertiary); font-size: 12px; text-align: left; }
  .fin-tbl tbody td[data-label='项目'] { align-items: flex-start; }
  .fin-tbl .fin-actions { justify-content: flex-end; flex-wrap: wrap; }
  .fin-tbl tbody td[colspan] { justify-content: center; text-align: center !important; border-bottom: 0; }
  .fin-tbl tbody td[colspan]::before { content: none; }
}

/* v150.28：消息中心手机端为“筛选 → 列表 → 单独详情”流程，避免两张空白面板堆叠。 */
@media (max-width: 767px) {
  .inbox-push-card { align-items: flex-start; flex-direction: column; gap: 9px; padding: 12px; }
  .inbox-push-card > .btn { width: 100%; min-height: 40px; }
  .inbox-page { gap: 10px; }
  .inbox-grid { gap: 10px; }
  .inbox-side { display: flex; flex-direction: column; gap: 8px; overflow: visible; }
  .inbox-side__group { display: grid; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; }
  .inbox-side__group:nth-child(2) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inbox-side__group:nth-child(2) .inbox-side__title { display: none; }
  .inbox-side__item { justify-content: center; min-width: 0; min-height: 40px; padding: 6px 4px; font-size: 12px; white-space: nowrap; }
  .inbox-side__badge { margin-left: 0; }
  .inbox-list { min-height: 0; padding: 8px; gap: 6px; }
  .inbox-toolbar { display: flex; flex-direction: column; align-items: stretch; }
  .inbox-search { width: 100%; }
  .inbox-batch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .inbox-batch .btn { min-width: 0; padding-inline: 5px; font-size: 11px; white-space: nowrap; }
  .inbox-list > .state--empty { padding: 18px 8px; }
  .inbox-list > .state--empty .state-icon { width: 44px; height: 44px; margin-bottom: 8px; }
  .inbox-detail { display: none; min-height: 0; padding: 12px; }
  .inbox-page.is-detail-open .inbox-list { display: none; }
  .inbox-page.is-detail-open .inbox-detail { display: block; }
  .inbox-mobile-back { display: inline-flex; align-self: flex-start; margin-bottom: 10px; }
  .inbox-page.is-detail-open .inbox-mobile-back { display: inline-flex; }
  .inbox-filterbar { justify-content: flex-end; min-height: 40px; }
  .inbox-filterbar .inbox-title { display: none; }
}

.inbox-mobile-back { display: none; }
[data-theme="dark"] .dept-tag--biz { background: rgba(59,130,246,0.18); color: #93c5fd; }
[data-theme="dark"] .dept-tag--soft { background: rgba(168,85,247,0.18); color: #d8b4fe; }
[data-theme="dark"] .dept-tag--purchase { background: rgba(234,88,12,0.18); color: #fdba74; }
[data-theme="dark"] .dept-tag--it { background: rgba(13,148,136,0.18); color: #5eead4; }
[data-theme="dark"] .dept-tag--finance { background: rgba(22,163,74,0.18); color: #86efac; }
[data-theme="dark"] .dept-tag--hard { background: rgba(120,113,108,0.2); color: #d6d3d1; }
[data-theme="dark"] .dept-tag--manager { background: rgba(247,248,248,0.12); color: #e5e5e5; }

/* v150.32: 软装财务详情采用等宽分区与明确留白；桌面七列表头/内容共用同一中心线。 */
.fin-detail-grouped {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px 22px;
  width: 100%;
  min-width: 0;
}
.fin-detail-grouped > .fin-d-head,
.fin-detail-grouped > .fin-detail-sec--full,
.fin-detail-grouped > .fin-detail-full { grid-column: 1 / -1; min-width: 0; }
.fin-detail-grouped > .fin-d-head {
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 4px 2px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.14));
}
.fin-detail-grouped .fin-d-no { font-size: 16px; line-height: 1.45; }
.fin-detail-grouped .fin-d-head .tiny.muted { margin-top: 4px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.fin-detail-grouped > .fin-detail-sec:not(.fin-detail-sec--full) {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--border-subtle, rgba(127,127,127,.14));
  border-radius: 12px;
  background: var(--bg-surface, #fff);
}
.fin-detail-grouped .fin-detail-sec__title {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.14));
  color: var(--text-secondary, #5e5d59);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
}
.fin-detail-grouped .fin-detail-sec:not(.fin-detail-sec--full) .fin-kv {
  display: grid;
  grid-template-columns: minmax(136px, .42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.14));
  font-size: 13.5px;
  line-height: 1.55;
}
.fin-detail-grouped .fin-detail-sec:not(.fin-detail-sec--full) .fin-kv:last-child { border-bottom: 0; padding-bottom: 0; }
.fin-detail-grouped .fin-detail-sec:not(.fin-detail-sec--full) .fin-kv .k { min-width: 0; white-space: normal; }
.fin-detail-grouped .fin-detail-sec:not(.fin-detail-sec--full) .fin-kv .v { min-width: 0; overflow-wrap: anywhere; }
.fin-detail-grouped > .fin-detail-sec--full {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.fin-detail-grouped > .fin-detail-sec--full .fin-detail-sec__title { margin-bottom: 10px; }
.fin-detail-grouped > .fin-detail-full {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle, rgba(127,127,127,.14));
  border-radius: 12px;
  background: var(--bg-surface, #fff);
}
.fin-detail-full > .fin-tl-list,
.fin-detail-full > .fin-tl-empty { width: 100%; max-width: none; }
.fin-detail-full > .fin-tl-title { margin: 0 0 10px; font-size: 13px; }
.fin-detail-full > .fin-process + .fin-tl-title { margin-top: 18px; padding-top: 14px; }

@media (min-width: 768px) {
  .fin-tbl { width: 100%; min-width: 0; table-layout: fixed; }
  .fin-tbl th:nth-child(1), .fin-tbl td:nth-child(1),
  .fin-tbl th:nth-child(2), .fin-tbl td:nth-child(2),
  .fin-tbl th:nth-child(3), .fin-tbl td:nth-child(3),
  .fin-tbl th:nth-child(4), .fin-tbl td:nth-child(4),
  .fin-tbl th:nth-child(5), .fin-tbl td:nth-child(5),
  .fin-tbl th:nth-child(6), .fin-tbl td:nth-child(6),
  .fin-tbl th:nth-child(7), .fin-tbl td:nth-child(7) { width: 14.2857%; }
  .fin-tbl.data-tbl thead th,
  .fin-tbl.data-tbl tbody td { text-align: center; vertical-align: middle; }
  .fin-tbl tbody td { padding-inline: 12px; white-space: normal; overflow-wrap: anywhere; }
  .fin-tbl .fin-proj-name { white-space: normal; overflow-wrap: anywhere; word-break: normal; line-height: 1.5; }
  .fin-tbl .fin-actions { justify-content: center; }
}

@media (max-width: 767px) {
  .fin-detail-grouped { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fin-detail-grouped > .fin-d-head,
  .fin-detail-grouped > .fin-detail-sec,
  .fin-detail-grouped > .fin-detail-sec--full,
  .fin-detail-grouped > .fin-detail-full { grid-column: 1; }
  .fin-detail-grouped > .fin-detail-sec:not(.fin-detail-sec--full),
  .fin-detail-grouped > .fin-detail-full { padding: 14px; }
  .fin-detail-grouped > .fin-detail-sec:not(.fin-detail-sec--full) { grid-template-columns: minmax(0, 1fr); }
  .fin-detail-grouped .fin-detail-sec:not(.fin-detail-sec--full) .fin-kv { grid-template-columns: minmax(126px, .4fr) minmax(0, 1fr); gap: 10px; }
}

/* 请款单导入：逐笔校对卡片，避免宽表格在弹窗/手机上横向挤压。 */
.pay-import-help,
.pay-import-banner {
  display: flex; flex-direction: column; gap: 5px;
  padding: 13px 15px; margin: 0 0 12px;
  border: 1px solid var(--border-default); border-radius: 10px;
  background: var(--bg-surface, rgba(127,127,127,.05));
  color: var(--text-2); font-size: 13px; line-height: 1.55;
}
.pay-import-help strong,
.pay-import-banner strong { color: var(--text-1); font-size: 14px; }
.pay-import-banner.piv-warning { display: flex; }
.pay-import-project-warning .btn { align-self: flex-start; }
.pay-import-readiness {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 8px;
  background: var(--bg-surface, rgba(127,127,127,.05)); color: var(--text-2);
  font-size: 12px; line-height: 1.5; overflow-wrap: anywhere;
}
.pay-import-source {
  margin: 0 0 12px; border: 1px solid var(--border-default); border-radius: 10px;
  background: var(--bg-content); overflow: hidden;
}
.pay-import-source summary { padding: 10px 14px; color: var(--text-2); cursor: pointer; font-size: 13px; }
.pay-import-source__image {
  display: block; width: 100%; max-height: min(52vh, 520px); object-fit: contain;
  background: var(--bg-surface, rgba(127,127,127,.05)); border-top: 1px solid var(--border-default);
}
.pay-import-verify {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--border-default); border-radius: 8px; color: var(--text-2);
  font-size: 13px; line-height: 1.45; cursor: pointer;
}
.pay-import-verify input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--primary); }
.pay-import-verify:has(input:checked) {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border-default));
  background: color-mix(in srgb, var(--success) 6%, var(--bg-content));
}
.modal--fin-detail:has(.pay-import-dialog) {
  width: min(1040px, calc(100vw - 32px)); max-width: 1040px;
  height: auto; max-height: min(900px, calc(100dvh - 32px));
  box-sizing: border-box; overflow: hidden;
}
.modal--fin-detail:has(.pay-import-dialog) > .modal-head,
.modal--fin-detail:has(.pay-import-dialog) > .modal-foot { flex: 0 0 auto; }
.modal--fin-detail:has(.pay-import-dialog) > .modal-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
.pay-import-dialog { min-width: 0; }
.modal--fin-detail:has(.pay-import-dialog) > .modal-foot { padding: 16px 24px; }
.pay-import-dialog__footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%; }
.pay-import-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 1px 3px 6px 1px; }
.pay-import-row {
  min-width: 0; padding: 14px; border: 1px solid var(--border-default);
  border-radius: 11px; background: var(--bg-content);
}
.pay-import-row--invalid { border-color: color-mix(in srgb, var(--danger) 45%, var(--border-default)); }
.pay-import-row--done { border-color: color-mix(in srgb, var(--success) 45%, var(--border-default)); }
.pay-import-row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pay-import-row__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pay-import-row__title > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pay-import-row__title strong { color: var(--text-1); font-size: 14px; line-height: 1.4; }
.pay-import-row__title .tiny { overflow-wrap: anywhere; }
.pay-import-row__actions { display: flex; flex: 0 0 auto; gap: 8px; }
.pay-import-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pay-import-field--wide { grid-column: 1 / -1; }
.pay-import-fields .form-field { min-width: 0; }
.pay-import-fields .form-field label { overflow-wrap: anywhere; }
.pay-import-fields .input { width: 100%; min-width: 0; box-sizing: border-box; }
.pay-import-errors,
.pay-import-notes { margin: 0 0 9px; color: var(--danger); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.pay-import-notes { color: var(--text-tertiary); }
.pay-import-notes[hidden] { display: none; }
@media (max-width: 767px) {
  .modal--fin-detail:has(.pay-import-dialog) { width: calc(100vw - 24px); height: auto; max-height: calc(100dvh - 24px); }
  .pay-import-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pay-import-field--wide { grid-column: auto; }
  .pay-import-row { padding: 12px; }
  .pay-import-row__head { align-items: flex-start; }
  .pay-import-row__actions .btn { min-height: 36px; padding-inline: 9px; }
  .pay-import-dialog__footer { justify-content: flex-end; gap: 12px; }
  .modal--fin-detail:has(.pay-import-dialog) > .modal-foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .pay-import-dialog__footer .btn { flex: 0 0 auto; min-height: 44px; padding-inline: 14px; }
}
@media (max-width: 420px) {
  .pay-import-row__head { flex-wrap: wrap; }
  .pay-import-row__actions { width: 100%; }
  .pay-import-row__actions .btn { width: 100%; }
}

/* v150.56：手机端投标详情付款计划修复
   表头此前被 .payrow { display:grid !important } 意外重新显示；长触发条件也被塞进半宽列，
   且只读值继承了输入框 42px 行高。手机改成真正的字段卡片，长文本占整行并自然换行。 */
@media (max-width: 1023px) {
  .payrow--head { display: none !important; }
  .payment-node-list {
    gap: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .payrow:not(.payrow--head) {
    align-items: start;
    margin: 0;
  }
  .payrow .payment-field--trigger { grid-column: 1 / -1; }
  .payrow .payment-field--trigger .bond-rec-read {
    display: block;
    height: auto;
    min-height: 0;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .payrow .payrow-cell-check:has(input)::before { content: none; }
  .payrow .payrow-cell-check:not(:has(input)) {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .payrow .payrow-cell-check:not(:has(input))::before { margin: 0; }
  .payrow .payment-field--inv { grid-column: 1 / -1; }
}

/* 合同签约状态在窄屏保持紧凑、字段对齐，避免状态卡与签约信息之间出现大块留白。 */
@media (max-width: 720px) {
  .cw-status-block .cw-block-head { margin-bottom: 14px; padding-bottom: 12px; }
  .cw-status-group { flex-direction: column; gap: 8px; }
  .cw-status-opt {
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
    padding: 10px 12px;
    gap: 2px;
  }
  .cw-status-desc { margin-top: 0; line-height: 1.4; }
  .cw-signed-grid { margin-top: 12px; padding: 10px 12px; gap: 0; }
  .cw-signed-info {
    justify-content: space-between;
    min-height: 38px;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .cw-signed-info:last-child { border-bottom: 0; }
  .cw-signed-value { text-align: right; overflow-wrap: anywhere; }
}

/* v150.60：已中标详情联系人表单在手机端改为规整的标签在上、字段在下布局。 */
@media (max-width: 767px) {
  .bid-client-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px 10px;
    padding: 12px;
  }
  .bid-client-cell:not(.bid-client-cell--op) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    min-width: 0;
  }
  .bid-client-cell[data-label]::before {
    margin: 0;
    font-size: 12px;
    line-height: 18px;
  }
  .bid-client-cell .bid-client-input,
  .bid-client-row textarea.input.bid-client-address {
    display: block;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 22px;
    vertical-align: middle;
    box-sizing: border-box;
  }
  .bid-client-cell[data-label="电话"],
  .bid-client-cell--addr { grid-column: 1 / -1; }
  .bid-client-cell--op {
    position: static;
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }
  .bid-client-del { position: static; width: 40px; height: 40px; }
}

/* 手机人员列表：总人数只展示一次，页码与人数同一行，避免分页器二次换行。 */
@media (max-width: 767px) {
  .user-mobile-foot .pagination {
    width: auto;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    gap: 0;
    overflow: visible;
  }
  .user-mobile-foot .pagination-pages { min-width: 0; }
}

.fb-m-note { margin-top: 4px; color: var(--text-tertiary); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }

@media (max-width: 1023px) {
  .payrow .payrow-cell-check:not(:has(input)) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
  }
  .payrow .payrow-cell-check:not(:has(input))::before {
    display: block;
    margin: 0;
    line-height: 16px;
  }
  .payrow .payrow-cell-check .payrow-check-ro {
    text-align: left;
    font-size: 14px;
    line-height: 20px;
  }
  .payrow .payment-field--inv-empty { display: none !important; }
}

/* Compact access notice shared by finance and payment pages. */
.permission-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--bg-content);
}
.permission-notice__icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
}
.permission-notice__main { min-width: 0; flex: 1 1 auto; }
.permission-notice__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: var(--font-weight-semibold, 600);
  line-height: 1.45;
}
.permission-notice__description {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.permission-notice__badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface-subtle);
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .permission-notice { align-items: flex-start; gap: 10px; padding: 12px; }
  .permission-notice__icon { flex-basis: 32px; width: 32px; height: 32px; }
  .permission-notice__title { font-size: 14px; }
  .permission-notice__description { font-size: 12.5px; line-height: 1.55; }
  .permission-notice__badge { margin-left: auto; font-size: 10px; }
}

/* v150.80：付款触发条件采用紧凑左对齐编辑态；空值与同一行其他输入高度统一，长内容自动展开。 */
.bid-contract-pays .payment-field--trigger .bid-pay-node-input {
  display: block;
  width: 100%;
  height: auto;
  min-height: 42px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 20px;
  text-align: left !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  resize: none;
  overflow: hidden;
}
.bid-contract-pays .payment-field--trigger .payrow-node-read {
  display: block;
  height: auto;
  min-height: 42px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 1023px) {
  .bid-contract-pays .payment-field--trigger .bid-pay-node-input {
    min-height: 44px;
    font-size: 16px;
  }
}

/* ==================== 经营概览首页 v2：组合视图 / 克制数据层级 ==================== */
.home-fundamentals {
  min-width: 0;
  --home-type-title: 15px;
  --home-type-label: 12px;
  --home-type-value: 20px;
  --home-type-meta: 12px;
  --home-weight-strong: 600;
  --home-weight-label: 500;
  --home-weight-regular: 400;
}
.home-fundamentals .home-toolrow {
  min-height: 38px;
  margin-bottom: 8px;
}
.home-fundamentals .rank-item:focus-visible,
.home-fundamentals .more:focus-visible,
.home-fundamentals .ov-business-title:focus-visible,
.home-fundamentals .ov-business-count:focus-visible {
  outline: 2px solid var(--profit-positive);
  outline-offset: 2px;
}

.home-fundamentals .ov {
  padding: 22px 26px;
  border-color: var(--border-subtle, var(--border-default));
  border-radius: 11px;
  box-shadow: none;
}
.home-fundamentals .ov-section + .ov-section {
  margin-top: 19px;
  padding-top: 17px;
  border-top-color: var(--border-subtle, var(--border-default));
}
.home-fundamentals .ov-section-head { margin-bottom: 10px; }
.home-fundamentals .ov-section-title {
  color: var(--text-primary);
  font-size: var(--home-type-title);
  font-weight: var(--home-weight-strong);
  line-height: 22px;
  letter-spacing: 0;
}
.home-fundamentals .home-portfolio-head { align-items: center; margin-bottom: 12px; }
.home-fundamentals .home-portfolio-caption { margin-top: 4px; color: var(--text-tertiary); font-size: var(--home-type-meta); font-weight: var(--home-weight-regular); line-height: 18px; }
.home-fundamentals .home-portfolio-total { display: flex; align-items: baseline; gap: 6px; color: var(--text-secondary); }
.home-fundamentals .home-portfolio-total strong {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: var(--home-weight-strong);
  line-height: 32px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
.home-fundamentals .home-portfolio-total span { font-size: 13px; font-weight: var(--home-weight-label); line-height: 18px; }
.home-fundamentals .ov-row--core {
  grid-template-columns: minmax(118px, .72fr) minmax(118px, .72fr) minmax(260px, 2fr);
  align-items: stretch;
}
.home-fundamentals .ov-row--core .ov-cell--metric {
  min-height: 68px;
  padding: 8px 20px;
  justify-content: center;
}
.home-fundamentals .ov-row--core .ov-cell--metric:first-child { padding-left: 0; }
.home-fundamentals .ov-row--core .ov-cell--metric:not(.ov-cell--primary) { padding-left: 20px; }
.home-fundamentals .ov-row--core .ov-cell--metric .ov-value { font-size: var(--home-type-value); font-weight: var(--home-weight-strong); line-height: 26px; }
.home-fundamentals .ov-row--core .ov-cell--metric .ov-label { font-size: var(--home-type-label); font-weight: var(--home-weight-label); line-height: 18px; }
.home-fundamentals .ov-row--core .ov-cell--metric .ov-value.c-doing { color: var(--status-doing, #3b6fd4); }
.home-fundamentals .ov-row--core .ov-cell--metric .ov-value.c-done { color: var(--status-done, #2f9e6e); }
.home-fundamentals .home-portfolio-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 10px;
  padding: 9px 0 9px 20px;
  border-left: 1px solid var(--border-subtle, var(--border-default));
}
.home-fundamentals .home-portfolio-status__summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-tertiary); font-size: var(--home-type-label); font-weight: var(--home-weight-label); line-height: 18px; }
.home-fundamentals .home-portfolio-status__value { flex: 0 0 auto; color: var(--text-primary); font-size: 18px; font-weight: var(--home-weight-strong); font-variant-numeric: tabular-nums; line-height: 24px; }
.home-fundamentals .home-portfolio-status__note { color: var(--text-tertiary); font-size: var(--home-type-label); font-weight: var(--home-weight-regular); line-height: 17px; }
.home-fundamentals .home-portfolio-meter {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-surface-subtle, var(--border-subtle));
}
.home-fundamentals .home-portfolio-meter__fill { display: block; height: 100%; border-radius: inherit; background: var(--profit-positive); transition: width 220ms ease; }
.home-fundamentals .home-portfolio-meter--empty { background: var(--bg-surface-subtle, var(--border-subtle)); }
.home-fundamentals .home-workflow-breakdown {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, var(--border-default));
}
.home-fundamentals .home-workflow-breakdown__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.home-fundamentals .home-workflow-breakdown__title { margin: 0; color: var(--text-primary); font-size: 14px; font-weight: var(--home-weight-strong); line-height: 20px; }
.home-fundamentals .home-workflow-breakdown__caption { margin: 2px 0 0; color: var(--text-tertiary); font-size: var(--home-type-meta); font-weight: var(--home-weight-regular); line-height: 18px; }
.home-fundamentals .home-workflow-breakdown__summary { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 14px; color: var(--text-secondary); font-size: var(--home-type-meta); line-height: 18px; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-workflow-breakdown__untracked { color: var(--text-tertiary); }
.home-fundamentals .home-workflow-breakdown__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.home-fundamentals .home-workflow-stage {
  --home-workflow-stage-accent: var(--text-tertiary);
  min-width: 0;
  padding: 12px 14px 11px;
  border: 0;
  border-inline-end: 1px solid var(--border-subtle, var(--border-default));
  border-radius: 0;
  background: transparent;
}
.home-fundamentals .home-workflow-stage:nth-child(5n) { border-inline-end: 0; }
.home-fundamentals .home-workflow-stage:nth-child(-n+5) { border-bottom: 1px solid var(--border-subtle, var(--border-default)); }
.home-fundamentals .home-workflow-stage--active {
  --home-workflow-stage-accent: var(--info);
}
.home-fundamentals .home-workflow-stage--complete {
  --home-workflow-stage-accent: var(--success);
}
.home-fundamentals .home-workflow-stage--pending {
  --home-workflow-stage-accent: var(--text-tertiary);
}
.home-fundamentals .home-workflow-stage__head { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.home-fundamentals .home-workflow-stage__number { flex: 0 0 auto; color: var(--text-tertiary); font-size: 10px; font-weight: var(--home-weight-label); line-height: 17px; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-workflow-stage__title { display: -webkit-box; min-width: 0; min-height: 34px; overflow: hidden; color: var(--text-primary); font-size: 12px; font-weight: var(--home-weight-label); line-height: 17px; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-fundamentals .home-workflow-stage__completion { margin-top: 7px; color: var(--text-secondary); font-size: 11px; font-weight: var(--home-weight-label); line-height: 16px; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-workflow-stage__track { height: 4px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: var(--border-default); }
.home-fundamentals .home-workflow-stage__track > span { display: block; height: 100%; border-radius: inherit; background: var(--home-workflow-stage-accent); }
.home-fundamentals .home-workflow-stage__details,
.home-fundamentals .home-workflow-stage__note { margin-top: 5px; color: var(--text-tertiary); font-size: 10px; font-weight: var(--home-weight-regular); line-height: 15px; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-workflow-stage__details { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--text-secondary); font-size: 10px; font-weight: var(--home-weight-regular); line-height: 15px; font-variant-numeric: tabular-nums; }
.home-fundamentals .home-workflow-stage__details::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--home-workflow-stage-accent); }
.home-fundamentals .home-workflow-stage__note { margin-top: 2px; }
.home-fundamentals .home-workflow-empty { grid-column: 1 / -1; padding: 14px 0 3px; color: var(--text-tertiary); font-size: var(--home-type-meta); line-height: 18px; }

.home-fundamentals .ov-row--sub {
  min-height: 76px;
  align-items: stretch;
  grid-auto-rows: minmax(76px, auto);
  border: 0;
  border-top: 1px solid var(--border-subtle, var(--border-default));
  border-radius: 0;
  background: transparent;
}
.home-fundamentals .ov-row--sub .ov-cell--metric {
  display: flex;
  align-self: stretch;
  box-sizing: border-box;
  min-height: 76px;
  justify-content: center;
  gap: 4px;
  padding: 12px 20px;
}
.home-fundamentals .ov-label { margin: 0; font-size: var(--home-type-label); font-weight: var(--home-weight-label); line-height: 18px; }
.home-fundamentals .ov-row--sub .ov-cell--metric:first-child { padding-left: 0; }
.home-fundamentals .ov-row--sub .ov-value { min-height: 26px; margin-top: 0; font-size: var(--home-type-value); font-weight: var(--home-weight-strong); line-height: 26px; }
.home-fundamentals .ov-row--sub .ov-cell--amount:last-child .ov-value { color: var(--profit-positive); }
.home-fundamentals .ov-row--lines .ov-cell--business { padding: 3px 20px; }
.home-fundamentals .ov-row--lines .ov-cell--business:first-child { padding-left: 0; }
.home-fundamentals .ov-row--lines .ov-label { font-size: 14px; font-weight: var(--home-weight-strong); line-height: 20px; }
.home-fundamentals .ov-row--lines .ov-label a { font-size: inherit; font-weight: inherit; line-height: inherit; }
.home-fundamentals .ov-row--lines .ov-value { margin-top: 4px; font-size: var(--home-type-value); font-weight: var(--home-weight-strong); line-height: 26px; }
.home-fundamentals .ov-line-subs { gap: 4px 12px; margin-top: 4px; font-size: var(--home-type-meta); font-weight: var(--home-weight-regular); line-height: 18px; }
.home-fundamentals .ov-foot { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--border-subtle, var(--border-default)); color: var(--text-tertiary); font-size: var(--home-type-meta); line-height: 18px; font-weight: var(--home-weight-regular); }

.home-fundamentals .cockpit { gap: 14px; }
.home-fundamentals .cockpit > * > .card,
.home-fundamentals .cockpit > .card {
  border: 1px solid var(--border-subtle, var(--border-default));
  border-radius: 11px;
  background: var(--bg-content);
  box-shadow: none;
}
.home-fundamentals .chart-card,
.home-fundamentals .trend-card { padding: 16px 18px; }
.home-fundamentals .home-rank-card > .card-head { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
.home-fundamentals .home-rank-card .more { flex: 0 0 auto; margin-left: auto; }
.home-fundamentals .chart-card .card-head,
.home-fundamentals .trend-card .card-head { margin-bottom: 12px; }
.home-fundamentals .chart-card .card-title,
.home-fundamentals .trend-card .card-title { color: var(--text-primary); font-size: var(--home-type-title); font-weight: var(--home-weight-strong); line-height: 22px; }
.home-fundamentals .home-rank-empty { min-height: 24px; padding: 0; color: var(--text-tertiary); font-size: var(--home-type-meta); line-height: 18px; }
.home-fundamentals .rank-list { min-height: 0; }
.home-fundamentals .rank-item { transition: background-color 140ms ease; }
.home-fundamentals .rank-item:hover { transform: none; }
.home-fundamentals .ok-line { padding: 7px 0 0; border: 0; background: transparent; color: var(--text-tertiary); font-size: var(--home-type-meta); line-height: 18px; }
.home-fundamentals .trend-card--empty { min-height: 0; }
.home-fundamentals .home-trend-empty { min-height: 0; padding: 0; gap: 6px; }
.home-fundamentals .home-trend-empty__title { font-size: var(--home-type-label); line-height: 18px; }
.home-fundamentals .home-trend-empty__hint { font-size: var(--home-type-meta); line-height: 18px; }
.home-fundamentals .home-trend-chart .chart-combo { max-width: min(760px, 100%); }

@media (min-width: 768px) and (max-width: 1100px) {
  .home-fundamentals .ov-row--core { grid-template-columns: minmax(90px, .6fr) minmax(90px, .6fr) minmax(210px, 1.8fr); }
  .home-fundamentals .ov { padding-inline: 18px; }
  .home-fundamentals .home-workflow-breakdown__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-fundamentals .home-workflow-stage:nth-child(5n) { border-inline-end: 1px solid var(--border-subtle, var(--border-default)); }
  .home-fundamentals .home-workflow-stage:nth-child(3n) { border-inline-end: 0; }
  .home-fundamentals .home-workflow-stage:nth-child(-n+5) { border-bottom: 0; }
  .home-fundamentals .home-workflow-stage:nth-child(-n+9) { border-bottom: 1px solid var(--border-subtle, var(--border-default)); }
}
@media (max-width: 767px) {
  .home-fundamentals .home-toolrow { gap: 4px 10px; }
  .home-fundamentals .home-toolrow-actions { width: 100%; justify-content: flex-end; gap: 7px; }
  .home-fundamentals .home-live-status { margin-right: auto; }
  .home-fundamentals .ov { padding: 16px 14px; }
  .home-fundamentals .ov-section + .ov-section { margin-top: 15px; padding-top: 14px; }
  .home-fundamentals .home-portfolio-head { margin-bottom: 8px; }
  .home-fundamentals .home-portfolio-total strong { font-size: 24px; line-height: 28px; }
  .home-fundamentals .ov-row--core { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-fundamentals .ov-row--core .ov-cell--metric { min-height: 61px; padding: 7px 10px; }
  .home-fundamentals .ov-row--core .ov-cell--metric:first-child { padding-left: 0; }
  .home-fundamentals .ov-row--core .ov-cell--metric:not(.ov-cell--primary) { padding-left: 10px; }
  .home-fundamentals .ov-row--core .ov-cell--metric .ov-value { font-size: 18px; line-height: 24px; }
  .home-fundamentals .home-portfolio-status { grid-column: 1 / -1; padding: 10px 0 1px; border-top: 1px solid var(--border-subtle, var(--border-default)); border-left: 0; }
  .home-fundamentals .home-portfolio-status__summary { font-size: var(--home-type-label); }
  .home-fundamentals .home-portfolio-status__value { font-size: 17px; }
  .home-fundamentals .home-portfolio-meter { height: 6px; }
  .home-fundamentals .home-portfolio-status__summary { align-items: center; flex-direction: row; gap: 8px; }
  .home-fundamentals .home-workflow-breakdown { margin-top: 12px; padding-top: 12px; }
  .home-fundamentals .home-workflow-breakdown__heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .home-fundamentals .home-workflow-breakdown__summary { justify-content: flex-start; gap: 5px 10px; }
  .home-fundamentals .home-workflow-breakdown__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-fundamentals .home-workflow-stage { padding: 10px 9px; }
  .home-fundamentals .home-workflow-stage:nth-child(5n),
  .home-fundamentals .home-workflow-stage:nth-child(3n) { border-inline-end: 1px solid var(--border-subtle, var(--border-default)); }
  .home-fundamentals .home-workflow-stage:nth-child(2n) { border-inline-end: 0; }
  .home-fundamentals .home-workflow-stage:nth-child(-n+9) { border-bottom: 0; }
  .home-fundamentals .home-workflow-stage:nth-child(-n+8) { border-bottom: 1px solid var(--border-subtle, var(--border-default)); }
  .home-fundamentals .home-workflow-stage__title { font-size: 12px; }
  .home-fundamentals .ov-row--sub { min-height: 68px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(68px, auto); }
  .home-fundamentals .ov-row--sub .ov-cell--metric { min-height: 68px; gap: 4px; padding: 10px; }
  .home-fundamentals .ov-row--sub .ov-cell--metric:first-child { padding-left: 0; }
  .home-fundamentals .ov-row--sub .ov-cell--metric:last-child { grid-column: 1 / -1; padding-left: 0; border-top: 1px solid var(--border-subtle, var(--border-default)); border-left: 0; }
  .home-fundamentals .ov-row--sub .ov-value { min-height: 24px; font-size: 18px; line-height: 24px; }
  .home-fundamentals .ov-row--lines { grid-template-columns: 1fr; }
  .home-fundamentals .ov-row--lines .ov-cell--business,
  .home-fundamentals .ov-row--lines .ov-cell--business:first-child { padding: 9px 0; }
  .home-fundamentals .ov-row--lines .ov-cell--business + .ov-cell--business { border-top: 1px solid var(--border-subtle, var(--border-default)); border-left: 0; }
  .home-fundamentals .ov-row--lines .ov-value { font-size: 18px; line-height: 24px; }
  .home-fundamentals .ov-row--lines .ov-label { font-size: 14px; line-height: 20px; }
  .home-fundamentals .ov-foot { line-height: 1.5; gap: 5px 10px; }
  .home-fundamentals .cockpit { gap: 10px; }
  .home-fundamentals .chart-card,
  .home-fundamentals .trend-card { padding: 14px; }
  .home-fundamentals .home-trend-empty { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-fundamentals .home-portfolio-meter__fill { transition: none; }
}

/* 合同增补/减项编辑弹窗：白底、清晰分组，样式通过 :has 限定在此表单 */
@media (min-width: 768px) {
  .modal-mask:has(.wf-adjustment-form) { align-items: center; padding: 24px; }
  .modal--lg:has(.wf-adjustment-form) {
    width: min(760px, calc(100vw - 48px));
    max-width: 760px;
    max-height: min(860px, calc(100vh - 48px));
    border-radius: 16px;
    border-color: var(--border-default);
  }
}
.modal--lg:has(.wf-adjustment-form) .modal-head { padding: 18px 24px 16px; }
.modal--lg:has(.wf-adjustment-form) .modal-head .title { font-size: 17px; line-height: 24px; letter-spacing: 0; }
.modal--lg:has(.wf-adjustment-form) .modal-body { padding: 18px 24px 22px; }
.modal--lg:has(.wf-adjustment-form) .modal-foot { padding: 13px 24px; }
.modal--lg:has(.wf-adjustment-form) .modal-foot .btn { min-height: 44px; border-radius: 9px; }
.wf-adjustment-form { color: var(--text-primary); }
.wf-adjustment-form-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--success, #218869);
  border-radius: 9px;
  background: var(--bg-page, #faf9f6);
}
.wf-adjustment-form-note-icon {
  display: inline-flex;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--success, #218869);
  background: var(--bg-surface, #fff);
}
.wf-adjustment-form-note-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.wf-adjustment-form-note-copy strong { color: var(--text-primary); font-size: 13px; line-height: 18px; font-weight: var(--font-weight-semibold); }
.wf-adjustment-form-note-copy > span { color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.wf-adjustment-form-grid { gap: 15px 18px; }
.wf-adjustment-field { gap: 7px; }
.wf-adjustment-field > .payment-field-label,
.wf-adjustment-attachment-heading .payment-field-label {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 17px;
  font-weight: var(--font-weight-medium);
}
.wf-adjustment-field .input {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
}
.wf-adjustment-field .input:focus { border-color: var(--border-focus); }
.wf-adjustment-field-hint { color: var(--text-tertiary); font-size: 11px; line-height: 16px; }
.wf-adjustment-kind-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.wf-adjustment-kind-option {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  color: var(--text-secondary);
  background: var(--bg-surface, #fff);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}
.wf-adjustment-kind-option:hover { background: var(--bg-surface-hover); }
.wf-adjustment-kind-option--add.is-active { border-color: var(--success, #218869); color: var(--success, #218869); background: rgba(33, 136, 105, .055); }
.wf-adjustment-kind-option--deduct.is-active { border-color: #b58b50; color: #876437; background: rgba(181, 139, 80, .07); }
.wf-adjustment-kind-option:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.wf-adjustment-kind-icon { display: inline-flex; flex: 0 0 30px; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-page, #faf9f6); }
.wf-adjustment-kind-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.wf-adjustment-kind-copy strong { color: var(--text-primary); font-size: 13px; line-height: 18px; font-weight: var(--font-weight-semibold); }
.wf-adjustment-kind-copy small { color: var(--text-tertiary); font-size: 11px; line-height: 15px; }
.wf-adjustment-money-input { display: flex; height: 42px; align-items: center; gap: 4px; padding-left: 12px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--bg-input); color: var(--text-tertiary); }
.wf-adjustment-money-input:focus-within { border-color: var(--border-focus); outline: 2px solid var(--border-focus); outline-offset: 2px; }
.wf-adjustment-money-input > span { flex: 0 0 auto; font-size: 14px; font-weight: var(--font-weight-medium); }
.wf-adjustment-field .wf-adjustment-money-control { min-width: 0; height: 40px; min-height: 40px; padding: 0 10px 0 2px; border: 0; background: transparent; box-shadow: none; font-size: 16px; font-variant-numeric: tabular-nums; }
.wf-adjustment-money-control:focus, .wf-adjustment-money-control:focus-visible { border: 0; outline: 0; }
.wf-adjustment-description { min-height: 82px !important; padding: 10px 12px !important; line-height: 1.5; resize: vertical; }
.wf-adjustment-attachment-block { gap: 8px; }
.wf-adjustment-attachment-heading { display: flex; align-items: center; gap: 7px; }
.wf-adjustment-optional { color: var(--text-tertiary); font-size: 11px; line-height: 16px; }
.wf-adjustment-files { gap: 0; padding: 5px 11px; border-radius: 9px; }
.wf-adjustment-file { align-items: center; min-height: 34px; padding: 5px 0; }
.wf-adjustment-no-files { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 11px; border-style: solid; border-radius: 9px; background: var(--bg-page, #faf9f6); }
.wf-adjustment-no-files-icon { display: inline-flex; flex: 0 0 30px; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-tertiary); background: var(--bg-surface, #fff); }
.wf-adjustment-no-files-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.wf-adjustment-no-files-copy strong { color: var(--text-secondary); font-size: 12px; line-height: 17px; font-weight: var(--font-weight-medium); }
.wf-adjustment-no-files-copy > span { color: var(--text-tertiary); font-size: 11px; line-height: 16px; }
.wf-adjustment-preview {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-page, #faf9f6);
}
.wf-adjustment-preview-icon { display: inline-flex; flex: 0 0 32px; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; color: var(--success, #218869); background: rgba(33, 136, 105, .09); }
.wf-adjustment-preview-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 1px; }
.wf-adjustment-preview-label { color: var(--text-tertiary); font-size: 10px; line-height: 14px; }
.wf-adjustment-preview-title { color: var(--text-primary); font-size: 12px; line-height: 17px; font-weight: var(--font-weight-medium); }
.wf-adjustment-preview-hint { color: var(--text-tertiary); font-size: 10px; line-height: 14px; }
.wf-adjustment-preview-amount { color: var(--success, #218869); font-size: 16px; line-height: 22px; font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wf-adjustment-preview--deduct .wf-adjustment-preview-icon { color: #876437; background: rgba(181, 139, 80, .12); }
.wf-adjustment-preview--deduct .wf-adjustment-preview-amount { color: #876437; }
.wf-adjustment-error { min-height: 0; margin-top: 10px; }
.wf-adjustment-error[hidden] { display: none; }
@media (max-width: 767px) {
  .modal-mask:has(.wf-adjustment-form) { align-items: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal--lg:has(.wf-adjustment-form) { width: 100%; max-width: 620px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)); margin: 0; border-radius: 16px; }
  .modal--lg:has(.wf-adjustment-form) .modal-head { padding: 14px 16px 12px; }
  .modal--lg:has(.wf-adjustment-form) .modal-body { padding: 14px 16px 18px; }
  .modal--lg:has(.wf-adjustment-form) .modal-foot { padding: 11px 16px calc(11px + env(safe-area-inset-bottom, 0px)); }
  .wf-adjustment-form-note { align-items: flex-start; margin-bottom: 15px; padding: 9px 10px; }
  .wf-adjustment-form-note-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .wf-adjustment-form-grid { gap: 13px; }
  .wf-adjustment-kind-option { min-height: 50px; padding: 7px 9px; gap: 7px; }
  .wf-adjustment-kind-icon { flex-basis: 27px; width: 27px; height: 27px; }
  .wf-adjustment-preview { padding: 10px; gap: 8px; }
  .wf-adjustment-preview-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .wf-adjustment-preview-amount { font-size: 14px; }
}
@media (max-width: 380px) {
  .wf-adjustment-kind-picker { grid-template-columns: 1fr; }
  .wf-adjustment-preview { align-items: flex-start; }
  .wf-adjustment-preview-amount { padding-top: 4px; }
}

/* Keep this business form readable regardless of the app's selected theme. */
.modal--lg:has(.wf-adjustment-form) {
  color: #242522;
  background: #fff;
  border-color: #e8e6df;
  box-shadow: 0 20px 56px rgba(24, 31, 27, .2);
}
.modal--lg:has(.wf-adjustment-form) > .modal-head,
.modal--lg:has(.wf-adjustment-form) > .modal-body,
.modal--lg:has(.wf-adjustment-form) > .modal-foot { background: #fff; }
.modal--lg:has(.wf-adjustment-form) > .modal-head { border-bottom-color: #eeece6; }
.modal--lg:has(.wf-adjustment-form) > .modal-foot { border-top-color: #eeece6; }
.modal--lg:has(.wf-adjustment-form) .modal-head .title,
.wf-adjustment-form { color: #242522; }
.modal--lg:has(.wf-adjustment-form) .modal-head .icon-btn { color: #70736d; }
.modal--lg:has(.wf-adjustment-form) .modal-head .icon-btn:hover { color: #292b27; background: #f4f5f2; }
.modal--lg:has(.wf-adjustment-form) .modal-foot .btn {
  color: #454741;
  border-color: #dfddd5;
  background: #fff;
}
.modal--lg:has(.wf-adjustment-form) .modal-foot .btn:hover { background: #f7f7f4; }
.wf-adjustment-form-note { border-color: #e6eee8; background: #f6f8f6; }
.wf-adjustment-form-note-icon { background: #fff; }
.wf-adjustment-form-note-copy strong,
.wf-adjustment-kind-copy strong,
.wf-adjustment-preview-title { color: #292b27; }
.wf-adjustment-form-note-copy > span { color: #666962; }
.wf-adjustment-field > .payment-field-label,
.wf-adjustment-attachment-heading .payment-field-label { color: #5f625c; }
.wf-adjustment-field .input { color: #292b27; border-color: #e3e1d9; background: #fff; }
.wf-adjustment-field .input::placeholder { color: #92948e; }
.wf-adjustment-field-hint,
.wf-adjustment-kind-copy small,
.wf-adjustment-optional,
.wf-adjustment-no-files-copy > span,
.wf-adjustment-preview-label,
.wf-adjustment-preview-hint { color: #777a73; }
.wf-adjustment-kind-option { color: #5f625c; border-color: #e3e1d9; background: #fff; }
.wf-adjustment-kind-option:hover { background: #f8f9f7; }
.wf-adjustment-kind-icon { background: #f4f6f3; }
.wf-adjustment-money-input { min-width: 0; box-sizing: border-box; color: #777a73; border-color: #d4d1c8; background: #fff; }
.wf-adjustment-field .wf-adjustment-money-control { width: 0; flex: 1 1 auto; box-sizing: border-box; color: #292b27; }
.wf-adjustment-money-control[type="number"] { appearance: textfield !important; -moz-appearance: textfield !important; -webkit-appearance: none !important; }
.wf-adjustment-money-control[type="number"]::-webkit-inner-spin-button,
.wf-adjustment-money-control[type="number"]::-webkit-outer-spin-button { display: none; margin: 0; -webkit-appearance: none !important; }
.wf-adjustment-no-files { color: #646760; border-color: #e5e3dc; background: #f8f8f5; }
.wf-adjustment-no-files-icon { color: #777a73; background: #fff; }
.wf-adjustment-no-files-copy strong { color: #555851; }
.wf-adjustment-preview { border-color: #e6eee8; background: #f6f8f6; }
.wf-adjustment-preview-label { color: #6e716a; }
.wf-adjustment-preview-title { color: #292b27; }
.wf-adjustment-preview-hint { color: #777a73; }
