* {
  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, #1a5fb4, #185FA5);
}
.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: #1a5fb4;
  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: #1a5fb4;
}
.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;
  background: #f5f5f5;
  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: #1a5fb4;
  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: #1a5fb4;
  font-weight: 600;
}
.topbar-acts .btn-primary:hover { background: #e8f0fa; }
.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: #f0f5fb; color: #1a5fb4; }

/* 角色区里的「退出登录」：蓝底上白底蓝字（z545 从报价页专属规则提升为全站） */
.topbar .role-selector-wrap .btn-outline { background: #fff; border-color: #fff; color: #1a5fb4; }
.topbar .role-selector-wrap .btn-outline:hover { background: #e8f0fa; color: #1a5fb4; }
.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: #1a5fb4;
  color: #fff;
}

.btn-primary:hover {
  background: #185fa5;
}

.btn-outline {
  background: #fff;
  color: #1a5fb4;
  border: 1px solid #1a5fb4;
}

.btn-outline:hover {
  background: #e6f1fb;
}

.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: #1a5fb4;
}

.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: #1a5fb4;
  background: rgba(26, 95, 180, .10);
}

.filter-tab.active {
  background: #1a5fb4;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(26, 95, 180, .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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, .12);
}
.board-search-input.has-value {
  border-color: #1a5fb4;
}
.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: #1a5fb4; 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: 12px;
  border: 1px solid #e8e8e8;
  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: #1a5fb4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.order-card.urgent {
  border-color: #E24B4A;
  background: #FFF8F6;
}

/* z689（陶总 2026-09-19）：登记满4天还在生产中（生产中/外发中）的卡片 → 红框提醒。
   注意基类 :hover 会把边框变蓝，这里必须按住红色，否则鼠标一悬停红框就消失。 */
.order-card.card-overdue {
  border: 2px solid #E24B4A;
  box-shadow: 0 0 0 1px rgba(226, 75, 74, 0.25);
}
.order-card.card-overdue:hover {
  border-color: #E24B4A;
  box-shadow: 0 0 0 1px rgba(226, 75, 74, 0.45);
}

.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;
}

.card-filename {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #2c2c2a;
  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;
}

.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 {
  background: #2e7d32;
  color: #fff;
  margin-left: auto;
}

.tag-prepaid {
  background: #1565c0;
  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: #e3effb; color: #1a5fb4; font-weight: 700; }
.tag-ch-purple { background: #efe6fa; color: #6b3fa0; font-weight: 700; }
.tag-ch-teal   { background: #e0f2f1; color: #00796b; font-weight: 700; }
.tag-ch-orange { background: #fdeede; color: #c05600; font-weight: 700; }
.tag-ch-green  { background: #e6f4e6; color: #2e7d32; 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;
}

.card-outsourcing {
  background: #f0f7ff;
  border-color: #b3d4ff;
}

.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;
}

.btn-win {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

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

.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: #2e7d32;
}

/* Floating Dashboard (z223 重新设计：渐变悬浮卡片+可拖动) */
.dash-float-toggle {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(150deg, #4c8dff 0%, #1a5fb4 100%);
  color: #fff;
  padding: 16px 10px;
  border-radius: 14px;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 4px 18px rgba(26,95,180,0.38);
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
}

.dash-float-toggle:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 6px 24px rgba(26,95,180,0.5);
}

.dash-float-toggle-icon {
  font-size: 18px;
  writing-mode: horizontal-tb;
}

.dash-float-toggle-text {
  letter-spacing: 3px;
}

.dash-float-panel {
  position: fixed;
  right: 14px;
  top: 64px;
  width: 348px;
  max-width: calc(100vw - 28px);
  height: min(620px, calc(100vh - 100px));
  background: #fff;
  z-index: 201;
  display: none;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}

.dash-float-panel.open {
  display: flex;
}

.dash-float-panel.dragging {
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.08);
  transition: none;
}

.dash-float-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #4c8dff 0%, #1a5fb4 100%);
  color: #fff;
  cursor: move;
  user-select: none;
}

.dash-float-header h3 {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-float-close {
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.dash-float-close:hover {
  background: rgba(255,255,255,0.35);
}

.dash-float-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f7f8fa;
  display: flex;
  flex-direction: column;
}

.dash-float-body::-webkit-scrollbar {
  width: 4px;
}

.dash-float-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

/* 拖动手柄（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: #E6F1FB; }
.sb-metric-red { background: #FCEBEB; }
.sb-metric-green { background: #E8F5E9; }
.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: #0C447C; }
.sb-metric-red .sb-metric-value { color: #A32D2D; }
.sb-metric-green .sb-metric-value { color: #1B7340; }
.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;
}

/* 新增/编辑客户弹窗加宽 */
#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: #185fa5;
  box-shadow: 0 0 0 3px rgba(24,95,165,.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: #1a5fb4;
  border-bottom-color: #1a5fb4;
}

.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: #1a5fb4;
}

.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: #1a5fb4;
  color: #1a5fb4;
}

/* Summary */
.mc-summary {
  background: #f0f7ff;
  border-color: #d0e0f0;
}

.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 #d0e0f0;
}

.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;
}

.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: #2e7d32;
  font-weight: 600;
}

.qr-comp-badge {
  font-size: 12px;
  color: #fff;
  background: #2e7d32;
  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: #e8f5e9;
  color: #2e7d32;
  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: #e8f5e9;
  border-color: #4caf50;
}
.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: #2e7d32;
}
.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: #2e7d32;
  text-align: center;
  padding: 6px;
  background: #e8f5e9;
  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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.08);
}

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

.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: #1677ff;
  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: #e8f0fe;
  color: #1a5fb4;
  margin-left: 6px;
}

/* 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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.08);
}

.smart-fill-btn {
  margin-top: 6px;
  font-size: 12px;
  padding: 4px 12px;
  color: #1a5fb4;
  border-color: #1a5fb4;
}

.smart-fill-btn:hover {
  background: #1a5fb4;
  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;
}

.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: #1a5fb4;
  background: rgba(26, 95, 180, .10);
}

.list-tab.active {
  color: #fff;
  background: #1a5fb4;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(26, 95, 180, .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);
}

.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: #1a5fb4;
}

.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: #eef5fc;
  border: 1px solid #cfe2f5;
  border-radius: 8px;
  font-size: 13px;
  color: #185FA5;
  line-height: 1.4;
}
.inquiry-group-hint .btn-clear-group-filter {
  flex: none;
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
  color: #185FA5;
  background: #fff;
  border: 1px solid #a8caea;
  border-radius: 6px;
  cursor: pointer;
}
.inquiry-group-hint .btn-clear-group-filter:hover {
  background: #185FA5;
  color: #fff;
  border-color: #185FA5;
}

.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: #1a5fb4;
}

.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; }   /* 加工方 */
/* 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; }   /* 提交人 */
.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: #d4f7dc; box-shadow: inset 0 0 0 2px #4caf50; }
  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: #185FA5;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-statement:hover {
  background: #144d8a;
}
.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; }
/* 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: 140px; }
.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(26, 95, 180, 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），
      影子必须跟着换色，否则补上去的是一条灰线、缝里露的还是白。 */
.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;
}

/* ============================ 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 规则保持一致，改一处要改两处。
   ==================================================================================================== */
/* ③ 手动模式（四表统一） */
.cust-table.colwidth-manual,
.grp-table.colwidth-manual,
#inquiry-list-modal .inquiry-table.colwidth-manual,
#paper-price-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%; }

/* ② 客户信息表（20 列）列宽下限 */
.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-company,
.cust-table th.col-action { min-width: 140px; }
.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; }      /* 税种 */
.cust-table th.col-taxno { min-width: 120px; }   /* 税号 */
.cust-table th.col-addr { min-width: 150px; }    /* 常用地址 */
.cust-table th.col-remark { min-width: 120px; }  /* 备注（一直没写宽度的那一列） */

/* ② 订单记录表（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-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; }
.inquiry-table th.col-submitter { min-width: 80px; }
.inquiry-table th.col-ops { min-width: 185px; }
.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: #1a5fb4;
}
/* 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 定的浅蓝 #f0f7ff）。横向滚动时操作列不跟着滚走。 */
.cust-table th.col-action,
.cust-table td.col-action-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #f0f7ff;
  box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.cust-table tr:hover td.col-action-cell {
  background: #e3f0fc;
}
.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: #1a5fb4;
  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: #f0f7ff;
  box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}
.inquiry-table tr:hover td.td-ops {
  background: #e3f0fc;
}
.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: #e8f5e9;
  color: #2e7d32;
}

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

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

.status-badge.status-active {
  background: #e3f2fd;
  color: #1565c0;
}

.status-badge.status-prepaid {
  background: #e3f2fd;
  color: #1565c0;
}

/* =================== 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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 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: #f2f6fc;
  border: 1px dashed #b9cbe4;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-inline-grid {
  display: flex;
  gap: 16px;
}

.detail-inline-item {
  flex: 1;
}

.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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.08);
}

.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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.08);
}

.detail-form-row input:disabled,
.detail-form-row select: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: #e8f5e9;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.detail-production-box .detail-label {
  color: #2e7d32;
  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 */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 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;
}

/* 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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.08);
}
.size-sep {
  flex-shrink: 0;
  color: #999;
  font-size: 14px;
}

/* Craft checkboxes: horizontal, no text wrapping */
.craft-card {
  background: #eef2fb;
  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: #1a5fb4;
}
.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;
}

.btn-lose-outline {
  background: #fff;
  color: #c62828;
  border: 1px solid #c62828;
  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: #fbe9e7;
}

.detail-status-won {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #2e7d32;
  background: #e8f5e9;
  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: #1565c0;
  background: #e3f2fd;
  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: #1a5fb4;
}

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

.mc-cost-rows-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

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

.mc-cost-row-inline input {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  text-align: right;
}

.mc-cost-row-inline input:focus {
  border-color: #1a5fb4;
}

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

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

.mc-add-inline {
  background: none;
  border: 1px dashed #ccc;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-add-inline:hover {
  border-color: #1a5fb4;
  color: #1a5fb4;
}

.mc-summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f0f7ff;
  border: 1px solid #d0e0f0;
  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;
}

.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: #1a5fb4;
}

.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: #E1F5EE; }
.dash-metric-blue { background: #E6F1FB; }
.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: #085041; }
.dash-metric-blue .dash-metric-value { color: #0C447C; }
.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: #0F6E56;
  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: #E6F1FB;
  border-radius: 4px;
  overflow: hidden;
}

.dash-ch-bar-bg-offline {
  background: #E1F5EE;
}

.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: #0F6E56;
}

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

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

/* =================== Mobile Bottom Navigation =================== */
.bottom-nav {
  display: none;
}

/* =================== 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 */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 200;
    padding: 4px 0;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: none;
    background: none;
    font-size: 10px;
    color: #999;
    cursor: pointer;
    padding: 6px 0;
    font-family: inherit;
    transition: color 0.15s;
  }
  .bottom-nav-item.active {
    color: #1a5fb4;
  }
  .bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
  }

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

  /* Floating dashboard hidden on mobile */
  .dash-float-toggle {
    display: none;
  }

  .dash-float-panel {
    display: none !important;
  }

  /* 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: 12px;
  }
  .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 {
    flex-direction: column;
    gap: 6px;
  }
  .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;
  }

  /* 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: #185FA5;
  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: #e8f0fe;
  color: #1a73e8;
  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;
}
#employee-tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
}
#employee-tbody tr:hover td {
  background: #fafafa;
}

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

/* ===== 彩澜订单信息抓取展示 ===== */
.cailan-status { margin-top: 6px; }
.cailan-info-box {
  border: 1px solid #d9e4d0;
  background: #f7fbf4;
  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: #2c5e15; 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 #d9e4d0; }

/* 彩澜多订单号（z156） */
.btn-add-cailan-no {
  margin-top: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: #2c5e15;
  background: #f0f7ea;
  border: 1px dashed #9dc57e;
  border-radius: 5px;
  cursor: pointer;
}
.btn-add-cailan-no:hover { background: #e2f0d5; }
.cailan-extra-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e0e8d8; }
.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(26,95,180,.14); color: #1a5fb4; }
.th-filter-btn.active { opacity: 1; color: #1a5fb4; background: rgba(26,95,180,.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: #1a5fb4; }
.colf-actions { display: flex; gap: 14px; padding: 6px 10px 2px; }
.colf-link {
  background: none;
  border: none;
  color: #1a5fb4;
  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; }
/* 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: #dde7f3; }
.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;
}

/* z270: 画册报价明细行 */
.qr-detail-line {
  font-size: 12px;
  color: #666;
  padding: 6px 2px 0;
  line-height: 1.6;
  border-top: 1px dashed #e5e5e5;
  margin-top: 6px;
}

/* ===== z373 报价卡视觉层级：成本行强化、快递比价弱化、信息分层（陶总 2026-09-03）===== */
/* 行1 成本核算段：深色加粗，与下方比价/快递的浅灰拉开层级 */
.qr-mini.qr-cost {
  color: #333;
  font-weight: 600;
}
/* 行1（报价+成本）与后续区块的分隔虚线 */
.qr-total-line {
  padding-bottom: 4px;
  border-bottom: 1px dashed #ececec;
  margin-bottom: 2px;
}
/* 行3 客户文案框文字加深：报价正文是重点，保证可读 */
.qr-detail-box {
  color: #555;
}
/* 快递比价：小字但必须可读
   z470（陶总 2026-09-07）：此前为"弱化存在感"整行压到 #bbb（白底对比度≈1.9:1，肉眼几乎看不见），
   选中项也从深绿 #2e7d32 降到淡绿 #9db99f → 用户反馈"快递比价都没了"。
   现恢复可读配色（标签 #888 / 普通 #555 / 最低价 #2e7d32 加粗），字号保持 12px 不喧宾夺主。 */
.qr-delivery-line.qr-shipping {
  font-size: 12px;
}
.qr-delivery-line.qr-shipping .qr-delivery-label {
  color: #888;
}
.qr-delivery-line.qr-shipping .qr-delivery-opt {
  color: #555;
}
.qr-delivery-line.qr-shipping .qr-delivery-opt.cheapest {
  color: #2e7d32;
  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: #409eff; color: #409eff; }
.fq-cat-btn.active { background: #409eff; border-color: #409eff; color: #fff; }
/* z427：报价表单一行 3 个输入框（原 2 列），工艺多选独占整行——像订单登记那样紧凑。
   grid-auto-flow:row dense 让末尾单字段（如 province）回填工艺整行前留下的空缺，避免散尾孤行。 */
.fq-form { display: grid; grid-template-columns: repeat(3, 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: #409eff; }
/* 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: #409eff; 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: #f0f6ff; }
.csx-opt.sel { color: #1a5fb4; font-weight: 600; background: #f0f6ff; }

/* ===== 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: #f4f7fb;
  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: #e8f0fa; color: #1a5fb4; }
.page-nav-item.active { background: #1a5fb4; color: #fff; }

/* 页面模式下：隐藏工作台自身的按钮区 / 看板 / 业绩浮动面板 */
html.page-mode .topbar-acts { display: none !important; }
html.page-mode .main-content { display: none; }
html.page-mode .dash-float-toggle,
html.page-mode .dash-float-panel { display: none !important; }
html.page-mode .logo { cursor: pointer; }
/* ⚠️ #app 默认 min-height:100vh（看板要撑满屏）——页面模式下必须归零，
   否则 56px 顶栏 + 100vh 空容器会把整页内容顶到首屏之外（z533 踩过：截图一片空白）。 */
html.page-mode #app { min-height: 0; }
/* 顶栏在页面模式下改为 fixed，功能页正文用 body padding 让位 */
html.page-mode body { padding-top: 56px; }
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; }
/* 弹窗专属控件在页面模式下无意义 */
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: #1a5fb4; color: #1a5fb4; background: #f4f8fd; }

/* ===== 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: #e8f0fa;
  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='%231a5fb4' 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; }
}

/* ===== z538（陶总 2026-09-11）：报价页整页改成"客户端报价界面"样式 =====
   陶总："报价页改成客户端这种样式，样式要完全一样"（截图 = customer.html 的报价下单页）。
   对齐口径（AskUserQuestion 确认）：
     ① 整页改（顶栏 + 功能页签 + 表单卡片一起）；
     ② 结构照抄客户端，**主色沿用工作台蓝 #1a5fb4**（不换成客户端的绿 #2c7a63）；
     ③ 工作台独有内容（「清空重填」按钮、报价结果里的成本/通道信息）全部保留，只换外观。
   客户端基准（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: #f0f3f8; }

/* —— ② 功能页签：蓝色胶囊 → 白底 + 下划线（客户端 .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: #1a5fb4; }
html.page-mode .page-nav-item.active {
  background: none; color: #1a5fb4; font-weight: 600; border-bottom-color: #1a5fb4;
}
/* 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: #1a5fb4; font-weight: 600; border-bottom-color: #1a5fb4;
}
/* 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: 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;
}
/* 卡片标题：仅报价页显示（工作台弹窗 / 其它页不出现，保持原貌） */
.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: #1a5fb4; color: #1a5fb4; }
html.page-mode[data-page="quote"] .fq-cat-btn.active {
  background: #1a5fb4; border-color: #1a5fb4; color: #fff; font-weight: 600;
}

/* —— ⑤ 表单：灰底块 + 标签在左 → 虚线上边框 + 标签在上、框在下（客户端 .cq-form / .cq-field） —— */
html.page-mode[data-page="quote"] .fq-form {
  display: grid; grid-template-columns: repeat(3, 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: #1a5fb4; }
/* 自绘下拉（.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: #1a5fb4; }
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: #1a5fb4; 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: #f0f3f8; }
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: #1a5fb4;
}
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: #1a5fb4; 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: #1a5fb4; background: #fff;
}
html.page-mode[data-page="order"] .smart-fill-btn:hover { background: #f2f7fd; color: #1a5fb4; }
/* ⑤ 底部：整行主色大按钮 + 「保存草稿」降级为下方小灰字（与报价页的 计算报价/清空重填 同构） */
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: #1a5fb4; 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 #eef2fb / 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: #eef2fb;
  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: #f7faff;
  border: 1px solid #dbe6f5;
  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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 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: #185FA5;
  color: #fff;
  font-weight: 600;
}
.detail-inline-item.og-picker-item .og-newbtn:hover { background: #134d86; }
.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: #1e7e46; background: #e8f6ee; 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: #1a5fb4; }
.og-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #dbe6f5;
  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: #1a5fb4;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #eef2f8;
  background: #f7faff;
}
.og-suggest-new:hover { background: #eaf2fd; }
.og-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.og-suggest-item:last-child { border-bottom: none; }
.og-suggest-item:hover { background: #f5f9ff; }
.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: #eaf5ee;
  border-radius: 7px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.og-picked-no { color: #1e7e46; 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;
}

/* ---- 顶栏「待填金额」按钮 ---- */
.btn-amount-pending {
  position: relative;
  background: #fff4e5;
  border: 1px solid #e8c98a;
  color: #9c6f00;
  font-weight: 600;
}
.btn-amount-pending:hover { background: #ffeddb; border-color: #d9b44a; }
.ap-badge {
  display: inline-block;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: #c0392b;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

/* ---- 待填金额状态徽章 / 看板标签 ---- */
.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; }
/* 🟢 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 #2f80ed; outline-offset: 1px; }

/* 编辑态：那一行 = 输入框 + ✓ + ✕（收款标签仍在右侧，布局不跳） */
.order-card.card-amount-editing { border-left-color: #2f80ed; background: #f7fbff; }
.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: #2f80ed; box-shadow: 0 0 0 2px rgba(47,128,237,.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: #2e9e5b; color: #fff; border: 1px solid #2e9e5b; }
.card-amount-ok:hover { background: #268a4e; }
.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: #1a5fb4; cursor: pointer; text-decoration: underline dotted; }
.grp-link:hover { color: #14477f; }
/* 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; }
.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: #4a90d9;
  background: #fff;
}
/* 对账表「多种」占位项置灰提示 */
.inquiry-table select.cell-select option[value="__multi__"] { color: #999; }
.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; }
/* 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 th.col-gorder,
#group-modal .grp-table td.td-gorder { text-align: left; }
/* 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: #f7f9fc;
  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: #1e7e46; }
.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: #1a5fb4; }
.cust-table th .th-arrow { font-size: 9px; color: #1a5fb4; 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: #fbfcfe; outline: none;
}
.rb-sec .rb-debt-search:focus { border-color: #9dbef0; 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: #f7f9fc; }
.rb-bar-row.on, .rb-rank.on { background: #eef4fd; }
.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: #e8f1fd;
  color: #1565c0;
  border: 1px solid #cfe1f8;
  white-space: nowrap;
}

/* 右板联动筛选的状态条（点账龄档 / 点客户后出现） */
.recon-chip {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding: 5px 10px;
  font-size: 12px; color: #1a5fb4;
  background: #eef4fd; border: 1px solid #d3e2f7; 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: #1565c0; }

/* 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 #dbe6f5;
  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: #1a5fb4; }
.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: #1a5fb4;
  background: #eef4fc;
  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: #185FA5; color: #fff; font-weight: 600; }
.detail-inline-item.og-picker-item .og-newbtn:hover { background: #134d86; }
.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: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 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: #1a5fb4;
  background: #eef4fc;
  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 { 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: #1e7e34; }
/* 明细展开块（供应商流水时间线用） */
.fin-detail-box { margin-top: 14px; border: 1px solid #e3e8ef; border-radius: 10px; padding: 12px 14px; background: #fbfcfe; }
.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 14px; 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: #f6f9ff; }
.flib-form-title { font-size: 13px; font-weight: 700; color: #1a5fb4; 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: #185FA5; 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: #144d8a; }
.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: #fcfdff; }
.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: #f0f5ff; border-color: #1a5fb4; color: #1a5fb4; }
.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 #e3e8ef; border-radius: 10px; padding: 12px 14px; background: #fff; cursor: pointer; transition: box-shadow .15s; }
.fin-sup-card:hover { box-shadow: 0 2px 10px rgba(30,60,120,.10); }
.fin-sup-card.fin-open { border-color: #4a7dbe; background: #f4f8fd; }
.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: #e8f1e9; color: #1e7e34; }
.fin-ledger-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-ledger-item.fin-in .fin-ledger-amount { color: #1e7e34; }
.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; }
/* 窄屏 */
@media (max-width: 720px) {
  .fin-sup-cards { grid-template-columns: 1fr; }
}

/* ================= z652（陶总 2026-09-17）：开票弹窗 ================= */
.inv-sec { margin-bottom: 16px; }
/* z653（陶总 2026-09-17）：①②③三段分区底色 —— 蓝/绿/黄三色区分，任务区保持白底 */
.inv-sec-tone { padding: 10px 12px 12px; border-radius: 8px; }
.inv-sec-tone .inv-sec-title { padding-bottom: 6px; border-bottom: 1px dashed rgba(0,0,0,.10); }
.inv-sec-1 { background: #eef5ff; border: 1px solid #d3e4fb; }
.inv-sec-2 { background: #effaf1; border: 1px solid #d2eeda; }
.inv-sec-3 { background: #fdf6ea; border: 1px solid #f3e4c4; }
.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: #409eff; }
.inv-order-list {
  max-height: 236px; overflow-y: auto;
  border: 1px solid #e6e8eb; border-radius: 8px; background: #fff;
}
.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; }
.inv-sel-bar { margin-top: 8px; font-size: 13px; color: #5b6270; }
.inv-sel-bar b { color: #303133; font-variant-numeric: tabular-nums; }
.inv-task-list { border: 1px solid #e6e8eb; border-radius: 8px; background: #fff; overflow: hidden; }
.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; }
.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 #409eff; border-radius: 5px;
  background: #409eff; color: #fff; font-size: 12px; cursor: pointer;
}
.inv-approve:hover { background: #337ecc; border-color: #337ecc; }
.inv-st-run { background: #e8f1fe; color: #2b6cb0; }
.inv-st-done { background: #e8f6ec; color: #2f855a; }
.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: #409eff; color: #409eff; }

/* =================== 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: #1a5fb4; color: #1a5fb4; }
.list-pager .pager-btn:disabled { opacity: .4; cursor: default; }
.list-pager .pager-info { font-size: 12px; color: #8a94a6; font-variant-numeric: tabular-nums; }
