/* ==================== z881 换肤：品牌色变量 ====================
   默认（:root）= 原蓝色主色 #204df3 系，视觉与改造前一致；
   <html> 带 .theme-grass 时切到草绿系（#b1cc5d 草绿 + #3d4a17 深橄榄，扁平化）。
   切换入口：侧栏底部「换肤」按钮 → toggleTheme()，状态存 localStorage['lvdu_theme']。

   ---- z889（陶总 2026-10-31）：**全站品牌色换成新蓝 #4370fa** ----
   取自创客贴首页「登录注册 / 搜索」按钮（截图逐像素采样 #456efa/#476cff/#4071fa，
   平均 #4370fa）。陶总："截图里的按钮的蓝色，作为我们新的品牌色，把全站的蓝紫色都改成这个蓝"。
   原 #204df3 偏深偏紫，新 #4370fa 更亮更清爽、色相更正。
   其余变量按同明度原则重算色相：strong 深一档 #2f56db，soft/pale/line 往蓝白方向提亮（更清爽）。 */
:root {
  --brand:        #4370fa;  /* 主色：实心按钮底、强调文字、链接、图标 */
  --brand-strong: #2f56db;  /* 深一档：hover / 选中态强调 */
  --brand-soft:   #e4ecfe;  /* 浅底：标签、选中行、提示块 */
  --brand-pale:   #f5f8ff;  /* 极浅底：hover 背景、区块底、页面渐变顶色（z889 取截图采样值，更清爽） */
  --brand-line:   #d3e0f8;  /* 边框 / 分隔线 */
  --brand-accent: #4370fa;  /* 装饰强调块（浅底场景用） */
  --brand-deep:   #1a2b40;  /* 最深：大字标题、深色徽章 */
  --brand-on:     #ffffff;  /* 主色底之上的文字色 */
}
html.theme-grass {
  --brand:        #5f8c16;  /* 草绿主色（白字对比 ≈4.0，可读） */
  --brand-strong: #4a6f11;  /* hover 深草绿 */
  --brand-soft:   #e7f2c8;  /* 浅草绿底 */
  --brand-pale:   #f4fae8;  /* 极浅草绿底 */
  --brand-line:   #c9dd9b;  /* 草绿边框 */
  --brand-accent: #b1cc5d;  /* 亮草绿（配深字，装饰/标签） */
  --brand-deep:   #3d4a17;  /* 深橄榄（R2 定版，看板按钮/徽章/正文） */
  --brand-on:     #ffffff;
}
/* z875（陶总 2026-10-30）：全站绿色系统一改成陶总指定的青绿调 #06aca0（色相 176°）
   —— 规则：**明度 L 完全保留**（深浅层级不变），只把色相统一到 176°，饱和度按明度重算
      （深色→接近 0.93 的鲜艳度，浅色→0.2~0.4 保持淡雅，灰色系保留原来的低饱和感）。
   —— 业绩看板（/dashboard，独立页 dashboard.css）例外：那页在 z874 已单独改回翠绿 #00e5a0，本次不动。
   —— 灰色标签 .tag-ch-gray（#eceff1 / #607d8b）不是绿，未改。 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =================== 登录遮罩 =================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand));
}
.login-overlay.hidden { display: none; }

/* ===== z559（陶总 2026-09-12）：首屏不闪登录页 =====
   陶总："页面切换的时候感觉不够丝滑，好像有登录页一闪而过。"
   根因：`.login-overlay` 没有 hidden 类时就是 `display:flex`（可见），
     要等 app.js 跑完末尾的 checkLogin() 才隐藏 —— 那之前浏览器已经把蓝色登录页画上屏了。
   修法：由 index.html <head> 里的**同步内联脚本**先读 localStorage，给 <html> 打
     `.pre-authed`（已登录）/ `.pre-guest`（未登录），这里据此在**首帧之前**决定登录页画不画。
   ⚠️ 选择器要写 `html.pre-authed .login-overlay`（比基础 `.login-overlay` 多一个类+类型）
      才能在权重上压过它；同时本段写在基础规则之后，双保险。
   ⚠️ 为什么不用 `.login-overlay.hidden` 那一套：hidden 是 app.js 后加的，
      改不了"从第一帧就可见"的事实。关键是要让登录页**从来没被绘制过**。 */
html.pre-authed .login-overlay { display: none; }
/* 🔴 z607（陶总 2026-09-14）：兜底 —— 显式声明"未登录就一定看得见登录页"。
   起因：陶总报"点退出登录没反应，要刷新后才到登录页"。真因是 doLogout() 漏摘 <html> 的
   .pre-authed（详见 app.js doLogout() 注释）。主修法已在 app.js 里同步标记，这里加一条
   **写在 .pre-authed 那条之后**的规则做双保险：万一将来又有人忘了同步，只要 .pre-guest 在，
   登录页依然出得来（同权重、后者胜；若两个类因异常同时存在，也以"能登录"为准）。 */
html.pre-guest .login-overlay { display: flex; }
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 320px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 2px;
}
.login-subtitle {
  font-size: 14px;
  color: #999;
  margin-top: 4px;
  margin-bottom: 28px;
}
.login-select, .login-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.login-select:focus, .login-input:focus {
  border-color: var(--brand);
}
.login-error {
  color: #e24b4a;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.login-btn {
  height: 42px;
  font-size: 16px;
}

body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* z1079（陶总 2026-11-14）：撤销 z1075 的 -webkit-font-smoothing: antialiased ——
     陶总反馈「字变淡了 看得不舒服 要恢复正常的状态」，全站回到浏览器默认的亚像素渲染
     （字形更实、更黑）。z1075 想解决的"备注字歪"代价太大，不采用。 */
  /* z862：底色改由 <html> 的浅灰蓝渐变统一提供（见文件末尾 z862 段），body 透明透出 */
  background: transparent;
  color: #2c2c2a;
  font-size: 14px;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Top bar
   z545（陶总 2026-09-11）：全站顶栏统一成"报价页那种"实心主色蓝条 —— 原来只有 ?p=quote 是蓝底
   （z538），订单看板与其它功能页仍是白底，两种风格并存。现把蓝底写进基础样式，
   并把按钮重排为「4 个常用 + 更多下拉」，右侧从 10 个元素减到 6 个。 */
.topbar {
  background: var(--brand);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.logo-sub {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, .72);
  margin-left: 8px;
}

.topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 角色选择器 */
.role-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, .14);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .3);
}
.role-badge {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ===== z545：顶栏右侧操作区（蓝底上的按钮层次 + 「更多」下拉） =====
   层次：主按钮（快速报价/登记订单）白底实心最醒目；次按钮（订单记录/制作报价单·合同/更多）
         透明底 + 白色描边，弱一档；「更多」点开是一张白卡片菜单。 */
.topbar-acts { display: flex; align-items: center; gap: 8px; }
.topbar-acts .btn-primary {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
}
.topbar-acts .btn-primary:hover { background: var(--brand-pale); }
.topbar-acts .btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
}
.topbar-acts .btn-outline:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.more-wrap { position: relative; display: inline-block; }
.more-caret { margin-left: 5px; font-size: 10px; opacity: .85; }
.more-wrap.open .more-btn { background: rgba(255, 255, 255, .22); color: #fff; }
.more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 156px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 38, 68, .22);
  z-index: 130;
}
.more-wrap.open .more-menu { display: flex; }
.more-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #33415c;
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.more-item:hover { background: var(--brand-pale); color: var(--brand); }

/* 角色区里的「退出登录」：蓝底上白底蓝字（z545 从报价页专属规则提升为全站） */
.topbar .role-selector-wrap .btn-outline { background: #fff; border-color: #fff; color: var(--brand); }
.topbar .role-selector-wrap .btn-outline:hover { background: var(--brand-pale); color: var(--brand); }
.role-selector-wrap select {
  border: none;
  background: transparent;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--brand);
}

.btn-outline {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand-pale);
}

.btn-full {
  width: 100%;
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 10px;
}

/* Metrics bar */
.metrics-bar {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.metric-card {
  flex: 1;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.metric-card:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.metric-num {
  font-size: 28px;
  font-weight: 600;
  color: var(--brand);
}

.metric-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* Main content */
.main-content {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  flex: 1;
  overflow: hidden;
}

.kanban-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
}

/* z658：看板筛选（全部/线上/线下）与三页 .list-tabs 统一成分段控件风格 */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: #eef2f7;
  padding: 5px;
  border-radius: 9px;
}

.filter-tab {
  padding: 5px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #5a6a7a;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.filter-tab:hover {
  color: var(--brand);
  background: rgba(32, 77, 243, .10);
}

.filter-tab.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(32, 77, 243, .35);
}

/* ===== 看板搜索（z579，陶总 2026-09-13）===== */
.board-search {
  position: relative;
  flex: 0 1 300px;
  margin-left: auto;
  margin-right: 12px;
}
.board-search-input {
  width: 100%;
  height: 38px;   /* z692：全站单行输入框统一高度 38px（原 30px） */
  padding: 0 28px 0 30px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  box-sizing: border-box;
  background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='M16 16l5 5'/%3E%3C/svg%3E")
    no-repeat 9px center;
  transition: border-color .15s, box-shadow .15s;
}
.board-search-input::placeholder { color: #a8b0bb; }
.board-search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, .12);
}
.board-search-input.has-value {
  border-color: var(--brand);
}
.board-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e6e9ee;
  color: #666;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.board-search-clear:hover { background: #d5dae1; color: #333; }

.board-search-hint {
  font-size: 12px;
  color: #667085;
  margin: -4px 0 8px;
}
.board-search-hint a { color: var(--brand); text-decoration: none; }
.board-search-hint a:hover { text-decoration: underline; }
.board-search-hint-empty { color: #c0392b; }

.board-col-empty {
  text-align: center;
  color: #ccc;
  padding: 20px;
  font-size: 13px;
}
.board-col-empty-search { color: #b9c0cb; }

/* z608（陶总 2026-09-14）：点顶栏「待填金额」气泡 → 回看板并高亮该列，
   让人一眼看到"要填金额的订单在这里"（showAmountPendingList 里加/去这个类）。 */
.kanban-col-flash {
  animation: kanbanColFlash 1.4s ease-out 1;
}
@keyframes kanbanColFlash {
  0%   { box-shadow: 0 0 0 3px rgba(230, 145, 56, .95); background: #fff6e8; }
  100% { box-shadow: 0 0 0 3px rgba(230, 145, 56, 0);  background: transparent; }
}
/* 待填金额订单条目：金额位显示「待填 ✎」而不是 ¥0（¥0 会被读成"这单不要钱"） */
.card-amount-pending { color: #d68910 !important; font-size: 13px !important; font-weight: 600; }

@media (max-width: 640px) {
  .section-header { flex-wrap: wrap; gap: 8px; }
  .board-search {
    order: 3;
    flex: 1 1 100%;
    margin: 0;
  }
  .board-search-input { height: 42px; }   /* z692：移动端与表单输入框统一 42px */
}

/* Kanban board */
.kanban-board {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  flex: 1;
  min-width: 185px;
  background: #fff;
  border-radius: 14px;
  /* z896（陶总 2026-10-31）：去掉列边框，改成像报价/登记页那样的白色卡片（带阴影） */
  border: none;
  box-shadow: 0 2px 10px rgba(23, 43, 77, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kanban-col.col-design {
  border-left: none;
}

.kanban-col.col-highlight {
  border: 2px solid #FF6B35;
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.3);
  transition: border 0.3s, box-shadow 0.3s;
}

.kanban-col-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.col-title {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.col-count {
  background: #e8e8e8;
  color: #666;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.kanban-col-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
}

/* Order card */
.order-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.order-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* z1042（陶总 2026-11-12）：加急卡的视觉整体改用 card-overdue48 那套粉红配色（app.js 渲染时
   加急卡同时挂 urgent + card-overdue48 两个类）。本条旧红边浅红底规则对加急卡已不再生效
   （同为 0,2,0 特异性、本段在前被后面的 card-overdue48 覆盖），仅留作未挂 overdue48 场景的兜底。 */
.order-card.urgent {
  border-color: #E24B4A;
  background: #FFF8F6;
}

/* ===== z1017/z1018（陶总 2026-11-11 选定）+ z1022（陶总 2026-11-12 改配色/改阈值）：生产中/外发中停留超 48 小时 → 整卡变粉红 =====
   z1022 陶总原话：「停留72小时变红改成48小时，深红色改成粉红色」
   → ① 阈值 72h → **48h**（阈值在 app.js 的 PROD_STAY_ALERT_HOURS，本 CSS 只管配色）；
      ② 配色 深红底白字 → **浅粉底 + 深紫红字 + 粉边**（C 档）。
   只改配色不动布局（陶总 z1018 指示）：标签/发货条/按钮保持**原配色原样式**；无外圈边框；不显示「已停留」角标。
   ⚠️ z689 的老红框规则（card-overdue）已废弃删除。
   ⚠️ 类名由 card-overdue72 改 **card-overdue48**（app.js 与本文件必须同名，改一处必改另一处）。
   ⚠️ 白字全部改成深紫红 —— 浅粉底上白字看不清（正文 #4B1528 / 次要 #72243E / 弱 #8A4A62）。 */
.order-card.card-overdue48 {
  background: #FBEAF0;
  border: 1px solid #ED93B1;
}
.order-card.card-overdue48:hover {
  background: #F7D8E3;
  border-color: #E17FA6;
  box-shadow: 0 4px 14px rgba(216, 83, 126, .25);
}

/* 正文文字深紫红（只改字色，不动布局与字号） */
.order-card.card-overdue48 .card-customer,
.order-card.card-overdue48 .card-filename,
.order-card.card-overdue48 .card-product,
.order-card.card-overdue48 .card-amount { color: #4B1528; }
.order-card.card-overdue48 .card-summary { color: #72243E; }
.order-card.card-overdue48 .card-pay { color: #72243E; }
.order-card.card-overdue48 .card-lost-reason { color: #8A4A62; }

/* 加急「急」：浅粉底上原来的弱化灰字看不清 → 玫红字；圆点保持红点（浅粉底上够醒目）
   ⚠️ 必须带 .urgent 提高特异性 —— `.order-card.urgent .card-urgent-label` 在本段之后定义，
      同为 3 个 class 的话会反过来盖掉这里的颜色。 */
.order-card.card-overdue48.urgent .card-urgent-dot {
  background: #E24B4A;
  box-shadow: 0 0 0 2px rgba(226, 75, 74, .25);
}
.order-card.card-overdue48.urgent .card-urgent-label { color: #A32246; }
/* 未加急时的「急」是弱化灰字，浅粉底上同样看不清 → 改暗玫红 */
.order-card.card-overdue48 .card-urgent-label { color: #A8657E; }
.order-card.card-overdue48 .card-urgent-dot { background: #D9A9BC; }

/* z1022：粉卡上的发货条 → **白底浅粉边**（原来是红卡上的浅红半透明，浅粉底上要反色才清晰）；
   框内文字跟着改成深紫红系，快递名加粗；重量待补（card-ship-empty）同步适配。 */
.order-card.card-overdue48 .card-ship {
  background: #FFFFFF;
  border-color: #F0C0D1;
}
.order-card.card-overdue48 .card-ship .cs-count { color: #8A4A62; }
.order-card.card-overdue48 .card-ship .cs-kg { color: #4B1528; font-weight: 600; }
.order-card.card-overdue48 .card-ship .cs-company { color: #7A2E4A; font-weight: 700; }
.order-card.card-overdue48 .card-ship .cs-company.cs-none { color: #A8657E; font-weight: 400; }
.order-card.card-overdue48 .card-ship.card-ship-empty {
  background: #FFF5F8;
  border-color: #F0D0DC;
}
.order-card.card-overdue48 .card-ship.card-ship-empty .cs-kg { color: #A8657E; font-weight: 400; }

.card-urgent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 0;
  padding: 2px 2px 2px 0;
  border-radius: 4px;
  transition: background 0.2s;
}
.card-urgent-toggle:hover {
  background: rgba(0,0,0,0.04);
}
.card-urgent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D3D1C7;
  transition: all 0.2s;
}
.card-urgent-toggle:hover .card-urgent-dot {
  background: #E24B4A;
  transform: scale(1.3);
}
.order-card.urgent .card-urgent-dot {
  background: #E24B4A;
  box-shadow: 0 0 0 2px rgba(226,75,74,0.2);
}
.card-urgent-label {
  font-size: 11px;
  color: #D3D1C7;
  font-weight: 700;
  transition: color 0.2s;
}
.card-urgent-toggle:hover .card-urgent-label {
  color: #E24B4A;
}
.order-card.urgent .card-urgent-label {
  color: #E24B4A;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 5px;
}

.card-customer {
  font-size: 12.5px;
  font-weight: 400;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-mid-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* z892（陶总 2026-10-31）：文件名加大加重，做成卡片"标题"的存在感
   （参考创客贴卡片：黑色大标题 + 浅灰小字元数据）。13px → 15px，颜色提到近黑 #17171a。
   客户名/摘要等元数据保持小号灰色不动 → 大小对比自然拉开层次。 */
.card-filename {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #17171a;
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: left;
  line-height: 1.3;
}

.card-product {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

/* =================== z849（陶总 2026-10-29）：看板卡片的发货信息（订单层）===================
   陶总原话：「发货建议放到卡片封面上，封面上只要显示工单数量、订单总重量和建议发哪个快递物流」
   放在卡片**最上面**（客户名行之上）—— 卡片是工单级、这里是订单级汇总，
   发货员扫一眼看板就知道哪几单要一起发、发哪家最划算。
   视觉上做成一条淡蓝底的窄条：够醒目但比客户名轻，不抢视觉重心。 */
.card-ship {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-bottom: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--brand-pale);
  border: 1px solid var(--brand-pale);
  font-size: 11px;
  line-height: 1.5;
  color: #5a6b7d;
}
/* z1041（陶总 2026-11-12）：平台下单订单的「平台打单」标识 —— 发货条条首，蓝底白字胶囊，醒目。
   判定在前端 isPlatformPaidOrder（收款方式=「平台下单」），取不到不误标。 */
.card-ship .cs-platform {
  flex: none;
  padding: 0 7px;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 10.5px;
  line-height: 17px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
/* 显红卡片（card-overdue48 深底）下标识不干扰预警配色 */
.order-card.card-overdue48 .card-ship .cs-platform { background: #1d4ed8; }
/* z1031：书签已下线，.card-ship-has-flag（放开 overflow）随之作废删除。
   发货条恢复 overflow:hidden，文字过长仍靠 .cs-company / .cs-count / .cs-kg 的
   ellipsis + max-width 兜底（见下）。
/* ⚠️ z856：内容区被侧边栏挤窄 148px → 发货条可用宽度变少。
   ⚠️🔴 cs-count / cs-kg 原来 flex:none（不可收缩）→ 三项加起来会超出条宽
      （实测「6 张工单 811.70kg（5/6 张可算）未填省份」= 255px > 容器 237px，横向溢出）。
   ⇒ 改成 flex: 0 1 auto + min-width:0 → 宽度不够时**先省略重量文字**，不撑破条。
   ⚠️ 快递公司名（cs-company）优先级最高 —— 它是发货员最需要的信息，
      所以 cs-count / cs-kg 先让位（它们的 max-width 也留了余量）。 */
.card-ship .cs-count {
  flex: 0 1 auto;
  min-width: 0;
  color: #7a8b9d;
  max-width: 110px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card-ship .cs-kg {
  flex: 0 1 auto;
  min-width: 0;
  color: #444;
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card-ship .cs-company {
  flex: 1;
  min-width: 0;
  text-align: right;
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-ship .cs-company.cs-none {
  color: #b0b8c2;
  font-weight: 400;
}
/* z855（陶总 2026-10-29）：发货条右端分组容器，整组靠右。
   ⚠️ z1031：书签已下线，.cs-tail 现在只装快递公司名 —— 容器保留（margin-left:auto 靠右逻辑不变）。 */
.card-ship .cs-tail {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}
.card-ship .cs-tail .cs-company {
  flex: none;
  max-width: 120px;
}
/* 重量算不出来的单 → 整条弱化（提示"缺重量"，别让发货员以为是真数据） */
.card-ship.card-ship-empty {
  background: #f7f8fa;
  border-color: #e8ebef;
}
.card-ship.card-ship-empty .cs-kg {
  color: #a8b0ba;
  font-weight: 400;
}
/* z854（陶总 2026-10-29）：同一订单的多张工单 → 发货条**颜色统一**，不再区分主卡/从卡。
   陶总原话：「为什么两个框的颜色不一样，改成一样的」。
   ⇒ 原来"主卡淡蓝底 var(--brand-pale) / 从卡淡灰底 #fafbfd"的弱化已整体删除，
     连同 JS 里的主/从卡判定一起清掉（留着就是没用的死代码）。
   ⚠️ .card-ship-empty（重量待补）**保留** —— 那是**语义状态**（算不出重量），
      与"主卡/从卡"无关，不能跟着一起删。 */

.card-summary {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-bottom {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.card-amount {
  font-size: 20px;
  font-weight: 700;
  color: #e24b4a;
}

.card-pay {
  font-size: 12px;
  color: #888;
  margin-left: -1px;
}

.tag-paid {
  /* z895（陶总 2026-10-31）：深青绿渐变 → **品牌绿 #0e9d92**，与卡片书签(.cf-body)同色 */
  background: #0e9d92;
  color: #fff;
  margin-left: auto;
}

.tag-prepaid {
  background: var(--brand);
  color: #fff;
  margin-left: auto;
}

.tag-unpaid {
  background: #FF9800;
  color: #fff;
  margin-left: auto;
}

/* 卡片收款徽章悬停反馈（可直接点击切换状态） */
.card-tag.tag-paid:hover,
.card-tag.tag-prepaid:hover,
.card-tag.tag-unpaid:hover {
  filter: brightness(1.15);
  outline: 1px solid rgba(0, 0, 0, 0.25);
}

.tag-invoiced {
  background: #6a1b9a;
  color: #fff;
  margin-left: auto;
}

.card-tag {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* 渠道标签：同色系浅底深字 */
.tag-ch-blue   { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.tag-ch-purple { background: #efe6fa; color: #6b3fa0; font-weight: 700; }
.tag-ch-teal   { background: linear-gradient(135deg, #dfeeed 0%, #edf5f4 100%); color: #04756d; font-weight: 700; }
.tag-ch-orange { background: #fdeede; color: #c05600; font-weight: 700; }
.tag-ch-green  { background: linear-gradient(135deg, #e3f0ef 0%, #f0f6f6 100%); color: #0e9d92; font-weight: 700; }
.tag-ch-red    { background: #fce8e6; color: #c0392b; font-weight: 700; }
.tag-ch-brown  { background: #efe8df; color: #8d6e63; font-weight: 700; }
.tag-ch-gold   { background: #faf3d9; color: #9a7d00; font-weight: 700; }   /* z643：恒力 */
.tag-ch-gray   { background: #eceff1; color: #607d8b; font-weight: 700; }

/* Lost inquiry */
.tag-lost {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #999;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}

.tag-draft {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff3cd;
  color: #856404;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}

.card-lost {
  opacity: 0.65;
  background: #fafafa;
}

/* z889（陶总 2026-10-31）：外发（彩澜外发加工）订单卡片**去掉浅蓝底**，
   跟绿都订单一样恢复白底 —— 陶总："外发的订单卡片不要加底色了"。
   原来用 var(--brand-pale) 底 + var(--brand-soft) 边做区分，现在只靠「X外发」橙色标签区分。 */
.card-outsourcing {
  background: #fff;
  border-color: #e8e8e8;
}

.card-lost-reason {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 6px;
  font-style: italic;
}

/* Inquiry action buttons */
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-mini {
  flex: 1;
  padding: 4px 0;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

/* z888（陶总 2026-10-31）：浅绿按钮改成**纯色、无渐变、无边框**。
   原来是 135° 渐变（#e6f1f0 → #f3f7f7）+ 1px #c7e7e5 描边，陶总要求"纯色、不要渐变、不要边框"。
   ⇒ 底取渐变起始色 #e6f1f0 作纯色，文字仍是品牌绿 #0e9d92，边框去掉。
   ⚠️ 这是 .btn-win 基类，全站同类浅绿按钮一并生效（看板卡片「定稿开单」等、弹窗按钮）。
   ⚠️ 草绿皮肤有 html.theme-grass 覆盖规则（深橄榄 #3d4a17 实底白字），不受影响。 */
.btn-win {
  background: #e6f1f0;
  color: #0e9d92;
  border: none;
}

.btn-win:hover {
  background: #c7e7e5;
}

.btn-lose {
  background: #fbe9e9;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.btn-lose:hover {
  background: #ffcdd2;
}

/* Conversion rate metric */
.metric-inquiry .metric-num {
  color: #ff7300;
}

.metric-conversion .metric-num {
  color: #0e9d92;
}

/* Floating Dashboard (z223 重新设计：渐变悬浮卡片+可拖动) */














/* 拖动手柄（z223） */
.float-drag-grip {
  font-size: 14px;
  opacity: 0.75;
  cursor: move;
  line-height: 1;
}

/* Sidebar Dashboard */
.sb-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  -webkit-overflow-scrolling: touch;
}

#sidebar-dashboard-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Sidebar Dashboard */
.sb-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.sb-metric {
  border-radius: 8px;
  padding: 12px 14px;
}

.sb-metric-blue { background: var(--brand-pale); }
.sb-metric-red { background: #FCEBEB; }
.sb-metric-green { background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%); }
.sb-metric-amber { background: #FFF4E6; }
.sb-metric-purple { background: #F3EAF7; }

.sb-metric-label {
  font-size: 11px;
  color: #777;
  margin-bottom: 4px;
}

.sb-metric-blue .sb-metric-value { color: var(--brand-strong); }
.sb-metric-red .sb-metric-value { color: #A32D2D; }
.sb-metric-green .sb-metric-value { color: #058980; }
.sb-metric-amber .sb-metric-value { color: #8A5A00; }
.sb-metric-purple .sb-metric-value { color: #6B3D8A; }

.sb-metric-value {
  font-size: 22px;
  font-weight: 600;
}

.sb-chart-section {
  margin-bottom: 12px;
}

.sb-card {
  background: #F8F9FA;
  border-radius: 8px;
  padding: 12px 14px;
}

.sb-chart-title {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 8px;
}

.sb-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 110px;
}

.sb-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.sb-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}

.sb-bar-label {
  font-size: 10px;
  color: #aaa;
}

.sb-unpaid-section {
  flex: 1;
  margin-bottom: 12px;
}

.sb-count {
  color: #aaa;
  font-weight: 400;
}

.sb-unpaid-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}

.sb-unpaid-row:last-child {
  border-bottom: none;
}

.sb-unpaid-customer {
  flex: 1;
  font-size: 13px;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-unpaid-date {
  font-size: 11px;
  color: #aaa;
}

.sb-unpaid-amount {
  font-size: 13px;
  font-weight: 500;
  color: #A32D2D;
}

.sb-empty {
  font-size: 12px;
  color: #bbb;
  text-align: center;
  padding: 12px 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges; /* 滚动条左右对称预留：避免右侧滚动条挤压内容造成"整体偏右"观感（z388） */
}

.modal-large {
  width: 640px;
}

/* 快速报价 / 登记订单 / 订单详情弹窗加宽 */
#quote-modal .modal,
#order-modal .modal,
#inquiry-detail-modal .modal {
  width: 720px;
}

/* z1219g（陶总 2026-11-22）：快速报价弹窗加宽到 1080px —— z1218 纸张行改固定 120px 后
   一行需 ~1020px，720px 弹窗横向放不下，「计算报价」按钮被推出可视区；加宽后整行+按钮都在框内。
   max-width 96vw 兜底小屏。登记订单/订单详情弹窗不受影响（保持 720）。 */
#quote-modal .modal {
  width: 1080px;
  max-width: 96vw;
}

/* 新增/编辑客户弹窗加宽 */
#customer-edit-modal .modal {
  width: 640px;
}

/* z575d：新建订单弹窗（同「新增客户」样式）
   z575e（陶总 2026-09-13）：客户下拉点不掉 → 两个原因一并修
   ① JS 侧：全局"点击空白处关闭"处理器漏登记 ng-cust-sug（已补），Esc 也支持（先关下拉再关弹窗）
   ② CSS 侧：.modal 有 overflow-y:auto，而本弹窗只有约 250px 高，
      下拉 240px 一展开就被裁切、且贴着底边 → 放开裁切并给下拉一个合适上限
   z575f（陶总 2026-09-13）：整体收窄 + 字段改成一行 2 个框（去掉底部预览条后 4 个字段刚好 2×2） */
#new-group-modal .modal {
  width: 520px;               /* z575f：640 → 520，整体收窄 */
  overflow: visible;          /* 让下拉浮层能盖出弹窗外，不被裁切 */
  max-height: 90vh;
}
#new-group-modal .modal-body {
  overflow: visible;
}
/* z575f：一行 2 个框（覆盖 .order-form-grid 默认的 3 列） */
#new-group-modal .order-form-grid.ng-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
#new-group-modal .customer-suggestions {
  z-index: 1200;              /* 高于 .modal-overlay(1000)，确保盖在其他字段之上 */
  max-height: 200px;
  min-width: 100%;            /* z575f：弹窗收窄后下拉跟着收，避免溢出 */
  box-sizing: border-box;
}
/* 客户选中后禁用自动弹出的二次搜索浮层（点选即刻收起） */
#new-group-modal .customer-suggestions:empty {
  display: none !important;
}

.modal-dashboard {
  width: 1200px;
  max-width: 95vw;
}

.modal-wide {
  width: 960px;
  max-width: 95vw;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-maximize {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-maximize:hover { color: #333; }

.modal-fullscreen {
  width: 100vw !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

/* 全屏管理页面风格（z225：仿截图风格，标题左对齐大字号、扁平边框）
   应用于客户信息、订单记录等顶部是 nav 风格的弹窗 */
.modal-fullscreen .modal-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid #ececec;
  align-items: baseline;
}
.modal-fullscreen .modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1f2328;
  letter-spacing: -0.4px;
  margin: 0;
}
.modal-fullscreen .modal-close,
.modal-fullscreen .modal-maximize {
  font-size: 18px;
  color: #6b7280;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-fullscreen .modal-close:hover,
.modal-fullscreen .modal-maximize:hover {
  background: #f3f4f6;
  color: #111;
}
.modal-fullscreen .modal-body {
  padding: 18px 28px 24px;
}

/* 全屏弹窗内的搜索条：搜索框占满、加号紧贴右侧、计数/清除单独在右
   z576（陶总 2026-09-13）：客户页工具条已由 .cust-toolbar/.cust-toolbar-row/.cust-add-btn/.cust-count
   收敛为与另两页同构的 .inquiry-search-bar/.btn-statement/.inquiry-count，
   选择器一并更新，全屏下的视觉调整保持不变。 */
.modal-fullscreen .inquiry-search-bar {
  gap: 10px;
}
.modal-fullscreen .search-input-wrap input {
  padding: 10px 14px 10px 36px;
  border-radius: 10px;
  border-color: #e2e8f0;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-fullscreen .search-input-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243,.08);
}
/* z709（陶总 2026-09-22）：最大化后尾部按钮被写死的 width:40px 压成方块，
   「导出对账单」等文字折成一团。改为自适应宽度：文字按钮按内容撑开、禁止折行；
   图标类按钮仍有 min-width 兜底。高度/圆角/投影维持最大化态的原有观感。 */
.modal-fullscreen .btn-statement {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.modal-fullscreen .inquiry-search-bar .inquiry-count {
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

/* 全屏弹窗内表格更密：表头扁平、列分隔线柔和 */
.modal-fullscreen .inquiry-table th {
  background: #fafbfc;
  padding: 9px 12px;
  font-weight: 600;
  color: #4b5563;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  border-bottom: 1px solid #e5e7eb;
}
.modal-fullscreen .inquiry-table td {
  padding: 9px 12px;
  font-size: 13px;
}
.modal-fullscreen .cust-table-wrap,
.modal-fullscreen .inquiry-table-wrap {
  border-top: 1px solid #ececec;
  margin-top: 12px;
  max-height: calc(100vh - 240px);
}

.modal-body {
  padding: 20px 24px;
}

/* Quote form (z468：文本/多款报价下线，quote-input 区样式一并清除) */

/* =================== Manual cost tab =================== */
.quote-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.quote-tab {
  padding: 8px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.quote-tab:hover {
  color: #444;
}

.quote-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.tab-content {
  margin-bottom: 12px;
}

.mc-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #eee;
}

.mc-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.mc-paper-mode {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.mc-radio {
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-radio input {
  cursor: pointer;
}

.mc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}

.mc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mc-field label {
  font-size: 12px;
  color: #888;
}

.mc-field input, .mc-field select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.mc-field input:focus, .mc-field select:focus {
  border-color: var(--brand);
}

.mc-paper-result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.mc-paper-label {
  font-size: 13px;
  color: #888;
}

.mc-paper-value {
  font-size: 18px;
  font-weight: 700;
  color: #e24b4a;
}

.mc-paper-detail {
  font-size: 12px;
  color: #aaa;
}

/* Dynamic cost rows */
.mc-cost-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.mc-cost-row input {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.mc-cost-row .mc-cost-name {
  flex: 1;
}

.mc-cost-row .mc-cost-amount {
  width: 100px;
  text-align: right;
}

.mc-cost-row .mc-cost-del {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 16px;
  color: #ccc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-cost-row .mc-cost-del:hover {
  color: #e24b4a;
  border-color: #e24b4a;
}

.mc-add-btn {
  background: none;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.mc-add-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Summary */
.mc-summary {
  background: var(--brand-pale);
  border-color: var(--brand-soft);
}

.mc-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
  padding: 3px 0;
}

.mc-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: #e24b4a;
  padding: 8px 0;
  margin-top: 4px;
  border-top: 1px solid var(--brand-soft);
}

.mc-quote-params {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.mc-quote-params .mc-field {
  flex: 1;
}

.mc-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
}

.mc-checkbox input {
  cursor: pointer;
}

/* Quote result */
.quote-result {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
}

.quote-result-error {
  text-align: center;
  color: #e24b4a;
  padding: 16px;
}

/* Compact quote result layout */
.qr-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* z987：切换品类不再清空报价，用这条浅灰小字标明"这价是按哪个品类算的" */
.qr-src-tag {
  margin-bottom: 8px;
  padding: 5px 10px;
  background: #f5f6f8;
  border: 1px solid #e6e8ec;
  border-radius: 6px;
  color: #8a8f99;
  font-size: 12px;
  line-height: 1.5;
}

.qr-total-line {
  /* z423：由 flex-wrap 改为内联流式文本——行1 长"成本=封面+内页+工艺"能随前面的内容
     在分词处自然换行，不再整块另起一行，分隔符 | 也不孤立（陶总：成本信息紧跟前面内容） */
  display: block;
}
.qr-total-line > * {
  vertical-align: middle;
}

.qr-total-main {
  font-size: 28px;
  font-weight: 700;
  color: #e24b4a;
  line-height: 1.2;
}

.qr-unit {
  font-size: 13px;
  color: #e24b4a;
  background: #fef0f0;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.qr-sep {
  color: #ddd;
  font-size: 13px;
}

.qr-mini {
  font-size: 13px;
  color: #666;
}

/* z423：行1 尾部成本/运费/重量区用内联流包裹——让长"成本=封面+内页+工艺"文本
   在内容处自然换行（不再整块另起一行），且分隔符 | 与跟随内容同流不孤立。
   z426：分隔符 | 左右留对称 margin——陶总：分割线与前后文字间距要一致（原来右贴文字太紧）。
   margin 是唯一间距来源，故成本行模板需保证 sep 两侧无源码折叠空白（见 app.js 2227/2694 同片拼接）。 */
.qr-total-flow {
  min-width: 0;
  display: inline;
}
.qr-total-flow .qr-sep {
  margin: 0 7px;
  color: #d6d6d6;
}

.qr-detail-box {
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  border: 1px solid #eee;
  word-break: break-all;
}

.qr-delivery-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
}

.qr-delivery-label {
  color: #999;
}

.qr-delivery-opt {
  color: #666;
}

.qr-delivery-opt.cheapest {
  color: #0e9d92;
  font-weight: 600;
}

.qr-comp-badge {
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #047a71 0%, #058c82 100%);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.qr-invoice-badge {
  font-size: 12px;
  color: #fff;
  background: #e65100;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.qr-comparison {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  margin: 4px 0;
}

.qr-comp-item {
  padding: 3px 8px;
  border-radius: 4px;
  background: #f5f5f5;
  color: #888;
}

.qr-comp-item.selected {
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  color: #0e9d92;
  font-weight: 600;
}

.quote-actions {
  display: flex;
  gap: 8px;
}

/* 300g铜版比价（本地单张 vs 诚辉名片） */
.qr-comp-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.qr-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.qr-comp-block {
  padding: 10px;
  border-radius: 6px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}
.qr-comp-block.cheaper {
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  border-color: #09b5a9;
}
.qr-comp-block.failed {
  background: #fff3e0;
  border-color: #ff9800;
}
.qr-comp-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}
.qr-comp-price {
  font-size: 22px;
  font-weight: 700;
  color: #d32f2f;
}
.qr-comp-block.cheaper .qr-comp-price {
  color: #0e9d92;
}
.qr-comp-detail {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  line-height: 1.5;
}
.qr-comp-error {
  font-size: 12px;
  color: #e65100;
  margin-top: 4px;
}
.qr-comp-recommend {
  font-size: 13px;
  font-weight: 600;
  color: #0e9d92;
  text-align: center;
  padding: 6px;
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Form */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

/* Two-column form layout in order modal */
.order-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* z1214（陶总 2026-11-22）：登记订单表单一行 4 个框。
   只限定 #order-modal（登记页/独立页同 DOM），不影响共用 .order-form-grid 的
   新增客户、付款登记、开票弹窗（它们各有自己的列数安排）。 */
#order-modal .order-form-grid {
  grid-template-columns: repeat(4, 1fr);
}

.order-form-grid .form-group {
  min-width: 0;
}

/* Customer autocomplete */
.customer-input-group {
  position: relative;
}

.customer-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  min-width: 260px;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.customer-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.customer-suggestion-item:hover {
  background: #f5f7fa;
}

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

.cust-no-match .cust-main {
  color: #666;
  font-weight: 400;
}

.cust-no-match .cust-sub {
  color: var(--brand);
  font-weight: 600;
}

.customer-suggestion-item .cust-main {
  font-weight: 600;
  color: #1a1a1a;
}

.customer-suggestion-item .cust-sub {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.customer-suggestion-item .cust-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--brand-pale);
  color: var(--brand);
  margin-left: 6px;
}

/* z739（陶总 2026-10-08）：收件信息「历史收件地址」可检索浮层
   —— 挂 body、position:fixed，位置由 shipAddrPosition() 按输入框 rect 现算；
   登记页 #order-shipping 与详情弹窗 #detail-shipping 共用这一个浮层。 */
.ship-addr-sug {
  position: fixed;
  z-index: 3000;              /* 必须在两个弹窗之上（详情弹窗 z-index 见各自样式） */
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  overflow-y: auto;
  max-height: 280px;
}

.ship-addr-sug .ship-sug-head {
  padding: 7px 12px;
  font-size: 12px;
  color: #888;
  background: #fafbfc;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
}

.ship-addr-sug .ship-sug-item {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.ship-addr-sug .ship-sug-item:last-child { border-bottom: none; }

.ship-addr-sug .ship-sug-item:hover,
.ship-addr-sug .ship-sug-item.active { background: var(--brand-pale); }

.ship-addr-sug .ship-sug-main {
  font-size: 14px;
  color: #1a1a1a;
  word-break: break-all;
}

.ship-addr-sug .ship-sug-sub {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 2px;
}

.ship-addr-sug .ship-sug-empty {
  padding: 12px;
  font-size: 13px;
  color: #999;
}

/* Toggle filter button */
.btn-toggle {
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-toggle:hover {
  border-color: #e65100;
  color: #e65100;
}
.btn-toggle.active {
  background: #e65100;
  border-color: #e65100;
  color: #fff;
}

/* Detail modal customer suggestions - wider than the 1/3 column */
#detail-customer-suggestions {
  min-width: 260px;
}

/* Small button */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* Product info textarea */
.product-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.product-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

.smart-fill-btn {
  margin-top: 6px;
  font-size: 12px;
  padding: 4px 12px;
  color: var(--brand);
  border-color: var(--brand);
}

.smart-fill-btn:hover {
  background: var(--brand);
  color: #fff;
}

.smart-fill-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* =================== Inquiry list table =================== */

/* =================== z658（陶总 2026-09-17）：筛选标签栏整体重设计 ===================
   陶总原话：「筛选的这行整体色彩太灰白了，看起来没有重点……要看起来非常清晰、一目了然，
   另外几个页面的筛选行也统一改」。
   设计：浅灰蓝底板 + 胶囊标签，选中项品牌蓝底白字（分段控件风格）——
   选中态从"细下划线"升级为"整块变色"，一眼锁定当前筛选；
   订单记录 #list-tabs / 客户 #cust-tabs / 对账 #grp-tabs 三页共用本类自动统一。 */
.list-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #eef2f7;
  padding: 6px;
  border-radius: 10px;
  border-bottom: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* z911（陶总 2026-11-01）：「客户信息页顶部整条筛选还是闪」的**真凶**就在这里 ——
     空标签条（还没渲染标签时）只有 padding 6+6 = **12px 高**，标签填进来后是 **46px**，
     下面整条 .inquiry-search-bar 与表格被往下推 34px。
     实测（本地 CDP 逐帧采样 z910）：t=115ms 时 #cust-tabs 高 12px、搜索条 top=44px；
     t=260ms 时标签渲染完，高 46px、搜索条 top=78px → layout-shift 0.0184，
     位移源正是 .inquiry-search-bar 与 .cust-table-wrap。z904 的 visibility:hidden 只藏了
     "内容闪"，没解决"高度塌"，所以陶总看着还是在闪。
     固定最小高度 = 有标签时的真实高度（6+6 padding + 34 胶囊），空/加载态也占满 46px，
     三条列表页（订单记录 / 客户信息 / 订单对账）共用本类，一并稳定。 */
  min-height: 46px;
}

.list-tab {
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: #5a6a7a;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  border-radius: 7px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.list-tab:hover {
  color: var(--brand);
  background: rgba(32, 77, 243, .10);
}

.list-tab.active {
  color: #fff;
  background: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(32, 77, 243, .35);
}

.tab-count {
  display: inline-block;
  /* z572（陶总 2026-09-12）：定宽消除"计数变化推挤后续标签"的位移。
     原值 min-width:20px 只够 1 位数，首帧 HTML 里 8 个计数都是 0（各 20px），
     数据到位后变成 846 / 483 / 363 / 517 等三位数（各约 34px），8 个标签总宽变化，
     把右侧所有标签横向推开 —— 实测订单记录页 CLS 0.00022（其余页为 0）。
     ⚠️ 副作用：位数少于 3 位的计数气泡会变宽到 34px（消除位移的必要代价）。 */
  min-width: 34px;
  height: 18px;
  line-height: 18px;
  padding: 0 6px;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5a6a;
  background: #dde4ec;
  border-radius: 9px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.list-tab.active .tab-count {
  color: #fff;
  background: rgba(255, 255, 255, .25);
}

/* z904（陶总 2026-10-31）：客户页标签条的「加载中」态 —— visibility:hidden 而不是空内容，
   占位高度稳定（不推挤布局），数据渲染完由 buildCustomerTabs 移除本类后一次性显示，
   消掉原来「占位标签『全部 …』→ 真实标签整条重写」的进页闪变。 */
.list-tabs.loading { visibility: hidden; }

.inquiry-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* z576（陶总 2026-09-13）：三页工具条横向对齐。
   三页共用 .inquiry-search-bar 后，搜索框 flex:1 会吃掉全部富余宽度；
   而右侧按钮宽度天然不同（客户页"新增"36px / 订单页"导出对账单"97px / 对账页"新建订单"84px），
   于是三页的"搜索框右边缘"各不相同（实测差 45.7~61.7px）。
   修法：搜索框宽度不再由 flex 决定，而是**与表格等宽铺满**，富余宽度留给右侧计数与按钮区，
   计数起用 margin-left:auto 推到右侧。这样三页搜索框左、右边缘完全一致，
   按钮各自保持原有宽度、紧贴表格右边缘（与表头右边界对齐，反而更整齐）。 */
/* z576（陶总 2026-09-13）：客户页工具条结构已收敛为 .inquiry-search-bar，
   此处**不再需要任何专用宽度规则** —— 三页共用同一套 flex 布局：
   搜索框 flex:1 吃满剩余空间、计数紧随、按钮收尾并保持 24px 右侧内边距。
   原客户页 bug（按钮被推到容器边缘、超宽 162px）由结构收敛本身修复，
   不要再给搜索框另设固定宽度或给计数加 margin-left:auto —— 那会把差异重新引入。 */

.search-input-wrap {
  position: relative;
  flex: 1;
}

/* z575c：三个列表页（订单记录 / 客户信息 / 订单对账）的搜索框合并为一条共享规则。
   原先是三个 id 各抄一份，导致 ① `#group-search` 漏了 `width:100%`（对账页搜索框被挤成一小条）
   ② `#customer-search` 漏了 `outline:none`。
   **以后新增列表页搜索框：id 加进这个选择器即可，不要再单独抄一份。** */
#customer-search,
#inquiry-search,
#group-search {
  width: 100%;
  height: 38px;   /* z692：与表单输入框统一 38px（原自动高度约 40px） */
  padding: 9px 12px 9px 34px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

#inquiry-search:focus,
#group-search:focus {
  border-color: var(--brand);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.inquiry-count {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  /* z576（陶总 2026-09-13）：三页工具条右边缘对齐的最后一块拼图。
     实测（1920 全屏）：三页右边距与按钮右边缘都是 24 / 1890px，**完全一致**；
     但计数文字宽度随内容变（"共 9 条"41.3px vs "共 633 个客户"56.6px），
     叠加按钮宽度不同（97 / 84 / 36px），净差 45.7px 全被搜索框吸收 →
     看起来就是"搜索框右边缘三页不齐"。
     这里把计数定宽到够放最大量词（"共 99999 个客户"约 88px），
     配合下方给尾部按钮预留的统一宽度，使"搜索框右边缘"三页一致。
     ⚠️ 用 min-width 而非 width：量词更短时留白，更长时自然撑开（不会截断文字）。 */
  min-width: 88px;
  text-align: right;
}

/* z586：「只看某订单的工单」提示条（插件状态下告知 + 一键退出）
   背景色沿用项目提示条色系；不占位时 display:none，不影响列表页原有布局与各页对齐。 */
.inquiry-group-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: var(--brand-pale);
  border: 1px solid var(--brand-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--brand);
  line-height: 1.4;
}
.inquiry-group-hint .btn-clear-group-filter {
  flex: none;
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 6px;
  cursor: pointer;
}
.inquiry-group-hint .btn-clear-group-filter:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.inquiry-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #444;
  outline: none;
  cursor: pointer;
  max-width: 160px;
}

.filter-select:focus {
  border-color: var(--brand);
}

.inquiry-table-wrap {
  /* z573（陶总 2026-09-12）：弹窗模式下的表格高度上限，两页统一 640px
     （原为 480px；客户页 .cust-table-wrap 另写了 calc(80vh-160px)，已一并改为 640px）。
     ⚠️ 注意：页面模式（?p=orders|customers）由 z534 的覆盖规则改为 flex:1 / max-height:none，不受此值影响。 */
  max-height: 640px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #eee;
  border-radius: 8px;
  /* z291: 恢复滚动条显示（原为全浏览器隐藏，Windows 鼠标无横滚入口）；走全局6px细滚动条样式 */
}

.inquiry-table {
  width: 100%;
  table-layout: fixed;
  min-width: 1280px;
  border-collapse: collapse;
  font-size: 13px;
}

/* z569（陶总 2026-09-12）：列表页首帧占位行。
   背景：页面模式（?p=orders|inquiry|customers）是整页导航，「顶栏+页签」由静态 HTML 秒出，
   而表格数据要等 app.js 下载→执行→API 往返→渲染。慢网实测（延迟150ms/200KB/s/CPU4x）
   中间有 1.2 秒是「外壳已就位、表格全空」，看着就是闪一下。
   修法：三个列表的 tbody 在 HTML 里预置一行加载态（渲染函数都是 tbody.innerHTML= 整体覆盖，
   数据到达后自然被替换）。注意 colspan 要与各表真实列数一致（订单记录 23 / 客户信息 16），
   table-layout:fixed 下列宽由 thead 决定，占位行只跨列不影响列宽。 */
.tbody-placeholder td {
  text-align: center;
  color: #9aa4b2;
  padding: 34px 0;
  font-size: 13px;
  letter-spacing: .5px;
}

/* z569（陶总 2026-09-12）：登记订单页顶部的草稿提示条——有草稿时才出现。
   z573：询盘记录与「登记询盘」已下线，草稿箱是唯一的半成品入口。 */
/* z573（陶总 2026-09-12）：草稿提示条「首帧占位」。
   index.html 头部内联脚本依据 localStorage 缓存的草稿数给 <html> 打 .has-drafts，
   本规则用 !important 覆盖提示条上的 inline display:none —— 让它第一帧就撑满高度，
   数据到达后只换文字不改变高度，避免下方登记表单整体下移（慢网实测 CLS 0.024 → 0）。 */
html.has-drafts #order-draft-hint { display: flex !important; }

.draft-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  margin-bottom: 14px;
  background: #fff8e8;
  border: 1px solid #f2dca6;
  border-radius: 9px;
  font-size: 13px;
  color: #8a6d1f;
}
.draft-hint-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8a33d;
}
.draft-hint-btn {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 13px;
  border: none;
  border-radius: 7px;
  background: #e8a33d;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.draft-hint-btn:hover { background: #d9942c; }

/* z569：草稿箱弹窗（4 列：客户/产品信息/金额/操作） */
.draft-box-bar {
  display: flex;
  align-items: center;
  /* z576：草稿箱计数原用 .cust-count（该类已删，收敛为 .inquiry-count）。
     .inquiry-count 不带 margin-left:auto，这里靠容器右内边距把计数与表格右边缘对齐，
     与列表页工具条 24px 的右侧留白保持一致。 */
  padding: 0 24px 10px 0;
}
.draft-table { min-width: 0; }        /* 覆盖 .inquiry-table 的 min-width:1280px，4 列不需要横向滚动 */
/* ⚠️ 列类名用 dk-* 而不是 .col-*：.inquiry-table th.col-product 等有固定像素宽（70px/130px/90px/185px），
   特异性 0,2,1 会压过 .draft-table .col-xxx（0,2,0）→ 第一版就是被它挤成"产品列逐字竖排、删除按钮没字"。
   现在换独立类名，只受本段规则约束，不会跟订单记录/客户表的列宽打架。 */
.draft-table .dk-cust { width: 22%; }
.draft-table .dk-prod { width: 40%; }
.draft-table .dk-amt  { width: 14%; }
.draft-table .dk-ops  { width: 24%; }
.draft-table td { padding: 11px 10px; word-break: break-word; }
/* 注意：不可给 <td> 设 display:flex（会让 td 退出表格行高分配，z562 踩过），
   故操作按钮包一层 div.draft-ops */
.draft-ops {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* 按钮不许被压缩（否则窄列下文字先没、只剩个色块） */
.draft-ops .btn-mini {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 4px 10px;
  font-size: 12px;
}

.inquiry-table thead {
  /* z267：表头固定改用 th 上的 sticky（border-collapse: collapse 下 thead sticky 兼容性差） */
}

.inquiry-table th {
  position: relative;
  background: #f5f5f5;
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

/* z267：表头行固定（垂直滚动时第一行不滚走），sticky 直接加在 th 上 */
.inquiry-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* 列宽按类名定义（与 index.html 表头、app.js 行渲染一一对应）。
   新增列时：表头加 class + 这里加一条宽度即可，不影响其他列 */
.inquiry-table th.col-date       { width: 100px; }  /* 下单日期 */
.inquiry-table th.col-customer   { width: 130px; }  /* 客户 */
.inquiry-table th.col-processor  { width: 70px; }   /* 加工方 */
/* z748（陶总 2026-10-08）：新增「成本」列（加工方右侧，所有页签都显示） */
.inquiry-table th.col-cost       { width: 92px; }   /* 成本 */
/* z656（陶总 2026-09-17）：删「收款方式」列（col-paymethod），宽度规则一并移除。 */
.inquiry-table th.col-amount     { width: 104px; }  /* 订单金额（z609：90→104，¥53,843.60 这种带千分位的两位小数要放得下） */
.inquiry-table th.col-unitprice  { width: 75px; }   /* 单价 */
/* z611（陶总 2026-09-14）：原 col-margin(75) / col-profit(80) 两条随列删除 ——
   「毛利率 / 毛利」已整体搬到订单对账页（`.col-gmargin`，见下方 grp-table 段）。 */
/* z657（陶总 2026-09-17）：「收款状态」列已删，列宽规则一并移除 */
.inquiry-table th.col-product    { width: 70px; }   /* 产品名 */
.inquiry-table th.col-filename   { width: 150px; }  /* 文件名 */
.inquiry-table th.col-prodinfo   { width: 300px; }  /* 产品信息 */
.inquiry-table th.col-cutsize    { width: 90px; }   /* 开纸尺寸 */
.inquiry-table th.col-imposition { width: 70px; }   /* 拼版数 */
.inquiry-table th.col-note       { width: 160px; }  /* 备注 */
.inquiry-table th.col-packing    { width: 130px; }  /* 打包要求 */
.inquiry-table th.col-shipping   { width: 150px; }  /* 收件信息 */
.inquiry-table th.col-tracking   { width: 150px; }  /* 快递单号 */
.inquiry-table th.col-group      { width: 190px; }  /* 所属订单（z575：替换原「开票」列） */
.inquiry-table th.col-submitter  { width: 80px; }   /* 提交人 */
/* z839（陶总 2026-10-27）：新增「业务员」列（订单记录页，客户右侧，只读显示）——
   90px 装得下最长的 3 字姓名。 */
.inquiry-table th.col-salesman   { width: 90px; }
.inquiry-table th.col-created    { width: 130px; }  /* 提交时间 */
.inquiry-table th.col-ops        { width: 185px; }  /* 操作（z263：3按钮紧凑适配） */

.inquiry-table td {
  background: #fff;
  padding: 7px 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  vertical-align: middle;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;      /* 列宽被压缩时防溢出 */
  text-overflow: ellipsis;
}

.inquiry-table tr:hover td {
  background: #fafbfc;
}

.inquiry-table tr:last-child td {
  border-bottom: none;
}

/* Excel 式可编辑单元格 */
.inquiry-table .cell-edit {
  cursor: text;
  outline: none;
  min-width: 30px;
}

.inquiry-table .cell-edit:hover {
  background: rgba(24, 144, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(24, 144, 255, 0.35);
}

.inquiry-table .cell-edit:focus {
  background: #fffbea;
  box-shadow: inset 0 0 0 2px #f5a623;
}

.inquiry-table .cell-edit.cell-saved {
  animation: cellSavedFlash 0.9s ease-out;
}

@keyframes cellSavedFlash {
  0% { background: #ddeeed; box-shadow: inset 0 0 0 2px #09b5a9; }
  100% { background: transparent; }
}

/* z657（陶总 2026-09-17）：订单记录表「收款状态」列整体删除，其徽章的手型/hover 变亮
   交互（原 .inquiry-table .status-badge 两条）一并下线（原话：交互显示删掉，鼠标点击不再变色）。
   ⚠️ 订单对账表(grp-table 与 inquiry-table 共用类)的徽章仍是 z580 的可点切换，手型与 hover
   保留在 .grp-table 作用域，勿删勿放回 .inquiry-table 作用域。 */
.grp-table .status-badge {
  cursor: pointer;
  user-select: none;
}

.grp-table .status-badge:hover {
  filter: brightness(0.92);
}

/* z580（陶总 2026-09-13）：订单对账表三列改为可点击切换的徽章。
   两种新样式：
   .grp-toggle —— 可点击徽章（加手型 + hover 微亮 + 按下微缩，给出"这是能点的"的可供性提示）。
     订单记录页的徽章靠 .inquiry-table .status-badge 那条 cursor:pointer 就够，但对账表
     此前徽章是**纯展示**（无点击），用户没有"能点"的心智；加一个按下缩放让它更像按钮。
   .status-idle —— 「未开票」的未达成态：浅灰底 + 中灰字，比 status-lost（红）
     更柔和 —— 未开票是"还没做"而非"出了问题"，用红色会造成误导性紧迫感。
     此前用的是内联 style="color:#ccc;"，现收敛成类，便于统一调色。
     （z581 起「未回款」已随该列删除，本类现只服务「未开票」。） */
.status-badge.status-idle {
  background: #f0f2f5;
  color: #8a94a6;
}

.inquiry-table .status-badge.grp-toggle:active {
  transform: scale(0.94);
  transition: transform 0.06s;
}

/* z576（陶总 2026-09-13）：.cust-toolbar / .cust-toolbar-row / .cust-add-btn / .cust-count
   这一组**已全部删除** —— 客户页工具条改用与订单记录/订单对账页同一个 .inquiry-search-bar。
   删除原因（实测数据）：那层 .cust-toolbar-row 被 column 容器拉满整宽，
   1920 下搜索框右边缘 1830 vs 订单页 1727.7（宽 102px），内容右边缘 1890 紧贴容器（订单页 1727.7），
   肉眼就是"客户信息页的工具条整体往右挪了一截"。
   三页工具条从此只用一套类：.inquiry-search-bar + .search-input-wrap + .inquiry-count + .btn-statement。
   ⚠️ 今后新增列表页，直接复制 index.html 里订单记录页那段结构，不要再另起一套类名。
   历史沿革：z572 曾把这两套数值逐项对齐（margin/gap/字号），数值虽已一致，
   但只要结构还是两套，就会在别处（宽度/断点）再次分叉 —— z576 从结构上收敛。 */

/* z577（陶总 2026-09-13）：客户页标签栏的专属规则块 #cust-tabs **已整块删除**。
   历史：z553 给 #cust-tabs 加了 `margin-bottom:12px`（"下边距收一点"），z571 又补了
   `min-height:43px` 兜底 —— 结果三页里只有客户页的标签栏带 ID 级覆盖，订单记录 / 订单对账
   两页都只吃 .list-tabs 全局值。z572 已删掉那条 12px，但 `#cust-tabs` 这个**专属块本身**
   留了下来（块内只剩 min-height），于是它仍是三页中唯一的分叉点：
   只要将来有人在 .list-tabs 上调间距/高度，客户页就会被 #cust-tabs 的 ID 优先级顶掉，
   "标签下边线 → 搜索框 → 表格"这条带又会在客户页单独下移 —— 正是陶总截图里红框圈的那一处。
   现整块删除，让 #cust-tabs 与 #list-tabs / #grp-tabs 一样**完全继承 .list-tabs**，
   不再有任何 ID 级覆盖。
   ⚠️ 今后三页标签栏一律只用 .list-tabs，严禁再写 #cust-tabs / #list-tabs / #grp-tabs 覆盖块。
   （index.html 中三页都内置了"全部"骨架标签，首帧高度天然就是 43px，不需要 min-height 兜底。） */

/* 「导出对账单」/「新建订单」/「新增客户」三个按钮共用一条蓝色实心样式。
   ⚠️ 这里用独立类名而不是改 .btn-outline —— 全站有几十处 btn-outline，"清除筛选"等仍需描边样式。
   z576b（陶总 2026-09-13）：客户页「新增客户」由纯图标 + 改为「+ 新增客户」文字按钮，
   与另两页同款；三页尾部按钮宽度统一锁定，保证搜索框右边缘逐像素对齐。 */
.btn-statement {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* z576：三页尾部按钮宽度不同（导出对账单 97 / 新建订单 84 / 新增客户 36），
     会连带把搜索框右边缘挤得不一样。这里**固定 97px**，
     让"计数(88) + gap(12) + 按钮(97)"的尾部总宽三页严格相同 → 搜索框右边缘对齐。
     ⚠️ 必须用固定 width 而非 min-width：z576b 实测，客户页按钮换成文字后
        在 1440 下曾把搜索框右边缘挤出 9px 差异（min-width 会随内容撑开）。
     97px 的由来：订单页"导出对账单"（4 字）实测自然宽，为三页中最宽者。 */
  width: 97px;
  padding: 0 8px;
  box-sizing: border-box;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-statement:hover {
  background: var(--brand-strong);
}
.btn-statement:active {
  transform: scale(0.97);
}
/* z716（陶总 2026-09-27）：搜索条里的「清除筛选」按钮与右侧蓝色实心按钮（导出对账单/导出订单）
   **同尺寸** —— 原 btn-sm 描边样式的自然宽高比 .btn-statement 小一圈，并排时参差。
   统一 97×36 与 .btn-statement 完全一致；显隐仍由内联 display:none 控制（内联优先级更高，不受影响）。
   作用域 .inquiry-search-bar 内，三页（订单记录/订单对账/客户信息）的清除筛选同时统一。 */
.inquiry-search-bar .btn-sm.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 97px;
  height: 36px;
  padding: 0 8px;
  box-sizing: border-box;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 最大化态（modal-fullscreen）与 .btn-statement 的 z709 覆盖逐项镜像 */
.modal-fullscreen .inquiry-search-bar .btn-sm.btn-outline {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}
.cust-table-wrap {
  /* z573（陶总 2026-09-12）：与订单记录页统一为 640px
     （原为 calc(80vh - 160px)，1080p 下 ≈640px、但视口一变就与订单页不一致）。
     本规则在 .inquiry-table-wrap 之后，同特异性下胜出，客户页容器同时带两个类。 */
  max-height: 640px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* z291: 恢复滚动条显示（原为全浏览器隐藏，Windows 鼠标无横滚入口） */
}
.cust-table {
  /* z708（陶总 2026-09-21）：**改回自动布局**。
     原来是 `table-layout: fixed` + `width:100%` + `min-width:1210px`，固定布局下
     「没写 CSS 宽度的列分不到任何空间」→ 客户表的 账期 / 税种 / 税号 / 常用地址 / 备注 五列
     实测宽度 = 0，整列看不见（就是陶总说的"表头有几个字段被隐藏…下次打开又是被隐藏的"）。
     现在列宽由浏览器按内容算（每列另有 min-width 下限，见下方 z708 段），
     不再强制 min-width:1210 —— 表格该多宽就多宽，装不下由 .cust-table-wrap 横向滚动。 */
  table-layout: auto;
  width: 100%;
  min-width: 0;
}
.cust-table th {
  position: relative;
  text-align: center;
}
.cust-table th.col-id       { width: 70px; }
/* z837（陶总 2026-10-27）：「业务员」列（紧跟客户ID）—— 与上面各列同款宽度声明。 */
.cust-table th.col-salesperson { width: 90px; }
/* z613（陶总 2026-09-14）：新增「订单额」列，紧跟「客户ID」。
   110px 是实测值：最长金额 ¥54,023.60 在 14px 字号下约 84px，
   留出内边距后 110px 不换行、不省略（此处**不能用 table-layout:fixed 的默认列宽**，
   否则长金额会被 ellipsis 截断 —— z609 在订单记录表上踩过同一个坑）。 */
.cust-table th.col-orderamt { width: 110px; }
.cust-table th.col-name     { width: 100px; }
.cust-table th.col-1688     { width: 110px; }
.cust-table th.col-channel  { width: 80px; }
.cust-table th.col-contact  { width: 70px; }
.cust-table th.col-wxid     { width: 100px; }
.cust-table th.col-wxname   { width: 90px; }
.cust-table th.col-company  { width: 240px; }   /* z1103：公司名称+税号合并成一格 */
.cust-table th.col-pay      { width: 90px; }
.cust-table th.col-discount { width: 60px; }
.cust-table th.col-login    { width: 90px; }
.cust-table th.col-loginpw  { width: 90px; }
.cust-table th.col-created  { width: 130px; }
.cust-table th.col-action   { width: 140px; }
.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}
.col-resizer:hover,
.col-resizer.active {
  background: rgba(32, 77, 243, 0.4);
}
/* z706（陶总 2026-09-20）：拖列宽时表头偶发 1px 白缝（如 登录密码|折扣 之间）。
   根因：这三张表都是 table-layout:fixed + width:100%（客户表另有 min-width:1210px）。
   拖动时每帧只给被拖的 th 写整数 px 内联宽，其余列由浏览器分摊剩余空间 ——
   分摊结果经常是**小数宽**；而表头 th 是 position:sticky（各自分层绘制），
   相邻两格的背景在亚像素边界各自取整，中间就露出一条 1px 的白色底缝。
   松手/再拖一下分摊比例变了，缝又消失 —— 所以是"有时出现、再拉又没了"。
   修法：给普通表头格右缘补同色影子，缝被同色填掉，正常状态下完全不可见。
   ⚠️ 操作列（col-ops/col-action/col-gops）有自己的底色和左侧阴影，排除在外别覆盖。
   z709（陶总 2026-09-22）：两处升级 ——
   ① 宽度 1px → 2px：Windows 125%/150% 显示缩放下，1px 缝在设备像素上会占 2 格，1px 影子盖不满；
   ② 最大化弹窗（.modal-fullscreen）表头底色是 #fafbfc（见 .modal-fullscreen .inquiry-table th），
      影子必须跟着换色，否则补上去的是一条灰线、缝里露的还是白。
   🔴 z852（陶总 2026-10-29）：**影子修法在 z708 改成 table-layout:auto 之后失效了**，
      白线又冒出来（陶总截图：客户信息表「微信/手机号」后、「客户ID」后各有一条白线）。
      —— 见下面 z852 段。z706/z709 的影子保留（它对"拖列宽"那一刻的缝仍有用），但**主力修法换成 z852**。 */
.inquiry-table thead th:not(.col-ops):not(.col-action):not(.col-gops) {
  box-shadow: 2px 0 0 #f5f5f5;
}
.modal-fullscreen .inquiry-table thead th:not(.col-ops):not(.col-action):not(.col-gops) {
  box-shadow: 2px 0 0 #fafbfc;
}

/* =================== z852（陶总 2026-10-29）：表头列间白线（真修法）===================
   陶总原话：「对账页的表头依然有这种白线，之前改过，还是没改好，别的表格不知道有没有这个问题，
              有的话也一起改掉」（附客户信息表截图：白线在「微信/手机号」后、「客户ID」后）

   🔴🔴 根因（本次实测定位，与 z706 修的**不是同一个问题**）：
     z706 以为是"拖列宽时列宽是小数"，但**真因是「显示缩放」**：
       · z708 之后三张宽表改成 `table-layout: auto`（列宽由内容算），
         浏览器分摊剩余空间时给出的是**小数宽**（实测：客户ID=81.703px、微信/手机号=114.5px）；
       · 表头 th 是 `position: sticky`（各自分层绘制），相邻两格的背景**各自取整**到设备像素；
       · 在 Windows 125%/150% 显示缩放下（1 设备像素 = 1/1.25 CSS px），
         取整丢掉的那 0.x px 就在两格之间露出**一条 1 设备像素的白底** —— 就是那条白线。
     ⇒ 白线**只在非 100% 缩放下出现**，位置随缩放比例和列宽小数部分而变
       （实测 1.25x → 5 条、1.5x → 1 条、1.75x → 4 条，1x 与 2x 恰好不落在取整边界上）。

   ❌ 为什么 z706 的 `box-shadow: 2px 0 0 #f5f5f5` 补不住：
     影子画在**前一格的右缘之外**（不是"盖住两格之间的缝"），
     而取整丢失的白底正好落在**后一格的左缘内侧** —— 影子的位置压根不在那里。
     实测把影子加宽到 4px、加 spread、改 inset 都无效（缝数不变甚至更多）。

   ✅ 真修法：**给每个表头格补一圈同色 outline**（outline 不参与布局、不改变盒模型，
     只在格子的边框线上画 1px 同色，把取整丢失的那一丝白底盖住）。
     实测（1x / 1.25x / 1.5x / 1.75x / 2x 五档缩放）：列间白缝 **全部消失**。
     ⚠️ outline 不占布局空间 → 不会影响列宽、不影响拖列宽、不影响 sticky。
     ⚠️ 颜色必须与表头底色一致：普通表头 #f5f5f5、最大化弹窗 #fafbfc。
        颜色对不上就会补出一条**灰线**（比白线更难看）。
     ⚠️ 操作列（col-ops / col-action / col-gops）底色是浅蓝 var(--brand-pale) → outline 要用浅蓝。
        （对账页 col-gops 不是 sticky、底色就是 #f5f5f5，用普通色即可。） */
.inquiry-table thead th {
  outline: 1px solid #f5f5f5;
  outline-offset: 0;
}
.modal-fullscreen .inquiry-table thead th {
  outline-color: #fafbfc;
}
/* 操作列表头：底色浅蓝 → outline 跟着换浅蓝，否则灰线压浅蓝底很显眼 */
.inquiry-table thead th.col-ops,
.inquiry-table thead th.col-action {
  outline-color: var(--brand-pale);
}
/* 对账页操作列（col-gops）不是 sticky、底色与普通表头一致 → 保持 #f5f5f5 即可 */

/* ============================ z708（陶总 2026-09-21）：列宽「自动最适合」+ 列宽下限 ============================
   背景与根因见 public/app.js 的 z708 段（那里有实测数据）。这里只放样式口径：

   ① 默认自动：列宽由浏览器按内容算。原来的 `table-layout: fixed` 是"没写宽度的列 = 0 宽"的元凶，
      三张宽表（客户 / 订单记录 / 纸张吨价）全部改成 auto；对账表 z595 起就是 auto，保持一致。
   ② 每列给 min-width 下限：auto 下 CSS 的 width 只是"建议值"，内容短时列会被压窄 ——
      实测客户表不给下限时长文本列被压到 49~78px、表格体高从 672px 涨到 1338px（每行折成好几行）。
      下限取"历史调优宽度"，所以自动算出来的结果仍然是您熟悉的样子。
   ③ 手动拖过之后：table 加 `.colwidth-manual` → 切回 fixed + width:auto（宽度由 JS 按列宽之和显式给足），
      此时拖哪列只动哪列。双击手柄可回到 ①。
   ⚠️ 各表列宽下限的数值必须与 app.js 的 colfitFit / 旧 width 规则保持一致，改一处要改两处。
   ==================================================================================================== */
/* ③ 手动模式（z868：全站统一 —— 原先只 4 张表，其余新接的表漏了 → 拖完宽度不生效） */
.cust-table.colwidth-manual,
.grp-table.colwidth-manual,
#inquiry-list-modal .inquiry-table.colwidth-manual,
#paper-price-table.colwidth-manual,
#carbonless-price-table.colwidth-manual,
#sticker-price-table.colwidth-manual,
#employee-table.colwidth-manual,
#draft-table.colwidth-manual,
#fin-ledger-table.colwidth-manual,
#dash-unpaid-table.colwidth-manual {
  table-layout: fixed;
  width: auto;
  min-width: 0;
}
/* ① 订单记录表 / 纸张吨价表 也走自动布局（客户表在 .cust-table 那条里已改） */
#inquiry-list-modal .inquiry-table { table-layout: auto; min-width: 0; }
/* ⚠️ 纸张吨价表的 `width:100%` 写在 HTML 行内样式上，而"回到自动模式"会清掉 table 的行内宽度
   （colfitAuto 里 `table.style.width = ''`）→ 表会缩成内容宽（实测 336px）。故这里用 CSS 补回来。 */
#paper-price-table { table-layout: auto; width: 100%; }

/* ② 客户信息表（21 列）列宽下限 */
.cust-table th.col-1688,
.cust-table th.col-orderamt { min-width: 110px; }
.cust-table th.col-name,
.cust-table th.col-wxid { min-width: 100px; }
.cust-table th.col-channel { min-width: 80px; }
.cust-table th.col-contact,
.cust-table th.col-id { min-width: 70px; }
.cust-table th.col-wxname,
.cust-table th.col-pay,
.cust-table th.col-login,
.cust-table th.col-loginpw { min-width: 90px; }
.cust-table th.col-action { min-width: 140px; }
.cust-table th.col-company { min-width: 240px; }   /* z1103 */
.cust-table th.col-discount { min-width: 60px; }
.cust-table th.col-created { min-width: 130px; }
/* 🔴 z675「账期 / 税种 / 税号」、z695「常用地址」四列当初只加了表头、忘了加宽度规则，
   在 fixed 布局下被算成 0 宽（整列看不见）—— 这里补齐下限，别再漏。 */
.cust-table th.col-term { min-width: 76px; }     /* 账期 */
.cust-table th.col-tax { min-width: 76px; }      /* 税种 */
/* z1103：原「税号」列已与「公司名称」合并成一格「公司名称+税号」→ 该列规则移除 */
.cust-table th.col-addr { min-width: 150px; }    /* 常用地址 */
.cust-table th.col-remark { min-width: 120px; }  /* 备注（一直没写宽度的那一列） */
/* z837（陶总 2026-10-27）：「业务员」列（紧跟客户ID）—— 表头 class + 宽度下限必须成对加（z708 铁律：
   只加表头不补 CSS 会让这列在自动布局下窄得只剩几个字）。姓名最长 3 个汉字，90px 足够。 */
.cust-table th.col-salesperson { min-width: 90px; }

/* ② 订单记录表（18 列）列宽下限（.col-created 与客户表同值，共用一条） */
.inquiry-table th.col-date { min-width: 100px; }
.inquiry-table th.col-customer,
.inquiry-table th.col-created { min-width: 130px; }
.inquiry-table th.col-processor,
.inquiry-table th.col-cost,
.inquiry-table th.col-product,
.inquiry-table th.col-imposition { min-width: 70px; }
.inquiry-table th.col-amount { min-width: 104px; }
.inquiry-table th.col-unitprice { min-width: 75px; }
.inquiry-table th.col-filename,
.inquiry-table th.col-shipping,
.inquiry-table th.col-tracking { min-width: 150px; }
.inquiry-table th.col-prodinfo { min-width: 300px; }
.inquiry-table th.col-cutsize { min-width: 90px; }
.inquiry-table th.col-note { min-width: 160px; }
.inquiry-table th.col-packing { min-width: 130px; }
.inquiry-table th.col-group { min-width: 190px; }
/* z869（陶总 2026-10-30）：「省份」列（放在收件信息之后）—— 表头 class + 宽度下限成对加 */
.inquiry-table th.col-province { min-width: 90px; }
.inquiry-table th.col-submitter { min-width: 80px; }
.inquiry-table th.col-ops { min-width: 185px; }
/* z748（陶总 2026-10-08）：订单记录表「成本」列。
   · .td-cost-auto   自动计算的成本（绿都引擎算出 / **彩澜订单号带出**）→ 素色，不可改
   · .td-cost-manual 人工填的成本 → 浅蓝底 + 蓝字 + 悬停出铅笔，点一下就地改（清空 = 撤销）
   · .td-cost-edit   正在改（就地变输入框）
   · .td-cost-input  算不出 → 直接给输入框人工填（写回工单 productParams.cost）
   · .td-cost-calc   还在算 → 「…」
   ⚠️ 输入框要压过 .inquiry-table td 的默认内边距，特异度按 (0,2,1) 起 */
.inquiry-table td.td-cost {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.inquiry-table td.td-cost-val,
.inquiry-table td.td-cost-auto { color: #2a3140; font-weight: 600; }
.inquiry-table td.td-cost-calc { color: #9aa1ac; }
/* z750：人工填的成本 —— 与"自动计算"一眼可分：浅蓝底 + 蓝字 + hover 出铅笔 */
.inquiry-table td.td-cost-manual {
  position: relative;
  padding-right: 26px;
  cursor: pointer;
  background: var(--brand-pale);
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand-soft);
}
.inquiry-table td.td-cost-manual:hover { background: var(--brand-pale); }
/* 无编辑权限：保持浅蓝底（仍能一眼看出是人工填的），但不给点数/铅笔暗示 */
.inquiry-table td.td-cost-manual.td-cost-locked { cursor: default; padding-right: 10px; }
.inquiry-table td.td-cost-manual.td-cost-locked:hover { background: var(--brand-pale); }
.inquiry-table tr:hover td.td-cost-manual .ce-edit-btn { opacity: 1; }
.inquiry-table td.td-cost-edit,
.inquiry-table td.td-cost-input { padding: 4px 6px; }
.inquiry-table td.td-cost-edit input,
.inquiry-table td.td-cost-input input {
  width: 100%;
  min-width: 62px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #f0b46a;
  border-radius: 6px;
  background: #fffaf3;
  font-size: 13px;
  font-family: inherit;
  text-align: center;
  outline: none;
}
.inquiry-table td.td-cost-edit input:focus,
.inquiry-table td.td-cost-input input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}
.inquiry-table td.td-cost-edit input:disabled,
.inquiry-table td.td-cost-input input:disabled { opacity: .6; }
.cust-table td {
  white-space: normal;
  word-break: break-word;
  text-align: center;
}
/* z613（陶总 2026-09-14）：客户表「订单额」格。
   与订单记录表金额列同思路（z609：「金额要一眼看到」），但克制一档 —— 客户表 658 行、
   一百多行有金额，铺底色会花；改用**加粗 + 主色**区分。
   ⚠️ 不要复用 .cell-edit / .cell-locked：它们的 `background:none` 会按特异度把样式吃掉
      （z609 在订单记录表金额列上踩过：`.inquiry-table .cell-edit.cell-locked` 是 (0,3,0)）。
   特异度：`.cust-table td.td-cust-amt` = (0,2,1)，压过上面的 `.cust-table td` (0,1,1)。 */
.cust-table td.td-cust-amt {
  white-space: nowrap;              /* ¥54,023.60 不许断成两行 */
  font-variant-numeric: tabular-nums; /* 数字等宽 → 上下行小数点对齐，扫读不跳 */
  color: #333;
}
.cust-table td.td-cust-amt-hl {
  font-weight: 700;
  color: var(--brand);
}
/* z557（陶总 2026-09-11）：操作列按钮间距统一 8px。
   ⚠️ 原口径是靠 `margin-right:4px` **加** HTML 里按钮之间的空白符（inline-block 下渲染成一个空格 ≈4px）
      凑出 8px 观感——订单表模板里按钮之间换行了(有空白)、客户表模板里紧贴着(无空白)，
      于是实测订单表 8px、客户表 4px，陶总一眼看出不一致。
   改法：根除"靠空白符凑间距"的不确定性 → margin 归零，用 flex + gap:8px 明确给值。
   flex 后空白符不再产生匿名盒子，两表都是干净的 8px，且与模板格式无关。
   ⚠️ flex 会覆盖 .cust-table td 的 text-align:center，居中改由 justify-content 承担。 */
.cust-table td.col-action-cell {
  text-align: center;
  white-space: nowrap;
  padding-right: 20px;
  padding-left: 20px;
  vertical-align: middle;
}
/* z562：flex 下沉到内层容器（与订单记录表 .inquiry-table td.td-ops 同口径）。
   ⚠️ 不要在 <td> 上直接写 display:flex —— 会丢掉 table-cell 的行高跟随，
      行内容换行撑高时操作列底色会缺一块（z557 踩过）。 */
.cust-table td.col-action-cell .ops-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cust-table td.col-action-cell button {
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 0;
}

/* z555（陶总 2026-09-11）：客户信息表操作列 = 右侧固定 + 浅蓝独立底色，口径完全参照订单记录表
   （.inquiry-table th.col-ops / td.td-ops，z268 定的浅蓝 var(--brand-pale)）。横向滚动时操作列不跟着滚走。 */
.cust-table th.col-action,
.cust-table td.col-action-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--brand-pale);
  box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.cust-table tr:hover td.col-action-cell {
  background: var(--brand-soft);
}
.cust-table th.col-action {
  top: 0;        /* 表头操作列同时固定右上角 */
  z-index: 4;    /* 盖过表头其他列与操作列单元格 */
}
/* 客户表表头整体固定（与订单表 .inquiry-table thead th 同款），此前客户表 th 只有 position:relative */
.cust-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}
/* 注：操作列是最后一列，makeColumnsResizable 的循环到 ths.length-1 为止，本就不会给它加拖拽手柄，
   无需额外规则。若以后把操作列挪到中间，记得在这里补一条隐藏 .col-resizer。 */

.td-customer {
  font-weight: 600;
  color: #2c2c2a;
  white-space: nowrap;
}

.td-product {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #666;
}

.td-amount {
  white-space: nowrap;
}

/* ===== z657（陶总 2026-09-17）：订单记录表「订单金额」列改为常规显示 =====
   陶总原话：「订单金额列改为常规显示、跟别的列样式一样、不用做底色」。
   z609 的三态高亮（暖色底+红竖条 / hover 加深 / 待填琥珀底）全部撤掉；
   只保留两个纯文字约定（非底色）：成员行「〃」、未填「待填」两字。
   🔴 特异度纪律仍有效：本格样式一律 `.inquiry-table td.td-amount…` (0,2,1) 起步，
     不借用 cell-edit（z609 踩坑记录见 buildAmountCell 注释）。 */
.inquiry-table td.td-amount {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.inquiry-table td.td-amount-same {
  color: #C9CDD4;
  font-weight: 400;
}
.inquiry-table td.td-amount-same .amt-same { font-size: 15px; line-height: 1; }
.inquiry-table td.td-amount-pending {
  color: #D68910;
  font-size: 12.5px;
}

.td-date {
  white-space: nowrap;
  color: #999;
  font-size: 12px;
}

.td-note {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #999;
  font-size: 12px;
}

.td-tracking {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand);
  font-size: 12px;
}

.td-created {
  white-space: nowrap;
  color: #999;
  font-size: 12px;
}

/* 操作列：右侧固定（sticky），按钮居中，底色随 hover 联动（z268：浅蓝独立底色） */
.inquiry-table th.col-ops,
.inquiry-table td.td-ops {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--brand-pale);
  box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.inquiry-table tr:hover td.td-ops {
  background: var(--brand-soft);
}
.inquiry-table th.col-ops {
  top: 0;        /* z267：表头操作列同时固定右上角 */
  z-index: 4;    /* z267：盖过表头其他列(z3)与操作列单元格(z2) */
}
.inquiry-table td.td-ops {
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
  padding-right: 16px;
  padding-left: 16px;
  overflow: visible;      /* z258：操作列不截断，按钮完整显示 */
  text-overflow: clip;
}

/* z562（陶总 2026-09-12）：操作列底色"没填满"的根治。
   ⚠️ 根因是 z557 把 flex 直接设在了 <td> 上：
      `display: flex` 会让 <td> 失去 table-cell 的布局特性 —— 它不再参与表格行高分配，
      高度只由按钮自身决定。同一行只要有任何一列内容换行把行撑高，
      操作列就"只有按钮那么高"，上下露出表格背景色 → 表现为操作列浅蓝底色缺一块。
      同时 vertical-align: middle 也一并失效。
   修法：<td> 保持 table-cell（高度天然跟随行高、底色必然填满），
      把 flex 居中/间距下沉到内层容器 .ops-wrap。
   铁律：**任何 <td> 都不要设 display:flex/grid/block**。 */
.inquiry-table td.td-ops .ops-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;   /* z557：间距显式给值，不靠 HTML 空白符凑 */
}
.inquiry-table td.td-ops .btn {
  display: inline-block;
  margin-right: 0;
  vertical-align: middle;
  padding: 4px 10px;
  font-size: 12px;
}

.inquiry-table td.td-ops .btn:last-child {
  margin-right: 0;   /* z557 起 margin 已全部归零，本行保留仅为向后兼容（无条件生效也无害） */
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.status-won {
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  color: #0e9d92;
}

.status-badge.status-lost {
  background: #fbe9e7;
  color: #c62828;
}

.status-badge.status-pending {
  background: #fff3e0;
  color: #e65100;
}

.status-badge.status-active {
  background: var(--brand-pale);
  color: var(--brand);
}

.status-badge.status-prepaid {
  background: var(--brand-pale);
  color: var(--brand);
}

/* =================== Quote summary in order modal =================== */

.quote-summary-box {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.quote-summary-title {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 12px;
}

.quote-summary-hint {
  font-size: 12px;
  font-weight: 400;
  color: #999;
}

.quote-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.qs-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.qs-label {
  color: #999;
}

.qs-value {
  color: #444;
  font-weight: 500;
}

.quote-summary-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qs-price-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
}

.qs-price-item span:last-child {
  font-weight: 500;
  color: #444;
}

.qs-price-total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #ddd;
}

.qs-price-total span:last-child {
  font-size: 16px;
  font-weight: 700;
  color: #e24b4a;
}

/* =================== Inquiry detail modal =================== */

.detail-section {
  margin-bottom: 16px;
}

.detail-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
}

.detail-quote-text {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.detail-quote-text:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

.detail-price-box {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.dp-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.dp-label {
  color: #999;
}

.dp-value {
  font-weight: 500;
  color: #444;
}

.dp-sep {
  color: #ddd;
  font-size: 13px;
}

.dp-total {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.dp-total .dp-value {
  font-size: 16px;
  font-weight: 700;
  color: #e24b4a;
}

.detail-form-row {
  margin-bottom: 14px;
}

/* z574（陶总 2026-09-12）：订单详情里的「客户备注」—— 客户在客户端下单时填的那句话。
   它是**客户的原话**，工作台只读展示（客户可在【我的订单】里自行修改）；
   与上方可编辑的内部「备注」是两个字段，内部备注客户永远看不到。
   样式上刻意做成"只读块"（浅蓝底 + 虚线框），一眼与输入框区分开。 */
.detail-cust-note {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #2c3444;
  background: var(--brand-pale);
  border: 1px dashed #b9cbe4;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* z1214（陶总 2026-11-22）：flex 均分 → grid 一行 4 列。
   登记页/详情弹窗共用（所属订单/加工方/产品名、本单金额/文件名、拼版尺寸/拼版数/出版等行）。
   每行实际字段数 ≤4，不足的列留空（与报价页 grid 同一口径）；
   旧的内联 flex-basis（如本单金额 calc((100%-32px)/3)）在 grid 里天然失效，无需清理。 */
.detail-inline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.detail-inline-item {
  flex: 1;
  min-width: 0;
}

/* z1215b（陶总 2026-11-22）：拼版尺寸行（拼版尺寸/拼版数/出版）保持一行3个框均分整行，
   不随 z1214 的一行4个口径（登记页 #order-production-box 与详情页 #detail-production-box 同款）。 */
#order-production-box .detail-inline-grid,
#detail-production-box .detail-inline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* z1217b（陶总 2026-11-22）：登记页(page-mode)拼版区块与详情弹窗外观完全一致。
   根因：html.page-mode[data-page="order"] .detail-label（0,3,1）压过
   .detail-production-box .detail-label（0,2,0），青绿加粗标签被盖成灰色常规体；
   输入框描边/圆角也被 page-mode 覆盖（#d8dfe8/10px vs 详情弹窗 #ddd/8px）。
   补 page-mode 作用域同款规则：标签 + 输入框 + 焦点态全部对齐详情弹窗。 */
html.page-mode[data-page="order"] .detail-production-box .detail-label {
  font-size: 13px; font-weight: 600; color: #0e9d92; margin-bottom: 6px;
}
html.page-mode[data-page="order"] .detail-production-box .detail-inline-item input {
  border: 1px solid #ddd; border-radius: 8px; background: #fff;
}
html.page-mode[data-page="order"] .detail-production-box .detail-inline-item input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

.detail-inline-item input,
.detail-inline-item select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.detail-inline-item input:focus,
.detail-inline-item select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

/* z1146（陶总 2026-11-19）：数量框下方小字提示 —— 款数>1 时显示「每款 500 本」。
   空着不占高度（:empty 隐藏），所以 1 款时布局与改动前完全一致。 */
.qty-sub-hint {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: #8a94a6;
}
.qty-sub-hint:empty { display: none; }

.detail-inline-item input:disabled,
.detail-inline-item select:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}

/* z584（陶总 2026-09-13）：登记页「客户名称 / 订单金额」在挂上订单后置灰。
   用 .field-locked 而不是 :disabled —— 因为这两个框仍是可提交、需读取值的
   （readOnly 不影响表单取值），只是不允许用户改。
   视觉上对齐 :disabled：浅灰底 + 灰字 + 禁用光标 + 去掉 hover/focus 高亮。 */
.detail-inline-item input.field-locked {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
  border-color: #e3e3e3;
}
.detail-inline-item input.field-locked:focus {
  border-color: #e3e3e3;
  box-shadow: none;
}
.detail-inline-item input.field-locked:hover {
  border-color: #e3e3e3;
}

.detail-form-row input,
.detail-form-row select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.detail-form-row input:focus,
.detail-form-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

.detail-form-row input:disabled,
.detail-form-row select:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}

/* ===== z1065（陶总 2026-11-13）：备注「三行大框」 =====
   登记页 #order-note 与订单详情 #detail-note 都换成 <textarea rows="3">，
   样式与同排 input 对齐（同样的边框/圆角/字号/焦点环），高度 = 3 行正文，
   允许纵向拖拽加高；行高 1.55 让中文多行不挤。 */
.detail-form-row textarea.note-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 78px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  /* z1079：字体栈回继承（撤销 z1075 的苹方优先）—— 与全站其它输入框一致 */
  font-family: inherit;
  /* z1068：行高取整像素。1.55em 在 14px 字号下 = 21.7px，非整像素在缩放/高分屏下
     每个字的基线取整方向不同，中文一行会显得高低不齐（陶总 2026-11-13 反馈"看起来歪"）；
     固定 22px 后基线稳定，多行也不会挤。 */
  line-height: 22px;
  color: inherit;
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}
.detail-form-row textarea.note-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}
.detail-form-row textarea.note-textarea:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}

/* Unify input & select: same height, custom select arrow */
.detail-inline-item input,
.detail-inline-item select,
.detail-form-row input,
.detail-form-row select,
.form-group input,
.form-group select,
.size-input-group input,
#order-product-fields input,
#order-product-fields select,
#detail-product-fields input,
#detail-product-fields select {
  height: 38px;
}

.detail-inline-item select,
.detail-form-row select,
.form-group select,
#order-product-fields select,
#detail-product-fields select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.detail-lost-info {
  font-size: 13px;
  color: #c62828;
  background: #fbe9e7;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.detail-production-box {
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.detail-production-box .detail-label {
  color: #0e9d92;
  font-weight: 600;
}

/* ---- Product-specific dynamic fields ---- */
#order-product-fields,
#detail-product-fields {
  margin-top: 4px;
  margin-bottom: 10px;
  padding: 14px 14px 6px;
  background: #f8f9fb;
  border-radius: 10px;
  border: 1px solid #eef1f5;
}

/* 3-column grid for product parameter fields → z1214（陶总 2026-11-22）：一行 4 个 */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 16px;
  margin-bottom: 14px;
}
.pf-grid .detail-inline-item {
  min-width: 0;
}
.pf-grid .craft-card {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* 彩澜：订单号列占1/2，数量/成本均分剩余1/2 */
.pf-grid-cailan {
  grid-template-columns: 2fr 1fr 1fr;
}

/* ===== z853（陶总 2026-10-29）：外发单（加工方≠绿都）参数区布局 ==================
   陶总原话：「三个输入框分别是尺寸、纸张（输入框）和数量，这行下面一行放订单号和成本（2个框占一行）」
   第一行：尺寸(长×宽) │ 纸张(自由文本) │ 数量 │ 成本   → 复用 pf-grid 的 4 列
   第二行：订单号（独占）
   z1236（陶总 2026-11-23）：成本从第二行挪到第一行末尾（一行4个框），订单号留在第二行、宽度不变。
   z960（陶总 2026-11-02）：订单号占两格宽、与上行逐列对齐。
   ⚠️ 必须用「等分 + 订单号跨2列」，不能用 2fr 1fr —— 2fr 方案整行只有 1 个列间距，
   比上行的 2 个间距少 16px，订单号框右缘会偏，跟上面的列对不齐（陶总实测揪出） */
.pf-grid-outsource-row2 {
  grid-template-columns: repeat(4, 1fr);
}
.pf-grid-outsource-row2 .detail-inline-item:first-child {
  grid-column: span 2;
}

/* z759（陶总 2026-10-09）：吨价/克重两框**合起来占一个标准格**（1/3 行），
   与「尺寸(长×宽)」同宽同风格；z758 的整行撑满口径作废 */
.pf-grid .paper-custom-row {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 0;
}

/* Size field: two equal-width inputs with separator */
.size-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.size-input-group input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.size-input-group input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}
.size-sep {
  flex-shrink: 0;
  color: #999;
  font-size: 14px;
}

/* Craft checkboxes: horizontal, no text wrapping */
.craft-card {
  background: var(--brand-pale);
  border: 1px solid #c5cee0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.craft-card .detail-label {
  margin-bottom: 6px;
}
.craft-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 2px;
}
.craft-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  color: #444;
  user-select: none;
}
.craft-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand);
}
.craft-item:focus,
.craft-item:focus-within,
.craft-item input[type="checkbox"]:focus,
.craft-item input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

/* z887（陶总 2026-10-31）：退回按钮柔化。
   原来是 #c62828 正红（边框+文字），在整片蓝色品牌视觉里很跳、跟旁边的青绿「详情」按钮打架。
   现降饱和度改成砖红 #b4544a —— 保留「退回 = 警示动作」的含义，但不再刺眼。
   ⚠️ 这个 class 同时用于「删除」「订单取消」，都是同类负面操作，一并柔化、视觉更统一。
   ⚠️ 草绿皮肤有 html.theme-grass 覆盖规则（#3d4a17 描边），优先级更高、不受影响。 */
.btn-lose-outline {
  background: #fff;
  color: #b4544a;
  border: 1px solid #b4544a;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-mini.btn-lose-outline {
  padding: 4px 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.btn-lose-outline:hover {
  background: #f8ece9;
}

.detail-status-won {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #0e9d92;
  background: linear-gradient(135deg, #e6f1f0 0%, #f3f7f7 100%);
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
}

.detail-status-lost {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #c62828;
  background: #fbe9e7;
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
}

.detail-status-active {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-pale);
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
}

/* =================== Manual cost tab - compact layout =================== */
.mc-section {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
}

.quote-tabs {
  margin-bottom: 10px;
}

.tab-content {
  margin-bottom: 8px;
}

.mc-paper-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.mc-paper-mode {
  margin-bottom: 0;
}

.mc-paper-result-inline {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-paper-value {
  font-size: 16px;
}

.mc-paper-detail {
  font-size: 11px;
}

.mc-grid-flat {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.mc-field-flat input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.mc-field-flat input:focus {
  border-color: var(--brand);
}

.mc-other-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* z1163（陶总 2026-11-20）：成本行回到 z1158 最初的一行多个 ——
   容器 flex 换行排布，每个条目 = 80px 成本小框 + ×（去掉 z1160 的整行行框） */
.mc-cost-rows-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 7px;
}

.mc-cost-row-inline {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* z1219e（陶总 2026-11-22）：成本框 80px→120px，与纸张行/工艺行/参数条全部输入框统一固定宽 */
.mc-cost-row-inline input {
  width: 120px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #333;
}

.mc-cost-row-inline input:focus {
  border-color: var(--brand);
}

.mc-cost-row-inline .mc-cost-del {
  background: none;
  border: none;
  color: #c3cddd;
  cursor: pointer;
  font-size: 17px;
  padding: 0;
  line-height: 1;
}

.mc-cost-row-inline .mc-cost-del:hover {
  color: #e24b4a;
}

/* z1160：添加按钮三模块统一成同款药丸（虚线主色边+浅底） */
.mc-add-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px dashed var(--brand, #4370fa);
  color: var(--brand);
  background: var(--brand-pale, #eef2fe);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mc-add-inline:hover {
  background: var(--brand-soft, #dbe4fd);
}

.mc-summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--brand-pale);
  border: 1px solid var(--brand-soft);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.mc-sum-item {
  color: #666;
}

.mc-sum-item span {
  font-weight: 600;
  color: #444;
  margin-left: 2px;
}

.mc-sum-sep {
  color: #ccc;
  /* z1219j（陶总 2026-11-22）：「纸张合计 ¥0」与「总重量」离太近 —— 分隔点两侧各加 10px 间距 */
  margin: 0 10px;
}

.mc-sum-total-label {
  color: #333;
  font-weight: 600;
}

.mc-sum-total-label span {
  font-size: 16px;
  font-weight: 700;
  color: #e24b4a;
  margin-left: 2px;
}

.mc-sum-spacer {
  flex: 1;
}

.mc-province-select {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* z502（陶总 2026-09-08）：手动成本面板 开票 下拉前的文字标签 */
.mc-province-label {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}

.mc-province-select:focus {
  border-color: var(--brand);
}

.mc-checkbox-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.mc-checkbox-inline input {
  cursor: pointer;
}

.btn-sm {
  padding: 5px 14px;
  font-size: 13px;
}

/* Inquiry requirement rows */
.inquiry-req-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.inquiry-req-row textarea,
.inquiry-req-row input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  min-width: 0;
  resize: vertical;
}

.inquiry-req-row .req-del {
  flex: 0 0 28px;
  height: 28px;
  margin-top: 0;
  border: none;
  background: #fee;
  color: #c33;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.inquiry-req-row .req-del:hover {
  background: #fcc;
}

/* =================== Dashboard =================== */
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.dash-metric-card {
  border-radius: 8px;
  padding: 12px 14px;
}

.dash-metric-green { background: linear-gradient(135deg, #ddeeed 0%, #eff5f5 100%); }
.dash-metric-blue { background: var(--brand-pale); }
.dash-metric-amber { background: #FAEEDA; }
.dash-metric-red { background: #FCEBEB; }

.dash-metric-label {
  font-size: 11px;
  color: #5F5E5A;
  margin-bottom: 4px;
}

.dash-metric-green .dash-metric-value { color: #03554f; }
.dash-metric-blue .dash-metric-value { color: var(--brand-strong); }
.dash-metric-amber .dash-metric-value { color: #633806; }
.dash-metric-red .dash-metric-value { color: #A32D2D; }

.dash-metric-value {
  font-size: 22px;
  font-weight: 500;
}

.dash-section {
  background: #F1EFE8;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.dash-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 12px;
}

.dash-section-count {
  font-size: 11px;
  font-weight: 400;
  color: #888;
  margin-left: 6px;
}

.dash-daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
}

.dash-daily-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.dash-daily-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

.dash-daily-today {
  position: absolute;
  bottom: -16px;
  font-size: 9px;
  color: #047970;
  font-weight: 500;
}

.dash-unpaid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dash-unpaid-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 400;
  color: #888;
  padding: 4px 8px;
  border-bottom: 0.5px solid #D3D1C7;
}

.dash-unpaid-table td {
  padding: 6px 8px;
  color: #444;
  border-bottom: 0.5px solid #E0DDD5;
}

.dash-unpaid-amount {
  font-weight: 500;
  color: #A32D2D;
}

.dash-empty {
  text-align: center;
  color: #999;
  padding: 16px !important;
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-two-col .dash-section {
  margin-bottom: 0;
}

.dash-ch-group-label {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  margin-bottom: 6px;
}

.dash-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.dash-ch-name {
  font-size: 12px;
  color: #444;
  width: 80px;
  flex-shrink: 0;
}

.dash-ch-bar-bg {
  flex: 1;
  height: 20px;
  background: var(--brand-pale);
  border-radius: 4px;
  overflow: hidden;
}

.dash-ch-bar-bg-offline {
  background: linear-gradient(135deg, #ddeeed 0%, #eff5f5 100%);
}

.dash-ch-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.dash-ch-amount {
  font-size: 12px;
  font-weight: 500;
  color: #444;
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.dash-ch-pct {
  font-size: 11px;
  color: #888;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.dash-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
}

.dash-trend-col {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.dash-trend-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 3px 3px 0 0;
}

.dash-trend-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

/* =================== Paid Toggle =================== */
.paid-toggle-wrap {
  display: flex;
  align-items: center;
  height: 40px;
}

.paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.paid-toggle input {
  display: none;
}

.paid-toggle-slider {
  width: 36px;
  height: 20px;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}

.paid-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.paid-toggle input:checked + .paid-toggle-slider {
  background: #047970;
}

.paid-toggle input:checked + .paid-toggle-slider::after {
  transform: translateX(16px);
}

.paid-toggle-label {
  font-size: 12px;
  color: #5F5E5A;
}

/* =================== Mobile Bottom Navigation =================== */

/* =================== Mobile Responsive =================== */
@media (max-width: 768px) {
  /* Body */
  body {
    font-size: 13px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Topbar - center logo only */
  .topbar {
    height: 48px;
    padding: 0 12px;
    justify-content: center;
  }
  .topbar-right {
    display: none;
  }
  .logo {
    font-size: 16px;
  }
  .logo-sub {
    display: none;
  }

  /* Bottom navigation bar */

  /* Main content */
  .main-content {
    flex-direction: column;
    padding: 8px;
    padding-bottom: 64px;
    gap: 8px;
  }

  /* Floating dashboard hidden on mobile */


  /* Kanban - horizontal scroll with snap */
  .kanban-section {
    overflow: visible;
  }
  .kanban-board {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .kanban-col {
    min-width: 260px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Section header */
  .section-header {
    margin-bottom: 8px;
  }
  .section-header h2 {
    font-size: 15px;
  }
  .filter-tab {
    font-size: 12px;
    padding: 3px 10px;
  }

  /* Order cards */
  .card-filename {
    font-size: 13px;   /* z892：移动端同步加大 */
  }
  .card-customer {
    font-size: 12px;
  }
  .card-amount {
    font-size: 14px;
  }

  /* Modals - full screen from bottom */
  .modal-overlay {
    align-items: flex-end;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh;
    border-radius: 16px 16px 0 0;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-large,
  .modal-wide,
  .modal-dashboard {
    width: 100% !important;
    max-width: 100% !important;
  }
  .modal-header {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-radius: 16px 16px 0 0;
  }
  .modal-header h2 {
    font-size: 16px;
  }
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    color: #333;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .modal-body {
    padding: 12px 16px 24px;
  }

  /* Forms - single column */
  .order-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .detail-inline-grid {
    flex-direction: column;
    gap: 10px;
  }
  .detail-inline-item {
    width: 100%;
  }
  .detail-inline-item input,
  .detail-inline-item select,
  .detail-form-row input,
  .detail-form-row select {
    height: 42px;
    font-size: 15px;
  }
  /* z585：窄屏「所属订单」框的高度由文件后段专门的 media query 处理，此处不再重复。 */
  /* Product fields: reduce padding on mobile */
  #order-product-fields,
  #detail-product-fields {
    padding: 10px 10px 2px;
  }
  /* 3-col grid becomes 1-col on mobile */
  .pf-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }
  /* Size inputs stay side by side even on mobile */
  .size-input-group input {
    padding: 10px 12px;
    font-size: 15px;
    height: 42px;
  }
  /* Craft checkboxes: tighter on mobile */
  .craft-grid {
    gap: 8px 14px;
  }
  .form-group input,
  .form-group select {
    padding: 10px 12px;
    font-size: 15px;
    height: 42px;
  }

  /* Quote textarea */
  .quote-textarea {
    font-size: 14px;
    padding: 12px;
  }

  /* Quote tabs */
  .quote-tab {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Manual cost grid - 2 columns */
  .mc-grid-flat {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mc-field-flat input {
    padding: 8px 10px;
    font-size: 14px;
  }

  /* Manual cost paper bar */
  .mc-paper-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mc-paper-mode {
    flex-wrap: wrap;
    gap: 10px;
  }
  .mc-paper-result-inline {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  /* Other cost bar */
  .mc-other-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .mc-cost-rows-inline {
    display: block;
  }
  .mc-cost-row-inline input {
    width: 100%;
    text-align: left;
  }

  /* Summary bar - wrap */
  .mc-summary-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .mc-sum-spacer {
    display: none;
  }

  /* Search bar（z553 重写 → z576 统一）：
     z576（陶总 2026-09-13）陶总要求窄屏下三页工具条统一成「客户信息页那样」——
     即搜索框与计数、按钮同排单行（三页实测工具条高 39px、top 120px 完全一致）。
     原 z553 把搜索框撑成 flex:1 1 100%（工具条变两行 83px）、而客户页没有这条（单行），
     两页差 44px —— 现删除撑宽规则，三页统一走 .inquiry-search-bar 的默认单行布局。
     ⚠️ 尾部定宽（计数 88px / 按钮 97px）**窄屏同样保留**，三页才能在手机上也逐像素对齐。
        实测最窄 414px 下搜索框仍有 200px+，不影响输入；
        若今后改窄到搜索框不够用，再考虑在更小断点单独放开。
     ⚠️ 不要在这里给计数加 margin-left:auto —— 实测会让三页右边缘分叉。 */

  /* Tables - horizontal scroll */
  .inquiry-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none;
  }
  .inquiry-table {
    min-width: 1280px;
  }
  /* z1219k（陶总 2026-11-22）：对账页移动端列宽按订单记录表/客户档案表同口径 ——
     .grp-table 全局 `min-width:0`（桌面端跟随容器宽）把 .inquiry-table 的 1280 最小宽盖掉了，
     手机上表格被压到屏宽、列全部挤扁；这里恢复 1280 最小宽 + 容器横滚（上方 .inquiry-table-wrap
     的 overflow-x:auto 同断点已生效），桌面端仍走 grp-table 自身的 min-width:0 不受影响。 */
  table.inquiry-table.grp-table {
    min-width: 1280px;
  }

  /* List tabs - scrollable */
  .list-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .list-tab {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Quote result */
  .qr-total-main {
    font-size: 24px;
  }

  /* Detail price box */
  .detail-price-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .dp-total {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  /* Quote summary grid */
  .quote-summary-grid {
    gap: 6px 12px;
  }

  /* Dashboard */
  .dash-metrics {
    grid-template-columns: 1fr;
  }
  .dash-two-col {
    grid-template-columns: 1fr;
  }
  .dash-metric-value {
    font-size: 18px;
  }

  /* Customer suggestions - full width */
  .customer-suggestions {
    min-width: 100%;
    max-width: 100%;
  }

  /* Card actions */
  .card-actions {
    gap: 4px;
  }
  .btn-mini {
    font-size: 11px;
    padding: 4px 0;
  }

  /* Detail actions */
  .detail-actions {
    flex-wrap: wrap;
  }

  /* Full-width buttons */
  .btn-full {
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Quote actions */
  .quote-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  .quote-actions .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 15px;
    margin-left: 0 !important;
  }

  /* Smart fill button */
  .smart-fill-btn {
    width: 100%;
    text-align: center;
    padding: 8px;
  }

  /* PWA install hint */
  .pwa-install-hint {
    display: none;
  }

}

/* PWA standalone mode - no browser chrome */
@media (display-mode: standalone) {
  .topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* =================== 操作时间线 =================== */
.detail-timeline {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 8px;
}
.detail-timeline > .detail-label {
  margin-bottom: 10px;
  color: #888;
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
.timeline-label {
  font-size: 13px;
  color: #333;
  min-width: 70px;
}
.timeline-operator {
  font-size: 12px;
  color: #666;
  min-width: 60px;
}
.timeline-dash {
  flex: 1;
  border-top: 1px dashed #d0d4d9;
  height: 1px;
}
.timeline-time {
  font-size: 12px;
  color: #999;
}

/* 提交人列样式 */
.td-submitter {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

/* =================== 员工管理 =================== */
.emp-role-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--brand-pale);
  color: var(--brand);
  margin-right: 4px;
}
.btn-sm-delete {
  padding: 4px 12px;
  border: 1px solid #e74c3c;
  background: #fff;
  color: #e74c3c;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.btn-sm-delete:hover {
  background: #e74c3c;
  color: #fff;
}
/* z925（陶总 2026-11-01）：员工管理操作列「改密」按钮 —— 与删除同一套小按钮尺寸，
   用品牌主色描边（区分"可改"与"危险删除"），间距 6px */
.btn-sm-pwd {
  padding: 4px 12px;
  border: 1px solid var(--brand, #4370fa);
  background: #fff;
  color: var(--brand, #4370fa);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  margin-right: 6px;
}
.btn-sm-pwd:hover { background: var(--brand, #4370fa); color: #fff; }

/* 改密小弹窗 */
.emp-pwd-tip {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}
.emp-pwd-tip b { color: #1f2a4d; font-weight: 600; }
.emp-pwd-field {
  display: block;
  margin-bottom: 12px;
}
.emp-pwd-field span {
  display: block;
  font-size: 12px;
  color: #8a97ab;
  font-weight: 600;
  margin-bottom: 5px;
}
.emp-pwd-field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.emp-pwd-field input:focus { border-color: var(--brand, #4370fa); }
.emp-pwd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
#employee-tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
}
/* z926：操作列内容（改密+删除）永远不换行 —— 列宽记忆残留导致列窄时按钮曾堆成两行 */
#employee-tbody td:last-child { white-space: nowrap; }
#employee-tbody tr:hover td {
  background: #fafafa;
}

/* =================== AI 报价样式 =================== */

/* ===== 彩澜订单信息抓取展示 ===== */
.cailan-status { margin-top: 6px; }
.cailan-info-box {
  border: 1px solid #cbe9e6;
  background: linear-gradient(135deg, #eaf3f2 0%, #f7fafa 100%);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.8;
}
.cailan-info-box .cailan-row { display: flex; gap: 10px; }
.cailan-info-box .cailan-row span { color: #777; flex: 0 0 64px; }
.cailan-info-box .cailan-row b { color: #046f67; font-weight: 500; }
.cailan-info-box .cailan-fetched-at { color: #aaa; font-size: 11px; margin-top: 2px; }
.cailan-info-box.cailan-loading { color: #888; background: #fafafa; border-color: #e5e5e5; }
.cailan-info-box.cailan-error { color: #c0392b; background: #fdf5f4; border-color: #f0d6d2; }

/* 信纸彩澜印订单号卡片（z157） */
.cailan-letter-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cbe9e6; }

/* z784（陶总 2026-10-20）：z753 的「数量框只能手工填」特殊样式（浅黄底+琥珀边框+琥珀占位文字）
   已整段删除 —— 陶总要求「不要做成这种特殊的显示」，数量框一律用普通外观。
   「不自动带数量」的逻辑仍在 app.js updateCailanAutoQty 里，只是不再有视觉区别。 */

/* 彩澜多订单号（z156） */
.btn-add-cailan-no {
  margin-top: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: #046f67;
  background: #edf4f4;
  border: 1px dashed #62e1d8;
  border-radius: 5px;
  cursor: pointer;
}
.btn-add-cailan-no:hover { background: #d9eceb; }
.cailan-extra-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d5ebea; }
.cailan-no-group { display: flex; gap: 6px; align-items: center; }
.cailan-no-group input { flex: 1; min-width: 0; }
.btn-del-cailan-no {
  flex: 0 0 26px;
  height: 26px;
  line-height: 1;
  font-size: 15px;
  color: #c0392b;
  background: #fdf5f4;
  border: 1px solid #f0d6d2;
  border-radius: 5px;
  cursor: pointer;
}
.btn-del-cailan-no:hover { background: #f8e3e0; }

/* =================== Excel式列头筛选（订单表+客户表） =================== */
.th-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 2px;
  border-radius: 4px;
  cursor: pointer;
  color: #999;
  opacity: .5;
  vertical-align: middle;
  transition: all .15s;
}
.th-filter-btn:hover { opacity: 1; background: rgba(32, 77, 243,.14); color: var(--brand); }
.th-filter-btn.active { opacity: 1; color: var(--brand); background: rgba(32, 77, 243,.14); }

.colf-menu {
  position: fixed;
  z-index: 10001;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #333;
}
.colf-search { padding: 8px 8px 0; }
.colf-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.colf-search input:focus { border-color: var(--brand); }
.colf-actions { display: flex; gap: 14px; padding: 6px 10px 2px; }
.colf-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.colf-link:hover { text-decoration: underline; }
.colf-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 6px;
  margin-top: 2px;
}
.colf-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.colf-item:hover { background: #f5f7fa; }
.colf-item input { flex-shrink: 0; cursor: pointer; }
.colf-item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; max-width: 168px; }
.colf-item-count { color: #aaa; font-size: 12px; flex-shrink: 0; }
/* z747（陶总 2026-10-08）：毛利率筛选面板打开时后台批量算成本，这条显示进度 */
.colf-progress { padding: 6px 12px 2px; font-size: 12px; color: var(--brand); }
/* z718（陶总 2026-09-27）：日期列筛选「月 → 日」两级面板 */
.colf-month-row { font-weight: 600; }
.colf-tw {
  width: 13px;
  flex: none;
  font-size: 9px;
  color: #98a2b3;
  text-align: center;
  cursor: pointer;
  transition: transform .15s;
  user-select: none;
}
.colf-month.open .colf-tw { transform: rotate(90deg); }
.colf-month:not(.open) .colf-days { display: none; }
.colf-days { margin-left: 17px; }
.colf-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #eee;
}

/* ===== 看板列分页翻页条（z179，替代长条"查看更多"按钮）===== */
.board-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 4px;
  padding: 2px;
  background: #f4f6fa;
  border-radius: 999px;
  user-select: none;
}
.board-pager .pg-btn {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #4a6fa5;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.board-pager .pg-btn:hover:not(:disabled) { background: var(--brand-soft); }
.board-pager .pg-btn:disabled { color: #c3cad6; cursor: default; }
.board-pager .pg-info {
  padding: 0 8px;
  color: #7a8699;
  font-size: 12px;
  white-space: nowrap;
}

/* ===== 统一浅色提示文字（z189，客户端同色）===== */
input::placeholder, textarea::placeholder { color: #a8b2be; opacity: 1; }
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #a8b2be; opacity: 1; }
input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #a8b2be; }

/* ===== z215 详情弹窗点击空白自动保存 ===== */
#detail-save-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #2f4156;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 10000;
}
#detail-save-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.autosave-hint {
  color: #a8b2be;
  font-size: 12px;
  margin-left: auto;
  white-space: nowrap;
}

/* ===== z373 报价卡视觉层级：成本行强化、快递比价弱化、信息分层（陶总 2026-09-03）===== */
/* 行1 成本核算段：深色加粗，与下方比价/快递的浅灰拉开层级 */
.qr-mini.qr-cost {
  color: #333;
  font-weight: 600;
}
/* z1256（陶总 2026-11-24）：去掉行1 与下方明细框之间的虚线 —— 下面已有 .qr-detail-box 灰框
   起分隔作用，虚线多余；同时归零 padding/margin，上下间距统一交给 .qr-compact 的 gap 8px，
   明细框距上/距下等高。 */
.qr-total-line {
  padding-bottom: 0;
  margin-bottom: 0;
}
/* z1255（陶总 2026-11-23，方案 A 两行式）：成本明细行 —— 主行只放「成本 ¥x = 原材料 ¥a + 工艺 ¥b」，
   逐项明细（纸张/垫板/双面/双色…）另起一行小字灰字，原材料/工艺两组用「｜」隔开、项间用「·」。
   跟随主行同宽自然换行，不再挤在括号里。 */
.qr-total-line .qr-cost-detail {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
  line-height: 1.7;
  word-break: break-all;
}
/* 行3 客户文案框文字加深：报价正文是重点，保证可读 */
.qr-detail-box {
  color: #555;
}
/* 快递比价：小字但必须可读
   z470（陶总 2026-09-07）：此前为"弱化存在感"整行压到 #bbb（白底对比度≈1.9:1，肉眼几乎看不见），
   选中项也从深绿 #0e9d92 降到淡绿 #92c4c1 → 用户反馈"快递比价都没了"。
   现恢复可读配色（标签 #888 / 普通 #555 / 最低价 #0e9d92 加粗），字号保持 12px 不喧宾夺主。 */
.qr-delivery-line.qr-shipping {
  font-size: 12px;
}
/* z1261（陶总 2026-11-24）：「快递比价：」标签字体/字号/粗细与「封面比价：」（.qr-comp-label
   13px/600/#555）统一 —— 原先 12px/#888/不加粗，两行标签对不齐。选项字号仍 12px 不变。 */
.qr-delivery-line.qr-shipping .qr-delivery-label {
  color: #555;
  font-size: 13px;
  font-weight: 600;
}
.qr-delivery-line.qr-shipping .qr-delivery-opt {
  color: #555;
}
.qr-delivery-line.qr-shipping .qr-delivery-opt.cheapest {
  color: #0e9d92;
  font-weight: 600;
}
/* 行1 重量/快递公司等元数据：比成本主体再弱一档，避免行1 拥挤费劲（z374） */
.qr-mini.qr-meta {
  font-size: 11px;
  color: #999;
}

/* =================== z384 按产品选型 结构化报价（z391 内容左移贴左框） =================== */
.fq-header { font-size: 13px; color: #666; margin-bottom: 8px; padding: 5px 10px; background: #f5f7fa; border-radius: 6px; }
.fq-cat-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fq-cat-btn { padding: 5px 12px; border: 1px solid #d9d9d9; background: #fff; border-radius: 5px; cursor: pointer; font-size: 13px; color: #333; line-height: 1.4; }
.fq-cat-btn:hover { border-color: var(--brand); color: var(--brand); }
.fq-cat-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
/* z427：报价表单一行 3 个输入框（原 2 列），工艺多选独占整行——像订单登记那样紧凑。
   grid-auto-flow:row dense 让末尾单字段（如 province）回填工艺整行前留下的空缺，避免散尾孤行。
   z1214（陶总 2026-11-22）：一行 3 个 → 一行 4 个。 */
.fq-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; column-gap: 20px; row-gap: 9px; padding: 14px 22px 14px 6px; background: #fafbfc; border: 1px solid #eee; border-radius: 8px; }
.fq-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* 工艺(multicheck)字段独占整行——选项多需整行宽度排布。
   z430：工艺行上下留白加大(row-gap 之外再叠 margin)，让工艺作为独立区块更醒目、与普通输入行分清。 */
.fq-field-wide { grid-column: 1 / -1; margin: 7px 0; }
/* z493（陶总）：字段 note 提示行——独占整行的浅灰小字（如彩页纸张的"同纸异名"说明）。
   z497a（陶总 2026-09-08，报价页排版意见）：①小字左缘对齐到上方**最左列字段标签的首字**
   （"成"品尺寸 / "收"货省份 等 4 字标签首字）——标签盒起点=外框padding 6px，标签 84px 右对齐，
   4 字(约52px)首字距盒起点≈32px → 故 note-row 左缩进 32px，使小字首字与该竖线对齐；
   ②与上方(工艺)之间加一根细分隔线（border-top，横跨整行、外框内左右居中）；
   ③下方空间收小(下边距收紧)。注：工艺行自带 margin:7px 0，行间有 grid row-gap 9px，
   分隔线落在工艺与提示之间的空档里，作为章节分隔。 */
.fq-note-row { margin: 10px 0 0; padding: 6px 0 2px 32px; border-top: 1px solid #e6e9ee; }
.fq-note { font-size: 10px; color: #9a9a9a; line-height: 1.5; }
/* 标签定宽右对齐（z390：陶总明确"文字右对齐+框框等宽"）：label 右缘对齐 → 各控件左缘整齐；
   label 定宽需容纳最长标签（如"每本张数"），不足自动缩略 */
.fq-label { font-size: 13px; color: #555; white-space: nowrap; flex: 0 0 84px; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.fq-req { color: #f56c6c; font-style: normal; margin-left: 2px; }
/* 控件统一：弹性占满剩余、等高同边框，视觉一致 */
.fq-input { height: 38px; border: 1px solid #dcdfe6; border-radius: 5px; padding: 0 8px; font-size: 13px; box-sizing: border-box; flex: 1 1 auto; min-width: 0; width: auto; }
.fq-input:focus { outline: none; border-color: var(--brand); }
/* select 在 flex 下避免按最长选项撑开：允许收缩到列宽 */
.fq-field > select.fq-input { max-width: 100%; }
.fq-ctrl select.fq-input { max-width: 100%; }
/* 尺寸自定义：下拉与输入框共用一个槽位，切换显示（都占满同宽） */
.fq-ctrl { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.fq-ctrl > .fq-input { width: 100%; }
.fq-hide { display: none !important; }
/* 工艺多选：复选框组紧凑排布，与其它控件等高对齐。
   z425：改为允许换行(wrap)——联单工艺 7 个选项在 2 列 grid 半列内 nowrap 必溢出边界
   （chip 文字 nowrap 无法折行，超宽项被挤出卡外/孤立断行）。wrap 后放不下的项整齐换行，绝不出界。 */
.fq-ck-group { display: flex; align-items: center; gap: 10px 12px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.fq-ck { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #444; white-space: nowrap; cursor: pointer; }
.fq-ck { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #444; white-space: nowrap; cursor: pointer; }
.fq-ckbox { width: 15px !important; height: 15px !important; margin: 0; flex: none !important; accent-color: var(--brand); cursor: pointer; }
/* z406：工艺复选框置灰（薄纸不能压痕等） */
.fq-ck .fq-ckbox:disabled { opacity: .35; cursor: not-allowed; }
.fq-ck.disabled-ck { color: #b6bcc4; cursor: not-allowed; }
.fq-actions { margin-top: 10px; display: flex; }

/* =================== z395 纸张吨价弹窗：宽表 + 可拖列宽 =================== */
#paper-price-table { table-layout: auto; }   /* z708：fixed → auto（见 style.css 顶部 z708 段） */
#paper-price-table thead th { position: relative; overflow: hidden; }


/* ============ z444c 快速报价弹窗(产品报价/多款报价)移动端适配 ============
   独立 @media 置于文件最末，确保层叠覆盖主 fq 3 列布局(主定义在本块之前)。
   根因(2026-09-05 陶总无痕窗口仍见 3 列): 旧版适配块写在主 .fq-form{repeat(3)} 之前,
   同特异性下后出现的主定义把适配盖回 3 列。 */
@media (max-width: 768px) {
  /* 分类按钮：单行横向滑动 */
  .fq-cat-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .fq-cat-bar::-webkit-scrollbar { display: none; }
  .fq-cat-btn { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
  /* 表单两列紧凑；字段纵向 label 上控件下 */
  /* z597（陶总 2026-09-13）：手机上由"一行 2 个"改为**一行 1 个**。
     原因：纸张等下拉框选项文字长，两列并排时每列只有约 45% 宽，下拉被压窄、选项读不全；
     字段纵向排开后控件拿到整行宽度，下拉也就能做宽了。
     ⚠️ 这里同时加 column-gap:0 —— 单列下再留列间距只是白占宽度。 */
  /* z693（陶总 2026-09-19）：移动端改回**字段在左、输入框在右**（原 z597 纵向 label 上/控件下），
     行高随输入框从 42px 降到 38px，一屏能看到更多内容。单列布局保留（z597 的下拉读全宽诉求
     仍成立——单列下控件 flex:1 吃掉 label 之外的整行）。 */
  .fq-form { grid-template-columns: 1fr !important; row-gap: 8px; column-gap: 0; padding: 12px; }
  .fq-field { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
  .fq-field-wide { grid-column: 1 / -1; margin: 2px 0; }
  .fq-label { flex: 0 0 72px !important; width: auto; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #777; }
  .fq-input { width: 100%; flex: 1 1 auto; height: 38px; font-size: 14px; padding: 0 8px; box-sizing: border-box; }
  .fq-field select.fq-input, .fq-ctrl select.fq-input { max-width: 100%; }
  .fq-ctrl { flex: 1 1 auto; width: auto; flex-direction: row; align-items: center; gap: 4px; min-width: 0; }
  .fq-ctrl > .fq-input { width: 100%; }
  /* z662（陶总 2026-09-18）：报价页长边×短边双输入 —— 恒横向排列（覆盖上方移动端 .fq-ctrl 的 column），
     两个输入框各占一半，中间 × 分隔；输入框高度沿用移动端 .fq-input 的 36px。 */
  .fq-ctrl.size-input-group { flex-direction: row; align-items: center; gap: 6px; }
  .fq-ctrl.size-input-group > .fq-input { flex: 1; min-width: 0; width: auto; }
  .fq-ctrl.size-input-group .size-sep { flex: none; color: #999; font-size: 13px; }
  /* z694（陶总 2026-09-19）：z693 改「标签在左」后工艺复选框组跟着适配。
     原值 flex:none + width:100% 是纵向布局（label 在上）的占满写法；横向行下 label(72px)+gap 与
     width:100% 相加超宽，而 flex:none 不允许收缩 → 组盒子整体溢出卡片右边框（"撕线"被截断）。
     改回弹性收缩：flex:1 1 auto + min-width:0，组宽 = 卡片内容宽 - label - gap，wrap 正常换行。 */
  .fq-ck-group { flex: 1 1 auto; width: auto; min-width: 0; flex-wrap: wrap; gap: 6px 10px; }
  .fq-ck { font-size: 13px; padding: 4px 0; }
  /* z693：label 移到左侧后，提示行缩进 80px（72px label + 8px 间距），与输入框左缘对齐 */
  .fq-note-row { padding-left: 80px; margin-top: 6px; }
  /* 产品报价 计算/清空通栏 */
  .fq-actions { flex-direction: column; gap: 8px; margin-top: 12px; }
  .fq-actions .btn { width: 100%; padding: 12px; font-size: 15px; margin-left: 0 !important; }
  /* 结果区 复制/转入订单 通栏与计算/清空保持一致 */
  .quote-actions { flex-direction: column; gap: 8px; margin-top: 12px; }
  .quote-actions .btn { width: 100%; padding: 12px; font-size: 15px; margin-left: 0 !important; text-align: center; }
  /* 手动成本字段更高 */
  .mc-field-flat input { height: 38px; font-size: 14px; }   /* z693：与 .fq-input 统一 38px */
}


/* ============ z444e 报价表单自绘下拉(替代 iOS/安卓系统 select 大面板) ============
   陶总 z444d 反馈: select 点开是系统原生半屏面板, CSS 控制不了字号 → 改自绘底部滑出面板。
   原生 <select class="fq-input"> 保留在 .csx 内(绝对定位透明、pointer-events:none), 值/DOM/data-fk 不变,
   原有全部 change 联动(saveQuoteDraft/wireCraftByPaper/wireFieldLinks/wireAlbumClassFilter)照常。
   视觉由 .csx-box 承担; 点开弹出 .csx-panel 底部滑出, 14px 字紧凑。 */
.csx { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.csx > select.csx-native { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; font-size: 14px; -webkit-appearance: none; appearance: none; }
.csx.fq-hide { display: none !important; }
.csx-box { box-sizing: border-box; display: flex; align-items: center; width: 100%; height: 38px; padding: 0 10px; border: 1px solid #dcdfe6; border-radius: 5px; background: #fff; cursor: pointer; user-select: none; -webkit-user-select: none; }
.csx-box:active { background: #f5f7fa; }
.csx-box.disabled { background: #f5f7fa; cursor: not-allowed; opacity: .7; }
.csx-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #333; text-align: left; }
.csx-val.ph { color: #aaa; }
.csx-arrow { flex: 0 0 auto; width: 0; height: 0; margin-left: 8px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #909399; }

/* 底部滑出面板
   🔴 z599（陶总 2026-09-13）：.csx-panel 的 position 由 absolute 改为 **fixed**。
     原因：csxOpen() 用 box.getBoundingClientRect() 算 left/top —— 那是**视口坐标**；
     而 position:absolute 相对的是**文档原点**。两者混用 → 页面只要滚动过，面板就整体向下
     偏移 scrollY 像素、甚至完全跑出屏幕（表现同样是"点了没反应"）。
     改 fixed 后与 getBoundingClientRect 同一坐标系，不管滚动多少都贴合触发框。 */
.csx-overlay { position: fixed; inset: 0; background: transparent; z-index: 9900; border: 0; }
.csx-panel { position: fixed; z-index: 9901; background: #fff; border: 1px solid #dcdfe6; border-radius: 5px; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; flex-direction: column; max-height: 240px; min-width: 140px; font-family: inherit; overflow: hidden; }
.csx-list { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.csx-grp { padding: 6px 12px 4px; font-size: 12px; color: #999; background: #fafbfc; }
.csx-opt { padding: 8px 14px; font-size: 14px; color: #333; cursor: pointer; line-height: 1.4; border: 0; background: none; text-align: left; width: 100%; font-family: inherit; }
.csx-opt:active { background: var(--brand-pale); }
.csx-opt.sel { color: var(--brand); font-weight: 600; background: var(--brand-pale); }

/* ===== z481（陶总 2026-09-07）：快递比价分隔符 =====
   "快递比价："后不留空格，各家之间用浅灰竖线 | 分隔。 */
.qr-delivery-line { gap: 0; }
.qr-delivery-sep { color: #ccc; margin: 0 5px; font-size: 12px; }

/* =================== z533：工作台功能独立页面（?p=quote|order|orders|customers） =================== */
/* 陶总 2026-09-10：快速报价 / 登记订单 / 订单记录 / 客户信息 不再以遮罩弹窗呈现，
   改成像 客户端(customer.html)、制作报价单(docs.html) 那样的独立整页。
   实现：index.html 头部内联脚本读 ?p= 给 <html> 打 .page-mode；app.js 给当前功能容器加
   .page-active 后，本段 CSS 把"居中浮层"还原为"通栏整页"（DOM/ID 全复用，零复制粘贴）。 */

/* 顶部功能页签：仅页面模式显示 */
.page-nav { display: none; }
html.page-mode .page-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--brand-pale);
  border: 1px solid #e3e8ef;
  border-radius: 20px;
}
.page-nav-item {
  font-size: 13px;
  color: #4a5668;
  text-decoration: none;
  padding: 5px 13px;
  border-radius: 16px;
  white-space: nowrap;
  transition: all .15s;
}
.page-nav-item:hover { background: var(--brand-pale); color: var(--brand); }
.page-nav-item.active { background: var(--brand); color: #fff; }

/* 页面模式下：隐藏工作台自身的按钮区 / 看板 */
html.page-mode .topbar-acts { display: none !important; }
html.page-mode .main-content { display: none; }
/* z857：业绩浮层已整体删除 → 原来这条「隐藏浮层」的规则也一并删掉 */
/* ⚠️ #app 默认 min-height:100vh（看板要撑满屏）——页面模式下必须归零，
   否则 56px 顶栏 + 100vh 空容器会把整页内容顶到首屏之外（z533 踩过：截图一片空白）。 */
html.page-mode #app { min-height: 0; }
/* z857：顶栏已整体删除 → 功能页正文不用再让位（padding-top 归零） */
html.page-mode body { padding-top: 0; }
html.page-mode .topbar { position: fixed; top: 0; left: 0; right: 0; }

/* z551（陶总 2026-09-11 16:14）：顶栏内容**贴边**（logo 左上角、角色区右上角），全站统一。
   ⚠️ 推翻 z550：z550 反向做成了"居中留白与正文卡片对齐"，陶总明确纠正
   "改错了，我要顶上布局按这个改"（指登记订单页截图：logo 贴左上角、右上角角色胶囊贴右）。
   所以基准版＝**登记订单页那版（贴边 24px）**，而不是快速报价页那版（居中留白）。
   落地＝删掉 z545 遗留的报价页专属居中留白规则，让所有页面模式回到基础 .topbar 的 padding:0 24px。
   （此处不再写任何 padding 覆盖，保持"只有基础 .topbar 一条规则"这个单一来源。） */

/* 手机端（≤768px）：顶栏只剩居中的 logo（.topbar-right 整块隐藏，见上方移动端段），
   基础 .topbar 的 padding:0 12px 已足够，无需额外覆盖。 */

/* 当前功能容器：从"居中浮层"变"通栏整页" */
html.page-mode .modal-overlay.page-active {
  position: static !important;
  display: block !important;
  z-index: auto !important;
  background: none !important;
  padding: 0 !important;
  align-items: stretch !important;
}
html.page-mode .modal-overlay.page-active .modal {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: calc(100vh - 56px);   /* 内容比屏幕短时也铺满，避免下方露出灰底白块被"截断"的观感 */
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
/* 页头：吸顶在工作台顶栏下方；返回按钮在最左，标题紧随其后 */
html.page-mode .modal-overlay.page-active .modal-header {
  position: sticky;
  top: 56px;
  z-index: 90;
  justify-content: flex-start;
  gap: 0;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #ececec;
}
html.page-mode .modal-overlay.page-active .modal-header > div:last-child { margin-left: auto; }
html.page-mode .modal-overlay.page-active .modal-header h2 { font-size: 17px; }

/* 🔴🔴 z781c（陶总 2026-10-24）：**页面模式统一隐藏页头** —— 通用规则，新页面零配置自动生效。
   陶总原话："以后有新加功能或页面，都用同一个头，不要又做成之前那个头了。
               每次新加功能你都做那个头，我叫你改了，你下次还是做那个头。"

   为什么必须提到通用层（而不是继续逐页写 CSS）：
   以前 6 个功能页各自一条 CSS 隐藏页头（style.css:4996/5179/5317/6415），
   **新页面不写就漏** → z780 报价练习就是这样多出一行（z781b 返工），陶总已批评两轮。
   靠"记得加一条 CSS"的约定必然反复漏 → 改成默认行为，登记即生效。

   口径与 z552/z575c/z649 一致：顶部功能页签已高亮当前页，
   页头那行「← 返回工作台 + 页名」纯属重复 → 隐藏；返回工作台走左上角 logo / 顶部页签。

   .page-hide-header 由 openCurrentPage() 打（见 app.js z781c），PAGE_META.showPageHeader===true 可豁免。
   ⚠️ 本条放在所有 data-page 专属规则之前 → 专属规则仍可覆盖（向后兼容，6 个老页面行为不变）。 */
html.page-mode .modal-overlay.page-active.page-hide-header .modal-header {
  display: none !important;
}
/* 弹窗专属控件在页面模式下无意义 */
html.page-mode .modal-overlay.page-active .modal-close,
html.page-mode .modal-overlay.page-active .modal-maximize { display: none !important; }
html.page-mode .modal-overlay.page-active .modal-body { padding: 18px 24px 56px; }

.page-back-btn {
  background: none;
  border: 1px solid #d7dee8;
  color: #4a5668;
  font-size: 13px;
  padding: 5px 13px;
  border-radius: 16px;
  cursor: pointer;
  margin-right: 12px;
  white-space: nowrap;
  transition: all .15s;
}
.page-back-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

/* ===== z534（陶总 2026-09-10）：列表页（订单记录 / 客户信息）的框线拉到屏幕最底 =====
   现象：?p=orders|customers 时功能页只有 min-height，表格容器恒有上限
         （.inquiry-table-wrap 480px、.cust-table-wrap calc(80vh-160px)），
         数据不满一屏时框线停在半空、下方露出一大片白底（陶总："下方的框线拉到最底下，适配屏幕高度"）。
   做法：这两个页改成"整屏高 + 内部滚动"——.modal 定高 flex 纵向，.modal-body 撑满剩余高度，
         表格容器 flex:1 吃掉余量（框线随之外扩到底），滚动交给表格容器自身。
   注意：只动这两个列表页；报价/登记订单是长表单，保持原有"整页滚动"方式不变。
   z575c（陶总 2026-09-13）：**订单对账页（groups）纳入同一套** —— 陶总："这类页面的布局都应该按统一一个格式来"。 */
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal,
html.page-mode[data-page="groups"] .modal-overlay.page-active .modal {
  height: calc(100vh - 56px) !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="groups"] .modal-overlay.page-active .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}
html.page-mode[data-page="orders"] .modal-overlay.page-active .inquiry-table-wrap,
html.page-mode[data-page="customers"] .modal-overlay.page-active .inquiry-table-wrap,
html.page-mode[data-page="groups"] .modal-overlay.page-active .inquiry-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
}

/* ===== z536（陶总 2026-09-11）：列表页页头不再吸顶 =====
   现象（陶总截图两处红框）：订单记录 / 客户信息页的最上方多出一条空白带，下方还挤着两条分隔线；
   客户信息页的搜索框更是被"吃掉"看不见。
   根因：z533 给页面模式的页头设了 `position:sticky; top:56px`（本意是整页滚动时吸顶）。但 z534/z535
   把这两页改成了"固定整屏高 + 内部滚动"（.modal 带 overflow:hidden），sticky 的参照系变成这个不可滚动的
   .modal 容器 → 页头被强制下移 56px（改从 112 起），正好盖住标签栏 .list-tabs / 客户页工具条，
   只露出 active 标签那一点点蓝色下划线（＝陶总说的"两条分隔线"）。
   修法：这两页的页头改回静态定位——它们本来就是固定整屏高、内部滚动，不需要吸顶。
   ⚠️ 报价 / 登记订单两页是长表单（整页滚动）仍保留 sticky 吸顶，不要一起改。 */
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-header,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-header {
  position: static;
}

/* z552（陶总 2026-09-11 16:39）：订单记录页 + 客户信息页的**页头那一条去掉**。
   陶总："红框这个地方多余了，去掉"（圈的是订单记录页里「← 返回工作台　订单记录」那一整行）。
   理由：顶部功能页签已经高亮显示当前页（订单记录/客户信息），再顶一行"返回工作台 + 页名"
   纯属重复；快速报价页与登记订单页早就隐藏了这一行（见下方两条 data-page 专属规则），
   这两页属于漏网。
   ⚠️ 与 z536 的区别：z536 只是把这两页的页头 `position:static`（它被 sticky 顶下去盖住了标签栏），
   页头本身仍然**占一行高度**；z552 是直接把整行 display:none。
   好处：这两页是 z534 的"整屏高 flex 布局"（.modal 定高 100vh-56px、内部滚动），
   去掉页头后 flex 会把这份高度自动让给 `.modal-body` → 表格可视区自然变高一行，无需另调尺寸。
   注：只隐藏**页面模式下**的页头；工作台里点开的浮层弹窗（无 .page-mode）页头照旧保留，
   否则会没法关闭。手机端靠底部导航切换，也不依赖这一行。

   z575c（陶总 2026-09-13）：**订单对账页（groups）补上** —— 陶总截图圈出「← 返回工作台　订单对账」
   那一行，要求"跟订单记录表和客户信息表一样"。同 z534 一并纳入"列表页统一格式"。 */
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-header,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-header,
html.page-mode[data-page="groups"] .modal-overlay.page-active .modal-header {
  display: none;
}

/* 移动端：顶部按钮区本就隐藏(.topbar-right)，靠底部导航切换 + 页头返回按钮 */
@media (max-width: 768px) {
  html.page-mode body { padding-top: 48px; }
  html.page-mode .modal-overlay.page-active .modal { min-height: calc(100vh - 48px); }
  /* z534：列表页整屏高（顶栏 48px），底部留出移动端导航条位置
     z575c：订单对账页（groups）一并纳入 */
  html.page-mode[data-page="orders"] .modal-overlay.page-active .modal,
  html.page-mode[data-page="customers"] .modal-overlay.page-active .modal,
  html.page-mode[data-page="groups"] .modal-overlay.page-active .modal { height: calc(100vh - 48px) !important; }
  html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="groups"] .modal-overlay.page-active .modal-body { padding-bottom: 62px; }
  html.page-mode .modal-overlay.page-active .modal-header { top: 48px; padding: 10px 12px; }
  html.page-mode .modal-overlay.page-active .modal-header h2 { font-size: 15px; }
  html.page-mode .modal-overlay.page-active .modal-body { padding: 12px 12px 96px; }
  .page-back-btn { padding: 4px 10px; font-size: 12px; margin-right: 8px; }
}

/* ===== z537-①（陶总 2026-09-11）：顶栏 / 页头两条分隔线合并为一条 =====
   现象（陶总截图两处红叉）：页面模式下"顶栏下边线"与"页头下边线"两条硬线只隔 56px，
   中间夹着一条完整的页头带，看着碎、也浪费竖向空间。陶总："不需要两条分隔线，没有意义，
   很浪费空间，换一种简洁好看的样式"。
   做法：① 页面模式下顶栏不再画下边线（顶栏与页头拼成一个整体头部，只剩一条分隔线）；
         ② 页头压缩高度（内边距 12px→8px、返回胶囊更紧凑、标题 17px→16px），
            并换用更浅的线色 #eef1f6，观感更轻。
   注：仅页面模式（?p=）生效，工作台看板顶栏与弹窗页头保持原样。 */
html.page-mode .topbar { border-bottom: none; }
html.page-mode .modal-overlay.page-active .modal-header {
  padding: 8px 24px;
  border-bottom: 1px solid #eef1f6;
}
html.page-mode .modal-overlay.page-active .modal-header h2 { font-size: 16px; }
html.page-mode .page-back-btn { padding: 4px 11px; font-size: 12.5px; margin-right: 10px; }
@media (max-width: 768px) {
  html.page-mode .modal-overlay.page-active .modal-header { padding: 7px 12px; }
  html.page-mode .page-back-btn { padding: 3px 9px; font-size: 12px; margin-right: 8px; }
}

/* ===== z537-②（陶总 2026-09-11）：快速报价 / 登记订单页内容居中留白 =====
   陶总："这个界面和登记订单的界面，两边留空，内容放在中央，就像客户端的报价界面一样"。
   客户端是"顶栏通栏 + 内容定宽居中"（customer.css 的 .page max-width:1000px;margin:0 auto）。
   这里同法：把两页的 .modal-body 定宽居中（顶栏/页头仍通栏，与客户端观感一致）。
   注：订单记录 / 客户信息是整屏表格页，不套此规则。 */
html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===== z537-③（陶总 2026-09-11）：表格单元格改为"点编辑图标才编辑" =====
   现象：订单记录表 / 客户信息表的 cell-edit 单元格一律 contenteditable="true"，
   鼠标点到格子任意位置就进入编辑，容易误改（陶总："改成鼠标移动单元格里的编辑标志才能编辑"）。
   做法：① 渲染时单元格不再可编辑，只带一个 .ce-edit-btn（铅笔图标，默认透明）；
         ② 鼠标移到行上图标淡入，点图标才 contenteditable=true 进入编辑（见 app.js enterCellEdit）；
         ③ 编辑态给 td 加 .cell-editing（隐藏图标 + 黄底黄框），失焦提交后移除。
   注：图标自带 contenteditable="false" → getCellEditText() 提取纯文本时会自动剔除，不污染保存值。 */
.inquiry-table .cell-edit {
  position: relative;
  cursor: default;
  padding-right: 26px;   /* 给右侧图标留位，文字不被压住 */
}
/* z573（陶总 2026-09-12）：无编辑权限的角色（非管理员）——订单记录表 / 客户信息表
   只读。单元格保留 .cell-edit（保住 padding-right 布局与两页列宽一致），
   但去掉 hover 变色与光标暗示，看起来就是普通文本格子。图标本身也不渲染。 */
.inquiry-table .cell-edit.cell-locked,
.inquiry-table .cell-edit.cell-locked:hover {
  background: none;
  box-shadow: none;
  cursor: default;
}
.inquiry-table .cell-edit:hover { background: rgba(24, 144, 255, 0.035); box-shadow: none; }
.inquiry-table .cell-edit:focus,
.inquiry-table .cell-edit.cell-editing {
  background: #fffbea;
  box-shadow: inset 0 0 0 2px #f5a623;
  cursor: text;
}
.inquiry-table .ce-edit-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .12s, background-color .12s;
  cursor: pointer;
  user-select: none;
  /* 画笔图标用背景图（不内嵌 SVG 节点：客户表 8000+ 个格子，内嵌会拖慢渲染） */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa8bb' d='M11.9 1.2a1.9 1.9 0 0 1 2.9 2.4l-.9.9-2.6-2.6.6-.7zM9.9 3.6l2.6 2.6-7.2 7.2-3.4.8.8-3.4 7.2-7.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.inquiry-table tr:hover .cell-edit .ce-edit-btn { opacity: 1; }
.inquiry-table .ce-edit-btn:hover {
  background-color: var(--brand-pale);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%234370fa' d='M11.9 1.2a1.9 1.9 0 0 1 2.9 2.4l-.9.9-2.6-2.6.6-.7zM9.9 3.6l2.6 2.6-7.2 7.2-3.4.8.8-3.4 7.2-7.2z'/%3E%3C/svg%3E");
}
.inquiry-table .cell-edit.cell-editing .ce-edit-btn { display: none; }
/* 触屏无 hover：图标常显（半透明），否则手机上找不到编辑入口 */
@media (hover: none) {
  .inquiry-table .cell-edit .ce-edit-btn { opacity: .45; }
}

/* ===== z882（陶总 2026-10-31）：客户档案「常用地址」改为多值（每行一条）=====
   · 显示态：多条地址分行（<br>）展示，行高自适应；
   · 编辑态：允许回车换行（white-space: pre-wrap + word-break），
     否则 contenteditable 里按回车会直接提交（Enter 被 keydown 拦成 blur），
     多条地址就分不开了 —— 这一格改成 Shift+Enter 换行、Enter 提交。 */
.inquiry-table .cell-edit-multi {
  white-space: normal;
  line-height: 1.5;
  word-break: break-all;
}
.inquiry-table .cell-edit-multi.cell-editing {
  white-space: pre-wrap;
}
/* 客户档案弹窗里的「常用地址」textarea（每行一条） */
.cust-multi-addr {
  width: 100%;
  min-height: 74px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  word-break: break-all;
}
.cust-multi-addr:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}

/* ===== z538（陶总 2026-09-11）：报价页整页改成"客户端报价界面"样式 =====
   陶总："报价页改成客户端这种样式，样式要完全一样"（截图 = customer.html 的报价下单页）。
   对齐口径（AskUserQuestion 确认）：
     ① 整页改（顶栏 + 功能页签 + 表单卡片一起）；
     ② 结构照抄客户端，**主色沿用工作台蓝 var(--brand)**（不换成客户端的绿 #0d998f）；
     ③ 工作台独有内容（「清空重填」按钮、报价结果里的成本/通道信息）全部保留，只换外观。
   客户端基准（customer.css）：浅灰底 #f0f3f8 → 实心主色顶栏 → 白底带下划线页签
     → 白卡片（radius 12 + 淡阴影，宽 960）→ 圆胶囊品类 → 虚线上边框的字段网格（标签在上、框在下）
     → 整行主色大按钮。
   范围：只在 ?p=quote 生效；登记订单 / 订单记录 / 客户信息三页与工作台看板不受影响。 */

/* —— ① 背景与顶栏：白底 → 实心主色条（客户端 .topbar） ——
   z545：蓝底/白 logo/半透明角色胶囊/白底退出按钮 已提升为全站基础样式（见文件顶部 .topbar）。
   z551：原先这里那条"报价页专属的顶栏居中留白"已**删除**——陶总要的是顶栏内容贴边
        （logo 左上角 / 角色区右上角，以登记订单页为基准），故四页统一走基础 .topbar 的 padding:0 24px。 */
html.page-mode[data-page="quote"] body { background: transparent;   /* z862：统一走 html 渐变 */ }

/* —— ② 功能页签：蓝色胶囊 → 白底 + 下划线（客户端 .tabbar / .tab），固定在顶栏下方通栏 ——
   z545：原来只在报价页生效，现泛化到所有功能页（?p=quote|order|orders|customers）。
   顶栏统一成蓝底后，四页的页签也统一成"白底 + 蓝色下划线"这一种形态。 */
html.page-mode #page-nav {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 95;
  display: flex; align-items: stretch; gap: 0;
  /* z650（陶总 2026-09-16）：页签行整体水平居中（原先贴左，与正文卡片对齐） */
  justify-content: center;
  height: 44px; padding: 0 16px;
  background: #fff; border: none; border-bottom: 1px solid #e4e9f0; border-radius: 0;
  box-sizing: border-box;
}
html.page-mode .page-nav-item {
  flex: 0 0 auto; display: flex; align-items: center;
  padding: 0 28px; border-radius: 0; font-size: 14px; color: #7a8697;
  border-bottom: 2.5px solid transparent; box-sizing: border-box;
}
html.page-mode .page-nav-item:hover { background: none; color: var(--brand); }
html.page-mode .page-nav-item.active {
  background: none; color: var(--brand); font-weight: 600; border-bottom-color: var(--brand);
}
/* z571（陶总 2026-09-12）：**页签高亮提前到首帧**。
   原来只有 app.js 的 openCurrentPage() 会加 .active —— 而 app.js 有 300KB+，
   慢网+CPU 降速下实测要等 **1669ms** 才高亮。这段时间用户已经能看到整页了，
   点「客户信息」进去却看见四个页签全是灰的、1.6 秒后才变蓝 —— 是一处可见的"闪"。
   修法：<html> 的 data-page 由 <head> 内联脚本在 body 解析前就写好（z533 既有机制），
   这里用「data-page 属性选择器」直接给对应页签上高亮色 —— 纯 CSS、零 JS、首帧即生效。
   选择器特异性 (0,3,1) 与 .active 那条相同，两者同时命中也没冲突（声明完全一致）。 */
html.page-mode[data-page="quote"]     .page-nav-item[data-page="quote"],
html.page-mode[data-page="order"]     .page-nav-item[data-page="order"],
html.page-mode[data-page="orders"]    .page-nav-item[data-page="orders"],
html.page-mode[data-page="customers"] .page-nav-item[data-page="customers"] {
  background: none; color: var(--brand); font-weight: 600; border-bottom-color: var(--brand);
}
/* z547（陶总 2026-09-11）：四个功能页的页签内边距**统一**成"与正文卡片对齐"的居中留白。
   原来只有报价页用居中留白（max(16px, 50% - 500px)）、其余三页贴左 24px，
   从报价页切到别的页时整条页签会横跳 ~276px（实测报价页首个页签 x=300、其余页 x=24）。
   现在四页同为居中留白 → 切页时四个页签位置完全不动（实测四页首个页签 x 全为 300）。 */

/* z545：所有功能页的正文都要给固定页签让出 44px；页头吸顶位置随之下移 44px，
   否则长表单页（登记订单）的页头滚到顶部时会被页签压住一半。 */
html.page-mode .modal-overlay.page-active .modal { padding-top: 44px; box-sizing: border-box; }
html.page-mode .modal-overlay.page-active .modal-header { top: 100px; }

/* —— ③ 正文：通栏页 → 白卡片（客户端 .card，宽 960 = .page max-width 1000 − 左右 20 内边距） —— */
html.page-mode[data-page="quote"] .modal-overlay.page-active .modal {
  background: transparent !important;
  padding-top: 44px;            /* 让位给固定页签 */
  box-sizing: border-box;
}
/* 客户端没有页头那一行（返回工作台走左上角 logo 点击），也没有"产品报价"这层 tab */
html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-header { display: none; }
html.page-mode[data-page="quote"] .quote-tabs { display: none; }
html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body {
  width: calc(100% - 40px); max-width: 1080px; margin: 14px auto; box-sizing: border-box;
  background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(30, 50, 80, .06);
  padding: 16px 20px;
}
/* 卡片标题：仅报价页显示（工作台弹窗 / 其它页不出现，保持原貌） */
.fq-card-title { display: none; }
html.page-mode[data-page="quote"] .fq-card-title {
  display: block; font-size: 14px; font-weight: 600; color: #2c3444; margin-bottom: 10px;
}

/* —— ④ 品类：蓝色小方块 → 白底描边圆胶囊（客户端 .cq-cat-btn） —— */
html.page-mode[data-page="quote"] .fq-cat-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
  overflow: visible; padding-bottom: 0;
}
html.page-mode[data-page="quote"] .fq-cat-btn {
  flex: 0 0 auto; padding: 6px 16px; line-height: 1.4; white-space: nowrap;
  border: 1px solid #cfd8e3; background: #fff; border-radius: 20px;
  font-size: 13px; color: #4a5668;
}
html.page-mode[data-page="quote"] .fq-cat-btn:hover { border-color: var(--brand); color: var(--brand); }
html.page-mode[data-page="quote"] .fq-cat-btn.active {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}

/* —— ⑤ 表单：灰底块 + 标签在左 → 虚线上边框 + 标签在上、框在下（客户端 .cq-form / .cq-field） —— */
html.page-mode[data-page="quote"] .fq-form {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row;
  column-gap: 16px; row-gap: 0; padding: 6px 0 0; margin: 0;
  background: transparent; border: none; border-top: 1px dashed #e4e9f0; border-radius: 0;
}
html.page-mode[data-page="quote"] .fq-field {
  flex-direction: column; align-items: stretch; gap: 5px; margin: 8px 0;
}
html.page-mode[data-page="quote"] .fq-field-wide { grid-column: 1 / -1; margin: 8px 0; }
html.page-mode[data-page="quote"] .fq-label {
  flex: none; width: auto; text-align: left; white-space: normal;
  font-size: 13px; color: #5a6675;
}
html.page-mode[data-page="quote"] .fq-req { color: #d4380d; }
html.page-mode[data-page="quote"] .fq-input {
  height: auto; min-height: 40px; padding: 9px 12px; font-size: 14px; color: #2c3444;
  border: 1px solid #d8dfe8; border-radius: 10px; background: #fff;
}
html.page-mode[data-page="quote"] .fq-input:focus { border-color: var(--brand); }
/* 自绘下拉（.csx）跟随同一外观，避免只有输入框变圆角 */
html.page-mode[data-page="quote"] .csx-box {
  height: 40px; padding: 0 12px; border-color: #d8dfe8; border-radius: 10px;
}
html.page-mode[data-page="quote"] .csx-val { font-size: 14px; color: #2c3444; }
/* 多选工艺 */
html.page-mode[data-page="quote"] .fq-ck-group { align-items: center; gap: 8px 14px; padding: 4px 0; }
html.page-mode[data-page="quote"] .fq-ck { gap: 5px; font-size: 14px; color: #3a4657; padding: 5px 0; }
html.page-mode[data-page="quote"] .fq-ckbox { width: 17px !important; height: 17px !important; accent-color: var(--brand); }
html.page-mode[data-page="quote"] .fq-note-row { padding: 0; margin: 0 0 4px; border-top: none; }
html.page-mode[data-page="quote"] .fq-note { font-size: 12px; color: #a5aebc; }

/* —— ⑥ 提交：整行主色大按钮（客户端 .btn-primary.btn-block）；「清空重填」保留，降级为下方小字 —— */
html.page-mode[data-page="quote"] .fq-actions {
  flex-direction: column; align-items: stretch; gap: 0; margin-top: 10px;
}
html.page-mode[data-page="quote"] .fq-actions .btn-primary {
  width: 100%; padding: 9px 0; font-size: 14px; font-weight: 600; border-radius: 9px;
}
html.page-mode[data-page="quote"] .fq-actions .btn-outline {
  width: auto; align-self: center; margin: 8px 0 0 !important; padding: 4px 8px;
  border: none; background: none; color: #8a97a6; font-size: 12.5px;
}
html.page-mode[data-page="quote"] .fq-actions .btn-outline:hover {
  background: none; color: var(--brand); text-decoration: underline;
}

/* —— ⑦ 报价结果：灰块 → 卡片内的虚线分区（成本/通道等内容一字未动） —— */
html.page-mode[data-page="quote"] .quote-result {
  background: transparent; border: none; border-top: 1px dashed #e4e9f0; border-radius: 0;
  margin-top: 16px; padding: 16px 0 0;
}

/* —— ⑧ 窄屏（<900px，与客户端断点一致）：一行 2 个 + 客户端手机尺寸 —— */
@media (max-width: 899px) {
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body {
    width: calc(100% - 28px); max-width: 692px; padding: 14px; border-radius: 12px;
  }
  html.page-mode[data-page="quote"] .fq-card-title { font-size: 15px; margin-bottom: 12px; }
  html.page-mode[data-page="quote"] .fq-cat-bar { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
  /* z597（陶总 2026-09-13）：与 768px 断点保持一致 —— 手机上**一行 1 个字段**，
     让纸张等长选项下拉拿到整行宽度。 */
  html.page-mode[data-page="quote"] .fq-form {
    grid-template-columns: 1fr !important; column-gap: 0; row-gap: 0;
  }
  /* z693（陶总 2026-09-19）：移动端改**字段在左、输入框在右**（原 label 上/控件下），
     输入框 44px → 38px（与 z692 全站统一高度一致），行距收紧 —— 一屏看更多内容。
     单列布局保留（z597 下拉读全宽诉求仍成立：控件吃掉 label 之外整行）。 */
  html.page-mode[data-page="quote"] .fq-field,
  html.page-mode[data-page="quote"] .fq-field-wide { flex-direction: row; align-items: center; gap: 8px; margin: 6px 0; }
  html.page-mode[data-page="quote"] .fq-label { flex: 0 0 72px; font-size: 13px; }
  html.page-mode[data-page="quote"] .fq-input { height: 38px; min-height: 38px; padding: 0 12px; font-size: 14px; }
  html.page-mode[data-page="quote"] .csx-box { height: 38px; padding: 0 12px; }
  html.page-mode[data-page="quote"] .csx-val { font-size: 14px; }
  /* z694（陶总 2026-09-19）：工艺复选框组随 z693「标签在左」适配 —— 弹性收缩占 label 之外整行，
     修复组盒子 flex:none+width:100% 溢出工艺卡片右边框（"撕线"被截断）的问题。
     权重高于 ≤768 弹窗块的 .fq-ck-group（z694 已同步改），且写在其后，双保险。 */
  html.page-mode[data-page="quote"] .fq-ck-group { flex: 1 1 auto; width: auto; min-width: 0; }
  /* z693：label 移到左侧后，提示行缩进 80px（72px label + 8px 间距），与输入框左缘对齐 */
  html.page-mode[data-page="quote"] .fq-note-row { padding-left: 80px; }
  html.page-mode[data-page="quote"] .fq-actions .btn-primary {
    padding: 12px 0; font-size: 16px; border-radius: 10px;
  }
}

/* —— ⑨ 手机（≤768px）：顶栏只剩居中 logo、右上整块隐藏（.topbar-right），
      页签 .page-nav 随之不可见 —— 页面切换走底部导航（z533 既有机制），
      故正文不需要为页签让位，只在卡片下方留出导航条高度。 —— */
@media (max-width: 768px) {
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal { padding-top: 0; }
  /* z712（陶总 2026-09-23）：手机报价页拉不到底——旧法给 .modal-body 用 margin-bottom:70px 预留底部导航空间，
     但 margin 会沿自动高度、无底内边距的父级（.modal→.modal-overlay）向上折叠，内容超一屏时
     这 70px 不产生滚动空间，面板尾部（运费/开票/计算报价那行）被底部导航盖住。
     改在透明外壳 .modal 上用 padding-bottom：padding 不折叠，必定计入文档高度。84px = 导航 57px + 安全区 + 余量。 */
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal { padding-bottom: 84px; }
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body { margin-bottom: 0; }
}

/* ===== z548（陶总 2026-09-11）：登记订单页 → 与「快速报价」页同一套外观 =====
   陶总："登记订单也做成快速报价的页面样式，不清楚的话先跟我确认"。
   AskUserQuestion 确认的三条：① 整页统一（白卡片 + 输入框/下拉/按钮全部对齐报价页样式）；
     ② 页头那行「← 返回工作台 / 登记订单」跟报价页一样隐藏；③ 内部页签（z573 已随询盘功能删除）。
   **纯外观**：字段、顺序、联动逻辑（smartFillProduct / updateProductFields / 客户搜索浮层等）一律不动。
   注意：本段全部用 html.page-mode[data-page="order"] 前缀，只影响 ?p=order 整页模式；
   工作台里点「登记订单」弹出的原来那个浮层弹窗（无 .page-mode）完全不受影响。 */
/* ① 背景 + 透明外壳 + 隐藏页头（返回工作台走左上角 logo / 顶部页签导航） */
html.page-mode[data-page="order"] body { background: transparent;   /* z862：统一走 html 渐变 */ }
html.page-mode[data-page="order"] .modal-overlay.page-active .modal {
  background: transparent !important; padding-top: 44px; box-sizing: border-box;
}
html.page-mode[data-page="order"] .modal-overlay.page-active .modal-header { display: none; }
/* ② 白卡片（宽度/圆角/阴影与报价页逐字一致） */
html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body {
  width: calc(100% - 40px); max-width: 960px; margin: 14px auto; box-sizing: border-box;
  background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(30, 50, 80, .06);
  padding: 16px 20px;
}
/* ③ 原「登记订单 / 登记询盘」两个内部页签 —— z573（陶总 2026-09-12）随询盘功能一并删除。
      登记订单页现在没有内部页签：.modal-body 顶部直接是草稿提示条（.draft-hint）+ 表单。
      原先这里给这两个页签做报价页样式覆盖的规则已无用，故整段移除。 */
/* ④ 字段：标签在上、框在下；框统一 40px 高 / 10px 圆角 / 报价页同款描边 */
html.page-mode[data-page="order"] .form-group label,
html.page-mode[data-page="order"] .detail-label {
  font-size: 13px; font-weight: 400; color: #5a6675; margin-bottom: 5px;
}
html.page-mode[data-page="order"] .form-group { margin-bottom: 14px; }
html.page-mode[data-page="order"] .detail-form-row { margin-bottom: 14px; }
html.page-mode[data-page="order"] .form-group input,
html.page-mode[data-page="order"] .form-group select,
html.page-mode[data-page="order"] .detail-inline-item input,
html.page-mode[data-page="order"] .detail-inline-item select,
html.page-mode[data-page="order"] .detail-form-row input,
html.page-mode[data-page="order"] .detail-form-row select,
html.page-mode[data-page="order"] .product-textarea {
  min-height: 38px; padding: 9px 12px; font-size: 14px; color: #2c3444;
  border: 1px solid #d8dfe8; border-radius: 10px; background: #fff;
}
html.page-mode[data-page="order"] .product-textarea { min-height: 62px; }
/* 复选框/单选框不能被上面的通用高度规则撑高：工艺那一排 打钉/打码/… 实测被拉成 16×40。
   注意必须带 !important —— 早先有一条 `#order-product-fields input{height:38px}` 是 **ID 选择器**，
   权重高过本段任何类/属性选择器，不加 !important 压不过（实测 16×38）。 */
html.page-mode[data-page="order"] input[type="checkbox"],
html.page-mode[data-page="order"] input[type="radio"] {
  min-height: 0 !important; width: 16px !important; height: 16px !important; padding: 0;
  border-radius: 3px; accent-color: var(--brand);
}
html.page-mode[data-page="order"] .form-group input:focus,
html.page-mode[data-page="order"] .form-group select:focus,
html.page-mode[data-page="order"] .detail-inline-item input:focus,
html.page-mode[data-page="order"] .detail-inline-item select:focus,
html.page-mode[data-page="order"] .detail-form-row input:focus,
html.page-mode[data-page="order"] .detail-form-row select:focus,
html.page-mode[data-page="order"] .product-textarea:focus {
  border-color: var(--brand); box-shadow: none;
}
/* 智能填充按钮：对齐报价页那种"浅色小按钮"的分量（原来是主色描边实心块） */
html.page-mode[data-page="order"] .smart-fill-btn {
  padding: 5px 14px; font-size: 12.5px; border-radius: 8px;
  border-color: #cfd8e3; color: var(--brand); background: #fff;
}
html.page-mode[data-page="order"] .smart-fill-btn:hover { background: var(--brand-pale); color: var(--brand); }
/* ⑤ 底部：整行主色大按钮 + 「保存草稿」降级为下方小灰字（与报价页的 计算报价/清空重填 同构） */
html.page-mode[data-page="order"] #order-actions {
  flex-direction: column; align-items: stretch; gap: 0; margin-top: 10px;
}
html.page-mode[data-page="order"] #order-actions .btn-primary {
  flex: 0 0 auto !important; width: 100%; padding: 9px 0; font-size: 14px; font-weight: 600; border-radius: 9px;
}
html.page-mode[data-page="order"] #order-actions .btn-outline {
  flex: 0 0 auto !important; width: auto; align-self: center; margin: 8px 0 0 !important; padding: 4px 8px;
  border: none; background: none; color: #8a97a6; font-size: 12.5px;
}
html.page-mode[data-page="order"] #order-actions .btn-outline:hover {
  background: none; color: var(--brand); text-decoration: underline;
}
/* ⑥ 窄屏：断点与报价页一致（899px 卡片内缩 + 按钮放大；768px 顶栏页签消失，正文不再让位） */
@media (max-width: 899px) {
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body {
    width: calc(100% - 28px); max-width: 692px; padding: 14px; border-radius: 12px;
  }
  html.page-mode[data-page="order"] #order-actions .btn-primary {
    padding: 12px 0; font-size: 16px; border-radius: 10px;
  }
}
@media (max-width: 768px) {
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal { padding-top: 0; }
  /* z712：同报价页——margin-bottom 会折叠不产生滚动空间，改外壳 padding-bottom（见报价页处注释） */
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal { padding-bottom: 84px; }
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body { margin-bottom: 0; }
}

/* ===== z539（陶总 2026-09-11）：收货省份/开票 统一挪到「工艺」下方 + 中间加一条分隔线 =====
   陶总："收货省份和开票都想图上一样，放到工艺下方，并在中间加一条分隔线"。
   口径（AskUserQuestion 确认）：① 全部品类统一顺序——彩页、混合本原本"收货省份/开票"排在工艺上方，
      现把「工艺」挪到省份上方（顺序在 server/quote-catalog.js，纯顺序调整、不出价逻辑）；
      ② 客户端报价页（customer.html）同步加同一条线。
   渲染：renderFormFields 遇到 key==='province' 时先输出一个空的 .fq-divider 行（占整行）。
   样式：沿用卡片既有分隔语言（1px dashed #e4e9f0），横跨整行；上方留白 12、下方 22（下方原为 0，z546 拉大）。
   注意：选择器必须写成 .fq-field.fq-divider（两个类同时命中）才能压过 .fq-field{margin:8px 0}
      （含 <900px 媒体查询里的同一规则）。 */
.fq-field.fq-divider {
  grid-column: 1 / -1; height: 0; padding: 0; margin: 6px 0 16px;
  border: none; border-top: 1px dashed #e4e9f0;
}
/* z554（陶总 2026-09-11）：分隔线上下留白**收窄**——陶总发截图圈出工艺区与"收货省份/开票"之间
   那段空白说"这边的距离缩窄一点"。原为 12/22（z546 曾把下方从 0 拉到 22），
   实测视觉间距是"上方 20px、下方 31px"（含 .fq-field 自带 8px margin），看着太散。
   改为 12/10 —— 上 8→16px、下 22→8px，整段收紧约 19px，与表单其他行间距(9px row-gap)更协调。
   ⚠️ 只动页面模式的这条，基础 `.fq-field.fq-divider`(6/16) 保持不动——客户端门户(customer.html)
      走的是基础那条，陶总这次只圈了工作台报价页，别顺带改了客户页观感。 */
html.page-mode[data-page="quote"] .fq-field.fq-divider { margin: 8px 0 10px; }

/* z556 修补 A（陶总 2026-09-11）：工艺复选框被撑成 17×40，根因是上面 z548 那段
   `html.page-mode[data-page="order"] .detail-form-row input{min-height:40px}`——
   它带 [data-page="order"] 属性 + 排在文件更后面，权重(1 属性+2 类)高于报价页那条
   `html.page-mode[data-page="quote"] .fq-ckbox{height:17px!important}` 里**没有 !important 的 min-height**，
   于是 min-height:40px 胜出，复选框变成竖长方形（实测 17×40）。
   ⚠️ 修法：把 min-height 也加上 !important —— 与 z548 里给登记订单页复选框打 !important 是同一个道理。
   ⚠️ 顺带兜住整个页面模式：任何页面下的复选框/单选框都不该被"输入框统一高度"规则撑高。 */
html.page-mode input[type="checkbox"],
html.page-mode input[type="radio"] {
  min-height: 0 !important;
  box-sizing: border-box;
}
html.page-mode[data-page="quote"] .fq-ckbox { min-height: 0 !important; }

/* ===== z556（陶总 2026-09-11 23:27）：报价页「工艺」行 → 做成卡片（边框 + 底色），与订单登记页一致 =====
   陶总发登记订单页截图（工艺那一块带蓝灰色外框 + 浅蓝底）说"报价页的工艺行也像订单登记页一样
   做个边框和底色，看起来更清楚"。
   口径＝照抄登记订单页的 .craft-card：background var(--brand-pale) / border 1px #c5cee0 / radius 8px /
   padding 10px 14px，标签与选项之间的 6px 间距由 .fq-ck-group 的 padding-top 承担。
   ⚠️ 只在**报价页**做——陶总圈的是快速报价，登记订单页(z548)与客户端(customer.css)本轮不动。
   ⚠️ 选择器必须 .fq-field.fq-field-wide.fq-craft-card 三连：单靠 .fq-craft-card 是 1 个类，
      压不过上面 `html.page-mode[data-page="quote"] .fq-field-wide{margin:8px 0}`（2 类 + 属性）的 margin，
      卡片会跟上下行贴死。加宽字段那类后权重更高且写在后面 → 卡片自带外边距生效。
   ⚠️ 卡片内的 label / 复选框不另加 padding-left——它们本来就与外框只隔 6px(fq-form) + 14px(卡片)，
      再加会让工艺标签比上方"装订方式"右移，破掉整列左对齐。 */
/* ===== z558（陶总 2026-09-11 23:46）：报价页工艺卡片内左间距 6px → 14px，对齐登记订单页 =====
   陶总发截图圈出卡片左侧："报价页工艺这行，左边太贴边了，间距比订单登记那里要小，参考订单登记页的间距改下"。
   根因：z556 我为了让"工艺"标签与上方"装订方式"标签同竖线，把卡片 padding-left 取成了
   `.fq-form` 的 padding-left（6px）—— **保了列对齐，牺牲了内间距**。而登记订单页的 `.craft-card`
   是 `padding:10px 14px`，复选框距外边框 14px，实测报价页只有 6px（差 8px）。
   口径（AskUserQuestion 确认）：陶总选**"只求内间距一致"** → 采用登记订单页的 14px，
   接受"工艺标签比上方标签右移 8px"（登记订单页本来就是这个观感，它的标签也相对容器缩进）。
   ⚠️ 代价需知：卡片内 .fq-label 会从"与上方标签同竖线"变为右移 8px —— 这是陶总确认过的取舍。
   ⚠️ 右侧同步改 14px（原为 0，靠卡片外框压住 .fq-form 的 22px 右留白）：
      改后复选框组右缘距卡片边框 14px，与左侧对称。 */
html.page-mode[data-page="quote"] .fq-field.fq-field-wide.fq-craft-card {
  margin: 12px 0 10px;
  padding: 10px 14px;
  background: var(--brand-pale);
  border: 1px solid #c5cee0;
  border-radius: 8px;
}
/* 卡片内复选框组：原有 padding:4px 0 由卡片 10px 上下内边距承担（保持与登记订单页等高） */
html.page-mode[data-page="quote"] .fq-field.fq-craft-card > .fq-ck-group { padding: 0; }
/* 手机端（≤768px）：外边距收窄，左右内边距与桌面一致（14px）保持口径统一 */
@media (max-width: 768px) {
  html.page-mode[data-page="quote"] .fq-field.fq-field-wide.fq-craft-card { margin: 8px 0; }
}

/* ===== z545（陶总 2026-09-11）：顶栏统一成蓝底 + 按钮梳理 =====
   陶总："顶上做成现在报价页面一样的布局和颜色，右边的按钮太多了，重新梳理下"。
   口径（AskUserQuestion 确认）：
     ① 按钮＝4 个常用（快速报价/登记订单/订单记录/客户信息）+「更多 ▾」下拉
        （制作报价单·合同/员工管理/纸张价格）；
     ② 范围＝全站统一（订单看板 + 四个功能页都换成蓝底顶栏）。
   实现：蓝底/白 logo/半透明角色胶囊/白底退出按钮写进基础 .topbar（见文件顶部），
         功能页签由"报价页专属"泛化到全部页面模式（见 ② 段）。
   这里只补页面模式下的位移修正，必须写在文件末尾才能在移动端压过 z533 的旧规则：
     ① 长表单页（登记订单）页头吸顶下移 44px，避开固定页签；
     ② 手机端 .topbar-right 整块 display:none（页签随之不可见），正文不再需要让位。 */
@media (max-width: 768px) {
  html.page-mode .modal-overlay.page-active .modal { padding-top: 0; }
  html.page-mode .modal-overlay.page-active .modal-header { top: 48px; }
}

/* ==================================================================
   z575（陶总 2026-09-12）：订单/工单分层 + 金额流转 + 订单对账
   ================================================================== */

/* ---- 登记订单页：所属订单选择器 ---- */
.og-picker {
  background: var(--brand-pale);
  border: 1px solid var(--brand-pale);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

/* ===== z575d（陶总 2026-09-13）：「所属订单」并入登记表单的一行 =====
   陶总要求："所属订单的选项放到登记日期后面，也做成一样大小的选框，像客户名称一样"。
   原 .og-picker 是独立一块浅蓝卡片（输入框 34px 高 / 13px 字号），与 .detail-inline-item
   的输入框（padding:9px 12px / 14px 字号）尺寸不一致。
   现在它就是一个普通的 .detail-inline-item，靠本段把里面输入框对齐成同一尺寸；
   「+」（新建订单）与「×」（移出）做成嵌在输入框右端的小圆钮，不再占额外宽度。 */
.detail-inline-item.og-picker-item {
  position: relative;
}
.detail-inline-item.og-picker-item .og-picker-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.detail-inline-item.og-picker-item .og-picker-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 58px 9px 12px;   /* 右侧留出 +/× 两个钮的位置 */
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}
.detail-inline-item.og-picker-item .og-picker-input-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}
.detail-inline-item.og-picker-item .og-newbtn,
.detail-inline-item.og-picker-item .og-clearbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.detail-inline-item.og-picker-item .og-newbtn {
  right: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.detail-inline-item.og-picker-item .og-newbtn:hover { background: var(--brand-strong); }
.detail-inline-item.og-picker-item .og-clearbtn {
  right: 32px;
  background: #eef1f5;
  color: #6b7687;
  font-size: 17px;
}
.detail-inline-item.og-picker-item .og-clearbtn:hover { background: #e2e7ee; color: #d33; }
/* 已选订单的展示条（挂在整行下方，不挤占三列） */
.og-picked {
  margin-top: 8px;
}
/* z589（陶总 2026-09-13）：订单详情弹窗的「所属订单」**只有「移出」钮、没有「新建」钮**
   （刻意不放：openNewOrderGroupForm 建完会把订单挂到**登记页**的选择器上，
     在详情页放这个钮会让"新建的订单挂到了别处"，功能串台）。
   所以右侧 padding 从 58px 收到 32px —— 否则那块空白占着文字区，看着像框变窄了。 */
#inquiry-detail-body .og-picker-input-wrap input {
  padding-right: 32px;
}

.og-picker-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.og-picker-label { font-size: 13px; font-weight: 600; color: #3a4658; }
.og-picker-state {
  font-size: 12px;
  color: #8b95a5;
  background: #eef1f5;
  padding: 1px 9px;
  border-radius: 9px;
}
.og-picker-state.og-on { color: #05978c; background: linear-gradient(135deg, #e1f0ef 0%, #eff6f5 100%); font-weight: 600; }
.og-picker-row { display: flex; align-items: center; gap: 8px; }
.og-picker-input-wrap { position: relative; flex: 1; min-width: 0; }
.og-picker-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  outline: none;
  background: #fff;
}
.og-picker-input-wrap input:focus { border-color: var(--brand); }
.og-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--brand-pale);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(30, 60, 110, .14);
  max-height: 260px;
  overflow-y: auto;
}
.og-suggest-new {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #eef2f8;
  background: var(--brand-pale);
}
.og-suggest-new:hover { background: var(--brand-pale); }
.og-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--brand-pale);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.og-suggest-item:last-child { border-bottom: none; }
.og-suggest-item:hover { background: var(--brand-pale); }
.ogs-no { font-size: 13px; color: #2c3444; font-weight: 600; }
.ogs-meta { font-size: 12px; color: #8b95a5; }
.og-suggest-empty { padding: 10px 12px; font-size: 12.5px; color: #9aa4b2; text-align: center; }
.og-picked {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #ebf4f3;
  border-radius: 7px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.og-picked-no { color: #05978c; font-weight: 600; }
.og-picked-cust { color: #3a4658; }
.og-picked-cnt { color: #7f8b9c; margin-left: auto; }

/* ---- 登记订单页：金额留空 → 会流转给陈世权的提示 ---- */
.amount-pending-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 12px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #9c6f00;
  background: #fffaf0;
  border: 1px dashed #e8c98a;
  border-radius: 8px;
}
.amount-pending-hint b { color: #b8860b; }
.aph-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #e0a800; flex: 0 0 auto;
}

/* z744：顶栏「待填金额」按钮已删（.btn-amount-pending / .ap-badge 样式一并移除）；
   看板状态徽章 .status-amount-pending 等仍保留 ——「待填金额」列还在用。 */

/* ---- 待填金额状态徽章 / 看板标签 ---- */
.status-badge.status-amount-pending { background: #fff4e5; color: #9c6f00; border: 1px solid #e8c98a; }
.card-tag.tag-amount-pending { background: #fff4e5; color: #9c6f00; border: 1px solid #e8c98a; font-weight: 600; }
/* ===== z820（陶总 2026-10-16）：封面/内页外发角标 =====
   绿都单若封面或内页走了彩澜 → 同一张单两处生产（绿都一部分 + 彩澜一部分），
   陶总原话："他们本质是同一状态，标清楚可以方便找货"。
   配色刻意用**紫蓝**（与"待填金额"的橙、绿都卡的绿、外发卡的样式都不同），
   一眼分清"这是外发部位提示"，不是状态也不是金额。 */
.card-tag.tag-outsource-part {
  background: var(--brand-pale);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  font-weight: 600;
}

/* ===== z830（陶总 2026-10-16）：工单图片上传与预览 =====
   登记页选图后先本地缩略图预览，建单成功后自动上传；详情弹窗可看/加/删。
   缩略图固定 96px 方图（object-fit:cover），点开走 .img-lightbox 看原图。 */
.img-upload-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.img-upload-hint { font-size: 12px; color: #8a9bb8; }
.img-preview-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  width: 100%; margin-top: 4px;
}
.img-preview-row:empty { display: none; }
.img-pre-item { position: relative; display: inline-block; line-height: 0; }
.img-pre-item img {
  width: 96px; height: 96px;
  object-fit: cover;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  cursor: zoom-in;
  background: #f6f8fa;
}
.img-pre-item i {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; line-height: 17px;
  text-align: center; font-size: 13px; font-style: normal;
  color: #fff; background: #d94b4b;
  border-radius: 50%; cursor: pointer;
}
.img-pre-item i:hover { background: #c0392b; }
.img-add-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.img-hint-inline { font-size: 12px; color: #a6b0be; }
/* 大图预览遮罩 */
.img-lightbox {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15, 23, 42, 0.82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.img-lightbox img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
/* 🟢 z606（陶总 2026-09-14）：看板「待填金额」列里的**订单条目** —— 挂了订单的工单归拢到这一条，
   左侧橙色竖条与工单卡片区分开，一眼看出"这笔金额要在订单上填"。 */
/* 🔴 z621（陶总 2026-09-15）：填金额不再弹 prompt 窗，改为**卡片上点铅笔图标就地编辑** ——
   整张卡片不再是"点击即弹窗"，所以 cursor 从 pointer 改回 default，
   并把基类 .order-card:hover 的高亮一并中和（不可点却 hover 高亮 = 假可供性，z614 教训）。 */
.order-card.card-amount-pending { border-left: 4px solid #e8a33d; background: #fffaf2; cursor: default; }
.order-card.card-amount-pending:hover { border-color: #e8e8e8; border-left-color: #e8a33d; box-shadow: none; }
.order-card.card-amount-pending .card-customer { font-weight: 700; }
.order-card.card-amount-pending .card-summary { color: #9c6f00; }

/* ---- z621：待填金额卡片 —— 铅笔图标 + 就地编辑行 ---- */
.card-amount-edit {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0;
  border: 1px solid #e8c98a; border-radius: 6px; background-color: #fff4e5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c98a12' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 14px 14px;
  cursor: pointer; transition: background-color .12s, border-color .12s, transform .08s;
}
.card-amount-edit:hover { background-color: #ffe7c2; border-color: #d9a94e; }
.card-amount-edit:active { transform: scale(.92); }
.card-amount-edit:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* 编辑态：那一行 = 输入框 + ✓ + ✕（收款标签仍在右侧，布局不跳） */
.order-card.card-amount-editing { border-left-color: var(--brand); background: var(--brand-pale); }
.order-card.card-amount-editing .card-bottom { flex-wrap: wrap; }
.card-amount-input {
  flex: 1 1 90px; min-width: 70px; height: 30px; box-sizing: border-box;
  padding: 2px 9px; font-size: 15px; font-weight: 700; color: #c0392b;
  border: 1px solid #cfd8e3; border-radius: 6px; background: #fff;
}
.card-amount-input::placeholder { color: #b3bcc8; font-weight: 400; }
.card-amount-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(32, 77, 243,.15); }
.card-amount-input.card-amount-input-err { border-color: #e24b4a; background: #fff5f5; }
.card-amount-ok, .card-amount-cancel {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 6px;
  font-size: 15px; line-height: 1; cursor: pointer; box-sizing: border-box;
}
.card-amount-ok { background: linear-gradient(135deg, #047a71 0%, #058c82 100%); color: #fff; border: 1px solid #058c82; }
.card-amount-ok:hover { background: #05877e; }
.card-amount-ok:disabled { opacity: .7; cursor: default; }
.card-amount-cancel { background: #f0f2f5; color: #667085; border: 1px solid #dfe3e9; }
.card-amount-cancel:hover { background: #e6e9ee; }
.card-amount-err { flex: 1 1 100%; font-size: 12px; line-height: 1.3; color: #e24b4a; }
.card-amount-err:empty { display: none; }
.order-card.card-amount-saving { opacity: .85; }
@keyframes lvduAmtShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.card-amount-input.card-amount-shake { animation: lvduAmtShake .22s ease-in-out 1; }

/* 就地保存成功的轻提示（替代原来的成功 alert —— 卡片就地编辑本来就看得见结果） */
.lvdu-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(6px);
  max-width: calc(100vw - 48px); box-sizing: border-box;
  background: rgba(28, 40, 58, .93); color: #fff; font-size: 13.5px; line-height: 1.5;
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.22);
  z-index: 3000; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.lvdu-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .card-amount-edit { width: 30px; height: 30px; background-size: 16px 16px; }
  .card-amount-input { height: 34px; font-size: 16px; }
  .card-amount-ok, .card-amount-cancel { width: 34px; height: 34px; font-size: 16px; }
  .lvdu-toast { bottom: 78px; }   /* 让开手机端底部导航（高约 57px） */
}
/* z658：待填金额 tab 的红色特殊样式已删（陶总原话「改回普通样式，跟别的筛选项一样」），
   现与其他 tab 完全同款（选中=品牌蓝底白字，见 .list-tab.active）。 */
.kanban-col.col-amount-pending .kanban-col-header { border-top-color: #e0a800; }
.kanban-col.col-amount-pending .col-count { background: #fff4e5; color: #9c6f00; }

/* ---- 订单记录页 / 对账页：系统号（所属订单）列的链接 ---- */
.grp-link { color: var(--brand); cursor: pointer; text-decoration: underline dotted; }
.grp-link:hover { color: var(--brand-strong); }
/* z586d（陶总 2026-09-13 定案）：系统号为空时**纯空白** —— 已删除 z586c 的 `.grp-link-blank`
   透明可点占位（陶总明确"不需要点击，这些系统号都是没用的"）。
   → 空系统号一律由 `groupLinkCell()` / 渲染逻辑 `return ''`，不再产生任何可点区域。 */
.inquiry-table td.td-group { font-size: 12.5px; }

/* ---- 订单对账页 ---- */
/* z578（陶总 2026-09-13）：删列后表格只剩 9 列（原 13 列），
   min-width 由 1180px 收到 900px —— 9 列的实际总宽约 880px，
   留一点余量避免窄屏下过早出现横向滚动条。
   同时删掉 col-ginvno / col-ginvdate / col-gterm / col-gdue / col-gpaiddate 五条列宽定义。
   z581（陶总 2026-09-13）：再删「是否回款」一列 → 现为 8 列，min-width 收到 820px
   （8 列实际总宽约 800px），并删掉 col-gpaid 的列宽定义。 */
/* z594（陶总 2026-09-13）：对账表改成**半栏宽度**后，列宽预算整体重排 ——
   原 8 列实际总宽约 800px（min-width 820px），半栏只有约 460~760px（随视口变），沿用会横向滚动。
   现为 6 列（「客户订单号 / 是否开票」降级进「客户」格的次级行），预算合计 464px。
   🔴 预算按**最小视口**（陶总浏览器约 1080 → 单栏 500px）定，不是按 1600 的大屏定：
     1080 下实测过一版，收款状态列拿到 70px、而徽章要 56px + 左右内边距 16px = 72px，
     **差 2px → 徽章被省略号截成「已收款 ..」**。所以这里给收款状态留足（76px），
     并从系统号/客户/工单数三列各匀一点出来。
   min-width 由 820px 降为 0，宽度交给两栏栅格（width:100%）。
   原 col-gcustno / col-ginv 两条列宽定义一并删除（列已不存在）。 */
/* z595（陶总 2026-09-13）：列宽策略分两态 ——
   ① **自动（默认）**：`table-layout: auto`，列宽交给浏览器按内容算，`width:100%` 填满容器。
      下面那 6 条 width 预算此时只作"建议值"，内容更宽/更窄时会自动让位、余量按内容分配 ——
      这就是陶总要的"自动调成最适合的列宽"（不再是把内容挤到折行的写死值）。
   ② **手动**：拖过列宽后 table 会被加上 `.colwidth-manual`，切回 `fixed` 并 `width:auto`
      （= 表格宽度就是各列宽之和）。🔴 这一条是"拉了能记住"的**关键前提**：
      若仍留 `width:100%`，当列宽之和小于容器宽度时浏览器会**按比例把各列放大**去填满，
      于是"拖完当刻的实际宽度"与"恢复之后重算出来的宽度"起点不同、结果对不上，
      表现就是陶总说的"拉了以后没记忆，切回来还是刚才的宽度"（其实存下来了，只是还原不准）。
   注：`.grp-table` 必须显式写 `table-layout:auto` 去盖掉 `.inquiry-table` 的 `fixed`
      （同优先级、本段在后，靠出现顺序取胜）。 */
.grp-table { min-width: 0; width: 100%; table-layout: auto; }
.grp-table.colwidth-manual { table-layout: fixed; width: auto; }
/* z595 实测记录（省得以后重复踩）：
   曾想给「工单数 / 操作」两列加 `max-width` 压掉虚胖（auto 布局会把填满容器的余量均摊下去，
   这两列内容虽少却被撑到 107 / 120px）。**实测无效** —— Chrome 在 `table-layout:auto` 下
   忽略 table-cell 的 `max-width`（列宽完全由内容与分配算法决定），加了两条规则列宽纹丝不动。
   故不再写这两条死规则。若以后真要收紧，只有两条路：
     ① 手动拖（本功能已支持，且会记住）；
     ② 放弃 auto、自己按内容测量后分配 —— 成本高、收益仅是视觉，暂不做。 */
/* z610（陶总 2026-09-14）：原「系统号(104) + 客户(106) + 工单数(36)」三列并成一列 → `.col-gorder`。
   列宽 190px（原三列合计 246px，省下 56px 让给金额列）。
   ⚠️ 本表是 `table-layout:auto`（见 .grp-table），th 的 width 只是**建议值**，实际列宽由内容撑 ——
      所以最长的「恒逸巴陵(己内酰胺)-0914-9.14巴陵9个文件」不会被截断，只会折成 2 行
      （配合 `.grp-table td.td-gorder` 的 overflow-wrap:anywhere，优先在连字符处断，仍能看出三段结构）。 */
.inquiry-table th.col-gorder   { width: 236px; }
/* z645（陶总 2026-09-16）：「客户来源」列（订单 与 订单金额 之间），88px 装得下「机关事业国企」6 字徽章 */
.inquiry-table th.col-gchannel { width: 88px; }
/* z839（陶总 2026-10-27）：新增「业务员」列（对账页，客户来源右侧）——
   表格内下拉选框，88px 装得下最长的 3 字姓名 + 下拉箭头。 */
.inquiry-table th.col-gsalesman { width: 88px; }
/* z840（陶总 2026-10-28）：「发货建议」列（对账页）——
   内容 = 推荐公司 + 运费 + 总重量，如「顺心捷达 ¥51 · 27.4kg」。
   150px 装得下最长形态；本表 table-layout:auto → width 只是建议值，实际由内容撑。 */
.inquiry-table th.col-gsuggest { width: 150px; }
.grp-table td.td-gsuggest { vertical-align: middle; }
.inquiry-table th.col-gamount  { width: 84px; }
/* z611（陶总 2026-09-14）：新增「毛利率」列，位置在「订单金额」右侧（陶总指定）。
   宽度 82px 装得下「-100.00%」这种最宽的形态（含负号 7 字符，tabular-nums 下约 62px + padding 16px）。
   ⚠️ 本表 table-layout:auto → width 只是建议值，实际由内容撑；下面 td 的规则只做视觉，不参与布局。 */
.inquiry-table th.col-gmargin  { width: 82px; }
/* z654（陶总 2026-09-17）：「收款方式」列（毛利率右侧、收款状态左侧）。
   88px 装得下最宽的「对公(绿都)」6 字；nowrap 防止折行撑高行。 */
.inquiry-table th.col-gpaymethod { width: 88px; }
.grp-table td.td-gpaymethod { white-space: nowrap; }

/* =================== z655（陶总 2026-09-17）：选项型字段表格内下拉 ===================
   平时与普通文本格观感一致（透明边框/底色），悬停/聚焦才浮现边框提示「可选」；
   继承表格字号，高度不撑行。选择即保存，无需进编辑态。
   🟢 z658（陶总 2026-09-17）：宽度改「自适应内容 + 格内居中」——
   原来 width:100% 拉宽列后下拉框跟着格子拉伸，文字左对齐、箭头贴右，
   中间出现巨大留白（陶总截图反馈）。现改为收缩到内容宽度、在列内水平居中，
   列拉多宽留白都对称分布在两侧，不再难看。 */
.inquiry-table select.cell-select {
  appearance: auto;
  -webkit-appearance: auto;
  width: auto;
  min-width: 72px;
  max-width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 1px 2px;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
/* z658：下拉格所在 td 统一居中（与上面 width:auto 配套） */
.inquiry-table td.td-gpaymethod,
.inquiry-table td.td-processor,
.inquiry-table td.td-productname,
.inquiry-table td.td-cchannel,
.inquiry-table td.td-cpay,
.inquiry-table td.td-ctax { text-align: center; }
.inquiry-table select.cell-select:hover {
  border-color: #c9c9c9;
  background: #fff;
}
.inquiry-table select.cell-select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
/* 对账表「多种」占位项置灰提示 */
.inquiry-table select.cell-select option[value="__multi__"] { color: #999; }
/* z762（陶总 2026-10-09）：下拉格闭合态文字居中。
   不限表格 —— 客户信息表（cust-table）等所有 cell-select 一并生效；
   text-align-last 兼容 Firefox，Chromium/Safari 用 text-align 即可。 */
select.cell-select { text-align: center; text-align-last: center; }
.inquiry-table th.col-gpay     { width: 76px; }
/* z614（陶总 2026-09-14）：开票状态独立成列（收款状态右侧，陶总指定）。
   宽度 76px 与「收款状态」对齐 —— 两者都是 3 字徽章（未收款/未开票），同宽最整齐。 */
.inquiry-table th.col-ginv     { width: 76px; }
.inquiry-table th.col-gops     { width: 58px; }
/* 半栏下单元格内边距同步收紧（默认 9px 12px 太占地方） */
#group-modal .grp-table th,
#group-modal .grp-table td { padding-left: 8px; padding-right: 8px; }
/* z610：合并列「订单」—— 主行系统号 + 次级行（工单数 · 开票）。
   主行系统号在半栏里仍可能折行（最长 25~30 字符，如
   「恒逸巴陵(己内酰胺)-0914-9.14巴陵9个文件」）。
   用 overflow-wrap:anywhere 而不是 word-break:break-all ——
   break-all 会在任意字符处硬断（断成 "…-0814-" / "01"），
   anywhere 会**优先在已有的断行机会（连字符）处断**，断成 "qwertyuiop11918947-" / "0814-01"，
   一眼就能看出这是「客户名-月日-单号」三段结构，扫读容易得多。
   两者都能参与 min-content 收缩、不会撑破半栏。 */
.grp-table td.td-gorder {
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
  /* 🔴 显式把继承来的 `text-overflow: ellipsis` 关掉：`.inquiry-table td` 带 ellipsis + overflow:hidden，
     本列是**可折行的长文本**，一旦哪天有人给它加了 nowrap，长系统号会被静默截成「恒逸巴陵(己…」，
     而系统号是这行的唯一身份标识，截了就认不出是谁的单。改成 clip 让截断不可能发生。 */
  text-overflow: clip;
}
/* 主行系统号（groupLinkCell 输出的是 .grp-link，这里只调字号，不动它的链接样式） */
.grp-table td.td-gorder .grp-link { font-size: 12.5px; }
/* 系统号缺失时的**客户名兜底**（灰字、不可点）—— 只在没有系统号的存量订单上出现。
   🔴 这是 z610 删掉「客户」列后的**安全网**：没有它，系统号一旦为空这行就完全认不出是谁的单。 */
.grp-order-nosysno { font-size: 12.5px; color: #8b95a5; }
/* 次级行：工单数（纯文本）· 订单状态（纯展示）。复用 z594 的 .grp-sub（11px 灰字 flex 排布） */
.grp-order-sub { align-items: baseline; }
/* z614（陶总 2026-09-14）：「工单 N」**去掉超链**。
   🔴 陶总原话："这里工单X不需要超链，跟上面系统号的超链重复了" —— 它正上方的系统号
     绑的是同一个 `showGroupOrdersSync(g.id)`，是纯重复入口。
   ⚠️ cursor / :hover 必须**一起**去掉：只删 onclick 而留着 cursor:pointer 的话，
      鼠标变手型、点了没反应 —— 假可供性比原来"能点"更糟。
   保留 font-weight 与颜色：它仍是这行的第一个信息锚点，只是不能再点了。 */
.grp-order-cnt { font-weight: 600; color: #5a6b80; }
/* ===== z851（陶总 2026-10-29）：订单日期（次级行，可编辑）=====
   陶总原话：「对账单上每个订单的日期改成新建订单时填的那个订单日期」
   日期进了对账单 → 必须能改。放在订单列的次级行里（工单数 · 订单状态 · 订单日期），
   不另开一列（对账页列已经很密）。 */
/* 🔴 z866（陶总 2026-10-30）：日期**跟在「工单 N · 订单状态」后面**，间隔与前面一样宽，**不做右对齐**。
   原来这里有 `margin-left: auto` → 把日期顶到行末（右对齐），与前两项挤在一起不好看。
   去掉后日期就是次级行的第 3 项，间距直接用 .grp-sub 的 `gap: 7px` —— 与
   「工单 N ↔ 订单状态」之间的间距**完全一致**。 */
.grp-order-date {
  font-size: 11px;
  font-family: inherit;
  color: #5a6b80;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 3px;
  background: transparent;
  cursor: pointer;
  max-width: 120px;
}
.grp-order-date:hover { border-color: #d5dbe3; background: #f7f9fb; }
.grp-order-date:focus { border-color: var(--brand); background: #fff; outline: none; }
/* z866：同样去掉 margin-left:auto —— 只读态（非管理员）的日期也跟在状态后面，不再右对齐 */
.grp-order-date-txt { font-size: 11px; color: #8b95a5; }
/* z645：客户来源列 —— 徽章复用 card-tag 全站配色；渠道为空时灰短横占位 */
.grp-table td.td-gchannel { white-space: nowrap; }
.grp-ch-empty { color: #c3cad4; }
.grp-order-cnt-zero { font-weight: 400; color: #c3cbd7; }
/* z614：订单状态（次级行第 2 项，原「未开票」的位置）。纯展示、不可点。
   订单层无 status 字段 → 由名下工单聚合（口径见 app.js groupStatusOf()）：
   单一状态时显示该状态；混合时显示**进程最靠前的瓶颈状态**并在这里给个琥珀色提示，
   让"这单还没齐"一眼可辨（title 里有完整分布）。 */
.grp-order-st { color: #5a6b80; }
.grp-order-st-mixed { color: #9c6f00; border-bottom: 1px dotted #e8c98a; }
.grp-sub { font-size: 11px; color: #8b95a5; margin-top: 2px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
/* z614：`.grp-sub-inv`（次级行里的「未开票」可点文本）随开票状态升格为独立列**整体删除**。
   它的替代者是「开票状态」列的 `.status-badge.status-active / .status-idle`。
   ⚠️ 别再写回 `.grp-sub-inv` —— 该 DOM 节点已不存在，写了就是死代码。 */
/* 操作列按钮同步缩小（列宽从 120px 收到 58px，原 padding 4px 10px 会撑破）
   z595：补 `white-space:nowrap` —— 自动列宽下浏览器可能把操作列压到比按钮还窄，
   按钮里的「删除」会竖着排成两行（陶总 9-13 截图里就是这样）。加 nowrap 后
   按钮自身不再折行，列宽由 min-content 撑住。 */
.grp-table td.td-gops .btn { padding: 3px 6px; font-size: 11.5px; white-space: nowrap; }
/* 收款状态 / 开票徽章同步收紧（原 padding 2px 10px，半栏下会把「未收款」挤成「未收款 ..」） */
.grp-table .status-badge { padding: 2px 7px; font-size: 11.5px; }

/* z610：「订单」合并列改左对齐（z594 时是「系统号 / 客户」两列）。
   🔴 为什么必须改：`.inquiry-table td` 是全站居中（第 2247 行），而本列会**折行** ——
     系统号最长约 30 字符（恒逸巴陵(己内酰胺)-0914-9.14巴陵9个文件）必然折成 2 行，
     下面还挂着次级行（工单 N · 订单状态）。
     居中后第 2 行的左边缘与第 1 行参差，扫读时"每一行的名字从哪里开始"完全对不齐。
     本列是纯文本识别列，左对齐才好扫；数字列（订单金额）保持居中，与全站一致。 */
#group-modal .grp-table td.td-gorder { text-align: left; }
/* z903（陶总 2026-10-31）：表头单独**左右居中**。
   z610 当初是 th + td 一条规则全设 left，结果这一列表头跟着贴左，
   与其余列头居中对不齐（陶总：「第一列订单的表头没有左右居中」）。
   拆分后：单元格仍左对齐（长系统号折行，左对齐才好扫读），表头与全站列头一致居中。 */
#group-modal .grp-table th.col-gorder { text-align: center; }
/* z602（陶总 2026-09-14）：订单金额列改成可内联编辑后必须 `nowrap`。
   .cell-edit 会给单元格加 padding-right:26px（给铅笔图标留位），而本列 th 只声明了 84px，
   内容区剩约 50px → `¥10,409.84` 会折成两行（"¥10,409." / "84"），钱数折行极易看错。
   加 nowrap 后 min-content 由文本自己撑住（约 96px），auto 布局下列宽自动够用，
   不必去改 th.col-gamount 的 width（改窄了反而会与 nowrap 打架）。 */
.grp-table td.td-gamount { font-weight: 600; color: #1a2b40; white-space: nowrap; }
/* z610：原 `.grp-table td.td-gcnt { text-align: center; }` 随并列下线 ——
   工单数已降级为「订单」列里的次级行文本（`.grp-order-cnt`），不再是独立居中数字列。 */

/* ===== z611（陶总 2026-09-14）：「毛利率」列（订单金额右侧） =====
   陶总原话：「然后对账页加一列毛利率，加在金额列右侧」。
   毛利率 = (订单金额 − 该订单下所有工单成本之和) / 订单金额 × 100%。
   四态（由 app.js 的 renderGroupMarginInner() 产出，这里只管外观）：
     · 数字        .gm-pos（正，深色加粗）/ .gm-neg（**负数红色**，亏本一眼看到）
     · 「…」       .gm-calc  正在调报价引擎算绿都纸张成本（异步，约 1 秒内出结果）
     · 「—」       .gm-dash  订单金额还没填 / 有工单没有成本记录 / 名下没有工单
   本格**永不可编辑**（成本是算出来的，不是填的）→ 不带 .cell-edit、不带 data-field。 */
.grp-table td.td-gmargin {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: .2px;
}
.grp-table td.td-gmargin .gm-pos { color: #1a2b40; }
/* 亏损：与全站「涨红跌绿」无关，这里只是"负数=警示"的常规用法 */
.grp-table td.td-gmargin .gm-neg { color: #E24B4A; }
.grp-table td.td-gmargin .gm-calc,
.grp-table td.td-gmargin .gm-dash { color: #b8bfc9; font-weight: 400; font-size: 12.5px; }

.grp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 9px 14px;
  margin-bottom: 10px;
  background: var(--brand-pale);
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  font-size: 12.5px;
  color: #5a6577;
  min-height: 38px;
  align-items: center;
}
.grp-stat b { color: #1a2b40; font-size: 13.5px; }
.grp-stat-ok b { color: #05978c; }
.grp-stat-bad b { color: #c0392b; }

/* z575：对账页操作列（td-gops）—— 复用订单表 .td-ops 的口径。
   ⚠️ 铁律重申：<td> 绝不能设 display:flex（会让 td 退出表格行高分配、浅蓝底色缺一块），
   flex 居中/间距一律下沉到内层 .ops-wrap。此前只给了 col-gops 宽度，漏了这条，表现为
   「编辑/删除」两个按钮上下堆叠。 */
.inquiry-table td.td-gops .ops-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.inquiry-table td.td-gops .btn {
  display: inline-block;
  margin-right: 0;
  vertical-align: middle;
  padding: 4px 10px;
  font-size: 12px;
}

/* ===== z594（陶总 2026-09-13）：订单对账页「左表 + 右看板」两栏布局 =====
   需求原文："把这个表格缩到现在的一半，右边放未收款订单的统计，不是简单的把订单列处理，
   是清晰地展示哪些订单很久没付款，或者哪个客户欠了最多钱…目的是清晰的看到未付款订单，
   按一定的优先级去对账。"
   口径（陶总当日三条定案）：
     ① 「已预付」**不算欠款** → 右板只统计 paymentStatus === 'unpaid'
     ② 排序可在「按账龄 / 按金额」间切换
     ③ 账龄分 4 档：0-15 / 16-30 / 31-60 / 60 天以上 */
#group-modal .modal.modal-recon {
  width: min(1600px, 96vw);
  max-width: 96vw;
  max-height: 92vh;
}
#group-modal .modal-body { padding: 16px 20px; }

.recon-layout {
  display: grid;
  /* z656（陶总 2026-09-17）：左表格 2/3、右看板 1/3（原 1fr:1fr 对半） */
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  /* z666（陶总 2026-09-18）：align-items:start → stretch —— 右板拉到与左表同高（陶总要求对齐） */
  align-items: stretch;
}
.recon-left, .recon-right { min-width: 0; }

/* 右板：一张卡片 —— 账龄分布 / 客户欠款排行（z666：「今天先催」已删）。
   z666：改 flex 纵向 + grid 默认拉伸（去掉 align-items:start）→ 右板与左表等高，
   客户欠款排行吃掉剩余高度，列表「拉长到跟左边表格对齐」。 */
.recon-board {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.rb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rb-title { font-size: 14px; font-weight: 600; color: #1a2b40; }
/* z665（陶总 2026-09-18）：原「按账龄/按金额」排序按钮（.rb-sort/.rb-sortrow）随全量滚动列表一并下线 */
/* z596（陶总 2026-09-13）：右板顶部统计卡。
   改前是一行 11.5px 灰字（「未收款 ¥xx · N 笔 · M 家客户 · 最久 K 天」），
   ¥ 金额要眯着眼找；改成两张卡后大数字一眼可见。
   ⚠️ 用 grid 1fr 1fr 而非 flex —— 两栏布局下右板只有半宽，flex 会随内容宽度
      两卡不等宽（金额位数一变肉眼可见地抖）。 */
.rb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 0; }
.rb-card { background: #fafbfc; border: 1px solid #e8ecf1; border-radius: 8px; padding: 9px 12px 10px; min-width: 0; }
.rb-card-label { font-size: 11.5px; color: #8b95a5; line-height: 1.4; }
.rb-card-val {
  font-size: 22px; font-weight: 600; color: #1a2b40; line-height: 1.25; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rb-card-unit { font-size: 13px; font-weight: 500; color: #4b5563; margin-left: 1px; }
.rb-card-sub { font-size: 12px; font-weight: 400; color: #8b95a5; margin-left: 4px; }
/* 卡下方小字（现在只剩「最久 K 天未付」）；下方间距交还给 .rb-sec 的 margin-top */
.rb-meta { font-size: 11.5px; color: #8b95a5; margin: 7px 0 0; }
/* z666（陶总 2026-09-18）：「今日/本月订单金额」经营卡（.rb-cards-biz/.rb-card-split）已随
   右板改动整体删除 —— 经营数据看业绩看板，右板只管欠款。 */
/* z638：对账表列头可点击排序（点一下降序 ▼，再点升序 ▲） */
/* z645：对账页列头排序已下线（z638 的 th-sort 规则随之删除）；
   「客户信息表·订单额」列头接棒三态排序（点击 降序→升序→取消），样式口径照搬 */
.cust-table th.th-sort { cursor: pointer; user-select: none; }
.cust-table th.th-sort:hover { color: var(--brand); }
.cust-table th .th-arrow { font-size: 9px; color: var(--brand); margin-left: 2px; }

/* z666（陶总 2026-09-18）：z636 的 .rb-divider 分隔线已删 —— 区块分隔改由 .rb-sec 整行底色承担（见下）。 */
/* z639（陶总 2026-09-15）：右板纵向节奏统一 12px —— 排序行上/下、分隔线上、区块标题上，全一个间距 */
/* z665：rb-sortrow（排序行）已随「按账龄/按金额」切换一并下线 */
/* 极窄屏（手机竖屏）缩一号，避免 ¥ 金额被 ellipsis 截掉尾数 */
@media (max-width: 420px) { .rb-card-val { font-size: 19px; } }
/* z666（陶总 2026-09-18）：小标题改**整行底色**作为区块分隔（原 .rb-divider 细线删除）——
   浅蓝灰底 + 加粗深字，扫一眼就能分出「账龄分布 / 客户欠款排行」两块。 */
.rb-sec { display: flex; align-items: center; font-size: 12.5px; font-weight: 700; color: #243b53; background: #e8eef6; padding: 6px 10px; border-radius: 6px; margin: 12px 0 8px; }
.rb-sec .hint { font-weight: 400; color: #9aa4b2; font-size: 11px; margin-left: 6px; }
/* z665（陶总 2026-09-18）：客户欠款排行右上角**搜索框**（替代 z664 的「全部」按钮；
   输入客户任意信息即过滤下方列表）。.rb-sec 是 baseline 对齐，输入框自带 padding 后与标题文字齐平。 */
.rb-sec .rb-debt-search {
  margin-left: auto; width: 128px; box-sizing: border-box;
  font-size: 11.5px; font-family: inherit; color: #1f2937;
  padding: 2px 8px; border: 1px solid #dfe5ee; border-radius: 9px;
  background: var(--brand-pale); outline: none;
}
.rb-sec .rb-debt-search:focus { border-color: var(--brand-line); background: #fff; }
.rb-sec .rb-debt-search::placeholder { color: #b6bfcc; font-weight: 400; }
/* z665：全量欠款客户滚动容器（替代 z664 弹窗）—— 列表恒按金额降序，超出高度内部滚动。
   z666：「今天先催」删除后，排行是右板最后一个模块 —— 弹性拉长（.recon-board 改 flex 纵向，
   本容器 flex:1 吃掉剩余高度），page 模式下与左表对齐；max-height 仅作窄屏堆叠时的兜底。 */
.rb-rank-scroll {
  max-height: 420px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; margin: 0 0 2px; padding-right: 2px;
}
.rb-rank-empty { padding: 12px 4px; font-size: 12px; color: #9aa4b2; text-align: center; }
.rb-bar-row, .rb-rank { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 5px; cursor: pointer; }
.rb-bar-row:hover, .rb-rank:hover { background: var(--brand-pale); }
.rb-bar-row.on, .rb-rank.on { background: var(--brand-pale); }
.rb-bar-label { width: 62px; flex: none; font-size: 11.5px; color: #5a6577; }
.rb-bar-track { flex: 1; min-width: 0; height: 12px; background: #f0f3f7; border-radius: 2px; overflow: hidden; }
.rb-bar-fill { display: block; height: 12px; border-radius: 2px; }
.rb-bar-val { width: 108px; flex: none; text-align: right; font-size: 11.5px; color: #4b5563; }
.rb-rank-no { width: 16px; height: 16px; flex: none; border-radius: 50%; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
/* z615：`.rb-rank-name` 由 `flex:1`（撑满）改为 `flex:0 1 auto`（按内容）——
   否则「已预付」标签会被顶到行尾、离客户名十万八千里，读不成"湖州瑞禾〔已预付〕"。
   名字过长时仍会收缩 + ellipsis（min-width:0 保住这一点）。
   腾出来的空间由 `.rb-rank-age` 的 `margin-left:auto` 吃掉，笔数/金额照旧靠右对齐。 */
.rb-rank-name { flex: 0 1 auto; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-rank-age { flex: none; margin-left: auto; font-size: 11px; color: #8b95a5; }
.rb-rank-amt { width: 92px; flex: none; text-align: right; font-size: 12.5px; font-weight: 600; color: #1a2b40; }
/* z641→z666：「今天先催」模块（.rb-tip*）已整体删除 —— 排行恒按金额降序，第一名即最该催的。 */
.rb-empty { font-size: 12.5px; color: #8b95a5; padding: 20px 0; text-align: center; }

/* z615（陶总 2026-09-14 夜）：客户欠款排行 / 今天先催 里的「已预付」标记。
   用途：欠款口径已含已预付，催款前要能一眼分清"真没付钱"（无标记）和"预付款客户"（带此标记）。
   ⚠️ margin-left:-4px 是**刻意**的：它抵消父级 flex 的 8px gap，让标签贴近客户名
      （这样别人才读得成"湖州瑞禾〔已预付〕"，而不是"湖州瑞禾 … 〔已预付〕"两个不相干的块）。
   ⚠️ 这个 span 必须挂在 `.rb-rank-name` **外面** —— name 是 flex:1 + ellipsis，
      塞进去会被 text-overflow 直接吃掉，标签永远不可见。 */
.rb-pre-tag {
  flex: none;
  margin-left: -4px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 15px;
  border-radius: 3px;
  background: var(--brand-pale);
  color: var(--brand);
  border: 1px solid var(--brand-soft);
  white-space: nowrap;
}

/* 右板联动筛选的状态条（点账龄档 / 点客户后出现） */
.recon-chip {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding: 5px 10px;
  font-size: 12px; color: var(--brand);
  background: var(--brand-pale); border: 1px solid var(--brand-soft); border-radius: 6px;
}
.recon-chip-x { margin-left: auto; cursor: pointer; color: #5a6577; }
.recon-chip-x:hover { color: #c0392b; }

/* 汇总条新增「已预付」一格的配色（对齐徽章 .status-prepaid 的蓝） */
.grp-stat-pre b { color: var(--brand); }

/* z615（陶总 2026-09-14 夜）：汇总条末尾新增「欠款 = 未收款 + 已预付」。
   🔴 它是**合计项**，不是"又一种收款状态"，所以加一条细分隔线把它与前面五项隔开，
      再配最深红 + 加粗（比「未收款」的 #c0392b 更重），保证"一眼看到"（陶总原话里的要求）。
   ⚠️ 前四项金额不动 → 总金额 = 已收款 + 已预付 + 未收款 的恒等式仍成立；
      「欠款」与「已预付」金额刻意重叠，这是当面问过陶总的取舍，别再"顺手去重"。 */
.grp-stat-debt {
  border-left: 1px solid #dfe4ec;
  padding-left: 16px;
}
.grp-stat-debt b { color: #a32d2d; font-size: 14.5px; }

/* 窄屏两栏会挤成没法看 → 右板落到表格下方，整宽还给表格。
   🔴 断点定在 1000px 是算出来的，不是拍的：
     两栏并排时单栏宽 ≈ (视口 × 96% − 40 − 16) / 2，要让左表塞进 468px 的列宽预算，
     视口至少要 ≈1000px。视口 1080（≈陶总浏览器宽度）→ 单栏 512px，够用；
     视口 920 → 单栏 432px，塞不下会出横向滚动条 —— 那种宽度直接堆叠反而更好用。
   ⚠️ 一开始写的是 1100px，结果 1080 的视口被误判成"窄屏"、两栏被堆成上下，
     右板跑到表格底下 —— 与陶总"右边放统计"的要求相反。已修正。 */
@media (max-width: 1000px) {
  .recon-layout { grid-template-columns: minmax(0, 1fr); }
}

/* 🔴 页面模式（?p=groups）下对账页是「整屏高 + 内部滚动」（见文件上方 z534/z575c 那组规则），
   而表格容器在新结构里变成了 .recon-left 的子元素 —— 那条 `.inquiry-table-wrap { flex:1 }`
   对它**直接失效**（父级 .recon-left 不是 flex 容器，只是个普通块），
   同时该规则里的 `max-height:none` 生效 → 表格会长到很高，被 .modal 的 overflow:hidden 裁掉且无法滚动。
   所以必须补这三条。 */
html.page-mode[data-page="groups"] .modal-overlay.page-active .modal.modal-recon {
  max-height: none;   /* 页面模式的高度由 100vh-56px !important 决定，别被 92vh 掐短 */
}
html.page-mode[data-page="groups"] .recon-layout { flex: 1; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
html.page-mode[data-page="groups"] .recon-left { display: flex; flex-direction: column; min-height: 0; }
html.page-mode[data-page="groups"] .recon-right { min-height: 0; overflow-y: auto; }
/* z666（陶总 2026-09-18）：page 模式下客户欠款排行弹性撑满右板剩余高度（与左表对齐），
   兜底 max-height 在此放开；min-height 防止左表太矮时列表被压到看不见几行。
   ⚠️ .recon-board 必须 height:100% —— .recon-right 是内部滚动的定高格子，
   board 不撑满的话底边会停在内容高度（78 家客户 ≈ 1900px），与左表底对不齐。 */
/* z729（陶总 2026-10-07）：右板底边框适配 —— 修「列表行戳出卡片底边框」。
   根因（1080×660 复现实测）：.recon-board height:100% 把盒子锁死在可用高度，
   而 .rb-rank-scroll 是 flex-basis:auto（基数=全部行高 ≈73 家 1752px），收缩又被
   min-height:160px 卡住 —— 视口较矮（固定区块 ~305px + 160 > 可用）时列表缩不到位，
   内容溢出盒子 ~47px，行画在底边框外面，右板还多出一根滚动条。
   修法（两条配套，缺一不可）：
   ① board 改 height:auto + min-height:100% —— 空间够时照旧拉满与左表对齐；
      空间不够时卡片随内容长高，底边框恒包住内容，滚动交给 .recon-right（overflow-y:auto）。
   ② rank 改 flex-basis:0 —— 基数不再按内容高算，列表高度 = 容器剩余空间（grow 分配），
      永不把 board 撑爆；min-height 降到 80px（约 3 行）兜底，再矮的窗口也只轻微超出且可滚。 */
html.page-mode[data-page="groups"] .recon-board { height: auto; min-height: 100%; }
html.page-mode[data-page="groups"] .recon-board .rb-rank-scroll { flex: 1 1 0; max-height: none; min-height: 80px; }

/* ===== z575b（陶总 2026-09-12 晚）：内联「新建订单」表单 =====
   原来用 prompt() 连问两次（客户名 + 订单号），体验差且容易填错。
   改为内联表单三字段：客户（选）/ 下单日期（自动带出今天）/ 原订单号（可留空）。
   ⚠️ 客户输入框复用登记页既有的 .customer-suggestions 浮层，容器需 position:relative。 */
.og-newform {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--brand-pale);
  border-radius: 8px;
}
.og-newform-grid {
  display: grid;
  grid-template-columns: 1.4fr 130px 1.2fr;
  gap: 12px;
  align-items: start;
}
.og-nf-item { min-width: 0; }
.og-nf-label {
  display: block;
  font-size: 12px;
  color: #5b6a80;
  margin-bottom: 5px;
  font-weight: 600;
}
.og-nf-opt { color: #93a1b5; font-weight: 400; }
.og-nf-cust-wrap { position: relative; }
.og-newform-grid input {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #1a2b40;
}
.og-newform-grid input:focus { border-color: var(--brand); }
.og-newform-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.og-nf-preview {
  font-size: 12.5px;
  color: var(--brand);
  background: var(--brand-pale);
  padding: 4px 10px;
  border-radius: 6px;
  min-height: 15px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.og-nf-preview:empty { background: transparent; padding: 0; }
/* 手机端：三字段改单列堆叠 */
@media (max-width: 720px) {
  .og-newform-grid { grid-template-columns: 1fr; }
  .og-newform-actions { flex-direction: column; align-items: stretch; }
}

/* ===== z575d：新建订单弹窗 ===== */
/* z575d：登记订单页「所属订单」并入登记表单一行后，该列成为 flex 容器（标签 + 输入框 + 备选提示） */
.detail-inline-item.og-picker-item { position: relative; }

/* 「所属订单」列：输入框 + 右侧两个小圆钮（＋新建 / ×移出）
   —— 做成 flex 行，输入框占满剩余宽度；右侧留 58px 给两钮，避免文字被盖住。
   ⚠️ 两钮绝对定位挂在本列（position:relative）上，垂直居中于输入框中线。 */
.detail-inline-item.og-picker-item .og-picker-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.detail-inline-item.og-picker-item .og-picker-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 58px;
}
.detail-inline-item.og-picker-item .og-newbtn,
.detail-inline-item.og-picker-item .og-clearbtn {
  position: absolute;
  top: 50%;
  margin-top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
/* 标签高约 21px + 无间距，输入框中线 ≈ 21 + 9 + 46/2 = 53px。
   用 bottom 定位更稳（不依赖标签实际高度）。 */
.detail-inline-item.og-picker-item .og-newbtn,
.detail-inline-item.og-picker-item .og-clearbtn {
  top: auto;
  bottom: 11px;
  margin-top: 0;
}
.detail-inline-item.og-picker-item .og-newbtn { right: 6px; background: var(--brand); color: #fff; font-weight: 600; }
.detail-inline-item.og-picker-item .og-newbtn:hover { background: var(--brand-strong); }
.detail-inline-item.og-picker-item .og-clearbtn { right: 32px; background: #eef1f5; color: #6b7687; font-size: 17px; }
.detail-inline-item.og-picker-item .og-clearbtn:hover { background: #e2e7ee; color: #d33; }
/* 输入框自身的尺寸完全继承 .detail-inline-item input（9px/12px、圆角8px、14px） */
.detail-inline-item.og-picker-item .og-picker-input-wrap input {
  padding-top: 9px;
  padding-bottom: 9px;
  padding-left: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}
/* z585（陶总 2026-09-13）：「所属订单」框对齐同一行其他 3 个框的高度。
   根因：.og-picker-input-wrap 是 flex 容器且 align-items:center，本 input 的
   display 被 flex 规范算成 block → 高度只按内容（9+1+16+1+9 = 34px），不随兄弟框拉伸；
   而其余三个框是 inline-block 在普通 block 里，被行高撑到 38px。两值差 4px，肉眼可见。
   修法：不写死数值，而是 height:100% + box-sizing:border-box，
   让本框始终跟随同一行其他框的自然高度（宽屏 38px / 窄屏 42px 都自适应）。
   ⚠️ 用 100% 而非固定 px，是为了不被 ≤768px 断点里 .detail-inline-item input{height:42px} 打架。 */
.detail-inline-item.og-picker-item .og-picker-input-wrap {
  align-items: stretch;   /* 关键：让 input 拉伸到容器满高，而不是按内容居中 */
}
.detail-inline-item.og-picker-item .og-picker-input-wrap input {
  height: 38px;
  box-sizing: border-box;
}
/* 窄屏（≤768px）时其他框是 42px，本框同步跟上 */
@media (max-width: 768px) {
  .detail-inline-item.og-picker-item .og-picker-input-wrap input {
    height: 42px;
  }
}
.detail-inline-item.og-picker-item .og-picker-input-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 77, 243, 0.08);
}
/* 下拉浮层：.og-suggest 本身是 position:absolute; top:100%（相对最近的定位祖先）。
   本列是 position:relative，但 .og-picker-input-wrap 也是 relative —— 后者更近，
   所以浮层自然挂在输入框正下方，宽度也对齐输入框，无需额外覆盖。 */

/* 必填星号（项目此前无此样式） */
.req-star { color: #d9534f; font-weight: 600; margin-left: 2px; }

/* 弹窗内系统号实时预览（挂在「原订单号」下方） */
.ng-preview {
  font-size: 12.5px;
  color: var(--brand);
  background: var(--brand-pale);
  padding: 7px 12px;
  border-radius: 8px;
  margin-top: 12px;
  min-height: 15px;
  line-height: 1.5;
  word-break: break-all;
}
.ng-preview:empty { display: none; }
.ng-preview b { font-weight: 600; }

/* 弹窗底部按钮：窄屏自动堆叠 */
@media (max-width: 720px) {
  #new-group-modal .modal-actions { flex-direction: column-reverse; }
  #new-group-modal .modal-actions .btn { width: 100%; }
}

/* =================== z647（陶总 2026-09-16）：付款登记页（?p=finance；z651 由「经营数据」改名） ===================
   z649（陶总 2026-09-16）：① 「月度统计」整个 tab 删除（代码删干净）——月表/明细专属样式一并移除；
   ② 页面模式下「← 返回工作台」页头整行隐藏（与 z552/z575c 订单记录/客户信息/订单对账同款，
   顶部页签已高亮当前页，该行纯属重复）。 */
html.page-mode[data-page="finance"] .modal-overlay.page-active .modal-header ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal-header ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal-header { display: none; }
#finance-modal .modal-body { max-height: calc(100vh - 140px); overflow-y: auto; }
#finance-modal .fin-note {
  font-size: 12px; color: #8a8f99; margin: 4px 0 10px; line-height: 1.6;
}
#finance-modal .fin-red { color: #c0392b; }
#finance-modal .fin-green { color: #05978c; }
/* z745（陶总 2026-10-08）：登记/编辑应付付款弹窗 —— 三行表单行距一致。
   原状态：网格内行距 = gap12 + form-group margin14 = 26px，而「日期→备注」只有 14px，忽大忽小；
   现统一 16px：网格内 margin 清零、gap 16px；备注块在网格外，用 margin-top:16px 补齐同款间距。 */
#fin-entry-modal .order-form-grid { gap: 16px; }
#fin-entry-modal .order-form-grid .form-group { margin-bottom: 0; }
#fin-entry-modal .modal-body > .form-group { margin-top: 16px; margin-bottom: 0; }
/* 明细展开块（供应商流水时间线用） */
.fin-detail-box { margin-top: 14px; border: 1px solid #e3e8ef; border-radius: 10px; padding: 12px 14px; background: var(--brand-pale); }
.fin-detail-title { font-weight: 600; font-size: 13px; margin-bottom: 10px; color: #3a4150; }
/* 供应商应付 */
.fin-sup-toolbar { display: flex; gap: 8px; align-items: center; margin: 6px 0 16px; flex-wrap: wrap; }

/* =================== z650（陶总 2026-09-16）：供应商库抽屉 ===================
   样式复刻制作表单「抬头库」抽屉（docs.css .docs-drawer/.tlib-*），z-index 高于
   .modal-overlay(1000) —— 抽屉从付款登记弹层之上滑出。 */
.fin-lib-mask { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 2000; }
.fin-lib-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; z-index: 2001;
  background: #fff; box-shadow: -4px 0 18px rgba(0,0,0,.16);
  display: flex; flex-direction: column;
}
.flib-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid #e6e8eb; font-size: 14px;
}
.flib-head .flib-grow { flex: 1; }
.flib-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: #888; cursor: pointer; padding: 0 4px; }
.flib-close:hover { color: #333; }
.flib-form { padding: 12px 14px; border-bottom: 1px solid #e6e8eb; background: var(--brand-pale); }
.flib-form-title { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.flib-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #556; }
.flib-field input { font-size: 13px; padding: 6px 8px; border: 1px solid #d6dce4; border-radius: 6px; box-sizing: border-box; }
.flib-form-btns { display: flex; gap: 8px; margin-top: 10px; }
.flib-form-btns .btn { padding: 6px 18px; }
.flib-tools { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #f0f2f5; }
.flib-tools input { flex: 1; font-size: 13px; padding: 6px 8px; border: 1px solid #d6dce4; border-radius: 6px; box-sizing: border-box; min-width: 0; }
.flib-add {
  background: var(--brand); color: #fff; border: none; border-radius: 8px; height: 34px;
  padding: 0 14px; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.flib-add:hover { background: var(--brand-strong); }
.flib-add:active { transform: scale(0.97); }
.flib-list { flex: 1; overflow-y: auto; padding: 8px 14px 20px; }
.flib-empty { color: #999; font-size: 13px; text-align: center; padding: 28px 0; }
.flib-item { border: 1px solid #e6e8eb; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--brand-pale); }
.flib-item .flib-main { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.flib-item .flib-sub { font-size: 12px; color: #666; margin-top: 4px; line-height: 1.5; }
.flib-acts { display: flex; gap: 6px; margin-top: 8px; }
.flib-acts .flib-mini {
  border: 1px solid #ccd2d9; background: #fff; color: #333; border-radius: 5px; cursor: pointer; padding: 4px 10px; font-size: 12px;
}
.flib-acts .flib-mini:hover { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }
.flib-acts .flib-mini.danger { color: #c62828; }
.flib-acts .flib-mini.danger:hover { background: #fff5f5; border-color: #c62828; color: #c62828; }
.fin-sup-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fin-sup-card {
  border: 1px solid #e6ebf3; border-radius: 12px; padding: 13px 15px; background: #fff; cursor: pointer;
  box-shadow: 0 1px 3px rgba(23,43,77,.05);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.fin-sup-card:hover { box-shadow: 0 5px 16px rgba(23,43,77,.13); transform: translateY(-2px); }
.fin-sup-card.fin-open { border-color: var(--brand); background: var(--brand-pale); box-shadow: 0 3px 10px rgba(32, 77, 243,.12); }
.fin-sup-name { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.fin-sup-nums { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5a6270; }
.fin-sup-nums b { color: #2a3140; }
.fin-sup-ops { display: flex; gap: 8px; margin-top: 10px; }
/* 流水时间线 */
.fin-ledger-list { display: flex; flex-direction: column; gap: 6px; }
.fin-ledger-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: 8px; background: #fff; border: 1px solid #eef1f5; }
.fin-ledger-date { color: #8a8f99; font-variant-numeric: tabular-nums; }
.fin-ledger-badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef1f5; color: #5a6270; }
.fin-ledger-item.fin-out .fin-ledger-badge { background: linear-gradient(135deg, #e1f0ef 0%, #f1f7f6 100%); color: #05978c; }
.fin-ledger-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-ledger-item.fin-in .fin-ledger-amount { color: #05978c; }
.fin-ledger-item.fin-out .fin-ledger-amount { color: #2a3140; }
.fin-ledger-method { font-size: 12px; color: #8a8f99; }
.fin-ledger-note { font-size: 12px; color: #8a8f99; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-ledger-del { margin-left: auto; border: none; background: none; color: #c0392b; font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; }
/* =================== z736（陶总 2026-10-08）：付款登记页改造 ===================
   看板（三大总额 + 本月应付/已付 + 近 6 月趋势）+ 供应商卡（按还欠降序）+ 全量流水表（可编辑） */
.fin-sec-head {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 14px; font-weight: 700; color: #23304a;
  margin: 20px 0 10px; padding-left: 9px; border-left: 4px solid var(--brand);
}
.fin-sec-hint { font-size: 12px; font-weight: 400; color: #8a8f99; }

/* z740 视觉升级：页面浅蓝灰底，白卡浮层（解决“太白”） */
#finance-modal .modal { background: linear-gradient(180deg, var(--brand-pale) 0%, #eef2f8 100%); }
#finance-modal .modal-header { background: transparent; border-bottom: 1px solid #e2e8f1; }
#finance-modal .modal-header h2 { color: #23304a; }

/* 看板：五张色调卡（应付蓝 / 已付绿 / 还欠红，浅色渐变底 + 柔投影） */
.fin-dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fin-stat {
  border: 1px solid #e6ebf3; border-radius: 12px; padding: 12px 15px;
  background: #fff; box-shadow: 0 1px 3px rgba(23,43,77,.06);
}
.fin-stat-label { font-size: 12px; color: #7a828f; }
.fin-stat-val { font-size: 21px; font-weight: 700; margin-top: 4px; color: #2a3140; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.fin-stat-sub { font-size: 11px; color: #9aa1ac; margin-top: 3px; }
.fin-stat.tone-pay { background: linear-gradient(135deg, var(--brand-pale) 0%, var(--brand-pale) 100%); border-color: var(--brand-soft); }
.fin-stat.tone-pay .fin-stat-val { color: var(--brand-strong); }
.fin-stat.tone-paid { background: linear-gradient(135deg, #e1f0ef 0%, #eff6f5 100%); border-color: #d2eae8; }
.fin-stat.tone-paid .fin-stat-val { color: #05978c; }
.fin-stat.tone-owe { background: linear-gradient(135deg, #fcf0ef 0%, #fffbfa 100%); border-color: #f4d6d3; }
.fin-stat.tone-owe .fin-stat-val { color: #c0392b; }
.fin-stat.tone-owe.fin-zero { background: linear-gradient(135deg, #edf5f4 0%, #fcfdfd 100%); border-color: #d2eae8; }
.fin-stat.tone-owe.fin-zero .fin-stat-val { color: #05978c; }

/* 供应商卡：还欠降序 + 最近交易日 */
.fin-sup-rank { display: inline-block; font-size: 11px; color: #9aa1ac; font-weight: 400; margin-right: 5px; }
.fin-sup-last { font-size: 11px; color: #9aa1ac; margin-top: 6px; }

/* 流水筛选工具条 */
.fin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
/* z744（陶总 2026-10-08）：下拉原生箭头太贴右边框 → 换全站统一的自定义箭头（right 10px + padding-right 28px） */
.fin-tools select, .fin-tools input {
  font-size: 13px; padding: 6px 8px; border: 1px solid #d6dce4; border-radius: 6px;
  background: #fff; color: #2a3140; box-sizing: border-box; height: 34px;
}
.fin-tools select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
.fin-tools select:focus, .fin-tools input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(32, 77, 243,.13);
}
.fin-tools input { flex: 1; min-width: 140px; }
/* z745（陶总 2026-10-08）：「全部类型」固定宽（按自身自然宽度）；
   z746：「全部月份」放宽到 108px —— 月份选项标签是「2026年10月」（实测文字宽 69px
   + 左内边距 8 + 右内边距 28〔箭头区〕+ 边框 2 = 107px），96px 会把选项文字裁掉，
   108px 刚好放得下并留 1px 余量。 */
#fin-flt-type { width: 96px; }
#fin-flt-month { width: 108px; }
.fin-mini-btn {
  border: 1px solid #ccd2d9; background: #fff; color: #333; border-radius: 6px;
  cursor: pointer; padding: 0 12px; font-size: 12px; height: 34px; white-space: nowrap;
}
.fin-mini-btn:hover { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }

/* 流水表 */
.fin-table-wrap { border: 1px solid #e6ebf3; border-radius: 12px; overflow: auto; max-height: 380px; background: #fff; box-shadow: 0 1px 3px rgba(23,43,77,.05); }
table.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fin-table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--brand-pale); color: #4a5468;
  font-weight: 600; font-size: 12px; text-align: left; padding: 9px 10px; white-space: nowrap;
  border-bottom: 1px solid #e3e8ef;
}
table.fin-table thead th, table.fin-table tbody td { text-align: center; }   /* z744（陶总 2026-10-08）：表头与内容居中对齐 */
table.fin-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
table.fin-table tbody tr:last-child td { border-bottom: 0; }
table.fin-table tbody tr:hover td { background: #fafbfd; }
.fin-td-date { color: #6b7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-td-sup { font-weight: 600; color: #2a3140; }
.fin-td-amt { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }  /* z745：金额列居中 */
.fin-td-amt.fin-in { color: #05978c; }
.fin-td-amt.fin-out { color: #2a3140; }
.fin-td-note { color: #8a8f99; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-td-by { color: #9aa1ac; font-size: 12px; white-space: nowrap; }
.fin-td-ops { text-align: right; white-space: nowrap; }
.fin-op {
  border: 1px solid #ccd2d9; background: #fff; color: #333; border-radius: 5px;
  cursor: pointer; padding: 3px 9px; font-size: 12px; margin-left: 4px;
}
.fin-op:hover { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }
.fin-op.danger { color: #c62828; }
.fin-op.danger:hover { background: #fff5f5; border-color: #c62828; color: #c62828; }
.fin-badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef1f5; color: #5a6270; white-space: nowrap; }
.fin-badge.in { background: linear-gradient(135deg, #e1f0ef 0%, #f1f7f6 100%); color: #05978c; }
.fin-badge.by-hand { background: #fff4e5; color: #b26a00; }
.fin-sub-row td { background: var(--brand-pale); font-size: 12px; color: #8a8f99; padding-top: 0; }

/* ================= z761（陶总 2026-10-09）：应收应付左右分栏 =================
   左「应收」(fin-panel-ar) / 右「应付」(fin-panel-ap)，两侧同构；每侧自带库/看板/卡片/流水表。 */
#finance-modal .modal.fin-modal { width: 1480px; max-width: 97vw; }
.fin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
/* z891（陶总 2026-10-31）：应收/应付两大框改**白色卡片** —— 原来是 var(--brand-pale) 浅蓝底，
   陶总要求跟报价、登记订单、开票页一样用白底卡片。边框统一 #e8e8e8（与看板卡片一致）。 */
.fin-side { min-width: 0; background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 14px 16px 16px; }
.fin-side-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.fin-side-title { font-size: 15px; font-weight: 700; color: #23304a; padding-left: 9px; border-left: 4px solid var(--brand); }
.fin-side-sub { font-size: 12px; color: #8a92a0; }
/* 分栏后每侧变窄：看板/卡片密一点，表格高度收一点（两侧各滚各的） */
.fin-side .fin-sup-toolbar { margin: 4px 0 12px; }
.fin-side .fin-dash-cards { grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 9px; }
.fin-side .fin-stat { padding: 10px 12px; }
.fin-side .fin-stat-val { font-size: 18px; }
/* z864：陶总要求「供应商应付和客户应付改成一行 3 个卡片」
   （原来 auto-fill + minmax(198px) → 按栏宽算只能排 2 个）
   ⚠️ 用 minmax(0,1fr) 而不是 1fr：栏宽不够时内容不被撑破格子 */
.fin-side .fin-sup-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fin-side .fin-sec-head { margin: 16px 0 9px; font-size: 13px; }
.fin-side .fin-table-wrap { max-height: 300px; }

/* 窄屏：左右分栏改上下堆叠（页面本身 95vw 宽，1180px 以下就该堆了） */
@media (max-width: 1180px) {
  .fin-split { grid-template-columns: 1fr; }
  .fin-side .fin-table-wrap { max-height: 380px; }
}

/* 窄屏 */
@media (max-width: 720px) {
  .fin-sup-cards { grid-template-columns: 1fr; }
  .fin-side .fin-sup-cards { grid-template-columns: 1fr; }
  .fin-dash-cards { grid-template-columns: repeat(2, 1fr); }
  .fin-tools select { flex: 1 1 40%; }
  /* 窄屏表格不删列（会与表头错位），交给 .fin-table-wrap 横向滚动 */
  table.fin-table { min-width: 620px; }
}

/* ================= z652（陶总 2026-09-17）：开票弹窗 ================= */
.inv-sec { margin-bottom: 16px; }
/* z904（陶总 2026-10-31）：三步骤卡片化（设计稿已确认）——
   · 段落壳：浅蓝/浅绿/浅黄 tone 底 → **白底圆角14卡 + 1px #e8e8e8 边框**（与看板列卡片同观感）；
   · 标题行：通栏实底品牌蓝白字（负 margin 外扩贴住卡片边缘、顶部圆角由 overflow:hidden 裁出）；
   · 步骤 ①②③ 序号文字换成白色描边 SVG 小图标（.inv-step-ico，HTML 已内联）；
   · 「已选 N 单 · 开票合计」徽章从列表下方挪进 ① 标题行右侧（id 不变，JS 照常更新）；
   · ④ 开票任务：白卡 + 浅蓝标题行（.inv-sec-4），不抢主色。 */
/* z905（陶总 2026-10-31）：卡片白底改 50% 透明（rgba(255,255,255,.5)），透出页面浅蓝渐变 */
.inv-sec-tone { background: rgba(255,255,255,.5); border: 1px solid #e8e8e8; border-radius: 14px; padding: 0 14px 14px; overflow: hidden; }
.inv-sec-tone .inv-sec-title {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 0 -14px 12px; padding: 9px 14px;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600; border-bottom: none;
}
.inv-sec-tone .inv-sec-title .inv-hint { color: rgba(255,255,255,.72); }
/* 步骤小图标（白色描边，跟侧栏 sb-ico 同一线条风格） */
.inv-step-ico { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* ① 标题行右侧的白色计数徽章（原 .inv-sel-bar 从列表下方挪入标题行） */
.inv-sel-bar { margin-left: auto; background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 11px; font-size: 12px; font-weight: 400; color: #fff; white-space: nowrap; }
.inv-sel-bar b { color: #fff; font-variant-numeric: tabular-nums; }
/* ④ 开票任务：白卡 + 浅蓝标题行 */
.inv-sec-4 { background: rgba(255,255,255,.5); border: 1px solid #e8e8e8; border-radius: 14px; padding: 0 14px 14px; overflow: hidden; }
.inv-sec-4 .inv-sec-title {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 0 -14px 12px; padding: 9px 14px;
  background: var(--brand-pale); color: var(--brand-strong);
  font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--brand-soft);
}
.inv-sec-4 .inv-sec-title .inv-hint { color: #7d8aa0; }
.inv-sec-title { font-size: 13px; font-weight: 600; color: #303133; margin-bottom: 8px; }
.inv-hint { font-weight: 400; font-size: 12px; color: #8a8f99; margin-left: 6px; }
.inv-search {
  width: 100%; box-sizing: border-box; height: 38px; padding: 7px 10px; margin-bottom: 8px;
  border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px;
}
.inv-search:focus { outline: none; border-color: var(--brand); }
/* z1026（陶总 2026-11-12）：「选择订单」列表高度 **380px → 190px**（缩短一半）。
   陶总原话：「这个框缩短一半」（截图红框圈的就是列表区）。
   沿革：z864 64px（1 行）→ z1023 380px（保证任意位置见 5 行）→ **z1026 190px（陶总嫌太高）**。
   行高参考（z1023 实测）：客户分组头 27.5px ｜ 订单行 33.5px → 190px ≈ 1 头 + 4 行订单。
   ⚠️ 弹窗自身 max-height:90vh + overflow-y:auto → 列表变高不会撑破屏幕，弹窗整体可滚。 */
.inv-order-list {
  max-height: 190px; overflow-y: auto;
  border: 1px solid #e6e8eb; border-radius: 8px; background: #fff;
}
/* 客户名过长时不要换行 —— 否则分组头高度不定，红框高度就会跳 */
.inv-cust-hd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-cust-hd {
  position: sticky; top: 0; z-index: 1;
  padding: 5px 10px; background: #f6f7f9; border-bottom: 1px solid #eef0f2;
  font-size: 12px; font-weight: 600; color: #5b6270;
}
.inv-ord-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; font-size: 13px; color: #303133;
  border-bottom: 1px solid #f4f5f7; cursor: pointer;
}
.inv-ord-row:last-child { border-bottom: 0; }
.inv-ord-row:hover { background: #fafbfc; }
.inv-ord-disabled { opacity: .4; cursor: not-allowed; }
.inv-ord-no { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-ord-date { font-size: 12px; color: #8a8f99; }
.inv-ord-amt { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
/* z904：旧版列表下方的 .inv-sel-bar 文本样式已删除 —— 徽章样式见上方 z904 块（挪进 ① 标题行右侧） */
/* ④ 开票任务列表：**不设高度上限**，由内容撑开（任务多了弹窗自己滚，靠 .modal 的 overflow-y:auto）。
   overflow:hidden 只为圆角裁切，不是限制高度。
   ⚠️ z1024（「总高压到 1250px」→ 给这里加 max-height:210px）已被 z1025 回滚作废（陶总：改错了，回到刚才）。 */
.inv-task-list { border: 1px solid #e6e8eb; border-radius: 8px; background: #fff; overflow: hidden; max-height: 340px; overflow-y: auto; }  /* z1098：30 条任务时可滚动 */
.inv-task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; font-size: 12.5px; color: #303133;
  border-bottom: 1px solid #f4f5f7;
}
.inv-task-row:last-child { border-bottom: 0; }
.inv-task-cust { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-task-type { color: #8a8f99; }
.inv-task-unit { color: #8a8f99; }
.inv-task-amt { font-variant-numeric: tabular-nums; }
.inv-task-no { color: #5b6270; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.inv-task-msg { padding: 0 10px 8px 10px; font-size: 12px; color: #c53030; }
/* z1266（陶总 2026-11-27）：需求行副行 —— 抬头 / 税号 / 开票要求（人工开票照着这行填） */
.inv-task-sub { padding: 0 10px 6px 10px; font-size: 12px; color: #4b5563; line-height: 1.75; word-break: break-all; }
.inv-task-sub .inv-sub-k { color: #9aa0aa; }
.inv-task-sub .inv-sub-sep { color: #d4d7dd; }
.inv-st { flex: none; padding: 1px 7px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.inv-st-wait { background: #fdf3e3; color: #b7791f; }
/* z715：待审核（业务员已申请、等管理员开票） */
.inv-st-review { background: #f3ecfe; color: #6b46c1; }
/* z715：管理员审批【开票】按钮 —— 实心蓝，与灰边「取消/重试」区分开 */
.inv-approve {
  flex: none; padding: 2px 12px; border: 1px solid var(--brand); border-radius: 5px;
  background: var(--brand); color: #fff; font-size: 12px; cursor: pointer;
}
.inv-approve:hover { background: var(--brand); border-color: var(--brand); }
.inv-st-run { background: var(--brand-pale); color: var(--brand-strong); }
.inv-st-done { background: #ebf3f3; color: #0da79c; }
.inv-st-fail { background: #fdecea; color: #c53030; }
.inv-empty { padding: 14px; text-align: center; color: #a0a6b0; font-size: 13px; }
.inv-retry {
  flex: none; padding: 2px 9px; border: 1px solid #dcdfe6; border-radius: 5px;
  background: #fff; color: #5b6270; font-size: 12px; cursor: pointer;
}
.inv-retry:hover { border-color: var(--brand); color: var(--brand); }

/* =================== z710（陶总 2026-09-23）：订单记录表分页条 =================== */
/* 表格每页只渲染 100 行（renderOrderTable 分页切片），这里是表格下方的翻页条。 */
.list-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 6px;
}
.list-pager .pager-btn {
  height: 30px;
  padding: 0 14px;
  border: 1px solid #d8dfe8;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
}
.list-pager .pager-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.list-pager .pager-btn:disabled { opacity: .4; cursor: default; }
.list-pager .pager-info { font-size: 12px; color: #8a94a6; font-variant-numeric: tabular-nums; }

/* ============================================================
   z768（陶总 2026-10-10）：移动端整体紧凑化 + 页面模式返回按钮
   需求原话：「字可以再小一点，每个页面都紧凑一点点，上下的间距缩窄，
   每个页面都要可以关闭和返回，现在我的手机是看不到关闭和返回按钮的」
   口径：
   ① 字号整体下调 1px（body 13→12，各页特征字号 -1）
   ② 顶栏 48→44 / 底部导航 57→47 / 各页 modal-body 内边距收紧
   ③ 返回按钮 .topbar-back 静态写在 index.html .topbar-left 里，
      默认 display:none，仅「移动端 + 页面模式」露出 —— 桌面仍走 .page-nav 页签，
      看板首页不显示返回。
   ④ ⚠️ 权重陷阱（本段调试实录）：
      - 搜索框基线 #customer-search/#inquiry-search/#group-search 是 ID 选择器（14px/38px）；
      - 对账页基线 #group-modal .modal-body / #group-modal .grp-table th 也是 ID；
      class 选择器写再多条也压不过 1 个 ID → 本段必须用同族 ID 选择器改写。
   ⑤ 已按 360/375/390/412 四种宽度 CDP 实测：横向溢出 0、越界元素 0、
      六个功能页返回按钮 h26×w64 全部可见；看板页无返回（首页）。
   ============================================================ */
/* z768 移动端紧凑化 候选补丁（陶总 2026-10-10：「字再小一点/每个页面紧凑一点点/上下间距缩窄/每个页面都要可以关闭和返回」） */

/* 返回按钮基线：桌面/看板一律不显示，只在移动端页面模式（?p=xxx）露出。
   ⚠️ 这条必须在 @media 之外 —— 若写进媒体查询，桌面 page-mode 下也会冒出来（.page-nav 已承担导航）。 */
.topbar-back { display: none; }

@media (max-width: 768px) {
  /* ① 顶栏 48 → 44 */
  .topbar { height: 44px; padding: 0 10px; }
  .logo { font-size: 15px; }
  html.page-mode .topbar { justify-content: flex-start; gap: 10px; }
  /* 返回按钮 + logo 横排一行（.topbar-left 默认 block，会两行撑破 44px 顶栏） */
  html.page-mode .topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
  html.page-mode .logo { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.page-mode .topbar-back {
    display: inline-flex; align-items: center;
    padding: 5px 11px; border-radius: 14px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .5);
    color: #fff; font-size: 12px; line-height: 1.2; white-space: nowrap;
    font-family: inherit; cursor: pointer;
  }

  /* ② 垂直节奏跟随 44px */
  html.page-mode body { padding-top: 44px; }
  html.page-mode .modal-overlay.page-active .modal { min-height: calc(100vh - 44px); }
  html.page-mode[data-page="orders"] .modal-overlay.page-active .modal,
  html.page-mode[data-page="customers"] .modal-overlay.page-active .modal,
  html.page-mode[data-page="groups"] .modal-overlay.page-active .modal,
  html.page-mode[data-page="finance"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal { height: calc(100vh - 44px) !important; }

  /* ③ 底部导航瘦身 57 → ~52 */

  /* ④ 字号整体下调 1px */
  body { font-size: 12px; }
  .section-header h2 { font-size: 14px; }
  .filter-tab { font-size: 11.5px; padding: 3px 9px; }
  .card-filename { font-size: 13px; }   /* z892：文件名单独保持 13px，不跟元数据缩到 11.5 */
  .card-customer, .card-amount { font-size: 11.5px; }

  /* 报价页 */
  html.page-mode[data-page="quote"] .fq-label { font-size: 12px; flex: 0 0 66px; }
  html.page-mode[data-page="quote"] .fq-input,
  html.page-mode[data-page="quote"] .csx-val { font-size: 13px; }
  html.page-mode[data-page="quote"] .fq-cat-btn { font-size: 12px; padding: 5px 11px; }
  html.page-mode[data-page="quote"] .fq-card-title { font-size: 14px; margin-bottom: 8px; }
  html.page-mode[data-page="quote"] .fq-field,
  html.page-mode[data-page="quote"] .fq-field-wide { margin: 5px 0; }

  /* 登记订单页 */
  html.page-mode[data-page="order"] .form-group label,
  html.page-mode[data-page="order"] .detail-label { font-size: 12px; margin-bottom: 4px; }
  html.page-mode[data-page="order"] .form-group { margin-bottom: 10px; }
  html.page-mode[data-page="order"] .detail-form-row { margin-bottom: 10px; }
  html.page-mode[data-page="order"] .form-group input,
  html.page-mode[data-page="order"] .form-group select,
  html.page-mode[data-page="order"] .detail-inline-item input,
  html.page-mode[data-page="order"] .detail-inline-item select,
  html.page-mode[data-page="order"] .detail-form-row input,
  html.page-mode[data-page="order"] .detail-form-row select,
  html.page-mode[data-page="order"] .product-textarea { font-size: 13px; }

  /* 列表页（订单记录/客户信息/订单对账） */
  .list-tab { font-size: 12px; padding: 6px 10px; }
  .inquiry-table th, .inquiry-table td { font-size: 12px; }
  .inquiry-table th { padding: 6px 10px; }
  .inquiry-table td { padding: 6px 10px; }
  /* z1219m（陶总 2026-11-22）：移动端表头列与列之间显示竖线 —— 横向滑动/拖列宽时能精准看出
     每列的宽度边界（桌面端不加，保持原有通栏浅灰表头）。
     ⚠️ z1219n 两连修正（CDP 截图+像素扫描实证）：
     ① 不能用 border-right —— border-collapse:collapse 下竖边框由表格统一绘制，Chromium 对
        position:sticky 的 th 直接不画（计算样式有、渲染没有）。
     ② 改背景渐变也不能画在右缘 —— collapse 下相邻单元格在边界处重叠 1px，后绘制的（右侧）
        th 的不透明背景会把左邻 th 右缘的线盖掉（右缘线全被吃了，像素扫描 0 命中）。
     终版：竖线画在每个 th 的【左缘】（首列除外）—— 绘制顺序左→右，右列后画、其左缘线必然存活。
     .modal-fullscreen 的 th 有更高优先级的 background 简写，同 selector 一并覆盖。 */
  .inquiry-table th,
  .modal-fullscreen .inquiry-table th {
    background-image: linear-gradient(to right, #d9d9d9 0 1px, transparent 1px);
  }
  .inquiry-table th:first-child { background-image: none; }
  /* ⚠️ 搜索框基线是 ID 选择器（#customer-search/#inquiry-search/#group-search，14px/38px），
     class 选择器压不过 → 必须用同族 ID 选择器改写 */
  #customer-search, #inquiry-search, #group-search {
    height: 34px; padding: 7px 10px 7px 32px; font-size: 13px;
  }
  .inquiry-search-bar .inquiry-count, .cust-count { font-size: 12px; }
  html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-body { padding: 8px 8px 56px; }
  /* ⚠️ 对账页基线是 #group-modal .modal-body（16px 20px，1 个 ID）→ 必须带 #group-modal 才能盖掉 */
  html.page-mode[data-page="groups"] #group-modal .modal-body { padding: 8px 8px 56px; }
  html.page-mode[data-page="finance"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal-body { padding: 8px 8px 56px; }
  /* ⚠️ 对账页表头/单元格列距基线也是 ID（#group-modal .grp-table th/td） */
  #group-modal .grp-table th, #group-modal .grp-table td { padding-left: 6px; padding-right: 6px; }

  /* 报价/登记页卡片内边距与底部让位 */
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body { padding: 10px; }
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal { padding-bottom: 80px; }
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal { padding-bottom: 80px; }

  /* 看板 */
  .main-content { padding: 6px; padding-bottom: 58px; gap: 6px; }
  .section-header { margin-bottom: 6px; }
}

/* ============================================================
   z769（陶总 2026-10-10 下午）：① 报价页移动端一行 2 个输入框（对齐客户端门户）
   ② 关闭/返回入口加固（「这个界面又关不掉了，没有关闭按钮」）
   口径：
   ① 报价页 ≤899px 改 repeat(2,1fr) 两列 + label 在上（与客户端 .cq-form 同款）；
     成品尺寸（双输入）/工艺/备注提示行仍跨整行。
     ⚠️ label 必须 !important —— z768 段与 899 段各有同权重 flex:0 0 xx 规则，
     column 布局下 flex-basis 变成高度，会把 label 顶成 72px 高。
   ② 弹窗页头吸顶规则原先只在 ≤768px（4083 行），现提升为全局（排除 page-active）；
     页面模式顶栏移动端改 position:fixed（sticky 在部分手机浏览器/缩放场景会失效）。
   ⚠️ 手机上若仍见旧界面，是浏览器缓存了旧 HTML —— 下拉刷新或关掉标签页重开。
   ============================================================ */
/* z769 候选补丁：① 弹窗页头吸顶（任意宽度） ② page-mode 顶栏 fixed 加固 ③ 报价页一行 2 个 */

/* ① 弹窗（非页面模式）页头吸顶 —— 任何屏宽下滚动都能看到关闭钮（原规则仅在 ≤768px 存在） */
.modal-overlay:not(.page-active) .modal-header { position: sticky; top: 0; z-index: 10; background: #fff; }

/* ② 页面模式顶栏固定 —— 滚动时恒在视口顶部（sticky 在部分移动端浏览器/缩放场景会失效） */
@media (max-width: 768px) {
  html.page-mode .topbar { position: fixed; left: 0; right: 0; top: 0; width: 100%; z-index: 500; }
  html.page-mode .modal-overlay.page-active .modal-header { top: 44px; }
}

/* ③ 报价页：移动端一行 2 个字段（对齐客户端门户 .cq-form：1fr 1fr + label 在上） */
@media (max-width: 899px) {
  html.page-mode[data-page="quote"] .fq-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 10px; row-gap: 2px;
  }
  html.page-mode[data-page="quote"] .fq-field,
  html.page-mode[data-page="quote"] .fq-field-wide {
    flex-direction: column; align-items: stretch; gap: 3px; margin: 5px 0;
  }
  /* ⚠️ 必须 !important：z768 段与 899 段各有同名同权重规则（flex:0 0 66px/72px），
     column 布局下 flex-basis 变成"高度"会把 label 顶成 72px 高（一行 111px 高）。 */
  html.page-mode[data-page="quote"] .fq-label {
    flex: 0 0 auto !important; width: auto !important;
    font-size: 12px; text-align: left; white-space: nowrap;
  }
  /* 尺寸等含双输入的字段仍占整行 */
  html.page-mode[data-page="quote"] .fq-field:has(.size-input-group) { grid-column: 1 / -1; }
  html.page-mode[data-page="quote"] .fq-field-wide { grid-column: 1 / -1 !important; }
  html.page-mode[data-page="quote"] .fq-note-row { padding-left: 0 !important; grid-column: 1 / -1; }
  html.page-mode[data-page="quote"] .fq-input {
    height: 36px; min-height: 36px; padding: 0 8px; font-size: 13px; width: 100%;
  }
  html.page-mode[data-page="quote"] .csx-box { height: 36px; padding: 0 8px; }
  html.page-mode[data-page="quote"] .csx-val { font-size: 13px; }
  html.page-mode[data-page="quote"] .fq-ck-group { width: 100%; min-width: 0; gap: 6px 10px; }
}

/* ============================================================
   z770（陶总 2026-10-10 下午）：弹窗关闭按钮钉在屏幕右上角（移动端）
   陶总：「刷新了好几次 这个页面还是关不掉 没有关闭按钮」—— 截图=订单详情弹窗。
   根因：手机浏览器上 .modal 的 -webkit-overflow-scrolling:touch 会让页头
   position:sticky 失效，一滚动页头连同 × 一起滑出视口 → 关不掉
   （桌面 CDP 复现不出来，属移动端内核行为）。
   修法：.modal-close 改 position:fixed 钉在视口右上角（fixed 不参与滚动，
   任何内核都生效）；最大化按钮小屏隐藏让位；页头右侧留 56px 防标题被盖。
   已实测：滚动 900px 后按钮仍在 (362,28)，点击成功关闭弹窗。
   ============================================================ */
/* z770 候选补丁：弹窗关闭按钮固定到屏幕右上角（移动端），不依赖 sticky/滚动容器 */

@media (max-width: 768px) {
  /* 弹窗（非页面模式）的关闭按钮从「页头内」改为「钉在屏幕右上角」。
     根因：手机上 .modal{-webkit-overflow-scrolling:touch} 会使页头的 position:sticky 失效，
     一滚动页头连同 × 一起滑走 → 详情/登记等弹窗在小屏上「关不掉」。
     fixed 不参与滚动，任何情况下都在。 */
  .modal-overlay:not(.page-active) .modal-close {
    position: fixed !important;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 8px;
    z-index: 1300;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 22px; line-height: 1;
    display: flex !important; align-items: center; justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  }
  .modal-overlay:not(.page-active) .modal-close:active { background: rgba(0, 0, 0, .75); }
  /* 最大化按钮在小屏无意义（弹窗本就全屏）→ 让位给悬浮关闭钮 */
  .modal-overlay:not(.page-active) .modal-maximize { display: none !important; }
  /* 页头右侧不再需要按钮，标题左对齐即可 */
  .modal-overlay:not(.page-active) .modal-header { padding-right: 56px; }
}

/* ===== z776（陶总 2026-10-16）：手机端报价页两处修补 =====
   ① 「清空重填」热区：旧规则把它降级成 12.5px 无边框小灰字，实测热区只有 66×26px ——
      手指很容易点在字外（尤其键盘弹着时），表现就是"点了没反应"。窄屏恢复为整行描边按钮。
   ② 新增 .fq-flash：清空后的轻提示（工作台没有 toast 组件），让"有没有生效"一眼可见。 */
@media (max-width: 899px) {
  html.page-mode[data-page="quote"] .fq-actions .btn-outline {
    width: 100%; min-height: 42px; margin: 10px 0 0 !important;
    padding: 10px 0; font-size: 14px; border: 1px solid #dcdfe6; border-radius: 9px;
    background: #fff; color: #5b6875; text-decoration: none;
  }
  html.page-mode[data-page="quote"] .fq-actions .btn-outline:active { background: #f5f7fa; }
}
.fq-flash {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 8px);
  z-index: 99999; max-width: 78vw; padding: 9px 16px; border-radius: 20px;
  background: rgba(28, 34, 44, .92); color: #fff; font-size: 13.5px; line-height: 1.3;
  text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.fq-flash.on { opacity: 1; transform: translate(-50%, 0); }

/* z779（陶总 2026-10-16）：登录密码框改用 type=text + 文本遮蔽 ——
   页面里彻底不放 type=password 元素，浏览器/系统的「自动填充密码」信号随之消失
   （只要页面里存在 password 字段，手机点**任意**输入框都可能弹自动填充密码）。
   -webkit-text-security 在 Chromium / WebKit 全系（含夸克、微信内置浏览器）均支持，
   视觉与原生密码框的圆点完全一致；不支持的浏览器由 app.js 的 ensurePwMask() 兜底回退。 */
.login-pw-mask { -webkit-text-security: disc; }

/* ============================================================
   z780（陶总 2026-10-19）：移动端列表页精简
   陶总原话：「移动端有些功能精简下，导出对账单和导出订单功能去掉，
   左边的搜索框拉大，现在太小了，都没法输入；订单记录表和客户档案表
   右边的操作列都不要」。
   根因（截图量化）：窄屏下 .inquiry-search-bar 仍是「搜索框 + 计数 +
   清除筛选 + 2 个 .btn-statement」的单行 flex，.btn-statement 基线固定
   97px 且 flex-shrink 不为 0 → 搜索框被压到只剩 ~56px，连点开键盘都
   没地方落脚。操作列（col-ops 185px / col-action 140px）还是 sticky 右侧，
   在窄屏里占掉近三分之一屏宽，而内容只有「编辑/复制/删除」几个按钮。
   处理（**仅窄屏**，桌面端一律不动）：
     ① 隐藏两个导出按钮（按 id 精准隐藏，客户页的「新增客户」保留）；
     ② 搜索框独占一行（flex-basis:100% + wrap），计数/清除筛选落到第二行；
     ③ 隐藏订单记录表 col-ops 与客户档案表 col-action 两个操作列。
   ⚠️ 隐藏操作列后窄屏没有编辑/删除入口 —— 若要保留，需要另做「点行进详情」。
   ============================================================ */
@media (max-width: 768px) {
  /* ① 导出对账单 / 导出订单 —— 小屏隐藏（导出是低频重活，桌面端做更合适） */
  #btn-exp-statement, #btn-exp-orders { display: none !important; }

  /* ② 工具条换行：搜索框独占第一行铺满，计数与清除筛选落到第二行左侧 */
  .inquiry-search-bar { flex-wrap: wrap; gap: 8px; }
  .inquiry-search-bar .search-input-wrap { flex: 1 1 100%; min-width: 0; }
  /* 搜索框本体基线是 ID 选择器（38px/14px），这里同族 ID 改写为更适手的窄屏尺寸 */
  #customer-search, #inquiry-search, #group-search {
    height: 40px; padding: 9px 12px 9px 34px; font-size: 14px;
  }
  .inquiry-search-bar .inquiry-count { flex: 0 0 auto; }

  /* ③ 操作列窄屏隐藏 —— th 与 td 必须成对隐藏，否则表头与数据错位 */
  .inquiry-table th.col-ops, .inquiry-table td.td-ops,
  .inquiry-table th.col-action, .inquiry-table td.col-action-cell {
    display: none !important;
  }
}

/* ============================================================
   z821（陶总 2026-10-22）：「非平台」标签
   陶总原话：「不是平台付款的订单，都打个[非平台]的标签，让我可以在看板首页搜索到」

   z841（陶总 2026-10-27 19:45）改版 —— 陶总原话：
   「非平台的标只打在首页的卡片上，其他地方不要打标；
     打标的形式改下，改成一枚颜色鲜亮的小标签，不要现在的文字形式，
     难看又不明显又占空间」
   ⇒ ① 只保留在**首页看板卡片**上（订单记录表那一处已删）；
     ② 形式：从「灰底 + 非平台三个字」改成**纯色书签小标签**（玫红、无文字）——
        含义靠悬停提示（title）说明，不再占客户名的横向空间。
   形状：上边平、下边一个 V 形缺口（书签/旗标感），纯色无边框无文字。
   ============================================================ */
/* z846（陶总 2026-10-28 第四轮修正）：书签标 —— **别把卡片边框顶高**
   陶总原话：「不是不要顶出边框 是边框被你的图顶高了！你对比下我截图里的两个框，
                左边的高出了一节，不要让边框变高」

   🔴 真正的病根（前三轮一直修错的地方）：
     书签虽然用 `position:relative` 视觉上移了，但它**仍在 .card-top 的 flex 流里占位**
     （高 26px）→ .card-top 行高被撑到 26px（原客户名行只有 ~18px）
     → **整张卡片变高 ~8px** → 上边框随之下移 → 看起来"左边那张卡的上边框高出一节"。
     ⚠️ 这跟"书签探出多少"无关 —— 顶得高不高，取决于它在流里**占多高**，不是移多少。

   正解：**负 margin-bottom 抵消占位** —— margin-bottom:-8px 让它在行内的"有效占位"
     变成 26-8=18px（正好等于客户名行高）→ **卡片高度完全不变**，边框位置不动。
     书签本身照旧探出上边框（陶总：「不是不要顶出边框」）。

   尺寸：22×26（z845 已缩小，陶总「太大了点」）。形状：顶部两角圆角 + 底部 V 形镂空（左右对称）。

   ⚠️ clip-path 用**固定像素坐标**（path()），尺寸变了必须同步改路径里的坐标。 */
/* z1031（陶总 2026-11-12）：绿色小书签（.card-flag-nonplatform / .cf-body）**整体下线** ——
   陶总原话：「绿色的小书签去掉不要了，卡片上放业务员的名字（醒目）」。
   书签样式规则已删除（含草绿皮肤的覆盖规则）；「非平台」筛选改走搜索虚拟关键词，不依赖标签。
   卡片上的业务员名胶囊（.card-salesman）取代它的"一眼可辨"位置： */
.card-salesman {
  flex: none;                     /* 不被金额/收款方式挤压 */
  margin-left: auto;              /* 🔴 顶到最右 —— 原来收款徽章(.tag-unpaid/.tag-paid)就是靠 margin-left:auto 定位的 */
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #64748b;            /* 默认石板蓝灰 = sm-c4（哈希命中时被 sm-cN 覆盖） */
  padding: 2px 6px;               /* 与 .card-tag 收款徽章同尺寸，位置/体量完全对齐 */
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.4;
}
/* z1040（陶总 2026-11-12）：业务员胶囊**按人分色** —— 姓名哈希定档（app.js salesmanColorClass），
   同一个人永远是同一个颜色。六色都取中等深度、白字可读；默认底色（无哈希类时）保持原橙。 */
/* z1045（陶总 2026-11-13）：六色改成与品牌蓝(#4370fa)同族的低饱和色板 —— 陶总原话：
   「除了红色还行，其他颜色都不太好看」。同明度同饱和度、白字对比均够（≥3:1），
   色相分散保证不同业务员仍一眼可辨：红 / 青 / 品牌蓝 / 紫 / 石板蓝灰 / 梅紫红。
   原 土黄 #d4a017、刺橙 #e8631a、正绿 #2fa360、亮紫 #8e5cd9 全部下线。 */
/* =================== z1049（陶总 2026-11-13）：收款状态「待审」视觉 + 审核弹窗 =================== */
/* 待审徽章：琥珀色描边白底 —— 与三个实心状态色（红/绿/蓝）明显区分，
   一眼看出「还没定」；内容 = 当前状态 → 目标状态 + 小小的「待审」角标。 */
/* 收款状态列宽只有 76px，「已预付→已收款 待审」一整行放不下 →
   允许换行：「已预付→已收款」一行、「待审」角标独占第二行居中。 */
.status-badge.pay-review {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  gap: 1px 2px;
  padding: 2px 5px;
  background: #fffaf0;
  color: #b45309;
  border: 1px dashed #f0b429;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 15px;
  white-space: normal;
}
.status-badge.pay-review .pay-review-arrow {
  font-style: normal;
  color: #d19a12;
  font-weight: 700;
}
.status-badge.pay-review .pay-review-flag {
  font-style: normal;
  background: #f0b429;
  color: #fff;
  border-radius: 6px;
  padding: 0 5px;
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.3px;
}
/* 汇总条上的待审入口（只在管理员且有待审时出现） */
.grp-stat-review {
  background: #fffaf0;
  color: #b45309;
  border: 1px solid #f5d08a;
  border-radius: 8px;
  padding: 2px 9px;
  cursor: pointer;
  font-weight: 600;
}
.grp-stat-review b { color: #c2410c; }
.grp-stat-review:hover { background: #fff3dc; }
.grp-stat-review.active { background: #f0b429; color: #fff; border-color: #f0b429; }
.grp-stat-review.active b { color: #fff; }

/* 审核弹窗（小尺寸，居中） */
.modal-pay-review { width: 420px; max-width: calc(100vw - 32px); }
.modal-pay-review .modal-body { padding: 18px 22px 6px; }
.pay-review-row { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.pay-review-k { flex: none; width: 46px; color: #8b8b8b; }
.pay-review-v { flex: 1; color: #222; word-break: break-all; }
.pay-review-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 14px 0;
  background: #fbfbfc;
  border: 1px solid #eee;
  border-radius: 10px;
}
.pay-review-bigarrow { color: #c9c9c9; font-size: 18px; font-weight: 700; }
.status-badge.pay-review-target {
  background: #eef4ff;
  color: #2563eb;
  border: 1px solid #c7dbff;
  font-weight: 700;
}
.pay-review-hint { font-size: 12px; color: #8b8b8b; line-height: 1.6; padding-bottom: 8px; }
.pay-review-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; }
.btn-pay-review-cancel,
.btn-pay-review-reject,
.btn-pay-review-approve {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-pay-review-cancel { background: #f2f3f5; color: #555; }
.btn-pay-review-cancel:hover { background: #e9eaee; }
.btn-pay-review-reject { background: #fff; color: #d9534f; border: 1px solid #f0b3b1; }
.btn-pay-review-reject:hover { background: #fdf2f2; }
.btn-pay-review-approve { background: var(--brand, #4370fa); color: #fff; font-weight: 600; }
.btn-pay-review-approve:hover { filter: brightness(0.94); }

/* z1048（陶总 2026-11-13）：名单内业务员（如魏彩霞）胶囊**去底色**，仅黑色加粗文字 ——
   名字名单在 app.js SALESMAN_PLAIN_NAMES；!important 用于压过同特异性的 .sm-cN 底色。 */
.card-salesman.sm-plain {
  background: transparent !important;
  color: #17171a;
  padding: 2px 2px;
}
.card-salesman.sm-c0 { background: #d9534f; }   /* 红（陶总点名保留） */
.card-salesman.sm-c1 { background: #1c8a8f; }   /* 深青 */
.card-salesman.sm-c2 { background: #4370fa; }   /* 品牌蓝（与工作台主色同源） */
.card-salesman.sm-c3 { background: #7c5cc9; }   /* 柔紫 */
.card-salesman.sm-c4 { background: #64748b; }   /* 石板蓝灰（低饱和，最百搭） */
.card-salesman.sm-c5 { background: #b0527f; }   /* 梅紫红（与 sm-c0 橙红拉开色相） */
/* z1040：草绿皮肤不再强制统一橙底 —— 原覆盖规则 specificity (0,3,1) 会把所有 sm-cN 压成橙，
   为保证「同一个业务员在两套皮肤下同色」，草绿覆盖规则整体删除（六色白字在两套皮肤都可读）。 */
/* z841：订单记录表那个「非平台」行内文字标（.badge-nonplatform）已**整体删除**
   —— 陶总：「非平台的标只打在首页的卡片上，其他地方不要打标」。样式一并清掉，
   免得留下死代码误导后来人以为还能用。 */

/* ============================================================
   z823（陶总 2026-10-23）：彩澜自动带出的成本**也允许改**
   陶总原话：「彩澜抓取的订单，数量和成本自动填充后，要允许修改」。
   z751 原来把这类格做成"素色不可改"（要改去工单表单里改），现在放开就地改。
   配色刻意与「人工填的成本」（.td-cost-manual 浅蓝）区分：
   用**淡琥珀**表示"这是系统带出来的数，但你可以覆盖它"——
   一眼能看出它来自彩澜而不是人填的，同时不再有"锁死"的暗示。
   ============================================================ */
.inquiry-table td.td-cost-cailan {
  position: relative;
  padding-right: 26px;
  cursor: pointer;
  background: #fffaf0;
  color: #8a5a00;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #f3e2bd;
}
.inquiry-table td.td-cost-cailan:hover { background: #fff3dc; }
.inquiry-table td.td-cost-cailan.td-cost-locked { cursor: default; padding-right: 10px; }
.inquiry-table td.td-cost-cailan.td-cost-locked:hover { background: #fffaf0; }
.inquiry-table tr:hover td.td-cost-cailan .ce-edit-btn { opacity: 1; }

/* =================== z780：报价员练习 =================== */
.tr-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.tr-tab{padding:7px 14px;border:1px solid #d8dfe8;background:#fff;border-radius:8px;font-size:13px;color:#48566a;cursor:pointer}
.tr-tab:hover{border-color:var(--brand);color:var(--brand)}
.tr-tab.active{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}
.tr-card{background:#fff;border:1px solid #e6ebf2;border-radius:12px;padding:16px 18px;margin-bottom:14px;box-shadow:0 1px 3px rgba(23,43,77,.05)}
.tr-card-t{font-size:15px;font-weight:600;color:#1f2d3d;margin-bottom:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tr-sec-t{font-size:13px;font-weight:600;color:#48566a;margin:16px 0 8px;padding-top:10px;border-top:1px solid #eef1f6}
.tr-hint{font-size:13px;color:#6b7a8d;line-height:1.7;margin-bottom:14px}
.tr-hint.sm{font-size:12px;margin:8px 0 0}
.tr-btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.tr-empty{padding:26px 0;text-align:center;color:#9aa4b2;font-size:13px}
.tr-meta{font-size:12px;color:#8a94a6;margin-bottom:12px}
.tr-cond{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin-bottom:12px}
.tr-kv{background:#f6f8fb;border:1px solid #eef1f6;border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:3px}
.tr-k{font-size:11px;color:#8a94a6}
.tr-v{font-size:13px;color:#1f2d3d;font-weight:600}
.tr-asks{background:#fff8e8;border:1px solid #f5e0b0;border-radius:8px;padding:9px 11px;margin-bottom:12px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tr-asks-l{font-size:12px;color:#a0741a;margin-right:2px}
.tr-ask{font-size:12px;color:#8a6410;background:#fff;border:1px solid #f0d9a2;border-radius:20px;padding:2px 10px}
.tr-form{margin-top:10px}
.tr-lbl{display:block;font-size:13px;color:#48566a;margin:12px 0 5px}
.tr-req{color:#d0453b}
.tr-input,.tr-textarea{width:100%;border:1px solid #d8dfe8;border-radius:8px;padding:9px 11px;font-size:14px;box-sizing:border-box;font-family:inherit;color:#1f2d3d;background:#fff}
.tr-input:focus,.tr-textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 2px rgba(32, 77, 243,.13)}
.tr-textarea{resize:vertical;line-height:1.6}
.tr-two{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:4px}
.tr-box{background:var(--brand-pale);border:1px solid #e6ebf2;border-radius:10px;padding:12px 14px;margin-bottom:10px}
.tr-box-t{font-size:12px;color:#8a94a6;margin-bottom:6px}
.tr-big{font-size:24px;font-weight:700;color:#1f2d3d}
.tr-box.std{background:linear-gradient(135deg,#e1f0ef 0%,#eff6f5 100%);border-color:#cde9e7}
.tr-box.std .tr-big{color:#059288}
.tr-box-sub{font-size:12px;color:#6b7a8d;margin-top:6px;line-height:1.6}
.tr-box-sub.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px}
.tr-box-note{margin-top:8px;font-size:13px;color:#48566a;background:#fff;border:1px solid #e6ebf2;border-radius:8px;padding:8px 10px;line-height:1.6}
.tr-step{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:13px;color:#48566a;border-bottom:1px dashed #e4e9f0}
.tr-step:last-child{border-bottom:none}
.tr-step b{color:#1f2d3d;font-variant-numeric:tabular-nums}
.tr-step.total{background:var(--brand-pale);margin:0 -14px;padding:8px 14px;font-weight:600}
.tr-step.total b{color:var(--brand);font-size:15px}
.tr-table{width:100%;border-collapse:collapse;font-size:13px}
.tr-table th{background:var(--brand-pale);color:#48566a;font-weight:600;text-align:left;padding:8px 10px;border-bottom:1px solid #dde5ee;white-space:nowrap}
.tr-table td{padding:8px 10px;border-bottom:1px solid #eef1f6;color:#3c4a5c;vertical-align:top}
.tr-amt{font-variant-numeric:tabular-nums;font-weight:600;color:#1f2d3d;white-space:nowrap}
.tr-amt.std{color:#059288}
.tr-note-cell{max-width:280px;color:#6b7a8d;font-size:12px}
.tr-chat{background:var(--brand-pale);border:1px solid #e6ebf2;border-radius:10px;padding:12px;max-height:460px;overflow-y:auto;margin-bottom:6px}
.tr-msg{margin-bottom:12px;max-width:82%}
.tr-msg.sales{margin-left:auto}
.tr-msg-who{font-size:11px;color:#8a94a6;margin-bottom:3px}
.tr-msg.sales .tr-msg-who{text-align:right}
.tr-msg-t{background:#fff;border:1px solid #e6ebf2;border-radius:10px;padding:9px 12px;font-size:13.5px;line-height:1.65;color:#1f2d3d;white-space:pre-wrap;word-break:break-word}
.tr-msg.sales .tr-msg-t{background:var(--brand-pale);border-color:var(--brand-soft)}
.tr-score{display:flex;align-items:baseline;gap:6px;margin-bottom:12px}
.tr-score b{font-size:30px;color:var(--brand);line-height:1}
.tr-score span{font-size:13px;color:#8a94a6}
.tr-score-c{font-size:13px;color:#48566a;margin-left:8px;flex:1;line-height:1.6}
.tr-dims{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-bottom:12px}
.tr-dim{background:#fff;border:1px solid #e6ebf2;border-radius:8px;padding:9px 11px}
.tr-dim-h{display:flex;justify-content:space-between;font-size:12.5px;color:#48566a;margin-bottom:5px}
.tr-dim-h b{color:var(--brand);font-variant-numeric:tabular-nums}
.tr-bar{height:5px;background:#e8edf3;border-radius:3px;overflow:hidden;margin-bottom:6px}
.tr-bar i{display:block;height:100%;background:var(--brand);border-radius:3px}
.tr-dim-c{font-size:11.5px;color:#6b7a8d;line-height:1.6}
.tr-list{margin-top:10px;padding:9px 12px;border-radius:8px;font-size:12.5px;line-height:1.75}
.tr-list ul{margin:5px 0 0;padding-left:18px}
.tr-list-t{font-weight:600;font-size:12.5px}
.tr-list.good{background:linear-gradient(135deg,#e1f0ef 0%,#eff6f5 100%);border:1px solid #cde9e7;color:#05837a}
.tr-list.bad{background:#fcf0ef;border:1px solid #f2d2cf;color:#a33c34}
.tr-list.sug{background:var(--brand-pale);border:1px solid var(--brand-soft);color:var(--brand-strong)}
.tr-toast{position:fixed;left:50%;bottom:40px;transform:translateX(-50%) translateY(16px);background:#23324a;color:#fff;padding:10px 20px;border-radius:8px;font-size:13px;z-index:10050;opacity:0;transition:all .25s;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.tr-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.tr-toast.err{background:#c0392b}
@media (max-width:768px){
  .tr-two{grid-template-columns:1fr}
  .tr-cond{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
  .tr-chat{max-height:340px}
  .tr-big{font-size:20px}
  .tr-note-cell{max-width:160px}
}

/* =================== z781b（陶总 2026-10-24）：报价练习页顶栏对齐其它功能页 ===================
   陶总截图圈出「← 返回工作台　报价练习」那一整行："顶上不要这样设计，这一行是多余的，
   直接去掉，参考其他功能页顶上的排布"。

   根因：全站 6 个功能页在页面模式（?p=）下都隐藏了页头这一行
     · quote  快速报价   style.css:5179（z548 同款，"客户端没有页头那一行"）
     · order  登记订单   style.css:5317（z548）
     · finance 付款登记  style.css:6415（z649，"顶部页签已高亮当前页，该行纯属重复"）
     · orders 订单记录   style.css:4996（z552）
     · customers 客户信息 style.css:4996（z552）
     · groups 订单对账   style.css:4996（z575c）
   → z780 新加的练习页漏了这条规则 → 页头多出一行，与其它页不一致。

   🔴 z781c 追加（陶总严肃指出"每次新加功能你都做那个头"）：
     本段原本是练习页**专属** CSS，但同款规则在 z781c 已提到**通用层**
     （.page-hide-header / .page-card-body，由 openCurrentPage() 自动打标记）。
     → 这里的专属规则改为「由通用标记驱动」，本页零专属配置。
     → 以后新页面：PAGE_META 里写 cardBody:true 即自动得到同款外观，不会再漏。 */

/* 通用层（z781c）：正文白卡片外观 —— PAGE_META.cardBody === true 时由 openCurrentPage 打标记 */
html.page-mode.page-card-body-bg body { background: transparent;   /* z862：统一走 html 渐变 */ }
html.page-mode .modal-overlay.page-active.page-card-body {
  background: transparent !important;
  padding-top: 0;               /* z857 已删顶部页签 → 不再需要给"已删除的页签行"让位 */
  box-sizing: border-box;
}
/* 🔴 z859（陶总 2026-10-29）：开票页外壳必须与报价页 / 登记订单页完全一致
   ------------------------------------------------------------
   现象：开票页整体是白的，看不到报价页那种「浅灰底 + 白色圆角卡片居中」。

   根因：z533 的页面模式规则只清了 .modal 的 border-radius / box-shadow，
        **没清 background** → .modal 基础规则 `background:#fff` 仍然生效，
        而 z538（报价页）/ z548（登记订单页）各自都有专属段补过
        `html.page-mode[data-page="xxx"] .modal { background: transparent !important }`，
        唯独**通用层 z781c 漏了这一条** → cardBody 类页面（练习/开票/纸张价格）
        的白底 .modal 把整块涂白，浅灰底透不出来。

   ✅ 修法：补进**通用层**（.page-card-body 标记驱动）——
      新页面只要写 `cardBody: true` 就自动得到同款外壳，不会再漏。
      （实测：开票页白卡几何本已与报价页逐字一致 —— 960px / l=391 / 圆角12 / 阴影，
        差的只是外面那层底色。） */
html.page-mode .modal-overlay.page-active.page-card-body .modal {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.page-mode .modal-overlay.page-active.page-card-body .modal-body {
  width: calc(100% - 40px); max-width: 960px; margin: 14px auto; box-sizing: border-box;
  background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(30, 50, 80, .06);
  padding: 16px 20px;
}
/* 🔴 z859（陶总 2026-10-29）：移动端白卡也要与报价页/登记订单页**逐字一致**
   —— 报价页有两级断点：≤899px 给 `calc(100%-28px) / max-width 692 / padding 14px`，
      ≤768px 再把 padding 覆盖成 10px。
   通用层原先只有一条 ≤768px 断点（24px 留白 / 12px 14px 内边距 / 无 max-width）
   → 手机上开票页比报价页宽 4px、左右各差 2px。改成与报价页同一套数值。
   ⚠️ 断点顺序铁律：**899 必须写在 768 之前** —— 同权重时后写者胜，
      顺序反了会让 390px 手机命中 899 块的 padding:14px（覆盖掉 768 的 10px）。 */
@media (max-width: 899px) {
  html.page-mode .modal-overlay.page-active.page-card-body .modal-body {
    width: calc(100% - 28px); max-width: 692px; padding: 14px; border-radius: 12px;
  }
}
@media (max-width: 768px) {
  html.page-mode .modal-overlay.page-active.page-card-body .modal-body {
    width: calc(100% - 28px); max-width: 692px; padding: 10px; border-radius: 12px; margin: 10px auto;
  }
}

/* =================== z782（陶总 2026-10-24）：报价练习记录改造 ===================
   陶总 5 项改动：
     ① 删两处说明文字（"提交后不会告诉你对错" / "整个沟通过程会被记录…"）
     ② 「出题练习」→报价练习；删「我的记录」；「答题查看」→报价记录；「对话查看」→对话记录
     ③ 业务员只看自己的记录，管理员看所有人的（服务端过滤）
     ④ 记录可点击查看 + 可删除
     ⑤ 提交后**直接显示答案和解析**（口径反转：以前是"只提交不提示对错"） */

/* 偏差提示条（⑤ 提交后当场显示"你的报价 vs 系统答案"的差距） */
.tr-diff{margin:10px 0 14px;padding:9px 13px;border-radius:8px;font-size:13px;font-weight:600;line-height:1.5}
.tr-diff.ok{background:linear-gradient(135deg,#e1f0ef 0%,#eff6f5 100%);border:1px solid #cde9e7;color:#05837a}
.tr-diff.near{background:#fff8e8;border:1px solid #f5e0b0;color:#8a6410}
.tr-diff.bad{background:#fcf0ef;border:1px solid #f2d2cf;color:#a33c34}

/* 记录表：行可点击（④） */
.tr-table-click tbody tr.tr-row-click{cursor:pointer;transition:background .12s}
.tr-table-click tbody tr.tr-row-click:hover{background:var(--brand-pale)}
.tr-table-click tbody tr.tr-row-click:hover .tr-ops{opacity:1}
.tr-ops{white-space:nowrap;text-align:right}
.tr-ops .btn-mini{margin-left:4px}
/* 删除按钮（④） */
.btn-mini.tr-del{color:#a33c34;border-color:#e8c4c1}
.btn-mini.tr-del:hover{background:#fcf0ef;border-color:#d0453b;color:#c0392b}
/* 列表页提示（③ 业务员只看到自己的） */
.tr-tip{font-size:12px;font-weight:400;color:#8a94a6}
/* z782：删除的两步式确认（第二次点击时按钮变红 + 文案变化） */
.btn-mini.tr-del-confirm{background:#c0392b;border-color:#c0392b;color:#fff;font-weight:600}
.btn-mini.tr-del-confirm:hover{background:#a93226;border-color:#a93226;color:#fff}

/* =================== z784（陶总 2026-10-24 16:56）：记录表居中 + 操作按钮改描边圆角 ===================
   陶总截图要求：① 两个记录表（报价记录 / 对话记录）**每列都居中**
                  ② 「查看」「删除」按钮太难看 → 改成描边圆角样式（蓝 / 红，见参考图）
   注：只影响 .tr-table（练习页的记录表），不动工作台其它表格。 */

/* ① 表格每列居中（含表头） */
.tr-table th,
.tr-table td{text-align:center}
.tr-table td.tr-note-cell{text-align:center}
/* 场景/说明这类长文本列：居中但仍限宽、允许换行 */
.tr-table td.tr-note-cell{max-width:280px;line-height:1.6;word-break:break-word}

/* ② 操作列：居中、按钮间距 */
.tr-ops{white-space:nowrap;text-align:center}
/* 描边圆角按钮 —— 覆盖全局 .btn-mini（它是 border:none 的灰底样式）
   🔴 作用域用 `#tr-body .btn-mini`（而不是 .tr-ops .btn-mini）：
      详情页里的「返回列表」「删除」按钮不在 .tr-ops 单元格里，
      只限定 .tr-ops 会漏掉它们 → 详情页按钮还是旧样式。 */
#tr-body .btn-mini{
  flex:none;                 /* 全局是 flex:1，撑满整格 → 这里改成按内容宽度 */
  padding:4px 12px;
  border:1px solid #c9d6e6;
  border-radius:8px;
  background:#fff;
  color:var(--brand);
  font-size:12px;
  font-weight:500;
  line-height:1.5;
  transition:all .15s;
}
#tr-body .btn-mini:hover{background:var(--brand-pale);border-color:var(--brand);color:var(--brand)}
/* 删除按钮：红色描边 */
#tr-body .btn-mini.tr-del{border-color:#e8b4b0;color:#c0392b}
#tr-body .btn-mini.tr-del:hover{background:#fcf0ef;border-color:#c0392b;color:#a93226}
/* 两步式确认的第二个态：红底实心（z782 已有，这里加强描边一致性） */
#tr-body .btn-mini.tr-del-confirm{
  background:#c0392b;border-color:#c0392b;color:#fff;font-weight:600;
}
#tr-body .btn-mini.tr-del-confirm:hover{background:#a93226;border-color:#a93226;color:#fff}

/* =================== z785（陶总 2026-10-24 17:32）：记录表**行内上下也居中** ===================
   陶总截图红框：列已经横向居中了，但每行的文字**贴着单元格上边**（vertical-align:top），
   看着不舒展 → 要求「每行的上下也要居中」。
   改法：.tr-table td 的 vertical-align:top → middle
   ⚠️ 口径与全站其它表格一致（如 .fin-table: style.css:6594 也是 vertical-align:middle）。
   注：th 表头默认就是 middle，不用改。 */
.tr-table td{vertical-align:middle}

/* =================== z840（陶总 2026-10-28）：订单层发货建议（重量合计 + 推荐快递/物流）===================
   陶总口径：「发货往往是多个工单一起，重量也要总计显示」→ 汇总与推荐都在**订单层**。
   本组样式服务 5 个落点：登记页预览 / 工单详情页 / 对账页新列 / 订单工单列表顶部 / 打印模板。
   ⚠️ 打印模板用的是内联样式（在 public/app.js 的 printWorkOrder 里），不依赖这里 —— 打印要黑白分明的排版。 */
/* z848（陶总 2026-10-28 晚）：发货建议块从「所属订单」下面挪到表单最下面，
   改成与登记页一样的**上下两行**（收货省份一行 / 发货建议一行）——
   原先的并排布局（.ship-sum-row / .ship-sum-item / .ship-prov-item）已随之删除。 */
.ship-prov-hint { font-size: 12px; color: #888; font-weight: normal; margin-left: 4px; }
/* z932（陶总 2026-11-02）：z930「单独发」勾选框/徽章样式已随该功能撤销删除。 */
/* z850（陶总 2026-10-29）：线下订单省份非必填的说明行 */
.prov-opt-hint { font-size: 12px; color: #b0894a; line-height: 1.5; }

/* 汇总条 */
.ship-sum-box {
  border: 1px solid var(--brand-pale);
  background: var(--brand-pale);
  border-radius: 8px;
  padding: 10px 12px;
}
.ship-sum-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ship-sum-label { font-size: 12px; color: #888; }
.ship-sum-company { font-size: 14px; font-weight: 600; color: var(--brand); }
.ship-sum-company.big { font-size: 16px; }
.ship-sum-price { font-size: 14px; color: #333; }
.ship-sum-price.big { font-size: 16px; font-weight: 600; color: #d35400; }
.ship-sum-kg { font-size: 13px; color: #555; }
.ship-sum-empty { font-size: 13px; color: #999; }
.ship-sum-toggle {
  margin-left: auto;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.ship-sum-toggle:hover { background: var(--brand-pale); }

/* 6 家比价详情（陶总 2026-10-28：比价全列） */
.ship-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--brand-pale);
}
.ship-compare-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
}
.ship-compare-opt.cheapest { border-color: var(--brand); background: var(--brand-pale); }
.ship-compare-name { color: #444; }
.ship-compare-price { color: #666; }
.ship-compare-opt.cheapest .ship-compare-price { color: #d35400; font-weight: 600; }
.ship-compare-flag { color: var(--brand); font-size: 11px; }

/* 紧凑版（对账页新列用）：单行结论 */
/* z901（陶总 2026-10-31）：内容水平居中 —— 该 flex 块只在对账表「发货建议」列用（compact），
   贴左会和居中的列头错位（陶总：「每列表头都和下面的表格居中对齐」）；
   悬停提示（重量/运费）在 title 里，不受布局影响。 */
.ship-sum { display: flex; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ship-sum-empty { color: #999; font-size: 12px; }
.ship-sum .ship-sum-company { font-size: 13px; }
.ship-sum .ship-sum-price { font-size: 13px; }
.ship-sum .ship-sum-kg { font-size: 12px; color: #777; }

/* 登记页实时预览条 */
.ship-preview {
  margin: 10px 0 0;
  border: 1px solid var(--brand-pale);
  background: var(--brand-pale);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.ship-preview-empty { color: #999; }

/* 订单工单列表顶部汇总条 */
.ship-list-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--brand-pale);
  background: var(--brand-pale);
  border-radius: 8px;
}
.ship-list-bar .ship-list-title { font-size: 14px; font-weight: 600; color: var(--brand); }

/* ============================================================
   z856（陶总 2026-10-29）：整体框架改版 —— 功能菜单从顶栏移到**左侧竖排**
   陶总原话：「整体页面的框架参考这个，核心功能菜单都放在左侧，右上角放登录和员工管理，
                之前放上面的功能菜单就不要了」
   ⚠️ 陶总定的顶栏形态：**白底、无色块**，三段式 ——
      左：Logo（点回看板）｜中：搜索框（仅首页）｜右：员工管理 + 用户名角色 + 退出登录
   ⚠️ 侧边栏：桌面端**固定展开**（图标+文字，13 项，竖排 + 分割线分三段）；
      手机端**抽屉式**（顶栏汉堡按钮唤出，遮罩点击关闭）。
   ⚠️ 本段追加在文件末尾 → 层叠优先级最高，可直接覆盖原顶栏样式。
   ============================================================ */

/* ---------- ① 顶栏改白底三段式 ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
  padding: 0 16px 0 12px;
  height: 52px;
  gap: 12px;
  /* 🔴 z856：顶栏改 **fixed**（原来是 sticky，在正常流里）。
     原因：z856 给 body 加了 padding-top:52px 让位给顶栏 —— 若顶栏仍在流里，
     body 的 padding 会把它整体**往下推 52px**，下方留出一条空白带（实测 top=52）。
     改成 fixed + body padding 让位，才是「顶栏贴顶、内容在下方」的正确结构。 */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-width: 150px;
}
.topbar-left .logo {
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  white-space: nowrap;
}
/* 侧边栏已有品牌标识，顶栏 Logo 保留但去掉重复的副标题 */
.logo-sub { display: none; }
/* 顶栏中间：搜索框（仅首页显示，由 JS 控制显隐） */
.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.topbar-search {
  flex: 0 1 320px;
  margin: 0;
  display: none;          /* 默认隐藏 —— 只有看板首页才显示（app.js 控制） */
}
html.page-board .topbar-search { display: block; }
.topbar-search .board-search-input { height: 34px; font-size: 13px; }
/* 顶栏右侧 */
.topbar-right {
  flex: none;
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar-right .role-badge {
  color: #5a6b7d;
  font-weight: 500;
  font-size: 12px;
}
.topbar-right .btn-outline {
  color: #4a5668;
  border-color: #d5dbe3;
  background: #fff;
}
.topbar-right .btn-outline:hover { background: #f2f5f9; border-color: #c2cad4; }
/* 员工管理按钮（顶栏） */
.topbar-emp-btn { color: #4a5668; border-color: #d5dbe3; background: #fff; }
.topbar-emp-btn:hover { background: #f2f5f9; border-color: #c2cad4; }
/* 手机端抽屉开关 */
.topbar-menu-btn {
  display: none;
  width: 32px; height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.topbar-menu-btn svg { width: 18px; height: 18px; fill: none; stroke: #4a5668; stroke-width: 1.6; stroke-linecap: round; }
.topbar-menu-btn:hover { background: #f2f5f9; }

/* ---------- ② 左侧竖排菜单 ---------- */
.sidebar {
  position: fixed;
  top: 0;                          /* z857：顶栏删除 → 侧边栏顶天 */
  left: 0;
  bottom: 0;
  width: 148px;
  /* z889（陶总 2026-10-31）：侧栏底色 #f7f8fa（中性灰）→ #f2f6ff（浅蓝白）
     —— 陶总："左边的灰色跟右边大片的渐变色感觉不是一个色系"（参考创客贴，其侧栏就是 #f2f6ff）。
     与 html 的 --brand-pale 渐变（#f5f8ff→白）同色系，衔接更和谐。分隔线同步调成蓝灰。 */
  background: #f2f6ff;
  border-right: 1px solid #dce7f6;   /* z890：边界再清晰一点，跟主区白底拉开 */
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 95;
  padding: 0 0 8px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  /* z857：三段式 —— 品牌区固定顶 / 菜单区可滚 / 登录区固定底 */
  display: flex;
  flex-direction: column;
}
/* z857：品牌区（原顶栏 Logo 下移至此） */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 12px 13px;
  border-bottom: 1px solid #e4ecf8;   /* z889：侧栏分隔线同步蓝灰化 */
  flex: none;
}
/* z862：logo 改成 SVG（蓝紫渐变几何底 + 白色纸页折角图形，见 index.html）
   —— 原「纯 CSS 方块 + ::after 白边框」的画法已废弃（SVG 能做渐变和折角，CSS 做不了）。 */
.sb-brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}
.sb-brand-text { min-width: 0; }
.sb-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.sb-brand-sub {
  font-size: 11px;
  color: #98a2ad;
  margin-top: 1px;
  white-space: nowrap;
}
/* z857：登录区（固定在侧边栏底部） */
.sidebar-foot {
  flex: none;
  margin-top: auto;                /* 顶到菜单区下方 → 吸底 */
  border-top: 1px solid #e8ecf1;
  padding: 10px 12px 12px;
  background: #f7f8fa;
}
.sb-foot-user {
  font-size: 12px;
  color: #5a6b7d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 7px;
}
.sb-foot-btn {
  width: 100%;
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #4a5668;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.sb-foot-btn:hover { background: #eef1f5; border-color: #c2cad4; }
/* z857：手机端抽屉开关（顶栏删除后 → 固定浮层按钮） */
.sb-menu-btn {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e3e8ef;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 190;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.sb-menu-btn svg { width: 18px; height: 18px; fill: none; stroke: #4a5668; stroke-width: 1.6; stroke-linecap: round; }
.sb-menu-btn:hover { background: #f2f5f9; }
.sidebar-nav { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 13px;
  color: #4a5668;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
  box-sizing: border-box;
}
.sidebar-item:hover { background: #eef1f5; color: #1f2937; }
.sidebar-item.active {
  background: var(--brand-pale);
  color: var(--brand);
  font-weight: 500;
  border-left-color: var(--brand);
}
.sidebar-item .sb-ico {
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-sep {
  height: 1px;
  background: #e3e8ef;
  margin: 6px 14px;
}
/* 手机端抽屉遮罩（桌面端不显示） */
.sidebar-mask { display: none; }

/* ---------- ③ 内容区让出侧边栏宽度 ---------- */
/* z857（陶总 2026-10-29）：顶栏**整体删除** → body 不再需要 padding-top 让位，
   侧边栏也改成从**顶部 0** 开始（顶天），内容区直接顶到屏幕顶端。
   ⚠️ page-mode 的 body padding-top 也要归零（原来 52px 是让位给顶栏的）。 */
.main-content {
  margin-left: 148px;
}
body { padding-top: 0; }
/* 页面模式（?p=xxx 独立页）：顶栏 fixed + body padding-top 已由 z533 处理，
   这里补上侧边栏的让位 —— 独立页的浮层也要避开左侧菜单 */
html.page-mode .modal-overlay.page-active {
  margin-left: 148px;
  top: 0;                           /* z857：顶栏删除 → 浮层不用让位 */
}
html.page-mode .modal-overlay.page-active .modal { max-width: none; }
html.page-mode .sidebar { top: 0; }
/* z857：顶栏整体删除 → page-mode 的 body 也不用让位了 */
html.page-mode body { padding-top: 0; }
/* 页面模式下顶栏左侧 Logo 点回看板 */
html.page-mode .topbar-left .logo { cursor: pointer; }

/* ---------- ④ 手机端：抽屉式侧边栏 ---------- */
@media (max-width: 768px) {
  /* z857：顶栏已删除 → 汉堡按钮改成固定浮层（.sb-menu-btn） */
  .sb-menu-btn { display: flex; }

  /* 侧边栏：默认滑出屏幕外，.sidebar-open 时滑入 */
  .sidebar {
    top: 0;
    width: 210px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 200;
    box-shadow: 2px 0 12px rgba(0, 0, 0, .12);
  }
  html.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .32);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  html.sidebar-open .sidebar-mask { opacity: 1; pointer-events: auto; }

  /* 内容区不再让位（抽屉覆盖式） */
  .main-content { margin-left: 0; }
  body { padding-top: 0; }
  html.page-mode .modal-overlay.page-active { margin-left: 0; }
  /* 抽屉打开时汉堡按钮藏在抽屉后面（避免重叠） */
  html.sidebar-open .sb-menu-btn { opacity: 0; pointer-events: none; }
}

/* ============================================================
   z858（陶总 2026-10-29）：① 开票 / 纸张价格 改为独立整页
                          ② 所有页面「顶部高度」统一
   ------------------------------------------------------------
   ② 顶部高度统一 —— 基准 = 首页看板「订单看板 + 搜索框」那一行的顶边
      （桌面 = .main-content 的 padding-top 16px；移动端 6px）。

      🔴 根因：z857 把顶栏（.topbar）与顶部页签行（.page-nav）整条删掉了，
         但 CSS 里「给已删除元素让位」的三处尺寸全部残留：
           · .modal { padding-top: 44px }                    ← 让位给已删除的 .page-nav
           · .modal { min-height: calc(100vh - 56px) }        ← 让位给已删除的 .topbar
           · 列表页 .modal { height: calc(100vh - 56px) }    ← 同上（!important）
         → 各页正文顶边散在 60~74px（实测：报价 74 / 订单记录 62 / 对账 60），
           而看板是 16px —— 切页时内容整体往下掉一截，正是陶总截图红框所指。

      ✅ 修法：把「让位」全部归零，再把各页正文起始线统一到 16px（移动端 6px）：
         · 卡片型页面（报价/登记订单/报价练习/开票/纸张价格）→ 白卡顶边 = 16px
         · 表格型页面（订单记录/客户信息/订单对账/应收应付）→ 首个元素顶边 = 16px
   ============================================================ */

/* ① 抹掉给「已删除的顶栏 / 顶部页签」预留的死空间 */
html.page-mode .modal-overlay.page-active .modal {
  padding-top: 0 !important;      /* 原 44px：让位给已删除的 .page-nav */
  min-height: 100vh !important;   /* 原 calc(100vh - 56px)：让位给已删除的 .topbar */
}
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal,
html.page-mode[data-page="groups"] .modal-overlay.page-active .modal,
html.page-mode[data-page="finance"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal {
  height: 100vh !important;        /* 原 calc(100vh - 56px) */
}

/* ② 卡片型页面：白卡顶边统一 16px（原 14px） */
html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body,
html.page-mode .modal-overlay.page-active.page-card-body .modal-body {
  margin-top: 16px;
}
/* ② 表格型页面：正文首个元素顶边统一 16px（原 18px） */
html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-body,
html.page-mode[data-page="finance"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal-body {
  padding-top: 16px;
}

/* ③ 移动端统一 6px（对齐移动端看板 .main-content 的 padding-top） */
@media (max-width: 768px) {
  html.page-mode[data-page="quote"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="order"] .modal-overlay.page-active .modal-body,
  html.page-mode .modal-overlay.page-active.page-card-body .modal-body { margin-top: 6px; }
  html.page-mode[data-page="orders"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="customers"] .modal-overlay.page-active .modal-body,
  html.page-mode[data-page="finance"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal-body ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal-body { padding-top: 6px; }
  /* 对账页基线是 #group-modal .modal-body（ID 级）→ 必须带 ID 才压得住 */
  html.page-mode[data-page="groups"] #group-modal .modal-body { padding-top: 6px; }
}

/* ④ z858：开票 / 纸张价格 独立整页 —— 正文标题（页面模式统一隐藏 .modal-header 后补行标题，
        与快速报价页的 .fq-card-title 同一套做法，不是"自造页头"） */
.page-card-title { display: none; }
html.page-mode[data-page="invoice"] .page-card-title,
html.page-mode[data-page="paper"] .page-card-title {
  display: block; font-size: 14px; font-weight: 600; color: #2c3444; margin-bottom: 10px;
}
/* 整页模式下没有"关闭"概念（左侧菜单即导航）→ 隐藏弹窗形态才需要的取消/关闭按钮 */
html.page-mode[data-page="invoice"] .inv-page-cancel,
html.page-mode[data-page="paper"] .paper-page-close { display: none; }

/* z905（陶总 2026-10-31）：开票页外层正文白卡同步 50% 透明 ——
   四段卡片（.inv-sec-tone / .inv-sec-4）已是 rgba(255,255,255,.5)，
   但它们包在 .modal-body 这层白大卡里，缝隙透出的还是白。
   本条放在 z859 通用规则（.page-card-body .modal-body background:#fff）之后，同权重后写者胜。
   效果：外层卡 50% 白透渐变，内层卡片 50% 白再叠一层 → 卡片比缝隙略亮，层次保留。 */
html.page-mode[data-page="invoice"] .modal-overlay.page-active .modal-body { background: rgba(255,255,255,.5); }

/* ============================================================
   z862（陶总 2026-10-30）：① 应收应付页「没到底」布局修复
                          ② 全部页面底色统一为浅灰蓝渐变
                          ③ 主色统一为鲜亮蓝紫（var(--brand)）
                          ④ 左上角 logo 重设计（蓝紫几何图形）
   ============================================================ */

/* ① 应收应付页「没到底」
   现象（陶总截图）：内容区只占上半屏（modal-body 高 860 / 视口 1000），
        下方一大片空白，右侧那根细滚动条也只到半屏 → 页面看着"没到底"。
   根因：.modal 是 block 布局、height:100vh，但 .modal-body 是普通块级子元素
        → 高度 = 内容高度（内容短就短），既不撑满、也不滚动。
   修法（**仅页面模式 ?p=finance**，工作台里的弹窗形态保持原样）：
        · .modal 改纵向 flex，.modal-body flex:1 + min-height:0
        → 滚动区占满整页，内容超出时在页内一路滚到底。
        · .fin-split 两栏 align-items:stretch → 左右等高到底，不再一高一矮。 */
html.page-mode[data-page="finance"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="payable"] .modal-overlay.page-active .modal ,
html.page-mode[data-page="receivable"] .modal-overlay.page-active .modal {
  display: flex;
  flex-direction: column;
}
/* ⚠️ 必须带 #finance-modal 才能压住下面那条 —— 它是 **ID 选择器**（权重 100），
      光用 class 权重（40）压不住：
      #finance-modal .modal-body { max-height: calc(100vh - 140px); overflow-y: auto; }
      这条是给「工作台里的财务弹窗」留的余量（弹窗本身 90vh），但在 ?p=finance 整页里
      .modal 已经是 100vh → 再减 140px = 底部正好露 140px 空白（陶总截图里那块空）。
   页面模式下：去掉 max-height → 滚动区由 flex:1 铺满整页，内容超出就页内滚到底。
   ⚠️ 只影响页面模式；工作台里的财务弹窗保持原样。 */
html.page-mode[data-page="finance"] #finance-modal .modal-body ,
html.page-mode[data-page="payable"] #finance-modal .modal-body ,
html.page-mode[data-page="receivable"] #finance-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  /* z1219l（陶总 2026-11-22）：正文区改纵向 flex —— fin-split 拉满剩余高度，
     白色应收/应付卡片跟着铺到底，不再在卡片下面露出一大片弹窗浅灰蓝渐变底（手机截图那片灰）。 */
  display: flex;
  flex-direction: column;
}
html.page-mode[data-page="finance"] .fin-split ,
html.page-mode[data-page="payable"] .fin-split ,
html.page-mode[data-page="receivable"] .fin-split {
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
/* 卡片内部也改纵向 flex：流水明细表格容器吃掉卡片剩余高度（框线随之外扩到底），
   并解除 max-height 300/380 的限高 —— 页面模式下表格区域内滚（与订单记录页同款）。
   ⚠️ 仅页面模式生效；工作台里的财务弹窗保持原有形态。 */
html.page-mode[data-page="finance"] .fin-side ,
html.page-mode[data-page="payable"] .fin-side ,
html.page-mode[data-page="receivable"] .fin-side {
  display: flex;
  flex-direction: column;
}
html.page-mode[data-page="finance"] .fin-side .fin-table-wrap ,
html.page-mode[data-page="payable"] .fin-side .fin-table-wrap ,
html.page-mode[data-page="receivable"] .fin-side .fin-table-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 200px;
}

/* ② 所有页面底色统一为「浅灰蓝 → 白」渐变（陶总 2026-10-30，参考创客贴首页）
   ------------------------------------------------------------
   取色自参考图（1920×1066 逐格采样）：
     顶部 var(--brand-pale) → 中部 var(--brand-pale) / var(--brand-pale) → 下部 #FFFFFF
   即：**上淡蓝灰、下纯白**的竖向渐变。

   🔴 为什么挂在 <html> 而不是 body：
     页面模式（?p=xxx）下 body 高度是 100vh，渐变按 body 高算会跟着每页内容长度变；
     挂到 html + background-attachment:fixed → 渐变始终铺满**整个视口**，
     看板页、功能页、弹窗页看到的都是同一片底色（陶总要求"所有页面同一个底色"）。
     body 与页面模式的三条 body 背景规则已全部改成 transparent（见上方 z862 改动）。 */
html {
  /* z896（陶总 2026-10-31）：主区底色改回**品牌蓝渐变**，全程不留白 ——
     白底时看板白色列卡片跟背景糊在一起，看不出边界。现在上浅下深的蓝，
     白色列卡片 + 阴影压在上面，层次清楚。 */
  background-color: #dbe6fc;
  background-image: linear-gradient(180deg,
    #eff4ff 0%,      /* 顶部：近白的浅蓝 */
    #e4edfd 45%,
    #d6e2fc 100%);   /* 底部：加深的浅蓝 */
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 草绿皮肤下的主区渐变（同结构，换草绿系） */
html.theme-grass {
  background-color: #e6f0cd;
  background-image: linear-gradient(180deg, #f6fbe9 0%, #edf5d6 45%, #e0ecc2 100%);
}


/* ============================================================
   z864（陶总 2026-10-30）：④ 对账页「订单日期」—— 去掉右侧的小图标，只留一个日期，
   点这个日期就出现日历，可以选哪一天。
   ------------------------------------------------------------
   Chromium 的 date input 默认在右侧画一个日历小图标（::-webkit-calendar-picker-indicator），
   隐藏它之后**点击输入框不会再弹日历**（indicator 是唯一触发点），
   → 必须由 JS 在 click 时调 `showPicker()`（用户手势内有效，浏览器支持时才调，失败静默）。
   ============================================================ */
.grp-order-date { cursor: pointer; }
.grp-order-date::-webkit-calendar-picker-indicator,
.grp-order-date::-webkit-calendar-picker-indicator:hover {
  display: none !important;          /* 藏掉右侧小图标 */
}
.grp-order-date::-webkit-date-and-time-value { text-align: left; }   /* 日期文字靠左 */

/* ============================================================
   z868（陶总 2026-10-30）：**所有表格**接入列宽拖拽 —— 样式配套
   ------------------------------------------------------------
   陶总原话：「所有表格都要允许可以拉列宽」（截图 = 应收应付页的流水明细表）。
   本段只放**样式**；引擎在 public/colfit.js，清单在 app.js 的 WB_TABLE_LIST。

   ① 拖拽手柄的定位上下文
      `.col-resizer` 是 position:absolute → 它的包含块是**最近的定位祖先**。
      th 必须是 relative / sticky，否则手柄会跑到 modal-body 甚至 body 上 → 位置全错、拖不到。
      已自带定位的表：.inquiry-table th / .cust-table th / #paper-price-table th /
      table.fin-table thead th（sticky 也算定位上下文）。
      下面这几张是**裸 th**（没有任何 position 规则）→ 必须补。
   ② 行内 width 的兜底（z595 坑 #2）
      「回到自动模式」会清掉 table 的**行内**宽度（colfitAuto 里 table.style.width = ''）
      → 凡是宽度写在 HTML 行内样式上的表，必须在 CSS 里补一条 width:100%，
      否则双击手柄回到自动后表会缩成内容宽（实测纸张吨价表缩成 336px）。
   ③ 列宽下限
      auto 布局下 CSS 的 width 只是"建议值"，内容短时列会被压窄 → 长文本列被压成竖排、
      行高翻倍（实测客户表不给下限时表格体高从 672px 涨到 1338px）。
   ============================================================ */

/* ① 裸 th 补定位上下文（没定位 → 手柄跑到 body 上，拖不动） */
#employee-table thead th,
#carbonless-price-table thead th,
#sticker-price-table thead th,
#dash-unpaid-table thead th,
#craft-price-table thead th {          /* z935：z931 新增工艺价格表漏登记 → 手柄错位拖不动 */
  position: relative;
}

/* ② 行内 width 兜底 */
#employee-table,
#carbonless-price-table,
#sticker-price-table,
#craft-price-table {
  width: 100%;
}

/* ③ 新接入表的列宽下限 */
table.fin-table th.col-fin-date   { min-width: 92px; }
table.fin-table th.col-fin-party  { min-width: 92px; }
table.fin-table th.col-fin-type   { min-width: 58px; }
table.fin-table th.col-fin-amt    { min-width: 100px; }
table.fin-table th.col-fin-method { min-width: 68px; }
table.fin-table th.col-fin-note   { min-width: 120px; }
table.fin-table th.col-fin-by     { min-width: 68px; }
table.fin-table th.col-fin-ops    { min-width: 108px; }
#employee-table thead th          { min-width: 80px; }
#carbonless-price-table thead th,
#sticker-price-table thead th,
#craft-price-table thead th       { min-width: 90px; }   /* z935：工艺价格表一并补下限 */
#dash-unpaid-table thead th       { min-width: 90px; }


/* ============================================================
   z869（陶总 2026-10-30）：订单记录表「省份」列
   —— 省份是**订单层**字段，这一列显示的是「该工单所属订单的省份」
   ============================================================ */
.inquiry-table td.td-province {
  text-align: center;
  white-space: nowrap;          /* 省份名短，不许折行 */
}
/* 🔴 z870（陶总 2026-10-30）：省份列已改**只读** → 不再渲染下拉，
   上面这条 select.province-cell 规则已成死代码，整块删除。 */


/* ============================================================
   z870（陶总 2026-10-30）：打包要求 / 收件信息 / 收货省份 —— **订单层字段**
   ------------------------------------------------------------
   陶总原话：「把打包要求、收件信息和收货省份的登记改到订单层，不放在工单层了，
              订单记录表依旧显示，只显示不可编辑」。
   → 这三列从「可编辑单元格」改成**只读文本**（不再有铅笔图标、不再能点）。
   ⚠️ 不用 .cell-edit / .cell-locked（那是"无权限"语义，z609 教训）→ 用专属类。
   ⚠️ 去掉 cell-edit 也顺带去掉了它的 `padding-right:26px`（给铅笔图标留位）
      → 文字能用满整列宽度，是净收益。
   ============================================================ */
.inquiry-table td.td-ship-readonly {
  cursor: default;              /* 不可编辑 → 不要手型光标 */
}
.inquiry-table td.td-ship-readonly:hover {
  background: none;             /* 去掉可编辑格的 hover 高亮，别让人以为能点 */
}
/* 收件信息是长文本 → 允许折行并保留断词，避免长地址把列撑爆 */
.inquiry-table td.td-shipping {
  white-space: normal;
  word-break: break-word;
}

/* ============================================================
   z871（陶总 2026-10-30）：详情草稿提示条 —— 「只恢复表单内容，不恢复弹窗的显示状态」
   ------------------------------------------------------------
   需求：页面加载时**不再自动弹出**工单详情浮层（那是 z870 查出的自循环根源），
        但上次没保存的**编辑内容要保住** → 用户自己点开那张工单时自动回填。
        订单记录页顶部给一条提示，告诉用户"上次在编辑哪张工单（未保存）"，
        点「继续编辑」直接打开并回填，点「放弃」清掉草稿。
   ============================================================ */
.detail-draft-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  background: var(--brand-pale);              /* 蓝紫系（工作台主色 var(--brand) 的极浅底） */
  border: 1px solid var(--brand-soft);
  border-radius: 9px;
  font-size: 13px;
  color: #2c3a63;
}
.detail-draft-hint-ico {
  font-size: 15px;
  color: var(--brand);
  flex: none;
}
.detail-draft-hint-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 窄屏：按钮换行，别把文字挤没 */
@media (max-width: 640px) {
  .detail-draft-hint { flex-wrap: wrap; }
  .detail-draft-hint-text { white-space: normal; }
}


/* ==================== z881 换肤：草绿主题下的看板（扁平化·R2 定版） ====================
   R2 口径：草绿 #b1cc5d + 深橄榄 #3d4a17，纯色块、无渐变、无阴影。
   仅在 <html class="theme-grass"> 时生效；不换肤则完全保持原看板样式。 */
/* ===== R2：Q1 + 深橄榄 #3d4a17 取代黑（橄榄感更明显） ===== */
html.theme-grass .kanban-board { background: #f2fde4; padding: 10px; border-radius: 14px; }
html.theme-grass .kanban-col { background: #fff; border: none; border-radius: 14px; box-shadow: 0 2px 10px rgba(61, 74, 23, 0.10); }
html.theme-grass .kanban-col-header { background: #b1cc5d; border-bottom: none; }   /* z888：同样去掉边框 */
html.theme-grass .col-title { color: #14210a; font-weight: 700; }
html.theme-grass .col-count { background: #3d4a17; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
html.theme-grass .kanban-board .kanban-col .order-card { background: #fff; border: 1px solid #e6e6df; border-radius: 10px; box-shadow: none; }
html.theme-grass .kanban-board .kanban-col .order-card:hover { border-color: #3d4a17; box-shadow: none; }
html.theme-grass .kanban-board .card-ship { background: #f2fde4; border: 1px solid #e0ebc4; color: #3d4a17; }
html.theme-grass .kanban-board .card-ship .cs-count, html.theme-grass .kanban-board .card-ship .cs-kg { color: #3d4a17; }
html.theme-grass .kanban-board .card-customer { color: #7d8564; }
html.theme-grass .kanban-board .card-filename { color: #3d4a17; }
html.theme-grass .kanban-board .card-product { color: #7d8564; }
html.theme-grass .kanban-board .card-summary { color: #7d8564; }
html.theme-grass .kanban-board .card-amount { color: #3d4a17; }
html.theme-grass .kanban-board .card-pay { color: #7d8564; }
html.theme-grass .kanban-board .card-tag { background: #b1cc5d; color: #14210a; border: none; font-weight: 700; }
html.theme-grass .kanban-board .card-tag.tag-paid { background: #d8e8ac; color: #14210a; }
html.theme-grass .kanban-board .card-tag.tag-unpaid { background: #3d4a17; color: #fff; }
html.theme-grass .kanban-board .card-tag.tag-prepaid { background: #fff; color: #14210a; border: 1px solid #b1cc5d; }
html.theme-grass .kanban-board .card-tag.tag-invoiced { background: #c2d982; color: #14210a; }
html.theme-grass .kanban-board .card-tag.tag-amount-pending { background: #e89138; color: #fff; border: none; }
html.theme-grass .kanban-board .card-tag.tag-outsource-part { background: #e6eece; color: #14210a; }
html.theme-grass .kanban-board .card-amount-pending { color: #d4770b !important; }
html.theme-grass .kanban-board .card-urgent-dot { background: #e89138; }
html.theme-grass .kanban-board .card-urgent-label { color: #c96f10; }
html.theme-grass .kanban-board .order-card .btn-mini { background: #3d4a17; color: #fff; border: none; border-radius: 6px; font-weight: 600; box-shadow: none; }
html.theme-grass .kanban-board .order-card .btn-mini:hover { background: #55631f; }
html.theme-grass .kanban-board .order-card .btn-mini.btn-lose-outline { background: #fff; color: #3d4a17; border: 1px solid #3d4a17; box-shadow: none; }
html.theme-grass .kanban-board .order-card .btn-mini.btn-lose-outline:hover { background: #f4f8e8; }


/* ---- 草绿主题：侧栏 logo 渐变（原本蓝紫 #5B8CFF→#204DF3→#7C4DFF） ---- */
html.theme-grass .sb-brand-mark .lg-a { stop-color: #a3cd55; }
html.theme-grass .sb-brand-mark .lg-b { stop-color: #5f8c16; }
html.theme-grass .sb-brand-mark .lg-c { stop-color: #3d4a17; }
html.theme-grass .sb-brand-mark .lg-stroke { stroke: #3d4a17; }

/* ---- 换肤按钮（侧栏底部，与「退出登录」同排） ---- */
.sb-foot-btn.sb-theme-btn {
  display: inline-flex; align-items: center; gap: 4px;
}
.sb-theme-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); border: 1px solid rgba(0,0,0,.12);
  box-shadow: none; flex: none;
}

/* ==================== z886：看板列头（待定稿/生产中…）改用品牌色（陶总 2026-10-31） ====================
   原列头是中性灰（底 #fafafa / 标题 #444 / 计数徽章 #e8e8e8 灰底灰字），跟蓝色品牌没关系。
   这里只把「列头」这一条换成品牌色系，按钮、卡片、标签一律保持 z881 原样。
   ⚠️ 全部用 z881 定义的 CSS 变量（--brand-pale / --brand-soft / --brand-deep / --brand），
      默认皮肤 = 蓝色系；切到草绿皮肤时变量自动变草绿，无需另写一套。
   ⚠️ 计数徽章用主色实底白字 —— 面积很小（只有两三位数字），不会像满屏按钮那样扎眼。

   ---- z887（陶总 2026-10-31）：列头底色加深 ----
   z886 用 --brand-pale（#f2f5ff），而这**正好就是 z862 页面渐变底色**，
   → 列头跟页面融为一体、几乎看不见（陶总反馈"都快融为一体了"）。
   现改为**主色实底**：底 var(--brand) #204df3、标题纯白、计数徽章白底蓝字（反白）。
   ⚠️ 仍全部走变量，草绿皮肤的 html.theme-grass 规则优先级更高、不受影响。 */
.kanban-col-header {
  background: var(--brand, #204df3);
  /* z888（陶总 2026-10-31）：蓝色列标题**不要加边框** —— 去掉 z887 的 1px 底边 */
  border-bottom: none;
}

.col-title {
  color: #ffffff;
}

.col-count {
  background: #ffffff;
  color: var(--brand, #204df3);
}

/* ==================== z893：看板卡片两按钮 → 浅品牌蓝胶囊 + 渐变图标 ====================
   参考创客贴按钮截图：浅蓝底胶囊、深藏青文字、左侧渐变小图标（紫蓝渐变→品牌蓝渐变）。
   只作用于看板卡片内按钮；草绿主题有独立覆盖，html:not(.theme-grass) 隔离避免串色。 */
html:not(.theme-grass) .kanban-board .order-card .btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  border-radius: 8px;
  font-weight: 600;
}

html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-win {
  background: #e9effe;          /* 品牌蓝 #4370fa 的浅色调 */
  color: #1f2a4d;               /* 深藏青，同截图标题字色 */
  border: none;
}
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-win:hover {
  background: #dbe5fc;
}

html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-lose-outline {
  background: #e9effe;
  color: #1f2a4d;
  border: none;                 /* 退回也与主按钮同款式，仅图标区分 */
}
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-lose-outline:hover {
  background: #dbe5fc;
}

/* ---- 渐变图标（z894 精修）：渐变实心圆角方块 + 白色字形，比纯线条更有质感 ---- */
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-win::before,
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-lose-outline::before {
  content: '';
  width: 15px;
  height: 15px;
  flex: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* 定稿开单 / 制作完成：紫蓝渐变徽章 + 白色对勾 */
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-win::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0.1' y1='0' x2='0.9' y2='1'%3E%3Cstop offset='0' stop-color='%23b3a2ff'/%3E%3Cstop offset='0.5' stop-color='%23788fff'/%3E%3Cstop offset='1' stop-color='%232f56db'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='2.4' y='2.4' width='19.2' height='19.2' rx='6.2' fill='url(%23g)'/%3E%3Cpath d='M7.7 12.4l2.9 2.9 5.7-6' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 退回：蓝色渐变徽章 + 白色回退箭头 */
html:not(.theme-grass) .kanban-board .order-card .btn-mini.btn-lose-outline::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0.1' y1='0' x2='0.9' y2='1'%3E%3Cstop offset='0' stop-color='%238cb2ff'/%3E%3Cstop offset='0.55' stop-color='%235182fa'/%3E%3Cstop offset='1' stop-color='%232f56db'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='2.4' y='2.4' width='19.2' height='19.2' rx='6.2' fill='url(%23g)'/%3E%3Cpath d='M11.4 6.9L6.8 11.5l4.6 4.6' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.1 11.5h5.6a4.5 4.5 0 0 1 4.5 4.5v1.1' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ============================================================
   z906（陶总 2026-10-31）：全站表格表头统一**左右居中** —— 一套表格模板，杜绝复发
   ------------------------------------------------------------
   陶总原话：「操作列的表头居中对齐下，其他表格的表头没居中的也居中下，
   以后如果还有新的表格，也是一样的设置，标题要居中，都用一套表格模板，
   不要重复出现相同问题」。

   放在文件最末、带 !important 兜底：
   · 压过所有历史类选择器（员工表 / 三张价格表 / 报价·对话记录表等的 th 左对齐）；
   · 也压过 JS 拼表头时的内联 style（本次已删 col-fin-ops 的 text-align:right）；
   · 今后**新表格**不写任何对齐样式即自动居中；禁止再写 th 的内联 text-align。
   例外口径：本条只管 th（标题）—— 单元格 td 的对齐不受影响，
   内容列（如对账「订单」列长文本）仍按各表自己的规则左对齐。
   ============================================================ */
table thead th,
table th { text-align: center !important; }

/* ============================================================
   z907（陶总 2026-10-31）：纸张价格页三张表**整表居中**（表头 + 单元格）
   ------------------------------------------------------------ ）
   陶总原话：「纸张的表格，整个表格都居中对齐」。
   范围：#paper-price-table（纸种吨价）/ #carbonless-price-table（无碳联单令价）
        / #sticker-price-table（不干胶本地价）。
   · thead 的 <tr> 内联 text-align:left 被 !important 压过；
   · tbody 行内联样式无 text-align（除"内置默认"本就 center），td 全部收编居中；
   · 价格输入框（number input）同步居中，视觉一致；
   · 只作用于这三张表，全站其他表格 td 对齐不受 z906 例外口径影响。
   ============================================================ */
#paper-price-table th, #paper-price-table td,
#carbonless-price-table th, #carbonless-price-table td,
#sticker-price-table th, #sticker-price-table td { text-align: center !important; }
#paper-price-table td input[type=number],
#carbonless-price-table td input[type=number],
#sticker-price-table td input[type=number] { text-align: center; }

/* ============================================================
   z908（陶总 2026-10-31）：侧栏品牌区换真 logo（实例注入 {{BRAND_LOGO_IMG}}）
   · img 加载成功 → .js-brand 容器加 has-logo → 显示 logo、隐藏 SVG/文字回退；
   · 失败/未配置（速印达）→ 回退原 z862 SVG + 品牌文字，一切照旧；
   · 整个品牌区可点击回首页（index.html 上有 onclick）。
   ============================================================ */
.sidebar-brand { cursor: pointer; }
/* 🔴 z909（陶总 2026-11-01）：「logo里的四个字太大了，不和谐，缩小点」——
   整图按高度缩放：26px 高（宽约 111px），与红框标注大小相当；
   max-width 仍兜底，侧栏再窄也只缩不裁。 */
.sidebar-brand .inst-logo { display: none; height: 22px; max-width: 100%; width: auto; }
.sidebar-brand.has-logo .inst-logo { display: block; }
.sidebar-brand.has-logo .sb-brand-mark,
.sidebar-brand.has-logo .sb-brand-text { display: none; }

/* ============================================================
   z910（陶总 2026-11-01）：员工管理弹窗统一配色 + 表格样式
   ------------------------------------------------------------
   陶总原话：「员工管理的表格样式不好看，按照其他表格的样式做一下，
   注意每列居中，员工管理整个弹窗的颜色也跟其他页面统一」。
   · 表单面板：灰底 #f8f9fa → 品牌浅蓝（--brand-pale）+ 细边框圆角；
   · 输入框：对齐全站（圆角 8 / focus 品牌色光环）；
   · 表格：th 品牌浅蓝底，td **全部居中**、细分隔线、hover 浅蓝；
     th 居中由 z906 兜底规则负责，这里只管 td 与配色。
   ============================================================ */
#employee-modal .emp-form {
  background: var(--brand-pale);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
#employee-modal .emp-form-row { display: flex; gap: 12px; margin-bottom: 12px; }
#employee-modal .emp-field { flex: 1; min-width: 0; }
#employee-modal .emp-field span { display: block; font-size: 12px; color: #5b6270; margin-bottom: 4px; }
#employee-modal .emp-field input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--brand-line); border-radius: 8px;
  font-size: 14px; font-family: inherit; box-sizing: border-box;
  background: #fff; color: #17171a; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#employee-modal .emp-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
#employee-modal .emp-roles-label { display: block; font-size: 12px; color: #5b6270; margin-bottom: 6px; }
#employee-modal .emp-roles-list { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: #303133; }
#employee-modal .emp-roles-list label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
#employee-modal .emp-add-btn { margin-top: 12px; width: 100%; }
#employee-modal #employee-table { width: 100%; border-collapse: collapse; font-size: 14px; }
#employee-modal #employee-table th {
  padding: 10px 12px;
  background: var(--brand-pale);
  color: #1f2a4d; font-weight: 600;
  border-bottom: 2px solid var(--brand-line);
}
#employee-modal #employee-table td {
  text-align: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f6;
  color: #303133;
}
#employee-modal #employee-table tbody tr:hover td { background: #f7f9fd; }

/* ============================================================
   z910（陶总 2026-11-01）：纸张价格页 · 三张表统一标题
   ------------------------------------------------------------
   陶总原话：「第一个表是纸张吨价，第二个表是无碳纸令价，第三个表是
   不干胶单价，标题都改下，标题的样式设计下，跟当下的整体视觉统一，
   并且要清晰好看、一目了然」。
   样式：品牌蓝竖条 + 加粗标题 + 灰色小字说明（与全站分区标题同语言）。
   ============================================================ */
.pp-sec-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; }
.pp-sec-title.first { margin-top: 4px; }
.pp-sec-title::before {
  content: '';
  flex: none;
  width: 4px; height: 15px;
  border-radius: 2px;
  background: var(--brand);
}
.pp-sec-title b { font-size: 15px; font-weight: 700; color: #1f2a4d; letter-spacing: .5px; white-space: nowrap; }
.pp-sec-title .pp-hint { font-size: 12px; color: #8a94a6; font-weight: 400; min-width: 0; }

/* z1225/z1226/z1227（陶总 2026-11-22）：纸张/工艺页「报价公式」分区
   · 只读态：主公式 + 两列明细（左标签灰、右取值深色）
   · 编辑态（右上角铅笔）：每个数字变输入框，底部 保存/取消
   z1227：报价曲线模块下线，系数/幂次并入本区；所有数字可编辑。 */
.pp-formula-box { border: 1px solid #e5e7eb; border-radius: 8px; background: #fafbfc; padding: 12px 14px; margin-bottom: 18px; }
.pp-formula-main { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; color: #1f2a4d; line-height: 1.9; letter-spacing: .2px; }
.pp-formula-main .pf-formula { flex: 1; min-width: 0; }
/* z1229（陶总 2026-11-22）：幂次 0.75 不再放上标位置，平排显示（^ 表示幂），公式行水平对齐 */
.pp-formula-main .pf-inp { vertical-align: middle; }
.pp-formula-main .pf-num { color: var(--brand); }
.pp-formula-grid { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e5e7eb; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; }
.pp-formula-grid dt { font-size: 13px; color: #8a94a6; line-height: 1.75; }
.pp-formula-grid dd { font-size: 13px; color: #333; margin: 0; line-height: 1.75; }
/* 铅笔按钮：只读态右上角，点开整块进编辑态 */
.pf-edit { flex: none; width: 26px; height: 26px; line-height: 1; padding: 0; border: 1px solid #dcdfe6; border-radius: 6px; background: #fff; color: #5b6478; font-size: 14px; cursor: pointer; }
.pf-edit:hover { border-color: var(--brand); color: var(--brand); }
/* 编辑态 */
.pf-inp { width: 72px; padding: 4px 6px; border: 1px solid #dcdfe6; border-radius: 5px; font-size: 13px; box-sizing: border-box; text-align: center; vertical-align: middle; }
.pf-inp:focus { outline: none; border-color: var(--brand); }
.pf-groups { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e5e7eb; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 22px; }
.pf-group-title { font-size: 13px; font-weight: 600; color: #5b6478; margin-bottom: 6px; }
.pf-tier-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #333; margin-bottom: 6px; }
.pf-tier-label { color: #8a94a6; min-width: 84px; }
/* z1229（陶总 2026-11-22）：开数/张数档行的标签取消固定宽，右边内容往左收（低消组仍保留 84px 对齐） */
.pf-tier-label-tight { min-width: 0; }
.pf-tier-fixed { color: #8a94a6; font-size: 12px; }
.pf-arrow { color: #8a94a6; }
.pf-savebar { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pf-msg { flex: 1; font-size: 12px; color: #c0392b; }
@media (max-width: 768px) {
  .pp-formula-grid { grid-template-columns: minmax(0, 1fr); gap: 4px 0; }
  .pp-formula-grid dt { margin-top: 6px; }
  .pf-groups { grid-template-columns: minmax(0, 1fr); }
  .pf-inp { width: 64px; }
}

/* ============================================================
   z910（陶总 2026-11-01）：换肤入口去按钮化
   ------------------------------------------------------------
   陶总原话：「首页菜单的草绿按钮去掉，只留小绿点和草绿的文字即可，
   点击小绿点可以切换皮肤」。
   · 去掉白底描边按钮壳（.sb-foot-btn 的边框/底色/hover），只留色点+文字；
   · 点击行为不变（toggleTheme），色点/文案仍由 syncThemeBtn 同步
     （蓝皮肤时=绿点+「草绿」，草绿皮肤时=蓝点+「蓝色」—— 点了会切到哪个）。
   ============================================================ */
.sb-foot-btn.sb-theme-btn {
  border: none;
  background: transparent;
  padding: 4px 2px;
  gap: 6px;
  color: #6b7686;
}
.sb-foot-btn.sb-theme-btn:hover {
  background: transparent;
  border: none;
  color: #1f2a4d;
}

/* =================== z915（陶总 2026-11-01）：手动成本两模块 ===================
   ① 计算纸张成本：纸张行可追加，每行独立计价+重量；② 按成本算报价：成本行+重量选填+省份/开票。 */
.mc-mod {
  border: 1px solid var(--brand-soft, #dbe4fd);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}
.mc-mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.mc-mod-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2a4d;
}
.mc-mod-num {
  font-style: normal;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.mc-mod-result { font-size: 13px; color: #666; }
.mc-mod-result b { color: var(--brand); font-weight: 700; margin-left: 2px; }

/* —— 模块① 纸张行 —— */
/* z1161（陶总 2026-11-20）：「这页所有框都改成跟吨价那行输入框一样宽」——
   全页面板统一一套列模板：7 个等宽框列 + 结果列 96px + 删除列 20px。
   纸张行/工艺行/成本行/参数条共用同一模板 → 任何窗口宽度下所有框严格等宽且互相对齐；
   行内框统一 width:100%（跟随列宽），不再有 80/84/106/满宽 等混杂尺寸。 */
/* z1218（陶总 2026-11-22）：前 7 列由 1fr 均分改固定 120px（= 均分口径下按常见窗口宽
   算出的平均列宽：行宽−结果96−删除20−8×6间隙，÷7 ≈ 120.4）。输入框不再随窗口拉伸，
   中间加一根 1fr 弹性空列 → 结果格/删除钮/计算报价按钮仍贴右缘，与行框右缘对齐不变。
   窄屏 ≤768 断点仍是 2 列流式布局不受影响。 */
/* z1219i（陶总 2026-11-22）：结果列 96px 固定改弹性 minmax(0,1fr)、删除列保留 20px ——
   窄窗口（弹窗 96vw）下 7×120px + 结果96 + 删除20 + 间隙放不下，结果列被推出行框外（¥0/0kg 出框）；
   改后结果列自动收缩、金额右对齐（text-align:right 不变），右缘 = 删除列左缘-6，两行完全一致。
   注意 --mc-cols 同时被参数条 .mc-quote-bar 引用（重量/省份/开票占前 3 列 120px）。 */
#mc-panel { --mc-cols: repeat(7, 120px) minmax(0, 1fr) 20px; }
.mc-paper-row {
  display: grid;
  grid-template-columns: var(--mc-cols);
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #e7ecf6;
  border-radius: 9px;
  margin-bottom: 7px;
  background: #fafbfe;
}
.mc-paper-row select,
.mc-paper-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #333;
}
/* z918/z919（陶总 2026-11-01）：计价方式下拉（吨价/令价/单价）单独配色 ——
   z918 用浅蓝底(--brand-pale)跟行底色 #fafbfe 太接近、与外部框融为一体；
   z919 改实心主色底 + 白字（原生箭头看不见，故 appearance:none + 内联白色 SVG 箭头），
   在白卡/浅灰行里一眼可辨"这是选模式，不是填数字"；用 --brand 变量，草绿皮肤自动跟随。 */
.mc-paper-row select.mp-mode {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--brand);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 6px;
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  padding: 0 22px 0 8px;   /* z921：列宽收到 72px，内边距同步收紧，两字不挤 */
}
/* z1219d（陶总 2026-11-22）：工艺行的「选择工艺」下拉跟纸张行「吨价/令价/单价」模式框同款蓝色 */
.mc-craft-row select.mp-mode { -webkit-appearance: none; appearance: none; }
.mc-craft-row select.mp-mode {
  background-color: var(--brand);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 6px;
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  padding: 0 22px 0 8px;
}
.mc-craft-row select.mp-mode:hover { filter: brightness(1.1); }
.mc-craft-row select.mp-mode:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft, rgba(67, 112, 250, .22));
}
.mc-craft-row select.mp-mode option { color: #333; background: #fff; }
.mc-paper-row select.mp-mode:hover { filter: brightness(1.1); }
.mc-paper-row select.mp-mode:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft, rgba(67, 112, 250, .22));
}
.mc-paper-row select.mp-mode option { color: #333; background: #fff; }
.mc-paper-row select:focus,
.mc-paper-row input:focus { border-color: var(--brand); }
.mp-result {
  text-align: right;
  line-height: 1.25;
  white-space: nowrap;
}
.mp-result b { display: block; font-size: 14px; color: var(--brand); font-weight: 700; }
.mp-result i { font-style: normal; font-size: 11px; color: #8a97ab; }
/* z1009（陶总 2026-11-10）：算式明细行（恢复旧版展示，含「÷N开」的开数）——
   跨满整行放在输入框下方，灰字小字，不抢主视觉。 */
.mp-detail {
  grid-column: 1 / -1;
  font-size: 11px;
  color: #a3aec2;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-del {
  background: none;
  border: none;
  color: #c3cddd;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.mp-del:hover { color: #e24b4a; }
/* z1158（陶总 2026-11-20）：手动成本模块② 工艺行 —— 布局沿用纸张行的边框/底色/结果格 */
/* z1163（陶总 2026-11-20）：工艺行一行放 2 个 */
/* z1219（陶总 2026-11-22）：改回一行一个工艺 —— 行内列模板与纸张行同构：
   [工艺下拉][宽][高][张数][本数] 5×120px 固定 + 弹性空列 + 结果96px + ×20px；
   单价只读框删除（单价在算式明细灰字里可见）；面积类显示宽高、件数类隐藏宽高留空列不出错位 */
#mc-craft-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 7px;
}
.mc-craft-row {
  display: grid;
  grid-template-columns: repeat(5, 120px) minmax(0, 1fr) 20px;
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #e7ecf6;
  border-radius: 9px;
  background: #fafbfe;
}
.mc-craft-row select,
.mc-craft-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #333;
}
/* 列位固定：工艺 / 宽 / 高 / 张数 / 本数（宽高隐藏时只留空列，后面的框不跑位） */
.mc-craft-row .mcf-key { grid-column: 1; }
.mc-craft-row .mcf-width { grid-column: 2; }
.mc-craft-row .mcf-height { grid-column: 3; }
.mc-craft-row .mcf-sheets { grid-column: 4; }
.mc-craft-row .mcf-books { grid-column: 5; }
.mc-craft-row select:focus,
.mc-craft-row input:focus { border-color: var(--brand); }
/* z1219c（陶总 2026-11-22）：选中工艺后不需要填的框变灰禁用（宽/高/张数/本数按单位自动判），
   与详情弹窗 disabled 框同款灰底灰字 */
.mc-craft-row input:disabled {
  background: #f5f5f5;
  color: #a5b0c2;
  cursor: not-allowed;
  border-color: #e2e8f0;
}
/* 结果框 / 删除钮（z1219i）：结果列=弹性列（倒数第2），删除列=最后1列 ——
   纸张行 9 列 → 结果第 8、删除第 9；工艺行 7 列 → 结果第 6、删除第 7。
   两行结果右缘 = 内缘-6（删除左），金额重量逐像素对齐 */
.mc-paper-row .mp-result { grid-column: 8; text-align: right; }
.mc-craft-row .mp-result { grid-column: 6; text-align: right; }
.mc-paper-row .mp-del { grid-column: 9; }
.mc-craft-row .mp-del { grid-column: 7; }
.mc-paper-row .mp-detail,
.mc-craft-row .mp-detail { grid-column: 1 / -1; }
.mc-add-paper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px dashed var(--brand, #4370fa);
  color: var(--brand);
  background: var(--brand-pale, #eef2fe);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mc-add-paper:hover { background: var(--brand-soft, #dbe4fd); }

/* —— 模块③ 成本行 + 参数条 —— */
/* z1160（陶总 2026-11-20）：成本行已是行框堆叠（.mc-cost-row-inline），容器改块级，
   「＋添加成本」按钮紧跟行下，与①②的添加按钮位置/样式一致 */
.mc-costs-line {
  margin-bottom: 10px;
}
/* z922（陶总 2026-11-01）：重量这一行回到左对齐 ——
   z920/z921 曾把参数条套成纸张行的 9 列栅格，重量框被挤到第 2 列，跟上一行"成本(元)"框左边缘错开；
   现在改回 flex、无左内边距，重量框左边缘与上方成本框严格左侧对齐，三框同宽（106px）。 */
.mc-quote-bar {
  display: grid;
  grid-template-columns: var(--mc-cols);
  gap: 6px;
  align-items: end;
  /* z922：左对齐 —— z1219i（陶总 2026-11-22）：成本行早已是无框裸输入框（无卡片边框/padding），
     此前为旧卡片行补偿的 1px 透明边框 + 8px 内边距导致参数条整体内缩 9px，
     重量框左缘与上方成本框错开 —— 现去掉，左缘 0 对齐成本框；
     计算报价按钮右缘随之贴到浅色行框右缘（行卡片右缘 = mc-mod 内容右缘） */
}
.mc-quote-bar .mc-quote-field:nth-of-type(1) { grid-column: 1; }
.mc-quote-bar .mc-quote-field:nth-of-type(2) { grid-column: 2; }
.mc-quote-bar .mc-quote-field:nth-of-type(3) { grid-column: 3; }
.mc-quote-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-quote-field label { font-size: 11px; color: #8a97ab; font-weight: 600; }
.mc-quote-field .mc-opt {
  font-style: normal;
  font-size: 10px;
  color: #b3bdd0;
  margin-left: 4px;
  font-weight: 400;
}
/* z1160：参数条输入框与行内输入框统一 32px 高、6px 圆角；z1161：宽度跟随列宽（与纸张行等宽） */
.mc-quote-field input,
.mc-quote-field select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #333;
  box-sizing: border-box;
}
.mc-quote-field input:focus,
.mc-quote-field select:focus { border-color: var(--brand); }
/* 计算报价按钮（z1219i）：跨结果弹性列+删除列（第8列起），右缘贴行框右缘；
   窄窗口结果列收缩时给 min-width 兜底，向左溢出的部分落在空白弹性区不遮框 */
.mc-calc-btn { grid-column: 8 / -1; justify-self: end; min-width: 96px; height: 32px; padding: 0 12px; }

@media (max-width: 768px) {
  /* z1161：窄屏下同一列模板改成 2 个框一列排，结果/删除钮回到自然流（避免 8/9 列隐式轨道） */
  #mc-panel { --mc-cols: repeat(2, minmax(0, 1fr)); }
  /* z1163：窄屏工艺行回到一行 1 个（半宽放不下 7 列），行内框自然流排 */
  #mc-craft-rows { grid-template-columns: 1fr; }
  .mc-paper-row,
  .mc-craft-row { grid-auto-rows: min-content; }
  .mc-paper-row .mp-result,
  .mc-craft-row .mp-result,
  .mc-paper-row .mp-del,
  .mc-craft-row .mp-del,
  .mc-cost-row-inline .mc-cost-del,
  .mc-calc-btn { grid-column: auto; }
  .mp-result { text-align: left; }
  /* 工艺行窄屏：显式列位取消，按自然流排（宽高隐藏时不占位）；模板改 2 列与纸张行一致
     （z1219：固定 120px 列模板在窄屏放不下 → 覆盖为流式 2 列；mcf-unit/mcf-qty 已随 z1219 删除） */
  .mc-craft-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-craft-row .mcf-key,
  .mc-craft-row .mcf-width,
  .mc-craft-row .mcf-height,
  .mc-craft-row .mcf-sheets,
  .mc-craft-row .mcf-books { grid-column: auto; }
  .mc-calc-btn { width: 100%; }
}

/* ============================================================
   z936/z940（陶总 2026-11-02）：详情弹窗「发货信息」模块
   ------------------------------------------------------------
   浅绿底色（与登记页挂单绿条 .og-picked 同色系 #ebf4f3）：
   · 第一张工单 → 模块内 3 个正常输入框（白底可编辑）；
   · 其他工单 → ship-ro 只读，**保留输入框的框**，底色换成比模块
     浅绿更浅一点的浅绿（#f3faf8），文字不可选中（disabled 天然如此）。
     （z940 推翻 z936 的"平铺文字"方案——陶总：一点重点也没有）
   三个字段 DOM id 不变 → 保存/回显/联想/打印逻辑零改动。
   ============================================================ */
.ship-module {
  background: #ebf4f3;
  border-radius: 8px;
  padding: 10px 12px 2px;
  margin: 0 0 12px;
}
.ship-module-title {
  font-size: 13px;
  font-weight: 700;
  color: #05978c;
  margin-bottom: 8px;
}
.ship-module .detail-form-row { margin-bottom: 10px; }
.ship-module input.ship-ro,
.ship-module select.ship-ro {
  background: #f3faf8;          /* z940：比模块底色 #ebf4f3 更浅的浅绿，保留框感 */
  border-color: #d9e8e2;        /* 描边带一点绿灰，与底色同系 */
  cursor: default;              /* z941（陶总）：不要禁止光标 */
}

/* ============================================================
   z939（陶总 2026-11-02）：登记页整页模式下发货锁定字段被压回白框的修复
   ------------------------------------------------------------
   现象：登记页挂单锁定后（ship-ro），打包要求/收件信息/收货省份仍是白底边框，
         锁定态 ship-ro 的底色/边框被压成整页模式的白框——陶总截图反馈。
   根因：z537 整页模式字段统一规则（本文件 ~5524 行）
         html.page-mode[data-page="order"] .detail-form-row input/select
         权重 (0,3,2) > .ship-module input.ship-ro (0,2,1)，background:#fff 胜出。
   修法：同前缀提权压回（0,4,2）。z940 定案：保留输入框的框、
         底色=比模块浅绿更浅的浅绿 #f3faf8（推翻 z936 平铺文字方案）。
   ============================================================ */
html.page-mode[data-page="order"] .ship-module input.ship-ro,
html.page-mode[data-page="order"] .ship-module select.ship-ro {
  background: #f3faf8;
  border-color: #d9e8e2;
  cursor: default;              /* z941：整页模式同样不要禁止光标 */
}

/* ============================================================
   z942（陶总 2026-11-02）：纸张价格页「添加纸张 + 应用场景」
   · .pp-add-btn 分区标题右侧的「＋添加」按钮（仅管理员可见）
   · .apply-dd 「应用」列多选下拉（按钮 + 勾选浮层）
   · .pp-del-btn 自定义行删除按钮
   ============================================================ */
.pp-add-btn {
  margin-left: auto;
  font-size: 12px;
  padding: 4px 12px;
  white-space: nowrap;
  color: #05978c;
  border-color: #9fd6cd;
}
.pp-add-btn:hover { background: #f0faf8; }
.apply-dd { position: relative; display: inline-block; vertical-align: middle; }
.apply-dd-btn {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}
.apply-dd-btn:disabled { cursor: default; color: #999; }
.apply-dd-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  padding: 8px 10px;
  min-width: 175px;
  text-align: left;
}
.apply-dd-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #333;
  padding: 3px 2px;
  white-space: nowrap;
  cursor: pointer;
}
.pp-del-btn {
  margin-left: 6px;
  font-size: 12px;
  color: #e05656;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  vertical-align: middle;
}
.pp-del-btn:hover { text-decoration: underline; }

/* ============================================================
   z942（陶总 2026-11-02）：纸张价格页「添加纸张 + 应用场景」
   · .pp-add-btn 分区标题右侧的「＋添加」按钮（仅管理员可见）
   · .apply-dd 「应用」列多选下拉（按钮 + 勾选浮层）
   · .pp-del-btn 自定义行删除按钮
   ============================================================ */
.pp-add-btn {
  margin-left: auto;
  font-size: 12px;
  padding: 4px 12px;
  white-space: nowrap;
  color: #05978c;
  border-color: #9fd6cd;
}
.pp-add-btn:hover { background: #f0faf8; }
.apply-dd { position: relative; display: inline-block; vertical-align: middle; }
.apply-dd-btn {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}
.apply-dd-btn:disabled { cursor: default; color: #999; }
.apply-dd-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  padding: 8px 10px;
  min-width: 175px;
  text-align: left;
}
.apply-dd-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #333;
  padding: 3px 2px;
  white-space: nowrap;
  cursor: pointer;
}
.pp-del-btn {
  margin-left: 6px;
  font-size: 12px;
  color: #e05656;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  vertical-align: middle;
}
.pp-del-btn:hover { text-decoration: underline; }

/* ============================================================
   z946（陶总 2026-11-02）：纸张价格页 —— 左上角统一「添加」入口 + 添加弹窗
   · 三张表不再各放按钮，统一走一个弹窗：纸张（吨价）/ 无碳纸（令价）/ 不干胶（元/㎡）
   ============================================================ */
.pp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px 0;
}
.pp-toolbar .pp-add-all-btn {
  background: #05978c;
  border-color: #05978c;
  color: #fff;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
}
.pp-toolbar .pp-add-all-btn:hover { background: #048078; border-color: #048078; }
.pp-toolbar-tip { font-size: 12px; color: #9aa3ab; }

.pp-add-modal { width: 480px; max-width: 92vw; }
/* z950（陶总 2026-11-02）：表单内容靠左（与标题对齐），宽度固定 380——z948 的居中方案否掉 */
.pp-add-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  max-width: 380px;
  margin-left: 0;
  margin-right: auto;
}
.pp-add-field > label {
  width: 84px;
  flex: 0 0 84px;
  font-size: 13px;
  color: #555;
  text-align: right;
}
.pp-add-field > select,
.pp-add-field > input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}
.pp-add-field > select:focus,
.pp-add-field > input:focus { outline: none; border-color: #05978c; }
.pp-unit-tag { font-size: 12px; color: #9aa3ab; white-space: nowrap; }
.pp-add-note {
  margin: 2px 0;
  max-width: 380px;
  padding-left: 94px;
  box-sizing: border-box;
  font-size: 12px;
  color: #9aa3ab;
  line-height: 1.6;
}
.pp-add-err {
  margin: 6px 0 0;
  max-width: 380px;
  padding-left: 94px;
  box-sizing: border-box;
  font-size: 12px;
  color: #d33;
  min-height: 16px;
}
.pp-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid #f0f0f0;
}
/* 异价自定义纸张行（另起一行的那条）——与族行区分：浅绿底 + 缩进树枝标记 */
.pp-subrow td { background: #fbfdfc; }
.pp-subrow .pp-subrow-name {
  padding-left: 26px;
  color: #05978c;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   z944（陶总 2026-11-02）：纸张价格页视觉/交互修补
   ① 表头灰底溢出圆角容器 → 表头首尾 th 补圆角（配合容器 overflow 裁切双保险）
   ② 表格拖宽不再冲破边框 → 容器 overflow-x:auto（index.html 行内已加），这里给滚动条美化
   ============================================================ */
#paper-price-table thead th:first-child,
#carbonless-price-table thead th:first-child,
#sticker-price-table thead th:first-child,
#craft-price-table thead th:first-child { border-top-left-radius: 8px; }
#paper-price-table thead th:last-child,
#carbonless-price-table thead th:last-child,
#sticker-price-table thead th:last-child,
#craft-price-table thead th:last-child { border-top-right-radius: 8px; }

/* ============================================================
   z944（陶总 2026-11-02）：纸张价格页视觉/交互修补
   ① 表头灰底溢出圆角容器 → 表头首尾 th 补圆角（配合容器 overflow 裁切双保险）
   ② 表格拖宽不再冲破边框 → 容器 overflow-x:auto（index.html 行内已加），这里给滚动条美化
   ============================================================ */
#paper-price-table thead th:first-child,
#carbonless-price-table thead th:first-child,
#sticker-price-table thead th:first-child,
#craft-price-table thead th:first-child { border-top-left-radius: 8px; }
#paper-price-table thead th:last-child,
#carbonless-price-table thead th:last-child,
#sticker-price-table thead th:last-child,
#craft-price-table thead th:last-child { border-top-right-radius: 8px; }

/* z982（陶总 2026-11-06）：封面/内页「其他」纸张的单价框 → 实时折算成本的小字提示 */
.detail-inline-item .other-unit-preview {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #6b7280;
}
.detail-inline-item .other-unit-preview:empty { display: none; }

/* z982（陶总 2026-11-06）：封面/内页「其他」纸张的单价框 → 实时折算成本的小字提示 */
.detail-inline-item .other-unit-preview {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #6b7280;
}
.detail-inline-item .other-unit-preview:empty { display: none; }

/* ===== z1002（陶总 2026-11-09）：令价表「纸张」列可就地改名 =====
   陶总原话：「令价表格里纸张这一列改成可编辑（跟其他表格一样 有个编辑的图标 点击后可以编辑）」。
   · 点铅笔图标 → 该纸名进编辑态（contenteditable）→ 回车/失焦保存，Esc 还原
   · 铅笔图标默认透明，鼠标移到行上淡入（与订单表/客户表同一套交互）
   ⚠️ 订单表那套 .ce-edit-btn 样式是 .inquiry-table 作用域的，纸张价格页的表不在里面 →
      这里单独给一套（图标形状用同一张 SVG，保持视觉一致）。 */
.pp-paper-name { border-bottom: 1px dashed transparent; }
.pp-paper-name:hover { border-bottom-color: #cfd8dc; }
.pp-paper-name.editing {
  display: inline-block;
  min-width: 60px;
  padding: 1px 5px;
  border: 1px solid #f5a623;
  border-radius: 4px;
  background: #fffbe6;
  outline: none;
  font-size: 13px;
  color: #333;
}
.pp-paper-edit {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  vertical-align: -2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s, background-color .12s;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa8bb' d='M11.9 1.2a1.9 1.9 0 0 1 2.9 2.4l-.9.9-2.6-2.6.6-.7zM9.9 3.6l2.6 2.6-7.2 7.2-3.4.8.8-3.4 7.2-7.2z'/%3E%3C/svg%3E");
}
tr:hover .pp-paper-edit { opacity: 1; }
.pp-paper-edit:hover {
  background-color: var(--brand-pale);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%234370fa' d='M11.9 1.2a1.9 1.9 0 0 1 2.9 2.4l-.9.9-2.6-2.6.6-.7zM9.9 3.6l2.6 2.6-7.2 7.2-3.4.8.8-3.4 7.2-7.2z'/%3E%3C/svg%3E");
}
.pp-paper-name.editing + .pp-paper-edit { display: none; }   /* 编辑态隐藏图标 */
/* 触屏/无 hover 设备：图标常显半透明（否则根本看不到铅笔，跟订单表同处理） */
@media (hover: none) {
  .pp-paper-edit { opacity: .45; }
}

/* ===== z1003（陶总 2026-11-09）：工艺表「停用/启用」切换按钮 =====
   停用=报价/登记暂不可选（行置灰、按钮变「启用」）；删除按钮沿用 .pp-del-btn。 */
.pp-toggle-btn {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid #f5a623;
  color: #b26a00;
  background: #fff7e6;
  cursor: pointer;
  white-space: nowrap;
}
.pp-toggle-btn:hover { background: #ffecc7; }

/* ============================================================
   z1011（陶总 2026-11-10）：移动端页面改版（**只影响 ≤768px，桌面端全部不变**）
   陶总要求：
     ① 订单记录页 / 客户信息表 → 表格内容不可编辑（JS 侧已用 tableCellEditable 统一拦截）；
     ② 订单对账页 → 只保留「搜索 + 新建订单 + 表格 + 分页」，
        **去掉右侧未收款看板**（桌面端的两栏布局保留）；
     ③ 应收 / 应付 → 拆成两个独立页面（侧边栏两个入口）；
     ④ 移动端移除「制作表单 / 开票 / 报价练习」三个入口。
   ============================================================ */
@media (max-width: 768px) {
  /* ② 订单对账页：右侧看板（未收款统计/客户欠款排行）在手机端**整块不显示**。
     ⚠️ 原先 ≤1000px 只是把它**堆叠到表格下方**（还能看到），
        陶总要的是「只保留截图那部分」→ 表格下方不再出现看板。
     JS 侧同步跳过 renderGroupBoard() 的渲染（少画一遍，省手机性能）。 */
  html.page-mode[data-page="groups"] .recon-right { display: none !important; }
  html.page-mode[data-page="groups"] .recon-layout { grid-template-columns: minmax(0, 1fr) !important; }
  /* 表格区独占整屏高度（原来右板占位会导致表格被压缩） */
  html.page-mode[data-page="groups"] .recon-layout { grid-template-rows: minmax(0, 1fr) !important; }
}

@media (max-width: 768px) {
  /* ② 订单对账页：顶部汇总条（grp-stats）与筛选状态条（grp-filter-chip）在手机端也隐藏 ——
     陶总给的参照截图只有：搜索框 + 「共 N 个订单」+ 新建订单按钮 + 表格 + 分页条。 */
  html.page-mode[data-page="groups"] .grp-stats { display: none !important; }
  html.page-mode[data-page="groups"] .recon-chip { display: none !important; }
}

/* z1011（陶总 2026-11-10）：移动端侧边栏入口调整
   ① 应收 / 应付 → 两个独立入口（桌面端隐藏，桌面上仍用原「应收应付」左右分栏）
   ② 制作表单 / 开票 / 报价练习 → 手机端移除（桌面端不变） */
.sidebar-item-move-only { display: none; }

@media (max-width: 768px) {
  /* ① 应收 / 应付两个独立入口只在手机端出现 */
  .sidebar-item-move-only { display: flex; }
  /* 桌面的「应收应付」单入口在手机端让位给两个独立入口 */
  #sb-finance { display: none; }
  /* ② 陶总原话：「制作表单、开票、报价练习页面都不要」（移动端） */
  #sb-docs, #sb-invoice, #sb-training { display: none !important; }
}

/* ===== z1073（陶总 2026-11-13）：多工单「本单金额」加和对不上 —— 最简提醒 =====
   陶总原话：「弹窗不要搞这么复杂，就只要提醒对不上就好了，按最简洁的形式来」。
   所以：一个标题 + 一行两个数字 + 一个「返回修改」；没有明细表、没有差额、
   不给「仍然保存」的口子（加和无误才允许存）。 */
.amt-mismatch-mask {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .38);
}
.amt-mismatch-box {
  width: 330px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
}
.amt-mismatch-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1a2b40;
}
.amt-mismatch-line {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #55637a;
  font-variant-numeric: tabular-nums;
}
.amt-mismatch-btn {
  display: block;
  margin-left: auto;
  padding: 7px 18px;
  border: none;
  border-radius: 8px;
  background: var(--brand, #4370fa);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.amt-mismatch-btn:hover { background: var(--brand-strong, #2f56db); }


/* ===== z1109：详情页底部只读成本区 ===== */
/* z1116（陶总 2026-11-17）：去掉「成本￥总额」头行只留明细行，整体收紧：
   内边距/外边距缩小、行内 gap 8→4px（金额跟括号不再隔很远）、行高 1.9→1.6。
   总成本金额挪到整块悬浮 title。分隔「｜」项间连接。 */
.cost-panel {
  margin-top: 8px;
  padding: 6px 10px;
  background: #f7f9fb;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  row-gap: 2px;
}
.cost-panel-head { display: flex; align-items: baseline; gap: 10px; flex: 0 0 auto; }
.cost-panel-head .detail-label { margin: 0; }
.cost-panel-val { font-size: 18px; font-weight: 700; color: #1f2d3d; }
.cost-panel-val.cost-panel-empty { font-size: 14px; font-weight: 400; color: #9aa1ac; }
.cost-panel-sep { color: #c3cad4; font-size: 13px; flex: 0 0 auto; }
.cost-panel-row { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; color: #5b6673; line-height: 1.6; }
.cost-panel-row b { color: #1f2d3d; font-weight: 600; }
.cost-panel-row em { font-style: normal; color: #9aa1ac; font-size: 12px; }
.cost-panel-tip { margin-top: 0; font-size: 12px; color: #9aa1ac; }

/* =================== z1152（陶总 2026-11-19）：侧栏「草绿」换肤按钮上移一点点 ===================
   陶总原话：「草绿按钮的位置往上挪一点点」。
   位置在 .sidebar-foot 里：管理员徽章 → 换肤按钮（绿点+「草绿」）→ 退出登录。
   只把换肤按钮整体上提 4px（管理员徽章与它之间的空白收窄），
   「退出登录」跟随上移同样的距离 —— 两个按钮之间的间距不变，不会挤在一起。 */
.sidebar-foot .sb-foot-btn.sb-theme-btn {
  margin-top: -4px;
}

/* =================== z1155（陶总 2026-11-19）：纸张下拉特殊项加粗 ===================
   「无封面/彩澜印/数码印/其他」跟纸族名一样加粗 —— 原生 <select> 弹出菜单在 macOS 上
   不支持选项样式（font-weight 无效），所以封面/内页纸张下拉在桌面也改走 csx 自绘面板，
   这两个类分别作用于面板里的选项和触发框里的当前值。 */
.csx-opt.csx-bold {
  font-weight: 700;
}
.csx-val.csx-bold {
  font-weight: 700;
}

/* ===== z1267（陶总 2026-11-27）：开票需求表 =====
   原「开票抬头 + 开票要求 + 需求列表」三块合并成一张表：
   购方名称/税号/票种/项目名称/规格型号/单位/数量/金额 + 操作列，每格点铅笔就地编辑（改完即存）。 */
#invoice-req-table { min-width: 1120px; }
#invoice-req-table th { white-space: nowrap; }
/* z1275：窄列最小宽度 —— 浏览器会按内容分配列宽，窄列被压到 52px 时放不下铅笔（15px），
   铅笔只能挤到文字上（重叠 2px）。给每列设 min-width，保证「文字 + 铅笔」都放得下。 */
#invoice-req-table th.col-ir-title { min-width: 150px; }
#invoice-req-table th.col-ir-taxno { min-width: 150px; }
#invoice-req-table th.col-ir-type { min-width: 72px; }
#invoice-req-table th.col-ir-item { min-width: 90px; }
#invoice-req-table th.col-ir-spec { min-width: 90px; }
#invoice-req-table th.col-ir-unit { min-width: 60px; }
#invoice-req-table th.col-ir-qty { min-width: 68px; }
#invoice-req-table th.col-ir-amount { min-width: 90px; }
#invoice-req-table th.col-ir-ops { min-width: 170px; }
#invoice-req-table td.ir-cell {
  position: relative; padding: 8px 10px; text-align: center; vertical-align: middle;
  border-top: 1px solid #f2f3f5; font-size: 13px; color: #303133; word-break: break-all;
}
#invoice-req-table .ir-empty { color: #c0c4cc; font-size: 12px; }
#invoice-req-table .ir-warn { color: #d97706; font-weight: 600; }
/* 🔴 z1273（陶总 2026-11-27）：铅笔按钮改为**绝对定位**（不再占布局宽度）——
   之前它是 inline 元素，虽然 opacity:0 看不见，但**仍占 ~20px 宽度** →
   可编辑行（待开票行）的文字被整体顶偏 10px，只读行（已开票）却正中 → 同一列各行文字不在一条线上。
   z1274（陶总 2026-11-27）：位置由「右上角」改为**紧跟文字右侧**（left 由 JS 按实测文字宽度算，top 垂直居中）。
   绝对定位 → 不占布局宽度 → 文字在本列内仍真正居中，且铅笔跟在文字后面（与其他表格一致）。 */
#invoice-req-table .ir-pencil {
  position: absolute; top: 50%; transform: translateY(-50%); margin-left: 0;
  border: 0; background: rgba(255,255,255,.92); color: #9aa0aa; cursor: pointer;
  font-size: 10px; line-height: 1; padding: 1px 2px; border-radius: 3px; opacity: 0; transition: opacity .12s;
  white-space: nowrap;
}
#invoice-req-table td.ir-cell:hover .ir-pencil { opacity: 1; }
#invoice-req-table .ir-pencil:hover { color: #2563eb; background: #eef4ff; }
/* z1278：编辑框**占满整格**（照抄站内既有做法：价格管理页是格内常驻输入框、客户信息表是点铅笔就地编辑，
   编辑态都占满格子 → 字看得全）。
   ⚠️ 之前 width:100% 会撑大列（列宽是自动布局）→ z1277 已加**编辑期间锁定列宽**，
   现在 100% 只是占满"已锁定"的格子 → 列宽与列位置都不动（实测偏移 0px）。 */
#invoice-req-table .ir-edit {
  width: 100%; max-width: 100%; padding: 3px 5px; font-size: 13px; text-align: center;
  border: 1px solid #2563eb; border-radius: 4px; box-sizing: border-box; color: #303133;
}
#invoice-req-table td.ir-ops {
  text-align: center; white-space: nowrap; padding: 8px 6px; border-top: 1px solid #f2f3f5;
}
#invoice-req-table td.ir-ops .inv-st { margin-right: 6px; }
#invoice-req-table tr.ir-done td { background: #fafbfc; }
#invoice-req-table tr.ir-done td.ir-cell { color: #8a8f99; }
#invoice-req-table tr.ir-new td { background: #fffbea; }

/* z1269（陶总 2026-11-27）：【开票】按钮放到**搜索框右边同一行**（对齐客户档案页「搜索 + ＋新增」排法） */
.inv-order-toolbar { display: flex; align-items: center; gap: 10px; }
.inv-order-toolbar .inv-search { flex: 1; min-width: 0; margin-bottom: 8px; }
.inv-order-toolbar .inv-open-btn { flex: none; padding: 7px 20px; font-size: 13px; height: 38px; }

/* z1270（陶总 2026-11-27）：「开票记录」标题 —— 制作表单同款「蓝色竖条 + 加粗标题」（视觉抄 .fsec-title） */
.inv-req-title {
  font-size: 13px; font-weight: 600; color: #1f2a4d; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.inv-req-title::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); flex: none;
}
/* 搜索框与【开票】按钮上下对齐：搜索框的下边距挪到整行容器上（否则按钮视觉偏下 2~4px） */
.inv-order-toolbar { margin-bottom: 8px; }
.inv-order-toolbar .inv-search { margin-bottom: 0; }

/* z1271（陶总 2026-11-27）：统一需求表行高 ——
   操作列带【已开票】按钮的行原本比纯文字行高 5px（按钮高 23 + 上下 padding 16 = 39，
   纯文字行 = 行高 18 + 16 = 34）→ 各行文字不在同一水平线，看着"没垂直居中对齐"。
   修法：td 固定最小高度 38px + vertical-align:middle，操作列按钮 padding 收到 1px 10px（高 21）。 */
#invoice-req-table td.ir-cell, #invoice-req-table td.ir-ops { height: 38px; vertical-align: middle; }
#invoice-req-table td.ir-ops .inv-approve,
#invoice-req-table td.ir-ops .inv-retry { padding: 1px 10px; line-height: 18px; }
