/* ===================================================
 * ACMELAB 艾科美一体化工作台 · 品牌设计系统
 * 配色基因：定稿 Logo 绿→蓝渐变
 * =================================================== */

:root {
  /* 主色系：绿 → 蓝 渐变（取自 Logo） */
  --primary-50:  #ECFDF5;
  --primary-100: #D1FAE5;
  --primary-200: #A7F3D0;
  --primary-300: #6EE7B7;  /* 【P3】补缺失变量：曾被引用未定义 */
  --primary-400: #34D399;
  --primary-500: #10B981;  /* 绿主色 */
  --primary-600: #059669;
  --primary-700: #047857;  /* 【P3】补缺失变量：曾被引用未定义（强调文字） */
  --primary:     #06B981;  /* logo 绿色端 */
  --primary-2:   #34D399;  /* 【P3】补缺失变量：卡片悬停描边（曾被引用未定义） */
  --brand-blue:  #1E6BB8;  /* logo 蓝色端 */
  --brand-deep:  #0C447C;
  --brand-night: #042C53;

  /* 中性色 */
  --bg:        #F7F9FC;
  --surface:   #FFFFFF;
  --surface-2: #FAFBFD;
  --border:    #E5EAF0;
  --border-2:  #EDF1F6;
  --text:      #1A2438;
  --text-2:    #4A5568;
  --text-3:    #5F6B7E;   /* 【P2-8】原 #8A94A6 在浅底(#FAFBFD)上对比度仅 ~3.0:1，低于 WCAG AA 的 4.5:1；表格日期/备注/供应商等大量使用本变量 */
  --text-4:    #B8BFCC;

  /* 语义色 */
  --success: #10B981;
  --success-50: #ECFDF5;  /* 【UI检查】补缺失变量：合同防伪卡片背景引用未定义 */
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #3B82F6;
  --primary-bg:  #ECFDF5;
  --primary-bg2: #D1FAE5;
  --info-bg:   #E6F1FB;
  --info-500:  #1890FF;
  --info-border: #BAE0FF;
  --readonly-bg: #F5F7FA;
  /* 【UI检查】别名变量：HR 模块页内样式用了 --text-secondary/--bg-secondary，
     但设计系统只有 --text-2/--surface-2，导致悬停背景/标签颜色失效。此处补别名对齐。 */
  --text-secondary: #4A5568;   /* = --text-2 */
  --bg-secondary: #F7F9FC;     /* 悬停浅灰底，介于 --surface-2 与 --bg 之间 */

  /* 渐变（取自 Logo） */
  --grad-brand: linear-gradient(135deg, #06B981 0%, #1E6BB8 100%);
  --grad-brand-soft: linear-gradient(135deg, #ECFDF5 0%, #DBEAFE 100%);
  --grad-brand-h: linear-gradient(90deg, #10B981 0%, #1E6BB8 100%);

  /* 圆角与阴影 */
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(15, 42, 80, 0.04), 0 1px 2px rgba(15, 42, 80, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 42, 80, 0.06), 0 2px 4px rgba(15, 42, 80, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 42, 80, 0.10), 0 4px 12px rgba(15, 42, 80, 0.06);
  --shadow-brand: 0 8px 24px rgba(6, 185, 129, 0.25);

  /* 尺寸 */
  --sidebar-w: 232px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); font-size: 13px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

/* ===================================================
 * 登录页 · 全屏品牌沉浸
 * =================================================== */
.login-page {
  min-height: 100vh; display: flex;
  background: var(--grad-brand);
  position: relative; overflow: hidden;
}

/* 装饰：左下到右上的柔光 */
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.10) 0%, transparent 35%);
  pointer-events: none;
}
/* 装饰：科技感网格 */
.login-page::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
}

.login-wrap {
  position: relative; z-index: 1;
  display: flex; width: 100%; min-height: 100vh;
  align-items: center; justify-content: center;
  padding: 24px;
}

/* 左侧品牌区 */
.login-brand {
  flex: 1; max-width: 560px; color: #fff;
  padding: 60px; display: flex; flex-direction: column; justify-content: center;
}
.login-brand .brand-logo-big {
  width: 220px; height: auto; margin-bottom: 36px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
}
.login-brand h1 {
  font-size: 42px; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 12px; line-height: 1.2;
}
.login-brand .tagline {
  font-size: 18px; opacity: 0.9; margin-bottom: 32px; font-weight: 300;
}
.login-brand .features {
  display: flex; flex-direction: column; gap: 14px; margin-top: 24px;
}
.login-brand .feat {
  display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: 0.95;
}
.login-brand .feat::before {
  content: '✓'; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.2); display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}

/* 右侧登录表单卡片 */
.login-box {
  background: #fff; border-radius: 20px; padding: 44px 40px;
  width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  position: relative; overflow: hidden;
}
.login-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-brand-h);
}
.login-box .login-title {
  font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.login-box .login-sub {
  font-size: 13px; color: var(--text-3); margin-bottom: 32px;
}
.login-box .form-group { margin-bottom: 18px; }
.login-box .form-input {
  height: 46px; padding: 0 16px 0 44px; font-size: 14px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface-2); transition: all 0.15s;
}
.login-box .form-input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(6, 185, 129, 0.1);
}
.login-box .input-wrap { position: relative; }
.login-box .input-wrap .ic {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 16px; pointer-events: none;
}
.login-box .btn-primary {
  height: 46px; font-size: 14px; font-weight: 600;
  border-radius: 10px; letter-spacing: 1px;
  background: var(--grad-brand); border: none;
  box-shadow: var(--shadow-brand);
}
.login-box .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(6, 185, 129, 0.35);
}
.login-box .test-accounts {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border-2);
  font-size: 12px; color: var(--text-3);
}
.login-box .test-accounts .ta-title { color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.login-box .test-accounts .ta-item {
  display: flex; gap: 8px; padding: 3px 0;
  font-family: 'SF Mono', Consolas, monospace; font-size: 11.5px;
}
.login-box .test-accounts .ta-item code {
  background: var(--surface-2); padding: 1px 6px; border-radius: 4px;
  color: var(--brand-blue);
}

/* ===================================================
 * 侧边栏 · 现代化
 * =================================================== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0F2A50 0%, #0C2240 100%);
  color: #DCE3EE;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; transition: transform 0.25s;
}
.sidebar .brand {
  padding: 18px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(135deg, rgba(6, 185, 129, 0.08), rgba(30, 107, 184, 0.08));
}
.sidebar .brand-logo {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar .brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sidebar .brand .name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.sidebar .brand .sub { font-size: 11px; color: #8DA3BD; margin-top: 1px; letter-spacing: 0.5px; }

.nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-group-title {
  font-size: 11px; color: #6B7E96; padding: 12px 12px 8px;
  letter-spacing: 1.2px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 0; border-radius: 8px;
  cursor: pointer; color: #C7D3E2; font-size: 13.5px;
  line-height: 1.4; min-height: 38px; max-height: 38px;
  transition: all 0.18s; position: relative;
  overflow: hidden;
}
.nav-item > span.ic {
  flex: 0 0 18px; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0; overflow: hidden;
}
.nav-item > span.ic svg { width: 14px; height: 14px; display: block; }
.nav-item > span:not(.ic) {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(6, 185, 129, 0.22) 0%, rgba(30, 107, 184, 0.18) 100%);
  color: #fff; font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; background: var(--grad-brand-h); border-radius: 0 3px 3px 0;
}
.nav-item .ic {
  width: 18px; text-align: center; font-size: 15px;
  font-style: normal; opacity: 0.85;
}

/* ===================================================
 * 主区域
 * =================================================== */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(15,42,80,0.02);
}
.topbar .crumbs { font-size: 14px; color: var(--text-2); font-weight: 500; }
.topbar .crumbs .sep { margin: 0 8px; color: var(--text-4); }
.topbar .spacer { flex: 1; }
.topbar .right { display: flex; align-items: center; gap: 12px; }
.topbar .user {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 6px 12px; border-radius: 8px; transition: all 0.15s;
}
.topbar .user:hover { background: var(--surface-2); }
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.topbar .user .role { font-size: 11px; color: var(--text-3); }
.topbar .menu-toggle {
  display: none; background: none; border: none; font-size: 20px; cursor: pointer;
}

.content { flex: 1; padding: 24px 28px; max-width: 1480px; margin: 0 auto; width: 100%; }
.page-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* 【移动端P1】长标题在顶栏折行，改为单行省略 */

/* ===== 移动端走查修复（2026-09-16 晚）===== */
/* P1：搜索图标全局定位——原来 .search-ic 绝对定位只在 .toolbar 作用域内，
   报价移动条(.q-m-bar)与部分模块工具栏的图标会悬浮到输入框外 */
.search-box { position: relative; }
.search-box .search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none; display: inline-flex;
}
.search-box .form-input { padding-left: 36px; }

/* P1：财务「导出财务总表」专用样式，横排紧凑，不再伪装成 KPI 数据卡 */
.stat-card.stat-export { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; cursor: pointer; }
.stat-card.stat-export:hover { filter: brightness(1.08); }
.stat-export-inner { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; font-size: 13px; font-weight: 600; }
.stat-export-ic { display: inline-flex; }

/* P0：HR 概览双列网格（部门人数分布 + 待审批异动）移动端强制单列 */
@media (max-width: 768px) {
  .hr-ov-grid { grid-template-columns: 1fr !important; }
}
html.force-mobile .hr-ov-grid { grid-template-columns: 1fr !important; }

/* P0：KPI 大数字移动端缩号——28px 在半宽卡内放不下金额（如 ¥2,364,012.00 被裁切） */
@media (max-width: 768px) {
  .stat-card .value { font-size: 18px; letter-spacing: -0.2px; }
}
html.force-mobile .stat-card .value { font-size: 18px; letter-spacing: -0.2px; }

/* P2：产品库等 fm-tabs 状态 chips 移动端横滚，与报价 chips 交互统一 */
@media (max-width: 768px) {
  .fm-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
  .fm-tab { flex: none; }
}
html.force-mobile .fm-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
html.force-mobile .fm-tab { flex: none; }
.page-sub { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }

/* ===================================================
 * 通用组件
 * =================================================== */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  border: 1px solid var(--border-2);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border-2); padding: 18px 20px;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-2);
}
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0; width: 60px; height: 60px;
  background: var(--grad-brand-soft); border-radius: 0 0 0 60px; opacity: 0.5;
}
.stat-card .label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 8px; color: var(--text); }
.stat-card .value.primary { background: var(--grad-brand-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .trend { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.stat-card .ic-bg {
  position: absolute; right: 16px; top: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad-brand-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; z-index: 1;
}

/* 工具栏 */
.toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar .search-box {
  position: relative; flex: 1; min-width: 200px; max-width: 360px;
}
.toolbar .search-box .form-input { padding-left: 36px; }
.toolbar .search-box .search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.toolbar .spacer { flex: 1; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  font-size: 13px; font-weight: 500; transition: all 0.15s; white-space: nowrap;
  height: 36px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.btn-primary {
  background: var(--grad-brand); color: #fff; border-color: transparent;
  box-shadow: 0 2px 6px rgba(6, 185, 129, 0.2);
}
.btn-primary:hover {
  background: var(--grad-brand); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-brand);
}
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #DC2626; color: #fff; }
/* 【UI测评P1】行内小号删除按钮弱化：表格里每行都挂红色实心按钮视觉噪音过大，
   统一降为「白底红字红描边」，悬停时才恢复实心。弹窗底部等大号危险按钮保持实心。 */
.btn-danger.btn-sm,
.btn.btn-sm.btn-danger {
  background: var(--surface); color: var(--danger); border-color: #FCA5A5;
}
.btn-danger.btn-sm:hover,
.btn.btn-sm.btn-danger:hover {
  background: var(--danger); color: #fff; border-color: transparent;
}
.btn-ghost { border: none; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); border-color: transparent; }
.btn-sm { padding: 5px 12px; font-size: 12px; height: 28px; border-radius: 6px; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  transition: all 0.15s; height: 36px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 185, 129, 0.12);
}
.form-textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* 表格：仅横向滚动 + 圆角（纵向滚动交给具体容器，避免弹窗内嵌套滚动条）。
   【P3】原 1080 行重复定义 `.table-wrap { max-height:70vh; overflow:auto }` 已删除：
   它强制所有 .table-wrap（含弹窗内）限高 70vh 并纵向滚动，是嵌套滚动条根因。 */
.table-wrap { overflow-x: auto; border-radius: 8px; }
.table-wrap table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border);
}
table { width: 100%; border-collapse: collapse; }
table thead th {
  background: var(--surface-2); color: var(--text-2);
  font-weight: 600; font-size: 12px; padding: 12px 14px;
  text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-2);
  color: var(--text); font-size: 13px;
  word-break: keep-all;          /* 中文按词换行，避免逐字竖排 */
  overflow-wrap: anywhere;       /* 英文/长串可断行 */
}
table tbody td.cell-name,
table tbody td.cell-customer {
  min-width: 140px;
  max-width: 280px;
  white-space: normal;
}
table tbody td.cell-name { font-weight: 600; }
table tbody td.cell-actions { white-space: nowrap; }
table tbody tr:hover { background: var(--surface-2); }
table tbody tr:last-child td { border-bottom: none; }
.font-600 { font-weight: 600; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm { font-size: 12px; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0 !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }

/* 徽章 */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11.5px; font-weight: 500; line-height: 1.4;
  white-space: nowrap;  /* 【UI测评P0】「已上架」等徽章在窄容器内折行 */
}
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-green { background: var(--primary-bg); color: var(--primary-600); }
.badge-orange { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #B91C1C; }
.badge-gray { background: #F1F5F9; color: #475569; }
.badge-yellow { background: #FEF3C7; color: #92400E; }  /* 【UI检查】补缺失类：投标/采购「待审批/已开标/流标」状态徽章引用未定义（与 orange 同色系，保持视觉统一） */

/* ===== 报价模块移动端筛选（抽屉式，20260916）=====
   桌面端 .q-m-bar 隐藏；≤768px 或 force-mobile 时 .q-desktop-toolbar 隐藏、移动条接管。
   搜索框 + 状态 chips（唯一适合横滚的同质筛选）留在首屏，其余进底部抽屉。 */
.q-m-bar { display: none; }
.q-m-row { display: flex; gap: 8px; align-items: center; }
.q-m-search { flex: 1; position: relative; }
.q-m-search .form-input { width: 100%; padding-left: 36px; }
.q-m-filter-btn { flex-shrink: 0; white-space: nowrap; }
.q-m-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  text-align: center; vertical-align: 1px;
}
.q-m-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.q-m-chips::-webkit-scrollbar { display: none; }
.q-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13px; cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.q-chip:hover { border-color: var(--primary); color: var(--primary-600); }
.q-chip.active { background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 600; }
.q-filter-drawer { align-items: flex-end; padding: 0; }  /* 底部弹层：贴底 */
.q-drawer {
  width: 100%; max-width: 92vw; max-height: 80vh; overflow-y: auto;
  border-radius: 16px 16px 0 0;
  animation: qDrawerUp 0.2s ease;
}
@keyframes qDrawerUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 768px) {
  .q-m-bar { display: block; }
  .q-desktop-toolbar { display: none; }
}
html.force-mobile .q-m-bar { display: block; }
html.force-mobile .q-desktop-toolbar { display: none; }

/* 模态框：不用 backdrop-filter（headless/Edge 都会模糊），用温和的深色半透明遮罩 */
/* 默认隐藏，只有 .show 才显示，避免模块渲染时弹窗全部弹出 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 42, 80, 0.32);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask.show {
  display: flex;
  animation: fadeIn 0.18s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal {
  background: #ffffff !important; border-radius: var(--radius-lg);
  width: 520px; max-width: 92vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35); animation: slideUp 0.22s;
  display: flex; flex-direction: column;
  position: relative; z-index: 1;
}
.modal-lg { width: 720px; }
/* 内容区（兼容没写 modal-body 的弹窗）：直接子元素排除 head/foot 后给内边距 */
.modal > .modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border-2); flex-shrink: 0; }
.modal > .modal-foot { padding: 14px 22px; border-top: 1px solid var(--border-2); background: var(--surface-2); flex-shrink: 0; }
.modal > .modal-body { padding: 22px; flex: 1; overflow-y: auto; }
/* 关键兜底：如果弹窗没有 modal-body，所有非 head/foot 直接子元素都加内边距 */
.modal > *:not(.modal-head):not(.modal-foot):not(.modal-body):not([class*="modal-head"]):not([class*="modal-foot"]) {
  padding-left: 22px; padding-right: 22px;
}
.modal > *:not(.modal-head):not(.modal-foot):not(.modal-body):not([class*="modal-head"]):not([class*="modal-foot"]):first-of-type { padding-top: 22px; }
.modal > *:not(.modal-head):not(.modal-foot):not(.modal-body):not([class*="modal-head"]):not([class*="modal-foot"]):last-of-type:not(.modal-foot) { padding-bottom: 22px; }
/* 兜底规则覆盖到的元素如果是 input/button/hr/textarea，给它们正常 box-sizing 并 reset 边距 */
.modal > input, .modal > button, .modal > hr {
  display: block; width: auto; padding: 0; margin: 0; border: none; background: none;
}
.modal > input[type="hidden"] { display: none !important; }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--text-3); padding: 0; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border-2);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-2); flex-shrink: 0;
}

/* 个人资料弹窗专用样式 */
.profile-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--border-2);
  margin-bottom: 18px;
}
.profile-header .avatar-lg {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(6, 185, 129, 0.25);
  flex-shrink: 0;
}
.profile-header .profile-name { font-size: 18px; font-weight: 700; color: var(--text); }
.profile-header .profile-role {
  font-size: 12px; color: var(--primary-600); margin-top: 4px;
  background: var(--primary-bg); padding: 2px 10px; border-radius: 10px;
  display: inline-block;
}
.profile-info { margin-bottom: 8px; }
.profile-info .info-row {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--border-2); font-size: 13px;
}
.profile-info .info-row:last-child { border-bottom: none; }
.profile-info .info-label {
  width: 90px; color: var(--text-3); flex-shrink: 0;
}
.profile-info .info-value { color: var(--text); font-weight: 500; }
.profile-divider {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 18px 0 14px; padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* Toast */
.toast-area { position: fixed; top: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: 8px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--primary);
  min-width: 240px; max-width: 380px;
  animation: slideUp 0.2s;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

/* ===================================================
 * 响应式
 * =================================================== */
@media (max-width: 768px) {
  .login-brand { display: none; }
  .login-box { width: 100%; max-width: 420px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar .crumbs { display: none; }
  .content { padding: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D6E0EE; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #B8C5D6; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================================================
 * 大厂精华组件：全局搜索 / 通知中心 / 欢迎横幅 / 快捷入口
 * =================================================== */

/* 顶部栏：搜索框居中 */
.topbar { position: sticky; top: 0; z-index: 90; }
.topbar-center { flex: 1; display: flex; justify-content: center; padding: 0 16px; }

.global-search { position: relative; width: 100%; max-width: 440px; }
.global-search .gs-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0.5; font-size: 14px; }
.gs-input {
  width: 100%; height: 38px; padding: 0 44px 0 36px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); font-size: 13px; color: var(--text);
  transition: all 0.2s; outline: none;
}
.gs-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(6,185,129,0.12); }
.gs-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-3); background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px;
}
.gs-dropdown {
  position: absolute; top: 46px; left: 0; width: 100%;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-2); max-height: 420px; overflow-y: auto; z-index: 200;
  padding: 6px; animation: slideUp 0.16s;
}
.gs-group-title { font-size: 11px; color: var(--text-3); padding: 8px 10px 4px; font-weight: 600; letter-spacing: 0.5px; }
.gs-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.gs-item:hover { background: var(--primary-50); }
.gs-item-title { font-size: 13px; color: var(--text); font-weight: 500; flex-shrink: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item-sub { font-size: 12px; color: var(--text-3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item-extra { font-size: 12px; color: var(--primary-600); font-weight: 600; flex-shrink: 0; }
.gs-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 通知中心 */
.notify-wrap { position: relative; }
.icon-btn { position: relative; width: 38px; height: 38px; padding: 0; font-size: 16px; }
.notify-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
}
.notify-dropdown {
  position: absolute; top: 44px; right: 0; width: 260px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-2); z-index: 200; padding: 6px; animation: slideUp 0.16s;
}

/* 欢迎横幅 */
.welcome-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--grad-brand); color: #fff; border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.welcome-banner::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%); border-radius: 50%;
}
.wb-greet { font-size: 22px; font-weight: 700; letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; }
.wb-greet .wb-emoji { display: inline-flex; color: #FEF3C7; }
.wb-sub { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.wb-actions { position: relative; z-index: 1; }
.wb-actions .btn-primary { background: #fff; color: var(--brand-blue); font-weight: 600; }

/* 工作台横幅内嵌搜索框 */
.wb-search {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 24px; padding: 8px 16px; width: 340px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.wb-search .gs-ic { color: var(--text-3); font-size: 15px; }
.wb-search-input { border: none; outline: none; flex: 1; font-size: 14px; color: var(--text); background: transparent; }
.wb-search-input::placeholder { color: var(--text-3); }
.wb-search .gs-kbd {
  background: var(--surface-2); color: var(--text-3); font-size: 11px;
  padding: 2px 7px; border-radius: 4px; border: 1px solid var(--border);
}
.wb-search-result {
  margin: -4px 0 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); overflow: hidden;
  max-height: 420px; overflow-y: auto; padding: 8px 0;
}
.wb-search-result .gs-item { padding: 10px 16px; }
.wb-search-result .gs-item:hover { background: var(--primary-bg); }

@media (max-width: 768px) {
  .wb-search { width: 100%; }
}

/* 快捷入口 */
.quick-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px;
}
.quick-card {
  background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 16px 8px; text-align: center; cursor: pointer; transition: all 0.2s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-200); }
.qc-ic {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 600;
  margin: 0 auto 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  letter-spacing: -0.5px;
}
.qc-name { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* 待办提醒条 */
.pending-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.pending-strip .ps-title { font-size: 13px; font-weight: 600; color: #92400E; }

/* 常用功能 */
.quick-func { display: flex; flex-direction: column; }
.qf-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 8px;
  border-bottom: 1px solid var(--border-2); cursor: pointer; transition: background 0.15s;
}
.qf-item:last-child { border-bottom: none; }
.qf-item:hover { background: var(--primary-50); border-radius: 8px; }
.qf-ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.qf-item span:nth-child(2) { font-size: 13px; color: var(--text); flex: 1; }
.qf-arrow { color: var(--text-3); font-size: 16px; }

/* 回款缺口 Top 客户 */
.gap-list { display: flex; flex-direction: column; gap: 14px; }
.gap-row { display: flex; flex-direction: column; gap: 6px; }
.gap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 逾期标记（回款缺口卡） */
.overdue-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600;
  color: #fff; background: #dc2626; border-radius: 10px; vertical-align: middle;
}

/* 应收账龄分析 */
.aging-row { display: flex; flex-direction: column; gap: 6px; }
.aging-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 页脚版本信息 */
.app-footer {
  padding: 12px 24px; text-align: center; font-size: 11px; color: var(--text-4);
  border-top: 1px solid var(--border-2); margin-top: auto;
}
.app-footer a { color: var(--primary-600); cursor: pointer; }

/* 版本信息卡片 */
.version-info { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.vi-main { display: flex; align-items: baseline; gap: 12px; }
.vi-ver { font-size: 34px; font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.vi-name { font-size: 15px; color: var(--text-2); font-weight: 500; }
.vi-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; flex: 1; }
.vi-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; }
.vi-item span { font-size: 11px; color: var(--text-3); }
.vi-item b { font-size: 16px; color: var(--text); }

/* 更新日志 */
.changelog-item { padding: 14px 0; border-bottom: 1px solid var(--border-2); }
.changelog-item:last-child { border-bottom: none; }
.cl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-list { margin: 0; padding-left: 20px; }
.cl-list li { font-size: 13px; color: var(--text-2); line-height: 1.8; }

@media (max-width: 768px) {
  .topbar-center { display: none; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .welcome-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
/* ===== 财务模块 ===== */
.fm-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.fm-tab { padding: 8px 18px; border: none; background: var(--surface-2); color: var(--text-2); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit; transition: all .15s; }
.fm-tab:hover { background: var(--primary-bg); color: var(--primary-600); }
.fm-tab.active { background: var(--grad-brand); color: #fff; font-weight: 600; }

/* 财务工具类 */
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.gap-6 { gap: 6px; }
.gap-32 { gap: 32px; }

/* ===== OA 模块（钉钉级布局） ===== */
.oa-layout { display: flex; gap: 20px; align-items: flex-start; }
.oa-side {
  width: 200px; flex-shrink: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 0; position: sticky; top: 76px;
}
.oa-group {
  padding: 10px 16px 4px; font-size: 12px; color: var(--text-3);
  font-weight: 600; letter-spacing: 1px;
}
.oa-nav {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; cursor: pointer; font-size: 14px;
  color: var(--text-2); transition: all .15s; position: relative;
}
.oa-nav:hover { background: var(--surface-2); color: var(--text); }
.oa-nav.active { background: var(--primary-bg); color: var(--primary-600); font-weight: 600; border-right: 3px solid var(--primary-500); }
.oa-nav .oa-dot {
  display: none; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 9px; padding: 0 5px; margin-left: auto;
}
.oa-main { flex: 1; min-width: 0; }
@media (max-width: 768px) {
  .oa-layout { flex-direction: column; }
  .oa-side { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .oa-group { width: 100%; padding: 8px 8px 2px; }
  .oa-nav { padding: 8px 12px; border-radius: 8px; }
  .oa-nav.active { border-right: none; }
}

/* ============ 权限管理 ============ */
.perm-layout { display: flex; gap: 20px; align-items: flex-start; }
.perm-side {
  width: 240px; flex-shrink: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.perm-side-title { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 4px 8px 10px; }
.perm-user {
  padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px;
  transition: all .15s; border: 1px solid transparent;
}
.perm-user:hover { background: var(--surface-2); }
.perm-user.active { background: var(--primary-bg); border-color: var(--primary-300); }
.pu-name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.pu-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.perm-main { flex: 1; min-width: 0; }
.perm-tip {
  background: var(--primary-bg); color: var(--primary-700); font-size: 13px;
  padding: 10px 14px; border-radius: 8px; margin: 16px 0; line-height: 1.6;
}
.perm-group { margin-bottom: 16px; }
.perm-mod { padding: 8px 0; border-bottom: 1px solid var(--border-2); }
.perm-mod:last-child { border-bottom: none; }
.perm-mod-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.perm-mod-head input { width: 16px; height: 16px; cursor: pointer; }
.perm-funcs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px 24px; }
.perm-func {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px;
  color: var(--text-2); padding: 4px 10px; background: var(--surface-2);
  border-radius: 6px; cursor: pointer; transition: all .15s;
}
.perm-func input { width: 14px; height: 14px; cursor: pointer; }
.perm-func.dim { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 768px) {
  .perm-layout { flex-direction: column; }
  .perm-side { width: 100%; position: static; max-height: none; }
}

/* ============ 快捷新建（独立下拉框） ============ */
#qc-dropdown { min-width: 240px; max-height: 60vh; overflow-y: auto; padding: 8px 0; }
#qc-dropdown .qc-search { padding: 4px 12px 8px; }
#qc-dropdown .qc-search .form-input { padding: 6px 10px; font-size: 13px; height: 32px; }
#qc-dropdown .qc-group-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  padding: 8px 16px 4px; letter-spacing: 0.5px;
}
#qc-dropdown .gs-item { padding: 8px 16px; }
#qc-dropdown .gs-item:hover { background: var(--primary-bg); color: var(--primary-700); }

/* ============ 报价管理模块样式 ============ */
.modal-xl { width: 1100px; max-width: 96vw; }
.modal-2xl { width: 1280px; max-width: 96vw; }

/* 报价数据看板 */
.quote-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.quote-kpi-card {
  background: linear-gradient(135deg, #fff 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-2); border-radius: 12px;
  padding: 18px 20px; position: relative; overflow: hidden;
  transition: all 0.2s;
}
.quote-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.quote-kpi-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 64px; height: 64px;
  background: var(--grad-brand); opacity: 0.06; border-radius: 0 0 0 64px;
}
.quote-kpi-label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.quote-kpi-val { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.quote-kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.quote-profit { color: var(--primary-700); }

/* 报价弹窗分组 */
.qm-section { background: var(--surface-2); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.qm-section-title {
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px;
  padding-left: 10px; border-left: 3px solid var(--primary);
}

/* 报价明细表 */
.qm-items-table { font-size: 13px; }
.qm-items-table th { background: var(--surface-2); font-weight: 600; }
.qm-items-table td { padding: 6px 8px; vertical-align: middle; }
.qm-items-table .form-input { padding: 6px 8px; font-size: 13px; height: 32px; }
.qm-items-table .qm-idx { color: var(--text-3); text-align: center; font-size: 12px; }

/* 报价合计 */
.qm-summary {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border-2); border-radius: 10px;
  padding: 16px 20px; margin-top: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.qm-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.qm-summary-total { border-top: 1px solid var(--border-2); padding-top: 10px; margin-top: 4px; font-size: 16px; }
.qm-summary-total .font-600 { color: var(--primary-700); font-size: 22px; }

/* 模板卡片 */
.qm-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.qm-tpl-card {
  border: 1px solid var(--border-2); border-radius: 10px; padding: 14px 16px;
  background: #fff; transition: all 0.2s;
}
.qm-tpl-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(6, 185, 129, 0.1); }
.qm-tpl-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }

/* 对比表 */
.cmp-table th, .cmp-table td { padding: 10px 12px; }
.cmp-table th { background: var(--surface-2); }
.cmp-head { border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }

/* 规格列宽（在产品库选品弹窗中使用） */
.cell-spec { max-width: 240px; word-break: break-all; line-height: 1.5; }

/* 版本历史 */
.quote-ver-row { padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.quote-ver-row:last-child { border-bottom: none; }

/* 分页 */
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 工具栏按钮内的 svg 对齐 */
.toolbar .btn svg { flex-shrink: 0; }
.toolbar .btn { display: inline-flex; align-items: center; }

@media (max-width: 1100px) {
  .quote-kpi { grid-template-columns: repeat(2, 1fr); }
}


/* ============ OA 规则配置 ============ */
.rule-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.rule-tab {
  padding: 8px 18px; border-radius: 8px; cursor: pointer; font-size: 14px;
  color: var(--text-2); background: var(--surface-2); transition: all .15s;
}
.rule-tab:hover { color: var(--text); }
.rule-tab.active { background: var(--grad-brand); color: #fff; font-weight: 600; }  /* 【UI测评P1】原 solid primary-500，与 fm-tab/calc-nav 激活态统一为品牌渐变 */
.rule-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.rule-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px;
}
.rule-row {
  display: flex; align-items: center; gap: 12px;
}
.rule-label {
  min-width: 150px; font-size: 14px; color: var(--text-2); flex-shrink: 0;
}
.rule-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-500); }
@media (max-width: 768px) {
  .rule-grid { grid-template-columns: 1fr; }
  .rule-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rule-label { min-width: auto; }
}

/* ============ 实验室计算中心 ============ */
.calc-layout {
  display: flex; gap: 20px; align-items: flex-start;
}
.calc-side {
  width: 200px; flex-shrink: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  position: sticky; top: 16px;
}
.calc-group-title {
  font-size: 12px; color: var(--text-3); font-weight: 600;
  padding: 10px 8px 6px; letter-spacing: .5px;
}
.calc-nav {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text-2);
  transition: all .15s;
}
.calc-nav .ic { display: flex; align-items: center; }
.calc-nav:hover { background: var(--surface-2); color: var(--text); }
.calc-nav.active {
  background: linear-gradient(135deg, var(--primary-500), var(--brand-blue));
  color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(6, 185, 129, .25);
}
.calc-main { flex: 1; min-width: 0; }

.calc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
}
.calc-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.calc-head h3 { font-size: 18px; font-weight: 700; color: var(--text); }

.calc-tabs-mini {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
  border-bottom: 1px solid var(--border-2); padding-bottom: 14px;
}
.ctm {
  padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
  transition: all .15s;
}
.ctm:hover { color: var(--text); border-color: var(--primary-400); }
.ctm.active {
  background: var(--primary-500); color: #fff; font-weight: 600; border-color: var(--primary-500);
}

.calc-unit-hint { color: var(--text-3); font-weight: 400; font-size: 12px; }

.calc-results {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px;
}
.calc-result {
  flex: 1; min-width: 200px; background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: 10px; padding: 16px;
}
.calc-result.hl {
  background: linear-gradient(135deg, var(--primary-50), var(--surface));
  border-color: var(--primary-200);
}
.cr-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.cr-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.cr-value .cr-unit { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.cr-note { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

.calc-table-wrap { margin-top: 20px; overflow-x: auto; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.calc-table th {
  background: var(--surface-2); text-align: left; padding: 10px 12px;
  color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border);
}
.calc-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-2); }

.calc-select-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.csl-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 14px; color: var(--text);
  transition: all .15s;
}
.csl-item:hover { border-color: var(--primary-400); background: var(--primary-50); }

.convert-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.convert-box {
  border: 1px solid var(--border-2); border-radius: 10px; padding: 16px;
  background: var(--surface-2);
}
.cb-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.cb-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

@media (max-width: 900px) {
  .calc-layout { flex-direction: column; }
  .calc-side { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .calc-group-title { width: 100%; }
  .convert-grid { grid-template-columns: 1fr; }
}


/* ============ 合作门户管理 ============ */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width:640px){ .form-row-2{ grid-template-columns:1fr; } }
.code-chip { background: #f0f4ff; color: #3b5bdb; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-family: Consolas,monospace; border:1px solid #dbe4ff; }
/* 【P3】.modal-footer 与 .modal-foot 是历史遗留的重复类（同一语义：弹窗底部按钮栏）。
   全站仅 module_partner.js 使用 .modal-footer。此处让它复用 .modal-foot 的完整样式，
   避免两套定义视觉不一致；后续新代码统一用 .modal-foot。 */
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); flex-shrink: 0; }
#pm-bound-list .pp-item:last-child { border-bottom: none !important; }

/* ===================================================
 * 无障碍与交互细节（统一焦点态 / 二次确认弹层）
 * =================================================== */
:root {
  --focus-ring: rgba(6, 185, 129, 0.35);
}

/* 统一键盘焦点可见（WCAG AA：可聚焦元素需有清晰焦点指示） */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.nav-item:focus-visible,
.qf-item:focus-visible,
.quick-card:focus-visible,
.oa-nav:focus-visible,
.calc-nav:focus-visible,
.gs-item:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}
/* 图标按钮（无文本）焦点环收紧，避免突兀 */
.icon-btn:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 1px;
  border-radius: 8px;
}
.menu-toggle:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; border-radius: 6px; }

/* 尊重用户「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================================================
 * 移动端（PWA）适配增强 —— 全功能移动办公
 * =================================================== */

/* 侧边栏抽屉遮罩（仅移动端显示） */
.sidebar-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 42, 80, 0.45);
  z-index: 95; /* 低于侧边栏 z-index:100，高于内容 */
}

/* 移动端：让点击目标更大、间距更舒适 */
@media (max-width: 768px) {
  /* 遮罩显示 */
  .sidebar-mask.show { display: block; animation: fadeIn 0.18s; }

  /* 侧边栏抽屉：加阴影，滑入更顺滑 */
  .sidebar { box-shadow: 8px 0 32px rgba(15, 42, 80, 0.35); }

  /* 内容区：收紧边距 + 预留底部安全区（全面屏手势条） */
  .content {
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar .topbar-center { padding: 0 8px; }

  /* 顶栏精简：移动端隐藏全局搜索框（避免与标题/按钮挤作一团），
     搜索能力由各模块列表页自带搜索框承担 */
  .topbar-center { display: none; }

  /* 隐藏用户名文字，仅保留头像（节省横向空间） */
  .topbar .user > div:last-child { display: none; }
  .topbar .user { padding: 4px; }

  /* 退出按钮文字保留（触控目标足够） */

  /* 触控目标 ≥44px（iOS/Android 无障碍推荐） */
  .btn { min-height: 40px; padding: 8px 14px; }
  .btn-sm { min-height: 36px; }
  .icon-btn, .menu-toggle { width: 44px; height: 44px; }
  .nav-item { min-height: 44px; max-height: 44px; padding: 12px 14px; }
  .nav-group-title { padding: 14px 12px 8px; }
  .modal-close { width: 44px; height: 44px; font-size: 26px; }

  /* 表单控件：移动端放大到 16px 防止 iOS 聚焦缩放，高度 ≥44px */
  .form-input, .form-select { height: 44px; font-size: 16px; }
  .form-textarea { font-size: 16px; }
  .form-label { font-size: 13px; }

  /* 弹窗：移动端改为近全屏 + 底部上滑，替代居中卡片，
     便于在手机上操作报价/合同等大表单 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    width: 100%; max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.24s;
  }
  .modal-lg { width: 100%; max-width: 100%; }
  /* 小弹窗（确认/提示框）：保持居中卡片，不底部抽屉化 */
  .modal-center {
    align-self: center;
    border-radius: var(--radius-lg);
    width: 92vw !important;
    max-width: 400px !important;
    max-height: 80vh;
  }
  .modal > .modal-head { padding: 14px 16px; }
  .modal > .modal-body { padding: 16px; }
  .modal > .modal-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .modal > .modal-foot .btn { flex: 1 1 auto; min-height: 44px; }

  /* 工具栏：移动端按钮换行、搜索框占满整行 */
  .toolbar { gap: 8px; }
  .toolbar .search-box { min-width: 100%; max-width: 100%; flex-basis: 100%; }
  .toolbar .btn { flex: 1 1 auto; }

  /* 表格：移动端横滑时给出「可左右滑动」的视觉暗示（右侧渐隐） */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  .table-wrap::after {
    content: '';
    position: sticky; right: 0; top: 0;
    display: block; width: 0; height: 0;
  }
  table { font-size: 12.5px; }
  table thead th, table tbody td { padding: 10px 10px; }

  /* 卡片：移动端内边距收紧 */
  .card { padding: 14px; }

  /* 统计卡片：单列（已有 auto-fill minmax 220px，这里显式收紧到双列更省空间） */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 14px; }

  /* Toast 提示：移动端顶部居中，避免右下角被手势区遮挡 */
  .toast-area { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px; left: 16px; }
  .toast { min-width: 0; max-width: none; width: 100%; }

  /* 欢迎横幅：移动端纵向堆叠 */
  .welcome-banner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .wb-greet { font-size: 18px; }
  .wb-actions { width: 100%; }
  .wb-actions .btn-primary { width: 100%; }

  /* 分页：移动端按钮适当放大 */
  .pager button { min-height: 36px; padding: 6px 12px; }
}

/* 超小屏（<400px）：进一步收紧 */
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 18px; }
}


/* 二次确认弹层图标 */
.ui-confirm-ic {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; line-height: 1;
}

/* ===================================================
 * 模块页面骨架模板（新模块直接套用，保证全站一致）
 * 标准结构：toolbar → tabs → card(table) → 分页
 * =================================================== */
.module-page { display: flex; flex-direction: column; gap: 16px; }
.module-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.module-toolbar .spacer { flex: 1; }
/* 让 .module-toolbar 与 .toolbar 完全等价：子元素（搜索框/图标/按钮）沿用同一套样式 */
.module-toolbar .search-box { position: relative; }
.module-toolbar .search-box .form-input { padding-left: 36px; }
.module-toolbar .search-box .search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.module-toolbar .btn { display: inline-flex; align-items: center; }
.module-toolbar .btn svg { flex-shrink: 0; }
.module-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); padding-bottom: 12px;
}
.module-tab {
  padding: 8px 18px; border: none; background: var(--surface-2);
  color: var(--text-2); border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit; transition: all .15s;
}
.module-tab:hover { background: var(--primary-bg); color: var(--primary-600); }
.module-tab.active { background: var(--grad-brand); color: #fff; font-weight: 600; }
.module-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border-2);
  overflow: hidden;
}
.module-card-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  padding: 18px 20px 0;
}
.module-pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border-2);
  font-size: 13px; color: var(--text-2);
}
.module-pager .btn { height: 30px; }

/* ===================================================
 * 【P0 移动端兜底】force-mobile：JS 检测到设备物理宽度为 mobile
 * 但 WebView 渲染宽度被强制拉大（Capacitor WebView/微信 X5/部分国产浏览器
 * 会忽略 width=device-width viewport meta）时，给 <html> 加 force-mobile class。
 * 这里强制按 mobile 渲染，优先级高于普通 desktop 规则。
 * =================================================== */
.force-mobile .sidebar { transform: translateX(-100%); }
.force-mobile .sidebar.open { transform: translateX(0); }
.force-mobile .sidebar { box-shadow: 8px 0 32px rgba(15, 42, 80, 0.35); }
.force-mobile .main { margin-left: 0; }
.force-mobile .sidebar-mask.show { display: block; animation: fadeIn 0.18s; }
.force-mobile .topbar .menu-toggle { display: inline-flex !important; }
.force-mobile .topbar .crumbs { display: none; }
.force-mobile .content { padding: 16px; }
.force-mobile .form-row, .force-mobile .form-row-3 { grid-template-columns: 1fr; }
.force-mobile .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.force-mobile .stat-card { padding: 12px 14px; }
.force-mobile .login-brand { display: none; }
.force-mobile .login-box { width: 100%; max-width: 420px; }
.force-mobile .nav-item { min-height: 44px; max-height: 44px; padding: 12px 14px; }
.force-mobile .modal-mask { padding: 0; align-items: flex-end; }
.force-mobile .modal { width: 100% !important; max-width: 100% !important; max-height: 92vh; border-radius: 16px 16px 0 0; }
.force-mobile .modal-lg, .force-mobile .modal-xl, .force-mobile .modal-2xl { width: 100% !important; max-width: 100% !important; }
.force-mobile .modal-center { align-self: center; border-radius: var(--radius-lg); width: 92vw !important; max-width: 400px !important; max-height: 80vh; }
.force-mobile .form-input, .force-mobile .form-select { height: 44px; font-size: 16px; }
.force-mobile .form-textarea { font-size: 16px; }
.force-mobile .btn { min-height: 40px; padding: 8px 14px; }
.force-mobile .btn-sm { min-height: 36px; }
.force-mobile .icon-btn, .force-mobile .menu-toggle { width: 44px; height: 44px; }
.force-mobile .topbar { padding: 0 12px; gap: 8px; }
.force-mobile .topbar-center { display: none; }
.force-mobile .topbar .user > div:last-child { display: none; }
.force-mobile .toolbar { gap: 8px; }
.force-mobile .toolbar .search-box { min-width: 100%; max-width: 100%; flex-basis: 100%; }
.force-mobile .toolbar .btn { flex: 1 1 auto; }
.force-mobile .toast-area { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px; left: 16px; }
.force-mobile .toast { min-width: 0; max-width: none; width: 100%; }
.force-mobile .modal-close { width: 44px; height: 44px; font-size: 26px; }
.force-mobile table { font-size: 12.5px; }
.force-mobile table thead th, .force-mobile table tbody td { padding: 10px 10px; }
.force-mobile .card { padding: 14px; }
.force-mobile .pager button { min-height: 36px; padding: 6px 12px; }

/* 售后工单：现场照片缩略图（小程序上传，工作台弹窗内展示） */
.as-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.as-imgs .as-img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-2); cursor: zoom-in; }
.as-imgs .as-img:hover { transform: scale(1.04); border-color: var(--brand-blue, #1E6BB8); }  /* 【UI测评P1】原 var(--brand,#0B5FFF) 中 --brand 未定义，兜底为体系外蓝 */

/* ============ 企业知识库（V2.0 P1） ============ */
.kb-wrap { display: flex; gap: 20px; align-items: flex-start; }
.kb-side {
  width: 220px; flex-shrink: 0; background: var(--surface, #fff);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 14px 10px; position: sticky; top: 76px;
}
.kb-side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 10px; border-bottom: 1px solid var(--border-2); margin-bottom: 8px; }
.kb-cat-list { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 200px); overflow-y: auto; }
.kb-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2); transition: background 0.15s;
}
.kb-cat-item:hover { background: var(--surface-2); color: var(--text); }
.kb-cat-item.active { background: #E8F1FA; color: var(--brand-blue, #1E6BB8); font-weight: 600; }  /* 【UI测评P1】同上，改用 logo 蓝色端体系 */
.kb-cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-cat-count { font-size: 11px; color: var(--text-3); margin-left: 6px; }
.kb-main { flex: 1; min-width: 0; }
.kb-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.kb-doc-card {
  background: var(--surface, #fff); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 14px 16px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kb-doc-card:hover { border-color: var(--brand-blue, #1E6BB8); box-shadow: 0 4px 16px rgba(30, 107, 184, 0.10); }
.kb-doc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-doc-name { font-size: 15px; font-weight: 600; color: var(--text); }
.kb-doc-summary { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-doc-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.kb-doc-meta span::before { content: ''; }
.kb-doc-meta span + span::before { content: '·'; margin-right: 14px; }

/* 文档详情弹窗 */
.kb-view-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--text-2); padding-bottom: 12px; border-bottom: 1px solid var(--border-2); margin-bottom: 12px; }
.kb-view-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kb-view-summary { font-size: 14px; color: var(--text-2); background: var(--surface-2); border-left: 3px solid var(--brand-blue, #1E6BB8); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.kb-content-text { font-size: 14px; line-height: 1.9; color: var(--text); word-break: break-word; }
.kb-view-files { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.kb-files-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.kb-file-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); margin-bottom: 6px; }
.kb-file-name { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 移动端：知识库侧栏折叠为顶部横向选择 */
@media (max-width: 768px) {
  .kb-wrap { flex-direction: column; }
  .kb-side { width: 100%; position: static; }
  .kb-cat-list { max-height: 180px; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .kb-cat-item { padding: 6px 10px; }
}

/* ===================================================
 * 【P0 移动端深适配】通用表格卡片化（配合 app.js applyResponsiveTables）
 * force-mobile 下，被打上 rt-card 标记的"列表型表格"转成卡片视图：
 *   隐藏表头 → 每行变一张卡片 → 每个单元格纵向堆叠，左侧显示字段名。
 * 说明：
 *   - 仅 .force-mobile 作用域生效，桌面端零影响
 *   - 只作用于 rt-card（运行时由 JS 自动标记），编辑/明细/弹窗表格不受影响
 * =================================================== */
.force-mobile table.rt-card { display: block; border: none; }
.force-mobile table.rt-card thead { display: none; }
.force-mobile table.rt-card tbody { display: block; }
.force-mobile table.rt-card tr {
  display: block;
  border: 1px solid var(--border-2, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  background: var(--surface, #fff);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.force-mobile table.rt-card tr:last-child { margin-bottom: 0; }
.force-mobile table.rt-card td {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  border: none;
  text-align: left;
  font-size: 13.5px;
  word-break: break-word;
}
/* 首列（通常是主标识，如报价单号/合同号）视觉加粗突出 */
.force-mobile table.rt-card td:first-child { font-weight: 600; }
/* 字段名标签：占固定宽度左列 */
.force-mobile table.rt-card td::before {
  content: attr(data-label);
  flex: 0 0 78px;
  max-width: 78px;
  font-size: 12px;
  color: var(--text-3, #9ca3af);
  padding-top: 1px;
  white-space: normal;
  word-break: break-word;
}
/* 操作列（JS 识别含 .btn 的单元格，打 rt-actions）：按钮横向铺开，不显示字段名 */
.force-mobile table.rt-card td.rt-actions::before { display: none; }
.force-mobile table.rt-card td.rt-actions {
  flex-wrap: wrap;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--border-2, #e5e7eb);
}
.force-mobile table.rt-card td.rt-actions .btn { flex: 1 1 auto; }
/* 空态行：占满宽度居中 */
.force-mobile table.rt-card td.empty { display: block; text-align: center; padding: 20px 0; }
.force-mobile table.rt-card td.empty::before { display: none; }
