
/* ===== 设计 token（方案 A · 工位终端）=====
   一个主色、一套中性灰、语义色只用于状态。
   改这一块就能换掉全站观感；下面的规则都通过 var() 引用这里。 */
:root {
  --brand: #185FA5;
  --brand-dark: #0C447C;
  --brand-light: #E6F1FB;
  --ink: #2C2C2A;
  --ink-2: #5F5E5A;
  --ink-3: #888780;
  --line: #E4E4E0;
  --line-strong: #CFCFC9;
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --ok: #3B6D11;      --ok-bg: #EAF3DE;
  --warn: #854F0B;    --warn-bg: #FAEEDA;
  --danger: #A32D2D;  --danger-bg: #FCEBEB;
  --info: #185FA5;    --info-bg: #E6F1FB;
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px;
  --nav-bg: #22221F;   /* 侧边导航：暖近黑，和内容区暖灰同一家族 */
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  /* 字阶：只留 6 档，别再出现 11.5/12.5/13.5 */
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px;
  --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px;
  /* 按钮高度只留 3 档：表格内小按钮 / 常规 / 主操作。
     所有按钮类都引用这里，别再各自写 padding 决定高度。 */
  --btn-h-sm: 32px; --btn-h-md: 36px; --btn-h-lg: 44px;
  --el-color-primary: #185FA5;
  --el-color-primary-light-3: #378ADD;
  --el-color-primary-light-5: #85B7EB;
  --el-color-primary-light-7: #B5D4F4;
  --el-color-primary-light-9: #E6F1FB;
  --el-color-primary-dark-2: #0C447C;
  --el-border-radius-base: 6px;
}
/* Element Plus 全局适配 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* 升级弹窗样式 */
.modal-content {
  border-radius: var(--r-xl) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15) !important;
  border: none !important;
}
.modal-header {
  border-bottom: 1px solid var(--line) !important;
  border-radius: var(--r-xl) 12px 0 0 !important;
}
/* 升级输入框样式 */
input, select, textarea {
  border-radius: 6px !important;
  border: 1px solid var(--line-strong) !important;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(24,95,165,0.18) !important;
}
/* 升级表格样式 */
table {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
}
th {
  background: var(--surface-2) !important;
  font-weight: 600 !important;
  color: var(--ink);
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--line) !important;
}
td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
tbody tr:nth-child(even) {
  background: var(--surface-2);
}
tbody tr:hover {
  background: var(--brand-light) !important;
  transition: background 0.2s;
}
/* 弹窗动画 */
.modal {
  animation: fadeIn 0.2s ease;
}
.modal-content {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
/* 卡片样式升级 */
.stat-card, .dashboard-card {
  border-radius: var(--r-xl) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
  border: none !important;
  transition: all 0.3s;
}
.stat-card:hover, .dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}
/* 导航栏升级 */
.navbar, .sidebar {
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
}



/* 同步状态指示器动画 */
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}
#syncStatusIndicator:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); padding: 10px; }
.container { max-width: 980px; margin: 0 auto; }
.header {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 12px 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.header h1 { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.header .sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 3px; }
/* ===== 按钮：只有「主操作」是实心主色，其余是中性描边 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: var(--btn-h-md); padding: 0 13px;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-md); font-weight: 500; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-success { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-success:hover { background: #2F5A0D; border-color: #2F5A0D; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #7F2020; border-color: #7F2020; }
.btn-warning { background: var(--warn-bg); color: var(--warn); border-color: rgba(133,79,11,.3); }
.btn-warning:hover { background: #F5E3C8; border-color: rgba(133,79,11,.5); }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.card { background: #fff; border-radius: var(--r-xl); padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-title { font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--info-bg); display: flex; align-items: center; gap: 6px; }
.card-title .icon { width: 18px; height: 18px; background: var(--brand); color: #fff; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.form-item { display: flex; flex-direction: column; gap: 3px; }
.form-item label { font-size: 11px; color: var(--ink-2); font-weight: 500; }
.form-item input, .form-item select, .form-item textarea { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 13px; outline: none; }
.form-item input:focus, .form-item select:focus { border-color: var(--brand); }
.next-service { background: var(--ok-bg); border: 1px solid var(--ok); border-radius: 6px; padding: 8px 12px; margin-top: 8px; font-size: 13px; display: none; }
.next-service.show { display: block; }
.next-service strong { color: var(--ok); font-size: 14px; }

.score-risk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.score-box { text-align: center; padding: 14px; border-radius: var(--r-lg); }
.score-box .score-num { font-size: 36px; font-weight: 800; line-height: 1; }
.score-box .score-label { font-size: 12px; margin-top: 4px; font-weight: 600; }
.score-box .score-desc { font-size: 11px; margin-top: 2px; opacity: 0.8; }
/* 评级色只落在数字和文字上，不再铺满整块底色 */
.score-box { background: var(--surface-2); border: 1px solid var(--line); }
.score-A .score-num,.score-A .score-label { color: var(--ok); }
.score-B .score-num,.score-B .score-label { color: var(--brand-dark); }
.score-C .score-num,.score-C .score-label { color: var(--warn); }
.score-D .score-num,.score-D .score-label { color: var(--danger); }
/* 风险等级色只留在左侧竖线和标题文字上，底色与评分块保持一致 */
.risk-box { padding: 14px; border-radius: var(--r-lg); display: flex; flex-direction: column; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); }
.risk-high { border-left-color: var(--danger); }
.risk-mid { border-left-color: var(--warn); }
.risk-low { border-left-color: var(--info); }
.risk-none { border-left-color: var(--ok); }
.risk-level { font-size: 18px; font-weight: 700; }
.risk-high .risk-level { color: var(--danger); }
.risk-mid .risk-level { color: var(--warn); }
.risk-low .risk-level { color: var(--brand-dark); }
.risk-none .risk-level { color: var(--ok); }
.risk-desc { font-size: 12px; margin-top: 6px; line-height: 1.5; }

/* 检查项：保留 .check-category 容器（打印链路 onbeforeprint / :has() 依赖它），
   只把「彩色分类横条」换成中性分组标题，让每张表看起来是同一张表的延续 */
.check-category {
  margin-bottom: 16px; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.check-category-title {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink);
  padding: 9px 12px; margin-bottom: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.check-category-title::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand); flex: 0 0 auto;
}
.check-category-title span { margin-left: auto; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
/* 分类不再各自一种底色；保留类名只为不惊动打印的 .cat-* 选择器 */
.cat-engine, .cat-chassis, .cat-brake, .cat-tire, .cat-electric, .cat-body {
  background: var(--surface-2); color: var(--ink);
}

/* ===== 板块折叠（2026-11-14）=====
   约束 1：折叠**不能**用 display:none 打在 .check-category 上 ——
     打印 CSS 靠 `.print-only-bad .check-category:has(...)` 控制板块显隐，
     容器被 display:none 会让板块在打印时直接消失。
     所以折叠打在**内层 .check-cat-body** 上，容器始终 display:block。
   约束 2：@media print 里必须强制展开（见下方打印块）。
   约束 3（2026-11-14 补）：**不要用 !important**。
     增量设计门禁把 css.important 计入技术债（基线 131），新增即红。
     这里一律用「提高选择器权重」代替 !important：
       .check-category-title span        → (0,1,1)  ← 它设了 margin-left:auto
       .check-category-title .fold-arrow → (0,2,0)  ← 权重更高，自然压过
     少写 !important 的收益不只是过门禁：
     !important 会让**后续任何规则都压不过它**，包括后来加的打印规则。
*/
.check-category-title {
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background 0.15s;
}
.check-category-title:hover { background: var(--surface-3, var(--surface-2)); }
.check-category-title:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* 权重 (0,2,0) > `.check-category-title span` 的 (0,1,1)，
   所以能压掉那条通用规则里的 margin-left:auto —— 不需要 !important。 */
.check-category-title .fold-arrow {
  margin-left: 0; margin-right: 0;
  width: 14px; flex: 0 0 auto; text-align: center;
  /* 12px 而不是 11px：这条规则原本被 `.check-category-title span`（12px）压着，
     实际渲染就是 12px。提权重后 11px 才真正生效 —— 那是「代码写了但没生效」，
     不是设计意图。桌面端保持 12px（视觉零变化，且比 11px 更易看清）。 */
  font-size: var(--fs-sm); color: var(--ink-3); transition: transform 0.15s;
}
.check-category-title .fold-count { margin-left: auto; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
/* 异常数量徽标：折叠时技师仍能看到「这个板块有 2 项要处理」 */
.check-category-title .fold-badge {
  margin-left: 0; margin-right: 8px;
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--danger-bg); color: var(--danger);
  font-size: 11px; font-weight: 600; line-height: 1.6;
  border: 1px solid var(--danger);
}
.check-category.folded .check-cat-body { display: none; }
.check-category.folded .check-category-title { border-bottom: none; }
.check-category.folded .check-category-title .fold-arrow { color: var(--ink-2); }
.check-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.check-table th {
  background: var(--surface); padding: 8px 10px; text-align: left;
  font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: var(--fs-sm);
}
.check-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow: hidden; }
.check-table tbody tr:hover { background: var(--surface-2); }
.check-table tbody tr:last-child td { border-bottom: none; }
.check-table .item-name { font-weight: 500; font-size: var(--fs-sm); }
.check-table .item-standard { font-size: var(--fs-xs); color: var(--ink-2); font-weight: normal; margin-top: 3px; line-height: 1.4; }
.status-group { display: flex; gap: 3px; }
.status-btn { padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; font-size: 11px; background: #fff; transition: all 0.15s; }
.status-btn.active-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.status-btn.active-warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.status-btn.active-bad { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.fee-input { width: 60px; padding: 3px 5px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 12px; text-align: right; }
.remark-input { width: 100%; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 11px; resize: none; overflow: hidden; line-height: 1.4; min-height: 24px; box-sizing: border-box; font-family: inherit; }
.photo-btn { padding: 3px 8px; border: 1px dashed var(--danger); border-radius: var(--r-sm); cursor: pointer; font-size: 11px; color: var(--danger); background: #fff; display: inline-flex; align-items: center; gap: 3px; }
.photo-btn:hover { background: var(--danger-bg); }
.photo-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: var(--r-sm); cursor: pointer; border: 1px solid var(--line-strong); }
.bad-item { border: 1px solid rgba(163,45,45,.25); border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 10px; background: var(--danger-bg); }
.bad-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.bad-status { padding: 2px 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; color: #fff; }
.bad-status.status-bad { background: var(--danger); }
.bad-status.status-warn { background: var(--warn); }
.bad-item-name { font-weight: 600; font-size: 13px; }
.bad-item-cat { font-size: 11px; color: var(--ink-3); }
.bad-item-remark, .bad-item-reason { font-size: 12px; margin: 3px 0; color: var(--ink); word-wrap: break-word; word-break: break-all; white-space: pre-wrap; line-height: 1.5; }
.bad-item-reason { color: var(--danger); font-weight: 500; }
.reason-btn { 
  width: 100%; 
  max-width: 100%; 
  padding: 5px 8px; 
  border: 1px solid var(--line-strong); 
  border-radius: var(--r-sm); 
  font-size: 12px; 
  background: #fff; 
  box-sizing: border-box; 
  height: var(--btn-h-sm); min-height: var(--btn-h-sm);
  cursor: pointer;
  text-align: left;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reason-btn:hover { background: var(--surface-2); }
/* 检查页级别切换：尺寸交给 token，选中态仍由 switchLevel 的内联背景控制 */
.level-btn { height: var(--btn-h-sm); box-sizing: border-box; padding: 0 10px;
  font-size: var(--fs-xs); border: 1px solid var(--brand-light);
  border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink-2); cursor: pointer; }
.reason-selected { color: var(--danger); font-weight: 500; border-color: #f28b82; }
.status-ok { color: var(--ok); font-weight: 500; border-color: var(--ok); background: var(--ok-bg); }
.status-warn { color: var(--warn); font-weight: 500; border-color: var(--warn); background: var(--warn-bg); }
.status-bad { color: var(--danger); font-weight: 500; border-color: var(--danger); background: var(--danger-bg); }
.status-replaced { color: var(--brand); font-weight: 500; border-color: var(--info); background: var(--info-bg); }
.status-adjusted { color: var(--brand-dark); font-weight: 500; border-color: var(--line-strong); background: var(--brand-light); }
.status-recommend { color: var(--warn); font-weight: 500; border-color: var(--warn); background: var(--warn-bg); }
.status-urgent { color: var(--danger); font-weight: 500; border-color: var(--danger); background: var(--danger-bg); }
.row-recommend { background: var(--warn-bg) !important; }
.row-urgent { background: var(--danger-bg) !important; }
/* V27重点项目高亮 */
/* 「重点产值项目」不是"警告"，整行铺警示黄是语义误用：一张表里
   半数是黄底，反而看不出哪里真有问题。改成中性底 + 一条主色竖线。 */
.row-key { background: var(--surface-2) !important; }
.row-key > td:first-child { border-left: 3px solid var(--brand); }
.row-key .item-name > div:first-child { font-weight: 600; }
.key-badge { display: inline-block; margin-right: 2px; font-size: 12px; }
/* 数据化实测值输入 */
.item-measure { margin-top: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.measure-tag { font-size: 10px; color: var(--ink-2); background: var(--surface-2); padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.measure-input { width: 55px; padding: 2px 4px; font-size: 12px; border: 1px solid var(--line); border-radius: 3px; text-align: center; }
.measure-input:focus { border-color: #2196f3; outline: none; }
/* 跟进清单 */
.follow-up-card { background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:12px;margin-bottom:10px; }
.follow-up-card.overdue { border-color:var(--danger);background:var(--danger-bg); }
.btn-small {
  height: var(--btn-h-sm); box-sizing: border-box; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--brand-light);
  color: var(--brand-dark); cursor: pointer;
}
.btn-small:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }

/* 异常原因选择模态框 */
.reason-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
.reason-modal.show { display: flex; }
.reason-modal-content {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: var(--r-xl) 12px 0 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.reason-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reason-modal-header .close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-2);
  padding: 0;
  line-height: 1;
}
.reason-modal-list {
  overflow-y: auto;
  padding: 8px 0;
}
.reason-option {
  padding: 14px 16px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.reason-option:hover { background: var(--surface-2); }
.reason-option-selected { color: var(--brand); font-weight: 500; }
.bad-item-kb { font-size: 11px; color: var(--ink-2); margin: 6px 0; padding: 6px 8px; background: #fff; border-radius: var(--r-sm); border-left: 3px solid var(--danger); line-height: 1.5; }
.bad-item-kb div { margin: 2px 0; }
.bad-item-photos { margin-top: 10px; }
.photo-upload-btn { 
  display: inline-block; 
  padding: 8px 14px; 
  border: 1px dashed var(--danger); 
  border-radius: 6px; 
  color: var(--danger); 
  font-size: 13px; 
  cursor: pointer; 
  background: #fff;
  margin-bottom: 8px;
}
.photo-upload-btn:hover { background: var(--danger-bg); }
.bad-photos-grid { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  margin-top: 6px; 
}
.bad-photo-item { 
  position: relative; 
  display: inline-block; 
}
.bad-photo { 
  width: 100px; 
  height: 100px; 
  border-radius: 6px; 
  border: 1px solid var(--line-strong); 
  object-fit: cover; 
  cursor: pointer; 
}
.bad-photo-del { 
  position: absolute; 
  top: -6px; 
  right: -6px; 
  width: 20px; 
  height: 20px; 
  border-radius: 50%; 
  background: var(--danger); 
  color: #fff; 
  border: none; 
  font-size: 11px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0;
}
.photo-cell { display: flex; align-items: center; gap: 4px; }

/* 风险预警卡片 */
.risk-alert { background: var(--danger-bg); border: 1px solid rgba(163,45,45,.25); border-radius: 6px; padding: 8px 10px; margin-top: 4px; font-size: 11px; line-height: 1.6; }
.risk-alert .ra-title { font-weight: 700; color: var(--danger); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.risk-alert .ra-row { color: var(--ink-2); }
.risk-alert .ra-row strong { color: var(--ink); }
.risk-alert .ra-urgency { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; color: #fff; }
.urgency-high { background: var(--danger); }
.urgency-mid { background: var(--warn); color: #fff; }
.urgency-low { background: var(--info); }

.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.summary-item { background: var(--surface-2); padding: 10px; border-radius: 6px; text-align: center; }
.summary-item .num { font-size: 22px; font-weight: 700; }
.summary-item .label { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.num-ok { color: var(--ok); }
.num-warn { color: var(--warn); }
.num-bad { color: var(--danger); }
.num-fee { color: var(--brand); }
.suggestion-box { width: 100%; min-height: 55px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 13px; resize: vertical; }

.history-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.history-item:hover { background: var(--surface-2); }
.history-info { flex: 1; }
.history-plate { font-weight: 600; color: var(--brand); }
.history-meta { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.history-score { font-weight: 700; font-size: 14px; margin-right: 10px; }
.history-actions { display: flex; gap: 4px; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 10000; justify-content: center; align-items: center; padding: 15px; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 750px; max-height: 85vh; overflow-y: auto; padding: 18px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-header h2 { font-size: 14px; }
.close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink-3); }
.empty { text-align: center; padding: 25px; color: var(--ink-3); font-size: 13px; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 6px; font-size: 13px; z-index: 2000; opacity: 0; transition: opacity 0.3s; }
.toast.show { opacity: 1; }
/* 设置弹窗 */
.settings-tab { padding: 6px 12px; font-size: 13px; }
.settings-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.config-item-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.config-item-row input { flex: 1; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; min-width: 0; }
.config-item-row .cat-label { font-size: 11px; color: var(--ink-3); background: var(--surface-2); padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.config-del-btn { height: var(--btn-h-sm); box-sizing: border-box;
  background: var(--danger); color: #fff; border: none; border-radius: var(--r-sm);
  padding: 0 8px; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
/* 方案 B：检查项目主从分组列表 */
.cfg-toolbar { margin-bottom: 10px; }
.cfg-cat-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cfg-cat-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: var(--fs-sm); line-height: 1.2;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.cfg-cat-item:hover { border-color: var(--line-strong); }
.cfg-cat-item.active {
  background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); font-weight: 600;
}
.cfg-cat-count {
  font-size: var(--fs-xs); color: var(--ink-3); background: var(--surface-2);
  border-radius: 999px; padding: 0 6px; min-width: 18px; text-align: center;
}
.cfg-cat-item.active .cfg-cat-count { color: var(--brand-dark); }
.cfg-toolbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cfg-search, .cfg-new {
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-md); font-size: var(--fs-sm);
}
.cfg-search { width: 220px; max-width: 50%; }
.cfg-new { flex: 1; min-width: 120px; }
.cfg-bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; margin: 0 0 8px; border: 1px solid var(--brand); border-radius: var(--r-sm);
  background: var(--brand-light); font-size: var(--fs-sm); color: var(--brand-dark);
}

/* 列表在检查项目容器内是标准数据表：thead 吸顶，列只有「勾选 / 名称 / 操作」。
   编号/分类列已并入左侧分类导航，表头只剩「名称 / 操作」。 */
/* 固定大小的框：表格在框内自己滚动，页面整体不再被表格撑高 */
#settingsItemsList {
  height: clamp(260px, calc(100vh - 385px), 620px);
  overflow-y: auto; overflow-x: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
#settingsItemsList .cfg-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
}
#settingsItemsList tr.cfg-head th {
  position: sticky; top: 0; z-index: 1; text-align: left;
  padding: 7px 8px; background: var(--surface-2);
  border-bottom: 1px solid var(--line-strong);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
}
#settingsItemsList tr.cfg-head th:first-child { width: 30px; }
#settingsItemsList tr.cfg-head th:last-child { text-align: right; }
#settingsItemsList .cfg-head-check { width: 16px; height: 16px; }
#settingsItemsList tr.config-item-row td {
  padding: 6px 8px; border-bottom: 1px solid var(--line);
  font-size: var(--fs-base); color: var(--ink);
}
#settingsItemsList tr.config-item-row { display: table-row; height: var(--btn-h-sm); }
#settingsItemsList tr.config-item-row:hover { background: var(--surface-2); }
#settingsItemsList .cfg-check { width: 16px; height: 16px; cursor: pointer; }
#settingsItemsList .cfg-name {
  font-size: var(--fs-base); color: var(--ink); cursor: text;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 6px;
  border-radius: var(--r-sm); border: 1px solid transparent; display: block;
}
#settingsItemsList .cfg-name:hover { background: var(--surface); border-color: var(--line); }
#settingsItemsList .cfg-edit-input {
  width: 100%; box-sizing: border-box; padding: 4px 6px;
  border: 1px solid var(--brand); border-radius: var(--r-sm); font-size: var(--fs-base);
  min-width: 0;
}
#settingsItemsList td.cfg-acts-cell { text-align: right; white-space: nowrap; }
#settingsItemsList .cfg-acts { display: inline-flex; gap: 2px; justify-content: flex-end; }
/* 幽灵图标按钮：默认无描边无底色，悬停才浮出来。
   一行四个实心方框正是「一排按钮」的观感来源，图标化后必须把边框收掉。 */
.cfg-edit, .cfg-del, .cfg-move {
  width: var(--btn-h-sm); height: var(--btn-h-sm); box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer;
  background: transparent; color: var(--ink-3); font-size: 13px; line-height: 1; padding: 0;
}
.cfg-edit:hover, .cfg-del:hover, .cfg-move:hover {
  background: var(--surface-2); border-color: var(--line); color: var(--ink);
}
.cfg-del:hover { color: var(--danger); border-color: var(--danger); }
.cfg-empty { padding: 20px 8px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
.cfg-undo-bar {
  align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; margin: 0 0 8px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--surface-2);
  font-size: var(--fs-sm); color: var(--ink-2);
}
#cfgClearAllBtn.armed { background: var(--warn); border-color: var(--warn); color: var(--surface); }
@media (max-width: 768px) {
  .cfg-cat-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .cfg-cat-item { flex: 0 0 auto; }
  .cfg-search { width: 100%; max-width: 100%; }
  /* 手机上只留「编辑 / 删除」两个高频操作，各给 44px 触控目标；
     上下移排序是低频管理动作，桌面用箭头，手机不占横向空间。 */
  #settingsItemsList .cfg-move { display: none; }
  #settingsItemsList .cfg-edit, #settingsItemsList .cfg-del { width: 44px; height: 44px; font-size: 15px; }
}
.config-reason-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.config-reason-row input { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; }
.config-field { margin-bottom: 10px; }
.config-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.config-field textarea, .config-field input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; box-sizing: border-box; }
.config-field textarea { min-height: 50px; resize: vertical; }
.photo-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; justify-content: center; align-items: center; padding: 20px; }
.photo-modal.show { display: flex; }
.photo-modal img { max-width: 100%; max-height: 90vh; border-radius: var(--r-lg); }
.photo-modal .close { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 28px; cursor: pointer; background: none; border: none; }
.collab-tip { background: var(--info-bg); border: 1px solid rgba(24,95,165,.25); border-radius: 6px; padding: 10px 12px; font-size: 12px; color: var(--brand-dark); margin-bottom: 10px; line-height: 1.6; }
.collab-tip strong { color: var(--brand); }

@media print {
  body { background: #fff; padding: 0; }
  .no-print { display: none !important; }
  
  /* PDF导出模式 */
  body.pdf-export .header,
  body.pdf-export .btn-group,
  body.pdf-export .no-print { display: none !important; }
  
  body.pdf-export select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    padding-right: 10px !important;
  }
  
  body.pdf-export .container {
    width: 780px !important;
    max-width: 780px !important;
  }
  
  body.pdf-export .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .container { max-width: 100%; }
  .card { box-shadow: none; border: 1px solid var(--line); page-break-inside: avoid; margin-bottom: 8px; }
  .header { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; border-radius: 0; }
  .check-layout { display: block; }
  .check-category-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .status-btn { border: 1px solid var(--ink-3); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .summary-item { border: 1px solid var(--line); }
  .score-box, .risk-box, .risk-alert, .next-service { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-title { display: block !important; text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
  .print-info { display: block !important; font-size: 11px; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .photo-thumb { width: 45px; height: 45px; }
  .risk-alert { font-size: 10px; }
  .bad-item { page-break-inside: avoid; }
  .bad-photo { width: 120px; height: 120px; max-width: 120px; max-height: 120px; }
  #oldPartPhotosContainer img { width: 120px; height: 120px; max-width: 120px; max-height: 120px; }
  .photo-upload-btn { display: none; }
  .bad-photo-del { display: none; }
  .item-standard { font-size: 11px; }
  table td, table th { word-wrap: break-word; word-break: break-all; vertical-align: top; }
  .reason-btn, .remark-input { font-size: 10px; width: 100%; }
  .remark-input { height: auto !important; overflow: visible; resize: none; }
  .check-table { table-layout: fixed; width: 100%; }
  /* V27客户版：打印只显示异常项 */
  .print-hide-row { display: none !important; }
  .print-only-bad .check-category:has(tbody tr:not(.print-hide-row)) { display: block; }
  .print-only-bad .check-category:has(tbody tr.print-hide-row:last-child) { display: none; }
  /* 板块折叠只在屏幕上生效 —— 打印时**必须全部展开**，
     否则技师折叠过的板块在纸质报告上就整块消失了。
     （打印是不可回归区，这条不能省。）

     权重说明：屏幕态那条是 `.check-category.folded .check-cat-body { display:none }`，
     打印这条选择器**完全相同**（0,3,0），靠「同一文件里位置更靠后」取胜 ——
     所以不需要 !important。实测验证过：去掉 !important 后打印媒体下
     折叠板块的 body 仍然是 display:block。
     加 !important 的坏处：它会让**后来任何规则都压不过这条**，
     包括将来加的打印规则。 */
  .check-category.folded .check-cat-body { display: block; }
  .check-category.folded .fold-arrow { display: none; }
}
.print-title, .print-info { display: none; }

/* ===== 报价计算器样式 ===== */


/* 顶部导航 */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--brand); color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.06); }

.topbar .back-btn { display: none; background: rgba(255,255,255,0.25); backdrop-filter: blur(10px); border: none; color: #fff; width: 38px; height: 38px; border-radius: var(--r-xl); font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }

.topbar .back-btn.show { display: flex; }

.topbar h1 { font-size: 18px; font-weight: 700; flex: 1; letter-spacing: 0.5px; }

.topbar .sub { font-size: 12px; opacity: 0.85; font-weight: 400; }


/* 模块容器 */
.module { display: none; padding: 16px; padding-bottom: 90px; }

.module.active { display: block; animation: fadeIn 0.3s ease; }
/* ===== 报价计算器紧凑布局（仅作用于计算器，不影响检查表）===== */
#module-quote{padding-top:6px;}
#module-quote .module-title{font-size:18px;margin-bottom:10px;}
#module-quote .card{padding:12px;margin-bottom:8px;border-radius:12px;}
#module-quote .card-title{font-size:14px;margin-bottom:8px;}
#module-quote .form-group{margin-bottom:8px;}
#module-quote .form-label{font-size:12px;margin-bottom:4px;}
#module-quote .form-input,#module-quote .form-select{padding:8px 12px;font-size:13px;border-radius:8px;border-width:1px;}
#module-quote .form-select{padding-right:30px;background-position:right 10px center;}
#module-quote .action-row{gap:8px;margin-bottom:8px;}
#module-quote .action-btn{padding:9px 8px;font-size:13px;border-radius:10px;}
#module-quote .big-btn{padding:12px;font-size: 14px;border-radius:12px;margin-bottom:8px;}
#quoteVehicleGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
#quoteVehicleGrid .pkg-full{grid-column:1/-1;}
@media(max-width:680px){ #quoteVehicleGrid{grid-template-columns:repeat(2,1fr);} }
@media(max-width:420px){ #quoteVehicleGrid{grid-template-columns:1fr;} }
#module-quote .quote-cat-btn{height:var(--btn-h-sm);box-sizing:border-box;padding:0 12px!important;font-size:var(--fs-sm)!important;border-radius:16px!important;}
#selectedItemsList>div{padding:8px 10px!important;margin-bottom:6px!important;}
 }

/* 模块页面标题 */
.module-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }

.module-title .sub { font-size: 13px; color: var(--ink-3); font-weight: 500; }


/* 首页仪表盘 */
.dashboard-header { background: var(--brand); color: #fff; border-radius: var(--r-xl); padding: 24px; margin-bottom: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.04); }

.dashboard-header .store-name { font-size: 14px; opacity: 0.95; font-weight: 500; }

.dashboard-header .date { font-size: 12px; opacity: 0.75; margin-top: 6px; }

.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }


/* 模块入口网格 */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.module-card { background: #fff; border-radius: 18px; padding: 22px 18px; cursor: pointer; transition: all 0.25s; box-shadow: 0 4px 16px rgba(0,0,0,0.06); border: 2px solid transparent; position: relative; overflow: hidden; }

.module-card:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.module-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand); opacity: 0; transition: opacity 0.25s; }

.module-card:active::before { opacity: 1; }

.module-card .icon { font-size: 36px; margin-bottom: 12px; }

.module-card .name { font-size: 16px; font-weight: 700; color: var(--ink); }

.module-card .desc { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }

.module-card .badge { display: inline-block; background: var(--danger); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: var(--r-xl); margin-top: 10px; font-weight: 600; }

.module-card .badge.green { background: var(--ok); }

.module-card .badge.orange { background: var(--warn); }

.module-card .badge.gray { background: var(--ink-3); }


/* 通用卡片 */
.card { background: #fff; border-radius: 18px; padding: 20px; margin-bottom: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.03); }

.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--ink); }

.card-title .ico { font-size: 20px; }


/* 表单样式 */
.form-group { margin-bottom: 16px; }

.form-label { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; display: block; }

.form-input, .form-select { width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--r-xl); font-size: 14px; color: var(--ink); background: var(--surface-2); transition: all 0.25s; outline: none; -webkit-appearance: none; appearance: none; }

.form-input:focus, .form-select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(24,95,165,0.12); }

.form-input::placeholder { color: var(--ink-3); }

.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2395a5a6' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }


/* 大按钮 */
.big-btn { display: block; width: 100%; padding: 18px; background: var(--brand); color: #fff; border: none; border-radius: var(--r-xl); font-size: 16px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; margin-bottom: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.06); transition: all 0.2s; letter-spacing: 0.5px; }

.big-btn:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(0,0,0,.06); }

.big-btn.green { background: var(--ok); box-shadow: 0 6px 20px rgba(0,0,0,.06); color: #fff; }

.big-btn.orange { background: var(--warn); box-shadow: 0 6px 20px rgba(0,0,0,.06); }

.big-btn.gray { background: var(--ink-3); box-shadow: 0 6px 20px rgba(0,0,0,.06); }


/* 操作按钮组 */
.action-row { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }

/* 操作条：不再"三个等宽大色块"，按重要性分三档 */
.action-btn {
  flex: 0 0 auto; height: var(--btn-h-md); padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--fs-md); font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}

.action-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }

.action-btn.primary,
.action-btn.success { background: var(--brand); border-color: var(--brand); color: #fff; }

.action-btn.primary:hover,
.action-btn.success:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.action-btn.warning { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }

.action-btn.default { background: transparent; border-color: transparent; color: var(--ink-3); }

.action-btn.default:hover { background: var(--surface-2); color: var(--ink); }


/* 列表项 */
.list-item { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--bg); }

.list-item:last-child { border-bottom: none; }

.list-item .avatar { width: 44px; height: 44px; border-radius: var(--r-xl); background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; margin-right: 14px; flex-shrink: 0; }

.list-item .info { flex: 1; min-width: 0; }

.list-item .info .title { font-size: 14px; font-weight: 600; color: var(--ink); }

.list-item .info .meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.list-item .status { font-size: 11px; padding: 5px 10px; border-radius: var(--r-xl); flex-shrink: 0; font-weight: 600; }


/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }

.empty .ico { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }

.empty .text { font-size: 14px; font-weight: 500; }


/* 底部导航（手机端） */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); display: flex; border-top: 1px solid rgba(0,0,0,0.05); z-index: 100; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(0,0,0,0.05); }

.bottom-nav .nav-item { flex: 1; text-align: center; padding: 10px 0; cursor: pointer; color: var(--ink-3); font-size: 11px; font-weight: 500; transition: all 0.2s; }

.bottom-nav .nav-item.active { color: var(--brand); }

.bottom-nav .nav-item .ico { font-size: 24px; display: block; margin-bottom: 3px; }
/* ===== 账号权限 ===== */
#loginMask{position:fixed;inset:0;z-index:999999;background:var(--bg);display:none;align-items:center;justify-content:center;padding:20px}
.login-card{background:var(--surface);border-radius:var(--r-xl);padding:32px 28px;width:100%;max-width:400px;box-shadow:0 8px 32px rgba(0,0,0,.08);border:1px solid var(--line)}
.login-card .lg-title{text-align:center;font-size:24px;font-weight:700;color:#1f2d3d;margin:8px 0 4px;letter-spacing:1px}
.login-card .lg-sub{text-align:center;color:var(--ink-3);font-size:13px;margin-bottom:28px}
.login-card input{width:100%;box-sizing:border-box;padding:13px 16px;margin-bottom:16px;border:1px solid var(--line-strong);border-radius:8px;font-size: 14px;transition:all .2s}
.login-card input:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px rgba(24,95,165,.12)}
.login-card .lg-btn{width:100%;padding:13px;border:none;border-radius:8px;background:var(--brand);color:#fff;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s}
.login-card .lg-btn:hover{background:var(--brand);transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.12)}
.login-card .lg-tip{font-size:12px;color:#c0c4cc;margin-top:20px;line-height:1.7;text-align:center}
#userChip{display:none;position:fixed;right:10px;bottom:64px;z-index:10000;align-items:center;background:rgba(255,255,255,.97);border:1px solid #e3e6ee;border-radius:20px;padding:5px 8px 5px 13px;font-size:12px;color:var(--ink);box-shadow:0 2px 10px rgba(0,0,0,.12)}
#userChip button{background:transparent;border:none;color:var(--brand);font-size:12px;cursor:pointer;padding:0 0 0 8px}
/* 注意：账号管理 / 岗位权限 两个 tab 已改为 data-perm="sys.accounts"（见 index.html），
   由 core/perm.js 的 applyPermUI 统一裁决 —— 这样管理员把 sys.accounts 勾给
   某个岗位后，那个岗位真的能看到入口。
   下面这条 .role-adminonly 仍保留，但只管还没有 data-perm 的遗留元素（如「多人协作」），
   它带 !important，一旦写在带 data-perm 的元素上就会盖掉 applyPermUI 的内联 display。 */
body:not([data-role="admin"]) .role-adminonly:not([data-perm]){display:none!important}
body[data-role="guest"] .container,body[data-role="guest"] #module-quote,body[data-role="guest"] #mainNav,body[data-role="guest"] .role-adminonly{display:none!important}
body[data-role="guest"] #quoteModuleWrapper{display:block!important;padding:0!important;min-height:100vh}
/* ===== 保养套餐三个子标签：控件统一对齐 ===== */
#qeMileagePanel,#qeCustomPanel,#qeQuickPanel{min-height:280px;}
#qeMileagePanel>div:first-child,#qeCustomPanel>div:first-child,#qeQuickPanel>div:first-child{gap:8px!important;margin-bottom:12px!important;}
#qeMileagePanel>div:first-child button,#qeMileagePanel>div:first-child label,
#qeCustomPanel>div:first-child button,#qeCustomPanel>div:first-child label,
#qeQuickPanel>div:first-child button{padding:8px 14px!important;font-size:13px!important;border-radius:6px!important;line-height:1.4!important;display:inline-flex!important;align-items:center!important;}
#qeMileagePanel input[type=text],#qeMileagePanel input[type=number],
#qeCustomPanel input[type=text],#qeCustomPanel input[type=number],
#qeQuickPanel input[type=text]{padding:6px 8px!important;font-size:12px!important;border-radius:4px!important;border:1px solid var(--line)!important;box-sizing:border-box!important;height:32px!important;}
#qeMileagePanel label,#qeCustomPanel label{font-size:11px!important;}
#qeMileagePanel>div>div,#qeCustomPanel>div>div{border-radius:8px!important;}
#qeQuickPanel table{font-size:12px!important;}
#qeQuickPanel th,#qeQuickPanel td{padding:6px!important;vertical-align:middle!important;}
#qeQuickPanel td input{height:32px!important;}
#qeQuickPanel .qe-quick-input{padding:6px 8px!important;font-size:12px!important;border-radius:4px!important;}
#pkgSubTabs{margin-bottom:12px!important;padding-bottom:10px;border-bottom:1px solid var(--line);}
#pkgSubTabs .pkg-sub-btn{height:30px!important;display:inline-flex!important;align-items:center!important;}
body[data-role="technician"] .role-nottech{display:none!important}
@media print{ #userChip,#loginMask{display:none!important} }


/* 标签页 */
.tabs { display: flex; background: #fff; border-radius: var(--r-xl); padding: 5px; margin-bottom: 18px; gap: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }

.tab { flex: 1; text-align: center; padding: 12px; font-size: 14px; border-radius: var(--r-xl); cursor: pointer; color: var(--ink-3); transition: all 0.25s; font-weight: 500; }

.tab.active { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,.06); }


/* 数据概览小卡片 */
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }

.mini-stat { background: #fff; border-radius: var(--r-xl); padding: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }

.mini-stat .num { font-size: 24px; font-weight: 700; color: var(--brand); }

.mini-stat .num.orange { color: #fa709a; }

.mini-stat .num.green { color: #43e97b; }

.mini-stat .num.red { color: #f5576c; }

.mini-stat .label { font-size: 12px; color: var(--ink-3); margin-top: 6px; font-weight: 500; }


/* 报价结果卡片 */
.quote-result { background: var(--brand); border-radius: var(--r-xl); padding: 24px; margin-bottom: 16px; color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.06); }

.quote-result .result-title { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }

.quote-result .result-amount { font-size: 36px; font-weight: 800; margin-bottom: 16px; }

.quote-result .price-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.quote-result .price-item { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border-radius: var(--r-xl); padding: 12px 8px; text-align: center; }

.quote-result .price-item .label { font-size: 11px; opacity: 0.85; margin-bottom: 4px; }

.quote-result .price-item .value { font-size: 18px; font-weight: 700; }


/* 项目选择卡片 */
.quote-item { display: flex; align-items: center; padding: 14px; background: var(--surface-2); border-radius: var(--r-xl); margin-bottom: 8px; border: 2px solid transparent; transition: all 0.2s; cursor: pointer; }

.quote-item.selected { background: var(--brand-light); border-color: var(--brand); }

.quote-item .check { width: 24px; height: 24px; border-radius: var(--r-lg); border: 2px solid var(--line); margin-right: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }

.quote-item.selected .check { background: var(--brand); border-color: var(--brand); color: #fff; }

.quote-item .item-info { flex: 1; min-width: 0; }

.quote-item .item-name { font-size: 14px; font-weight: 600; color: var(--ink); }

.quote-item .item-price { font-size: 12px; color: var(--ink-3); margin-top: 4px; }


/* 弹窗 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 1000; display: flex; justify-content: center; align-items: center; padding: 20px; }

.modal-content { background: #fff; border-radius: 24px; padding: 24px; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: modalIn 0.3s ease; }
 }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; color: var(--ink); display: flex; align-items: center; gap: 8px; }


/* 标签 */
.tag { display: inline-block; padding: 4px 10px; border-radius: var(--r-xl); font-size: 11px; font-weight: 600; }

.tag.blue { background: var(--info-bg); color: var(--brand-dark); }

.tag.green { background: var(--ok-bg); color: #2e7d32; }

.tag.orange { background: var(--warn-bg); color: var(--warn); }

.tag.purple { background: var(--brand-light); color: var(--brand-dark); }

.tag.red { background: var(--danger-bg); color: #c62828; }

  .dashboard-stats { grid-template-columns: repeat(4, 1fr); }

/* ========== 高端侧边栏导航 ========== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 220px;
  background: var(--nav-bg);
  display: flex; flex-direction: column; z-index: 200;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}
.sidebar-logo {
  padding: 24px 20px 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .logo-icon {
  width: 42px; height: 42px; border-radius: var(--r-lg);
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.sidebar-logo .logo-text { color: #fff; font-size: 16px; font-weight: 600; line-height: 1.3; }
.sidebar-logo .logo-sub { color: rgba(255,255,255,0.45); font-size: 11px; font-weight: 400; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-section { color: rgba(255,255,255,0.35); font-size: 11px; font-weight: 600; padding: 12px 12px 6px; letter-spacing: 1px; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-md); cursor: pointer; color: rgba(255,255,255,0.65);
  font-size: 14px; font-weight: 500; margin-bottom: 4px;
  transition: all 0.2s ease; position: relative;
}
.sidebar-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-item.active {
  background: var(--brand);
  color: #fff; font-weight: 500;
  box-shadow: inset 3px 0 0 rgba(255,255,255,.5);
}
.sidebar-item .sb-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-item .sb-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: var(--r-xl); font-weight: 600;
}
.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 600;
}
.sidebar-footer .user-info { flex: 1; }
.sidebar-footer .user-name { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-footer .user-role { color: rgba(255,255,255,0.45); font-size: 11px; }
.sidebar-footer .logout-btn {
  color: rgba(255,255,255,0.5); cursor: pointer; font-size: 16px; padding: 6px;
  border-radius: 6px; transition: all 0.2s;
}
.sidebar-footer .logout-btn:hover { background: rgba(245,108,108,0.2); color: var(--danger); }

/* 主内容区适配侧边栏 */
.main-wrapper { margin-left: 220px; min-height: 100vh; background: var(--surface-2); }
.main-wrapper .container { max-width: 1200px; padding: 20px 24px 40px; }
.main-wrapper #quoteModuleWrapper { padding: 20px 24px 40px !important; }
.main-wrapper #crmModuleWrapper { bottom: 0 !important; }
.main-wrapper #crmModuleWrapper iframe { width:100%; min-height: calc(100vh - 100px); border:none; display:block; }

/* ERP顶部栏 */
.erp-topbar {
  height: 56px; background: #fff; border-bottom: 1px solid #e8ecf1;
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 150; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.erp-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.erp-breadcrumb .crumb-home { color: var(--brand); cursor: pointer; font-weight: 500; }
.erp-breadcrumb .crumb-sep { color: var(--line-strong); }
.erp-breadcrumb .crumb-current { color: var(--ink); font-weight: 600; }
.erp-top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.erp-notify { position: relative; cursor: pointer; font-size: 18px; padding: 6px; border-radius: var(--r-lg); transition: all 0.2s; }
.erp-notify:hover { background: rgba(0,0,0,.04); }
.erp-notify .badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 600; }
.erp-user { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 10px; border-radius: var(--r-lg); transition: all 0.2s; }
.erp-user:hover { background: rgba(0,0,0,.04); }
.erp-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.erp-user .uname { font-size: 13px; color: var(--ink); font-weight: 500; }
.erp-user .urole { font-size: 11px; color: var(--ink-3); }

/* 可展开子菜单 */
.sidebar-group { margin-bottom: 4px; }
.sidebar-group-title {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--r-xl); cursor: pointer; color: rgba(255,255,255,0.65);
  font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.sidebar-group-title:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-group-title .group-icon { font-size: 16px; width: 22px; text-align: center; filter: grayscale(1) opacity(.8); }
.sidebar-group-title .group-arrow { margin-left: auto; font-size: 10px; transition: transform 0.2s; }
.sidebar-group.open .group-arrow { transform: rotate(90deg); }
.sidebar-submenu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.sidebar-group.open .sidebar-submenu { max-height: 500px; }
.sidebar-subitem {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 46px;
  border-radius: var(--r-lg); cursor: pointer; color: rgba(255,255,255,0.5);
  font-size: 13px; font-weight: 400; margin: 2px 0; transition: all 0.15s;
}
.sidebar-subitem:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.sidebar-subitem.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 500; }
.sidebar-subitem .sub-icon { font-size: 14px; filter: grayscale(1) opacity(.8); }

/* ERP首页工作台 */
.erp-home { padding: 24px; max-width: 1400px; margin: 0 auto; }
.erp-home-welcome {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 20px; flex-wrap: wrap;
}
.erp-home-welcome > div:first-child { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.erp-home-welcome h2 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; }
.erp-home-welcome p { font-size: 12px; color: var(--ink-3); margin: 0; }
.erp-home-welcome .welcome-date { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.erp-home-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.erp-home-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1280px) {
  .erp-home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.erp-kpi {
  background: var(--surface); border-radius: var(--r-xl); padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  transition: border-color .15s;
}
.erp-kpi:hover { border-left-color: var(--brand); }
.erp-kpi .kpi-label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.erp-kpi .kpi-value { font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1.25; }
.erp-kpi .kpi-trend { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.erp-home-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-bottom: 24px; }
.erp-panel {
  background: var(--surface); border-radius: var(--r-xl); padding: 20px;
  border: 1px solid var(--line);
}
.erp-panel h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.erp-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.erp-quick-item {
  padding: 16px 12px; background: var(--surface-2); border-radius: var(--r-lg); cursor: pointer;
  text-align: center; transition: all 0.2s; border: 1px solid transparent;
}
.erp-quick-item:hover { background: var(--brand-light); border-color: #d9ecff; transform: translateY(-2px); }
.erp-quick-item .qi-icon { font-size: 28px; margin-bottom: 8px; }
.erp-quick-item .qi-name { font-size: 13px; color: var(--ink-2); font-weight: 500; }

/* 顶部操作栏 */
.top-bar {
  background: #fff; padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
}
.top-bar .page-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.top-bar .page-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* 移动端：隐藏侧边栏，显示底部导航 */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-wrapper { margin-left: 0; }
  .main-wrapper .container { padding: 12px; padding-bottom: 80px; }
  .main-wrapper #quoteModuleWrapper { padding-bottom: 80px !important; }
  .erp-topbar { padding: 0 12px; height: 48px; }
  .erp-home { padding: 12px; padding-bottom: 80px; }
  .erp-home-kpis { grid-template-columns: repeat(2, 1fr); }
  .erp-home-panels { grid-template-columns: 1fr; }
  .erp-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-nav { display: flex !important; }

  /* 板块折叠在手机端要更好点：
     技师戴着手套单手操作，折叠开关必须是「大目标」，
     否则「折叠了省事」反而变成「点不中，更烦」。
     箭头做成 36×36 的方形热区（视觉上还是小箭头，靠 padding 撑开点击区）。
     权重与桌面端那条一致（0,2,0），靠「位置更靠后」取胜，不用 !important。 */
  .check-category-title { padding: 10px 12px; }
  .check-category-title .fold-arrow {
    font-size: 14px;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 2px;
  }
  .check-category-title .fold-badge { font-size: 12px; padding: 2px 9px; }
}
@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
}
/* 顶栏已有用户信息，桌面端不再重复浮动一个 */
@media (min-width: 769px) { #userChip { display: none !important; } }




/* ===== 第 2 步：检查页布局（工具条收纳 / 右侧常驻 / 表格规整） ===== */
.check-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.check-main { min-width: 0; }
.check-side { position: sticky; top: 68px; }
.side-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
}
.side-title { font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.side-progress-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: var(--fs-sm); color: var(--ink-2);
}
.side-progress-head strong { font-size: var(--fs-lg); color: var(--ink); font-weight: 600; }
.side-progress-track { height: 6px; background: var(--line); border-radius: 3px; margin: 8px 0 16px; overflow: hidden; }
.side-progress-track > div { height: 100%; background: var(--brand); border-radius: 3px; transition: width .2s; }
.side-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.side-stats > div {
  background: var(--surface); padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-sm); color: var(--ink-2);
}
.side-stats b { font-size: var(--fs-base); color: var(--ink); font-weight: 600; }
.side-total { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-total .line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; font-size: var(--fs-sm); color: var(--ink-2);
}
.side-total .line strong { font-size: var(--fs-xl); color: var(--ink); font-weight: 600; }
.side-total .line.sub { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.side-save { width: 100%; margin-top: 14px; }
.side-hint { margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }

/* 「更多」下拉 */
.more-wrap { position: relative; }
.more-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 300;
  min-width: 216px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.more-wrap.open .more-menu { display: block; }
.more-wrap.open #checkMoreBtn { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.more-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: none; border-radius: var(--r-sm); background: transparent; color: var(--ink);
  font-size: var(--fs-md); font-family: inherit; text-align: left; cursor: pointer; white-space: nowrap;
}
.more-item:hover { background: var(--surface-2); }
.more-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.badge-num {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: none; align-items: center; justify-content: center; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: var(--fs-xs); font-weight: 600;
}

@media (max-width: 1100px) {
  .check-layout { grid-template-columns: minmax(0, 1fr); }
  .check-side { position: static; order: -1; }
  .side-stats { grid-template-columns: repeat(4, 1fr); }
}
@media print {
  .check-layout { display: block; }
  .check-side, .more-wrap { display: none !important; }
}

/* SA 弹窗 */
.cf-modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:1400;}
.cf-modal.show{display:flex;flex-direction:column;}
.cf-modal-box{width:860px;max-width:96vw;height:94vh;margin:auto;background:#eef1f5;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;}
.cf-toolbar{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--nav-bg);color:#fff;flex-shrink:0;gap:8px;flex-wrap:wrap;}
.cf-toolbar b{font-size:15px;letter-spacing:1px;}
.cf-toolbar button{border:none;border-radius:7px;padding:8px 13px;font-size:13px;font-weight:600;cursor:pointer;margin-left:6px;background:#fff;color:#1a3a6b;}
.cf-toolbar button.cf-primary{background:var(--brand);color:#fff;}
.cf-toolbar button.cf-ghost{background:rgba(255,255,255,.22);color:#fff;}
.cf-scroll{flex:1;overflow:auto;padding:16px;}
/* A4 纸（屏内预览同打印一致） */
.cf-page{width:210mm;min-height:297mm;margin:0 auto;background:#fff;padding:11mm 12mm;color:#222;font-family:"Microsoft YaHei","PingFang SC",sans-serif;box-shadow:0 2px 14px rgba(0,0,0,.18);box-sizing:border-box;}
.cf-head{display:flex;align-items:center;border-bottom:2.5px solid #1a3a6b;padding-bottom:8px;}
.cf-logo{width:72px;height:72px;object-fit:contain;border:1px dashed #b9c2ce;border-radius:6px;flex-shrink:0;}
.cf-logo-ph{width:72px;height:72px;border:1.5px dashed #9aa7b8;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#9aa7b8;font-size:10px;text-align:center;flex-shrink:0;}
.cf-head-t{flex:1;text-align:center;}
.cf-company{font-size:20px;font-weight:800;color:#1a3a6b;letter-spacing:1px;}
.cf-doctitle{font-size:16px;font-weight:700;letter-spacing:4px;margin-top:3px;}
.cf-head-r{font-size:11px;color:#444;min-width:130px;text-align:right;line-height:1.7;}
.cf-info{width:100%;border-collapse:collapse;margin-top:9px;font-size:11.5px;}
.cf-info td{border:1px solid #b9c2ce;padding:5px 7px;}
.cf-info .lab{background:#f2f5f9;font-weight:600;color:#33475b;white-space:nowrap;width:11%;}
table.cf-items{width:100%;border-collapse:collapse;margin-top:10px;font-size:10.5px;}
table.cf-items th,table.cf-items td{border:1px solid #8b97a6;padding:4px;text-align:center;vertical-align:middle;}
table.cf-items th{background:var(--brand-dark);color:#fff;padding:6px 4px;}
table.cf-items td.l{text-align:left;}
table.cf-items input.cf-in{width:100%;border:1px solid #dfe4ea;border-radius:4px;padding:4px;font-size:10.5px;text-align:center;font-family:inherit;}
table.cf-items input.cf-in.nm{text-align:left;}
table.cf-items select.cf-in{width:100%;border:1px solid #dfe4ea;border-radius:4px;padding:3px 1px;font-size:9.5px;font-family:inherit;line-height:1.2;}
table.cf-items textarea.cf-desc{width:100%;min-height:44px;border:1px solid #dfe4ea;border-radius:4px;padding:4px 6px;font-size:11px;line-height:1.45;text-align:left;font-family:inherit;resize:vertical;overflow:hidden;box-sizing:border-box;word-break:break-word;white-space:pre-wrap;background:#fff;}
table.cf-items td.cf-desc-cell{vertical-align:top;}
table.cf-items td.cf-lv-cell{vertical-align:middle;}
.cf-lv{display:inline-block;padding:2px 4px;border-radius:4px;font-size:9.5px;font-weight:700;white-space:nowrap;line-height:1.3;}
.cf-lv-red{background:#fdecea;color:#c62828;border:1px solid #ef9a9a;}
.cf-lv-yel{background:#fff8e1;color:#a87d00;border:1px solid #ffe082;}
.cf-lv-blue{background:#e8f0fe;color:#1559b8;border:1px solid #90caf9;}
.cf-dec label{display:inline-flex;align-items:center;gap:2px;font-size:9.5px;cursor:pointer;margin:0 2px;}
.cf-dec input{margin:0;}
.cf-nomatch{background:#fff4e5!important;}
.cf-sumwrap{display:flex;margin-top:9px;gap:10px;}
.cf-decl{flex:1.35;background:#f7f8fa;border:1px solid #d4dae2;border-radius:5px;padding:8px 10px;font-size:10px;color:#444;line-height:1.65;}
.cf-decl b{color:#c62828;}
table.cf-sum{flex:1;border:1px solid #8b97a6;border-collapse:collapse;font-size:11px;}
table.cf-sum td{border:1px solid #c4ccd6;padding:5px 8px;}
table.cf-sum .lab{background:#f2f5f9;font-weight:600;}
table.cf-sum .num{text-align:right;font-variant-numeric:tabular-nums;}
table.cf-sum tr.cf-total td{background:#fff4e5;font-weight:800;font-size:12.5px;color:#c0392b;}
.cf-sign{display:flex;margin-top:14px;font-size:11.5px;gap:22px;flex-wrap:wrap;}
.cf-line{display:inline-block;min-width:92px;border-bottom:1px solid #333;height:18px;}
.cf-foot{margin-top:10px;border-top:1px solid #ccc;padding-top:5px;font-size:9.5px;color:#777;display:flex;justify-content:space-between;}
.cf-qronpaper{margin-top:8px;display:none;align-items:center;gap:10px;font-size:10px;color:#666;}
.cf-qronpaper img{width:96px;height:96px;border:1px solid #ddd;}
.cf-addrow{margin-top:8px;}
.cf-addrow button{background:#43a047;color:#fff;border:none;border-radius:7px;padding:7px 14px;font-size:12px;cursor:pointer;}
.cf-delrow{background:#ffebee;color:#e53935;border:1px solid #ef9a9a;border-radius:4px;padding:2px 7px;font-size:10px;cursor:pointer;}
/* 客户码弹层 */
#cfQrModal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1500;align-items:center;justify-content:center;}
#cfQrModal .cf-qrbox{background:#fff;border-radius:14px;padding:24px;width:360px;max-width:92vw;text-align:center;}
#cfQrModal img{width:260px;height:260px;margin:10px auto;display:block;}
#cfQrModal .cf-qrbtns button{margin:6px;padding:9px 16px;border:none;border-radius:8px;font-size:13px;cursor:pointer;font-weight:600;}
.cf-wait{color:#1a73e8;font-size:13px;margin:8px 0;}
.cf-done{color:#2e7d32;font-size:14px;font-weight:700;margin:8px 0;}
/* 客户手机确认页 */
#clientConfirmPage{display:none;position:fixed;inset:0;background:var(--bg);z-index:2000;overflow-y:auto;-webkit-overflow-scrolling:touch;}
.cfc-wrap{max-width:560px;margin:0 auto;padding:14px 14px 40px;}
.cfc-head{background:var(--brand);color:#fff;border-radius:var(--r-xl);padding:14px 16px;margin-bottom:12px;}
.cfc-head h2{font-size:18px;margin-bottom:6px;}
.cfc-head .cfc-meta{font-size:13px;opacity:.92;line-height:1.7;}
.cfc-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);padding:14px;margin-bottom:11px;box-shadow:0 1px 6px rgba(0,0,0,.05);}
.cfc-item{border:1px solid var(--line);border-radius:var(--r-lg);padding:11px 12px;margin-bottom:10px;}
.cfc-item-top{display:flex;align-items:flex-start;gap:8px;}
.cfc-item-name{font-size:15px;font-weight:700;flex:1;}
.cfc-item-price{font-size:var(--fs-lg);font-weight:600;color:var(--ink);white-space:nowrap;}
.cfc-item-desc{font-size:var(--fs-sm);color:var(--ink-2);line-height:1.6;margin:6px 0 9px;}
.cfc-choices{display:flex;gap:8px;}
.cfc-choices button{flex:1;min-height:44px;border:1px solid var(--line-strong);background:var(--surface);border-radius:var(--r-md);padding:10px 4px;font-size:var(--fs-md);font-weight:500;color:var(--ink-2);cursor:pointer;-webkit-tap-highlight-color:transparent;}
.cfc-choices button.sel-now{border-color:var(--ok);background:var(--ok-bg);color:var(--ok);}
.cfc-choices button.sel-later{border-color:var(--warn);background:var(--warn-bg);color:var(--warn);}
.cfc-choices button.sel-no{border-color:var(--line-strong);background:var(--surface-2);color:var(--ink-2);}
.cfc-sumbar{position:sticky;bottom:0;background:var(--surface);border-radius:var(--r-xl);padding:13px 16px;box-shadow:0 -2px 14px rgba(0,0,0,.08);display:flex;align-items:center;justify-content:space-between;margin-top:6px;}
.cfc-sumbar .t{font-size:var(--fs-md);color:var(--ink-2);}
.cfc-sumbar .a{font-size:var(--fs-2xl);font-weight:600;color:var(--ink);}
.cfc-siglabel{font-size:var(--fs-md);color:var(--ink-2);font-weight:600;margin-bottom:6px;}
#cfSigPad{width:100%;height:150px;border:1px dashed var(--line-strong);border-radius:var(--r-lg);background:var(--surface-2);touch-action:none;display:block;}
.cfc-input{width:100%;min-height:44px;box-sizing:border-box;border:1px solid var(--line-strong);border-radius:var(--r-md);padding:11px;font-size:var(--fs-base);margin-bottom:10px;}
.cfc-clear-sig{min-height:44px;padding:0 16px;border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface-2);color:var(--ink-2);font-size:var(--fs-md);cursor:pointer;-webkit-tap-highlight-color:transparent;}
.cfc-submit{width:100%;height:48px;border:1px solid var(--brand);border-radius:var(--r-lg);padding:0 16px;font-size:var(--fs-lg);font-weight:600;color:#fff;background:var(--brand);cursor:pointer;margin-top:8px;}
.cfc-submit:disabled{background:var(--line-strong);border-color:var(--line-strong);}
.cfc-thanks{text-align:center;padding:60px 20px;}
.cfc-thanks .big{font-size:46px;}
.cfc-thanks h3{margin:14px 0 8px;font-size:19px;}
/* ===== 客户扫码模式：把店内终端的 chrome 全部关掉 =====
   客户扫的是二维码，不是我们的工位终端。同步状态、服务器地址、
   顶栏面包屑、侧边栏、内部 toast 一个都不该出现在他眼前。
   以前靠 #clientConfirmPage 的 z-index:2000 盖住，但同步胶囊的层级更高，
   会直接压在蓝色门店标题上——所以这里按 body class 显式隔离。 */
body.client-mode { background: var(--bg); }
body.client-mode #syncStatusIndicator,
body.client-mode #userChip,
body.client-mode .erp-topbar,
body.client-mode .sidebar,
body.client-mode .bottom-nav,
body.client-mode #globalLoading,
body.client-mode #toast,
body.client-mode .el-message,
body.client-mode .el-notification,
body.client-mode .el-overlay { display: none !important; }
/* #clientConfirmPage 本身就嵌在 .main-wrapper 里，所以不能整块隐藏 wrapper，
   否则客户页会被一起关掉。用 :not 把店内顶层容器逐一切掉：
   .erp-topbar / #loginMask / #homeModule(首页 KPI) / 各弹层 / #toast。
   只靠 fixed + z-index 盖住是不够的——首页文字仍留在可见 DOM 里，
   会被屏幕阅读器和「复制页面文本」读到。 */
body.client-mode .main-wrapper > div:not(#clientConfirmPage) { display: none !important; }
/* 店内移动端为了省空间，把 button/.btn/[onclick] 统一压到 min-height:36px
   （见本文件末尾的 768px 媒体查询）。那条通用规则与 .cfc-* 同特异性且更靠后，
   会把客户页的「清除重签」悄悄压回 36px。客户拿的是手机，手指目标必须 ≥44px，
   所以这里按 client-mode 提权锁死，店内页面完全不受影响。 */
body.client-mode .cfc-choices button,
body.client-mode .cfc-clear-sig,
body.client-mode .cfc-input,
body.client-mode .cfc-submit { min-height: 44px; }
/* 桌面上给客户页一个聚焦的卡片边界，别让内容漂在空白里 */
@media (min-width: 600px) {
  .cfc-wrap { max-width: 520px; padding-top: 24px; }
}
@media (max-width: 599px) {
  .cfc-wrap { padding: 10px 10px 24px; }
  .cfc-head { border-radius: var(--r-lg); }
  .cfc-card { padding: 12px; }
  .cfc-sumbar { padding: 10px 12px; border-radius: var(--r-lg); }
  .cfc-choices { gap: 6px; }
  .cfc-choices button { font-size: var(--fs-sm); padding: 8px 2px; }
}

@media print{ @page{size:A4;margin:0;} body *{visibility:hidden;} .cf-modal.show,.cf-modal.show *{visibility:visible;} .cf-modal.show{position:absolute;inset:0;background:#fff;} .cf-modal-box{width:auto;height:auto;overflow:visible;} .cf-toolbar,.cf-scroll{overflow:visible!important;} .cf-modal.show .cf-toolbar{display:none;} .cf-page{box-shadow:none;margin:0;} }

/* ===== 设置中心导航：呈现属性从内联搬进样式表 =====
   这块原先整条 style 写在 index.html 里。手机端要把它改成「一行横向可滚动的
   标签条」时，内联样式优先级高于样式表，媒体查询根本盖不住 —— 只能靠
   !important 硬压，等于每次改版式都往设计债上加。
   把呈现属性搬到 CSS 基线规则后，手机端媒体查询直接改即可，全程零 !important。 */
#settingsModule { padding: 24px; min-height: calc(100vh - 60px); background: var(--bg); }
#settingsModule .set-wrap { max-width: 1200px; margin: 0 auto; }
#settingsModule .set-head { margin-bottom: 20px; }
#settingsModule .set-title { margin: 0 0 4px; font-size: var(--fs-2xl); color: var(--ink); }
#settingsModule .set-sub { margin: 0; color: var(--ink-2); font-size: var(--fs-md); }
.settings-cols { display: flex; gap: 20px; align-items: flex-start; }
.settings-nav {
  width: 210px; flex-shrink: 0; position: sticky; top: 20px;
  background: var(--surface); border-radius: var(--r-lg); padding: 8px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.settings-nav .sgroup {
  padding: 12px 16px; cursor: pointer; user-select: none;
  font-size: var(--fs-md); font-weight: 700; color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: center;
}
.settings-nav .sgroup:not(:first-child) { border-top: 1px solid var(--line); margin-top: 6px; }
.settings-nav .sarrow { transition: transform .2s; color: var(--ink-3); }
.settings-nav .sleaf {
  padding: 9px 16px 9px 30px; cursor: pointer;
  font-size: var(--fs-md); color: var(--ink-2);
  border-left: 3px solid transparent;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.settings-nav .sleaf.on {
  background: var(--brand-light); color: var(--brand-dark);
  font-weight: 600; border-left-color: var(--brand);
}
/* 计数徽标：由 renderSettingsCounts() 动态挂到导航叶子和首页卡片上 */
.scount {
  flex: 0 0 auto; font-size: var(--fs-xs); color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 7px; min-width: 22px; text-align: center;
  font-variant-numeric: tabular-nums; font-weight: 400;
}
.settings-nav .sleaf.on .scount { background: var(--surface); color: var(--brand-dark); border-color: var(--brand-light); }
.settings-pane { flex: 1; min-width: 0; }
#settingsWelcome.set-welcome {
  background: var(--surface); border-radius: var(--r-lg); padding: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); text-align: center; color: var(--ink-3);
}
.set-welcome-icon { font-size: 40px; margin-bottom: 12px; }
.set-welcome-title { font-size: var(--fs-lg); color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.set-welcome-sub { font-size: var(--fs-md); }
#settingsDetailView.set-detail {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden;
}
.set-detail-h {
  padding: 16px 20px; border-bottom: 1px solid var(--line-strong);
  display: flex; align-items: center; gap: 12px;
}
.set-detail-title { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.set-detail-b { padding: 20px; min-height: 300px; }

/* ===== 移动端适配（手机/小屏） ===== */
@media (max-width: 768px) {
  /* 顶栏紧凑 */
  .topbar, header[class*="top"] { padding: 8px 12px !important; }
  /* KPI卡片两列变紧凑 */
  .erp-kpi-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; padding: 10px !important; }
  .erp-kpi { padding: 14px !important; min-height: 100px !important; }
  .erp-kpi .num { font-size: 28px !important; }
  /* 已同步气泡不挡内容 */
  .sync-badge, [id*="syncToast"], [id*="synced"] { right: 8px !important; top: 60px !important; font-size: 11px !important; padding: 4px 8px !important; }
  /* 底部用户浮层：不挡内容，挪到底部tab栏上方 */
  .user-bar, [class*="userbar"], #userBar { position: fixed !important; bottom: 56px !important; left: 8px !important; right: 8px !important; z-index: 998 !important; background: #fff !important; border-radius: var(--r-xl) !important; box-shadow: 0 2px 10px rgba(0,0,0,.12) !important; padding: 6px 10px !important; font-size: 12px !important; }
  /* 设置中心：左右栏在手机上必须改成上下堆叠，否则右栏会被挤成 92px 的
     竖条。呈现属性已全部搬进上方基线规则，这里直接覆盖即可，零 !important。 */
  .settings-cols { flex-direction: column; gap: 12px; }
  /* 上下堆叠之后，导航的叶子项又竖着排满 595px，真正要看的内容
     （检查项目库）被压到折叠线以下。改成一行横向可滚动的标签条。
     这里不能给 .sleafs 写 display：expandSgroup / toggleSgroup 用行内
     display:block|none 控制折叠，写死了折叠就失效。改成让叶子自身
     横排，.sleafs 保持块级也能一行排下。 */
  .settings-nav {
    width: 100%; position: static; font-size: var(--fs-md);
    display: flex; flex-wrap: nowrap; align-items: center; gap: 4px;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    padding: 6px; border-radius: var(--r-lg); box-shadow: none;
  }
  .settings-nav > .sgroup {
    flex: 0 0 auto; padding: 6px 10px; white-space: nowrap; gap: 4px;
  }
  .settings-nav > .sleafs { flex: 0 0 auto; white-space: nowrap; }
  .settings-nav .sleaf {
    display: inline-flex; vertical-align: top;
    padding: 6px 10px; white-space: nowrap;
    border-radius: var(--r-md); background: var(--surface-2);
  }
  /* 一行标签条寸土寸金，计数徽标只在桌面竖栏显示 */
  .settings-nav .scount { display: none; }
  .settings-pane { width: 100%; }
  /* 桌面 24px 内边距在 390px 上白白吃掉 48px，加上 body 的 20px，
     内容区只剩 322px。收紧到 8px 后恢复到 354px。 */
  #settingsModule { padding: 8px; }
  /* 表格：让容器横向滚动，不能把 table 拆成 block —— 那样列对齐全丢。
     用 :has(> table) 给直接包着表的 div 开滚动，避免撑破 body。 */
  .table-wrap { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { display: table !important; }
  div:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 手指目标：店员也是用手指点，别再压到 36px */
  button, .btn, [onclick] { min-height: 44px; }
  /* 弹窗全屏 */
  .modal, .cf-modal-box, .modal-box { width: 100% !important; max-width: 100vw !important; max-height: 100vh !important; border-radius: 0 !important; }
  /* 卡片间距缩小 */
  .card, .panel { padding: 12px !important; margin-bottom: 10px !important; }
  /* 字号微调 */
  body { font-size: 14px !important; }
  h2 { font-size: 18px !important; }
  h3 { font-size: 16px !important; }
  /* iframe CRM 高度调整 */
  #crmInlineFrame { height: calc(100vh - 200px) !important; }
}

/* ===== 全局UI增强：动效/空状态/加载态/细节 ===== */
* { transition: background-color .2s, border-color .2s, box-shadow .2s, color .2s; }
button, .btn { transition: all .18s ease !important; }
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
button:active, .btn:active { transform: translateY(0); }
.erp-kpi, .card, .panel { transition: all .25s ease !important; }
.erp-kpi:hover, .card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.module-page { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
#globalLoading { position: fixed; inset: 0; background: rgba(255,255,255,.75); z-index: 9999; display: none; align-items: center; justify-content: center; }
#globalLoading.show { display: flex; }
#globalLoading .spin { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty-state .icon { font-size: 42px; margin-bottom: 10px; opacity: .6; }
.empty-state .text { font-size: 14px; line-height: 1.6; }
#toastBox, .toast { animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
table tr:hover td { background: var(--surface-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand) !important; box-shadow: 0 0 0 3px rgba(24,95,165,.12); }
.settings-nav .sleaf:not(.on):hover { background: var(--surface-2); color: var(--ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 检查编号 + 检查表查询（2026-11-15） ===== */
.check-no-bar { display:flex; align-items:center; gap:10px; margin-top:10px; padding:8px 12px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); flex-wrap:wrap; }
.check-no-label { font-size:var(--fs-sm); color:var(--ink-2); }
.check-no-bar strong { font-size:var(--fs-lg); color:var(--brand); letter-spacing:.5px; font-variant-numeric:tabular-nums; }
.check-no-hint { font-size:var(--fs-xs); color:var(--ink-3); margin-left:auto; }

/* ===== 抬头信息一行汇总条 ===== */
.check-header-summary { display:flex; align-items:center; gap:8px; margin-top:10px; padding:8px 12px; background:var(--brand-bg, var(--surface-2)); border:1px solid var(--brand, var(--line)); border-radius:var(--r-md); flex-wrap:wrap; }
.check-header-tag { flex:0 0 auto; font-size:var(--fs-xs); font-weight:600; color:var(--brand); background:var(--surface); border:1px solid var(--brand); border-radius:var(--r-sm); padding:2px 7px; white-space:nowrap; }
.check-header-text { flex:1 1 300px; min-width:0; font-size:var(--fs-sm); color:var(--ink); line-height:1.6; word-break:break-all; user-select:all; }
.check-header-text.is-empty { color:var(--ink-3); font-style:italic; }
.check-header-copy { flex:0 0 auto; padding:5px 12px; font-size:var(--fs-sm); color:var(--brand); background:var(--surface); border:1px solid var(--brand); border-radius:var(--r-sm); cursor:pointer; white-space:nowrap; }
.check-header-copy:hover { background:var(--brand); color:var(--surface); }

.check-query-modal { max-width:960px; width:94vw; }
.check-query-bar { display:grid; grid-template-columns:minmax(220px,2fr) 1fr 1fr 1fr 1fr auto; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); }
.check-query-bar input, .check-query-bar select { width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:var(--r-md); font-size:var(--fs-md); outline:none; background:var(--surface); color:var(--ink); box-sizing:border-box; }
.check-query-bar input:focus, .check-query-bar select:focus { border-color:var(--brand); }
.check-query-stats { padding:8px 16px; font-size:var(--fs-sm); color:var(--ink-2); border-bottom:1px solid var(--line); }
.check-query-tools { padding:10px 16px; margin:0; flex-wrap:wrap; }
.check-query-list { max-height:56vh; overflow-y:auto; padding:0 16px 16px; }
.check-query-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-md); margin-bottom:8px; background:var(--surface); flex-wrap:wrap; }
.check-query-info { flex:1; min-width:260px; }
.check-query-line1 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:var(--fs-base); }
.check-query-no { font-size:var(--fs-sm); color:var(--brand); font-weight:600; font-variant-numeric:tabular-nums; background:var(--brand-light); padding:2px 6px; border-radius:var(--r-sm); }
.check-query-plate { font-weight:700; color:var(--ink); }
.check-query-model, .check-query-tag { font-size:var(--fs-sm); color:var(--ink-2); }
.check-query-tag { border:1px solid var(--line); padding:1px 6px; border-radius:var(--r-sm); }
/* 靶13：多店账号才渲染的门店标签，用底色和「常规/保养」这类标签区分开 */
.check-query-store { font-size:var(--fs-xs); color:var(--brand); background:var(--brand-light); padding:2px 6px; border-radius:var(--r-sm); }
.check-query-abn { font-size:var(--fs-xs); color:var(--danger); background:var(--danger-bg); padding:2px 6px; border-radius:var(--r-sm); }
.check-query-ok { font-size:var(--fs-xs); color:var(--ok); background:var(--ok-bg); padding:2px 6px; border-radius:var(--r-sm); }
.check-query-meta { font-size:var(--fs-sm); color:var(--ink-3); line-height:1.6; }
.check-query-score { font-size:var(--fs-xl); font-weight:700; min-width:62px; text-align:center; }
.q-score-good { color:var(--ok); }
.q-score-mid { color:var(--brand); }
.q-score-low { color:var(--danger); }
.check-query-actions { display:flex; gap:6px; flex-wrap:wrap; }
.check-query-actions .btn { padding:4px 9px; font-size:var(--fs-sm); }

/* ===== 检查结果单 · 独立 A4 模板（脱离整张页面） ===== */
#checkResultSheet { position:fixed; left:-10000px; top:0; width:794px; z-index:-1; }
.check-result-sheet { width:794px; box-sizing:border-box; padding:34px 38px; background:var(--surface); color:var(--ink); font-size:12px; line-height:1.55; }
.sheet-head { text-align:center; border-bottom:2px solid var(--brand); padding-bottom:12px; margin-bottom:12px; }
.sheet-shop { font-size:var(--fs-md); color:var(--ink-2); letter-spacing:2px; }
.sheet-title { font-size:22px; margin:6px 0 4px; color:var(--brand-dark); letter-spacing:3px; }
.sheet-sub { font-size:10px; color:var(--ink-3); letter-spacing:1px; }
.sheet-no-row { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:11px; color:var(--ink-2); margin-bottom:12px; }
.sheet-no-row strong { color:var(--brand-dark); font-size:13px; font-variant-numeric:tabular-nums; }
.sheet-info { width:100%; border-collapse:collapse; margin-bottom:14px; }
.sheet-info th, .sheet-info td { border:1px solid var(--line-strong); padding:6px 8px; text-align:left; }
.sheet-info th { width:90px; background:var(--surface-2); color:var(--ink-2); font-weight:600; white-space:nowrap; }
.sheet-section-title { font-size:13px; font-weight:700; color:var(--brand-dark); border-left:3px solid var(--brand); padding-left:8px; margin:16px 0 8px; }
.sheet-kpis { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin-bottom:6px; }
.sheet-kpi { border:1px solid var(--line); border-radius:var(--r-sm); padding:8px 4px; text-align:center; background:var(--surface-2); }
.sheet-kpi span { display:block; font-size:10px; color:var(--ink-3); }
.sheet-kpi strong { display:block; font-size:16px; color:var(--ink); }
.sheet-bad-num { color:var(--danger); }
.sheet-items { width:100%; border-collapse:collapse; table-layout:fixed; }
.sheet-items th, .sheet-items td { border:1px solid var(--line); padding:5px 7px; vertical-align:top; word-break:break-all; }
.sheet-items th { background:var(--surface-2); color:var(--ink-2); font-size:11px; text-align:left; }
.sheet-c-col { width:30%; }
.sheet-s-col { width:14%; }
.sheet-r-col { width:30%; }
.sheet-m-col { width:26%; }
.sheet-cat-row td { background:var(--brand-light); color:var(--brand-dark); font-weight:700; }
.sheet-cat-meta { float:right; font-weight:400; color:var(--ink-2); font-size:10px; }
.sheet-st-ok { color:var(--ok); }
.sheet-st-bad { color:var(--danger); font-weight:700; }
.sheet-empty { padding:14px; text-align:center; color:var(--ink-3); border:1px dashed var(--line); }
.sheet-suggestion { min-height:56px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface-2); white-space:pre-wrap; }
.sheet-signs { display:flex; justify-content:space-between; gap:12px; margin-top:26px; font-size:12px; }
.sheet-foot { margin-top:18px; padding-top:8px; border-top:1px solid var(--line); font-size:10px; color:var(--ink-3); text-align:center; }

@media print {
  .sheet-print-window { background:var(--surface); padding:0; margin:0; }
  .sheet-print-window .check-result-sheet { width:100%; padding:0; box-shadow:none; border:none; }
  .sheet-print-window .sheet-kpi, .sheet-print-window .sheet-info, .sheet-print-window .sheet-cat-row { break-inside:avoid; }
  .sheet-print-window .sheet-section-title { break-after:avoid; }
  .sheet-print-window tr { break-inside:avoid; }
}

/* ===== 判定尺（check-insight.js）=====
   把「标准线在哪」画在实测输入框下面。
   以前只有技师自己知道 2.1mm 算好算坏，客户看到数字没有任何参照。 */
.item-judge { margin-top:4px; display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; font-size:var(--fs-xs); color:var(--ink-3); line-height:1.6; }
.judge-now { font-weight:600; }
.judge-ok { color:var(--ok); }
.judge-warn { color:var(--warn); }
.judge-recommend, .judge-urgent { color:var(--danger); }
/* 人工判定与标准不一致：提示，不是错误 —— 现场有例外，不覆盖技师选择 */
.judge-conflict { color:var(--warn); background:var(--warn-bg); border-radius:var(--r-sm); padding:0 4px; }

/* 明细行上的「加入报价」（quote.js itemQuoteLinkHtml）——
   只在异常态出现。做成小号描边按钮而不是实心：这一行的主语是「判定」，
   按钮是附带动作，抢眼会让人误点。 */
.item-quote-link {
  margin-top:4px; padding:1px 8px; font-size:var(--fs-xs); line-height:1.6;
  color:var(--brand); background:var(--surface); border:1px solid var(--brand);
  border-radius:var(--r-sm); cursor:pointer;
}
.item-quote-link:hover { background:var(--brand); color:var(--surface); }
.item-quote-link.is-nomap { color:var(--ink-3); border-color:var(--line); }
.item-quote-link.is-nomap:hover { background:var(--surface-2); color:var(--ink-2); }

/* ===== 分系统得分条（check-insight.js）===== */
.cat-score-bar { margin-top:10px; display:grid; gap:6px; }
.cat-score-bar:empty { display:none; }
.cat-score { display:grid; grid-template-columns:76px 1fr 32px auto; align-items:center; gap:8px; font-size:var(--fs-sm); }
.cs-name { color:var(--ink-2); }
.cs-bar { height:8px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-sm); overflow:hidden; }
.cs-bar i { display:block; height:100%; background:var(--brand); }
.cs-num { text-align:right; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.cs-a .cs-bar i { background:var(--ok); }
.cs-b .cs-bar i { background:var(--brand); }
.cs-c .cs-bar i { background:var(--warn); }
.cs-d .cs-bar i { background:var(--danger); }
.cs-badge { font-size:var(--fs-xs); padding:1px 6px; border-radius:var(--r-sm); white-space:nowrap; }
.cs-badge-urgent { color:var(--danger); background:var(--danger-bg); }
.cs-badge-rec { color:var(--warn); background:var(--warn-bg); }

/* ===== 接车检查（check-handover.js）===== */
.handover-progress { margin-left:8px; font-size:var(--fs-xs); font-weight:400; color:var(--ink-3); }
.handover-progress.is-done { color:var(--ok); }
.handover-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:8px 0 12px; }
.handover-slot { padding:6px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--surface-2); text-align:center; }
.handover-slot-label { margin-bottom:4px; font-size:var(--fs-xs); color:var(--ink-2); }
.handover-shot { width:100%; min-height:64px; padding:4px; border:1px dashed var(--line-strong); border-radius:var(--r-sm); background:var(--surface); color:var(--ink-3); font-size:var(--fs-xs); cursor:pointer; }
.handover-thumb { display:block; width:100%; height:64px; object-fit:cover; border-radius:var(--r-sm); cursor:zoom-in; }
.handover-clear { margin-top:4px; padding:0; border:none; background:none; color:var(--brand); font-size:var(--fs-xs); cursor:pointer; }
.handover-block { margin-top:8px; }
.handover-label { margin-bottom:4px; font-size:var(--fs-sm); font-weight:600; color:var(--ink-2); }
.handover-chips { display:flex; flex-wrap:wrap; gap:6px; }
.handover-chip { height:var(--btn-h-sm); box-sizing:border-box; padding:0 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink-2); font-size:var(--fs-sm); cursor:pointer; }
.handover-chip-on { border-color:var(--brand); background:var(--brand-light); color:var(--brand-dark); font-weight:600; }
.handover-mileage { width:120px; padding:5px 8px; border:1px solid var(--line); border-radius:var(--r-sm); font-size:var(--fs-md); }
.handover-hint { margin-left:6px; font-size:var(--fs-xs); color:var(--ink-3); }
.handover-damage-row { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.handover-damage-part { padding:5px 6px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); font-size:var(--fs-sm); }
.handover-damage-note { flex:1; min-width:0; padding:5px 8px; border:1px solid var(--line); border-radius:var(--r-sm); font-size:var(--fs-sm); }

/* ===== 历史未解决项横幅（check-handover.js）===== */
.open-items-banner { margin-bottom:10px; padding:10px 12px; border:1px solid var(--warn); border-radius:var(--r-lg); background:var(--warn-bg); }
.open-items-head { font-size:var(--fs-md); font-weight:600; color:var(--warn); }
.open-items-list { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 8px; }
.open-item-tag { padding:2px 8px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--ink-2); font-size:var(--fs-xs); }
.open-item-urgent { border-color:var(--danger); color:var(--danger); }
.open-item-recommend, .open-item-bad { border-color:var(--warn); color:var(--warn); }
.open-item-more { align-self:center; font-size:var(--fs-xs); color:var(--ink-3); }
.open-items-actions { display:flex; gap:8px; flex-wrap:wrap; }

@media (max-width:768px) {
  .handover-grid { grid-template-columns:repeat(2,1fr); }
  .cat-score { grid-template-columns:64px 1fr 30px; }
  .cs-badge { display:none; }
}

@media print {
  /* 横幅是给店内顾问看的提醒，不属于报告内容 */
  .open-items-banner, .handover-shot, .handover-clear, .judge-conflict { display:none; }
  .handover-thumb { height:56px; }
  .cat-score, .handover-slot { break-inside:avoid; }
}

/* ===== 结果单首屏：分数 + 三个最严重 + 总价（check-output.js）=====
   40 项全列是技师的工作底稿；客户第一眼只该看到这三块。 */
.sheet-hero { display:flex; align-items:stretch; gap:10px; margin-bottom:10px; break-inside:avoid; }
.sheet-hero-score { min-width:92px; padding:10px 8px; border:1px solid var(--line-strong); border-radius:var(--r-md); background:var(--surface-2); text-align:center; }
.sheet-hero-score span { display:block; font-size:10px; color:var(--ink-3); }
.sheet-hero-score strong { display:block; font-size:34px; line-height:1.1; color:var(--brand-dark); }
.sheet-hero-score i { font-style:normal; font-size:10px; color:var(--ink-3); }
.sheet-hero-main { flex:1; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:var(--r-md); }
.sheet-hero-h { margin-bottom:4px; font-size:11px; font-weight:700; color:var(--ink-2); }
.sheet-hero-ols { margin:0; padding-left:18px; font-size:11px; color:var(--ink); }
.sheet-hero-ols li { margin-bottom:2px; }
.sheet-hero-tag { margin-left:4px; padding:0 4px; border-radius:var(--r-sm); background:var(--danger-bg); color:var(--danger); font-size:10px; }
.sheet-hero-none { font-size:11px; color:var(--ok); }
.sheet-hero-fee { min-width:104px; padding:10px 8px; border:1px solid var(--line-strong); border-radius:var(--r-md); background:var(--brand-light); text-align:center; }
.sheet-hero-fee span { display:block; font-size:10px; color:var(--ink-3); }
.sheet-hero-fee strong { display:block; font-size:18px; color:var(--brand-dark); }
.sheet-hero-fee em { font-style:normal; font-size:9px; color:var(--ink-3); }
.sheet-cats { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:6px; margin-bottom:8px; break-inside:avoid; }
.sheet-cat-score { padding:6px 8px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface-2); }
.sheet-cat-score span { display:block; font-size:10px; color:var(--ink-2); }
.sheet-cat-score strong { font-size:15px; color:var(--ink); }
.sheet-cat-score i { font-style:normal; font-size:9px; color:var(--ink-3); }

/* ===== 照片标注 + 新旧件对比（photo-mark.js）===== */
.photo-modal-actions { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); display:flex; gap:8px; }
.pm-tool { padding:6px 12px; border:1px solid var(--line-strong); border-radius:var(--r-md); background:var(--surface); color:var(--ink-2); font-size:var(--fs-sm); cursor:pointer; }
.pm-tool.is-on { border-color:var(--brand); background:var(--brand-light); color:var(--brand-dark); font-weight:600; }
.pm-close { width:32px; height:32px; border:1px solid var(--line-strong); border-radius:var(--r-md); background:var(--surface); color:var(--ink-2); font-size:var(--fs-base); cursor:pointer; }
.photo-mark-modal, .compare-modal { display:none; position:fixed; inset:0; z-index:3100; background:rgba(0,0,0,0.9); padding:16px; overflow:auto; }
.photo-mark-modal.show { display:block; }
.compare-modal.show { display:flex; align-items:flex-start; justify-content:center; }
.pm-box { max-width:1000px; margin:0 auto; }
.pm-head { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.pm-title { color:var(--surface); font-size:var(--fs-base); }
.pm-head .pm-close { margin-left:auto; }
.pm-canvas-wrap { display:flex; justify-content:center; background:var(--nav-bg); border-radius:var(--r-md); padding:8px; }
.pm-canvas-wrap canvas { max-width:100%; height:auto; touch-action:none; cursor:crosshair; }
.pm-hint { margin-top:8px; color:var(--line-strong); font-size:var(--fs-xs); }
.cmp-box { width:100%; max-width:1100px; background:var(--surface); border-radius:var(--r-lg); padding:12px; }
.cmp-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.cmp-body { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cmp-pane { min-width:0; }
.cmp-label { margin-bottom:4px; font-size:var(--fs-sm); font-weight:600; color:var(--ink-2); }
.cmp-main { display:block; width:100%; max-height:60vh; object-fit:contain; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); }
.cmp-strip { display:flex; gap:6px; margin-top:6px; overflow-x:auto; }
.cmp-thumb { width:56px; height:56px; object-fit:cover; border:2px solid transparent; border-radius:var(--r-sm); cursor:pointer; }
.cmp-thumb.is-on { border-color:var(--brand); }

@media (max-width:768px) {
  .cmp-body { grid-template-columns:1fr; }
  .cmp-main { max-height:38vh; }
}


