/* =========================================================
   文件用途：阶段二原型（订单档案+责任指针+车间+包装台）的样式
   色板沿用画布原型（深色）。布局：顶栏(身份切换+页签) / 内容区 / 弹窗
   ========================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px; color: #e6edf3; background: #0d1117;
  display: flex; flex-direction: column;
}

/* ---------- 顶栏 ---------- */
#topbar {
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  background: #161b22; border-bottom: 1px solid #30363d;
}
#topbar .title { font-weight: bold; font-size: 15px; color: #58a6ff; }
#topbar .sub { color: #768390; font-size: 12px; }
#topbar .identity {
  display: flex; align-items: center; gap: 6px; margin-left: 18px;
  color: #f0d09c; font-size: 12px;
}
/* 身份固定后是只读展示：醒目一点让人一眼看到"我是谁"，但不要像可点的控件。 */
#topbar .identity b { color: #ffffff; font-size: 13px; }
#topbar select {
  padding: 5px 10px; background: #0d1117; color: #e6edf3;
  border: 1px solid #f0883e; border-radius: 6px; font-size: 12px; outline: none;
}
#topbar .tabs { margin-left: auto; display: flex; gap: 6px; }
#topbar .tabs button {
  height: 32px; padding: 0 16px; font-size: 13px; cursor: pointer;
  background: #21262d; color: #e6edf3; border: 1px solid #30363d; border-radius: 8px;
}
#topbar .tabs button.active { background: #1f6feb; border-color: #1f6feb; color: #fff; }

/* ★ 2026-10-28o：「我的待办」有待办时高亮（文字里已带数量，见 order-app.js#refreshTodoBadge）
   为什么用颜色而不是另插一个 <span class="badge">：
     页签按钮的文字是【单文本节点】，render 里每次重设 className 时若有子元素会被一起保留，
     但 applyTabVisibility 里按 textContent 操作时会把它覆盖掉 ⇒ 子元素角标不可靠。
     ⇒ 只靠"文字 + 类名"，一个数据源，不会出现"数字在但颜色没跟上"。
   ⚠ 特指度：#topbar .tabs button.has-todo（0,2,1）必须高于 #topbar .tabs button（0,1,1），
     否则蓝底 active 态会把提示色压掉 —— 这正是本项目踩过的
     [[pitfall_css_specificity_and_silent_load_failure]]。 */
#topbar .tabs button.has-todo {
  border-color: #1f6feb;
  box-shadow: inset 0 -2px 0 #1f6feb;
  font-weight: 600;
}
#topbar .tabs button.has-overdue {
  border-color: #f0883e;
  box-shadow: inset 0 -2px 0 #f0883e;
}
/* 正在看这一页时别再叠加提示色，避免和 active 蓝底打架 */
#topbar .tabs button.active.has-todo,
#topbar .tabs button.active.has-overdue {
  box-shadow: inset 0 -2px 0 #fff;
}

/* 顶栏右侧：当前登录用户 + 退出 */
#userbox {
  display: flex; align-items: center; gap: 8px; margin-left: 14px;
  padding-left: 14px; border-left: 1px solid #30363d;
}
#userbox #user-name { color: #9ab0c8; font-size: 12px; }
#userbox #user-name b { color: #3fb950; }

/* ---------- 内容区 ---------- */
#content { flex: 1; overflow: auto; padding: 18px 22px; }
.section { margin-bottom: 22px; }
.section h3 {
  font-size: 13px; color: #768390; font-weight: normal;
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #21262d;
}
.card {
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.kv { display: flex; gap: 8px; line-height: 2; font-size: 12px; }
.kv b { color: #768390; font-weight: normal; flex: none; width: 64px; }
.muted { color: #768390; }

/* ---------- 责任指针 ---------- */
.pointer-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 8px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
}
.pointer-row .plabel { width: 70px; color: #768390; font-size: 12px; flex: none; }
.pointer-row .who {
  flex: 1; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.pointer-row .who .arrow { color: #3fb950; font-weight: bold; }
.pointer-row .who .done { color: #3fb950; }
.pointer-row .who .empty { color: #484f58; }
.pointer-row .who .tag {
  font-size: 10px; padding: 1px 7px; border-radius: 9px;
  background: #1c2432; border: 1px solid #30363d; color: #768390;
}
.pointer-row button {
  height: 26px; padding: 0 12px; font-size: 12px; cursor: pointer;
  background: #21262d; color: #e6edf3; border: 1px solid #30363d; border-radius: 6px;
}
.pointer-row button:hover { border-color: #388bfd; }
.pointer-row button.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.pointer-row button.danger { background: #3d1f1f; border-color: #8b3a3a; color: #ff9a9a; }
.pointer-row button.danger:hover { border-color: #f85149; }

/* 流程闸门说明条 */
.gate-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 7px 12px; margin-bottom: 10px; font-size: 12px;
  background: #12181f; border: 1px dashed #30363d; border-radius: 8px; color: #768390;
}
.gate-bar b { color: #a5b3c2; font-weight: normal; }
.gate-bar .gate-wait { color: #d3a84a; }
.gate-bar .gate-wait b { color: #d3a84a; }

/* 被前置环节锁住的指针：置灰、虚线框，但依然看得见（看得见才知道堵在哪） */
.pointer-row.locked { opacity: .62; border-style: dashed; }
/* 可见但还不能操作（流程设置里"可见时机"到了、"可操作时机"没到）：置灰可看 */
.pointer-row.dim { opacity: .72; background: #0f141a; }
.pointer-row.dim .plabel { color: #5a6672; }
.pointer-row .lock-tag {
  font-size: 10px; padding: 1px 8px; border-radius: 9px; flex: none;
  background: #2d2418; border: 1px solid #6b5424; color: #d3a84a;
}
.pointer-row .lock-tag.forced {
  background: #2d1f2d; border-color: #7a3d7a; color: #d98fd9;
}
.pointer-row .lock-tag.dim-tag {
  background: #1b2330; border-color: #3b4a5e; color: #8fa6bd;
}

/* ---------- 流程设置（仅超管可见） ---------- */
.flow-wrap { max-width: 1080px; }
.flow-head h2 { font-size: 16px; color: #58a6ff; margin-bottom: 6px; }
.flow-head p { margin-bottom: 12px; }
.flow-note {
  padding: 10px 12px; margin-bottom: 14px; line-height: 1.9;
  background: #111820; border: 1px dashed #30363d; border-radius: 8px;
  color: #9aa7b4; font-size: 12px;
}
.flow-note b { color: #c9d6e2; font-weight: normal; }
.flow-table { display: flex; flex-direction: column; gap: 10px; }
.flow-row {
  display: grid; grid-template-columns: 130px 1fr 1fr 160px; gap: 12px; align-items: stretch;
  padding: 12px 14px; background: #161b22; border: 1px solid #30363d; border-radius: 10px;
}
.flow-row.flow-hidden { opacity: .5; }
.flow-name { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.flow-name b { font-size: 14px; color: #e6edf3; }
.flow-name span { font-size: 11px; }
.cond-box { background: #0d1117; border: 1px solid #262d36; border-radius: 8px; padding: 9px 11px; }
.cond-title { font-size: 11px; color: #768390; margin-bottom: 7px; }
/* ★ 2026-10-07 排版规则化：改成【固定 3 列网格】而不是 flex-wrap。
   旧写法按内容长短自由折行 ⇒ 各行的勾选框换行位置不同，看着"不规则"。
   固定网格后，列宽一致、纵向严格对齐：竖着看一列 = 同一个环节的勾选情况。
   一格 6 项 = 「建单即可」+ 5 个环节，正好排成 3 列 × 2 行。 */
.cond-opts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
}
/* 单列变体：只放一个勾选框（如"不参与流程"），同样左对齐、不居中 */
.cond-opts-1 { grid-template-columns: minmax(0, 1fr); }
.cond-opt {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: #c9d6e2; cursor: pointer; user-select: none;
  min-width: 0; white-space: nowrap;
}
.cond-opt input { accent-color: #1f6feb; cursor: pointer; }
/* ★ 2026-10-07 排版规则化：禁用/占位选项（自己、已隐藏环节）——
   仍占位以保证各行列严格对齐，但压暗 + 划掉，明确"不可勾"。
   ⛔ 别改成 display:none：那样各行列又会错位，正是用户抱怨的"不规则"。 */
.cond-opt-off { color: #4d5866; cursor: not-allowed; }
.cond-opt-off input { cursor: not-allowed; }
.cond-opt-off span { text-decoration: line-through; text-decoration-color: #3d4650; }
/* ★ 2026-10-07：「不参与流程」栏已改为与左两栏同款卡片（.cond-box + .cond-opts-1），
   旧的 .flow-hide 居中式写法已废弃删除。这里只保留它的橙色强调色，挂在单列勾选框上。 */
.cond-opts-1 input { accent-color: #f0883e; }
.flow-foot { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.flow-foot button.small {
  height: 30px; padding: 0 14px; font-size: 12px; cursor: pointer;
  background: #21262d; color: #e6edf3; border: 1px solid #30363d; border-radius: 7px;
}
.flow-foot button.small:hover { border-color: #388bfd; }
.flow-preview {
  line-height: 2; font-size: 12px; color: #9aa7b4;
  padding: 11px 13px; background: #111820; border: 1px solid #262d36; border-radius: 8px;
  width: 100%;
}
.flow-preview b { color: #c9d6e2; font-weight: normal; }
.flow-preview .pv-row b { color: #58a6ff; }
.flow-preview i { color: #f0d09c; font-style: normal; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: #768390; font-weight: normal; padding: 6px 8px; border-bottom: 1px solid #30363d; }
td { padding: 6px 8px; border-bottom: 1px solid #21262d; }
tr.gone td { color: #f85149; text-decoration: line-through; }
/* ★ 2026-10-10 BOM 板件清单：「基材 / 板厚」缺失（如老订单、SU 材质未分类）时，
   显示红色"缺"而不是空白 —— 空与"缺"看起来一样，用户就发现不了同步链路断了。
   ⚠ 别写成 muted 灰：那会和"暂无数据"混为一谈。 */
.bom-miss {
  display: inline-block; font-size: 11px; padding: 0 6px;
  border-radius: 9px; border: 1px dashed #f85149; color: #ff7b72;
  cursor: help;
}
/* ⚠ 已报损行（tr.gone）里的"缺"要【保住红色警示】：
   tr.gone 的 line-through 会穿过徽标，但颜色会被 .gone 的 color 覆盖成同一红，
   这里显式声明更亮的红保证可读（灰度打印下也有边框可辨）。 */
tr.gone .bom-miss { color: #ff7b72; }
/* ★★★★★ 【2026-10-13 · 用户拍板 · BOM「异形」列的「是」标记】★★★★★
   【用户原话（逐字）】"BOM 里加吧，要不我不知道那个板子数据上是不是真的是异形。"
   【为什么要单独上色】尺寸栏显示的是【外接矩形】⇒ 异形板与矩形板在表上长得一样，
     必须让"是"字自己【跳出来】。用橙色（与"缺"的红色区分）：
       · 红 = 异常/缺失（要报警、要处理）
       · 橙 = 中性提示（这是异形板，知道就行，不影响流程）
     ⛔ 两色别混用 —— 混了用户就分不清"这板有问题"和"这板只是形状不规则"。
   ⚠ 与 .bom-miss 一样必须显式声明"已报损行(tr.gone)"下的颜色：
     tr.gone 的 color 会覆盖子元素颜色（灰度打印时也要保持可辨）。 */
.bom-irregular { color: #f0883e; }
tr.gone .bom-irregular { color: #f0a45e; }
/* ---------- 四期：报价明细表 ---------- */
tr.sumrow td { border-top: 1px solid #30363d; background: #0d1117; }
#quote-section .tag {
  display: inline-block; padding: 0 5px; margin-left: 4px; border-radius: 4px;
  font-size: 10px; line-height: 15px; background: #2d1e0e; color: #f0d09c; border: 1px solid #f0883e;
  vertical-align: middle;
}
#quote-section .kv b { display: inline-block; min-width: 84px; color: #768390; font-weight: normal; }
#quote-section .muted { color: #768390; }

/* ---------- 2026-10-28：表格模板驱动的报价区 ----------
   ★ 这里是"用户在表格设计器里画的那张表"在订单详情里的样子。
   ⚠ 表格本身是白纸黑字的单据预览 ⇒ 底色用浅色（与订单页深色主题刻意不同），
     让用户一眼分出"这是我做的报表"，而不是系统表。
   ⛔ 别把 color 写死在 td 上 —— 每格的颜色由内联 style 决定（模板里设的）。 */
.quote-tpt-table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  color: #111;
  font-size: 13px;
}
.quote-tpt-table td {
  border: 1px solid #999;
  padding: 4px 7px;
  vertical-align: middle;
  white-space: pre-wrap;      /* 单元格里的换行要真的换行 */
  word-break: break-word;
}
/* 价格未命中：整格标红底（与设计器预览同口径，⛔ 别改成只有字变色） */
.quote-tpt-table td.quote-tpt-miss {
  background: #ffe8e8;
  color: #c62828 !important;
}
#quote-table-tpl-section { margin-bottom: 10px; }
.step-dot {
  display: inline-block; width: 20px; height: 20px; line-height: 20px;
  text-align: center; border-radius: 5px; font-size: 11px; margin-right: 3px;
  background: #1c2432; color: #484f58; border: 1px solid #30363d;
}
.step-dot.on { background: #10261a; color: #3fb950; border-color: #2ea043; }
.step-dot.cur { background: #2d1e0e; color: #f0d09c; border-color: #f0883e; }
button.small {
  height: 24px; padding: 0 10px; font-size: 11px; cursor: pointer;
  background: #21262d; color: #e6edf3; border: 1px solid #30363d; border-radius: 6px;
}
button.small:hover { border-color: #388bfd; }
button.small.warn { color: #f0d09c; border-color: #f0883e; }
button.small.primary { background: #238636; border-color: #2ea043; color: #fff; }
button.small.primary:hover { background: #2ea043; }
button.small:disabled { opacity: .4; cursor: not-allowed; }
button.big {
  height: 34px; padding: 0 20px; font-size: 13px; cursor: pointer;
  background: #1f6feb; color: #fff; border: 1px solid #1f6feb; border-radius: 8px;
}
button.big:disabled { background: #21262d; border-color: #30363d; color: #484f58; cursor: not-allowed; }
button.big.green { background: #238636; border-color: #2ea043; }

/* ---------- 车间扫码输入框（2026-10-24 用户要求：加大 + 黑底白字） ----------
   ⚠ 用户原话：「扫码的输入框搞大一点哦现在太小了，并且扫码的输入框换成黑底白字」。
   ⚠ 原来这个 input 挂的是 class="input"，但本页 CSS 【根本没有 .input 这条规则】
     ⇒ 用的是浏览器默认皮肤（浅灰底 + 小字号 + 窄高），在暗色页面上又小又刺眼。
   ⚠ 车间是大屏、戴手套操作：字号/高度必须够大，光标也要白色（默认黑光标在黑底上看不见）。
   ⛔ 别用 .input 这个类名去改：它没有规则，改了不生效；这里用专用类名。 */
.scan-input {
  width: 100%;
  box-sizing: border-box;
  display: block;
  height: 64px;
  padding: 0 20px;
  margin: 10px 0;
  font-size: 30px;
  /* ★ 2026-10-24 用户要求「回车后用粗体」→ 粗体落在框外的大字回显 .scan-big 上，
     ⛔ 不是靠这里改字重：输入框必须保持"扫完即清空"（防连扫串码），框里留不住字。
     这里保持 600 只用于输入过程的可读性。 */
  font-weight: 600;
  letter-spacing: 1px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  color: #ffffff;
  background: #000000;
  border: 2px solid #58a6ff;
  border-radius: 10px;
  outline: none;
  caret-color: #ffffff;
}
.scan-input::placeholder {
  color: #6e7681;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
}
.scan-input:focus {
  border-color: #79c0ff;
  box-shadow: 0 0 0 3px rgba(56, 139, 253, .35);
}
/* ---------- 扫码回显大字（2026-10-24 用户要求：回车后用粗体）----------
   ⚠ 用户原话：「扫码或输入板件条码后回车用粗体」。
   ⚠⚠ 为什么是"框外一条大字"而不是"输入框里的字变粗"：
     扫码枪是键盘模式，字符【追加】到光标处。框里留着上一块的 "G1"，
     下一枪扫 G2 会拼成 "G1G2" ⇒ 精确匹配失配 ⇒ 好板被报"不在本单"。
     ⇒ 输入框必须扫完立刻清空（硬约束），粗体只能落在框外这条上。
     （曾把粗体写在输入框里并被探针逮到：连扫会串码。）
   ⚠ 为什么不能只靠"文字被清空"来反馈：输入框平时就一直空着，
     "扫完清空"和"根本没读上"在屏幕上完全一样 ⇒ 必须有一段可见的粗体大字。
   ⚠ 平时无字 ⇒ 不占位（height 由内容撑开），不会把下面的回显/表格顶下去。 */
.scan-big {
  margin: 0;
  line-height: 0;
  height: 0;
  overflow: hidden;
  transition: none;
}
/* 命中态：超大粗体 + 绿字（与"已完成"同色系，一眼确认读上了） */
.scan-big.scan-big-hit {
  height: auto;
  line-height: 1.15;
  overflow: visible;
  margin: 6px 0 2px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 46px;          /* 车间大屏、戴手套也要一眼看清 */
  font-weight: 900;         /* ← 用户要的"粗体"，最粗档 */
  letter-spacing: 3px;
  color: #3fb950;
  word-break: break-all;
}
/* 失败态：扫到别单/未打孔/防重 ⇒ 红字大字。
   ⚠ 为什么失败也要大字：工人是"扫完抬头看一眼屏幕"，只在下方 12px 回显里写一行红字，
     大屏上根本注意不到 ⇒ 会把别单的板继续往下装（P9 报过"装错了才发现"）。
   ⚠ 负向反馈不能只靠 toast：toast 2 秒就消失，人一低头就没了。 */
.scan-big.scan-big-hit.scan-big-bad {
  color: #f85149;
}

/* ---------- 扫码流水「按包分行」的分组标题行（2026-10-24）----------
   ⚠ 用户原话：「扫码流水里面还有按照包分行」。
   ⚠ 为什么要整行合并的组标题：只靠最右「包数」列区分，一屏几十行下来
     眼睛根本分不清第一包到哪儿结束 ⇒ 包与包之间必须有横向分隔。
   ⚠ 已封的包用灰蓝底（定稿了），未封的包用橙边（还在装）——两者语义不同，
     ⛔ 不能染成同一个颜色，否则工人以为"没封箱的也算封好了"。 */
tr.pack-group td {
  background: #1c2128;
  color: #c9d1d9;
  border-top: 2px solid #30363d;
  padding: 7px 8px;
  font-size: 13px;
  letter-spacing: 0.3px;
}
tr.pack-group-open td {
  background: #2b2113;
  border-top: 2px solid #9e6a03;
  color: #e3b341;
}
tr.pack-row td:last-child {
  font-family: Consolas, Monaco, monospace;
}

/* ---------- 表内「已完成」行：整行绿（2026-10-24 用户要求）----------
   ⚠ 用户原话：「封边完成的板子显示绿色」。
   ⚠ 为什么整行染色而不是只染"状态"列：车间是隔着大屏一眼扫过去，
     只绿一个格子在大屏上根本看不见；整行绿才能"哪块完了一目了然"。
   ⚠ 只染文字+淡底色，⛔ 不染成实心绿：实心底色会让黑字/白字对比全乱，
     且和 .banner.lock 那种"警示条"视觉冲突。
   ⚠ 选择器要压过 order.css 里 td 的默认 color（#e6edf3）⇒ 用 tr.done td。 */
tr.done td {
  color: #3fb950;
  background: rgba(46, 160, 67, .12);
}
tr.done td:first-child { box-shadow: inset 3px 0 0 #2ea043; }
/* 已完成行里的勾选框/按钮别跟着变绿，保持可点的原样 */
tr.done td input[type="checkbox"] { accent-color: #2ea043; }

/* ---------- 表内「还没轮到我这道工序」行：置灰不可选（2026-10-24）----------
   ⚠ 用于打孔界面：这块板前一道封边还没做，打孔工摸不到 ⇒ 不可勾选。
   ⚠⚠ 为什么必须有样式：代码里把它设成 disabled 只是"点不动"，看起来却和
     正常行一模一样 ⇒ 工人会以为系统坏了/自己点错了（[[pitfall_correct_but_invisible]]）。
     所以除了 disabled，还要一眼看得出"这行现在不归你"。
   ⚠ 用透明度 + 弱化文字，⛔ 不用红色：红＝出错/告警，这里只是"还没轮到"。 */
tr.ws-greyed td {
  color: #5a6672;
  background: rgba(255, 255, 255, .015);
}
tr.ws-greyed td:first-child { box-shadow: inset 3px 0 0 #30363d; }
tr.ws-greyed td input[type="checkbox"] { opacity: .35; cursor: not-allowed; }

/* ---------- 板件表「来源」列：补板 = 黄字（2026-10-26 用户要求）----------
   【用户原话】"状态栏如果是补板的话，补板这两个字用黄色的字这样明显一点"
   【为什么要显眼】补板是【报损后重新出的一块料】，条码/名称跟母单那块往往一模一样；
     混在几十行里若没有区分，工人会把它当普通母单板处理（甚至漏做那道补板的活）。
   ⚠ 黄色用 #e3b341（本项目既有的"提醒"黄，见 .inv-amount b / .inv-kind-price），
     ⛔ 不用 #f0883e（那是橙，专门表示 warn/出错）；补板是正常流程，只是要"看见"，不是告警。
   ⚠ 带上 table.tbl 前缀是为了跟表格其它 td 规则同一档，不被更"具体"的写法盖掉
     （本项目踩过 [[pitfall_css_specificity_and_silent_load_failure]]：源码全对但没生效）。
   ⚠ 已核实【不需要】处理置灰行：置灰表 #edge-blocked-tbl / #drill-blocked-tbl 的表头是
     「选/板件编码/名称/状态」，压根没有"来源"列 ⇒ 置灰行里不会出现这两个字。
     （⛔ 曾想加 tr.ws-greyed td.supp-src 压回，查完发现是死规则，已删。） */
/* ⚠ 2026-10-26：选择器写成「不限定标签」的 .supp-src，因为同一个类要用在两个地方：
     ① 板件表「来源」列：<td class="supp-src">补板</td>
     ② 报损栏下方状态提示：<span class="supp-src">补板</span>在途
   ⛔ 别再拆成 td.supp-src / span.supp-src 两份 —— 色值只能有一处，否则改一处漏一处。
   ⚠ 只写 .supp-src 一个：报损栏那句不在表格里，加 .tbl 前缀会漏掉它。 */
.supp-src { color: #e3b341; font-weight: 600; }
/* 母单刻意保持弱化灰：补板要跳出来，母单是常态 */
table.tbl td.plain-src { color: #8b949e; }

/* ---------- 横幅（图纸锁定/变更警示） ---------- */
.banner {
  padding: 9px 14px; border-radius: 8px; font-size: 12px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.banner.lock { background: #10261a; border: 1px solid #2ea043; color: #9ee6b0; }
.banner.unlock { background: #3d1a1d; border: 1px solid #f85149; color: #ffb0ad; }
.banner.obsolete { background: #2d1e0e; border: 1px solid #f0883e; color: #f0d09c; }
.banner button { margin-left: auto; }

/* ---------- 日志时间线 ---------- */
.timeline { border-left: 2px solid #30363d; margin-left: 8px; padding-left: 16px; }
.timeline .titem { position: relative; padding-bottom: 12px; font-size: 12px; }
.timeline .titem::before {
  content: ''; position: absolute; left: -21px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%; background: #388bfd;
}
.timeline .ttime { color: #484f58; margin-right: 8px; }
.timeline .tnote { color: #c9d1d9; }

/* ---------- 工作台待办 ---------- */
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 8px;
  background: #161b22; border: 1px solid #30363d; border-radius: 9px; cursor: pointer;
}
.todo-item:hover { border-color: #388bfd; }
.todo-item .oid { color: #58a6ff; font-weight: bold; }
.todo-item .otype {
  font-size: 10px; padding: 1px 7px; border-radius: 9px;
  background: #1c2432; border: 1px solid #30363d; color: #768390;
}
.todo-item .odesc { flex: 1; color: #c9d1d9; }
.todo-item .oact { color: #768390; font-size: 11px; }

/* ---------- 补板单 ---------- */
.supp {
  background: #161b22; border: 1px solid #d29922; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px;
}
.supp .shead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.supp .shead .sid { color: #d29922; font-weight: bold; }
.supp .sitem { display: flex; align-items: center; gap: 8px; padding: 5px 8px; font-size: 12px; background: #0d1117; border-radius: 6px; margin-bottom: 5px; }

/* ---------- 包装台 ---------- */
#packing-counters { display: flex; gap: 14px; margin-bottom: 14px; }
.counter {
  flex: 1; text-align: center; padding: 14px;
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
}
.counter .num { font-size: 26px; font-weight: bold; }
.counter .lbl { color: #768390; font-size: 11px; margin-top: 4px; }
.counter.ok .num { color: #3fb950; }
.counter.warn .num { color: #f0883e; }
.counter.bad .num { color: #f85149; }
#scan-log { max-height: 200px; overflow: auto; }
.scan-row { display: flex; gap: 10px; font-size: 12px; padding: 5px 8px; border-bottom: 1px solid #21262d; }
.scan-row .ok { color: #3fb950; }
.scan-row .bad { color: #f85149; }

/* ---------- 弹窗 ---------- */
#modal-mask {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(1,4,9,.65);
  align-items: center; justify-content: center;
}
#modal-mask .box {
  width: 460px; max-height: 78vh; overflow: auto;
  background: #161b22; border: 1px solid #30363d; border-radius: 12px;
  padding: 20px;
}
#modal-mask h3 { font-size: 14px; margin-bottom: 14px; }
#modal-mask .mrow { margin-bottom: 12px; }
#modal-mask .mrow label { display: block; color: #768390; font-size: 11px; margin-bottom: 5px; }
#modal-mask textarea, #modal-mask input, #modal-mask select {
  width: 100%; padding: 7px 10px; font-size: 12px; font-family: inherit;
  background: #0d1117; color: #e6edf3; border: 1px solid #30363d; border-radius: 7px; outline: none;
}
#modal-mask textarea { height: 64px; resize: none; }
#modal-mask textarea:focus, #modal-mask input:focus { border-color: #388bfd; }
#modal-mask .mbtns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
#modal-mask .reco {
  padding: 8px 10px; margin-bottom: 6px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 7px;
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px;
}
#modal-mask .reco:hover { border-color: #388bfd; }
#modal-mask .reco .why { color: #768390; font-size: 10px; margin-left: auto; }
#modal-mask .checklist { max-height: 180px; overflow: auto; }
#modal-mask .checklist label {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 8px; font-size: 12px; cursor: pointer;
  border-bottom: 1px solid #21262d;
}
.muted-box { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 10px 12px; color: #768390; font-size: 11px; line-height: 1.8; margin-bottom: 12px; }

/* ---------- 库存管理（★ 一期 · 2026-10-08） ---------- */
/* 老物料只读展示（复购时"名称/规格"不可改，避免用户改错把老物料拆成两条） */
#modal-mask .inv-ro {
  padding: 7px 10px; font-size: 12px; color: #e6edf3;
  background: #161b22; border: 1px dashed #30363d; border-radius: 7px;
}
/* ★ 弹窗里的勾选框别被上面的 width:100% 撑满（否则勾选框铺满整行、很难看） */
#modal-mask input[type="checkbox"] { width: auto; padding: 0; }
/* 库存表：数字列右对齐、表头吸顶，行多时更好读 */
table td, table th { vertical-align: top; }
#content td button.small { margin-right: 6px; }

/* ---------- 库存管理 · 二期（2026-10-10）---------- */
/* 物料类型徽标：板材（蓝）/ 五金（紫）/ 其他（灰）—— 一眼分清三类物料 */
.inv-type {
  display: inline-block; font-size: 11px; padding: 1px 8px;
  border-radius: 9px; border: 1px solid #30363d; white-space: nowrap;
}
.inv-type-board { background: #10243a; border-color: #1f6feb; color: #79c0ff; }
.inv-type-hw    { background: #241a35; border-color: #8957e5; color: #d2a8ff; }
.inv-type-other { background: #1c2128; border-color: #30363d; color: #8b949e; }
/* 流水动作徽标：入库（绿）/ 改价（橙）/ 修改·盘点（蓝）
   —— 改价没有数量变化；"修改"可以有数量变化（盘点多或盘亏），靠颜色区分动作 */
.inv-kind {
  display: inline-block; font-size: 11px; padding: 1px 8px;
  border-radius: 9px; border: 1px solid #30363d; white-space: nowrap;
}
.inv-kind-in    { background: #0f2a18; border-color: #2ea043; color: #7ee787; }
.inv-kind-price { background: #2d2109; border-color: #d29922; color: #e3b341; }
.inv-kind-edit  { background: #10243a; border-color: #1f6feb; color: #79c0ff; }
/* ★ 2026-10-10 报价单位：与三价同组，用青色小字与"物料单位"（灰）区分开 */
.inv-quote-unit { color: #56d4dd; font-size: 12px; white-space: nowrap; }

/* ---------- 板材余料（2026-10-27 · Y5）---------- */
/* 异形余料尺寸图：每块一张卡，卡里是 polygon + 每条边的 text 标注。
   ⚠ 需求 §6 明确要求异形必须给 SVG 图形，⛔ 不是一行文字 ⇒ 这里禁用 white-space:nowrap，
     SVG 需要按自身宽高展示，被压扁就量不出形状。 */
.scrap-svg-grid {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
}
.scrap-svg-card {
  padding: 10px; margin: 0;
  display: flex; flex-direction: column; align-items: center;
}
.scrap-svg-title {
  font-size: 11px; color: #e6edf3; margin-bottom: 4px;
  word-break: break-all; text-align: center;
}
.scrap-svg-meta {
  font-size: 11px; color: #768390; margin-top: 4px; text-align: center;
}
.scrap-svg { display: block; }
/* 异形标记：⛔ 别让人把异形当成外接矩形那么规整的一块方料去取（取错就切废） */
.scrap-irr-tag {
  display: inline-block; margin-right: 4px; padding: 0 4px;
  background: #3d2b00; color: #d29922; border: 1px solid #9e6a03;
  border-radius: 3px; font-size: 10px; line-height: 15px;
}
/* ★ 2026-10-10【库存成本价格】列：右对齐 + 不换行（金额比价目数字长，换行会撑高行） */
.inv-amount { text-align: right; white-space: nowrap; }
.inv-amount b { color: #e3b341; }
/* ★ 2026-10-10【库存总金额汇总行】：贴在表格最底部，用上边框与数据行隔开
   —— ⛔ 不用"更亮的底色"来区分（那会和 hover 高亮打架），靠边框 + 加粗即可。
   ⚠ tfoot 必须显式写底色：部分浏览器对 tfoot 不继承 tbody 的背景，会露出页面底色。 */
.inv-sum-row td {
  border-top: 2px solid #d29922;
  background: #1c2128;
  font-size: 13px;
  color: #8b949e;
  padding-top: 9px; padding-bottom: 9px;
}
.inv-sum-row .inv-amount b { color: #e3b341; font-size: 14px; }
#content td button.small.danger { color: #ff7b72; border-color: #5a2424; }
#content td button.small.danger:hover { background: #3d1a1a; border-color: #f85149; }

/* ---------- 订单列表（总览） ---------- */
.list-head {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 12px;
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  font-size: 12px; color: #768390;
}
.list-head .lhp b { font-size: 17px; color: #e6edf3; margin-left: 4px; }
.list-head .lhp.bad b { color: #f85149; }
.list-head .lhp.warn b { color: #f0883e; }

.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- 待接单提示条（设计指针空着的单，可一键认领） ---------- */
.claim-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; margin-bottom: 12px;
  background: #17223a; border: 1px solid #1f6feb; border-radius: 8px;
  font-size: 12px; color: #9ecbff;
}
.claim-bar b { color: #58a6ff; font-size: 15px; margin: 0 2px; }
.claim-bar button { margin-left: auto; }
/* 卡片上的接单按钮：右下角单占一行 */
.ol-claim { display: flex; justify-content: flex-end; margin-top: 9px; }
.fbtn.on { background: #1f6feb; border-color: #1f6feb; color: #fff; }

/* ---------- 快速搜索框（放大镜 + 输入框，放在「新建订单」左侧） ---------- */
.search-box {
  display: inline-flex; align-items: center;
  background: #0d1117; border: 1px solid #30363d; border-radius: 6px;
  overflow: hidden; height: 26px;   /* 跟相邻 .small 按钮等高，排一行不歪 */
}
.search-box:focus-within { border-color: #388bfd; }   /* 聚焦时整框高亮，不像输入框孤立发光 */

.search-box .search-icon {
  background: transparent; border: none; border-right: 1px solid #30363d;
  color: #768390; cursor: pointer; font-size: 12px; line-height: 1;
  height: 100%; padding: 0 8px;
}
.search-box .search-icon:hover { color: #e6edf3; background: #161b22; }

.search-box .search-input {
  background: transparent; border: none; outline: none;
  color: #e6edf3; font-size: 12px; height: 100%;
  padding: 0 8px; width: 190px;
}
.search-box .search-input::placeholder { color: #6e7681; }

.search-box .search-clear {
  background: transparent; border: none; color: #768390;
  cursor: pointer; font-size: 11px; height: 100%; padding: 0 8px;
}
.search-box .search-clear:hover { color: #f85149; background: #161b22; }

.olist-card {
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 10px; cursor: pointer;
  position: relative;   /* 批量模式勾选框要绝对定位在左上角 */
}
.olist-card:hover { border-color: #388bfd; }
.olist-card.overdue { border-left: 3px solid #f85149; }

/* ---------- 订单管理（批量多选） ---------- */
/* 开了管理模式后左边留出勾选框的位置 */
.olist-card.batch-on { padding-left: 42px; }
.olist-card.batch-on:hover { border-color: #f0883e; }
/* 勾选框：绝对定位贴左上，不影响卡片既有排版 */
.ol-check {
  position: absolute; left: 14px; top: 15px;
  width: 16px; height: 16px; margin: 0;
  cursor: pointer; accent-color: #f0883e;
}
/* 已勾选的卡片：橙色描边 + 压暗，一眼看出选中了哪些 */
.olist-card.picked {
  border-color: #f0883e;
  background: #1b1710;
  box-shadow: inset 0 0 0 1px rgba(240, 136, 62, .35);
}

.batch-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: #1b1710; border: 1px solid #f0883e; border-radius: 10px;
  font-size: 12px; color: #c9d1d9;
}
.batch-bar .batch-info b { font-size: 15px; color: #f0883e; }
.batch-bar .batch-info .muted { font-size: 11px; color: #768390; }

/* 删除确认弹窗里的订单清单 */
.batch-del-list { max-height: 220px; overflow-y: auto; border: 1px solid #30363d; border-radius: 8px; }
.batch-del-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 10px; font-size: 12px; border-bottom: 1px solid #21262d;
}
.batch-del-row:last-child { border-bottom: none; }
.batch-del-row b { color: #58a6ff; }
.batch-del-row .tag {
  font-size: 10px; padding: 1px 7px; border-radius: 9px;
  background: #1c2432; border: 1px solid #30363d; color: #9ab0c8;
}
.muted-box.warn-box { border-color: #f0883e; color: #f0d09c; }
.muted-box.warn-box b { color: #f0883e; }

/* ---------- P1 生产指派：抓单门槛三条现状 ---------- */
/* 目的：一眼看出"还差哪条才能抓包"，⛔ 不是笼统说一句"没权限"。 */
.gate-box {
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
  padding: 8px 12px; font-size: 12px; line-height: 2;
}
.gate-line { display: flex; align-items: center; gap: 6px; }
.gate-ok { color: #3fb950; }
.gate-bad { color: #f85149; }
.hl { color: #e6edf3; font-weight: 600; }

/* ---------- 回收站面板（软删除，可恢复；用绿色跟删除条区分） ---------- */
.recycle-panel {
  margin-bottom: 12px; padding: 10px 14px;
  background: #0f1a14; border: 1px solid #2ea043; border-radius: 10px;
  font-size: 12px; color: #c9d1d9;
}
.recycle-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.recycle-head > span:first-child { margin-right: auto; }
.recycle-head b { color: #3fb950; font-size: 14px; }
.recycle-empty { color: #768390; font-size: 11px; padding: 6px 0 2px; }

.recycle-list { max-height: 260px; overflow-y: auto; margin-top: 8px;
  border: 1px solid #30363d; border-radius: 8px; background: #0d1117; }
.recycle-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 10px; font-size: 12px; border-bottom: 1px solid #21262d;
}
.recycle-row:last-child { border-bottom: none; }
.recycle-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-right: auto; }
.recycle-info b { color: #58a6ff; }
.recycle-info .muted { font-size: 11px; color: #768390; }
.recycle-info .tag {
  font-size: 10px; padding: 1px 7px; border-radius: 9px;
  background: #1c2432; border: 1px solid #30363d; color: #9ab0c8;
}

.ol-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.ol-top .ol-id { color: #58a6ff; font-weight: bold; font-size: 13px; }
.ol-top .ol-cust { color: #c9d1d9; }
.ol-top .ol-store { font-size: 11px; color: #768390; }
.ol-top .ol-amt { margin-left: auto; color: #e6edf3; font-weight: bold; }
.ol-top .ol-amt .muted { font-weight: normal; font-size: 11px; }

.ol-sub { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 11px; margin-bottom: 9px; }
.ol-sub .tag {
  font-size: 10px; padding: 1px 7px; border-radius: 9px;
  background: #1c2432; border: 1px solid #30363d; color: #9ab0c8;
}

/* ★★ 2026-10-26【车间四个清单的"已完成"卡片】
   用户原话："他们的订单完成了就显示订单完成了的样式，但是订单还是在那的，
   要不万一误操作，返回了订单列表发现有板子没有报损，就没有入口报损了。"

   【为什么不能只用 muted】muted 的语义是"暂时干不了"（等前道工序），
     已完成是"干完了"，把它灰掉工人会以为这单有问题、不敢点。
   【为什么不能只靠 tag 那一行绿字】列表是滚动看的，10px 的小标签远看不出来；
     所以同时给【左侧 3px 绿边】——整列下来一眼分得出哪几单已完工。
   ⚠ 绿边必须用 border-left 且不改 .overdue 的红边（.overdue 也是 border-left）：
     已完成与逾期不会同时出现在同一张卡上（已完成不再算逾期），但为保险起见
     本类放在 .overdue 之前定义，冲突时 .overdue 的红边优先（逾期更该被看见）。 */
.olist-card.cutwork-done {
  border-left: 3px solid #2ea043;
  background: rgba(46, 160, 67, .07);
}
.olist-card.cutwork-done:hover { border-color: #388bfd; border-left-color: #3fb950; }
/* 已完成的卡不抢注意力：整体略降透明度，但仍明显高于"可作业"的卡
   ⚠ 不能用 0 或不设——.muted 才该是最暗的那一档 */
.olist-card.cutwork-done .ol-top .ol-id { color: #7ee787; }

/* 四根指针平铺 */
.ol-pointers { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.olp-cell {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; border-radius: 7px; font-size: 12px;
  background: #0d1117; border: 1px solid #30363d; border-left: 2px solid #30363d;
}
.olp-cell.active { border-left-color: #3fb950; }
.olp-cell.done { border-left-color: #2ea043; opacity: .75; }
.olp-cell.empty { border-left-color: #484f58; opacity: .6; border-style: dashed; }
.olp-cell.bad { border-left-color: #f85149; background: #22100f; }
.olp-label { color: #768390; font-size: 11px; flex: none; }
.olp-who { color: #e6edf3; }
.olp-who.done { color: #3fb950; }
.olp-who.empty { color: #484f58; }
.olp-since { color: #768390; font-size: 10px; margin-left: auto; }
.olp-warn { color: #f0883e; font-size: 10px; margin-left: auto; }

/* 生产进度条 */
.ol-progress { padding-top: 2px; }
.olp-placeholder { color: #484f58; font-size: 11px; }
.olp-sealed { color: #3fb950; font-size: 11px; }
.olbar-info { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.olbar-sum { color: #768390; }
.olbar-sum.bad { color: #f85149; }
.olbar-sum.ok { color: #3fb950; }
/* ★ 2026-10-26【二改】百分比数字【一律绿】（与填充同色），⛔ 不再随进度变色。
   ⚠ 原来是橙 #f0883e；用户不要渐变之后，数字再按进度变色就成了纯噪音。 */
.olbar-sub { margin-left: auto; color: #3fb950; font-weight: bold; font-size: 12px; }
/* ★ 2026-10-25【用户报障】"打包全部完成了以后…应该是显示100%进度，并且进度条变成绿色"
   ⇒ 100% 时百分比数字也要变绿。⚠ 必须写在 .olbar-sub 之后（同特指度靠后胜出），
     或靠 .done 这个附加类提高特指度；⛔ 别只改 .olbar-sub 本体，否则没完工的单也跟着变绿。 */
.olbar-sub.done { color: #3fb950; }
/* ★ 2026-10-24【分包】封过箱但还没齐套时，进度条下面补一行"已封 N 包 / 还剩 M 块"。
   ⚠ 以前这里封过 1 箱就把整条进度换成"已齐套封箱"，分包后等于进度消失。 */
.olbar-pack { margin-top: 4px; color: #58a6ff; font-size: 11px; }
/* ★ 2026-10-25 齐套时那行"✅ 已齐套封箱（N 箱）"用绿色（与条、百分比同色系，一眼看完工） */
.olbar-pack.olbar-sealed { color: #3fb950; }

/* 连续进度条：一根底槽内，开料/封边/打孔/包装 各占 25%，依次累加 */
.olbar-segs {
  display: flex; height: 16px;
  border: 1px solid #30363d; border-radius: 5px;
  /* ★ 2026-10-26 二改：底槽统一深灰 = "空槽"的颜色（原来 #0d1117 与卡片底色几乎一样，
     槽本身看不清 ⇒ 分不出条有多长）。⚠ 四个档位逐个写死同一个值，⛔ 别只写一处：
     漏掉 lvl-bad 就会落回这里的默认值，空槽颜色与其他单不一致（探针 PG-9 实测咬到过）。 */
  background: #161b22; overflow: hidden; margin-bottom: 5px;
}
.olbar-segs .olseg { height: 100%; position: relative; overflow: hidden; }
/* 段间分隔：让"走到哪道工序"仍然可分。⚠ 颜色要比填充绿暗一档，否则绿段之间像断开了 */
.olbar-segs .olseg + .olseg { border-left: 1px solid #1a7f37; }

/* ★★★ 2026-10-26【二改·用户报障后的最终口径：绿色填充 + 灰色空槽】
   用户原话："你改完以后的进度条怎么显示的是满的，应该按照进度百分比显示的啊，
              没有进度的部分是空的，你不行还是改成都是绿色的吧。不用搞什么渐变色了"

   ⛔⛔ 上一版是【按进度渐变着色】，用户看到的是"整条满的"。真根因不在渐变本身，
      而在【底槽被刷成了进度色】：
        · 底槽 background 被 JS 内联成 barColorAt(shownPct)（橙红）
        · 填充段也是橙红系 ⇒ 实测 25% 的单：底槽 rgb(247,121,64) 与填充段【完全一致】
        · 于是"填出去的 25%"和"空着的 75%"肉眼分不出来 = 看着满
      ⚠ 段宽一直是对的（四段合计正好 25%），坏的是"空槽也有颜色"。

   ✅ 现在（用户拍板）：
      · 填充段 .olseg   → 一律绿 #2ea043
      · 底槽 .olbar-segs → 一律【深灰】#161b22（空槽 = 看得见的空）
      · 段间分隔线       → 深一点，让"走到哪道工序"仍可分（⛔ 但不靠颜色区分进度）
   ⛔ 别再给 .olbar-segs 或 .olseg 写"按进度变色"的颜色；也 ⛔ 别把底槽调成浅灰（#8b949e）：
      浅灰与绿填充亮度接近，在小卡片上仍会糊成一片（旧版就这么写的）。 */
.olbar-segs .olseg { background: #2ea043; }

/* 底槽 = 空槽的颜色。⛔ 只允许中性深灰，⛔ 不许出现任何进度色。 */
.olbar-segs.lvl-idle  { background: #161b22; }
.olbar-segs.lvl-ok    { background: #161b22; }
.olbar-segs.lvl-done  { background: #161b22; }

/* 异常档位：⛔ 不涂整条，也 ⛔ 不给外框上色 —— 只用【底色/文字】表达告警。
   ⚠ 底色必须【显式写同一个灰】：不写就会落到上面 .olbar-segs 的默认值，
     一旦默认值改了，异常单的空槽就与普通单不同色（探针 PG-9 咬到过 #0d1117 vs #161b22）。

   ★★ 2026-10-26【用户第三次反馈，逐字】
     "那个进度条的外框不用带颜色"
   【为什么】上一版让 warn 用橙色描边、bad 用红色描边（还是 2px 加粗），
     于是每张异常单的进度条外圈都镶着一道彩色边 —— 用户看着像"给条套了个彩色相框"，
     而且外框颜色和条内绿色/灰色毫无关系，反而干扰读数。
   ⛔ 所以：**.olbar-segs 及其 lvl-* 一律不再设 border-color / border-width**，
     外框只保留 .olbar-segs 基础规则里那条中性 1px #30363d（与页面其他边框同一灰）。
   ⚠ 告警信息不会丢：档位文字（"补板在途 N 张…"）本来就是红色的，条的身份靠长度+文字表达。
     探针 PG-9 已同步改判据（原来那条"描边必须与正常单不同"必须删掉，否则它会逼着人把彩色边加回来）。 */
.olbar-segs.lvl-warn  { background: #161b22; }
.olbar-segs.lvl-bad   { background: #161b22; }


.todo-item.overdue { border-color: #f0883e; }

/* ---------- 提示 ---------- */
#toast {
  position: fixed; left: 50%; top: 66px; transform: translateX(-50%);
  z-index: 100; display: none;
  padding: 8px 18px; border-radius: 8px; font-size: 12px;
  background: #2d1e0e; border: 1px solid #f0883e; color: #f0d09c;
  max-width: 70vw;
}
#toast.err { background: #3d1a1d; border-color: #f85149; color: #ffb0ad; }
#toast.ok { background: #10261a; border-color: #2ea043; color: #9ee6b0; }

/* ---------- 登录页 ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  height: 100%; overflow: auto;
  background: radial-gradient(circle at 50% 0%, #16223a 0%, #0d1117 60%);
}
#login-card {
  width: 380px; padding: 32px 30px 26px;
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.5);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo {
  font-size: 28px; font-weight: bold; letter-spacing: 1px; color: #58a6ff;
}
.login-sub { color: #768390; font-size: 13px; margin-top: 6px; }
.login-row { margin-bottom: 15px; }
.login-row label { display: block; color: #768390; font-size: 11px; margin-bottom: 6px; }
.login-row input {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13px; font-family: inherit;
  background: #0d1117; color: #e6edf3; border: 1px solid #30363d; border-radius: 8px; outline: none;
}
.login-row input:focus { border-color: #388bfd; }
/* white-space: pre-line —— 连接类报错是多行指引（含换行），要按行显示。 */
.login-err { color: #ffb0ad; font-size: 12px; min-height: 18px; margin-bottom: 6px; white-space: pre-line; line-height: 1.5; }
.login-btn {
  width: 100%; height: 42px; font-size: 14px; letter-spacing: 4px; cursor: pointer;
  background: #1f6feb; color: #fff; border: 1px solid #1f6feb; border-radius: 8px;
}
.login-btn:hover { background: #388bfd; }
.login-tip {
  margin-top: 22px; padding: 12px 14px;
  background: #0d1117; border: 1px dashed #30363d; border-radius: 9px;
}
.login-tip-title { color: #3fb950; font-size: 11px; margin-bottom: 8px; }
.login-tip-body {
  display: flex; gap: 18px; font-size: 12px; color: #768390; margin-bottom: 10px;
}

/* ---------- 身份设置弹窗 ---------- */
/* 身份设置内容较多，单独把这个弹窗放宽一点（通用弹窗是 460px） */
#modal-mask .box.wide { width: 560px; }
/* ★ 2026-10-24：包装标签模板设计器（左画布 + 右属性面板）—— 560px 塞不下两栏
   ★★ 2026-10-25 放大：用户报"好多功能都需要我滑动页面才能选择到"。
     原来 980×66vh ⇒ 两栏一挤就垂直溢出，字段列表还自带一道 max-height:140px 的小滚动。
     ⇒ 加宽到 1400px、内容区撑到 90vh；并且【弹窗外层不滚】(overflow:hidden)，
       改由内部左画布 / 右属性面板各自滚动 —— 这样"字段/加元素/属性"始终在同一屏里。
     ⚠ 必须用 flex 列 + .lbl-body flex:1/min-height:0：只设 max-height 时，
       内部 100% 高度算不出来 ⇒ 属性面板会被压成 0 高（看着像"面板没了"）。
     ⚠ .box 的通用规则是 max-height:78vh; overflow:auto，这里的 90vh/hidden 必须写在
       .box.lbl-wide 这一条里（特异性 0,2,1 > 0,1,1），⛔ 不要拆成 #modal-body 单独设。 */
#modal-mask .box.lbl-wide {
  width: 1400px; max-width: 98vw;
  /* ⚠⚠ 必须给【确定高度】height:92vh，⛔ 不能只给 max-height：
     flex 子项的"撑满剩余空间"只在父级高度【确定】时才算得出来；只给 max-height 时
     父级高度仍由内容决定 ⇒ 里面再套 flex:1 拿不到高度 ⇒ 属性面板被顶到内容最底部
     （实测：弹窗 446px 高、内容溢 1060px、属性面板跑到 1421px —— 正是用户说的"要滑动"）。 */
  height: 92vh; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
}
#modal-body.lbl-body {
  flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden;
  /* ⚠ 自己也要成为 flex 容器，里面的 #ltpl-layout 才能撑满并让子栏各自滚动 */
  display: flex; flex-direction: column;
}
/* 设计器主体：吃掉内容区全部高度，⛔ 不按内容长度排
   ⚠⚠ flex-basis 必须写【0】(= flex:1 1 0)，⛔ 不能写 auto：
     basis:auto 时该轴上的基准尺寸取【内容高度】(实测 1067px)，min-height:0 拦不住它，
     ⇒ 布局块比内容区(321px)还高、溢出被 overflow:hidden 裁掉却没滚动条 ⇒
       用户既看不到下面、也滚不到 ⇒ 就是"要滑动页面才能选到"。
     basis:0 才是"高度只由父级剩余空间决定"。
   ⚠⚠ 层级是 #modal-body > #label-tpl-root > #ltpl-layout（中间还有一层包装 div），
     ⛔ 别写成 #modal-body > #ltpl-layout 这种直接子选择器 —— 匹配不上，
     而 flex 又会"看起来没坏"（只是照样按内容撑高），极难发现。 */
#modal-body.lbl-body > #label-tpl-root { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#modal-body.lbl-body #ltpl-layout { flex: 1 1 0; min-height: 0; overflow: hidden; }
/* ⚠ 右栏（参数+字段+属性）在极窄/极矮的窗口里会被压成 0 高（实测 h=0）⇒
   给一个【最小可用高度】并让它自己纵向滚动：宁可这一栏滚，⛔ 也不能把属性面板压没。 */
#modal-body.lbl-body #ltpl-layout > div { min-height: 0; }
#modal-body.lbl-body #ltpl-props { min-height: 120px; }
/* 窄屏兜底：两栏放不下时改为上下排（⛔ 不让右栏被挤出可视区） */
@media (max-width: 900px) {
  #ltpl-layout { flex-direction: column; }
  #ltpl-canvas-wrap { max-width: none; }
}
/* 画布上被选中的元素：虚框 + 四角点（⚠ 只给设计器看，⛔ 打印时不存在） */
.lb-el-sel {
  outline: 2px solid #1f6feb;
  outline-offset: 1px;
  background: rgba(31, 111, 235, 0.06);
}
/* ★ 2026-10-07：订单流程设置弹窗（按账号一行，表格宽）—— 需要更宽 + 更高的弹窗 */
#modal-mask .box.flow-wide { width: 900px; max-height: 84vh; }
#modal-mask .box.flow-wide .flow-wrap { max-width: none; }
/* 第 4 列（是否参与流程）改成卡片后要留出内边距，120px 太挤 ⇒ 放宽到 160px */
#modal-mask .box.flow-wide .flow-row { grid-template-columns: 150px 1fr 1fr 160px; }
.idm-add {
  padding: 12px 14px 14px; margin-bottom: 14px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 9px;
}
.idm-add .mrow:last-of-type { margin-bottom: 10px; }
.idm-list-title {
  color: #768390; font-size: 11px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid #21262d;
}
.idm-list { max-height: 300px; overflow: auto; }
.idm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 6px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
}
.idm-item.locked { border-color: #3d2f1a; }
.idm-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.idm-info b { color: #e6edf3; font-size: 13px; }
.idm-role { color: #58a6ff; font-size: 11px; }
.idm-plat { color: #768390; font-size: 11px; }
.idm-me {
  color: #3fb950; font-size: 10px; padding: 1px 6px;
  border: 1px solid #2ea043; border-radius: 999px;
}
.idm-ops { display: flex; gap: 6px; flex: none; }
.login-tip-body b { color: #e6edf3; }
.login-tip a.small { color: #58a6ff; font-size: 12px; text-decoration: none; }
.login-tip a.small:hover { text-decoration: underline; }

/* ---------- 启动遮罩（ERP 主界面拉数据期间） ---------- */
.erp-boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 0%, #16223a 0%, #0d1117 60%);
}
.erp-boot-inner { text-align: center; max-width: 460px; padding: 0 24px; }
.erp-boot-logo {
  font-size: 30px; font-weight: bold; letter-spacing: 1px; color: #58a6ff; margin-bottom: 14px;
}
.erp-boot-msg { color: #e6edf3; font-size: 14px; margin-bottom: 10px; }
.erp-boot-extra { color: #768390; font-size: 12px; line-height: 1.9; }
.erp-boot-extra a.small { color: #58a6ff; text-decoration: none; }
.erp-boot-extra a.small:hover { text-decoration: underline; }

/* =========================================================
   二期 · 报价模板设计器（2026-10-08）
   四区布局：顶栏 / 字段区 / 画布 / 属性区
   ★ 2026-10-08 布局重做：以【一张表格】为中心（对齐用户"表格思维"诉求）
     ⛔ 旧问题：.qt-root 是 flex 列容器，但 .qt-body 没 flex:1 ⇒ 高度塌缩 ⇒ 三栏高矮不齐 = "样式不对"
     ✅ 新规则：.qt-body 吃满剩余高度；三栏各自可独立滚动；整页不出现双滚动条。
   ========================================================= */
.qt-root {
  display: grid; grid-template-rows: auto auto minmax(440px, 1fr); gap: 10px;
  /* ★ 用 min-height 兜底：⛔ 不依赖 #content 的 height:100%（父级为 flex 子项时可能算不出）
     ⇒ 即使算不出高度，也保证三栏至少 440px 可用，界面不会塌成一条细缝。
     ⚠ 用 calc 减掉 #content 的上下 padding(18px×2)，避免撑出多余滚动条。 */
  min-height: calc(100% - 0px); min-width: 0;
}
.qt-topbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; background: #161b22; border: 1px solid #30363d; border-radius: 8px;
}
/* ★ 2026-10-08（第三十九轮）「报价模板」页签改成【通用表格设计器入口卡】 */
.qt-root.qt-root { grid-template-rows: auto; }
.qt-entry {
  max-width: 760px; padding: 22px 24px; background: #161b22; border: 1px solid #30363d;
  border-radius: 10px; display: flex; flex-direction: column; gap: 12px;
}
.qt-entry-t { font-size: 17px; font-weight: 700; color: #58a6ff; }
.qt-entry-d { font-size: 13px; color: #c9d1d9; line-height: 1.95; }
.qt-entry-d b { color: #79c0ff; }
.qt-entry-d.muted { font-size: 12px; color: #768390; line-height: 1.8; }
.qt-entry-btn {
  align-self: flex-start; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: #1f6feb; color: #fff; border: 1px solid #1f6feb; border-radius: 7px;
}
.qt-entry-btn:hover { background: #388bfd; border-color: #388bfd; }
.qt-entry-sum {
  border-top: 1px solid #21262d; padding-top: 10px; display: flex; flex-direction: column; gap: 5px;
}
.qt-entry-sum .kv { display: flex; justify-content: space-between; font-size: 12px; color: #c9d1d9; }
.qt-entry-sum .kv b { color: #768390; font-weight: 400; }
.qt-topbar select { min-width: 180px; }
/* ★ 2026-10-08 通用表格设计器入口（是个 <a>，⛔ 拿不到 button.small 的样式 ⇒ 单独给） */
.qt-topbar a.qt-open-engine {
  height: 24px; padding: 0 10px; font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; text-decoration: none;
  background: #21262d; color: #58a6ff; border: 1px solid #1f6feb; border-radius: 6px;
}
.qt-topbar a.qt-open-engine:hover { background: #1f6feb; color: #fff; }
.qt-switch { display: flex; align-items: center; gap: 6px; color: #e6edf3; font-size: 13px; cursor: pointer; }
/* ★ 2026-10-08：上手说明条（首屏必读三步） */
.qt-guide {
  background: #0d1117; border: 1px solid #1f6feb; border-left: 4px solid #58a6ff;
  border-radius: 8px; padding: 10px 12px;
}
.qt-guide-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: #58a6ff; font-weight: bold; font-size: 13px;
}
.qt-guide-body { margin-top: 8px; display: grid; gap: 8px; }
.qt-step { font-size: 12.5px; line-height: 1.7; color: #adbac7; }
.qt-step b { color: #e6edf3; display: block; margin-bottom: 2px; }
.qt-step .muted { color: #768390; }
/* ★ 三栏：字段区（窄，固定）| 画布（主角，吃满）| 属性区（固定）。
   min-height:0 是 grid/flex 子项能收缩出滚动条的必要条件（⛔ 少了它内容会把容器撑破）。 */
.qt-body {
  display: grid; grid-template-columns: 210px minmax(0, 1fr) 320px;
  gap: 10px; align-items: stretch; min-height: 0;
}
.qt-panel {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 10px;
  min-height: 200px; min-width: 0;
  display: flex; flex-direction: column;
  overflow: auto;              /* 三栏各自滚动，⛔ 不把页面撑长 */
}
.qt-panel > * { flex: none; }  /* 面板内子块默认不拉伸（表格/列表按内容） */
/* 画布面板：表格区吃满剩余高度 */
.qt-canvas { overflow: hidden; }
.qt-canvas .qt-drop { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.qt-ph { font-weight: bold; color: #e6edf3; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.qt-hint { color: #768390; font-size: 11px; font-weight: normal; }
.qt-group { color: #58a6ff; font-size: 11px; margin: 10px 0 4px; letter-spacing: 1px; }
.qt-field {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; margin-bottom: 4px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 6px; font-size: 12px;
  color: #e6edf3; cursor: grab;
}
.qt-field:hover { border-color: #58a6ff; }
.qt-field.qt-mat { border-left: 3px solid #3fb950; }
.qt-field.muted { color: #768390; cursor: default; }
.qt-fname { flex: 1; }
.qt-unit { color: #768390; font-size: 10px; }
.qt-todo { color: #d29922; font-size: 10px; border: 1px solid #9e6a03; border-radius: 999px; padding: 0 5px; }
/* ★ 2026-10-08 修复：落点必须【真的有面积】，否则空模板时只有一行小字可接住拖拽 = 用户体感"拖不动" */
.qt-drop {
  border: 1px dashed #30363d; border-radius: 6px; padding: 10px;
  min-height: 220px; transition: border-color .15s, background .15s;
}
.qt-drop.over { border-color: #58a6ff; background: rgba(88,166,255,.06); }
/* 空画布的引导条：占满整个落点，让"这里能放"一眼可见 */
.qt-drop-hint {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 180px; color: #768390; font-size: 13px; text-align: center;
  border-radius: 6px; pointer-events: none;
}
.qt-drop-hint b { color: #58a6ff; font-size: 14px; }
/* ★ 2026-10-08：表格 = 报价单外观（呼应"最终就是出表格"）
   表头吸顶、列宽固定、数字右对齐、行可点选（整行是"选中热区"）。 */
.qt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.qt-table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; color: #768390; font-weight: normal; font-size: 11px;
  padding: 7px 8px; background: #1c2128; border-bottom: 1px solid #30363d;
  white-space: nowrap;
}
.qt-table td {
  padding: 9px 8px; border-bottom: 1px solid #21262d; color: #e6edf3;
  vertical-align: middle; word-break: break-word;
}
/* 列宽：行名 / 数量 / 算式 / 单价 / 金额 / 操作 */
.qt-table th:nth-child(1), .qt-table td:nth-child(1) { width: 20%; }
.qt-table th:nth-child(2), .qt-table td:nth-child(2) { width: 12%; }
.qt-table th:nth-child(3), .qt-table td:nth-child(3) { width: 30%; }
.qt-table th:nth-child(4), .qt-table td:nth-child(4) { width: 13%; }
.qt-table th:nth-child(5), .qt-table td:nth-child(5) { width: 13%; }
.qt-table th:nth-child(6), .qt-table td:nth-child(6) { width: 12%; text-align: right; white-space: nowrap; }
/* ★ 数字列右对齐（表格专业感的关键，左对齐会显得很业余） */
.qt-table td:nth-child(4), .qt-table td:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
/* ★ 整行可点 = 选中热区（cursor 提示"这里能点"） */
.qt-table tbody tr[data-row], .qt-table tr[data-row] { cursor: pointer; }
.qt-table tr[data-row]:hover td { background: rgba(88,166,255,.05); }
.qt-table tr.sel td { background: rgba(88,166,255,.14); }
.qt-table tr.sel td:nth-child(1) { box-shadow: inset 3px 0 0 #58a6ff; }
.qt-table tr.qt-total td { border-top: 2px solid #30363d; font-weight: bold; }
.qt-table button.small { margin-right: 3px; }
/* 空表占位（有表头但还没行时） */
.qt-table td.muted { text-align: center; }
.qt-sentence { color: #e6edf3; }
.qt-price { color: #58a6ff; }
.qt-sample { color: #f85149; font-size: 10px; border: 1px solid #f85149; border-radius: 999px; padding: 0 5px; margin-left: 5px; }
.qt-note { color: #d29922; font-size: 10px; margin-top: 3px; }
.qt-banner {
  background: #3d1418; border: 1px solid #f85149; color: #ffb3b3;
  padding: 7px 10px; border-radius: 6px; font-size: 12px; margin-bottom: 8px;
}
.qt-banner b { color: #ffd7d7; }
.qt-note-box { color: #768390; font-size: 12px; margin-bottom: 8px; }
.qt-sub { color: #58a6ff; font-size: 11px; margin: 12px 0 6px; letter-spacing: 1px; }
/* ★ 属性区：标签定宽 + 控件吃满；窄屏也不溢出（min-width:0 是关键） */
.qt-props .mrow { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.qt-props .mrow label { color: #768390; font-size: 12px; width: 92px; flex: none; }
.qt-props .mrow input, .qt-props .mrow select { flex: 1; min-width: 0; }
.qt-props input, .qt-props select { padding: 5px 7px; font-size: 12.5px; }
/* ★ 未选中行时的提示框（比旧的一行灰字显眼，因为用户最容易卡在这里） */
.qt-note-box {
  color: #adbac7; font-size: 12.5px; line-height: 1.7;
  background: #0d1117; border: 1px dashed #30363d; border-radius: 6px;
  padding: 9px 11px; margin-bottom: 10px;
}
.qt-note-box b { color: #58a6ff; }

/* =========================================================
   ERP 详情页 · 「导入生产」区（2026-10-15 用户口径）
   ---------------------------------------------------------
   ⚠⚠【为什么这里必须单独写一段】
     本页 CSS 里**只有** `button.small` / `button.big` 这类**组合选择器**，
     ⛔ **没有一条规则命中裸 `<button>`** ⇒ 裸按钮直接用浏览器默认皮肤
     （浅底 + 黑字）⇒ 在暗色页面上是一块刺眼的白块。
     ⭐ 所以那个按钮的 class 从一开始就**少了 `small`**（我上一轮的疏漏）。
     ⚠ 本段只做"尺寸/间距"微调，**底色仍由 `button.small` 提供**
       —— ⛔ 不在这里重写一套颜色，避免出现"两个地方都定义按钮长什么样"。
   ========================================================= */

/* 提示字 = 绿色（用户要求）。
   ⚠ 用专属 class，⛔ 不要去改全局 `.small` 的 color ——
     那会波及整页所有小字（表头说明、库存提示…），是典型的误伤。 */
.import-production-tip {
  color: #3fb950;          /* 与全局"已完成"的绿一致（.pointer-row .who .done 同色） */
  font-size: 12.5px;
  margin-bottom: 8px;
}

/* ⭐⭐ 按钮：**蓝底白字 + 更大**（2026-10-15 用户口径，第三次调整样式）。
   用户原话："导入生产的按钮可以在大一点，并且换成蓝底白字把"
   ⇒ 上一轮做成"灰底白字跟其它按钮一样"用户仍不满意，这次要【主操作】的观感。

   ⚠⚠⚠【特指度必须盖过 button.small —— 这是我第一版写错的地方，真机实测抓到】
     按钮 class 是 `small import-production-btn`，而本页的按钮基线规则是
        `button.small { … }`  ⇒ 特指度 **0-1-1**（1 个元素 + 1 个类）
     我第一版只写 `.import-production-btn { … }` ⇒ 特指度 **0-1-0**，**比它低**！
     ⇒ CSS 的规矩是**先比特指度、特指度相同才比先后**。
       我把规则写在文件末尾是【没用】的 —— 特指度输了，写多后面都赢不了。
     ⇒ 真机实测后果：规则明明在样式表里（第 365 条，属性一个不少），
       但算出来仍是 `button.small` 的 `#21262d` 灰底 + 24px 高
       ⇒ **用户看到的按钮跟没改一模一样**，而源码里看完全正确。
       （这正是 [[pitfall_dom_ok_css_missing]] 那一类"看着对了、实际没生效"。）

     ⭐ 修法：选择器写成 **`button.import-production-btn`** ⇒ 特指度 0-1-1，
       与 `button.small` **持平**；再靠"我写在文件更后面"取胜 ⇒ 稳。
     ⚠ `button.small:hover` 也是 0-1-1(+伪类 0-2-1)，所以 hover 同样要写
       `button.import-production-btn:hover`，⛔ 不能省掉 `button`。

     ⚠ hover 必须一起改：`.small:hover` 会把底色提亮成灰 ⇒ 若只写静态蓝底，
       鼠标一放上去按钮就【由蓝变灰】闪一下，看起来像坏了。
       同样地，:hover 的写法也要带 `button` 才有同等特指度。

     ⚠ 四条属性一次写全（底色/文字色/描边/尺寸），⛔ 漏一条就会从 .small 漏出灰值，
       出现"蓝底配灰描边"这种半吊子。
     ⛔ 不用 `!important`：与 `button.small` 特指度持平后已足够，
       用 !important 反而让将来更难覆盖（本项目 CSS 里一处都没有）。 */
button.import-production-btn {
  height: 38px;              /* 24 → 38：明显比旁边的小按钮大一号 */
  padding: 0 30px;           /* 10 → 30：横向也放开，像个主按钮 */
  font-size: 14.5px;         /* 11 → 14.5：字也跟着大，否则按钮大而字小会显得空 */
  font-weight: 600;
  background: #1f6feb;       /* 蓝底（比主色 #388bfd 更深 ⇒ 白字才够清楚） */
  color: #ffffff;            /* 白字 */
  border: 1px solid #1f6feb;
  border-radius: 6px;
}
/* ⚠ hover 一起变（否则从蓝闪成灰）；提亮一档表示"可点"。
   ⚠ 选择器同样带 `button` —— 否则特指度输给 `button.small:hover`，hover 时闪回灰色。 */
button.import-production-btn:hover {
  background: #388bfd;
  border-color: #388bfd;
  color: #ffffff;
}

/* 按钮在提示字下面单独占一行（⛔ 不挤在同一行，避免窄屏时换行错位） */
#import-production-section .import-production-tip { display: block; }

/* ---------- 下载输入采集器（打孔页，2026-10-24 用户要求）----------
   用户原话：「下载输入采集器的按钮用蓝底白字，现在下载输入采集器的按钮大小
            跟旁边启用监听大小不一样，搞成一样的」。

   ⚠⚠ 为什么必须写成 CSS 类、⛔ 不能在 JS 里一条条 style 里写：
     旁边那个是 <button class="small">，尺寸由 `button.small`（height:24px /
     padding:0 10px / font-size:11px）决定；之前下载链接是在 JS 里手写
     fontSize:12px + padding:5px 12px ⇒ 自己算出一个 12+10+2=24 以外的高度，
     和 24px 的按钮永远对不齐（差 1~2px 肉眼就是"高矮不齐"）。
     ⇒ 这里直接【照抄 button.small 的三条尺寸】，两边同一套值，天然等高。

   ⚠ 必须是 <a> 而不是 <button>：<a download> 浏览器才会直接存文件。
   ⚠ <a> 默认 display:inline ⇒ 宽高/内边距不吃 ⇒ 必须 inline-flex 才量得出 24px。
   ⚠ text-decoration:none 必须写：否则按钮上的字带下划线，一眼看出不是按钮。 */
a.drill-collector-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* ↓↓↓ 这三条与 button.small 保持一致，⛔ 改一边必须同步改另一边 */
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  /* ↑↑↑ */
  background: #1f6feb;        /* 蓝底（与全站主蓝一致） */
  color: #ffffff;             /* 白字 */
  border: 1px solid #1f6feb;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;     /* ⚠ 不带 border-box 时 padding+border 会撑高到 26px */
}
/* ⚠ hover 一起改：只写静态蓝底的话，鼠标一上去若被通用 a:hover 规则接管会闪色 */
a.drill-collector-dl:hover {
  background: #388bfd;
  border-color: #388bfd;
  color: #ffffff;
  text-decoration: none;
}

/* ==========================================================================
 * 报价区「下载 PDF」的打印样式（2026-10-28d）
 * --------------------------------------------------------------------------
 * 【怎么用的】order-app.js 的 btnPdf 点击时：
 *   ① 把屏幕上那块已画好的 .card（里面有 .quote-tpt-table）克隆进
 *      #quote-print-stage，挂到 body 末尾；
 *   ② 给 body 加 .printing-quote；
 *   ③ window.print()；
 *   ④ afterprint（或 1s 兜底）拆掉节点 + 去掉类。
 *
 * 【为什么要这么绕】项目里没有本地 PDF 库，⛔ 也不许走 CDN；
 *   而 tdPrintSheets 住在 table-designer.js（订单页刻意不加载）。
 *   ⇒ 用浏览器原生打印，让用户在对话框里选「另存为 PDF」。
 *
 * 【铁律】@media print 里必须把除 #quote-print-stage 之外的一切藏掉，
 *   ⛔ 否则会把整个 ERP 界面（深色底、按钮、侧栏）一起打进 PDF。
 *   ⚠ 只在 body.printing-quote 生效 —— 用户直接按 Ctrl+P 打整个页面时
 *     行为保持原样，⛔ 不要无条件隐藏全站。
 * ========================================================================== */
@media print {
  /* ★★ 2026-10-28l【用户原话】"报价打印PDF的时候不要有SuperG ERP标题
     还有左下角的网站地址还有左上角的时间"。
     ------------------------------------------------------------------
     【真因】这三样【都不是网页内容】，而是【浏览器自带的打印页眉页脚】：
       左上角=日期时间、右上角=网页 <title>（本页就是 "Super G ERP"）、
       左下角=网址、右下角=页码。它们由浏览器在排版阶段画在页边距里，
       网页 DOM 里根本没有这些节点 ⇒ ⛔ 想靠 display:none 删掉是徒劳的。
     【正解】Chrome/Edge 的既定行为：【@page 的 margin 小于约 10mm 时，
       浏览器自动省略页眉页脚】（它没地方画）。margin:0 最彻底。
     ⚠ 这是"让浏览器自己不出"，⛔ 不是"把网页里那几行藏起来"。
     ⚠⛔ 边距归零后表格会贴到纸边（打印机物理上印不到最外 3~5mm），
       所以下面给 #quote-print-stage 补 padding 当"纸内留白" ——
       ⛔ 不要把留白写回 @page 的 margin，一写回去页眉页脚立刻回来。 */
  /* ⚠⚠ 这里【故意不写 @page】—— @page 是无选择器的 at-rule，写死在 CSS 里
     会无条件生效 ⇒ 连「用户直接 Ctrl+P 打印整个 ERP 页面」也会被改掉，
     而上面铁律要求那条路径【behavior 保持原样】。
     ⇒ 改由 order-app.js 在「下载 PDF」点击时【动态注入】、cleanup 时删除，
        只影响这一次打印。见 order-app.js 的 QUOTE_PRINT_PAGE_CSS。 */
  body.printing-quote > * {
    display: none !important;
  }
  body.printing-quote #quote-print-stage {
    display: block !important;
    /* 纸内留白（替代被归零的 @page margin）：四边 10mm，
       ⚠ 必须 >= 打印机不可打印区(约 5mm)，否则表格外框会被裁掉。 */
    padding: 10mm !important;
    box-sizing: border-box;
  }
  /* 打印用白底黑字：屏幕上是深色主题，纸上⛔ 不能带底色 */
  body.printing-quote,
  body.printing-quote #quote-print-stage {
    background: #ffffff !important;
    color: #000000 !important;
  }
  body.printing-quote #quote-print-stage .card {
    background: #ffffff !important;
    border: none !important;
    overflow: visible !important;   /* 屏幕上横向滚，纸上必须整表铺开 */
    padding: 0 !important;
    margin: 0 !important;
  }
  /* 列多时按纸宽缩，⛔ 不许把右边几列截掉 */
  body.printing-quote .quote-tpt-table {
    width: 100% !important;
    table-layout: fixed;
  }
  body.printing-quote .quote-tpt-table td {
    /* ⚠ 纸上要真边框：屏幕用的 1px solid 在打印里可能被压成看不见 */
    border: 1px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
    word-break: break-word;
  }
  /* ⚠ 价格未命中的红底在纸上没意义（黑白打印机变灰块），改成红字+加粗 */
  body.printing-quote .quote-tpt-table td.quote-tpt-miss {
    background: #fff !important;
    color: #c00 !important;
    font-weight: 700;
  }
  /* ⛔ 不打印挂在后面的定时器残留提示条 */
  body.printing-quote #quote-print-stage .muted {
    color: #000 !important;
  }
}