/* ============================================================
   鞋业 ERP · 样式（自适应，手机可用；表单紧凑排列）
   ============================================================ */
:root {
  --c-primary: #1f5fbf;
  --c-primary-dark: #17489a;
  --c-bg: #f2f4f8;
  --c-panel: #ffffff;
  --c-border: #dfe3ea;
  --c-text: #1f2430;
  --c-text-2: #5b6472;
  --c-muted: #97a0ae;
  --c-danger: #d93025;
  --c-ok: #1a8f4a;
  --c-warn: #b56b00;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(20, 30, 50, 0.07);
  --sidebar-w: 208px;
  --topbar-h: 52px;                  /* ★第307轮：顶栏高度，钉住的标签条要贴它下面 */
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font-family: inherit; font-size: 13.5px; }
a { color: var(--c-primary); text-decoration: none; }

/* ---------- 登录页 ---------- */
/* ★第341轮：大号提醒条（进货单填负数时用）—— 大字、宽一点，不挡鼠标 */
.toast.big-toast {
  font-size: 15px; line-height: 1.6; padding: 14px 20px;
  max-width: min(620px, 92vw); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20, 33, 61, 0.18);
}

/* ============================================================
   ★★★第343轮（老板）
     · 表头右侧的列宽拖拽手柄 —— **只有超管登录时才会被插进来**（客户看不到）
     · 右下角「保存列宽」按钮
     · 备注列：最多 2 行，字号最小 8px（缩到这个程度就不再缩了）
   ============================================================ */
table.grid thead th { position: relative; }
table.grid thead th > .cdrag {
  /* ★第345轮：手柄必须**整个落在 th 里面**（right:0）—— 之前 right:-3px 会被表格容器裁掉 */
  position: absolute; top: 0; right: 0; width: 9px; height: 100%;
  cursor: col-resize; z-index: 6; background: transparent;
}
table.grid thead th > .cdrag::after {
  content: ''; position: absolute; top: 15%; left: 4px; width: 2px; height: 70%;
  background: #a9b6ca; opacity: .95; border-radius: 1px; transition: background .12s, width .12s;
}
/* ★第344轮：默认就露一条淡灰线，一眼看得出哪能拖 */
table.grid thead th:hover > .cdrag::after { opacity: 1; }
table.grid thead th > .cdrag:hover::after { background: #1f5fbf; opacity: 1; }
body.colw-dragging { cursor: col-resize !important; user-select: none; }
body.colw-dragging * { cursor: col-resize !important; }

.colw-save {
  position: fixed; right: 22px; bottom: 26px; z-index: 9000;
  height: 40px; padding: 0 18px; border: none; border-radius: 22px;
  background: #1f5fbf; color: #fff; font-size: 13.5px; cursor: pointer;
  box-shadow: 0 6px 22px rgba(31, 95, 191, .35); display: none;
}
.colw-save:disabled { opacity: .6; cursor: default; }

/* ★第356轮：材料下单「只读数字格」框选高亮 */
#moBody td.nsel { background: #dce9ff !important; box-shadow: inset 0 0 0 1px #1f5fbf; }

/* ★第356轮（老板）：每一块后面的「合计」用粗斜体，跟普通数字区分开 */
.mo-sum .mo-sumv, .mo-blksum .mo-sumv { font-style: italic; font-weight: 700; color: #1f3a5f; }

/* ★第355轮：材料下单「框选合计」浮条 */
.mo-range-tip {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  z-index: 8800; display: none; padding: 8px 18px; border-radius: 20px;
  background: rgba(20, 33, 61, .92); color: #fff; font-size: 13px;
  box-shadow: 0 8px 26px rgba(20, 33, 61, .3); white-space: nowrap;
}
.mo-range-tip b { color: #8fc4ff; font-weight: 700; }
.mo-range-tip b.v { color: #7ee0a8; font-size: 15px; }

/* 备注列（列表页那种纯文字）：最多两行，超出省略 —— 字号不参与无限缩小 */
table.grid td.cell-rem, table.grid td .cell-rem {
  white-space: normal; word-break: break-all; line-height: 1.25;
}
table.grid td.cell-rem > span, table.grid td .cell-rem > span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; word-break: break-all;
}

.login-wrap {
  min-height: 100%;
  /* ★第339轮（老板）：竖着排 —— 卡片居中，署名落到卡片下方整体居中 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #eaf1fc 0%, #f5f7fb 45%, #e8eef8 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(25, 45, 90, 0.13); padding: 32px 28px 26px;
}
.login-card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: 1.5px; text-align: center; }
.login-card .sub { color: var(--c-text-2); font-size: 12.5px; margin-bottom: 22px; }
.login-card label { display: block; margin-bottom: 14px; }
.login-card label span { display: block; font-size: 12.5px; color: var(--c-text-2); margin-bottom: 6px; }
.login-card input, .login-card select {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fbfcfe; outline: none;
}
.login-card input:focus, .login-card select:focus { border-color: var(--c-primary); background: #fff; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--c-muted); line-height: 1.7; }
.login-err { color: var(--c-danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ---------- 主框架 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: #14213d; color: #c9d4e6; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  padding: 14px 12px 12px; font-size: 15.5px; color: #fff; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.09); letter-spacing: 0.5px;
  /* ★第339轮（老板）：产品名 + 客户名两行都居中，客户名比原来大一点 */
  text-align: center;
}
.sidebar .brand small { display: block; font-weight: 400; font-size: 13px; color: #93a6c6; margin-top: 4px; letter-spacing: 0.5px; }
/* ★★★第307轮：上内边距挪到「首页导航」自己身上；scroll-padding-top 让 scrollIntoView 避开冻结条 */
.nav { overflow-y: auto; padding: 0 0 6px; flex: 1; scroll-padding-top: 46px; }
.nav-group-title { padding: 10px 16px 5px; font-size: 11.5px; color: #6c7f9e; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 7px 16px; color: #c9d4e6;
  font-size: 13px; border-left: 3px solid transparent;
}
.nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav a.active { background: rgba(31,95,191,0.30); color: #fff; border-left-color: #4c8cf5; }
.nav .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 52px; background: #fff; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-size: 15px; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .who { font-size: 12.5px; color: var(--c-text-2); white-space: nowrap; }
.content { padding: 14px; flex: 1; min-width: 0; }

/* ---------- 卡片 / 工具条 ---------- */
.card { background: var(--c-panel); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 12px 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
.toolbar .grow { flex: 1; }
.toolbar .sep { width: 1px; height: 20px; background: var(--c-border); margin: 0 2px; }

/* ============================================================
   ★★★第308轮（老板点名）：材料档案的工具栏「紧凑模式」
   目标：搜索 / 分类 / 供应商 / 用料登记 / 按货号 / 重置 / 已删除 / 新增 / 模板 / 导入 / 导出
        **全部留在第一排**；批量三颗挪到行尾、勾选后才出现。
   ★ 只挂在 .toolbar.tb-tight 上，其它 17 个档案页与所有单据页零影响。
   ============================================================ */
.toolbar #pickInfo { font-size: 12.5px; }
.toolbar.tb-tight { gap: 4px; row-gap: 4px; padding: 8px 10px; }
.toolbar.tb-tight .btn-sm { height: 26px; padding: 0 6px; font-size: 12px; }
.toolbar.tb-tight .btn { height: 30px; padding: 0 9px; font-size: 12.5px; }
.toolbar.tb-tight select.lf-sel { flex: 0 0 118px; max-width: 118px; font-size: 12px; padding: 3px 5px; }
.toolbar.tb-tight .searchbox { flex: 0 1 auto; }
.toolbar.tb-tight .searchbox > input { height: 30px; font-size: 12.5px; padding: 4px 26px 4px 8px; }
.toolbar.tb-tight .tb-style { width: 150px; flex: 0 0 150px; }
.toolbar.tb-tight .tb-arch { padding: 0 2px; border-radius: 6px; }
.toolbar.tb-tight .tb-arch.on { background: #eef4ff; }
.toolbar.tb-tight #pickInfo { font-size: 11.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 92px; }
/* ★「显示已删除的」那几个字改成悬停才看到（读屏和 innerText 仍保留，不丢可访问性） */
.tb-arch-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* ★★★第309轮（老板点名）：材料档案的「状态」下拉 —— 全部 / 启用 / 停用 / 已删除。
   ★ 宽度跟 lf-sel 一档，但**不带 lf-sel 类** —— 235 / 308 两处自检是按 select.lf-sel 数过个数的，
     给它挂 lf-sel 会把「正好 3 个」数成 4 个（白红一片）。 */
.toolbar.tb-tight select.st-sel { flex: 0 0 96px; max-width: 96px; font-size: 12px; padding: 3px 5px; }
/* 「批量操作」按钮上的「已选 N」小角标（不勾时隐藏，省地方） */
.toolbar .pick-n { display: inline-block; min-width: 16px; padding: 0 4px; margin: 0 2px; border-radius: 8px;
  background: var(--c-primary); color: #fff; font-size: 11px; line-height: 15px; text-align: center; }
/* ★窄屏再挤一档：1280 / 1366 的笔记本也要让「导入 / 导出」留在第一排 */
@media (max-width: 1400px) {
  .toolbar.tb-tight select.lf-sel { flex: 0 0 96px; max-width: 96px; }
  .toolbar.tb-tight .tb-style { width: 128px; flex: 0 0 128px; }
  .toolbar.tb-tight select.st-sel { flex: 0 0 86px; max-width: 86px; }
  .toolbar.tb-tight #pickInfo { max-width: 72px; }
  /* 搜索框宽度是内联 style（searchBoxHtml 给的），这里只能 !important 压窄 */
  .toolbar.tb-tight .searchbox > input { width: 150px !important; }
}

/* ★★★第309轮：1280 这种窄屏再挤一档 ——
   多了「状态」下拉与「批量操作 ▾」之后，1280 会把这排挤成两行（实测 expBtn / pickMore 掉第二排）。
   目标仍然是第308轮那句：新增 / 下载模板 / 导入 / 导出 全在第一排。 */
@media (max-width: 1320px) {
  .toolbar.tb-tight .searchbox > input { width: 128px !important; }
  .toolbar.tb-tight .tb-style { width: 108px; flex: 0 0 108px; }
  .toolbar.tb-tight select.lf-sel { flex: 0 0 84px; max-width: 84px; }
  .toolbar.tb-tight select.st-sel { flex: 0 0 78px; max-width: 78px; }
  .toolbar.tb-tight #pickInfo { max-width: 54px; }
  .toolbar.tb-tight .btn { padding: 0 7px; }
}

/* 时间范围筛选条：按日期卡一段（列表页、挑单弹窗都用它） */
.dr { display: inline-flex; align-items: center; gap: 4px; }
.dr .dr-sel, .dr .dr-d {
  height: 32px; border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  padding: 0 8px; font-size: 12.5px; font-family: inherit; color: var(--c-text);
}
.dr .dr-sel { padding: 0 4px; }
.dr .dr-t { color: var(--c-text-2); font-size: 12.5px; }

/* ★★★第421轮（老板）：销售订单总表 —— 搜索框 / 货号下拉 / 状态 / 日期 / 按钮 / 导出台账
   全部压成一行。控件矮一点、字小一点，放不下就整排横滑，不再折成第二行。 */
.toolbar.so-bar {
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}
.toolbar.so-bar > * { flex: 0 0 auto; }
.toolbar.so-bar .searchbox input { width: 168px !important; height: 28px; font-size: 12px; }
.toolbar.so-bar .btn { height: 28px; padding: 0 8px; font-size: 12px; }
.toolbar.so-bar select,
.toolbar.so-bar .so-sel,
.toolbar.so-bar .dr .dr-sel {
  height: 28px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 4px; font-size: 12px; background: #fff; color: var(--c-text);
}
.toolbar.so-bar .dr { gap: 4px; }
.toolbar.so-bar .dr .dr-d { width: 112px; height: 28px; font-size: 11.5px; padding: 0 4px; }
.toolbar.so-bar .combo.rf-combo { width: 132px; }
.toolbar.so-bar .combo-in { height: 28px; font-size: 12px; }

/* ★★★第417轮（老板点名：从订单选单要能按日期/客户/货号/颜色筛）：
   弹窗里这条筛选条是 flex 换行排的，日期那两个框会被压缩成「yyyy/mm/日」——
   给它们定死宽度、不许收缩。 */
#rpBar .dr { flex: 0 0 auto; }
#rpBar .dr .dr-d { width: 132px; }
#rpBar input[type="text"] {
  height: 32px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 8px; font-size: 12.5px; font-family: inherit; color: var(--c-text); background: #fff;
}

/* ---------- 按钮 ---------- */
/* ★★第一百零五轮（老板点名「这里都是待领料的单，恢复领料按钮摆这儿干啥」）：
   `.btn { display:inline-flex }` 这种规则会盖掉浏览器默认的 `[hidden]{display:none}`，
   于是「明明写了 hidden，按钮还杵在那儿」。这里统一兜底：hidden 就该真的看不见。
   ★ 以后再给带 hidden 的元素写 display:flex/inline-flex，不用再单独补一条 [hidden]。 */
[hidden] { display: none !important; }
.btn {
  height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--c-border);
  background: #fff; color: var(--c-text); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn:hover { border-color: #c3cbd8; background: #fafbfd; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-danger { color: var(--c-danger); }
.btn-danger:hover { background: #fdf1f0; border-color: #f0c4c0; }
.btn-sm { height: 27px; padding: 0 9px; font-size: 12.5px; }
.btn-link { border: none; background: none; color: var(--c-primary); padding: 0 5px; height: 24px; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
/* ★第233轮：`.btn-link` 原来没有禁用态（BOM 已审核时「⇩ 从别的货号提料」要压灰） */
.btn-link[disabled] { opacity: .45; cursor: not-allowed; text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 100%; }
table.grid th, table.grid td { padding: 6px 9px; border-bottom: 1px solid #eef1f6; text-align: left; white-space: nowrap; }
table.grid thead th {
  background: #f7f9fc; color: var(--c-text-2); font-weight: 600; font-size: 12.5px;
  position: sticky; top: 0; z-index: 1;
}
table.grid tbody tr:hover { background: #f6f9ff; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* ★★★第349轮（老板）：数量/合计列原来左右各 9px 内边距，40px 的格子只剩 22px 放字，
   填 4 位数就被撑宽。收到 2px 之后可用 36px —— 4~6 位（含千分位）都能放下，不用固定列宽、不用省略。 */
table.grid td.num, table.grid th.num { padding-left: 2px; padding-right: 2px; }
.empty { padding: 36px 16px; text-align: center; color: var(--c-muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; line-height: 17px; }
.tag-on { background: #e7f6ec; color: var(--c-ok); }
.tag-off { background: #f1f3f7; color: var(--c-muted); }
.tag-warn { background: #fdf3e3; color: var(--c-warn); }       /* 提醒用：还没扣库存 / 已取消 */
.tag-info { background: #eaf1fe; color: #2a5db0; }             /* 说明用：来源、保存即生效 */

/* ---------- 单据列表按状态配色（第十七轮：草稿 / 已审核 / 已取消 一眼分得开） ----------
 *   ※ 类名跟 rowCls() 完全对齐（status.toUpperCase()），CSS 类名是分大小写的，别写成小写
 */
table.grid tbody tr.st-DRAFT > td { background: #fffcf5; }
table.grid tbody tr.st-DRAFT > td:first-child { box-shadow: inset 3px 0 0 #e8b25a; }
table.grid tbody tr.st-AUDITED > td { background: #f4fbf6; }
table.grid tbody tr.st-AUDITED > td:first-child { box-shadow: inset 3px 0 0 #52b57c; }
table.grid tbody tr.st-CANCELLED > td { background: #fbf4f4; color: #9aa2ad; }
table.grid tbody tr.st-CANCELLED > td:first-child { box-shadow: inset 3px 0 0 #cf9a97; }
table.grid tbody tr.st-DRAFT:hover > td { background: #fff7e8; }
table.grid tbody tr.st-AUDITED:hover > td { background: #ecf7f0; }
table.grid tbody tr.st-CANCELLED:hover > td { background: #f7eeee; }
/* 已排产 / 已领料的行或格子：灰着不给改（不是禁用，是提示这里动不了了） */
.locked, .locked input { background: #f3f4f7 !important; color: #8d95a2 !important; }
.tag-lock { background: #eef0f4; color: #7b8494; margin-left: 4px; }
.bulkcol { width: 34px; text-align: center !important; padding-left: 4px !important; padding-right: 4px !important; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #f2f7ff; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.bulkbar b { color: #2a5db0; }

/* ---------- 表单弹窗：按字段自身宽度自动并排（紧凑） ---------- */
.mask { position: fixed; inset: 0; background: rgba(18,26,42,0.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 980px; box-shadow: 0 20px 60px rgba(10,20,40,.3); }
.modal-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--c-border); }
.modal-head h3 { margin: 0; font-size: 15px; flex: 1; }
.modal-body { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 13px; align-items: flex-start; }
.modal-body .field { flex: 0 1 var(--fw, 200px); width: var(--fw, 200px); min-width: 92px; max-width: 100%; }
.modal-body .field.full { flex: 0 0 100%; width: 100%; }
.field label { display: block; font-size: 12px; color: var(--c-text-2); margin-bottom: 4px; line-height: 1.35; }
.field label .req { color: var(--c-danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 32px; padding: 5px 9px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fbfcfe; outline: none;
}
.field textarea { min-height: 62px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary); background: #fff; }
.field .help { font-size: 11px; color: var(--c-muted); margin-top: 3px; line-height: 1.4; }
.field .chk { display: flex; align-items: center; gap: 7px; height: 32px; }
.field .chk input { width: auto; min-height: auto; }
.field .readonly-tip { font-size: 11px; color: var(--c-muted); margin-top: 3px; }
.multi-box { display: flex; flex-wrap: wrap; gap: 5px; border: 1px solid var(--c-border); border-radius: 6px; padding: 7px; background: #fbfcfe; max-height: 132px; overflow-y: auto; }
.multi-box label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 9px; border: 1px solid var(--c-border); border-radius: 14px; background: #fff; cursor: pointer; }
.multi-box label.on { border-color: var(--c-primary); background: #eef4ff; color: var(--c-primary-dark); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--c-border); }
/* ★第266轮：材料档案「连建模式」—— 弹窗底部左侧的提示 / 红字报错（不压按钮） */
.modal-foot .form-msg { margin-right: auto; font-size: 12.5px; color: var(--c-text-2); align-self: center; line-height: 1.5; }
.modal-foot .form-msg.ok { color: #2e7d32; }
.modal-foot .form-msg.err { color: #c0392b; }

/* ---------- 即时筛选搜索框（列表页 / 查询页统一用它，输进去就筛） ---------- */
.searchbox { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.searchbox > input {
  min-height: 32px; padding: 5px 30px 5px 10px; max-width: 100%;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe;
  outline: none; color: var(--c-text);
}
.searchbox > input:focus { border-color: var(--c-primary); background: #fff; }
.searchbox .sb-clr {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; line-height: 1; border: none; border-radius: 50%;
  background: transparent; color: var(--c-muted); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.searchbox .sb-clr:hover { color: var(--c-danger); background: #f2f4f8; }
.searchbox .sb-clr[hidden] { display: none; }

/* ---------- 列表上方的下拉筛选（材料档案：按分类 / 按供应商） ---------- */
select.lf-sel {
  min-height: 32px; padding: 4px 8px; border: 1px solid var(--c-border); border-radius: 6px;
  background: #fbfcfe; color: var(--c-text); font-size: 12.5px; max-width: 190px;
}
select.lf-sel:focus { border-color: var(--c-primary); background: #fff; }

/* ---------- 可搜索下拉（材料 / 供应商 / 货号 / 部位…） ---------- */
.combo { position: relative; display: block; width: 100%; min-width: 0; }
/* ★第四十三轮：材料库存表工具条上那个「输货号查 BOM 材料」的下拉，固定跟旁边的搜索框一样宽 */
.sk-style { width: 250px; flex: 0 0 250px; }
.combo > .combo-in {
  width: 100%; min-height: 32px; padding: 5px 52px 5px 9px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe;
  outline: none; color: var(--c-text); text-overflow: ellipsis;
}
.combo > .combo-in:focus { border-color: var(--c-primary); background: #fff; }
.combo-tri {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--c-muted); cursor: pointer; padding: 0;
  user-select: none; line-height: 1; border-radius: 50%;
}
.combo-tri:active { background: #eef2f8; color: var(--c-primary); }
.combo-tri:hover { color: var(--c-primary); }
/* ★第七十轮：清空「×」和展开「▾」都做大一点、分开一点 ——
   手机上原来两个按钮挤在右边 4~22px，只有十几像素宽，很容易点到旁边去 */
.combo-clr {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: #aab2c0; font-size: 16px;
  line-height: 1; cursor: pointer; padding: 0; border-radius: 50%;
}
.combo-clr:active { background: #eef2f8; color: var(--c-danger); }
/* ★第七十轮的大坑：上面给它写了 display:flex，把 hidden 属性自带的 display:none **盖掉了** ——
   结果输入框空着的时候「×」也一直露着，点了当然没东西可清（老板说的就是这一下）。
   这条必须留着：有 hidden 就真的不显示。 */
.combo-clr[hidden] { display: none; }
.combo-clr:hover { color: var(--c-danger); }
/* 弹层用 fixed：表格横向滚动区不会把它裁掉 */
.combo-pop {
  position: fixed; z-index: 400; min-width: 230px; max-height: 268px; overflow-y: auto;
  background: #fff; border: 1px solid var(--c-border); border-radius: 7px;
  box-shadow: 0 12px 32px rgba(15, 25, 45, .18); padding: 3px;
}
.combo-item {
  padding: 5px 8px; border-radius: 5px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; line-height: 1.45;
  white-space: nowrap; overflow: hidden;           /* 每条只占一行，不再竖着撑高 */
}
.combo-item b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-item span { font-size: 11.5px; color: var(--c-muted); white-space: nowrap; flex: 0 0 auto; }
.combo-item.on, .combo-item:hover { background: #eef4ff; }
.combo-item.on b { color: var(--c-primary-dark); font-weight: 600; }
.combo-none { padding: 9px 10px; font-size: 12.5px; color: var(--c-muted); }

/* ---------- 图片字段（货号鞋样图）：传一张、看一眼 ---------- */
.imgf { display: flex; flex-direction: column; gap: 4px; }
.imgf-box {
  height: 84px; border: 1px dashed var(--c-border); border-radius: 6px; background: #fbfcfe;
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in;
}
.imgf-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.imgf-none { font-size: 11.5px; color: var(--c-muted); }
.imgf-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* ★★★第407轮（老板）：材料图那两格有「选择图片 / 引用… / 清除」三颗按钮 + 借用提示，
   按默认 200px 会压成一列字 —— 固定 240px，且不许被同行的字段挤小 */
.modal-body .field.field-img { flex: 0 0 240px; width: 240px; }
/* ★★★第407轮：材料图那格多一颗「引用…」，窄的时候让按钮自己换行，别挤成竖排字 */
.imgf-btns .btn-link { white-space: nowrap; }
.imgf-btns .btn-sm { flex: 1 1 auto; }
.imgf-btns .btn-link[hidden] { display: none; }

/* 缩略图（货号清单 / 订单行 / BOM 编辑页）；点一下看大图 */
table.grid td.thumbcell { padding: 2px 4px; text-align: center; }
.thumb {
  width: 40px; height: 40px; object-fit: cover; border-radius: 5px;
  border: 1px solid var(--c-border); background: #fff; cursor: zoom-in; display: inline-block; vertical-align: middle;
}
.thumb-lg { width: 46px; height: 46px; }
.imgbig {
  position: fixed; inset: 0; z-index: 500; background: rgba(12, 18, 30, .72);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.imgbig img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); background: #fff; }

/* ---------- 多选（颜色 / 角色…）：紧凑、可搜、点一下就勾 ---------- */
.mref { position: relative; }
.mref-sel {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  min-height: 30px; padding: 4px 6px; background: #fff;
  border: 1px solid var(--c-border); border-bottom: none; border-radius: 6px 6px 0 0;
}
.mref-ph { font-size: 12px; color: var(--c-muted); }
.mref-chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px 1px 9px;
  border-radius: 12px; font-size: 12.5px;
  background: #eef4ff; color: var(--c-primary-dark); border: 1px solid #cfe0ff;
}
.mref-chip i { font-style: normal; cursor: pointer; color: #7d90b3; font-size: 14px; line-height: 1; padding: 0 3px; }
.mref-chip i:hover { color: var(--c-danger); }
.mref > .mref-in {
  width: 100%; min-height: 30px; padding: 4px 9px; outline: none;
  border: 1px solid var(--c-border); border-radius: 0 0 6px 6px; background: #fbfcfe;
}
.mref.open > .mref-in { border-color: var(--c-primary); background: #fff; }
.mref-pop {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin-top: 2px; padding: 5px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 7px;
  box-shadow: 0 12px 30px rgba(15, 25, 45, .16);
}
.mref-tools { display: flex; align-items: center; gap: 6px; padding: 2px 4px 4px; font-size: 11.5px; color: var(--c-muted); }
.mref-tools .grow { flex: 1; }
.mref-grid { display: flex; flex-wrap: wrap; gap: 4px; max-height: 176px; overflow: auto; }
.mref-opt {
  border: 1px solid var(--c-border); background: #fff; border-radius: 12px;
  padding: 2px 10px; font-size: 12.5px; cursor: pointer; color: var(--c-text);
}
.mref-opt:hover { border-color: #c3cbd8; background: #fafbfd; }
.mref-opt.on { border-color: var(--c-primary); background: #eef4ff; color: var(--c-primary-dark); font-weight: 600; }

/* 下拉里的缩略图 + 「上一行」置顶那条 */
.combo-item .ci-img {
  width: 26px; height: 26px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--c-border); background: #fff; flex: 0 0 auto;
}
.combo-item .ci-pin {
  font-size: 11px; color: var(--c-primary); background: #eef4ff;
  border-radius: 9px; padding: 0 7px; flex: 0 0 auto;
}
.combo-item.pinned { background: linear-gradient(90deg, #f2f7ff, #fff); }
.combo-item.pinned.on { background: #e6efff; }
.combo-item.pinned b { font-weight: 600; }

/* ---------- 导入弹窗 ---------- */
.file-drop {
  border: 1px dashed var(--c-border); border-radius: 8px; padding: 16px; text-align: center;
  color: var(--c-text-2); background: #fbfcfe; cursor: pointer; font-size: 13px;
}
.file-drop:hover, .file-drop.on { border-color: var(--c-primary); background: #f4f8ff; color: var(--c-primary-dark); }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.imp-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; padding: 10px 12px; border-radius: 6px; background: #f7f9fc; }
.imp-sum b { font-variant-numeric: tabular-nums; }
.imp-sum .ok { color: var(--c-ok); }
.imp-sum .bad { color: var(--c-danger); }
.err-list { max-height: 190px; overflow: auto; background: #fdf6f5; border: 1px solid #f2d6d2; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; color: #8a2a20; white-space: pre-wrap; line-height: 1.7; }
/* ★第三十七轮：导入结果表那块（哪几行没进、为什么 —— 就在你自己那张 Excel 上） */
.imp-file { font-size: 12.5px; color: var(--c-text-2); line-height: 1.75; padding: 10px 12px; border-radius: 6px; background: #f7f9fc; border: 1px solid var(--c-border); }
.imp-file b { color: var(--c-text); }
.imp-file.bad { background: #fdf6f5; border-color: #f2d6d2; color: #8a2a20; }
.imp-file.bad b { color: var(--c-danger); }
.paste-box { width: 100%; min-height: 96px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.tip-line { font-size: 12px; color: var(--c-text-2); line-height: 1.75; }

/* ---------- 产品工艺 BOM（单据式 / 矩阵式） ---------- */
.bom-hint { padding: 8px 12px; font-size: 12px; color: var(--c-text-2); background: #f7f9fc; border-bottom: 1px solid var(--c-border); line-height: 1.6; }

/* ★★★第428轮（老板）：款式工序 —— 「暂时忽略」的货号灰掉、排最后；筛选条上的小下拉 */
.style-list tr.sc-skiprow td { opacity: .5; }
.style-list tr.sc-skiprow td b { font-weight: 400; }
/* ★★★第428轮：款式工序二级页 —— 表内直接填（像 BOM 资料），空行淡一点 */
.scd-grid .scd-in {
  width: 100%; height: 28px; border: 1px solid var(--c-border); border-radius: 5px;
  padding: 0 6px; font-size: 12.5px; font-family: inherit; background: #fff; color: var(--c-text);
}
.scd-grid .scd-in.num { text-align: right; }
.scd-grid tr.scd-blank td { background: #fcfdff; }

.toolbar .sc-sel {
  height: 30px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 6px; font-size: 12.5px; background: #fff; color: var(--c-text); font-family: inherit;
}
/* ★★★第233轮（老板点名）：提示行右侧常驻一颗「⇩ 从别的货号提料」。
   · 做成 flex 容器 + 兄弟元素：`#bomHint` 的 innerHTML 会被三种情况整段重写，按钮塞进去会被冲掉
   · 背景/下边线挪到容器上，`.bom-hint` 自己去掉，避免出现两层灰底和两条线 */
.bom-hint-row { display: flex; align-items: flex-start; background: #f7f9fc; border-bottom: 1px solid var(--c-border); }
.bom-hint-row .bom-hint { flex: 1 1 auto; min-width: 0; background: none; border-bottom: none; }
.bom-hint-row #bomPull { flex: 0 0 auto; margin: 7px 10px 0 0; font-size: 12px; white-space: nowrap; }
.bom-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-top: 1px solid var(--c-border);
  font-size: 12.5px; color: var(--c-text-2); background: #fbfcfe;
}
.bom-foot .grow { flex: 1; }
.bom-foot .sep { width: 1px; height: 16px; background: var(--c-border); }
.bom-foot b { color: var(--c-text); }

/* 货号清单（产品工艺 BOM 的入口）：一行一个货号，双击那一行进编辑界面 */
table.grid.style-list tbody tr { cursor: pointer; }
table.grid.style-list tbody tr:hover { background: #eaf2ff; }
table.grid.style-list tbody tr td:first-child { font-weight: 600; }
table.grid.style-list tbody tr td { vertical-align: middle; }

/* 视图切换 */
.seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 6px; overflow: hidden; height: 32px; }
.seg button {
  border: none; background: #fff; color: var(--c-text-2); cursor: pointer;
  padding: 0 12px; height: 32px; border-right: 1px solid var(--c-border);
}
.seg button:last-child { border-right: none; }
.seg button:hover { background: #f4f7fc; }
.seg button.on { background: var(--c-primary); color: #fff; }

/* 表格本体：紧凑、可编辑 */
.bom-sheet { font-size: 12.5px; }
.bom-sheet th { white-space: nowrap; padding: 7px 8px; }
.bom-sheet td { padding: 3px 5px; vertical-align: middle; }
.bom-sheet tbody tr:hover { background: #f6f9ff; }
.bom-sheet tr.bom-block-start td { border-top: 2px solid #c6d2e4; }
.bom-sheet .bom-merge {
  text-align: center; font-weight: 600; color: var(--c-text);
  background: #f4f7fc; border-right: 1px solid var(--c-border);
  vertical-align: middle; white-space: nowrap;
}
.bom-sheet .bom-color { color: var(--c-primary-dark); }
/* ★第265轮：每个颜色段自带一颗「＋行」（点一下就在这个颜色末尾加一条空行，不弹窗） */
.bom-sheet .bom-color .bom-addrow { display: block; margin-top: 4px; font-size: 12px; }
.bom-sheet .bom-ro { color: var(--c-text-2); white-space: nowrap; padding-left: 8px; }
.bom-sheet .bom-amount { color: var(--c-primary-dark); font-weight: 600; }

/* ★★★第263轮（老板点名）：编辑页每个颜色预留 6 行，材料还没选的 = 预留空行 → 灰底。
   ★ 跟新建页的 .bn-sheet tr.bn-ghost（下面第 447 行那三条）同观感，但**不复用**那个类名：
     新建页的选择器一个字都不动，两个页面互不影响。
   ★ 只给行里的控件上底色，不给 td 上底色 —— 否则会盖掉 tbody tr:hover 的浅蓝。 */
.bom-sheet tr.bom-ghost .bom-in { background: #f7f8fb; color: #9aa3b0; }
.bom-sheet tr.bom-ghost .combo > .combo-in { background: #f7f8fb; color: #9aa3b0; }
.bom-sheet tr.bom-ghost .bom-ro { color: #b6bdc9; }
.bom-sheet tr.bom-ghost .bom-x { color: #c8ced8; }

/* 表格里的输入框：小一号，省地方 */
.bom-in {
  width: 100%; min-width: 0; height: 26px; padding: 1px 5px;
  border: 1px solid var(--c-border); border-radius: 5px; background: #fbfcfe;
  font-size: 12.5px; color: var(--c-text); outline: none;
}
.bom-in:focus { border-color: var(--c-primary); background: #fff; }
.bom-in.num { text-align: right; font-variant-numeric: tabular-nums; }
.bom-in.num::-webkit-outer-spin-button, .bom-in.num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bom-in.num { -moz-appearance: textfield; appearance: textfield; }
select.bom-in { padding: 0 2px; }
/* 单据式里的可搜索下拉：跟表格里别的框一样小一号 */
.bom-sheet .combo > .combo-in { min-height: 26px; height: 26px; padding: 1px 30px 1px 5px; font-size: 12.5px; }
.bom-sheet .combo-tri { right: 14px; font-size: 10px; }
.bom-sheet .combo-clr { right: 2px; font-size: 13px; }
.bom-sheet .combo { min-width: 132px; }

.bom-x {
  width: 22px; height: 22px; line-height: 1; padding: 0;
  border: 1px solid transparent; border-radius: 5px; background: none;
  color: var(--c-muted); font-size: 16px; cursor: pointer;
}
.bom-x:hover { color: var(--c-danger); border-color: #f2c9c5; background: #fdf3f2; }

/* ---------- 新建货号（含 BOM 单）：表头 + 预留行 ---------- */
.bn-head {
  padding: 13px 16px 14px; display: flex; flex-wrap: wrap; gap: 10px 13px;
  align-items: flex-start; border-bottom: 1px solid var(--c-border);
}
.bn-head .field { flex: 0 1 var(--fw, 200px); width: var(--fw, 200px); min-width: 92px; max-width: 100%; }
.bn-head .field.full { flex: 0 0 100%; width: 100%; }
/* 货号那个大格子：上面「复制上一色」，中间货号，下面「填充到下一色」 */
.bn-sheet .bn-codecell { white-space: normal; padding: 8px 6px; }
.bn-sheet .bn-codecell .bn-code {
  margin: 8px 0; font-size: 13px; font-weight: 700; color: var(--c-text);
  word-break: break-all; line-height: 1.35;
}
.bn-sheet .bn-codecell .btn {
  display: block; width: 100%; padding: 3px 6px; font-size: 12px; line-height: 1.3;
}
.bn-sheet .bn-codecell .btn:disabled { opacity: .45; cursor: not-allowed; }
.bn-sheet .bn-addrow { display: block; margin-top: 4px; font-size: 12px; }
/* 预留空行（材料型号没填）淡一点，一眼能看出「这行还没用」 */
.bn-sheet tr.bn-ghost .bom-in { background: #f7f8fb; color: #9aa3b0; }
.bn-sheet tr.bn-ghost .bom-ro { color: #b6bdc9; }
.bn-sheet tr.bn-ghost .combo > .combo-in { background: #f7f8fb; color: #9aa3b0; }

@media (max-width: 900px) {
  .bom-sheet { font-size: 12px; }
  .bom-in { height: 30px; font-size: 12.5px; }
}

/* ---------- 看板 ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12.5px; color: var(--c-text-2); }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--c-primary-dark); }
.notice { background: #fff8e8; border: 1px solid #f2dcae; color: #7a5300; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; }

/* ---------- 权限矩阵 ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.perm-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; border: 1px solid var(--c-border); border-radius: 6px; background: #fff; }
.perm-item.on { border-color: var(--c-primary); background: #eef4ff; }

/* ---------- ★第四十五轮：角色与权限「模块 × 四档」 ---------- */
/* 不用铺满整行 —— 四档挤在一起才好一眼扫完（铺满会把格子拉得老远） */
table.grid.perm-tbl { width: auto; min-width: 640px; }
table.grid.perm-tbl th, table.grid.perm-tbl td { font-size: 13px; }
table.grid.perm-tbl tbody td:first-child { font-weight: 500; }
td.perm-ckcell, th.perm-ckcell { text-align: center; }
label.perm-ck { display: inline-flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; }
label.perm-ck input { width: 16px; height: 16px; cursor: pointer; }

/* ---------- ★第四十八轮：查询款式图片（手机上查货号看鞋样图） ---------- */
.si-pick { max-width: 440px; }
.si-box { margin-top: 14px; }
.si-hint { color: var(--c-text-2); font-size: 13.5px; padding: 22px 4px; text-align: center; }
.si-info { font-size: 14px; margin-bottom: 8px; line-height: 1.9; }
/* 货号用蓝色（跟订单图片里那个货号一个色） */
.si-info .si-code { color: #1677ff; font-size: 17px; }
.si-info .si-dot { color: var(--c-muted); font-style: normal; margin: 0 6px; }
.si-cols { margin-bottom: 12px; }
.si-col {
  display: inline-block; font-size: 12.5px; color: var(--c-text-2); background: #f1f4f9;
  border: 1px solid var(--c-border); border-radius: 10px; padding: 2px 9px; margin: 0 6px 6px 0;
}
/* 手机上一张一行；电脑上两张并排 */
.si-imgs { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .si-imgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.si-img { position: relative; }
.si-img img {
  display: block; width: 100%; max-width: 620px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 10px; cursor: zoom-in;
}
.si-tag {
  position: absolute; left: 10px; top: 10px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, 0.45); border-radius: 10px; padding: 2px 9px;
}
.si-tip { font-size: 12.5px; color: var(--c-text-2); margin-top: 10px; }
.si-none {
  color: var(--c-warn); font-size: 13.5px; line-height: 1.8; background: #fffbf0;
  border: 1px solid #f0e2c0; border-radius: 8px; padding: 12px 14px;
}
.si-none span { color: var(--c-text-2); }
@media (max-width: 820px) { .si-pick { max-width: none; } }

/* ---------- ★第四十九轮：款式细节备忘（一句备注 + 一张细节图，最多 3 条） ---------- */
.si-memo {
  margin-top: 18px; padding: 12px 14px 14px;
  border: 1px solid var(--c-border); border-radius: 10px; background: #fbfcfe;
}
.si-memo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-memo-head b { font-size: 14px; }
.si-memo-cnt { font-size: 12px; color: var(--c-text-2); background: #eef2f8; border-radius: 10px; padding: 1px 8px; }
.si-memo-cnt.full { color: #b3261e; background: #fdeceb; }
.si-memo-ro { font-size: 12px; color: var(--c-muted); }
.si-memo-empty { font-size: 13px; color: var(--c-text-2); padding: 12px 2px 2px; }
.si-memo-list { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.si-memo-item {
  display: flex; gap: 9px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 8px; padding: 9px 11px;
}
.si-memo-no {
  flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center;
  font-size: 12px; color: #fff; background: #9db4d6; border-radius: 50%;
}
.si-memo-main { min-width: 0; flex: 1; }
.si-memo-txt { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
/* 细节图故意画得小（老板要求「显示小一点，点开看大图」） */
.si-memo-img {
  display: block; width: 108px; height: 108px; object-fit: cover; margin-top: 7px;
  border: 1px solid var(--c-border); border-radius: 8px; cursor: zoom-in; background: #fff;
}
.si-memo-meta { font-size: 11.5px; color: var(--c-muted); margin-top: 6px; display: flex; align-items: center; }
.si-memo-meta .si-dot { margin: 0 5px; }
.si-memo-del { margin-left: auto; font-size: 12px; color: #b3261e; }
/* 点「＋ 增加记录」展开的那一行 */
.si-memo-new {
  margin-top: 10px; background: #fff;
  border: 1px dashed var(--c-primary); border-radius: 8px; padding: 10px 11px;
}
.si-memo-new textarea {
  width: 100%; box-sizing: border-box; min-height: 62px; font-size: 13.5px; line-height: 1.7;
  border: 1px solid var(--c-border); border-radius: 6px; padding: 7px 9px; outline: none;
  font-family: inherit; color: var(--c-text); resize: vertical;
}
.si-memo-new textarea:focus { border-color: var(--c-primary); }
.si-memo-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.si-memo-thumb { display: inline-flex; align-items: center; gap: 5px; }
.si-memo-thumb img { width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--c-border); border-radius: 6px; }
.si-memo-up { font-size: 12px; color: var(--c-text-2); }
.si-memo-hint { font-size: 11.5px; color: var(--c-text-2); margin-top: 7px; line-height: 1.6; }
@media (max-width: 820px) {
  .si-memo { padding: 11px 12px 13px; }
  .si-memo-bar .btn { flex: 1 1 auto; }     /* 手机上按钮一指头能戳到 */
  .si-memo-img { width: 96px; height: 96px; }
}

/* ---------- ★第五十一轮：款式备注总表（挂在基础档案下面） ---------- */
.sm-hint-inline { font-size: 12px; color: var(--c-text-2); }
table.grid.smemo-tbl td { vertical-align: middle; }
table.grid.smemo-tbl tbody tr { cursor: pointer; }
table.grid.smemo-tbl tbody tr:hover { background: #f6f9ff; }
.smemo-code { color: #1677ff; }
.smemo-tbl .ell { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.smemo-tbl .smemo-who { font-size: 11.5px; color: var(--c-text-2); line-height: 1.5; }
.smemo-tbl .smemo-who span { color: var(--c-muted); }
/* 一条备忘是文字 / 图片 / 又写又拍 —— 界面上直接标出来 */
.si-memo-kind {
  display: inline-block; font-size: 10.5px; color: #4a6fa5; background: #eef3fb;
  border-radius: 4px; padding: 0 5px; margin-right: 6px;
}
/* 总表点一行弹出来的那个详情 */
.smemo-modal { max-width: 720px; }
.smd-top { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.smd-img {
  width: 108px; height: 108px; object-fit: cover; background: #fff;
  border: 1px solid var(--c-border); border-radius: 8px; cursor: zoom-in;
}
.smd-noimg { font-size: 12.5px; color: var(--c-warn); }
.smd-cnt { font-size: 12.5px; color: var(--c-text-2); margin-bottom: 10px; }
.smd-tip { font-size: 11.5px; color: var(--c-muted); }

/* ---------- 提示 / 加载 ---------- */
.toast-host { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #24304a; color: #fff; padding: 9px 16px; border-radius: 6px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: #b3261e; }
.toast.ok { background: #1a7f45; }
.toast.warn { background: #a8730f; }
.loading { padding: 36px; text-align: center; color: var(--c-muted); }

/* ---------- 手机 ---------- */
.menu-btn { display: none; }
@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; z-index: 120;
    transform: translateX(-100%); transition: transform .22s ease; width: 250px; flex-basis: 250px;
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .backdrop { position: fixed; inset: 0; background: rgba(15,22,38,.45); z-index: 110; }
  .content { padding: 10px; }
  .modal { max-width: 100%; }
  /* 手机上输入框一律占满一行，避免太窄难按 */
  .modal-body .field { flex: 1 1 100%; width: 100%; }
  .mask { padding: 10px; }
  table.grid th, table.grid td { padding: 7px 8px; }
  .topbar .who { display: none; }
  /* ★第四十八轮：手机顶栏本来就挤满了，标题被压成一条缝（只剩 0 宽）。
     版本号（版本 xxxxxxxx）是给自己看的诊断信息，让位给标题；
     真需要看版本就在电脑上看 —— 手机这边「系统已更新，点一下刷新」那条提示照旧会弹。 */
  .topbar .buildno { display: none; }
}

/* ---------- 单据表格（销售订单配码 / 排单 / 领料）：格子挨紧一点 ---------- */
/* ★★★第211轮（老板点名）：单据明细表**不再被容器压扁**。
   老的 `table.grid{width:100%}` 会把整表硬塞进容器，于是「没有 min-width 的列」
   （货号 / 鞋型 / 颜色 / 单价…）全被一起压缩 —— 加了 6 列之后货号只剩 71px，
   输进去的货号根本看不见。
   改成 `width:auto` + `min-width:100%`：表格最小宽度 = 各列 min-width 之和，
   超宽就交给外层 `.table-wrap{overflow-x:auto}` 横向滚动（老板要的就是这个）。
   ★ 各列的 min-width 写在表头行内（跟 width 同值），没写 min-width 的列才会被压。 */
/*   ★ 只对「这一轮加过列的 4 张明细表」生效（销售订单 / 排单 / 成品入库 / 发货），
     其他单据表保持原来的 width:100% 压缩行为，免得老板觉得「以前一屏能看全，现在要滚」。 */
table.grid.docgrid.so-tbl,
table.grid.docgrid.pl-tbl,
table.grid.docgrid.fi-tbl,
table.grid.docgrid.ship-tbl {
  /* ★第352轮：原来是 width:auto（为了不被压扁）。但 auto 会让 fixed 失效，
     8888 又能把列撑开 —— 改成 100% + 兜底 min-width，列宽由表头说了算。 */
  width: 100%; min-width: 1200px;
}
table.grid.docgrid th { padding: 6px 5px; }
table.grid.docgrid td { padding: 2px 4px; }
/* ★ 第十九轮：尺码格子收窄到差不多原来一半（老板要求），省下的宽度给货号 / 备注 */
table.grid.docgrid th.szcol {
  text-align: center; padding: 6px 0; width: 30px; min-width: 30px; font-size: 11.5px;
}
table.grid.docgrid td.szcell { padding: 1px 0; text-align: center; }
table.grid.docgrid td.szcell input.szin {
  width: 28px; min-width: 0; max-width: 30px; height: 24px; padding: 0 1px;
  text-align: center; border-radius: 4px; font-size: 12px;
}
table.grid.docgrid td.szcell input.szin:focus { background: #fff; }
table.grid.docgrid td.szsel { background: #dce9ff; box-shadow: inset 0 0 0 1px var(--c-primary); }
/* 通用列（货号 / 颜色 / 件数 / 单价 / 备注）的框选 —— 跟尺码格同一个视觉 */
table.grid.docgrid td.gsel { background: #dce9ff; box-shadow: inset 0 0 0 1px var(--c-primary); }
table.grid.docgrid td.gsel .combo-in,
table.grid.docgrid td.gsel input,
table.grid.docgrid td.gsel select { background: transparent; }
/* 备注：拉长，装得下一整句 */
/* ★★★第352轮（老板第二次报「填 8888 会把列撑宽」）：
   只收窄 padding 不够 —— table-layout:auto 下浏览器永远按内容算宽度。
   单据明细表锁成 fixed：列宽完全由表头 th 的 width 决定，格子里的字再长也撑不开。
   超出部分靠缩字号解决（白名单页面），缩到底还不行就悬停看全文。 */
table.grid.docgrid {
  table-layout: fixed;
  /* ★ 关键：fixed 只有在表格有明确宽度时才生效（规范如此）。
     width:auto 时浏览器照样按内容算，列宽还是会被 8888 撑开 —— 实测验证过。 */
  width: 100%;
  min-width: 1200px;      /* 窄屏也不压缩，交给外层横向滚动 */
}
table.grid.docgrid td { overflow: hidden; }
table.grid.docgrid input, table.grid.docgrid select { max-width: 100%; }

/* ★★★第359轮（老板实测「销售订单保存后点修改，备注列没了」）：
   batch18 把单据表改成 table-layout:fixed 之后，列宽只认表头 th 的 width。
   备注列只有 min-width（fixed 布局不认），结果被其它列挤成 0 宽 —— 看着就是"整列消失"。
   这里给它一个**明确宽度**：fixed 下 width 才是硬约束。 */
table.grid.docgrid th.remcell,
table.grid.docgrid td.remcell { width: 320px; min-width: 320px; max-width: 320px; }
/* ★第360轮（老板）：销售订单的备注经常很长（硬头/内盒/特殊要求都写这儿），给它 480px。
   表格超宽就交给横向滑块，反正本来就要拖。 */
table.grid.docgrid.so-tbl th.remcell,
table.grid.docgrid.so-tbl td.remcell { width: 480px; min-width: 480px; max-width: 480px; }
table.grid.docgrid .remcell { min-width: 320px; }
table.grid.docgrid .remcell input { width: 100%; min-width: 0; }
/* 备注格里的「常用备注」下拉（第十九轮） */
.rcombo { position: relative; display: block; width: 100%; min-width: 0; }
.rcombo > .rem-in { width: 100%; padding-right: 20px; }
.rcombo > .combo-tri { right: 2px; }
.rcombo .combo-pop { left: 0; right: auto; min-width: 320px; max-width: 560px; max-height: 260px; }
.rcombo .combo-item { cursor: pointer; }
.rm-row .rm-in { min-width: 0; }

/* 档案列表的「勾选」列（第十九轮批量启用/停用/删除） */
table.grid th.pickcol, table.grid td.pickcol { width: 34px; text-align: center; padding: 4px 2px; }
table.grid th.pickcol input, table.grid td.pickcol input { margin: 0; cursor: pointer; }

/* 单据/排单这类「大操作界面」：铺满整个内容区，只留左边的菜单和上面的导航 */
.content.wide { padding: 0; }
.content.wide > .card { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
.content.wide > .card + .card { margin-top: 0 !important; border-top: 1px solid var(--c-border); }
.content.wide table.grid thead th { border-bottom: 1px solid var(--c-border); }

/* 全屏弹窗（选订单行 / 库存流水）：铺满除菜单外的整屏 */
.mask-full { padding: 0; align-items: stretch; }
.mask-full .modal {
  max-width: 100%; width: 100%; height: 100vh; border-radius: 0;
  display: flex; flex-direction: column; box-shadow: none;
}
.mask-full .modal .table-wrap { flex: 1; overflow: auto; }
.mask-full .modal-head { position: sticky; top: 0; background: #fff; z-index: 2; }
.mask-full .modal-foot { position: sticky; bottom: 0; background: #fff; z-index: 2; }

/* ============================================================
   ★第一百三十三 / 一百三十四轮（老板点名）：「选单排单」的勾选汇总
     133：从工具栏右上角挪到表格下方、放到 50px（太大，老板否了）
     134：**跟「取消 / 加进排单」放在同一行**，字号只比按钮字大一点点，
          不能把那一行撑高（按钮 32px 高，所以字号 ≤ 26px 都安全）。
   ============================================================ */
.pp-sum {
  display: flex;
  align-items: baseline;
  gap: 12px;
  /* ★★ 靠左靠的是这句：.modal-foot 是 justify-content:flex-end，
     margin-right:auto 才能把这个块顶到最左边、把按钮甩到右边。
     ★ 别指望 <div class="grow">——.grow 只在 .toolbar 等容器里有定义，这里不生效。 */
  margin-right: auto;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--c-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.pp-sum-main b { color: var(--c-primary); font-weight: 800; }
.pp-sum-warn { font-size: 13px; font-weight: 400; color: var(--c-warn); }

/* ============================================================
   ★第一百三十六轮（老板点名）：进货单 / 手机损溢单的「材料」框、
   供应商框 —— 名字一长就看不全。两件事一起做：
     ① 下拉弹层加宽（app.js 里 data-wide-px，这里不用管）
     ② 框里的字缩小到原来 80%，并且**按内容自动缩字**（JS 的 fitComboFont 兜底）
   ============================================================ */
.buy-grid .combo[data-name="material_id"] > .combo-in,
.buy-grid .combo[data-name="line_supplier_id"] > .combo-in { font-size: 80%; }

/* ============================================================
   ★第一百三十七轮（老板点名）：「材料库存到底是怎么来的？」
   材料流水浮层顶上那条账：期初 + 入库 − 领用 = 结存，一眼能对上。
   ============================================================ */
.tx-ledger {
  display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: baseline;
  padding: 10px 16px; background: #f5f8fd; border-bottom: 1px solid var(--c-border);
  font-size: 14px; color: var(--c-text-2);
}
.tx-ledger b { font-size: 19px; color: var(--c-text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.tx-ledger .pos b { color: #1a7f45; }
.tx-ledger .neg b { color: var(--c-danger); }
.tx-ledger .eq { margin-left: auto; font-size: 15px; color: var(--c-text); }
.tx-ledger .eq b { font-size: 24px; color: var(--c-primary); }

/* 二维库存流水表：尺码列窄、居中 */
table.grid.txn2d th.szcol, table.grid.txn2d td.szcol { text-align: center; padding: 4px 2px; width: 58px; }
table.grid.txn2d td.szcol.pos { color: #1a7f45; }
table.grid.txn2d td.szcol.neg { color: var(--c-danger); }
table.grid.txn2d tr.sum-row td { background: #f4f7fc; font-weight: 600; }
table.grid.txn2d .muted-cell { color: var(--c-muted); }

/* 单据表头里「下拉 + 小按钮」并排（比如客户 + 新建客户） */
.fld-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fld-row .combo { flex: 1 1 auto; min-width: 0; }
.fld-row .combo .combo-in { width: 100%; }

/* ============================================================
   第二十轮：报表中心 + 成品库存 + 手机开单 + 强制横屏
   老板原话：「这些汇总报表它的数据都是非常之多，你排版要紧密一点，非常紧密」
   —— 所以报表的表头 / 格子内边距压到 2px 5px、字号 12px，尺码列 30px 一格
   ============================================================ */
.rep-card { display: flex; flex-direction: column; }
.rep-title { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 8px 12px; border-bottom: 1px solid var(--c-border); font-weight: 700; font-size: 14.5px; }
.rep-title .grow { flex: 1; }
.rep-note { font-weight: 400; font-size: 12px; color: var(--c-text-2); }
.rep-bar { padding: 7px 10px; gap: 6px; }
.rep-bar .combo.rf-combo { width: 148px; display: inline-block; }
.rep-bar .combo.rf-combo > .combo-in { min-height: 30px; font-size: 12.5px; padding: 4px 38px 4px 8px; }
.rep-bar select.lf-sel { min-height: 30px; font-size: 12.5px; max-width: 152px; padding: 3px 6px; }
.rep-bar .dr .dr-d, .rep-bar .dr .dr-sel { min-height: 30px; font-size: 12.5px; }
/* ★第217轮（老板点名）：日期快捷组（前一天 / 后一天 / 近两天 / 近三天）——
   四颗连成一组，窄屏折行时也整组一起走，别拆成两半 */
.rep-bar .dr-qd { display: inline-flex; gap: 4px; }
.rep-bar .dr-qd .btn { height: 30px; padding: 0 8px; font-size: 12px; }
.rep-warn { padding: 7px 12px; background: #fdf3e3; color: var(--c-warn); font-size: 12.5px; border-bottom: 1px solid var(--c-border); line-height: 1.7; }
table.grid.rep-tbl th, table.grid.rep-tbl td { padding: 2px 5px; font-size: 12px; line-height: 1.55; }
table.grid.rep-tbl thead th { font-size: 11.5px; padding: 4px 5px; }
table.grid.rep-tbl th.szcol, table.grid.rep-tbl td.szcol { width: 30px; min-width: 30px; padding: 2px 2px; text-align: right; }
table.grid.rep-tbl .rep-zero { color: #c8cdd6; }
table.grid.rep-tbl tr.sum-row td, table.grid.rep-tbl tr.rep-total td { background: #eef4ff; font-weight: 700; }
table.grid.rep-tbl tr.rep-short > td { background: #fdf5f4; }
table.grid.rep-tbl td.rep-cfg { font-size: 11.5px; color: var(--c-text-2); }
table.grid.rep-tbl td.rep-dim { font-weight: 600; white-space: normal; }
table.grid.rep-tbl tr.rep-pivot, table.grid.rep-tbl tr.rep-row, table.grid.rep-tbl tr.rep-frow, table.grid.rep-tbl tr.rep-mat { cursor: pointer; }

/* ★第七十一轮（老板点名）：
   ① 销售订单总表 / 销售订单汇总表的「下单时间」和汇总表的「交货日」—— 字比正文小一号，
      等宽数字 + 不换行，16 个字符（2026-10-08 09:24）一行放得下；
   ② 「颜色」「鞋型」两列收窄，把宽度让给备注。 */
table.grid td.col-dt, table.grid th.col-dt {
  font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.grid.rep-tbl td.col-dt, table.grid.rep-tbl th.col-dt { font-size: 11px; }
table.grid.rep-tbl tr.rep-mat { cursor: pointer; }
.rep-dbl { font-size: 12px; color: var(--c-text-2); }
.pager { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--c-text-2); }
.pager b { color: var(--c-text); }
.pager button { height: 26px; padding: 0 8px; font-size: 12.5px; border: 1px solid var(--c-border); background: #fff; border-radius: 6px; cursor: pointer; }
.pager button:hover:not([disabled]) { border-color: #c3cbd8; background: #fafbfd; }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }

/* 成品库存调整弹窗里的尺码格 */
.fg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(66px, 1fr)); gap: 6px; }
/* ★★ 必须限定在 .fg-grid 里：配码表（第一百二十四轮）的 <td> 也叫 .fg-cell，
   不限定就给它套上 display:flex → 整个 <tr> 的格子竖着堆叠，一行能撑到 325px */
.fg-grid .fg-cell { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--c-text-2); }
.fg-grid .fg-cell input { min-height: 32px; text-align: center; padding: 3px 5px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; width: 100%; }
.fg-grid .fg-cell input:focus { border-color: var(--c-primary); background: #fff; }

/* ---------- 手机开订单：紧凑专用界面 ---------- */
.mob { max-width: 760px; margin: 0 auto; }
.mob-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--c-border); font-size: 13.5px; flex-wrap: wrap; }
.mob-head .grow { flex: 1; }
.mob-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; padding: 8px 10px; }
.mob-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--c-text-2); min-width: 0; }
.mob-fields label.w2 { grid-column: span 2; }
.mob-fields input, .mob-fields select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; width: 100%; font-size: 13px; }
.mob-fields input:focus, .mob-fields select:focus { border-color: var(--c-primary); background: #fff; }
.mob-tools { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); background: #f7f9fc; flex-wrap: wrap; }
.mob-tools .grow { flex: 1; }
.mob-tip { font-size: 11.5px; color: var(--c-text-2); }
.mob-items { padding: 8px; display: flex; flex-direction: column; gap: 8px; background: #f4f6fa; }
.mline { background: #fff; border: 1px solid var(--c-border); border-radius: 8px; padding: 7px 8px; }
.mline .ml-top { display: flex; align-items: center; gap: 6px; }
.mline .ml-no { flex: 0 0 20px; text-align: center; font-weight: 700; color: var(--c-text-2); font-size: 12px; }
.mline .thumbcell { flex: 0 0 auto; }
.mline .thumbcell img.thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; display: block; }
.mline .ml-style { flex: 1 1 130px; min-width: 96px; }
.mline .ml-color { flex: 0 0 90px; min-height: 30px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; padding: 3px 6px; font-size: 12.5px; }
.mline .ml-del { flex: 0 0 auto; font-size: 18px; padding: 0 5px; }
.mline .ml-sub { font-size: 11.5px; color: var(--c-text-2); margin: 3px 0 0 26px; }
.mline .ml-lock { font-size: 11.5px; color: var(--c-warn); margin: 4px 0 0 26px; }
.mline .ml-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 5px; margin-top: 6px; }
.mline .ml-sz { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--c-text-2); }
.mline .ml-sz input { width: 100%; min-height: 33px; text-align: center; padding: 3px 4px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-size: 13.5px; }
.mline .ml-sz input:focus { border-color: var(--c-primary); background: #fff; }
.mline .ml-nums { display: flex; align-items: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mline .ml-nums label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--c-text-2); width: 82px; }
.mline .ml-nums input { min-height: 33px; padding: 3px 7px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; width: 100%; font-size: 13.5px; text-align: right; }
.mline .ml-out { font-size: 12px; color: var(--c-text-2); padding-bottom: 8px; }
.mline .ml-out b { color: var(--c-text); }
.mline .ml-rem { margin-top: 6px; }
.mline .ml-rem input { width: 100%; min-height: 31px; padding: 3px 9px; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-size: 12.5px; }
.mob-save { display: flex; gap: 8px; padding: 9px 10px; border-top: 1px solid var(--c-border); justify-content: flex-end; position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
.mob + .bom-foot, .mob .bom-foot { flex-wrap: wrap; }
@media (max-width: 480px) { .mob-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .mob-fields { grid-template-columns: 1fr; } .mob-fields label.w2 { grid-column: span 1; } }

/* ---------- 强制横屏（orientation.lock 不给用时的兜底） ----------
 * 整页转 90°：手机横着拿的时候看起来就是正常的横屏
 * 数学：容器 local x → 屏幕 y、local y → 屏幕 −x；配 transform-origin:0 0
 *       + rotate(90deg) translateY(-100%)，正好铺满 100vw × 100vh
 */
html.land-rot, html.land-rot body { overflow: hidden; }
html.land-rot .layout {
  position: absolute; top: 0; left: 0;
  width: 100vh; height: 100vw; min-height: 0;
  display: flex; flex-direction: row;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: 0 0;
  overflow: auto;
  background: var(--c-bg);
}
html.land-rot .sidebar { position: static; height: auto; }
html.land-rot .topbar { position: static; }
html.land-rot .tabbar { position: static; }          /* ★第307轮：整页 rotate 的兜底模式里别 sticky */
html.land-rot .nav a.nav-home { position: static; }  /* ★第307轮：同上，这时 .nav 不滚，sticky 没有意义 */
html.land-rot .content { padding: 8px; }


/* ---------- 材料「调库存 / 清零」盘点弹窗（第二十一轮） ---------- */
/* ★ 第二十二轮：34~43 一排铺开、格子收紧（Excel 那种一横排输入） */
.adj-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.adj-cell { display: flex; flex-direction: column; gap: 2px; padding: 5px 6px; border: 1px solid var(--c-border); border-radius: 7px; background: #fbfcfe; }
.adj-cell .adj-sz { font-size: 12px; font-weight: 600; color: var(--c-text-2); line-height: 1.2; }
.adj-cell .adj-book { font-size: 11px; color: var(--c-muted); line-height: 1.2; white-space: nowrap; }
.adj-cell .adj-in { width: 100%; height: 27px; padding: 2px 5px; border: 1px solid var(--c-border); border-radius: 5px; font-size: 13px; background: #fff; text-align: center; }
.adj-cell .adj-in:focus { border-color: var(--c-primary); outline: none; }
.adj-cell .adj-in.adj-up { border-color: #1a7f45; background: #f2fbf6; color: #1a7f45; font-weight: 600; }
.adj-cell .adj-in.adj-down { border-color: var(--c-danger); background: #fdf4f3; color: var(--c-danger); font-weight: 600; }
.adj-foot { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: #f4f7fb; font-size: 13px; line-height: 1.7; }
@media (max-width: 900px) { .adj-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 480px) { .adj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 库存损溢单：详情里「账上 / 实盘 / 差异」三行 ---------- */
.sadj-blk { margin: 0 0 14px; border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; }
.sadj-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 10px; background: #f4f7fb; font-size: 13px; }
.sadj-head .tag { margin-left: 2px; }
.sadj-tbl { margin: 0; }
.sadj-tbl td, .sadj-tbl th { padding: 3px 6px; font-size: 12.5px; }
.sadj-lb { width: 76px; color: var(--c-text-2); font-size: 12px; }
.sadj-book td { background: #fafbfd; }
.sadj-check td { background: #fff; }
.sadj-diff td { background: #f7f9fc; }
.sadj-rmk { padding: 6px 10px; font-size: 12px; color: var(--c-text-2); border-top: 1px solid var(--c-border); }

/* ---------- ★第二十三轮：损溢单「流水账」列表（单头 rowspan 合并、详情行铺开） ---------- */
.sadj-ledger td, .sadj-ledger th { padding: 3px 6px; font-size: 12.5px; }
.sadj-ledger tbody tr.doc-first > td { border-top: 2px solid var(--c-border); }
.sadj-ledger tbody tr:not(.doc-first) > td { background: #fcfdff; }
.sadj-ledger tbody tr[data-adj] { cursor: pointer; }
.sadj-ledger tbody tr[data-adj]:hover > td { background: #f4f8ff; }
.sadj-ledger td[colspan], .sadj-ledger td[rowspan] { vertical-align: top; }
.sadj-ledger .bulkcol { width: 34px; }

/* ---------- ★第二十三轮：单据上的「经手人 / 业务员」= 窄框 + 默认登录人 ---------- */
.combo.narrow { max-width: 118px; min-width: 118px; }
.combo.narrow .combo-in { padding: 0 20px 0 7px; }
.fld-narrow { min-width: 148px; }
.fld-narrow > span { white-space: nowrap; }

/* ---------- ★第二十四轮：已「删除（归档）」的档案 / 冻结的历史明细行 ---------- */
.row-archived > td { background: #fafafa; color: var(--c-text-2); }
.row-archived > td:first-child { opacity: .9; }
/* ★★★第309轮（老板点名）：停用（没删）的行给个淡红底 —— 状态列在所有列最右边，
   老板平时看不到，加了底色不拖也能一眼认出「这行是停用的」。 */
.res-tbl tr.row-off > td { background: #fbf7f7; color: var(--c-text-2); }

/* ---------- ★第二十六轮：备注格末尾的「×」清空按钮 + 一格一按钮的紧凑排法 ---------- */
.cellx-wrap { display: flex; align-items: center; gap: 2px; }
.cellx-wrap .bom-in { flex: 1 1 auto; min-width: 0; }
.cell-x {
  flex: 0 0 auto; width: 18px; height: 18px; line-height: 1;
  border: 1px solid var(--c-border); border-radius: 4px; background: #fff;
  color: var(--c-text-2); font-size: 13px; cursor: pointer; padding: 0;
}
.cell-x:hover { color: var(--c-danger); border-color: var(--c-danger); background: #fff6f5; }
.rcombo .cell-x { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 2; }
.rcombo { position: relative; }
.rcombo .rem-in { padding-right: 40px; }

/* ---------- ★第二十七轮：报表里的超小货号图（点一下看大图，几乎不吃行高） ---------- */
img.thumb-xs {
  width: 18px; height: 18px; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--c-border); background: #fff; cursor: zoom-in;
  display: inline-block; vertical-align: middle;
}
table.grid td.thumbcell { padding: 1px 3px; line-height: 0; }
.rep-tbl td.thumbcell { width: 26px; }

/* ---------- ★第二十七轮：未发货订单算料表「现有库存 / 本次需要 / 发完剩余」三组 ---------- */
.rep-unship th.grp {
  border-left: 2px solid #cfd9e8; background: #f2f6fb; font-weight: 700;
}
/* ★第五十八轮（老板点名）：三组之间要有一条**从上到下整条**的竖线（表头 + 明细 + 合计都挂 grpstart） */
.rep-unship th.grpstart,
.rep-unship td.grpstart { border-left: 2px solid #cfd9e8; }
.rep-unship tbody tr.rep-short td { background: #fdf4f3; }

/* ---------- ★第五十八轮：超宽报表的横向滚动条，固定在「屏幕能看见的最下方」 ---------- */
/*   未发货算料表 / 销售订单汇总表这种十几二十组的码段表，以前横向滚动条在整张表的最底下：
     要先滚到第 200 行才拖得到，拖的时候想看的数据又跑出屏幕了。
     做法 = 给外面那层框定死高度（JS 算到视口底部），横竖都在框里滚，
     横向滚动条就永远贴在框底 —— 也就是屏幕能看见的最下方。 */
.table-wrap.rep-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--c-border);
}
.table-wrap.rep-scroll thead th { z-index: 2; }   /* 竖滚时表头压住数据，别反被盖 */

/* ---------- ★第二十七轮：首页导航（替掉老板看板） ---------- */
.home-wrap { padding: 4px 2px 40px; }
.home-hero {
  background: linear-gradient(135deg, #eef4fd, #f7fbff); border: 1px solid var(--c-border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.home-hero b { font-size: 15px; }
.home-hero span { color: var(--c-text-2); }

/* ---------- ★★★第307轮（老板点名）：从「销售管理」起，栏目分成左右两半 ----------
   按菜单顺序**两两配对**（销售|生产、库存|财务、标签|报表、基础|系统）；
   「我的常用」在 .home-cols 外面，保持整行。窄屏退回单栏。 */
.home-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;                 /* 两栏各按自己内容高，短栏不会被拉齐到长栏底部 */
}
.home-cols > .home-sec { margin-bottom: 20px; }
@media (max-width: 1080px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
}
.home-sec { margin-bottom: 20px; }
.home-sec-t {
  font-size: 12.5px; font-weight: 700; color: var(--c-text-2); margin: 0 0 10px 4px;
  padding-bottom: 6px; border-bottom: 1px solid var(--c-border);
}
.home-grid { display: flex; flex-wrap: wrap; gap: 10px 6px; }
.home-tile {
  width: 106px; padding: 10px 4px 8px; border-radius: 12px; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1px solid transparent; background: transparent; transition: all .12s;
}
.home-tile:hover {
  background: #fff; border-color: var(--c-border); box-shadow: 0 6px 20px rgba(20, 30, 50, .09);
  transform: translateY(-1px);
}
.home-ico {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid #e7ecf3;
  box-shadow: 0 4px 12px rgba(20, 30, 50, .10), inset 0 -2px 0 rgba(20, 30, 50, .03);
  display: flex; align-items: center; justify-content: center;
}
.home-ico svg { width: 26px; height: 26px; display: block; }
.home-name { font-size: 12.5px; color: var(--c-text); line-height: 1.3; text-align: center; }
@media (max-width: 640px) {
  .home-tile { width: 30%; }
  .home-ico { width: 46px; height: 46px; }
  .home-ico svg { width: 22px; height: 22px; }
}

/* ---------- ★第一百六十一轮（老板点名）：首页「今天」四块数 ---------- */
.home-today { margin: 0 0 18px; }
.home-today-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 9px 4px; }
.home-today-h b { font-size: 14px; letter-spacing: .5px; }
.home-today-h span { font-size: 12px; color: var(--c-text-2); }
.home-today-tip { cursor: help; opacity: .55; font-size: 12px; }
.home-today .kpis { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.kpi-link { display: block; text-decoration: none; color: inherit; transition: box-shadow .12s, border-color .12s, transform .12s; }
.kpi-link:hover { border-color: var(--c-primary); box-shadow: 0 6px 20px rgba(20, 30, 50, .09); transform: translateY(-1px); }
.kpi .v .u { font-size: 12.5px; font-weight: 600; color: var(--c-text-2); margin-left: 3px; }
@media (max-width: 640px) {
  .home-today .kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi .v { font-size: 21px; }
}
/* ★第199轮（老板点名·建议③）：首页「有 N 张单据超过 X 天没审核」一条轻提示 */
.home-stale { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  background: #fff7e6; border: 1px solid #ffd591; color: #8a5a00; font-size: 13px;
  transition: box-shadow .12s, border-color .12s; }
.home-stale:hover { border-color: #ff9d2e; box-shadow: 0 4px 14px rgba(200, 120, 0, .12); }
.home-stale b { font-size: 13.5px; }
.home-stale span { font-size: 12px; opacity: .8; }

/* ---------- ★第199轮：系统管理 · 单据自动审核 ---------- */
.aa-sw { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.aa-pv-tip { font-size: 12.5px; color: var(--c-text-2); margin: 0 0 10px; }
.aa-pv-h { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 6px;
  font-size: 13.5px; font-weight: 700; }
.aa-pv-h span { font-size: 12px; font-weight: 400; color: var(--c-text-2); }
table.grid.aa-pv { font-size: 12.5px; }
table.grid.aa-pv td, table.grid.aa-pv th { padding: 5px 8px; }
tr.aa-pv-skip td { color: var(--c-muted); }
.aa-pv-more { font-size: 12px; color: var(--c-text-2); margin: 4px 0 0 2px; }

/* ---------- ★第二十八轮：订单汇总表的「客户」列只占 8 个汉字 + 「备注」列加宽换行 ---------- */
table.grid.rep-tbl td.col-cust { max-width: 8em; }
table.grid.rep-tbl td.col-cust .ell {
  display: block; max-width: 8em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: help;
}
/* ---------- ★第四十三轮：成品库存表的「鞋型」列只占 4 个汉字宽 ---------- */
table.grid.rep-tbl td.col-shoetype { max-width: 4em; }
table.grid.rep-tbl td.col-shoetype .ell {
  display: block; max-width: 4em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: help;
}
/* ★第四十三轮：销售订单的「编号」列（单号-行号，如 XS20261016001-03），等宽字体好对齐 */
table.grid td.col-code {
  font-family: Consolas, "Courier New", monospace; font-size: 12px;
  color: var(--c-text-2); white-space: nowrap;
}
/* ---------- ★第四十四轮：未发货算料表的「材料名称」列只占 15 个汉字宽 ---------- */
table.grid.rep-tbl td.col-mat { max-width: 15em; }
table.grid.rep-tbl td.col-mat .ell {
  display: block; max-width: 15em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: help;
}
table.grid.rep-tbl th.memo-col { min-width: 300px; }
table.grid.rep-tbl td.memo-cell {
  white-space: normal; word-break: break-word; min-width: 300px; max-width: 480px;
  font-size: 11.5px; color: var(--c-text-2); line-height: 1.5; vertical-align: top;
}

/* ============================================================
   ★ 第三十轮：手机开单页（照「鞋业开单助手」重做）
     老板原话：「样式基本和那个开单助手一样」——所以这一页单独用
     它那套配色（红为主），跟 ERP 其余页面的蓝互不干扰。
     结构：货号卡片 + 颜色芯片（点亮才出配码行）+ 配码格 + 底部汇总栏
   ============================================================ */
.m2 {
  --m2-primary: #ff4d4f;
  --m2-primary-dark: #e64340;
  --m2-blue: #1677ff;
  --m2-green: #07c160;
  --m2-border: #ebedf0;
  --m2-bg: #f4f5f7;
  --m2-muted: #929599;
  --m2-text: #26282c;
  max-width: 520px; margin: 0 auto;
  color: var(--m2-text);
  font-size: 14px;
}
.m2 .m2-top {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 7px 10px; background: #fff; border-bottom: 1px solid var(--m2-border);
  font-size: 13px;
}
.m2 .m2-top .grow { flex: 1; }
.m2 .m2-cust {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--m2-border);
}
.m2 .m2-cust .lab { flex: 0 0 auto; font-size: 11.5px; color: var(--m2-muted); }
/* ★第九十二轮（老板点名）：客户类型 / 结算方式放在客户下面，**做小一点** */
.m2 .m2-cust2 {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 10px 6px; background: #fff; border-bottom: 1px solid var(--m2-border);
}
.m2 .m2-cust2 .lab { flex: 0 0 auto; font-size: 10.5px; color: var(--m2-muted); }
.m2 .m2-cust2 select.xs {
  flex: 0 0 auto; height: 23px; max-width: 84px; padding: 0 3px;
  border: 1px solid var(--m2-border); border-radius: 6px; background: #fafbfc;
  font-size: 11px; color: var(--m2-text);
}
.m2 .m2-fold {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; background: #f7f8fa; border-bottom: 1px solid var(--m2-border);
  font-size: 12px; color: var(--m2-text); cursor: pointer;
}
.m2 .m2-fold .grow { flex: 1; }
.m2 .m2-fold .hint { font-size: 11px; color: var(--m2-muted); }
.m2 .m2-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px;
  padding: 9px 10px; background: #fff; border-bottom: 1px solid var(--m2-border);
}
.m2 .m2-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--m2-muted); min-width: 0; }
.m2 .m2-fields label.w2 { grid-column: span 2; }
.m2 .m2-fields input, .m2 .m2-fields select {
  min-height: 32px; padding: 4px 8px; border: 1px solid var(--m2-border); border-radius: 6px;
  background: #fafbfc; width: 100%; font-size: 13px; color: var(--m2-text);
}
.m2 .m2-fields input:focus, .m2 .m2-fields select:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-sizebar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--m2-border);
}
.m2 .m2-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.m2 .m2-chip {
  border: 1px solid var(--m2-border); background: #fafbfc; border-radius: 14px;
  padding: 2px 7px; font-size: 11.5px; font-weight: 700; color: var(--m2-muted);
  cursor: pointer; line-height: 1.35; user-select: none;
}
.m2 .m2-chip.on { background: #fff4f4; border-color: var(--m2-primary); color: var(--m2-primary); }
.m2 .m2-chip.dash { border-style: dashed; }
.m2 .m2-body { background: var(--m2-bg); padding: 9px 10px 0; }
.m2 .m2-listhead { font-size: 12.5px; font-weight: 700; margin: 2px 0 7px; }
.m2 .m2-copy {
  display: flex; align-items: center; justify-content: center; gap: 5px; text-align: center;
  border: 1px dashed var(--m2-blue); color: var(--m2-blue); background: #f0f7ff;
  border-radius: 10px; padding: 7px 9px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; margin: 0 0 6px;
}
.m2 .m2-copy.g { border-color: var(--m2-green); color: var(--m2-green); background: #f6fffa; }
.m2 .m2-copy.off { border-color: #d5d9de; color: #a8adb5; background: #fafbfc; }
.m2 .m2-card {
  border: 1px solid var(--m2-border); border-radius: 12px; background: #fff;
  padding: 9px 10px; margin-bottom: 9px;
}
.m2 .m2-chead { display: flex; align-items: flex-start; gap: 8px; }
.m2 .m2-cimg, .m2 .m2-cimg .ph {
  width: 62px; height: 62px; border-radius: 9px; object-fit: cover;
  background: #f0f1f3; flex: 0 0 auto; display: block;
}
.m2 .m2-cimg .ph { display: flex; align-items: center; justify-content: center; font-size: 10px; color: #c0c3c8; }
.m2 .m2-ctitle { font-weight: 700; font-size: 15px; line-height: 1.25; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.m2 .m2-priceline { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; vertical-align: middle; }
.m2 .m2-priceline span { font-size: 10px; color: var(--m2-muted); flex: 0 0 auto; }
.m2 .m2-priceline input {
  width: 54px; padding: 1px 3px; border: 1px solid var(--m2-border); border-radius: 4px;
  background: #fafbfc; text-align: center; font-size: 12.5px; color: var(--m2-text); min-height: 0;
}
.m2 .m2-priceline input:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-cname-sub { font-size: 11px; color: var(--m2-muted); margin-top: 2px; }
.m2 .m2-x { flex: 0 0 auto; font-size: 17px; color: var(--m2-muted); padding: 0 3px; cursor: pointer; line-height: 1; }
.m2 .m2-line {
  display: flex; align-items: center; gap: 5px; width: 100%;
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--m2-border);
}
.m2 .m2-line.first { border-top: none; padding-top: 1px; }
.m2 .m2-cname {
  flex: 0 0 auto; max-width: 52px; font-size: 11.5px; font-weight: 700;
  color: var(--m2-primary); line-height: 1.1; cursor: pointer; letter-spacing: -.3px;
}
.m2 .m2-cname i { display: block; font-style: normal; font-weight: 400; font-size: 10px; opacity: .55; }
.m2 .m2-grid { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.m2 .m2-cell { display: block; text-align: center; min-width: 0; }
.m2 .m2-cell span { display: block; font-size: 10px; color: var(--m2-muted); line-height: 1.1; margin-bottom: 1px; }
.m2 .m2-cell input {
  width: 100%; min-width: 0; padding: 1px 0; border: 1px solid var(--m2-border); border-radius: 4px;
  background: #fafbfc; text-align: center; font-size: 13px; line-height: 1.15; color: var(--m2-text); min-height: 0;
}
.m2 .m2-cell input:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-cell.pay input { background: #fff8f8; border-color: #ffd4d1; }
.m2 .m2-cell.pay span { color: var(--m2-primary); font-weight: 700; }
.m2 .m2-cases { flex: 0 0 auto; text-align: center; }
.m2 .m2-cases span { display: block; font-size: 10px; color: var(--m2-muted); line-height: 1.1; margin-bottom: 1px; }
.m2 .m2-cases input {
  width: 34px; padding: 1px 0; border: 1px solid var(--m2-border); border-radius: 4px;
  background: #fafbfc; text-align: center; font-size: 13px; color: var(--m2-text); min-height: 0;
}
.m2 .m2-cases input:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-sum { margin-top: 2px; font-size: 11px; color: var(--m2-muted); text-align: right; line-height: 1.4; }
.m2 .m2-sum b { color: var(--m2-text); }
.m2 .m2-sum .amt { color: var(--m2-primary); font-size: 12px; font-weight: 700; }
.m2 .m2-lock { font-size: 11px; color: var(--c-warn); margin-top: 4px; }
.m2 .m2-add {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed var(--m2-primary); color: var(--m2-primary); background: #fff8f8;
  border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.m2 .m2-empty { text-align: center; color: var(--m2-muted); padding: 22px 6px; font-size: 12.5px; line-height: 1.9; }
/* ============================================================
   ★★第一百零七轮（老板点名）：手机开单底部条整体重排
     老板原话：「一弹键盘，底下固定那块就顶在键盘上面，输入界面全被挡住，
     即使把画面往上拉，也只有可怜的一小段可以输入。」
     改法（老板拍板的三条）：
       · 平时压成两行：①总数·件数·金额 + 保存那几个按钮 ②收款三项 + 删除
       · 键盘一弹（.m2.kbd）：只留「总数·金额 + 保存」一条迷你条，其余让开
       · 键盘态页面底部留一大截空白，输入框自己滚到屏幕中间
   ★ 有 `env(safe-area-inset-bottom)` 的机型（全面屏），底边自动躲开那条横杠
   ============================================================ */
.m2 .m2-bar {
  position: sticky; bottom: 0; z-index: 6; background: #fff;
  border-top: 1px solid var(--m2-border); margin-top: 9px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .04);
}
.m2 .m2-bar .bar1 { display: flex; align-items: center; gap: 7px; }
.m2 .m2-bar .bar1 .sum { min-width: 0; flex: 0 0 auto; line-height: 1.15; }
.m2 .m2-bar .bar1 .sum .t { font-size: 11px; color: var(--m2-muted); white-space: nowrap; }
.m2 .m2-bar .bar1 .sum .t b { color: var(--m2-text); }
.m2 .m2-bar .bar1 .sum .a { font-size: 18px; font-weight: 800; color: var(--m2-primary-dark); white-space: nowrap; }
.m2 .m2-bar .bar1 .st { font-size: 10.5px; font-weight: 700; color: var(--m2-muted); white-space: nowrap; }
.m2 .m2-bar .bar1 .st.w { color: #c2410c; }
.m2 .m2-bar .bar1 .st.ok { color: #15803d; }
.m2 .m2-bar .bar1 .grow { flex: 1 1 auto; min-width: 0; }
.m2 .m2-bar .bar1 .acts { display: flex; gap: 5px; flex: 0 0 auto; }
.m2 .m2-bar .bar1 .acts .m2-btn { padding: 7px 9px; font-size: 12px; border-radius: 9px; white-space: nowrap; }

/* ★★第一百零七轮补丁（老板点名）：收款三项（已收 / 已收全款 / 图片欠款）**都是输入框**，
   以前钉在底栏 → 一打字键盘弹起就被底栏顶住，还自动收键盘，根本输不进去。
   现在整行搬进正文末尾（增减项下面），做成一张白卡片，跟内容一起滚。 */
.m2 .m2-payrow {
  display: flex; align-items: center; gap: 5px;
  margin: 9px 0 0; padding: 8px 10px;
  background: #fff; border: 1px solid var(--m2-border); border-radius: 12px;
}
.m2 .m2-payrow .lab { flex: 0 0 auto; font-size: 11px; color: var(--m2-muted); }
.m2 .m2-payrow .unit { flex: 0 0 auto; font-size: 11px; color: var(--m2-muted); }
.m2 .m2-payrow .grow { flex: 1 1 auto; min-width: 0; }
.m2 .m2-payrow input.num {
  width: 72px; height: 30px; padding: 2px 8px; text-align: right;
  border: 1px solid var(--m2-border); border-radius: 8px; background: #fafbfc;
  font-size: 14px; font-weight: 700; color: var(--m2-text);
}
.m2 .m2-payrow input.num:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-payrow select.xs {
  height: 30px; padding: 0 3px; border: 1px solid var(--m2-border); border-radius: 7px;
  background: #fafbfc; font-size: 11.5px; color: var(--m2-text);
}
.m2 .m2-payrow .m2-btn.sm { padding: 6px 9px; font-size: 11.5px; border-radius: 8px; }
.m2 .m2-payrow .btn { height: 30px; padding: 0 8px; font-size: 11.5px; }

/* ★ 键盘出来了：只留总数·金额 + 保存，其余全部让位 */
.m2.kbd .m2-bar { padding: 4px 10px; box-shadow: none; }
.m2.kbd .m2-bar .bar1 .sum .t { display: none; }
.m2.kbd .m2-bar .bar1 .st { display: none; }
.m2.kbd .m2-bar .bar1 .acts .m2-btn:not(.keep) { display: none; }
/* ★★第一百零七轮（老板追加）：「操作界面到底了，不能再往上拉」——
   正文区底部常年留半屏空白：最底下那几个输入框（增减项金额 / 已收款）也能被拉到屏幕中间，
   输入法怎么弹都盖不到它。
   ★ 留白必须加在 .m2-body 上（正文末尾），**不能加在 .m2 上** —— 加在 .m2 上会跑到
     底部条后面，滚到底时底部条会浮在屏幕中间；加在正文末尾，底部条依旧贴屏幕底、随时能保存。 */
.m2 .m2-body { padding-bottom: 52vh; }
.m2 .m2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--m2-border); border-radius: 10px; background: #fff;
  color: var(--m2-text); padding: 9px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.m2 .m2-btn.pri { background: var(--m2-primary); border-color: var(--m2-primary); color: #fff; }
.m2 .m2-btn.sm { padding: 6px 9px; font-size: 12px; border-radius: 8px; flex: 0 0 auto; }
/* 图片浮层：★ 注意选择器不能写成 `.m2 .m2-imgov` —— 浮层元素自己就带着 .m2 类
   （要里面的 CSS 变量），后代选择器匹配不到它自己，那套 fixed 定位就会整个失效、
   浮层变成页面底部一块普通内容。就写 `.m2-imgov`，并显式盖掉 .m2 的 max-width。 */
.m2-imgov {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  max-width: none; margin: 0; padding: 14px;
  background: rgba(0,0,0,.86); z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.m2-imgov img { max-width: 96%; max-height: 72vh; border-radius: 8px; background: #fff; }
.m2-imgov .tip { color: #fff; margin: 12px 0 10px; font-size: 13px; text-align: center; line-height: 1.7; }
.m2-imgov .ops { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 420px) {
  .m2 .m2-cases input { width: 30px; }
  .m2 .m2-cell span { font-size: 9.5px; }
}

/* ★第三十一轮：手机开单「订单大备注」—— 放在明细卡片下面，整单用 */
.m2 .m2-bigrem {
  margin: 2px 0 9px; padding: 9px 10px; background: #fff;
  border: 1px solid var(--m2-border); border-radius: 12px;
}
.m2 .m2-bigrem-h { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.m2 .m2-bigrem-h span { font-weight: 400; font-size: 10.5px; color: var(--m2-muted); margin-left: 5px; }
.m2 .m2-bigrem textarea {
  width: 100%; min-height: 52px; padding: 7px 9px; border: 1px solid var(--m2-border);
  border-radius: 8px; background: #fafbfc; font-size: 13px; line-height: 1.55;
  color: var(--m2-text); resize: vertical; box-sizing: border-box;
}
.m2 .m2-bigrem textarea:focus { border-color: var(--m2-primary); background: #fff; }

/* ★第三十一轮：销售订单的「订单大备注」—— 老板要求至少是原来那格的 5 倍长。
   只作用于 .so-bigrem 这一格，其他单据页的备注（.grow-fld）一个字都不动。 */
.docfields > .so-bigrem { display: block; width: 100%; margin-top: 5px; }
.docfields > .so-bigrem > span { display: block; font-size: 12px; color: var(--c-text-2); margin-bottom: 3px; }
.docfields > .so-bigrem > input {
  display: block; width: 100%; min-height: 32px; padding: 5px 9px; box-sizing: border-box;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-size: 13.5px;
}
.docfields > .so-bigrem > input:focus { border-color: var(--c-primary); background: #fff; }
/* 图片底部那两段说明「这张单用哪条话术」（手机页 / 电脑页共用） */
.docfields > .note-sel { display: inline-flex; flex-direction: column; margin-right: 10px; vertical-align: bottom; }
.docfields > .note-sel > span { font-size: 12px; color: var(--c-text-2); margin-bottom: 3px; }
.docfields > .note-sel > select {
  min-height: 30px; max-width: 280px; padding: 3px 6px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fbfcfe; font-size: 12.5px;
}

/* ★第三十一轮：草稿销售订单 */
.draft-hint {
  margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.75;
  background: #fff8f0; border: 1px dashed #ffd8a8; color: #9a6b1f;
}
.draft-hint b { color: #8a5a10; }
table.grid.docgrid tr.draft-err > td { background: #fff4f4 !important; }
table.grid.docgrid tr.draft-err > td:first-child { box-shadow: inset 3px 0 0 var(--c-danger); }
/* 草稿列表：手打的货号/颜色标个「手填」小标，一眼看出哪些还没对上档案 */
.df-hand { font-size: 10.5px; color: var(--c-warn); border: 1px solid #f0d6a8; background: #fff8f0; border-radius: 4px; padding: 0 3px; margin-left: 3px; }

/* ★第三十一轮：手机「自由开单」页（草稿销售订单）—— 货号/颜色都能手打的那一版 */
.m2 .dm-row { background: #fff; border: 1px solid var(--m2-border); border-radius: 12px; padding: 9px 10px; margin-bottom: 9px; }
.m2 .dm-top { display: flex; gap: 9px; align-items: flex-start; }
.m2 .dm-img { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; background: #f0f1f3; flex: 0 0 auto; display: block; cursor: pointer; }
.m2 .dm-noimg { display: flex; align-items: center; justify-content: center; font-size: 10px; color: #c0c3c8; cursor: default; }
.m2 .dm-coderow, .m2 .dm-colorrow { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.m2 .dm-code, .m2 .dm-color {
  flex: 1 1 auto; min-width: 0; min-height: 30px; padding: 4px 8px; box-sizing: border-box;
  border: 1px solid var(--m2-border); border-radius: 6px; background: #fafbfc; font-size: 13px; color: var(--m2-text);
}
.m2 .dm-code:focus, .m2 .dm-color:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .dm-coderow .dm-code { font-weight: 700; font-size: 14px; }
.m2 .dm-ok { flex: 0 0 auto; font-size: 10.5px; color: var(--m2-green); border: 1px solid #b7e6cb; background: #f2fff8; border-radius: 4px; padding: 0 3px; }
.m2 .dm-row .m2-line { margin-top: 7px; }

/* ============================================================
   ★第三十二轮（老板点名）：单据上的「制单员」
   原来叫业务员 / 经手人 / 领料人，而且是个下拉框要人点；现在统一叫「制单员」，
   不用填 —— 直接把登录人的姓名写在「制单员」三个字后面，看着像一行小字。
   ============================================================ */
.who-made { color: var(--c-text); }
.who-made b { font-weight: 600; margin-left: 4px; }
/* 手机上那一格是「标签在上、值在下」的竖排；制单员要跟标签并排一行 */
.m2 .m2-fields label.who-line { flex-direction: row; align-items: center; gap: 6px; }
.m2 .m2-fields label.who-line .who-made b { font-weight: 600; }

/* ============================================================
   ★第三十三轮（老板点名）：单据图片说明的话术框「宽一点，现在的 5 倍」
   原来 textarea 没有样式，靠浏览器默认 ≈180px；这里铺满卡片（≈940px），正好 5 倍。
   ============================================================ */
.in-item { border: 1px solid var(--c-border); border-radius: 8px; padding: 9px 10px 10px; margin-bottom: 8px; background: #fcfdff; }
.in-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.in-def { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; flex: 0 0 auto; }
.in-head .in-name { flex: 1 1 auto; min-width: 340px; }
.in-head > .btn-link { flex: 0 0 auto; white-space: nowrap; }
.in-text {
  display: block; width: 100%; min-width: 0; box-sizing: border-box;
  min-height: 96px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 6px;
  background: #fbfcfe; font-size: 13px; line-height: 1.75; color: var(--c-text);
  font-family: inherit; resize: vertical;
}
.in-text:focus { border-color: var(--c-primary); background: #fff; }

/* ★第三十三轮：自由开单手机页的颜色芯片 ——
   当前这个颜色「点亮」（复用 .m2-chip.on 的红底），末尾那颗「＋ 加颜色」是虚线 */
.m2 .dm-addc {
  border-style: dashed; border-color: var(--m2-primary);
  color: var(--m2-primary); background: #fff8f8; font-weight: 700;
}
/* 手机页上没货号时整块都不画了 → 明细区不用再留上边距顶出一片空白 */
.m2 .m2-body > .m2-add:first-child { margin-top: 0; }

/* ★第三十三轮：自由开单「手打颜色」那一行 —— 色名那格变成输入框（比芯片行宽一点，右边跟个小 ✕） */
.m2 .m2-cname-in {
  width: 70px; max-width: 70px; display: flex; align-items: center; gap: 2px; cursor: default;
}
.m2 .m2-cname-in input {
  flex: 1 1 auto; min-width: 0; min-height: 0; padding: 1px 3px; border: 1px solid var(--m2-border);
  border-radius: 4px; background: #fafbfc; font-size: 12px; color: var(--m2-text); text-align: center;
}
.m2 .m2-cname-in input:focus { border-color: var(--m2-primary); background: #fff; }
.m2 .m2-cname-in i { display: inline; font-size: 13px; opacity: .55; cursor: pointer; line-height: 1; }
/* 自由开单的卡：卡里第一条配码行不用再画那条虚线分隔 */
.m2 .dm-row .m2-line.first { border-top: none; padding-top: 1px; }

/* ============================================================
   ★第三十五轮（老板点名）：销售订单的「标签类型」
   · 明细表格里排在「备注」后面，跟备注一样宽窄的一格，能下拉选也能自己打字
   · 汇总表（明细 / 汇总两个视图）也在「备注」后面摆一列
   ============================================================ */
table.grid.docgrid th.tagcell, table.grid.docgrid td.tagcell { min-width: 92px; width: 92px; }
.tag-in { width: 100%; min-width: 0; text-align: center; }
/* ★第206轮：开单页「客户货号 / 客户商标」两列（标签类型右边）—— 窄一点，输入框填满格 */
table.grid.docgrid th.ccell, table.grid.docgrid td.ccell { min-width: 104px; width: 104px; }
table.grid.docgrid td.ccell input { width: 100%; min-width: 0; }
/* 汇总表里的标签类型：比备注窄，长了截断，鼠标停着看全 */
.rep-tbl th.tagcol { min-width: 84px; }
.rep-tbl td.tagcell2 {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
  font-size: 12.5px;
}

/* ---------- ★第三十八轮：库存损溢单两种填法（按实盘数 / 按差额） ---------- */
.sadj-modebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: #f7f9fc; border-bottom: 1px solid var(--c-border);
  font-size: 12.5px;
}
.sadj-modelabel { color: var(--c-text-2); }
.seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 6px; overflow: hidden; background: #fff; }
.seg-btn { border: 0; background: #fff; padding: 5px 13px; font-size: 12.5px; cursor: pointer; color: var(--c-text-2); }
.seg-btn + .seg-btn { border-left: 1px solid var(--c-border); }
.seg-btn:hover { background: #f0f3f9; }
.seg-btn.on { background: var(--c-primary); color: #fff; }
.seg-btn.on:hover { background: var(--c-primary-dark); }
.sadj-modehint { color: var(--c-text-2); }
/* 实盘模式：格子里填「现在有几个」，上面一行 10px 小灰字写着账面 */
table.grid.docgrid.sadj-check td.szcell { position: relative; padding-top: 13px; }
table.grid.docgrid.sadj-check td.szcell .szbk {
  position: absolute; left: 0; right: 0; top: 1px; text-align: center;
  font-size: 10px; line-height: 12px; color: var(--c-muted); pointer-events: none;
  white-space: nowrap; overflow: hidden;
}

/* ============================================================
   ★第三十八轮：库存损溢单 · 手机版（.am）
   老板要求：简洁、紧凑 —— 一种材料一个卡片、两行看完
   ============================================================ */
.am {
  max-width: 560px; margin: 0 auto; background: var(--c-bg);
  font-size: 13px; color: var(--c-text); padding-bottom: 4px;
}
.am .grow { flex: 1; }
.am-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--c-border); padding: 8px 10px;
}
.am-head .am-no { font-size: 13.5px; }
.am-back { color: var(--c-primary); text-decoration: none; font-weight: 700; }
.am-btn {
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text);
  border-radius: 7px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; min-height: 30px;
}
.am-btn.am-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.am-btn.am-danger { color: var(--c-danger); border-color: #f0c9c5; }
.am-fields {
  display: flex; flex-wrap: wrap; gap: 6px; background: #fff;
  padding: 8px 10px; border-bottom: 1px solid var(--c-border);
}
.am-fields label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--c-text-2); }
.am-fields label > span { white-space: nowrap; }
.am-fields input, .am-fields select {
  height: 30px; border: 1px solid var(--c-border); border-radius: 7px; padding: 0 6px;
  font-size: 12.5px; background: #fff; max-width: 130px;
}
.am-fields label.am-wide { flex: 1 1 100%; }
.am-fields label.am-wide input { max-width: none; flex: 1; }
.am-modebar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #f7f9fc; border-bottom: 1px solid var(--c-border); padding: 7px 10px;
}
.am-modelabel { font-size: 12px; color: var(--c-text-2); }
.am-seg {
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  border-radius: 7px; padding: 5px 11px; font-size: 12.5px; cursor: pointer;
}
.am-seg.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.am-modehint { font-size: 11.5px; color: var(--c-muted); }
.am-list { padding: 8px 8px 0; }
.am-empty { text-align: center; color: var(--c-muted); padding: 24px 6px; font-size: 12.5px; }
.am-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  padding: 6px 8px 7px; margin-bottom: 7px;
}
.am-card.am-frozen { background: #fbfbfc; }
/* ★★第一百三十六轮（老板点名）：手机上材料名一长，输入框里就看不全。
   让「材料框」在卡片里**独占一行**（序号 + 材料框一行，规格 / 单位·账 / 合计换到下一行），
   再配合字号缩到 10.5px —— 22 个字的材料名也放得下。 */
.am-r1 { display: flex; align-items: center; gap: 6px; min-height: 30px; flex-wrap: wrap; }
.am-idx {
  width: 18px; height: 18px; border-radius: 50%; background: #eef1f6; color: var(--c-text-2);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
/* ★ flex-basis 用 calc(100% - 24px)：让出最左边那个圆圆的小序号（18px + 6px 间距） */
.am-r1 .combo { flex: 1 1 calc(100% - 24px); min-width: 0; }
/* ★第一百三十六轮（老板点名）：手机上材料名一长也看不全 —— 材料框的字缩到 80%（13→10.5），
   同时给规格 / 单位·账两段限个宽、超了省略，把多出来的地方让给材料名。
   框里放不下的再由 fitComboFont 自动缩字兜底。 */
.am-r1 .combo .combo-in { height: 30px; font-size: 10.5px; }
.am-r1 .am-spec { max-width: 18%; overflow: hidden; text-overflow: ellipsis; }
.am-r1 .am-book { max-width: 26%; overflow: hidden; text-overflow: ellipsis; }
.am-mat { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
.am-spec { font-size: 11.5px; color: var(--c-text-2); white-space: nowrap; }
.am-book { font-size: 11px; color: var(--c-muted); white-space: nowrap; }
.am-tot { font-size: 13px; min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.am-x {
  border: 0; background: none; color: var(--c-danger); font-size: 15px; line-height: 1;
  padding: 2px 4px; cursor: pointer; flex: none;
}
.am-r2.am-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin-top: 5px; }
.am-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.am-cell > i { font-size: 10px; color: var(--c-muted); font-style: normal; }
.am-cell > u { font-size: 9px; color: var(--c-muted); text-decoration: none; line-height: 10px; }
.am-cell .am-in {
  width: 100%; height: 30px; text-align: center; font-size: 13px; padding: 0 1px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.am-cell .am-in:focus { background: #fff; border-color: var(--c-primary); outline: none; }
.am-r3 { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.am-remlabel { font-size: 11px; color: var(--c-muted); }
.am-rem {
  flex: 1; height: 28px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 7px; font-size: 12.5px; background: #fbfcfe;
}
.am-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 16px);
  margin: 2px 8px 10px; border: 1px dashed var(--c-primary); color: var(--c-primary);
  background: #f4f8ff; border-radius: 10px; padding: 10px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.am-foot {
  position: sticky; bottom: 0; z-index: 6; background: #fff; border-top: 1px solid var(--c-border);
  padding: 7px 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.am-sum { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--c-text-2); flex: 1 1 auto; }
.am-sum .am-g b { color: #1a7f45; }
.am-sum .am-l b { color: var(--c-danger); }
.am-sum .am-n b { color: var(--c-text); }
.am-foot .am-btn { min-width: 78px; min-height: 34px; }
/* 流水账那几行（手机列表） */
.am-lrow { cursor: pointer; }
.am-lrow .am-r1 { gap: 8px; }
.am-lsum { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--c-text-2); margin-top: 3px; }
.am-lsum b { font-variant-numeric: tabular-nums; }

/* ============================================================
   ★第三十九轮：生产计划两张表 + 两张标签打印指导表（屏幕版）
   老板要求「排版要紧凑、重要信息发前面、备注拉长、货号前面加小图」
   ============================================================ */
table.grid.rep-tbl.plan-tbl { font-size: 12.5px; }
table.grid.rep-tbl.plan-tbl th,
table.grid.rep-tbl.plan-tbl td { padding: 4px 6px; }
table.grid.rep-tbl.plan-tbl thead th { padding: 5px 6px; font-size: 12px; }
table.grid.rep-tbl.plan-tbl td.memo-cell { min-width: 320px; max-width: 560px; }
table.grid.rep-tbl.plan-tbl th.memo-col { min-width: 320px; }
/* 「指令单号」这类内部号：灰一点、别抢戏 */
.plv-dim { color: var(--c-text-2); font-size: 12px; }

/* ============================================================
   ★第四十轮（老板点名）
   ① 常用备注「多标签页」选择面板 —— 电脑上贴着备注框左边弹，够大、不挡输入框
   ② 订单「增减项」那一排输入（三个开单页共用）
   ============================================================ */
.rmp-mask { position: fixed; inset: 0; z-index: 3200; }
.rmp {
  position: fixed; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(20, 30, 50, .18); overflow: hidden;
}
.rmp-h {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-bottom: 1px solid var(--c-border); background: #f7f9fc; flex: none;
}
.rmp-h b { font-size: 13.5px; white-space: nowrap; }
.rmp-h .grow { flex: 1; }
.rmp-x { font-size: 20px; color: #8b94a3; line-height: 1; padding: 0 4px; }
.rmp-q {
  flex: 1; min-width: 90px; max-width: 240px; height: 30px; font-size: 12.5px;
  border: 1px solid var(--c-border); border-radius: 6px; padding: 0 8px;
}
.rmp-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 7px 10px 0; flex: none;
  border-bottom: 1px solid var(--c-border); background: #fff;
}
.rmp-tab {
  border: 1px solid transparent; border-bottom: 2px solid transparent;
  background: none; cursor: pointer; font-size: 12.5px; color: var(--c-text-2);
  padding: 5px 10px 7px; border-radius: 6px 6px 0 0; white-space: nowrap;
}
.rmp-tab i { font-style: normal; font-size: 11px; color: var(--c-muted); margin-left: 4px; }
.rmp-tab:hover { background: #f2f6fb; color: var(--c-text); }
.rmp-tab.on { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 700; background: #f4f8ff; }
.rmp-body { flex: 1; overflow: auto; padding: 10px; }
.rmp-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff; border-radius: 8px;
  padding: 9px 11px; margin-bottom: 7px; font-size: 13px; line-height: 1.5;
  white-space: normal; word-break: break-word; color: var(--c-text);
}
.rmp-item:hover { border-color: var(--c-primary); background: #f4f8ff; }
.rmp-item em {
  display: block; font-style: normal; font-size: 11px; color: var(--c-muted); margin-bottom: 2px;
}
.rmp-none { padding: 26px 10px; text-align: center; color: var(--c-muted); font-size: 12.5px; }
.rmp-f {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; flex: none;
  border-top: 1px solid var(--c-border); background: #f7f9fc; font-size: 12px; color: var(--c-text-2);
}
.rmp-f .grow { flex: 1; }
.rmp-f a { color: var(--c-primary); text-decoration: none; }
/* 手机：改成从底下弹上来的大抽屉 */
.rmp-mask.rmp-sheet { background: rgba(15, 22, 36, .35); display: flex; align-items: flex-end; }
.rmp-mobile {
  position: static; width: 100% !important; height: 62vh !important; max-height: 62vh;
  border-radius: 14px 14px 0 0; margin: 0;
}
.rmp-mobile .rmp-item { font-size: 13.5px; padding: 11px 12px; }

/* ---------- 订单「增减项」 ---------- */
.adjblock {
  margin-top: 10px; border: 1px solid var(--c-border); border-radius: 8px;
  background: #fbfcfe; padding: 9px 12px 11px;
}
.adj-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--c-text-2); margin-bottom: 6px; }
.adj-h b { font-size: 13px; color: var(--c-text); }
.adj-h .grow { flex: 1; }
.adj-list { display: flex; flex-direction: column; gap: 5px; }
.adj-row { display: flex; align-items: center; gap: 8px; }
.adj-name {
  flex: 0 0 190px; font-size: 12.5px; color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adj-amt-box { flex: 0 0 130px; }
.adj-amt {
  width: 100%; height: 30px; font-size: 13px; padding: 0 8px;
  border: 1px solid var(--c-border); border-radius: 6px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.adj-del { flex: 0 0 26px; text-align: center; }
.adj-none { font-size: 12px; color: var(--c-muted); padding: 2px 0 4px; }
.adj-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.adj-add .lf-sel { height: 30px; min-width: 150px; }
.adj-add .adj-amt { flex: 0 0 150px; }
.adj-sum {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px;
  padding-top: 8px; border-top: 1px dashed var(--c-border); font-size: 12.5px; color: var(--c-text-2);
}
.adj-sum .sep { width: 1px; height: 12px; background: var(--c-border); }
.adj-sum b { font-variant-numeric: tabular-nums; color: var(--c-text); }

/* ★第一百四十二轮（老板点名）：电脑开单「表单下方也放保存 / 保存并审核」——
   摆在增减项区块「订单总额」那一行的最右边（老板截图圈的位置）。 */
.adj-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adj-foot > .adj-sum { flex: 1 1 auto; min-width: 0; }
.adj-foot-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* 手机开单 / 自由开单里的那一块（跟 .m2 的配色走） */
.m2 .m2-adj {
  background: #fff; border: 1px solid var(--m2-border); border-radius: 10px;
  padding: 8px 10px 10px; margin-top: 8px;
}
.m2 .m2-adj-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--m2-text); margin-bottom: 7px; }
.m2 .m2-adj-h span { font-weight: 400; font-size: 11px; color: var(--m2-muted); }
.m2 .m2-adj .adj-name { flex: 0 0 96px; font-size: 12.5px; }
.m2 .m2-adj .adj-amt-box { flex: 1 1 auto; }
.m2 .m2-adj .adj-amt { height: 30px; font-size: 13px; }
.m2 .m2-adj .adj-add { gap: 6px; }
.m2 .m2-adj .adj-add .lf-sel { flex: 0 0 auto; min-width: 110px; height: 30px; font-size: 12.5px; }
.m2 .m2-adj .adj-add .adj-amt { flex: 1 1 90px; }
.m2 .m2-adj .adj-sum { font-size: 12px; margin-top: 8px; padding-top: 7px; border-top-color: var(--m2-border); color: var(--m2-muted); }
.m2 .m2-adj .adj-none { color: var(--m2-muted); }
/* 大备注标题行里的「常用备注」按钮 */
.m2 .m2-bigrem-h .m2-btn.sm { margin-left: auto; padding: 4px 10px; font-size: 12px; min-height: 26px; }

/* ★第四十轮：大备注那格多了一颗「常用备注」按钮 —— 输入框照样占满，按钮贴在右边 */
.docfields > .so-bigrem > .fld-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.docfields > .so-bigrem > .fld-row > input {
  flex: 1 1 auto; min-width: 0; width: auto; min-height: 32px; padding: 5px 9px; box-sizing: border-box;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; font-size: 13.5px;
}
.docfields > .so-bigrem > .fld-row > input:focus { border-color: var(--c-primary); background: #fff; }
.docfields > .so-bigrem > .fld-row > .btn { flex: 0 0 auto; white-space: nowrap; }

/* ============================================================
   ★第四十一轮：常用备注的「标签页」导航条（基础档案 → 常用备注）
   点一下只看这一页；✎ 给整页改名；＋ 新建标签页
   ============================================================ */
.rtabs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 9px 12px; background: #f7f9fc; border-bottom: 1px solid var(--c-border);
}
.rtabs-h { font-size: 12.5px; color: var(--c-text-2); margin-right: 2px; }
.rtabs .grow { flex: 1; }
.rtabs-tip { font-size: 11.5px; color: var(--c-muted); }
.rtab {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  border-radius: 16px; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
}
.rtab i { font-style: normal; font-size: 11px; color: var(--c-muted); }
.rtab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.rtab.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.rtab.on i { color: rgba(255, 255, 255, .8); }
.rtab-edit {
  text-decoration: none; margin-left: 4px; padding: 0 4px; border-radius: 4px;
  color: #5a6472; font-size: 13px; line-height: 15px; border: 1px solid rgba(0, 0, 0, .12);
}
.rtab.on .rtab-edit { color: #fff; border-color: rgba(255, 255, 255, .5); }
.rtab-edit:hover { background: rgba(0, 0, 0, .08); color: var(--c-primary); }
.rtab-new { border-style: dashed; color: var(--c-primary); border-color: var(--c-primary); }

/* ============================================================
   ★第四十二轮：页面「是不是最新版」——
   老板习惯把 ERP 标签页开着不关，后台更新了 app.js 他那边还是旧版，
   于是「功能明明做了却看不到」。这里给一条明显的提示条 + 顶栏一个版本号。
   ============================================================ */
.buildno { font-size: 11px; color: var(--c-muted); margin-left: 8px; white-space: nowrap; }
#staleBar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 5000; display: flex; align-items: center; gap: 12px;
  max-width: min(760px, 94vw);
  background: #fff8e6; border: 1px solid #f0d59a; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(30, 20, 0, .18);
  padding: 10px 14px; font-size: 13px; line-height: 1.6; color: #6b4a00;
}
#staleBar b { color: #b36b00; }
#staleBar button { flex: 0 0 auto; }

/* ---------- ★第五十四轮：角色与权限页 —— 「这个角色里有谁」 ---------- */
/*   老板点名：「用户的权限当然是管理员设置的」—— 以前这页只能改角色有哪些权限，
     没有「谁属于这个角色」，于是「谁是管理员」只能靠改库。现在勾就行。 */
.role-mem { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--c-border); }
.role-mem-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13.5px; }
.role-mem-hint { font-size: 12.5px; color: var(--c-text-2); }
.role-mem-sum { font-size: 12.5px; color: var(--c-primary); }
.role-mem-ln { margin-left: 6px; font-size: 12px; color: var(--c-text-2); }
@media (max-width: 720px) {
  .role-mem-head { gap: 6px; }
  .role-mem-hint { flex-basis: 100%; }
}

/* ---------- ★第五十五轮：角色「能查多久」（★第五十七轮去掉日期框旁的提示） ---------- */
.role-range { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.role-range label { display: inline-flex; align-items: center; gap: 6px; }
.role-range input { width: 76px; padding: 5px 8px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 13px; }
/* ★第五十七轮：`.range-tip`（「你只能查到 X 天前」）整个删掉 —— 权限只管住，页面上不提示 */

/* ---------- ★第五十九轮：多标签页（只有桌面版；手机不启用） ---------- */
/*   老板拍板：切标签保留没保存的内容 / 最多 8 个 / 刷新后恢复 / 手机不要。
     标签做小一点：25px 高、12px 字，别抢内容的地方。 */
.tabbar {
  display: flex; align-items: flex-end; gap: 3px; padding: 4px 8px 0;
  background: #eef3f9; border-bottom: 1px solid var(--c-border);
  overflow-x: auto; overflow-y: hidden; flex: 0 0 auto;
}
.tabbar[hidden] { display: none; }

/* ★★★第307轮（老板点名）：这排标签页也钉在顶栏底下，滚页面时不跟着跑。
   z-index 19：低于顶栏(20)不盖住它，高于表头(1~5)和各页的小工具条。 */
.tabbar { position: sticky; top: var(--topbar-h); z-index: 19; }
.tabbar::-webkit-scrollbar { height: 3px; }
.tabbar::-webkit-scrollbar-thumb { background: #c8d4e6; border-radius: 3px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 8px;
  max-width: 168px; flex: 0 0 auto; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--c-border); border-bottom: none; border-radius: 6px 6px 0 0;
  background: #e3eaf5; color: var(--c-text-2); font-size: 12px; line-height: 1;
  user-select: none;
}
.tab:hover { background: #dbe5f3; }
.tab .t { overflow: hidden; text-overflow: ellipsis; }
.tab.on { background: #fff; color: var(--c-primary); font-weight: 600; box-shadow: inset 0 2px 0 var(--c-primary); }
.tab .x { font-style: normal; font-weight: 400; color: #9aa6b8; font-size: 13px; padding: 0 1px; border-radius: 3px; }
.tab .x:hover { background: #dbe4f2; color: var(--c-danger); }
.tab .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-warn); display: inline-block; flex: 0 0 auto; }
.tab-menu {
  position: fixed; z-index: 400; background: #fff; border: 1px solid var(--c-border);
  border-radius: 6px; box-shadow: 0 6px 18px rgba(15,30,60,0.14); padding: 4px;
}
.tab-menu button {
  display: block; width: 100%; text-align: left; padding: 6px 12px; font-size: 12.5px;
  background: none; border: 0; cursor: pointer; border-radius: 4px; color: var(--c-text);
}
.tab-menu button:hover { background: #f2f6fd; }
.pane-host { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.tab-pane { display: none; }
.tab-pane.on { display: block; }
@media (max-width: 720px) { .tabbar { display: none !important; } }

/* ============================================================
   ★第六十二轮（老板点名）：生产排单 →「选单排单」手机版
     · 工具条：竖屏两行、横屏一行
     · 列表整表铺满宽度（table-layout:fixed + 列宽 em），**不许左右拖**
     · 字号 clamp：竖屏小、横屏放大；列宽是 em，跟着字号一起缩放 —— 两屏看到的列一样多
   ★第六十三轮（老板点名）：照他给的《手机选单排单排版样式.xlsx》重排
     · 日期/客户/货号合成**一列两行**（日期只到「月-日」），列宽 24% 左右
     · 其余列宽度比例照样表：颜色 5.4% / 35~40 各 2.4% / 未-总 8.4% / 备注吃剩下的 43.6%
     · 字号比例也照样表（样表基准 11）：尺码 8/11=0.73、备注 10/11=0.91，颜色和未-总是加粗 11
     · 顶部导航整条藏掉（body.pm-chrome），只在搜索框那一行留一个很小的「🏠 回主菜单」
   ============================================================ */
body.pm-chrome .topbar { display: none; }
/* ★第六十六轮：横屏手机宽度 > 720 会开多标签，那条标签栏也得一起藏（老板说顶部导航都不要） */
body.pm-chrome .tabbar { display: none !important; }
/* 铺满整屏：这个页面不要四周的白边和圆角（顶部导航都藏了） */
body.pm-chrome .content > .pm {
  border-radius: 0; border-left: 0; border-right: 0; border-top: 0; flex: 1 1 auto;
}
.pm {
  --pm-fs: clamp(8.8px, 2.35vw, 11px);
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden;
}
@media (orientation: landscape) {
  .pm { --pm-fs: clamp(10.5px, 1.45vw, 14px); }
}

/* ---------- 工具条 ---------- */
.pm-bar {
  flex: 0 0 auto; padding: 6px 7px; border-bottom: 1px solid var(--c-border);
  background: #f7f9fc; display: flex; flex-direction: column; gap: 5px;
}
.pm-r { display: flex; align-items: center; gap: 5px; min-width: 0; }
/* 「回主菜单」—— 老板说做得很小，就一个图标大小 */
.pm-home {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; line-height: 24px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  font-size: 12px; cursor: pointer;
}
.pm-home:active { background: #eef3fb; }
.pm-in {
  flex: 1 1 0; min-width: 0; height: 30px; border: 1px solid var(--c-border);
  border-radius: 7px; padding: 0 6px; font-size: 12px; background: #fff; color: var(--c-text);
}
.pm-in::placeholder { color: #a9b3c2; font-size: 10.5px; }
.pm-sel {
  flex: 0 0 auto; width: 82px; height: 30px;
  border: 1px solid var(--c-border); border-radius: 7px; font-size: 11px;
  padding: 0 1px; background: #fff; color: var(--c-text);
}
.pm-date {
  flex: 1 1 0; min-width: 0; height: 30px; border: 1px solid var(--c-border);
  border-radius: 7px; font-size: 10.5px; padding: 0 2px; background: #fff; color: var(--c-text);
}
/* ★第七十三轮（老板点名）：制单时间 = datetime-local，比纯日期宽一点，别把「2026-10-18 23:07」挤成两行 */
input[type="datetime-local"] { min-width: 176px; }
.docfields input[type="datetime-local"] { width: 176px; }
.pm-date[type="datetime-local"] { min-width: 0; flex: 1 1 132px; font-size: 10.5px; }
/* 排单手机版：制单时间比原来的“排单日期”宽，单给一条（不然显示成 2026/10/18 2…） */
.pmp .pm-r1 .pm-date[type="datetime-local"] { flex: 0 0 136px; min-width: 136px; font-size: 10px; padding: 0 2px; }
.pmp .pm-r2 .pm-date[type="datetime-local"] { flex: 0 0 136px; min-width: 136px; font-size: 10px; }
@media (orientation: landscape) {
  .pmp .pm-r1 .pm-date[type="datetime-local"],
  .pmp .pm-r2 .pm-date[type="datetime-local"] { flex: 0 0 150px; min-width: 150px; font-size: 11px; }
}
.pm-tilde { flex: 0 0 auto; font-size: 11px; color: var(--c-text-2); }
.pm-btn {
  flex: 0 0 auto; height: 30px; padding: 0 7px; font-size: 11.5px; white-space: nowrap;
  border: 1px solid var(--c-border); border-radius: 7px; background: #fff; color: var(--c-text);
  cursor: pointer;
}
.pm-btn:active { background: #eef3fb; }

/* 横屏：两组挤成一行（第一组＝回主菜单+两个搜索框，吃掉剩下的宽度） */
@media (orientation: landscape) {
  .pm-bar { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 6px; }
  .pm-r1 { flex: 1 1 auto; min-width: 180px; }
  .pm-r2 { flex: 0 0 auto; gap: 5px; }
  .pm-r2 .pm-sel { width: 92px; }
  .pm-r2 .pm-date { flex: 0 0 108px; }
}

/* ---------- 列表 ---------- */
.pm-list { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.pm-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--pm-fs); }
/* ★第六十三轮：列宽比例照老板给的样表（样表：日期客户货号 20.875 / 颜色 4.75 / 每个尺码 2.125 /
   未总 7.375 / 备注 38.25 个字宽）。手机多了个勾选框，占 4.2%，其余按样表比例摊 → 合计 100% */
.pm-tbl col.c-ck { width: 4.8%; }
.pm-tbl col.c-info { width: 23.2%; }
.pm-tbl col.c-color { width: 5.2%; }
.pm-tbl col.c-sz { width: 2.9%; }
.pm-tbl col.c-un { width: 10.0%; }
/* 备注列不写宽度 = 吃掉剩下的全部（约 43.6%，跟样表的 38.25 字宽一个比例） */
/* ★第六十四轮（老板点名）：竖屏最左边那个勾选框以前被挤得显示不全 —— 列加宽一点点，
   左右少留点内边距，勾选框本身也放大到 15px、去掉默认外边距，正好放得下 */
.pm-tbl thead th.c-ck,
.pm-tbl tbody td.c-ck { padding-left: 3px; padding-right: 0; }
.pm-tbl thead th.c-ck input,
.pm-tbl tbody td.c-ck input { margin: 0; width: 15px; height: 15px; }

/* ★第六十四轮（老板点名）：横屏照《手机选单排单排横屏版样式.xlsx》——
   日期/客户/图片/货号 排成**一行**（不再上下两行），备注列更宽。
   样表列宽：28 / 4.75 / 2.125×6 / 7.375 / 50.75（合计 103.625），照比例换算成百分比。
   ★ 这一段必须放在上面那些竖屏列宽**后面**，否则同权重会被后面的竖屏值盖掉。 */
@media (orientation: landscape) {
  .pm-tbl col.c-ck { width: 3.4%; }
  .pm-tbl col.c-info { width: 26.1%; }
  .pm-tbl col.c-color { width: 4.4%; }
  .pm-tbl col.c-sz { width: 2.0%; }
  .pm-tbl col.c-un { width: 6.9%; }
  .pm-tbl tbody td.c-info .pm-info { display: flex; align-items: center; gap: 7px; }
  .pm-tbl tbody td.c-info .pm-l1,
  .pm-tbl tbody td.c-info .pm-l2 { flex: 0 1 auto; }
}

.pm-tbl th, .pm-tbl td { padding: 3px 1px; border-bottom: 1px solid #eef1f5; text-align: left; }
.pm-tbl thead th {
  position: sticky; top: 0; z-index: 2; background: #eaf1fb; color: #35496a;
  font-weight: 700; white-space: nowrap; font-size: 0.95em; padding: 4px 2px;
  border-bottom: 1px solid #d9e3f0;
}
.pm-tbl thead th.c-sz { text-align: right; padding-right: 2px; }
.pm-tbl thead th.c-un { text-align: right; padding-left: 4px; }
.pm-tbl tbody td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
/* ---- 第一列：日期/客户/货号（两行）---- */
.pm-tbl tbody td.c-info { padding: 2px 2px 2px 8px; }
/* ★第六十六轮（老板点名）：勾选框离图片太近，点勾选框容易点到图 → 日期/客户/货号整列往右挪一点 */
.pm-tbl thead th.c-info { padding-left: 8px; }
@media (orientation: landscape) {
  .pm-tbl tbody td.c-info { padding-left: 5px; }
  .pm-tbl thead th.c-info { padding-left: 5px; }
}
/* 第一列里是两行：.pm-info 是外层，竖屏竖着排两行；横屏（样式表横屏版）改成一行 */
.pm-tbl tbody td.c-info .pm-l1,
.pm-tbl tbody td.c-info .pm-l2 { display: flex; align-items: center; min-width: 0; }
.pm-tbl tbody td.c-info .pm-l1 { gap: 3px; }
.pm-tbl tbody td.c-info .pm-l1 i {
  flex: 0 0 auto; font-style: normal; color: #8a97a8; font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}
.pm-tbl tbody td.c-info .pm-l1 b,
.pm-tbl tbody td.c-info .pm-l2 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-tbl tbody td.c-info .pm-l1 b { font-weight: 400; }
.pm-tbl tbody td.c-info .pm-l2 { gap: 2px; }
.pm-tbl tbody td.c-info .pm-l2 b { font-weight: 700; }
.pm-tbl tbody td.c-color { font-size: 1em; font-weight: 700; }
.pm-tbl tbody td.c-color span { display: block; overflow: hidden; white-space: nowrap; }
/* 颜色超过 2 个汉字 → 把字缩小（老板点名） */
.pm-tbl tbody td.c-color span.sm { font-size: 0.8em; letter-spacing: -0.03em; }
.pm-tbl tbody td.c-sz {
  text-align: right; padding-right: 0; font-size: 0.73em; font-variant-numeric: tabular-nums;
}
.pm-tbl tbody td.c-sz i { color: #ccd5e2; font-style: normal; }
.pm-tbl tbody td.c-un {
  text-align: right; padding-left: 0; font-variant-numeric: tabular-nums;
  font-size: 0.95em; font-weight: 700; letter-spacing: -0.04em;
}
.pm-tbl tbody td.c-un i { color: #8a97a8; font-style: normal; margin: 0; }
/* 备注：给宽 + 自动换行，最多 3 行（再长就截——td 上的 max-height 对表格单元格无效，
   必须用 line-clamp 才真的截得住）。字号照样表 10/11 */
.pm-tbl tbody td.c-rem { white-space: normal; word-break: break-all; color: var(--c-text-2); padding-left: 3px; border-left: 1px solid #f0f4f9; font-size: 0.91em; }
.pm-tbl tbody td.c-rem > span {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; word-break: break-all; line-height: 1.2;
}
.pm-tbl tbody tr.lock { background: #fafbfc; }
.pm-tbl tbody tr.lock td { color: #a8b1bf; }
.pm-tbl tbody tr.lock td.c-sz i, .pm-tbl tbody tr.lock td.c-un i { color: #d5dbe4; }
.pm-tbl tbody tr:active { background: #f2f7ff; }
/* 货号前面那张小图 —— 比汇总表的 18px 再小一圈（老板说「小小小」）。
   ★第六十三轮：改成跟着字号走的尺寸（1.25em），竖屏才 11px，不会把「货号」挤到下一行 */
.pm-th { display: inline-block; flex: 0 0 auto; width: 1.25em; height: 1.25em; vertical-align: middle; line-height: 0; }
.pm-th img { width: 1.25em; height: 1.25em; border-radius: 2px; object-fit: cover; display: block; }
/* 表头里「35 36 …」照样表是 8 号字（正文 11 的 0.73） */
.pm-tbl thead th.c-sz { font-size: 0.7em; letter-spacing: -0.02em; }

/* ============================================================
   ★第六十五轮（老板点名）：排单编辑页的手机版（`.pmp`）
     列比选单页少一个勾选框，多一个「本次/未」（里头是能改的件数），所以比例单独一套：
       竖屏 26 / 5.4 / 3.2×6 / 11.5 / 剩下 37.9
       横屏 29 / 4.6 / 2.4×6 / 8   / 剩下 46
   ============================================================ */
.pmp .pm-tbl col.c-info { width: 26%; }
.pmp .pm-tbl col.c-color { width: 5.4%; }
.pmp .pm-tbl col.c-sz { width: 3.2%; }
.pmp .pm-tbl col.c-un { width: 11.5%; }
@media (orientation: landscape) {
  .pmp .pm-tbl col.c-info { width: 29%; }
  .pmp .pm-tbl col.c-color { width: 4.6%; }
  .pmp .pm-tbl col.c-sz { width: 2.4%; }
  .pmp .pm-tbl col.c-un { width: 8%; }
}
/* 工具条：日期窄一点，单号/状态吃剩下的 */
.pmp .pm-r1 .pm-date { flex: 0 0 96px; }
.pmp-no {
  flex: 1 1 auto; min-width: 0; font-size: 0.98em; color: var(--c-text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pmp-mode { width: 82px; }
.pm-btn-pri { background: var(--c-primary); color: #fff; border-color: var(--c-primary); font-weight: 700; }
.pm-btn-pri:active { filter: brightness(0.94); }

/* 删掉这一行的小 × —— 挂在信息格右上角，别占列宽 */
.pmp .pm-tbl tbody td.c-info { position: relative; }
.pm-x {
  position: absolute; right: 0; top: 0; width: 15px; height: 15px; padding: 0;
  border: 0; border-radius: 0 3px 0 6px; background: rgba(255, 255, 255, .85);
  color: #c3ccda; font-size: 12px; line-height: 14px; cursor: pointer;
}
.pm-x:active { color: var(--c-danger); }

/* 「本次/未」：上面是件数输入框，下面是 /未排件数 */
.pm-un { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.pm-un i { font-style: normal; font-size: 0.72em; color: #8a97a8; font-variant-numeric: tabular-nums; }
.pm-pack {
  width: 2.9em; height: 1.75em; padding: 0 1px; text-align: center;
  font-size: 0.95em; font-weight: 700; color: var(--c-text);
  border: 1px solid #c9d4e4; border-radius: 4px; background: #fff;
}
.pm-pack:disabled { background: #f4f6fa; color: #a8b1bf; border-color: #e4e9f1; }

/* ---------- 底部：已勾多少 + 加进排单 ---------- */
.pm-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-top: 1px solid var(--c-border); background: #fff;
}
.pm-sum { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--c-text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-sum b { color: var(--c-primary); }
.pm-ok {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border: 0; border-radius: 8px;
  background: var(--c-primary); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.pm-ok:active { filter: brightness(0.94); }

/* ★第七十轮：手机上组合框的条目做大一点（手指好点），下拉最多占半屏 */
@media (max-width: 720px) {
  .combo > .combo-in { min-height: 36px; }
  .combo-item { padding: 9px 10px; }
  .combo-pop { max-height: 46vh; }
}

/* ============================================================
   ★第七十六轮（老板点名）：款式-颜色-尺码数量汇总表
     · 电脑：货号 | 图 | 颜色 | 35~43 | 总双数 | 小码 大码 加大码 | 小 中 大 加大
             列间距压窄、首列（货号）冻结、不同货号之间空一行
     · 手机：41 / 42 / 43 / 加大码 / 加大 **只隐藏显示**（数照样算进总双数），
             数字更小、居中，上方只留一个搜索框 + 一个回主页图标

   ★★ 选择器前面必须带 `table.grid.rep-tbl`：
      样式表里那条 `.grid.rep-tbl th` 是两个类 + 两个标签，
      只写 `.scs-tbl th`（一个类）会被它整条盖掉（踩过：字号/内边距全不生效）。
   ============================================================ */
table.grid.rep-tbl.scs-tbl { table-layout: fixed; width: 100%; font-size: 12.5px; }
table.grid.rep-tbl.scs-tbl th,
table.grid.rep-tbl.scs-tbl td { padding: 4px 2px; }          /* ★ 列间距压窄 */
table.grid.rep-tbl.scs-tbl th { font-size: 11.5px; white-space: nowrap; }
table.grid.rep-tbl.scs-tbl .gsep { border-left: 2px solid #dbe3ef; }
table.grid.rep-tbl.scs-tbl td.c-code b { font-weight: 700; }
table.grid.rep-tbl.scs-tbl tr.rep-total td { font-weight: 700; background: #f7f9fc; }

/* ★ 数字一律居中（老板点名） */
table.grid.rep-tbl.scs-tbl th.num,
table.grid.rep-tbl.scs-tbl td.num { text-align: center; }

/* ★ 货号右边那张「很小很小很小」的图 */
table.grid.rep-tbl.scs-tbl td.c-img { padding: 0 1px; text-align: center; }
table.grid.rep-tbl.scs-tbl td.c-img img.thumb-xs {
  width: 15px; height: 15px; border-radius: 2px; object-fit: cover;
  cursor: zoom-in; display: inline-block; vertical-align: middle;
}
table.grid.rep-tbl.scs-tbl th.c-img { padding: 0; }

/* ★ 两个不同货号之间空一行（同货号不同颜色挨着，不空） */
table.grid.rep-tbl.scs-tbl tr.scs-gap td {
  height: 7px; padding: 0; border-bottom: none; background: #fff;
}

/* ★ 首列（货号）冻结：往右拖 / 往下翻都还在 */
table.grid.rep-tbl.scs-tbl th.c-code,
table.grid.rep-tbl.scs-tbl td.c-code {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 #e8eef7;
}
table.grid.rep-tbl.scs-tbl thead th.c-code { z-index: 4; }

/* 列宽（电脑）—— 百分比 + fixed，一屏铺满，不出横向滚动条
   （第226轮把第225轮为「已发双」让出来的宽度全部还原，合计仍是 99.6%） */
table.grid.rep-tbl.scs-tbl th.c-code { width: 8%; }
table.grid.rep-tbl.scs-tbl th.c-img { width: 2.6%; }
table.grid.rep-tbl.scs-tbl th.c-color { width: 5.8%; }
table.grid.rep-tbl.scs-tbl th.c-s35, table.grid.rep-tbl.scs-tbl th.c-s36,
table.grid.rep-tbl.scs-tbl th.c-s37, table.grid.rep-tbl.scs-tbl th.c-s38,
table.grid.rep-tbl.scs-tbl th.c-s39, table.grid.rep-tbl.scs-tbl th.c-s40,
table.grid.rep-tbl.scs-tbl th.c-s41, table.grid.rep-tbl.scs-tbl th.c-s42,
table.grid.rep-tbl.scs-tbl th.c-s43 { width: 4.7%; }
table.grid.rep-tbl.scs-tbl th.c-total { width: 6.4%; }
table.grid.rep-tbl.scs-tbl th.c-smallCode { width: 5.6%; }
table.grid.rep-tbl.scs-tbl th.c-bigCode { width: 5.6%; }
table.grid.rep-tbl.scs-tbl th.c-xbigCode { width: 6%; }
table.grid.rep-tbl.scs-tbl th.c-small { width: 4.2%; }
table.grid.rep-tbl.scs-tbl th.c-mid { width: 4.2%; }
table.grid.rep-tbl.scs-tbl th.c-big { width: 4.2%; }
table.grid.rep-tbl.scs-tbl th.c-xbig { width: 4.7%; }

/* ★ 手机：数字再小一号、行更紧；百分比只给到 ~80%，
   剩下的浏览器按比例摊回每一列（每列实际放大 1.25 倍），三位/四位数也不会被切 */
/* 手机用「按内容自适应」：宽度由内容决定，整表刚好铺满屏宽，绝不会切字
   （固定布局 + 百分比试过：边线和内边距会把三位数切掉半个字） */
table.grid.rep-tbl.scs-tbl.scs-phone { table-layout: auto; font-size: 9px; }
table.grid.rep-tbl.scs-tbl.scs-phone th { width: auto; }
table.grid.rep-tbl.scs-tbl.scs-phone th,
table.grid.rep-tbl.scs-tbl.scs-phone td { padding: 2px 1px; font-size: 9px; }
table.grid.rep-tbl.scs-tbl.scs-phone th {
  font-size: 8.5px; letter-spacing: -0.04em; white-space: nowrap;
}
table.grid.rep-tbl.scs-tbl.scs-phone td { letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
table.grid.rep-tbl.scs-tbl.scs-phone .m-hide { display: none; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-code { width: 9.4%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-img { width: 3.2%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-color { width: 5.6%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-s35, table.grid.rep-tbl.scs-tbl.scs-phone th.c-s36,
table.grid.rep-tbl.scs-tbl.scs-phone th.c-s37, table.grid.rep-tbl.scs-tbl.scs-phone th.c-s38,
table.grid.rep-tbl.scs-tbl.scs-phone th.c-s39, table.grid.rep-tbl.scs-tbl.scs-phone th.c-s40 { width: 4.4%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-total { width: 6.1%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-smallCode { width: 6.5%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-bigCode { width: 6.5%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-small { width: 4.6%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-mid { width: 4.6%; }
table.grid.rep-tbl.scs-tbl.scs-phone th.c-big { width: 4.6%; }
table.grid.rep-tbl.scs-tbl.scs-phone td.c-img img.thumb-xs { width: 12px; height: 12px; }
table.grid.rep-tbl.scs-tbl.scs-phone tr.scs-gap td { height: 5px; }

/* 手机横屏：屏幕宽了，字略放大（列宽还是按比例，照样铺满） */
@media (orientation: landscape) {
  table.grid.rep-tbl.scs-tbl.scs-phone { font-size: clamp(9px, 1.3vw, 12px); }
  table.grid.rep-tbl.scs-tbl.scs-phone th,
  table.grid.rep-tbl.scs-tbl.scs-phone td { font-size: clamp(9px, 1.3vw, 12px); }
  table.grid.rep-tbl.scs-tbl.scs-phone th { font-size: clamp(8.5px, 1.2vw, 11px); }
}

/* 手机版：标题、说明、导出按钮全不要（老板点名：只要搜索框 + 回主页） */
.scs-card.scs-phone .rep-title { display: none; }
.scs-card.scs-phone .scs-hide-m { display: none; }

/* ============================================================
   ★第七十六轮（老板点名）：全站表格「首列冻结」
     往下翻 / 往右拖的时候，第一列始终看得见。
     只对 `table.grid`（数据表格）生效；卡片式手机版（.m2/.am）不是表格，不受影响。
   ============================================================ */
.content table.grid thead th:first-child,
.content table.grid tbody td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 #eef1f6;
}
.content table.grid thead th:first-child { z-index: 4; }
/* 状态色行（草稿/已审核/已取消）的第一格要跟着变色，不然会露出一块白 */
.content table.grid tbody tr.st-DRAFT > td:first-child { background: #fffcf5; }
.content table.grid tbody tr.st-AUDITED > td:first-child { background: #f4fbf6; }
.content table.grid tbody tr.st-CANCELLED > td:first-child { background: #fbf4f4; }
.content table.grid tbody tr:hover > td:first-child { background: #f6f9ff; }

/* ============================================================
   ★第七十六轮：手机版通用「紧凑表格」
     之前没专门做手机版的那些页面，靠这一层统一压紧：
     字号小一号、内边距压到最小、说明文字全部收起来。
     已经单独做过手机版的（.pm-tbl 选单页 / .scs-tbl 本表）排除在外。
   ============================================================ */
@media (max-width: 720px) {
  .content table.grid:not(.scs-tbl):not(.pm-tbl) { font-size: 10.5px; }
  .content table.grid:not(.scs-tbl):not(.pm-tbl) th,
  .content table.grid:not(.scs-tbl):not(.pm-tbl) td {
    padding: 3px 4px; font-size: 10.5px; line-height: 1.45;
  }
  .content table.grid:not(.scs-tbl):not(.pm-tbl) thead th { font-size: 10px; padding: 4px 4px; }
  .content .rep-note, .content .bom-hint, .content .rep-title .rep-note { display: none !important; }
  .content .rep-title { font-size: 13px; gap: 6px; }
}

/* ★ 第七十六轮：手机上工具条也收紧一点（按钮/下拉/输入框小一号、间距更小），
   不然一屏里光筛选和按钮就占掉半屏（老板要「简洁」）。 */
@media (max-width: 720px) {
  .content .toolbar { gap: 5px; row-gap: 5px; padding: 8px 10px; }
  .content .toolbar .btn,
  .content .toolbar .btn-sm { font-size: 11.5px; padding: 0 8px; height: 28px; line-height: 26px; }
  .content .toolbar select,
  .content .toolbar input[type="date"],
  .content .toolbar .dr-d,
  .content .toolbar .dr-sel { font-size: 11px; height: 28px; }
  .content .searchbox input { font-size: 12px; height: 28px; }
}

/* ============================================================
   ★第七十七轮：重要材料（清单页 + 监测表）
   ============================================================ */

/* ---- 清单页（基础档案 → 重要材料） ---- */
table.grid.rep-tbl.km-tbl { font-size: 13px; }
table.grid.rep-tbl.km-tbl th { font-size: 12.5px; white-space: nowrap; }
table.grid.rep-tbl.km-tbl td { padding: 5px 6px; }
table.grid.rep-tbl.km-tbl input.km-safe {
  width: 84px; height: 28px; text-align: right; font-size: 13px;
}
table.grid.rep-tbl.km-tbl .km-del {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--c-text-2);
}
table.grid.rep-tbl.km-tbl .km-del:hover { color: var(--c-danger); text-decoration: underline; }

/* ---- 监测表（电脑，逐码全展开） ---- */
table.grid.rep-tbl.km-wide { font-size: 12.5px; }
table.grid.rep-tbl.km-wide th,
table.grid.rep-tbl.km-wide td { padding: 3px 2px; }
table.grid.rep-tbl.km-wide th { font-size: 11.5px; white-space: nowrap; }
table.grid.rep-tbl.km-wide th.grp { font-size: 12px; background: #eef3fa; }
table.grid.rep-tbl.km-wide th.num,
table.grid.rep-tbl.km-wide td.num { text-align: center; }
table.grid.rep-tbl.km-wide th.grpstart,
table.grid.rep-tbl.km-wide td.grpstart { border-left: 2px solid #cfd9e8; }
table.grid.rep-tbl.km-wide td.col-mat { max-width: 14em; overflow: hidden; }
table.grid.rep-tbl.km-wide td.col-mat .ell {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.grid.rep-tbl.km-wide .km-code { display: block; font-size: 10.5px; color: var(--c-muted); }

/* 首列（材料名）冻结 —— 往右拖也还看得见盯的是哪个材料 */
table.grid.rep-tbl.km-wide th:first-child,
table.grid.rep-tbl.km-wide td.col-mat {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 #e8eef7;
}
table.grid.rep-tbl.km-wide thead th:first-child { z-index: 4; background: #eaf1fb; }
table.grid.rep-tbl.km-wide tbody tr.rep-short td.col-mat { background: #fdf5f4; }

/* 数字：负数红、关键列加粗 */
table.grid.rep-tbl.km-tbl td.km-neg { color: var(--c-danger); font-weight: 700; }
table.grid.rep-tbl.km-tbl td.km-key { font-weight: 700; }
table.grid.rep-tbl.km-tbl td.km-buy { color: var(--c-danger); font-weight: 700; }
.km-dim { color: var(--c-muted); }

/* 状态灯 */
.km-tag {
  display: inline-block; padding: 1px 6px; border-radius: 9px;
  font-size: 11px; line-height: 16px; white-space: nowrap;
}
.km-lv3 { background: #fde8e6; color: #a3231a; font-weight: 700; }
.km-lv2 { background: #fdf1e0; color: #8a5200; }
.km-lv1 { background: #fdf8e0; color: #7a6200; }
.km-lv0 { background: #eef3f8; color: #7b8794; }
table.grid.rep-tbl.km-tbl td.km-st { text-align: center; }

/* 顶部提醒条 */
.km-warnbox {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 8px;
  background: #fff8f7; border: 1px solid #f3c9c4;
  font-size: 12.5px; line-height: 1.75; color: #7a2b22;
}
.km-warnbox.km-warn-hard { background: #fdecea; border-color: #f0b6b0; }
.km-warn-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-danger); margin-right: 6px; vertical-align: 1px;
}
.km-warn-dot.km-dot-2 { background: var(--c-warn); }
.km-warn-note { color: var(--c-text-2); font-size: 12px; }
.km-oa {
  font-size: 12.5px; color: var(--c-text-2);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.km-oa input { width: 14px; height: 14px; margin: 0; }

/* 添加材料弹窗里的表格 */
table.grid.kmp-tbl { font-size: 13px; }
table.grid.kmp-tbl th { font-size: 12px; white-space: nowrap; }
table.grid.kmp-tbl td.num { text-align: right; }
table.grid.kmp-tbl td.col-mat .ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 手机版监测表：只留总量几列，逐码藏掉 ---- */
@media (max-width: 720px) {
  .content table.grid.rep-tbl.km-phone-tbl {
    table-layout: auto; width: 100%; font-size: 11px;
  }
  .content table.grid.rep-tbl.km-phone-tbl th,
  .content table.grid.rep-tbl.km-phone-tbl td { padding: 4px 3px; font-size: 11px; }
  .content table.grid.rep-tbl.km-phone-tbl th { font-size: 10.5px; }
  .content table.grid.rep-tbl.km-phone-tbl td.col-mat { max-width: none; }
  .content table.grid.rep-tbl.km-phone-tbl .km-code { font-size: 9.5px; }
  .content table.grid.rep-tbl.km-phone-tbl td.km-neg { font-size: 11px; }
  .content .km-tag { font-size: 9.5px; padding: 0 4px; line-height: 15px; }
  .content .km-warnbox { font-size: 11px; padding: 7px 9px; line-height: 1.6; }
  .content .km-oa { display: none; }
}

/* 清单页在手机上：规格 / 单位 / 已预占 这三列先收起来，留出材料名和安全库存的宽度 */
@media (max-width: 720px) {
  .content table.grid.rep-tbl.km-list th:nth-child(3),
  .content table.grid.rep-tbl.km-list td:nth-child(3),
  .content table.grid.rep-tbl.km-list th:nth-child(4),
  .content table.grid.rep-tbl.km-list td:nth-child(4),
  .content table.grid.rep-tbl.km-list th:nth-child(6),
  .content table.grid.rep-tbl.km-list td:nth-child(6) { display: none; }
  .content table.grid.rep-tbl.km-list input.km-safe { width: 68px; height: 26px; font-size: 12px; }
  .content table.grid.rep-tbl.km-list th:nth-child(1) { width: 44% !important; }
}

/* 材料名前面那个状态圆点（跟着冻结的首列走，横滚也看得见） */
.km-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: 1px; flex: none;
}
.km-d3 { background: #d93025; box-shadow: 0 0 0 2px rgba(217, 48, 37, .15); }
.km-d2 { background: #e08a00; }
.km-d1 { background: #d4a800; }
.km-d0 { background: #c9d2dd; }

/* ============================================================
   ★第七十八轮（老板点名）：发货明细按 `选单发货编辑界面排版.xlsx` 重排
   列宽按 Excel 那套 cols width 的比例折算；固定布局 + 百分比 → 一屏铺满
   ★★★第211轮：加了 3 列之后百分比合计超 100%，fixed + width:100% 会把每一列
   都按比例压缩（货号 / 颜色 又被挤扁）。改成 `width:auto` —— fixed 布局下
   width:auto 的表格宽度 = 各列指定像素之和，超屏就交给外层横向滚动。
   ============================================================ */
table.grid.docgrid.ship-tbl { table-layout: fixed; width: auto; min-width: 100%; }
table.grid.docgrid.ship-tbl th,
table.grid.docgrid.ship-tbl td { padding: 4px 3px; }
table.grid.docgrid.ship-tbl th { font-size: 11.5px; white-space: nowrap; }
table.grid.docgrid.ship-tbl td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.grid.docgrid.ship-tbl td.num { overflow: visible; }
/* 货号下面那行款名（Excel 里没这一栏，但删掉不好认，就缩成小字挂在货号底下） */
table.grid.docgrid.ship-tbl td .sz-sub {
  display: block; font-size: 10.5px; font-weight: 400;
  color: var(--c-text-2); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 「本次发货」那一格要塞输入框，别被固定布局挤成看不见 */
table.grid.docgrid.ship-tbl td input.bom-in {
  width: 100%; min-width: 0; text-align: center; height: 26px; font-size: 12.5px;
}

/* ============================================================
   ★第八十轮（老板点名）：一张发货单可能跨好几个客户 —— 客户名要全列出来
   ============================================================ */
label.fld.ship-cust-fld { min-width: 200px; max-width: 300px; }
.ship-custs {
  display: flex; flex-wrap: wrap; gap: 4px;
  min-height: 32px; padding: 5px 8px;
  border: 1px solid var(--c-border); border-radius: 6px;
  background: #f4f7fc; font-size: 12.5px; line-height: 1.5;
  max-height: 76px; overflow-y: auto; word-break: break-all;
}
.ship-cust { color: var(--c-text); }
.ship-cust + .ship-cust::before { content: '、'; margin-right: 2px; color: var(--c-muted); }

/* ============================================================
   ★第八十一轮（老板点名）：财务管理 → 客户欠款看板
   ============================================================ */
.fin-kpi {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0 0 10px;
}
.fin-kpi-item {
  flex: 1 1 150px; min-width: 140px;
  padding: 9px 12px; border-radius: 8px;
  background: #f6f8fc; border: 1px solid #e3e9f3;
}
.fin-kpi-item > span { display: block; font-size: 11.5px; color: var(--c-text-2); margin-bottom: 3px; }
.fin-kpi-item > b { font-size: 17px; font-weight: 700; color: var(--c-text); }
.fin-kpi-item > b > i { font-size: 12px; font-weight: 400; color: var(--c-text-2); font-style: normal; }
.fin-kpi-cur { background: #eef3fa; }
.fin-num-red { color: var(--c-danger) !important; }

table.grid.rep-tbl.fin-tbl { font-size: 12.5px; }
table.grid.rep-tbl.fin-tbl th { font-size: 11.5px; white-space: nowrap; }
table.grid.rep-tbl.fin-tbl th.num,
table.grid.rep-tbl.fin-tbl td.num { text-align: right; }
table.grid.rep-tbl.fin-tbl td.col-mat { max-width: 15em; overflow: hidden; }
table.grid.rep-tbl.fin-tbl td.col-mat .ell {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.grid.rep-tbl.fin-tbl .km-code { display: block; font-size: 10.5px; color: var(--c-muted); }
table.grid.rep-tbl.fin-tbl td.fin-owe { color: var(--c-danger); font-weight: 700; }
table.grid.rep-tbl.fin-tbl td.fin-over { color: var(--c-danger); font-weight: 700; background: #fdf1f0; }
table.grid.rep-tbl.fin-tbl tr.rep-total td { font-weight: 700; background: #f7f9fc; }

/* 手机：只留客户 / 欠款 / 账龄 / 状态 四列，其余藏掉 */
@media (max-width: 720px) {
  .fin-kpi-item { flex: 1 1 46%; min-width: 0; padding: 7px 9px; }
  .fin-kpi-item > b { font-size: 14px; }
  .content table.grid.rep-tbl.fin-tbl { font-size: 11px; }
  .content table.grid.rep-tbl.fin-tbl th,
  .content table.grid.rep-tbl.fin-tbl td { padding: 4px 3px; font-size: 11px; }
  .content table.grid.rep-tbl.fin-tbl th:nth-child(2),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(2),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(3),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(3),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(4),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(4),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(5),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(5),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(6),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(6),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(9),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(9),
  .content table.grid.rep-tbl.fin-tbl th:nth-child(12),
  .content table.grid.rep-tbl.fin-tbl td:nth-child(12) { display: none; }
}

/* 订单上那两颗收款控件 */
label.fld.so-pay { min-width: 250px; }
label.fld.so-pay input { width: 96px; text-align: right; }
.so-cash-btn { border: 0; cursor: pointer; font-family: inherit; }

/* ★第八十二轮：排产列表「领料单」列——部分领料时补一行小字 */
.pick-part { color: var(--c-text-2); font-size: 11.5px; }

/* ============================================================
   ★第八十三轮（老板点名）：BOM 跨货号整份复制
   ============================================================ */
.bc-src {
  padding: 9px 12px; border-radius: 8px;
  background: #f4f7fc; border: 1px solid #e2e9f4;
  font-size: 13px; line-height: 1.6; margin-bottom: 12px;
}
.bc-dim { color: var(--c-text-2); font-size: 12px; }
.bc-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.bc-tab {
  padding: 6px 16px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff;
  font-size: 13px; font-family: inherit; color: var(--c-text);
}
.bc-tab.on {
  background: var(--c-primary, #2563eb); border-color: var(--c-primary, #2563eb);
  color: #fff; font-weight: 500;
}
.bc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
}
.bc-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.bc-f > span { color: var(--c-text-2); }
.bc-f input, .bc-f select {
  height: 32px; padding: 0 8px; font-size: 13px;
  border: 1px solid var(--c-border); border-radius: 6px; font-family: inherit;
}
.bc-f .req { color: var(--c-danger); }
.bc-check {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 12.5px; cursor: pointer;
}
.bc-check input { width: 15px; height: 15px; margin: 0; }
@media (max-width: 720px) {
  .bc-grid { grid-template-columns: 1fr; }
  .bc-tab { padding: 5px 10px; font-size: 12px; }
}

/* ============================================================
   ★第八十四轮（老板点名）：一张大单按供应商拆成若干张小进货单
   ============================================================ */
.buy-split-hint {
  margin: 0 0 10px; padding: 8px 12px; border-radius: 7px;
  background: #f2f7ff; border: 1px solid #d8e4f7;
  font-size: 12.5px; line-height: 1.7; color: #2b4a75;
}
.buy-split-hint b { font-weight: 500; }
/* 明细多一列供应商：材料列稍微收一点，别把尺码挤出去 */
table.grid.docgrid.buy-split td .combo > .combo-in { padding: 5px 24px 5px 8px; }
table.grid.docgrid.buy-split th { font-size: 11.5px; }
/* 拆分结果弹窗 */
table.grid.docgrid.bs-tbl { font-size: 13px; }
table.grid.docgrid.bs-tbl th { font-size: 12px; white-space: nowrap; }
table.grid.docgrid.bs-tbl tbody tr[data-go] { cursor: pointer; }
table.grid.docgrid.bs-tbl tbody tr[data-go]:hover td { background: #f5f9ff; }
table.grid.docgrid.bs-tbl td b { color: var(--c-primary); }
@media (max-width: 720px) {
  .buy-split-hint { font-size: 11px; padding: 7px 9px; }
}

/* ============================================================
   ★第八十六轮（老板点名）：款式-颜色-尺码汇总表
   光「隔一行」他还会看偏 → 空行加高 + 每个款式的整块交替浅底色（斑马纹）
   手机版同一套规则（同一个 class，只是空行矮一点）
   ============================================================ */
table.grid.rep-tbl.scs-tbl tr.scs-gap td {
  height: 16px; padding: 0; border-bottom: none; background: transparent;
}
/* 冻结的首列也要跟着变色，不然一列白、一列蓝，看着像断开 */
table.grid.rep-tbl.scs-tbl tbody tr.scs-alt td,
table.grid.rep-tbl.scs-tbl tbody tr.scs-alt td.c-code {
  background: #f2f7ff;
}
table.grid.rep-tbl.scs-tbl tbody tr.scs-alt td.c-code { box-shadow: 1px 0 0 #e2eaf6; }

@media (max-width: 720px) {
  table.grid.rep-tbl.scs-tbl tr.scs-gap td { height: 11px; }
  table.grid.rep-tbl.scs-tbl tbody tr.scs-alt td,
  table.grid.rep-tbl.scs-tbl tbody tr.scs-alt td.c-code { background: #edf4ff; }
}

/* 手机版：货号旁边那张小图把字压住了（图列被摊成 0 宽，15px 的图溢出去）
   → 给图列一个固定的小宽度，图缩到 11px，货号右边留 3px 喘息 */
@media (max-width: 720px) {
  table.grid.rep-tbl.scs-tbl.scs-phone th.c-img,
  table.grid.rep-tbl.scs-tbl.scs-phone td.c-img {
    width: 13px; min-width: 13px; max-width: 13px; padding: 0;
  }
  table.grid.rep-tbl.scs-tbl.scs-phone td.c-img img.thumb-xs {
    width: 11px; height: 11px; border-radius: 1px;
  }
  table.grid.rep-tbl.scs-tbl.scs-phone td.c-code { padding-right: 3px; }
}

/* 手机版：小图跟着货号走（原来的图列在手机上不占位了） */
table.grid.rep-tbl.scs-tbl.scs-phone td.c-code { width: 13%; }
table.grid.rep-tbl.scs-tbl.scs-phone td.c-code .scs-i {
  display: inline-block; margin-left: 3px; vertical-align: middle;
}
table.grid.rep-tbl.scs-tbl.scs-phone td.c-code .scs-i img.thumb-xs {
  width: 11px; height: 11px; border-radius: 1px;
}

/* 手机版空行：auto 布局下光写 height 会被压回去，用 line-height 撑 */
@media (max-width: 720px) {
  table.grid.rep-tbl.scs-tbl.scs-phone tr.scs-gap td {
    height: 11px; min-height: 11px; line-height: 11px; font-size: 0; padding: 0;
  }
}

/* ============================================================
   ★第九十轮（老板点名）：销售订单汇总表 = 老板模板那 37 列
   货号列里带 18px 小图（模板里没有单独的图片列，图跟着货号走）
   ============================================================ */
table.grid.rep-tbl.rpo-37 td.col-code img.thumb-xs {
  vertical-align: middle; margin-right: 3px; border-radius: 2px;
}
table.grid.rep-tbl.rpo-37 td.col-code { white-space: nowrap; }
/* 收款状态那格：字小一点，免得把行撑高 */
table.grid.rep-tbl.rpo-37 td.paycell { font-size: 11.5px; color: var(--c-text-2); white-space: nowrap; }
/* ============================================================
   ★★★第442轮（老板）：「拖动滑块向右的时候帮我冻结 下单时间、客户、货号、颜色、总双数」
     · 左侧 4 列冻住（下单时间 / 客户 / 货号 / 颜色）；
     ·「交货日」**不冻** —— sticky 的 left 跳过它的宽度，滚起来它滑到「客户」底下被盖住，
       冻结区里就不会留出一条 80px 的空缝（老板选的「只冻 4 列」）；
     ·「总双数」单独钉在右边（它离左边太远，连不成一片）。
   ★ 宽度由 JS 量出来写进 --rf3/--rf4/--rf5（这张表 table-layout:auto、「客户」列是 8em，
     写死像素换个字号就错位），CSS 里只给兜底值。
   ★ background 一律**不带 !important**：行底色（发货状态）是 td 上的 !important，
     让它照旧压得住，只有没底色的普通行才吃这里的白底。
   ★ z-index：数据格 3、表头 5 —— 必须高于 .rep-scroll thead th 的 2，否则竖滚时表头被数据盖住。
   ============================================================ */
#rpoWrap.rpo-frz thead th:nth-child(1),
#rpoWrap.rpo-frz tbody td:nth-child(1) { position: sticky; left: 0; z-index: 3; background: #fff; }
#rpoWrap.rpo-frz thead th:nth-child(3),
#rpoWrap.rpo-frz tbody td:nth-child(3) { position: sticky; left: var(--rf3, 108px); z-index: 3; background: #fff; }
#rpoWrap.rpo-frz thead th:nth-child(4),
#rpoWrap.rpo-frz tbody td:nth-child(4) { position: sticky; left: var(--rf4, 236px); z-index: 3; background: #fff; }
#rpoWrap.rpo-frz thead th:nth-child(5),
#rpoWrap.rpo-frz tbody td:nth-child(5) { position: sticky; left: var(--rf5, 364px); z-index: 3;
  background: #fff; box-shadow: 1px 0 0 #e3e8f0; }
#rpoWrap.rpo-frz thead th:nth-child(-n+5) { z-index: 5; background: #f7f9fc; }
/* 总双数钉在右边 —— 它现在是**最后一列**（第 37 列）：position:sticky 的 right 只对最后一列有效，
   中间那列怎么设都不会贴边，所以第 442 轮把它从第 17 列挪到了最末（数据没变，只是列序）。 */
#rpoWrap.rpo-frz thead th:nth-child(37),
#rpoWrap.rpo-frz tbody tr[data-order] td:nth-child(37),
#rpoWrap.rpo-frz tr.rep-total td:last-child {
  position: sticky; right: 0; z-index: 3; background: #fff;
  /* 右侧钉住的那列会盖住底下的列 —— 给一道投影，让人一眼看出「这是钉住的」，不是表格坏了 */
  box-shadow: -1px 0 0 #e3e8f0, -6px 0 8px -6px rgba(20, 35, 60, .22);
}
#rpoWrap.rpo-frz thead th:nth-child(37) { z-index: 5; background: #f7f9fc; }


/* ============================================================
   ★第九十三轮（老板点名）：标签打印
   —— 只在「打标签 / 标签模板」两页里用到，样式全前缀 lbl-，不碰任何现有页面
   ============================================================ */
.lbl-tabs { display: flex; gap: 6px; }
.lbl-tab {
  border: 1px solid var(--c-border); background: #fafbfc; color: var(--c-text);
  padding: 5px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.lbl-tab.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* 表格里的数字格 */
table.lbl-tbl td.num input {
  width: 58px; text-align: center; padding: 2px 4px; font-size: 12.5px;
  border: 1px solid var(--c-border); border-radius: 5px; background: #fff;
}
table.lbl-tbl td.num input:focus { outline: none; border-color: var(--c-primary); }
table.lbl-tbl .lbl-tagtype {
  display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11px;
  background: #f0f7ff; color: #1677ff; border: 1px solid #d6e6ff; white-space: nowrap;
}

/* 标签本体：宽高由 JS 按 mm 写死 */
.lbl {
  position: relative; background: #fff; color: #000; overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
/* ★★★第272轮（老板）：「大标签打出来文字是躺着的，顺时针转 90°」
   .lbl-rot 是「旋转后尺寸」的外壳，里面 .lbl 保持原尺寸 + transform 旋转。
   ★ 外壳必须 position:relative + overflow:hidden：布局尺寸才对（分页靠它），转出去的部分裁掉。 */
.lbl-rot { position: relative; overflow: hidden; }
.lbl-rot > .lbl { position: absolute; left: 0; top: 0; }
.lbl .lbl-b { position: absolute; white-space: pre; line-height: 1.05; }
/* ★★★第282轮（老板）：小标签双排 —— 单数尺码补一张「本码结束」，换货号插一整行全黑。
   ★ 两者外框跟普通标签同宽同高（JS 按 t.w_mm / h_mm 写死），
     否则 clipLabelHeight 统一改高、fitToPage 只量首页 → 整批会被压小、黑底被截。 */
.lbl-special .lbl-sp-fill { position: absolute; inset: 0; background: #000; }
.lbl-special .lbl-sp-in {
  position: absolute; inset: 0; box-sizing: border-box; background: #fff;
  border: 0.8mm solid #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; overflow: hidden;
}
.lbl-special .lbl-sp-big { font-weight: 800; line-height: 1.12; letter-spacing: .2mm; white-space: nowrap; color: #000; }
.lbl-special .lbl-sp-sub { line-height: 1.25; margin-top: .7mm; white-space: nowrap; color: #000; }
.lbl .blk-bar svg, #tplCanvas .blk-bar svg { display: block; width: 100%; height: 100%; }
/* ★★★第327轮（老板）：二维码块 —— svg 撑满块，白边（静区）已经画在 viewBox 里了，
   这里只留一丁点内边距防止贴边裁到白边。 */
.lbl .blk-qr, #tplCanvas .blk-qr { padding: 0.2mm; box-sizing: border-box; }
.lbl .blk-qr svg, #tplCanvas .blk-qr svg { display: block; width: 100%; height: 100%; }
/* ★★★第278轮（老板）：「条码字段分两部分 —— 图形 + 下面的编号」：
   整块是竖排 flex，图形吃掉剩下的高度，编号固定高（字号 mm 写在行内 style 上），
   两者之间空多少由 margin-top（bnGap）决定。 */
.lbl .blk-bar, #tplCanvas .blk-bar { display: flex; flex-direction: column; }
.lbl .blk-bar > .bar-svg, #tplCanvas .blk-bar > .bar-svg { flex: 1 1 auto; min-height: 0; display: flex; }
.lbl .blk-bar > .bar-svg > svg, #tplCanvas .blk-bar > .bar-svg > svg { width: 100%; height: 100%; }
.lbl .blk-bar > .bar-bn, #tplCanvas .blk-bar > .bar-bn {
  flex: 0 0 auto; text-align: center; line-height: 1; white-space: nowrap; overflow: hidden;
}
/* ★★★第279轮（老板）：「图形和文字要能自由分配 / 自由拉伸」——
   · 给了「图形占高 %」就在 .bar-svg 上写 flex:0 0 X%（行内），编号吃掉剩下的高度；
   · 勾了「编号撑满」的编号外面多一层 .bn-t，由 fitTextBlocks 按可用区域等比缩放；
   · 指定了「点宽」时 svg 会带行内 width（mm），这里让它居中，别贴左边。 */
.lbl .blk-bar > .bar-svg, #tplCanvas .blk-bar > .bar-svg { justify-content: center; }
.lbl .blk-bar > .bar-bn > .bn-t, #tplCanvas .blk-bar > .bar-bn > .bn-t {
  display: inline-block; white-space: nowrap; line-height: 1; transform-origin: center center;
}
/* 条码块「图形 / 编号」分割线：只在编辑器画布里出现，是独立兄弟层（块自己 overflow:hidden，放里面会被裁） */
#tplCanvas .lbl-barsplit {
  position: absolute; height: 0; border-top: 1px dashed #e67e22;
  cursor: row-resize; z-index: 6;
}
#tplCanvas .lbl-barsplit > i {
  position: absolute; left: 50%; top: -1.1mm; width: 3.4mm; height: 2.2mm;
  margin-left: -1.7mm; background: #e67e22; border-radius: 0.6mm;
}
.lbl .blk-line { background: #000; }

/* 模板列表 */
.lbl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; margin-top: 12px; }
.lbl-card { background: #fff; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.lbl-card-view {
  background: repeating-linear-gradient(45deg,#eef0f2 0 6px,#e9ebee 6px 12px);
  padding: 16px; display: flex; align-items: center; justify-content: center; min-height: 150px;
  overflow: hidden;
}
.lbl-zoom { zoom: 1.7; }
.lbl-card-body { padding: 9px 11px 11px; }
.lbl-card-name { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.lbl-card-meta { font-size: 11.5px; color: var(--c-muted); margin-bottom: 8px; }
.lbl-card-ops { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* ★第277轮：模板卡片上的「上移 / 下移」（只在自己那一尺寸组里挪） */
.lbl-card-ops .lbl-seq {
  width: 24px; height: 24px; padding: 0; flex: 0 0 auto;
  border: 1px solid var(--c-border); border-radius: 5px; background: #fff;
  color: var(--c-text-2); font-size: 13px; line-height: 1; cursor: pointer;
}
.lbl-card-ops .lbl-seq:hover:not(:disabled) { border-color: #9dc0e8; color: #185fa5; background: #f6faff; }
.lbl-card-ops .lbl-seq:disabled { opacity: .35; cursor: not-allowed; }

/* 设计器 */
.lbl-editor { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
/* ★★★第261轮：画布上方那条「有 N 块超出模板」的提示（不裁画布，只提醒）。
   ★ 必须放在 .lbl-editor **外面**：.lbl-editor 是横向 flex（画布 + 属性栏），
     塞进去会变成 flex 的第一项，把画布挤歪（第261轮第一次就这么写错了，真机拖动测试立刻抓到）。 */
.lbl-outtip {
  margin: 10px 0; padding: 7px 10px; border-radius: 7px; font-size: 12px; line-height: 1.7;
  background: #fff5f5; color: #c0392b; border: 1px solid #f6d5d5;
}
.lbl-outtip b { color: #a8071a; }
.lbl-stage {
  flex: 1; min-width: 0; background: repeating-linear-gradient(45deg,#eef0f2 0 6px,#e9ebee 6px 12px);
  border: 1px solid var(--c-border); border-radius: 10px; padding: 26px;
  display: flex; align-items: flex-start; justify-content: center; min-height: 420px; overflow: auto;
}
#tplCanvas {
  position: relative; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.16);
  outline: 1px solid #d5d8dd; flex: 0 0 auto;
}
/* ★★第一百一十二轮（老板点名）：「点进去之后都是乱的」——
   根因就在这一行：`.lbl .lbl-b{position:absolute}` 只对列表预览里的 .lbl 生效，
   编辑器画布是 #tplCanvas，它里面的块没有 position:absolute，
   于是 left/top 全被忽略、所有块按文档流一个接一个往下堆 —— 第一个外框占满整张纸，
   后面的文字全被挤到纸外面去了，看着就是"只看得见一个框、里面空空"。
   现在把画布里的块也按绝对定位排（照抄 .lbl .lbl-b 那三条）。 */
#tplCanvas .lbl-b {
  position: absolute; white-space: pre; line-height: 1.05;
  cursor: move; user-select: none;
}
/* ★ 线条同理：.lbl .blk-line{background:#000} 也只管列表预览，编辑器里成了透明 → 一条线都看不见 */
#tplCanvas .blk-line { background: #000; }
#tplCanvas .lbl-b.sel { outline: 1px dashed var(--c-primary); outline-offset: 1px; }
/* ★★★第261轮：超出模板的块 → 一圈粗红框（独立兄弟层，pointer-events:none 不挡拖动）。
   用 outline 不用 box-shadow：.fit-warn 已经占了 box-shadow，两者可以同时看见。 */
#tplCanvas .lbl-outbox {
  position: absolute; pointer-events: none; z-index: 25;
  outline: 0.3mm solid #e11d48; outline-offset: 0;
}
/* ★★★第223轮（老板点名）：「字块大小不能用鼠标拖动来调整吗？」
   选中一个块 → 外面套一层选框 + 8 个把手（四角 + 四边），拖一下就能改大小。
   ★ 一律用 mm：画布是 zoom 放大的（默认 3 倍），写 px 的把手会被放大 3 倍、大得没法点。
   ★ 选框容器 pointer-events:none，只有 8 个把手能点 —— 不然整块都被它盖住、拖不动位置了。 */
#tplCanvas .lbl-selbox {
  position: absolute; pointer-events: none; z-index: 30;
  outline: 0.1mm dashed var(--c-primary);
}
#tplCanvas .lbl-h {
  position: absolute; width: 0.9mm; height: 0.9mm; box-sizing: border-box;
  background: #fff; border: 0.1mm solid var(--c-primary);
  pointer-events: auto; z-index: 31; font-style: normal;
}
#tplCanvas .lbl-h[data-d="nw"] { left: -0.45mm; top: -0.45mm; cursor: nwse-resize; }
#tplCanvas .lbl-h[data-d="n"] { left: 50%; top: -0.45mm; margin-left: -0.45mm; cursor: ns-resize; }
#tplCanvas .lbl-h[data-d="ne"] { right: -0.45mm; top: -0.45mm; cursor: nesw-resize; }
#tplCanvas .lbl-h[data-d="e"] { right: -0.45mm; top: 50%; margin-top: -0.45mm; cursor: ew-resize; }
#tplCanvas .lbl-h[data-d="se"] { right: -0.45mm; bottom: -0.45mm; cursor: nwse-resize; }
#tplCanvas .lbl-h[data-d="s"] { left: 50%; bottom: -0.45mm; margin-left: -0.45mm; cursor: ns-resize; }
#tplCanvas .lbl-h[data-d="sw"] { left: -0.45mm; bottom: -0.45mm; cursor: nesw-resize; }
#tplCanvas .lbl-h[data-d="w"] { left: -0.45mm; top: 50%; margin-top: -0.45mm; cursor: ew-resize; }
.lbl-props { width: 250px; flex: 0 0 auto; background: #fff; border: 1px solid var(--c-border); border-radius: 10px; padding: 11px 12px; }
.lbl-props-h { font-size: 12px; font-weight: 700; color: var(--c-muted); margin-bottom: 8px; letter-spacing: .5px; }
.lbl-f { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12px; color: var(--c-text-2); }
.lbl-f > span { flex: 0 0 34px; }
.lbl-f input[type=text], .lbl-f input:not([type]), .lbl-f input[type=number], .lbl-f select {
  flex: 1; min-width: 0; padding: 4px 7px; font-size: 12.5px; color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: 6px; background: #fafbfc;
}
.lbl-f input:focus, .lbl-f select:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.lbl-f i { font-style: normal; font-size: 11px; color: var(--c-muted); }
.lbl-f2 { display: flex; gap: 8px; }
.lbl-f2 .lbl-f { flex: 1; }
.lbl-props-ops { display: flex; gap: 7px; margin: 10px 0 6px; }
.lbl-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.lbl-var {
  border: 1px solid var(--c-border); background: #fafbfc; border-radius: 20px;
  padding: 1px 8px; font-size: 11px; color: #4b5058; cursor: pointer;
}
.lbl-var:hover { border-color: var(--c-primary); color: var(--c-primary); background: #fff6f5; }
.lbl-hint { font-size: 11.5px; color: var(--c-muted); line-height: 1.85; }

/* 打印：只留标签，其他全隐藏 */
.label-print-only { display: none; }
/* ★★★第261轮：双排/多排的「一页」布局从 @media print 里提出来（下面是通用规则）。
   原因：fitToPage 是在**屏幕媒体**下量高度的，那时 .lbl-page 若还是普通 block，
   两个 .lbl 会竖着叠成两倍高 → 整张被误缩到 90%。提出来以后屏幕上也是「一页」的排法，
   量出来的高度才对（.label-print-only 在屏幕上本来就 display:none，不影响看页面）。 */
.label-print-only .lbl-page {
  display: flex; flex-direction: column; align-items: flex-start;
}
.label-print-only .lbl-row { display: flex; flex-wrap: nowrap; align-items: flex-start; }
@media print {
  /* ★第一百一十六轮：打印时把网页底色清掉 —— 勾了「背景图形」时，body 的浅灰会整页印出来 */
  /* ★★★第260轮（老板点名：「100×100 的标签为什么打两页」）：
     根因是「容错为 0」—— 标签正好 100mm 高、纸也正好 100mm，多出零点几毫米就跳页。
     多出来的那几个毫米来自三处，这里一次清干净：
       ① styles.css 第 21 行 html,body{height:100%} 在打印时把 body 钉死在纸面高，多 1px 就溢出；
       ② index.html 里 .layout / .toast-host / script 之间的换行是**文本节点**，
          body > *:not(.label-print-only) 只隐藏元素、隐藏不了它们，它们会生成看不见的行盒，
          把标签整体往下推 4~6mm；
       ③ 纵向没有留任何余量。
     font-size:0 + line-height:0 = 空白文本节点不再生成行盒；
     容器那一层再把字号行高还回去，标签内部一个像素都不变（老模板零改动）。 */
  html, body {
    margin: 0 !important; padding: 0 !important; background: #fff !important;
    height: auto !important; min-height: 0 !important; overflow: visible !important;
    font-size: 0 !important; line-height: 0 !important;
  }
  body > *:not(.label-print-only) { display: none !important; }
  .label-print-only {
    display: block !important;
    /* ★ 把字号 / 行高还给标签自己（上面 body 那两句是为了掐掉空白行盒） */
    font-size: 13.5px; line-height: normal;
  }
  .label-print-only .lbl { box-shadow: none; page-break-after: always; break-after: page; }
  /* ★★★第261轮（老板点名）：「不管字有没有超出模板，超出一半就只打一半 —— 只打模板区域内的内容」。
     overflow:hidden 只挡「画」，挡不住 Chromium 按 **scrollable overflow** 加页
     （实测：50×30 的标签里放一个 y=88 的块 → 打出 3 页）。
     contain:paint 的语义是「内容裁到 padding box，且**不再产生 scrollable overflow**」——
     既不画、也不再撑页，这才是「只打模板内」的正解。
     ★ 只写在打印媒体里：屏幕上的卡片阴影、设计器测量一个字节都不动。 */
  .label-print-only .lbl { contain: paint; }
  /* ★282：黑标靠「背景色」出黑。Chrome 打印默认不印背景 → 必须声明 exact，
     否则那一整行黑标打出来是白纸。 */
  .label-print-only .lbl, .label-print-only .lbl-rot {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .label-print-only .lbl:last-child { page-break-after: auto; break-after: auto; }
  /* ★第272轮：包了旋转壳以后，「最后一页不断页」要挂在 .lbl-rot 上 ——
     否则 .lbl:last-child 不再成立（它成了壳的子元素），最后一页会被多断一次 → 空白页。 */
  .label-print-only .lbl-rot { page-break-after: always; break-after: page; }
  .label-print-only .lbl-rot:last-child { page-break-after: auto; break-after: auto; }
  .label-print-only .lbl-rot .lbl { page-break-after: auto; break-after: auto; }
  /* ★第一百一十八/一百一十九轮（双排标签纸）：
     一「页」= .lbl-page（里面按行摆标签），分页点在页上，行本身不分页 */
  /* ★261：布局已提到通用规则，这里只管分页 */
  .label-print-only .lbl-page { page-break-after: always; break-after: page; }
  .label-print-only .lbl-page:last-child { page-break-after: auto; break-after: auto; }
  .label-print-only .lbl-page .lbl { page-break-after: auto; break-after: auto; }
}

/* ★第九十四轮：打标签改成批量 —— 说明条 / 勾选 / 底部操作条 / 单据列表 */
.lbl-note { font-size: 12px; color: var(--c-text-2); margin-top: 8px; line-height: 1.7; }
.lbl-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; user-select: none; }
.lbl-bar {
  position: sticky; bottom: 8px; z-index: 4;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
table.lbl-doc-tbl td, table.lbl-doc-tbl th { padding: 6px 8px; font-size: 12.5px; }
table.lbl-doc-tbl tbody tr:hover { background: #fafbfc; }
table.lbl-doc-tbl input[type=checkbox] { width: 15px; height: 15px; }

/* ============================================================
   ★第九十五轮（老板点名）：电脑开单最下面那块「收款」
   （已收金额 / 已收全款 / 收款状态 / 图片上打欠款 —— 从头部字段区挪下来的）
   ============================================================ */
.payblock {
  margin-top: 10px; border: 1px solid var(--c-border); border-radius: 8px;
  background: #fbfcfe; padding: 9px 12px 11px;
}
.pay-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-fld { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c-text-2); }
.pay-fld > span:first-child { flex: 0 0 auto; white-space: nowrap; }
#f_paid_amount {
  width: 130px; height: 30px; text-align: right; font-size: 13px; padding: 0 8px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  font-variant-numeric: tabular-nums;
}
#f_paid_amount:focus { outline: none; border-color: var(--c-primary); }
.pay-fld i { font-style: normal; font-size: 12px; color: var(--c-muted); }
.pay-fld select {
  height: 30px; font-size: 12.5px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 6px; background: #fff; color: var(--c-text);
}
.pay-fld select:focus { outline: none; border-color: var(--c-primary); }

/* ============================================================
   ★第九十七轮（老板拍板）：财务收款 —— 客户账 / 核销 / 结账单
   全部前缀 fin-，不碰任何现有页面的样式
   ============================================================ */
.dp-seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 7px; overflow: hidden; }
.dp-seg-b {
  border: 0; background: #fff; color: var(--c-text-2); padding: 6px 12px;
  font-size: 12.5px; cursor: pointer; border-right: 1px solid var(--c-border);
}
.dp-seg-b:last-child { border-right: 0; }
.dp-seg-b.on { background: var(--c-primary); color: #fff; font-weight: 700; }

.fin-sub { font-size: 11.5px; color: var(--c-muted); margin-left: 6px; font-weight: 400; }
.fin-due { color: #d4380d; }
.fin-pre { color: #1677ff; }
.fin-over {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px;
  background: #fff1f0; color: #d4380d; font-size: 10.5px; border: 1px solid #ffccc7;
}
.fin-tag {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px;
  background: #f5f6f8; color: #8b94a3; font-size: 10.5px;
}
table.fin-tbl td, table.fin-tbl th { padding: 6px 9px; font-size: 12.5px; }
table.fin-tbl tbody tr:hover { background: #fafbfc; }
table.fin-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

.fin-kpi { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.fin-kpi-b {
  flex: 1 1 170px; background: #fbfcfe; border: 1px solid var(--c-border);
  border-radius: 9px; padding: 9px 12px;
}
.fin-kpi-b > span { display: block; font-size: 11.5px; color: var(--c-muted); margin-bottom: 3px; }
.fin-kpi-b > b { font-size: 17px; font-variant-numeric: tabular-nums; }
.fin-kpi-b > b i { font-style: normal; font-size: 11.5px; color: var(--c-muted); margin-left: 5px; }

.fin-form { display: grid; grid-template-columns: 76px 1fr; gap: 9px 10px; align-items: center; }
.fin-form > label > span { font-size: 12.5px; color: var(--c-text-2); }
.fin-form-row { display: flex; align-items: center; gap: 6px; }
.fin-form-row input, .fin-form-row select {
  height: 32px; padding: 0 9px; font-size: 13px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fff; flex: 1; min-width: 0;
}
.fin-form-row input:focus, .fin-form-row select:focus { outline: none; border-color: var(--c-primary); }
.fin-form-row i { font-style: normal; font-size: 12px; color: var(--c-muted); }
.fin-note { margin-top: 12px; font-size: 12px; color: var(--c-text-2); line-height: 1.8; background: #f7f9fc; border-radius: 7px; padding: 8px 11px; }

.fin-settle-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--c-text-2); margin-bottom: 9px;
}
.fin-settle-top b { color: var(--c-text); }
.fin-settle-tbl .fin-in {
  width: 100%; height: 28px; text-align: right; font-size: 12.5px; padding: 0 6px;
  border: 1px solid var(--c-border); border-radius: 5px; font-variant-numeric: tabular-nums;
}
.fin-settle-tbl .fin-in:focus { outline: none; border-color: var(--c-primary); }
.fin-settle-tbl .fin-sel { height: 28px; font-size: 12px; border: 1px solid var(--c-border); border-radius: 5px; }
.fin-settle-sum {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 10px; font-size: 13px; padding-top: 9px; border-top: 1px dashed var(--c-border);
}
.fin-settle-sum b { font-variant-numeric: tabular-nums; }
.fin-warn { font-size: 12.5px; color: var(--c-muted); }
.fin-warn.on { color: #d4380d; font-weight: 600; }
.fin-warn.ok { color: #1a7f45; }

/* 结账单（屏幕上 + 打印） */
.fin-sheet {
  background: #fff; padding: 26px 30px; border: 1px solid var(--c-border);
  border-radius: 8px; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #111;
}
.fin-sheet-h { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.fin-sheet-t { font-size: 22px; letter-spacing: 6px; }
.fin-sheet-sub { font-size: 12.5px; color: #555; }
.fin-sheet-cust {
  display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px;
  padding: 8px 0 10px; border-bottom: 2px solid #333;
}
.fin-sheet-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.fin-sheet-tbl th, .fin-sheet-tbl td { border: 1px solid #cfd4da; padding: 7px 8px; }
.fin-sheet-tbl th { background: #f2f4f7; font-weight: 700; }
.fin-sheet-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.fin-sheet-tbl tfoot td { background: #fafbfc; }
.fin-sheet-f { margin-top: 14px; font-size: 13px; line-height: 2; }
.fin-sheet-sign { margin-top: 26px; color: #333; }

@media print {
  body.fin-printing > *:not(.mask) { display: none !important; }
  body.fin-printing .mask > .modal > .modal-head,
  body.fin-printing .mask > .modal > .modal-foot,
  body.fin-printing .mask > .modal > .modal-body > *:not(#stSheet) { display: none !important; }
  body.fin-printing .mask { position: static !important; background: none !important; }
  body.fin-printing .modal { box-shadow: none !important; max-width: none !important; width: 100% !important; }
  body.fin-printing .fin-sheet { border: 0; padding: 0; }
  body.fin-printing .fin-sheet-tbl th { background: #eee !important; -webkit-print-color-adjust: exact; }
}

/* ★第九十七轮：客户账在手机上也能用（窄屏：KPI 两列、表格横向滚、弹框占满宽） */
@media (max-width: 720px) {
  .fin-kpi-b { flex: 1 1 44%; padding: 7px 9px; }
  .fin-kpi-b > b { font-size: 15px; }
  table.fin-tbl { min-width: 660px; }
  table.fin-tbl td, table.fin-tbl th { padding: 5px 6px; font-size: 12px; }
  .fin-sheet { padding: 14px 12px; }
  .fin-sheet-t { font-size: 18px; letter-spacing: 4px; }
  .fin-form { grid-template-columns: 62px 1fr; }
  .fin-settle-tbl { min-width: 700px; }
  .fin-settle-top { font-size: 12px; gap: 8px; }
  .modal .modal-body { padding: 10px; }
}

/* ============================================================
   ★第九十九轮（老板拍板）：扫码出入库（全部前缀 sc-，不碰现有页面）
   ============================================================ */
.sc-hint { font-size: 11.5px; color: var(--c-muted); }
.sc-lb { font-size: 12.5px; color: var(--c-text-2); }
.sc-note {
  font-size: 12px; color: var(--c-text-2); line-height: 1.85; margin-top: 8px;
  background: #f7f9fc; border-radius: 7px; padding: 8px 11px;
}
table.sc-doc-tbl td, table.sc-doc-tbl th { padding: 6px 9px; font-size: 12.5px; }
table.sc-doc-tbl tbody tr:hover { background: #fafbfc; }

.sc-scanbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #f6f9ff; border: 1px solid #dbe7ff; border-radius: 9px;
  margin-bottom: 10px;
}
.sc-sb-lb { font-size: 12.5px; font-weight: 700; color: var(--c-primary); }
.sc-input {
  width: 320px; height: 38px; font-size: 16px; padding: 0 12px; letter-spacing: .5px;
  border: 2px solid var(--c-primary); border-radius: 8px; background: #fff;
  font-family: Consolas, Menlo, monospace;
}
.sc-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,77,79,.12); }
.sc-sb-tip { font-size: 12.5px; color: var(--c-muted); }
.sc-sb-tip.bad { color: #d4380d; font-weight: 700; }
.sc-total { font-size: 12.5px; color: var(--c-text-2); }
.sc-total b { font-size: 15px; color: var(--c-text); font-variant-numeric: tabular-nums; }

table.sc-tbl td, table.sc-tbl th { padding: 6px 8px; font-size: 12.5px; }
table.sc-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sc-dim { color: #c3c8cf; }
.sc-ok { color: #1a7f45; }
.sc-over { color: #d4380d; }
.sc-row-ok { background: #f4fbf6; }
.sc-ok-tag {
  display: inline-block; padding: 0 6px; border-radius: 20px; font-size: 11px;
  background: #eafaf0; color: #1a7f45; border: 1px solid #c8efd8;
}
.sc-log {
  margin-top: 10px; padding: 8px 10px; background: #fbfcfe; border: 1px solid var(--c-border);
  border-radius: 8px; font-size: 12px; min-height: 34px;
}
.sc-log-i { padding: 2px 0; color: var(--c-text-2); }
.sc-log-i.bad { color: #d4380d; font-weight: 600; }
.sc-log-i.dim { color: var(--c-muted); }

@media (max-width: 720px) {
  .sc-input { width: 100%; font-size: 16px; }
  .sc-scanbar { padding: 8px 10px; }
  table.sc-tbl { min-width: 680px; }
  table.sc-doc-tbl { min-width: 560px; }
}

/* ============================================================
   ★第一百轮（老板点名）：扫码装箱 —— 一箱一件，九码格子 + 进度条
   ============================================================ */
.sc-prog { height: 8px; background: #eef0f3; border-radius: 6px; overflow: hidden; }
.sc-prog i { display: block; height: 100%; background: var(--c-primary); transition: width .25s; }

.sc-packbox { border: 2px solid var(--c-primary); box-shadow: 0 4px 18px rgba(255,77,79,.10); }
.sc-pb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.sc-pb-t { font-size: 16px; }
.sc-pb-s { font-size: 12px; color: var(--c-muted); margin-top: 3px; }
.sc-pb-big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c-text-2); white-space: nowrap; }
.sc-pb-big i { font-size: 14px; font-weight: 400; color: var(--c-muted); font-style: normal; }
.sc-pb-big.ok { color: #1a7f45; }

.sc-box-in {
  width: 240px; height: 36px; padding: 0 10px; font-size: 14px;
  border: 1px solid var(--c-border); border-radius: 7px; background: #fff;
  font-family: Consolas, Menlo, monospace;
}
.sc-box-in:focus { outline: none; border-color: var(--c-primary); }

.sc-sz-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; margin: 4px 0 11px; }
.sc-sz {
  border: 1px solid var(--c-border); border-radius: 9px; padding: 8px 3px;
  text-align: center; background: #fbfcfe; transition: all .15s;
}
.sc-sz-n { font-size: 11.5px; color: var(--c-muted); margin-bottom: 1px; }
.sc-sz-v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; }
.sc-sz-v i { font-size: 11.5px; font-weight: 400; color: var(--c-muted); font-style: normal; }
.sc-sz.part { background: #fffbe6; border-color: #ffe58f; }
.sc-sz.ok { background: #f0fbf4; border-color: #9fe0b6; }
.sc-sz.ok .sc-sz-v { color: #1a7f45; }
.sc-sz.over { background: #fff1f0; border-color: #ffa39e; }
.sc-sz.over .sc-sz-v { color: #d4380d; }

.sc-pb-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sc-pb-hint { font-size: 13px; font-weight: 700; color: var(--c-text-2); }

.sc-lastbox {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 13px; border-radius: 9px;
  background: #f0fbf4; border: 1px solid #9fe0b6;
}
.sc-lastbox .t { font-size: 14px; font-weight: 700; color: #1a7f45; }
.sc-lastbox .c { font-family: Consolas, Menlo, monospace; font-size: 15px; font-weight: 800; }

@media (max-width: 720px) {
  .sc-sz-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .sc-box-in { width: 100%; }
  .sc-pb-big { font-size: 24px; }
}

/* ============================================================
   ★第一百零二轮（老板点名）：我的常用 / 自定义导航
   ============================================================ */
.home-fav .home-sec-t { display: flex; align-items: center; }
.home-fav-edit {
  margin-left: 8px; font-size: 11.5px; font-weight: 600;
  color: var(--c-primary); border: 0; background: none; cursor: pointer; padding: 0;
}
.home-fav-edit:hover { text-decoration: underline; }
.home-fav-tip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px dashed var(--c-border); border-radius: 10px;
  background: #fbfcfe; font-size: 12.5px; color: var(--c-text-2);
}
.home-fav-tip b { color: var(--c-text); }

.nav-modal { max-width: 760px; }
.nav-body { display: block; }
.nav-pick {
  background: #fbfcfe; border: 1px solid var(--c-border); border-radius: 9px;
  padding: 10px 12px; margin-bottom: 14px;
}
.nav-pick-h { font-size: 12.5px; color: var(--c-text-2); margin-bottom: 8px; }
.nav-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.nav-chip {
  display: inline-flex; align-items: center; gap: 2px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 20px; padding: 3px 4px 3px 10px;
  font-size: 12.5px;
}
.nav-chip b { font-weight: 600; margin-right: 3px; }
.nav-chip button {
  border: 0; background: #f2f4f7; width: 20px; height: 20px; border-radius: 50%;
  cursor: pointer; font-size: 11px; color: var(--c-text-2); line-height: 1; padding: 0;
}
.nav-chip button:hover:not(:disabled) { background: var(--c-primary); color: #fff; }
.nav-chip button:disabled { opacity: .3; cursor: default; }
.nav-empty { font-size: 12.5px; color: var(--c-muted); }
.nav-grp { margin-bottom: 11px; }
.nav-grp-t { font-size: 12px; font-weight: 700; color: var(--c-muted); margin-bottom: 6px; }
.nav-grp-b { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-item {
  border: 1px solid var(--c-border); background: #fff; border-radius: 7px;
  padding: 5px 11px; font-size: 12.5px; color: var(--c-text); cursor: pointer;
  transition: all .12s;
}
.nav-item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.nav-item.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }

@media (max-width: 720px) {
  .nav-modal { max-width: none; }
  .home-fav-tip { font-size: 12px; }
}

/* ★第一百零三轮（老板点名）：客户账 —— 三个筛选 / 单号「查看」/ 登记收款客户只读 */
.fin-filters { margin-top: -8px; gap: 8px; flex-wrap: wrap; }
.fin-filters select,
.fin-filters input {
  height: 30px; font-size: 12.5px; border: 1px solid var(--c-border); border-radius: 6px;
  padding: 0 8px; background: #fff; color: var(--c-text);
}
.fin-filters select:focus,
.fin-filters input:focus { outline: none; border-color: var(--c-primary); }

.fin-view {
  margin-left: 5px; font-size: 11px; color: var(--c-primary);
  text-decoration: none; border-bottom: 1px dashed currentColor; white-space: nowrap;
}
.fin-view:hover { border-bottom-style: solid; }
.fin-apply-no { display: inline-block; white-space: nowrap; margin: 0 9px 2px 0; }
.fin-fixed-cust { font-size: 14px; color: var(--c-text); }

@media (max-width: 720px) {
  .fin-filters select, .fin-filters input { flex: 1 1 44%; }
}

/* ============================================================
   ★第一百零四轮（老板点名）：取消领料 —— 必填原因弹框 + 取消领料记录
   ============================================================ */
.rsn-tip {
  font-size: 12.5px; color: var(--c-text-2); line-height: 1.9;
  background: #fff8f7; border: 1px solid #ffe2de; border-radius: 8px;
  padding: 9px 11px; margin-bottom: 10px;
}
.rsn-tip b { color: var(--c-text); }
.rsn-in {
  width: 100%; box-sizing: border-box; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--c-border); border-radius: 7px; resize: vertical;
  font-family: inherit; line-height: 1.65; color: var(--c-text);
}
.rsn-in:focus { outline: none; border-color: var(--c-primary); }
.rsn-err { color: #d4380d; font-size: 12px; margin-top: 6px; min-height: 16px; font-weight: 600; }

.po-lb { font-size: 12.5px; color: var(--c-text-2); }
table.po-tbl td, table.po-tbl th { padding: 6px 8px; font-size: 12.5px; }
table.po-tbl tbody tr:hover { background: #fafbfc; }
table.po-tbl .po-used { background: #fafbfc; color: #98a0ab; }
.po-used-tag {
  display: inline-block; padding: 0 6px; border-radius: 20px; font-size: 10.5px;
  background: #f2f4f7; color: #8b94a3; border: 1px solid #e3e7ec;
}
@media (max-width: 720px) {
  table.po-tbl { min-width: 900px; }
}

/* ============================================================
   ★★第一百一十一轮（老板点名，第三版）：电脑开单表头 —— **就两行，同一行全部对齐**
     第一行：客户 + 新建 ｜ 客户类型 ｜ 结算方式 ｜ 制单时间 ｜ 交期
     第二行：订单大备注 ｜ 常用备注 ｜ 制单员 ｜ 图片·B段 ｜ 图片·A段
     保存 / 保存并审核 挪到上面「订单列表 · 单号 · 状态」那一排的最右边，做成大按钮。
   ★ 只作用于销售订单页（别的单据页还用 .docfields）；字段一个没加没减。
   ============================================================ */
.so-head { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.so-head .sh-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.so-head .sh-fld { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; height: 32px; }
.so-head .sh-lb { flex: 0 0 auto; font-weight: 700; font-size: 12.5px; color: var(--c-text); white-space: nowrap; }
.so-head .sh-lb i { color: var(--c-danger); font-style: normal; font-weight: 700; margin-left: 2px; }
.so-head .sh-plain { font-size: 13px; white-space: nowrap; }

/* 客户：吃满第一行剩下的宽度 */
.so-head .sh-cust { flex: 1 1 260px; min-width: 210px; }
.so-head .sh-cust .sh-grow { flex: 1 1 auto; min-width: 0; }
.so-head .sh-cust .combo, .so-head .sh-cust .combo .combo-in { width: 100%; }
.so-head .sh-newcust { flex: 0 0 auto; height: 32px; font-weight: 700; }

/* 输入控件统一高度 / 字号，行才齐 */
.so-head select, .so-head input[type="date"], .so-head input[type="datetime-local"] {
  height: 32px; padding: 0 7px; border: 1px solid var(--c-border); border-radius: 6px;
  background: #fff; font-size: 13px; font-family: inherit; color: var(--c-text);
}
.so-head select:focus, .so-head input:focus { border-color: var(--c-primary); outline: none; }
.so-head .sh-fld select { min-width: 100px; }
.so-head input[type="datetime-local"] { width: 188px; }
.so-head input[type="date"] { width: 146px; }

/* 第二行：订单大备注吃满中间，右边紧跟 常用备注 / 制单员 / 图片两段 */
.so-head .sh-rem { flex: 1 1 320px; min-width: 200px; }
.so-head .sh-rem input {
  flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fbfcfe; font-size: 13px;
}
.so-head .sh-rem input:focus { border-color: var(--c-primary); background: #fff; }
.so-head .sh-bigrem { flex: 0 0 auto; height: 32px; }
.so-head .note-sel { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin: 0; height: 32px; }
.so-head .note-sel > span { font-weight: 700; font-size: 12.5px; color: var(--c-text); white-space: nowrap; }
.so-head .note-sel > select { max-width: 200px; font-size: 12.5px; }

/* 窄屏：两行各自换行，标签不至于挤成一坨 */
@media (max-width: 1360px) {
  .so-head .sh-row1 { flex-wrap: wrap; row-gap: 8px; }
  .so-head .sh-cust { flex: 1 1 100%; }
  .so-head .sh-row2 { flex-wrap: wrap; row-gap: 8px; }
  .so-head .sh-rem { flex: 1 1 100%; }
}

/* ============================================================
   ★★第一百一十一轮：顶栏那两个大按钮（保存 / 保存并审核）
     老板原话：「做大一点，醒目一点，要做出按钮的样式，不能就是几个字」。
   ============================================================ */
.so-acts { display: inline-flex; align-items: center; gap: 10px; margin-left: 14px; flex: 0 0 auto; }
.so-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 38px; padding: 0 26px; border-radius: 9px; border: 1px solid transparent;
  font-size: 15px; font-weight: 800; letter-spacing: .5px; cursor: pointer;
  transition: filter .12s, box-shadow .12s, background .12s;
}
.so-act-main {
  background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
}
.so-act-main:hover { filter: brightness(1.07); box-shadow: 0 3px 12px rgba(37, 99, 235, .45); }
.so-act-main:active { filter: brightness(.96); }
.so-act-sub {
  background: #fff; color: var(--c-primary); border-color: #93b6f8;
  box-shadow: 0 1px 4px rgba(37, 99, 235, .12);
}
.so-act-sub:hover { background: #eef4ff; border-color: var(--c-primary); }
.so-act-sub:active { background: #e2ecff; }

/* ============================================================
   ★★第一百一十轮（老板点名）：标签打印表 →「从生产排单选单」的筛选条
     老板原话：「前面的搜索框你帮我分开来，客户、货号、颜色都单独一个搜索框，
     排单号、订单号合并一个，另外加一个时间筛选控件，默认昨天到今天」。
   ★ 只作用于这个弹窗（.shp-bar），别的工具条不受影响。
   ============================================================ */
.shp-bar { gap: 8px 14px; }
.shp-bar .shp-f { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.shp-bar .shp-lb { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--c-text); white-space: nowrap; }
.shp-bar .shp-f input {
  height: 32px; padding: 0 8px; border: 1px solid var(--c-border); border-radius: 6px;
  background: #fff; font-size: 12.5px; font-family: inherit; color: var(--c-text);
}
.shp-bar .shp-f input:focus { border-color: var(--c-primary); outline: none; }

/* ============================================================
   ★★第一百一十一轮（老板点名）两件事的样式
   ① 标签选单弹窗：客户列收窄（约 10 个中文字宽）、加时间列和备注列
   ② 点「去打印」才选模板：卡片式选择窗
   ============================================================ */
/* ① 选单表：客户 / 备注 超长就省略号，别把整张表撑宽 */
.shp-tbl .shp-cust,
.shp-tbl .shp-rem {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shp-tbl .shp-rem { font-size: 12px; color: var(--c-text-2); }

/* ② 选模板弹窗 */
.modal-tplpick { max-width: 1120px; width: 94vw; }
.tpl-pick-sum { font-size: 12.5px; color: var(--c-text-2); margin-right: 14px; }
.tpl-pick-sum b { color: var(--c-primary-dark); }
.tpl-pick-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px; padding: 12px 14px; max-height: 62vh; overflow: auto;
}
.tpl-pick-card {
  border: 2px solid var(--c-border); border-radius: 10px; background: #fff;
  padding: 8px 8px 10px; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.tpl-pick-card:hover { border-color: #b9c4d4; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.tpl-pick-card.on { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
/* ★★★第281轮（老板）：「选择打印模板」加「常用」页签 —— 卡片右上角一颗星，常用里还能上下排 */
.tpl-pick-card { position: relative; }
.tpl-fav {
  position: absolute; top: 6px; right: 8px; z-index: 3;
  border: 0; background: rgba(255,255,255,.92); color: #b0790a;
  width: 26px; height: 26px; border-radius: 50%; line-height: 1; font-size: 16px;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.tpl-fav:hover { background: #fff3d6; }
.tpl-fav.on { color: #e08a00; }
.tpl-favseq { position: absolute; top: 6px; left: 8px; z-index: 3; display: flex; gap: 4px; }
.tpl-favseq button {
  border: 1px solid #c9d3e0; background: #fff;
  width: 24px; height: 24px; border-radius: 7px; font-size: 13px; font-weight: 700; line-height: 1;
  cursor: pointer; color: #3c4859; box-shadow: 0 1px 4px rgba(0,0,0,.16);
}
.tpl-favseq button:hover:not(:disabled) { border-color: #b9c4d4; color: var(--c-text); }
.tpl-favseq button:disabled { opacity: .35; cursor: default; }
/* ★281：弹窗的列表容器是 grid，卡片组必须横跨整行（否则只占一格、竖着排） */
.tpl-pick-list > .tpl-size-cards { grid-column: 1 / -1; }
.tpl-fav-empty {
  grid-column: 1 / -1; font-size: 12.5px; color: var(--c-text-2); line-height: 1.7;
  background: #fffaf0; border: 1px dashed #e8cf94; border-radius: 8px;
  padding: 9px 12px; margin-bottom: 10px;
}
.tag-fav { background: #fff3d6; color: #a86b00; border: 1px solid #f0d79b; }
.tpl-favb.on { color: #e08a00; }
/* ★★★第283轮（老板）：模板编辑界面头部的「常用」星（不要用 .tpl-fav，那个是弹窗里绝对定位的） */
.tpl-favbtn {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; line-height: 1;
  border: 1px solid var(--c-border); border-radius: 8px; background: #fff;
  font-size: 15px; color: #b0790a; cursor: pointer;
}
.tpl-favbtn:hover:not(:disabled) { background: #fff8e8; border-color: #e8cf94; }
.tpl-favbtn.on { background: #fff3d6; border-color: #f0d79b; color: #e08a00; }
.tpl-favbtn:disabled { opacity: .38; cursor: default; }
/* ★283：选模板卡片上的「大 / 小 / 随」角标 */
.tpl-kb {
  display: inline-block; padding: 0 4px; border-radius: 4px; font-weight: 700;
  background: #eef3fb; color: #3f5f8f; border: 1px solid #d3e0f2;
}
.tpl-kb.f { background: #f2f4f7; color: #6b7280; border-color: #e0e4ea; }
.tpl-pick-view {
  height: 208px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg,#eef0f2 0 6px,#e9ebee 6px 12px);
  border-radius: 6px; overflow: hidden; margin-bottom: 8px;
}
.tpl-pick-view .lbl { box-shadow: none; }
.tpl-pick-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.tpl-pick-meta { font-size: 11.5px; color: var(--c-muted); margin-top: 2px; }

/* ============================================================
   ★★第一百一十一轮（老板点名）：标签模板页面按尺寸分类
   ============================================================ */
.lbl-group { margin-top: 16px; }
.lbl-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 2px 8px; margin-bottom: 10px;
  border-bottom: 2px solid #dfe4ec;
}
.lbl-group-head b { font-size: 15px; letter-spacing: .3px; }
.lbl-group-tag {
  font-size: 11.5px; background: #eef2f8; color: var(--c-text-2);
  border-radius: 4px; padding: 2px 7px;
}
.lbl-group-n { font-size: 12px; color: var(--c-muted); }
.lbl-group .lbl-cards { margin-top: 0; }

/* ============================================================
   ★★第一百一十二轮（老板点名）：标签模板里的「线图」块
     —— 图片按块大小等比缩放进格子（不拉伸变形），预览和打印一致
   ============================================================ */
.lbl .blk-img, #tplCanvas .blk-img { overflow: hidden; }
.lbl .blk-img img, #tplCanvas .blk-img img {
  display: block; width: 100%; height: 100%; object-fit: contain;
}

/* ============================================================
   ★★第一百一十三轮（老板点名）：
     ① 每个文字块可设「限宽 / 限高 / 自动换行」—— 压得太狠的格子描一圈红边提醒
     ② 模板卡片加「基础模板（只读）」角标
     ③ 测试打印弹窗（左边真实比例预览，右边改测试数据）
   ============================================================ */
/* ① 压得太狠的提示：只描在编辑器画布上，打印和预览里不出现 */
#tplCanvas .lbl-b.fit-warn { box-shadow: inset 0 0 0 1px rgba(225,29,72,.6); }
.lbl .lbl-b.fit-warn, .tpl-pick-view .lbl-b.fit-warn { box-shadow: none; }
.lbl-warn {
  margin: 2px 0 8px; padding: 6px 8px; border-radius: 6px; font-size: 11.5px; line-height: 1.5;
  background: #fff5f5; color: #c0392b; border: 1px solid #f6d5d5;
}
.lbl-f-ck > i { flex: 1; text-align: left; }
.lbl-f-ck input[type=checkbox] { width: 15px; height: 15px; }

/* ② 基础模板角标 / 只读标记 */
.tag-base { background: #eef1f6; color: #55617a; border: 1px solid #dde2ea; margin-left: 6px; }
/* ★第269轮（老板）：「锁定要我自己能控制」—— 已锁标记。
   ★ 类名故意不叫 .tag-lock：那个已被 app.js 的「已排产」占用（第 159 行），改了会串色。 */
.tag-tpllock { background: #fff7e6; color: #a86a00; border: 1px solid #ffe0a3; margin-left: 6px; }
.lbl-ro {
  display: inline-flex; align-items: center; padding: 0 8px; height: 26px; border-radius: 5px;
  font-size: 12px; color: var(--c-muted); background: #f5f6f9; border: 1px dashed #d5dae2;
}
.lbl-card-view { cursor: pointer; }

/* ③ 测试打印 */
.modal-testprint { max-width: 780px; width: 92vw; }
.tpx-body { display: flex; gap: 14px; padding: 12px 14px; align-items: flex-start; }
.tpx-view {
  flex: 0 0 auto; width: 340px; min-height: 220px; max-height: 62vh; padding: 18px;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg,#eef0f2 0 6px,#e9ebee 6px 12px);
  border-radius: 8px; overflow: auto;
}
.tpx-view .lbl { box-shadow: 0 3px 12px rgba(0,0,0,.16); }
.tpx-data {
  flex: 1; min-width: 0; max-height: 58vh; overflow: auto;
  border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; background: #fafbfc;
}
.tpx-data .lbl-f { margin-bottom: 8px; }
.tpx-data .lbl-f > span { flex: 0 0 62px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   ★第一百一十五轮：产品工艺 BOM 审核后表格灰掉（能看不能改）
   ============================================================ */
.bom-locked input, .bom-locked select, .bom-locked textarea {
  background: #f3f5f8 !important; color: #7b8494 !important; cursor: not-allowed;
}
.bom-locked table { opacity: .78; }

/* ============================================================
   ★第一百一十六轮：打印相关小提示 + 模板卡片的尺寸角标
   ============================================================ */
.lbl-print-tip {
  margin: 0 14px 10px; padding: 8px 11px; border-radius: 8px; line-height: 1.7;
  font-size: 12.5px; color: var(--c-text-2); background: #f5f8ff;
  border: 1px solid #dce6f8;
}
.lbl-print-tip b { color: #1f4fa8; }
.lbl-print-tip span { display: block; color: #b06a00; font-size: 12px; margin-top: 2px; }
.tpl-pick-size {
  display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 700;
  background: #eef4ff; color: #1f4fa8; border: 1px solid #d6e3fb; margin-right: 4px;
}

/* ============================================================
   ★第一百一十七轮：货号清单勾选 + 顶部「批量操作」下拉
   ============================================================ */
.style-list .pickcell { text-align: center; width: 38px; }
.style-list .pickcell input { width: 16px; height: 16px; cursor: pointer; }
.bmenu-mask { position: fixed; inset: 0; z-index: 200; }
.bmenu {
  position: fixed; min-width: 236px; background: #fff; border: 1px solid var(--c-border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(10,20,40,.18); padding: 6px;
  /* ★第309轮：菜单项多了（材料档案 6 项）/ 窗口矮的时候自己滚，别顶出屏幕外面点不到 */
  max-height: min(70vh, 420px); overflow: auto;
}
.bmenu-h { font-size: 12px; color: var(--c-muted); padding: 6px 10px 8px; }
.bmenu-h b { color: var(--c-primary-dark); }
.bmenu-i {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  font-size: 13px; color: var(--c-text); border-radius: 6px; cursor: pointer;
}
.bmenu-i:hover:not(:disabled) { background: #f2f6ff; color: var(--c-primary-dark); }
.bmenu-i:disabled { color: #b6bdc9; cursor: not-allowed; }
.bmenu-i.danger { color: var(--c-danger); }
.bmenu-i.danger:hover:not(:disabled) { background: #fff1f0; }
.bmenu-sep { height: 1px; background: var(--c-border); margin: 5px 4px; }

/* ============================================================
   ★第一百一十八轮：文字块里那层「可缩放」的 span
   ★★ 缩放必须打在这一层，不能打在格子（.lbl-b）上 ——
      格子有 overflow:hidden，缩格子等于把可视窗口一起缩，怎么压都是裁的。
   ============================================================ */
.lbl-b.blk-txt > .lbt {
  display: inline-block; vertical-align: top;
  white-space: pre; line-height: 1.05;
  transform-origin: left top;
  flex: 0 0 auto;                 /* ★第224轮：绝不许被 flex 收缩，否则量到的宽度恒等于框宽、限宽压缩失效 */
}
/* 换行模式：span 铺满格子宽度、自己折行，横向就别再缩了（交给折行） */
.lbl-b.blk-txt[data-wrap="1"] > .lbt {
  display: block; width: 100%;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
/* ★★★第279轮（老板）：「文字要能竖排」—— 每个字正立、从上往下排（英文数字也一字一列）。
   只挂在标了 data-vt=1 的块上，老模板一个字节都不影响。
   ★ 竖排之后 .lbt 的「宽」= 笔画厚度、「高」= 文字长度，所以 fitTextBlocks 里的
     限宽/限高天然就对得上，不用换轴。 */
.lbl .lbl-b.blk-txt[data-vt="1"] > .lbt,
#tplCanvas .lbl-b.blk-txt[data-vt="1"] > .lbt {
  writing-mode: vertical-rl;
  text-orientation: upright;
  display: inline-block; width: auto; white-space: pre;
}

/* ============================================================
   ★★第224轮（老板点名）：文字在方框里「横向 + 纵向」都能对齐
   · 纵向靠 flex 的 align-items，**必须显式写 center**：
     flex 默认是 stretch，会把 .lbt 拉到框高 → fitTextBlocks 量到的 ih 恒等于 ch，
     「限高（纵向压扁）」当场静默失效。这是这条规则存在的唯一理由，别删。
   · 横向：flex 容器里 text-align 管不了 flex 项的位置，居中/靠右必须靠 justify-content；
     .lbt 内部多行的行内对齐仍由内联的 text-align 负责（换行模式要用），两个都要。
   · 兜底（没存 align/valign）在 label.js 里就是 center / middle，所以老模板天然走
     [data-al="center"] + 默认 align-items:center，等于「默认横中纵中」。
   · 配码块（.blk-seg）用 :not 排除：它自己有 display:block，里面的 .seg-row 已经是
     flex + align-items:center（见下方 3278 那条），不能被这里改掉。
   ============================================================ */
.lbl .lbl-b.blk-txt:not(.blk-seg),
#tplCanvas .lbl-b.blk-txt:not(.blk-seg) { display: flex; align-items: center; }
.lbl .lbl-b.blk-txt:not(.blk-seg)[data-al="center"],
#tplCanvas .lbl-b.blk-txt:not(.blk-seg)[data-al="center"] { justify-content: center; }
.lbl .lbl-b.blk-txt:not(.blk-seg)[data-al="right"],
#tplCanvas .lbl-b.blk-txt:not(.blk-seg)[data-al="right"] { justify-content: flex-end; }
.lbl .lbl-b.blk-txt:not(.blk-seg)[data-val="top"],
#tplCanvas .lbl-b.blk-txt:not(.blk-seg)[data-val="top"] { align-items: flex-start; }
.lbl .lbl-b.blk-txt:not(.blk-seg)[data-val="bottom"],
#tplCanvas .lbl-b.blk-txt:not(.blk-seg)[data-val="bottom"] { align-items: flex-end; }

/* ============================================================
   ★第一百一十九轮：选打印模板 —— 按尺寸分类（像文件夹）
   ============================================================ */
.tpl-size-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0;
}
.tpl-size-chip {
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer; line-height: 1.2;
}
.tpl-size-chip:hover { border-color: #b9c4d4; color: var(--c-text); }
.tpl-size-chip.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.tpl-size-group { grid-column: 1 / -1; }
.tpl-size-head {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 8px;
  font-size: 13px; font-weight: 700; color: var(--c-primary-dark);
}
.tpl-size-head::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.tpl-size-head span { font-size: 12px; font-weight: 400; color: var(--c-muted); }
.tpl-size-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px; margin-bottom: 14px;
}

/* ============================================================
   ★第一百二十轮：自由输入打标签（像 Excel 那样一行一个）
   ============================================================ */
.fg-tbl td { padding: 3px 4px; }
.fg-tbl input, .fg-tbl select {
  min-height: 30px; padding: 4px 7px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fbfcfe; font-size: 13px; outline: none;
}
.fg-tbl input:focus, .fg-tbl select:focus { border-color: var(--c-primary); background: #fff; }
.fg-barsvg { height: 34px; overflow: hidden; }
.fg-barsvg svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   ★第一百二十一轮：外箱大标签的「配码」
   {尺码行} / {数量行} 按等宽列排 —— 每码一格，上下两行天然对齐；
   中间某码数量为 0 时留空白，但那一格照样占位。
   ============================================================ */
.lbl-b.blk-seg { display: block; }
.lbl-b.blk-seg .seg-row {
  display: flex; width: 100%; height: 100%; align-items: center;
}
.lbl-b.blk-seg .seg-row > i {
  flex: 1 1 0; min-width: 0; text-align: center; font-style: normal;
  white-space: nowrap; overflow: hidden;
  /* ★★★第262轮：格内留白 = 间距的一半（.seg-row 上的 --segpad，单位「% 整行宽」）。
     间距 0 时变量根本不存在 → var 兜底 0 → 字撑满格子、字跟字贴着。
     ★ 两格之间正好 = 间距（左格右留一半 + 右格左留一半）。
     ★ .seg-row 上**永远不许写 padding** —— 百分比内边距是按它的 content-box 解析的，
       行上一有 padding，这里的百分比基准就变了，两行会错位。 */
  padding: 0 var(--segpad, 0);
}

/* ============================================================
   ★★★第316轮（老板点名）：配码块（.blk-mix）—— 一个块画完 N 色配码
   列宽 / 行高 / 字号全部由块属性算成行内样式（跟着模板走），
   这里只兜底两件事：整块是网格、网格子项必须 min-width:0
   （否则一个长色名会把码数列挤歪，几行就对不齐了）。
   ============================================================ */
.lbl-b.blk-mix { display: grid; overflow: hidden; }
.lbl-b.blk-mix > div { min-width: 0; min-height: 0; }

/* ★第一百二十二轮：标签可选字段多了，右侧面板给个限高，别把整页撑太长 */
.lbl-vars { max-height: 220px; overflow: auto; }

/* ============================================================
   ★第一百二十四轮：自由输入「配码表」（货号｜颜色｜35~43｜补数｜合计）
   ============================================================ */
/* ★ table-layout:fixed + width:100% 会按比例把多出来的宽度分给所有列，
   1347px 的容器能把 40px 的尺码列撑到 87px（老板：「不要把格子拉这么宽」）→ 加 max-width 兜住。
   ★★ 必须带 min-width:0：table.grid 上有 min-width:100%，min 大于 max 时 min 赢，只写 max-width 没用。 */
table.grid.fg-ph { table-layout: fixed; width: 100%; max-width: 940px; min-width: 0; }
.fg-ph th { font-size: 12.5px; text-align: center; }
/* ★第一百二十六轮：格子紧凑一点（老板说「不要把格子拉这么宽」） */
.fg-ph .fg-th-code { width: 96px; text-align: left; }
.fg-ph .fg-th-color { width: 62px; text-align: left; }
.fg-ph .fg-th-sz { width: 40px; }
.fg-ph .fg-th-extra { width: 48px; }
.fg-ph .fg-th-sum { width: 56px; }
.fg-ph td { padding: 1px 2px; }
.fg-ph input { width: 100%; min-height: 26px; padding: 2px 4px; text-align: center;
  border: 1px solid var(--c-border); border-radius: 4px; background: #fbfcfe; font-size: 12.5px; outline: none; }
.fg-ph .fg-cell { padding: 0; }
.fg-ph .fg-cell input { border-color: transparent; background: transparent; border-radius: 0; }
.fg-ph .fg-cell input:focus { border-color: var(--c-primary); background: #fff; box-shadow: inset 0 0 0 1px var(--c-primary); }
/* 框选的格子（Excel 那种淡蓝底） */
.fg-ph td.fin-sel { background: rgba(37,99,235,.10); }
.fg-ph td.fin-sel input { background: transparent; }

/* 货号 / 颜色 的候选下拉 */
.fg-sug {
  position: fixed; z-index: 300; background: #fff; border: 1px solid var(--c-border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(10,20,40,.16); padding: 4px; max-height: 260px; overflow: auto;
}
.fg-sug-i { display: flex; align-items: baseline; gap: 8px; padding: 5px 8px; border-radius: 5px; cursor: pointer; font-size: 12.5px; }
.fg-sug-i:hover { background: #f2f6ff; }
.fg-sug-i b { font-weight: 700; }
.fg-sug-i i { font-style: normal; color: var(--c-muted); font-size: 11.5px; }
.fg-ph input[data-g="code"], .fg-ph input[data-g="color"] { text-align: left; }
.fg-ph input:focus { border-color: var(--c-primary); background: #fff; }
.fg-ph tr.fg-sep td { border-bottom: 2px solid #c9d3e3; }
.fg-ph .fg-sum { text-align: center; font-weight: 700; color: var(--c-primary-dark); background: #f5f8ff; }

/* ============================================================
   ★第一百二十五轮：客户账三个流水标签 + 订单浮层（只读查看）
   ============================================================ */
.fin-kind {
  display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: 11.5px; line-height: 1.6; border: 1px solid transparent;
}
.fin-k-xd { background: #eef4ff; color: #1f4fa8; border-color: #d6e3fb; }   /* 下单 */
.fin-k-hk { background: #eefaf1; color: #1e7b45; border-color: #cdebd8; }   /* 收款 / 货款 */
.fin-k-dj { background: #fff4e6; color: #a85c00; border-color: #f6ddb8; }   /* 定金 */
.fin-k-ys { background: #f4f0ff; color: #5b3fb0; border-color: #e0d7fb; }   /* 预收 */
.fin-tbl .fin-plus { color: #c0392b; }
.fin-tbl .fin-minus { color: #1e7b45; }

.fin-peek { max-width: 980px; width: 96vw; }
.fin-peek-kpi {
  display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 10px 16px;
  border-bottom: 1px solid var(--c-border); background: #fafbfd;
}
.fin-peek-kpi > div { display: flex; flex-direction: column; gap: 2px; min-width: 96px; }
.fin-peek-kpi span { font-size: 11.5px; color: var(--c-muted); }
.fin-peek-kpi b { font-size: 13.5px; }
.fin-peek-kpi i { font-style: normal; }
.fin-peek-adj, .fin-peek-rm {
  padding: 8px 16px; border-top: 1px dashed var(--c-border);
  font-size: 12.5px; color: var(--c-text-2); display: flex; gap: 10px; flex-wrap: wrap;
}
.fin-peek-adj span { background: #f5f8ff; border-radius: 6px; padding: 1px 8px; }

/* ============================================================
   ★第一百四十五轮（老板点名）：销售订单汇总表「每种状态的订单显示不同颜色」
     · 发货状态 → **单元格背景**：已发完 = 深一点的红 / 部分发货 = 淡绿 / 没发货 = 淡灰
     · 排产状态 → **字体颜色**：一件没排 = 红字 / 排了一半 = 橙字 / 排完 = 正常
     · 过了交期还没发完 → 交货日红字加粗（老系统那栏叫「交期延迟」）
     · 草稿 / 已取消 不掺和（它们本来就有自己的底色）
   ★ 只作用在「销售订单汇总表」这张表（.rep-tbl），别的列表不受影响。
     ★ 配色是老板从 4 套里选的「方案 A · 柔和淡彩」（2026-10-22）—— 都往浅里压，不刺眼。
   ============================================================ */
/* ★ 这张表里不要把「已审核」那层淡绿底（#f4fbf6）留着 —— 底色专门用来表示发货状态，
     不然两种绿混在一起，看不出「部分发货」是绿的。写成白底，下面 shp-* 才压得住。 */
table.grid.rep-tbl tbody tr.st-AUDITED > td { background: #fff !important; }
table.grid.rep-tbl tbody tr.shp-all > td { background: #fdf1f1 !important; }      /* 已发完：极淡粉 */
table.grid.rep-tbl tbody tr.shp-part > td { background: #eff7f0 !important; }     /* 部分发货：极淡绿 */
table.grid.rep-tbl tbody tr.shp-none > td { background: #f8f8f9 !important; }     /* 没发货：近白灰 */
/* 鼠标划过时颜色加深一点（否则 tr 的 hover 被 td 背景盖住，看着没反应） */
table.grid.rep-tbl tbody tr.shp-all:hover > td { background: #fbe6e6 !important; }
table.grid.rep-tbl tbody tr.shp-part:hover > td { background: #e6f2e8 !important; }
table.grid.rep-tbl tbody tr.shp-none:hover > td { background: #f0f1f3 !important; }

/* 排产状态 → 字体颜色
   ★★ 第一百四十六轮（老板改的规矩）：**反过来了** ——
      已经全部排完的用**深红**标出来（那是"这单排好了，可以安排生产/发货"）；
      排了一部分的用**浅红**（半半拉拉，看得到但不出头）；
      完全没排的就是**常规黑字**（还没动，不打扰）。 */
table.grid.rep-tbl tbody tr.plan-all > td { color: #a03a34; }          /* 全部排完：偏正红 */
table.grid.rep-tbl tbody tr.plan-part > td { color: #c0908a; }         /* 排了一部分：浅红棕 */
table.grid.rep-tbl tbody tr.plan-none > td { color: #303438; }         /* 还没排：常规黑 */

/* 交期延迟：交货日那一格红字加粗（比"排完"再重一点，这是要出事的） */
table.grid.rep-tbl tbody td.rep-late { color: #a03a34 !important; font-weight: 700; }

/* ============================================================
   ★第一百四十七轮（老板点名）：基础档案列表「表头跟数据一列一列对齐、居中」
     · 表头按资源里定义的 width 给宽度（以前 width 写了却没用上，全靠浏览器瞎分）
     · 整张表居中：文字、数字都居中，眼睛从上往下扫不会左右错位
     · 只作用在档案列表（.res-tbl），报表 / 单据表格不受影响
   ============================================================ */
table.grid.res-tbl th,
table.grid.res-tbl td { text-align: left; }                /* ★445：文字靠左（原来是整表居中） */
table.grid.res-tbl td.num { text-align: center; }          /* 数字仍居中（跟表头对齐） */
table.grid.res-tbl th { padding: 8px 6px; letter-spacing: .2px; }
table.grid.res-tbl td { padding: 6px 6px; }
/* 太长的名字省略号，别把整列撑变形（鼠标停上去看全名） */
table.grid.res-tbl td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
/* 操作那一列：按钮居中排，间距一致 */
table.grid.res-tbl td.actcol { white-space: nowrap; }
table.grid.res-tbl td.actcol .btn-link { margin: 0 3px; }

/* ★★★第218轮（老板点名）：档案列表的「排序号」列 —— [↑] [数字] [↓]，直接在列表里挪位置。
   10 个带 sort_no 的档案共用（颜色 / 材料分类 / 部位 / 标签类型 / 常用备注 / 增减项 /
   内盒型号 / 特殊要求 / 工序 / 部门）。列宽在 resources.mjs 里已经放到 126px。 */
table.grid.res-tbl td.seq-cell { white-space: nowrap; padding: 3px 4px; }
table.grid.res-tbl td.seq-cell .seq-btn {
  width: 20px; height: 24px; padding: 0; line-height: 22px;
  border: 1px solid var(--c-border); border-radius: 4px; background: #fff;
  color: var(--c-text-2); cursor: pointer; font-size: 12px;
}
table.grid.res-tbl td.seq-cell .seq-btn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
table.grid.res-tbl td.seq-cell .seq-btn:disabled { opacity: .32; cursor: not-allowed; }
/* 数字框：去掉原生上下箭头（跟我们自己的 ↑↓ 挤在一起会看花） */
table.grid.res-tbl td.seq-cell input.seq-inp {
  width: 46px; height: 24px; margin: 0 3px; padding: 0 4px; text-align: center;
  border: 1px solid var(--c-border); border-radius: 4px; background: #fff;
  font-size: 12.5px; font-family: inherit; color: var(--c-text);
  -webkit-appearance: none; -moz-appearance: textfield; appearance: textfield;
}
table.grid.res-tbl td.seq-cell input.seq-inp::-webkit-outer-spin-button,
table.grid.res-tbl td.seq-cell input.seq-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table.grid.res-tbl td.seq-cell input.seq-inp:focus { outline: none; border-color: var(--c-primary); }

/* ============================================================
   ★★★第445轮（老板实测「销售发货的客户列前面空一大截、拖宽也没用」）：
     148 轮那条「全站表格一律居中」作废，改成 ——

       · 文字列（客户 / 货号 / 颜色 / 仓库 / 单号 / 备注）**一律靠左**
       · 数字列（class="num"）仍居中；尺码 / 勾选 / 缩略图 / .c 也仍居中
       · 长名字用满列宽、超出打省略号（见文件末尾 445 那段）

   原因：148 轮是为了「表头和数据同一条线」，但表格 width:100% + 列少的时候，
   居中会把 4 个字的客户名摆到一列的正中间，前面空掉半个列宽 ——
   列拖得越宽空得越多，还以为是列宽算错了。
   靠左之后，表头和数据仍在同一条线上，只是这条线贴着左边。

   ★ 只改对齐，不碰任何数据、逻辑、列宽计算。
   ============================================================ */
table.grid th,
table.grid td { text-align: left; }
table.grid td.num,
table.grid th.num {
  text-align: center;
  font-variant-numeric: tabular-nums;    /* 数字等宽，居中后位数也对得齐 */
}
/* 表头稍稍加重一点，压得住下面的数据 */
table.grid thead th { font-weight: 500; }
/* 单元格上下留一点呼吸，别挤成一片 */
table.grid th, table.grid td { padding-top: 7px; padding-bottom: 7px; }
/* ★445：备注 / 材料名这些长句子跟表头一起靠左（居中会让长句两头都留空） */
table.grid td.memo-cell,
table.grid td.remcell,
table.grid td.cell-rem,
table.grid td.wrapcell { text-align: left; }
/* ★445：格子里的框跟**自己的表头**同一边 —— 文字框靠左，数字框居中 */
table.grid input,
table.grid select,
table.grid textarea,
table.grid .combo > .combo-in,
table.grid .scd-in,
table.grid .rem-in,
table.grid .la-edit { text-align: left; }
/* 数字 / 尺码框：这几类的规则本身写了 right（.bom-in.num:599 / .scd-in.num:528），
   以前靠上面那条全局 center 压住，现在得自己写明，否则会变右对齐 */
table.grid input.num,
table.grid .bom-in.num,
table.grid .scd-in.num,
table.grid input.szin,
table.grid .mo-in,
table.grid .mo-in-g,
table.grid td.num input,
table.grid td.num select,
table.grid td.num .combo-in { text-align: center; }

/* ============================================================
   ★第一百四十九轮（老板拿成品库存表的「鞋型」举例）当时给 .ell 加了 margin:auto，
     让被 max-width 限宽的小盒子自己居中。
   ★★445 轮已撤销这个修法：盒子改回靠左站，宽度吃满整格（见文件末尾），
     否则「列拖宽了、字还挤在小盒子中间」这个毛病永远治不好。
   ============================================================ */
table.grid td .ell {
  margin-left: 0;      /* ★445：撤销 149 轮的 margin:auto —— 盒子靠左站 */
  margin-right: 0;
}
/* 提示条里的 .ell 不算表格，不受影响（上面已经限定在 table.grid td 里） */

/* ★ 尺码列（szcol）原来被 `table.grid.rep-tbl td.szcol{text-align:right}` 压着（特异性更高），
   全局居中盖不住它 —— 这两条用 !important 兜底，尺码列也居中。 */
table.grid th.szcol,
table.grid td.szcol { text-align: center !important; }

/* ★第一百五十一轮：上一轮「全站统一居中」漏了一张表 —— 客户账（.fin-tbl）。
   它自己有 `th.num, td.num { text-align: right }`（特异性 0,4,2），把全局居中压住了。
   这里用 !important 收掉，纯对齐，别的一律不动。 */
/* ★445：文字靠左；金额/欠款那些数字仍居中（末尾 445 那段按 .num 补） */
table.grid.rep-tbl.fin-tbl th,
table.grid.rep-tbl.fin-tbl td { text-align: left; }

/* ★第一百五十四轮：销售订单里「超出货号码段」的尺码格 —— 灰掉，一眼看出填不了 */
table.grid.docgrid td.szcell.sz-out { background: #f4f5f7; }
table.grid.docgrid td.szcell.sz-out input.szin { color: #c3c8cf; background: transparent; cursor: not-allowed; }

/* ============================================================
   ★★第一百五十八轮（老板点名）：登录提醒
     · 顶栏「提醒」按钮 + 小角标
     · 弹窗：4 组、每行一项，右边三个动作（去处理 / 忽略 / 稍后 ▾）
     · 配色跟着上一轮的规矩走：都浅，不刺眼
   ============================================================ */
.notice-btn { position: relative; }
.notice-badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  margin-left: 4px; padding: 0 4px; border-radius: 9px;
  background: #f3d6d3; color: #8d3f3f; font-size: 11px; font-weight: 500; text-align: center;
}

.notice-mask .nt-modal { max-width: 660px; }
/* ★ 提醒弹窗的正文必须是**单列**：.modal-body 本身是 flex 多列（给"字段并排"用的），
   不覆盖的话勾选项会被并排挤成两列、组的标题跟第一项挤在一行。 */
.notice-mask .nt-body {
  display: block; max-height: min(66vh, 560px); overflow-y: auto; padding: 4px 16px 10px;
}
.notice-mask .nt-body > * { flex: 0 0 100%; width: 100%; }

.nt-group { margin-top: 12px; }
.nt-gtitle {
  font-size: 12px; color: var(--c-text-2); font-weight: 500;
  padding: 4px 2px 5px; border-bottom: 1px solid #eef1f5; margin-bottom: 2px;
}
.nt-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 8px; transition: opacity .2s, background .15s;
}
.nt-row + .nt-row { border-top: 1px dashed #f1f3f6; }
.nt-row:hover { background: #fafbfd; }
.nt-row.nt-gone { opacity: 0; }
.nt-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nt-name { font-size: 13.5px; color: #2c3138; font-weight: 500; flex: none; }
.nt-num { font-size: 17px; font-variant-numeric: tabular-nums; color: #8d3f3f; font-weight: 500; flex: none; }
.nt-num.money { color: #8d5a3f; }
.nt-num i { font-size: 11px; font-style: normal; font-weight: 400; color: var(--c-muted); margin-left: 2px; }
.nt-detail { font-size: 12px; color: var(--c-text-2); min-width: 0; }
.nt-acts { display: flex; gap: 6px; flex: none; }
.nt-acts .btn { padding: 3px 9px; font-size: 12px; }

.nt-empty { padding: 34px 10px; text-align: center; color: var(--c-muted); font-size: 14px; }
.nt-foot-note { margin-top: 12px; padding-top: 8px; border-top: 1px dashed #eef1f5; font-size: 12px; color: var(--c-muted); }

/* 「稍后 ▾」的小浮层 */
.nt-pick {
  position: fixed; z-index: 500; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15,25,45,.14); padding: 4px; min-width: 112px;
}
.nt-pick button {
  border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 5px;
  font-size: 12.5px; color: var(--c-text); cursor: pointer;
}
.nt-pick button:hover { background: #f3f6fb; color: var(--c-primary); }

/* 设置视图 */
.nt-sec { margin: 16px 0 6px; font-size: 12.5px; font-weight: 500; color: var(--c-text-2);
  padding-bottom: 5px; border-bottom: 1px solid #eef1f5; }
.nt-radio { display: flex; align-items: center; gap: 7px; padding: 5px 2px; font-size: 13px; color: var(--c-text); }
.nt-radio input[type="radio"], .nt-radio input[type="checkbox"] { flex: none; }
.nt-radio input[type="number"] { height: 26px; padding: 1px 5px; font-size: 12.5px; }
.nt-ck { align-items: flex-start; flex-wrap: wrap; padding: 6px 2px; }
.nt-ck b { font-weight: 500; font-size: 13px; flex: none; margin-right: 5px; }
.nt-ck span { font-size: 11.5px; color: var(--c-muted); flex: 1 1 180px; min-width: 0; }
.nt-ck.disabled { opacity: .55; }
.nt-no { font-size: 11px; color: var(--c-warn); font-style: normal; }
.nt-snoozed { font-size: 12px; color: var(--c-muted); }
.nt-snooze-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; font-size: 13px; }
.nt-snooze-row b { font-weight: 500; }
.nt-snooze-row span { color: var(--c-muted); font-size: 12px; flex: 1 1 auto; }

/* 手机上：按钮换到第二行 */
@media (max-width: 720px) {
  .notice-mask .nt-modal { max-width: calc(100vw - 20px); }
  .nt-row { flex-direction: column; align-items: stretch; gap: 7px; }
  .nt-acts { justify-content: flex-end; }
  .nt-body { max-height: 70vh; }
}

/* ============================================================
   ★★第一百六十一轮：手机版四单据（进货 / 发货 / 领料 / 成品入库）
   老板原则：「手机版就只要保持核心功能，排版紧凑」（第 66 轮原话）
   → 一行一条明细，只有「件数/数量」一个输入；未/总 合并一格；41~43 不出现。
   ============================================================ */
.m2d-tools { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; }
.m2d-hint { font-size: 12px; color: var(--c-text-2); margin-left: auto; }
.m2d-empty { text-align: center; color: var(--c-text-2); font-size: 13px; padding: 26px 10px; }

.m2d-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 10px; padding: 7px 8px; margin-bottom: 7px;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .07);
}
.m2d-img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 6px; overflow: hidden;
  background: #f4f5f7; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--c-text-2); }
.m2d-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2d-info { flex: 1 1 auto; min-width: 0; }
.m2d-nm { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m2d-color { font-weight: 600; color: var(--c-primary-dark); margin-left: 2px; }
.m2d-sub { font-size: 11.5px; color: var(--c-text-2); margin-top: 1px; display: flex; align-items: center; gap: 6px; }
.m2d-lt i { font-style: normal; font-weight: 700; color: var(--c-primary-dark); }
.m2d-tag { background: #eef4ff; color: var(--c-primary-dark); border-radius: 8px; padding: 0 6px; font-size: 10.5px; }
.m2d-in { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.m2d-qty { width: 62px; height: 34px; border: 1px solid var(--c-border); border-radius: 8px;
  text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: #fff; color: var(--c-text); }
.m2d-qty:focus { border-color: var(--c-primary); outline: none; }
.m2d-qty:disabled { background: #f6f7f9; color: var(--c-text-2); }
.m2d-unit { font-size: 11px; color: var(--c-text-2); }
.m2d-x { flex: 0 0 24px; width: 24px; height: 24px; border: none; background: #f4f5f7; border-radius: 50%;
  color: #8b94a3; font-size: 15px; line-height: 1; cursor: pointer; }
.m2d-x:active { background: #ffe6e6; color: #c0392b; }

/* ---- 选单浮层（全屏，fixed，不新增路由） ---- */
.m2d-mask { position: fixed; inset: 0; z-index: 60; background: rgba(16, 22, 32, .45);
  display: flex; align-items: flex-end; justify-content: center; }
.m2d-pick { width: 100%; max-width: 560px; max-height: 92vh; background: #f4f5f7;
  border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.m2d-pick-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff;
  border-bottom: 1px solid var(--c-border); font-size: 14px; }
.m2d-pick-b { flex: 1 1 auto; overflow-y: auto; padding: 8px; }
.m2d-pick-f { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff;
  border-top: 1px solid var(--c-border); font-size: 13px; }
.m2d-pr { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px;
  padding: 7px 8px; margin-bottom: 6px; }
.m2d-pr-ck { flex: 0 0 26px; }
.m2d-pr-ck input { width: 19px; height: 19px; }
.m2d-lt2 { flex: 0 0 auto; text-align: right; min-width: 62px; }
.m2d-lt2 i { display: block; font-style: normal; font-size: 16px; font-weight: 700; color: var(--c-primary-dark);
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.m2d-lt2 span { font-size: 10.5px; color: var(--c-text-2); }
.m2d-more { text-align: center; padding: 6px 0 12px; }

/* ============================================================
   ★★第一百六十二轮（老板点名）：进货单「按日期补录」
   录入方式三选一 + 明细里的日期格（右边一颗「＝」抄上一行的日期）
   ============================================================ */
.buy-mode {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 10px;
  background: var(--c-bg-2, #f6f7f9); border-radius: 8px;
}
.buy-mode-t { font-size: 12px; color: var(--c-text-2); margin-right: 2px; }
.buy-mode-b {
  height: 30px; padding: 0 12px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff; color: var(--c-text);
}
.buy-mode-b:hover { border-color: var(--c-primary); color: var(--c-primary); }
.buy-mode-b.on {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600;
}
.buy-date-hint { background: #fff8e6; border-color: #f0d9a8; }

/* 明细里的日期格 */
.dt-wrap { display: flex; align-items: center; gap: 3px; }
.dtin { width: 118px; font-variant-numeric: tabular-nums; }
.dt-copy {
  flex: 0 0 24px; width: 24px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; cursor: pointer;
  border: 1px solid var(--c-border); border-radius: 5px;
  background: #fff; color: var(--c-primary-dark, #1f5fbf);
}
.dt-copy svg { display: block; }
.dt-copy:hover:not(:disabled) { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.dt-copy:disabled { opacity: .35; cursor: not-allowed; }
.dt-copy.done { background: #d8f0dd; border-color: #74c088; color: #1d7a3a; }

/* ============================================================
   ★★第一百六十二轮（老板点名）：左侧菜单可折叠 + 自己整理
   ============================================================ */
/* ★第一百六十九轮（老板点名）：栏目名要一眼看得出「这是个栏目、点它能折叠」
 *   原来是 11.5px 常规灰，跟菜单项几乎一样大。现在 15px 加粗 + 提亮；
 *   展开的那一栏左侧有一条蓝竖条 + 淡蓝底，收起状态每栏之间有一条细分隔线。
 *   ★ 老板从 4 个方案里选的 D（只放大一号，不做描边） */
.nav-group { padding: 0; scroll-margin-top: 46px; }   /* ★第307轮：收起栏目时 scrollIntoView 别钻到钉住的首页导航底下 */
.nav-group-title {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px 11px 9px; font-size: 15px; font-weight: 700; color: #e8f0ff;
  letter-spacing: .3px; line-height: 1.2;
  cursor: pointer; user-select: none; border-left: 3px solid transparent;
  border-top: 0.5px solid rgba(255,255,255,.07);
}
.nav-group-title:hover { background: rgba(255,255,255,.05); }
.nav-group.open .nav-group-title {
  color: #f2f7ff; border-left-color: #4c8cf5; background: rgba(76,140,245,.10);
}
.nav-caret { flex: 0 0 10px; width: 10px; height: 10px; transition: transform .14s; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-group-title > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-cnt {
  flex: 0 0 auto; font-weight: 500; font-size: 11.5px; color: #93a6c6;
  background: rgba(255,255,255,.08); border-radius: 8px; padding: 0 6px; min-width: 18px; text-align: center;
}
.nav-group.open .nav-cnt { color: #c3d6f5; background: rgba(76,140,245,.22); }
.nav-group-body { display: none; }
.nav-group.open .nav-group-body { display: block; }
/* ★第169轮：小标题去掉了（老板：这个我不要）。样式留着，万一以前存过旧数据也不至于难看 */
.nav-sub-title {
  padding: 6px 16px 3px 26px; font-size: 10.5px; color: #5f729a; letter-spacing: .6px;
}
/* ---------- ★★★第307轮（老板点名）：首页导航钉在菜单顶部，不跟着滚（像 Excel 冻结首行） ----------
   ★ 底色必须**不透明**：菜单从底下滚过去，不能从字缝里透出来；
   ★ 原来的 margin-bottom:3px 在 sticky 下就是一条透明缝 → 改成 0，用 box-shadow 补住那 3px。 */
.nav a.nav-home {
  position: sticky; top: 0; z-index: 6;
  background: #14213d;
  padding-top: 13px;                                  /* 补回 .nav 原来的 6px 上内边距，视觉位置不变 */
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 0;
  box-shadow: 0 3px 0 #14213d, 0 6px 10px rgba(4,10,24,.32);
}
/* ★ 不透明底色会盖掉 .nav a.active 的半透明高亮 → 单独给它一条实色（= #14213d 上叠 rgba(31,95,191,.30)） */
.nav a.nav-home.active { background: #173464; }
.nav a.nav-home:hover { background: #1a2b4d; }
.nav-foot { padding: 10px 12px 16px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.07); }
.nav-edit {
  width: 100%; height: 30px; border: 1px dashed rgba(255,255,255,.22); border-radius: 6px;
  background: transparent; color: #8598ba; font-size: 12px; cursor: pointer;
}
.nav-edit:hover { border-color: #4c8cf5; color: #cfe0ff; background: rgba(76,140,245,.12); }

/* ---- 整理菜单弹窗 ---- */
/* ★ .modal 默认 max-width:980、.modal-body 默认 flex-wrap:wrap —— 这两条会把两栏挤成上下，
     所以这里三个属性都加 !important（踩过：不加就变成「左边一栏、右边跑到下面」） */
.mn-modal { max-width: 1080px !important; width: min(1080px, 96vw) !important; }
.mn-tip {
  padding: 8px 16px; font-size: 12px; color: var(--c-text-2);
  background: #f7f9fc; border-bottom: 1px solid var(--c-border); line-height: 1.6;
}
.mn-body { display: flex !important; flex-wrap: nowrap !important; gap: 14px; padding: 12px 14px; align-items: flex-start; }
.mn-col { min-width: 0; }
.mn-left { flex: 1 1 58%; }
.mn-right { flex: 1 1 42%; border-left: 1px solid var(--c-border); padding-left: 14px; }
.mn-h { font-size: 12.5px; font-weight: 600; color: var(--c-text); margin-bottom: 8px; }
.mn-hint { font-weight: 400; font-size: 11.5px; color: var(--c-text-2); margin-left: 6px; }
.mn-hint.warn { color: var(--c-danger); }
.mn-groups { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.mn-g { border: 1px solid var(--c-border); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.mn-g.on { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(31,95,191,.08); }
.mn-g-h { display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 8px; }
.mn-g-name {
  flex: 1 1 auto; min-width: 0; height: 26px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; font-size: 13px; font-weight: 600; color: var(--c-text); padding: 0 5px;
}
.mn-g-name:hover { border-color: var(--c-border); background: #fbfcfe; }
.mn-g-name:focus { border-color: var(--c-primary); background: #fff; outline: none; }
.mn-g-n {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 400; color: var(--c-text-2);
  background: #f1f3f7; border-radius: 7px; padding: 1px 5px; min-width: 16px; text-align: center;
}
/* ★ 老板反馈「栏目不能排顺序」——按钮原来 22px 太小、看不出能点，加到 26px 并加深描边 */
.mn-ib {
  flex: 0 0 26px; width: 26px; height: 26px; padding: 0; font-size: 13px; line-height: 1;
  border: 1px solid #cfd6e0; border-radius: 5px; background: #fff; color: #4a5568; cursor: pointer;
}
.mn-ib:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.mn-ib:disabled { opacity: .3; cursor: not-allowed; }
.mn-ib.danger:hover:not(:disabled) { border-color: var(--c-danger); color: var(--c-danger); background: #fff5f5; }
.mn-g-body { padding: 2px 6px 8px 10px; border-top: 1px dashed var(--c-border); }
.mn-i { display: flex; align-items: center; gap: 4px; padding: 3px 0; }
.mn-i-t { flex: 1 1 auto; min-width: 0; font-size: 12.5px; padding-left: 4px; }
.mn-h-row { display: flex; align-items: center; gap: 8px; }
.mn-h-row .mn-add { margin-left: auto; height: 26px; }
.mn-sub {
  display: flex; align-items: center; gap: 4px; padding: 5px 4px 4px 6px;
  border: 1px dashed transparent; border-radius: 6px; cursor: pointer; margin: 2px 0;
}
.mn-sub:hover { border-color: #cfd6e0; background: #fafbfd; }
.mn-sub.on { border-color: var(--c-primary); background: #eef4ff; }
.mn-sub.on .mn-sub-in { border-color: #b9d0f5; background: #fff; }
.mn-sub-bar { flex: 0 0 auto; font-size: 11px; color: var(--c-primary); opacity: .55; }
.mn-sub.on .mn-sub-bar { opacity: 1; }
.mn-sub-in {
  flex: 1 1 auto; min-width: 0; height: 24px; border: 1px solid var(--c-border); border-radius: 5px;
  background: #fbfcfe; font-size: 11.5px; color: var(--c-text-2); padding: 0 6px;
}
.mn-sub-in:focus { border-color: var(--c-primary); background: #fff; outline: none; }
.mn-empty { font-size: 12px; color: var(--c-text-2); padding: 8px 4px; }
.mn-add-row { padding-top: 4px; }
.mn-add {
  height: 26px; padding: 0 10px; font-size: 12px; border-radius: 5px; cursor: pointer;
  border: 1px dashed var(--c-border); background: #fff; color: var(--c-text-2);
}
.mn-add:hover { border-color: var(--c-primary); color: var(--c-primary); }
.mn-add.wide { width: 100%; height: 30px; margin-top: 2px; }
.mn-new { display: flex; gap: 6px; margin-top: 4px; }
.mn-new input {
  flex: 1 1 auto; min-width: 0; height: 30px; border: 1px solid var(--c-primary); border-radius: 6px;
  padding: 0 8px; font-size: 12.5px;
}
.mn-free { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.mn-fg { margin-bottom: 10px; }
.mn-fg-t { font-size: 11.5px; color: var(--c-text-2); margin-bottom: 4px; }
.mn-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mn-chip {
  height: 26px; padding: 0 9px; font-size: 12px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text);
}
.mn-chip:hover:not(:disabled) { border-color: var(--c-primary); background: #eef4ff; color: var(--c-primary-dark); }
.mn-chip:disabled { opacity: .45; cursor: not-allowed; }
/* ★第304轮：已经放在别的栏目里的功能 —— 淡底 + 右上角「已在 N 处」小圆点 */
.mn-chip.inuse { position: relative; background: #f6f8fb; color: var(--c-text-2); }
.mn-chip.inuse:not(:disabled):hover { background: #eef4ff; color: var(--c-primary-dark); }
.mn-chip .mn-cnt {
  position: absolute; top: -6px; right: -4px; min-width: 15px; height: 15px; line-height: 15px;
  padding: 0 3px; border-radius: 8px; background: var(--c-primary); color: #fff;
  font-size: 10px; font-weight: 700; text-align: center;
}
.mn-foot { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  .mn-body { flex-direction: column; }
  .mn-right { border-left: none; border-top: 1px solid var(--c-border); padding-left: 0; padding-top: 10px; flex: 1 1 auto; }
  .mn-left { flex: 1 1 auto; }
  .mn-groups, .mn-free { max-height: 34vh; }
}

/* ★第一百六十二轮：报表筛选条里的「供应商」下拉（进货入库汇总表用） */
.rf-sup { display: inline-flex; align-items: center; gap: 6px; }
.rf-sup-t { font-size: 12px; color: var(--c-text-2); white-space: nowrap; }
.rf-sup .combo { min-width: 190px; }

/* ★第一百六十二轮：整理菜单里的「电脑版 / 手机版」切换 */
.mn-tabs {
  display: flex; align-items: flex-end; gap: 4px;
  padding: 8px 14px 0; background: #fff; border-bottom: 1px solid var(--c-border);
}
.mn-tab {
  height: 32px; padding: 0 16px; font-size: 13px; cursor: pointer;
  border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--c-text-2);
}
.mn-tab:hover { background: #f6f8fc; color: var(--c-text); }
.mn-tab.on {
  background: #eef4ff; border-color: var(--c-border);
  color: var(--c-primary-dark, #1f5fbf); font-weight: 600;
}
.mn-tab-hint { font-size: 11.5px; color: var(--c-text-2); margin-left: auto; padding-bottom: 8px; }

/* ============================================================
   ★第一百六十四轮（老板点名）：进货入库列表加「材料名称」列
   老板：字小一点、最多两行、默认显示 6 种，超过 6 种后面打省略号
   ============================================================ */
table.grid td.matcell { vertical-align: middle; }
table.grid td.matcell .mn {
  font-size: 11.5px; line-height: 1.45; color: var(--c-text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
/* 供应商下拉（两张表共用）：够放一个长公司名，又不至于把筛选条挤爆 */
.rf-sup .combo { min-width: 176px; }

/* ============================================================
   ★★第一百六十六轮（老板点名）：改名「影响预览」弹窗
   ============================================================ */
.imp-modal { max-width: 600px; }
.imp-who {
  padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid var(--c-border);
  font-size: 13px; font-weight: 600;
}
.imp-bit { margin-top: 4px; font-size: 13.5px; font-weight: 400; color: var(--c-text); }
.imp-sec { padding: 10px 16px 6px; font-size: 12.5px; font-weight: 600; color: var(--c-text); }
.imp-sec span { font-weight: 400; color: var(--c-text-2); margin-left: 6px; font-size: 11.5px; }
.imp-tbl { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.imp-tbl td { padding: 5px 16px; font-size: 12.5px; border-bottom: 1px dashed #eef0f4; vertical-align: top; }
.imp-tbl .im-l { width: 34%; color: var(--c-text); }
.imp-tbl .im-n { width: 30%; color: var(--c-text); white-space: nowrap; }
.imp-tbl .im-s { color: var(--c-text-2); font-size: 11.5px; }
.imp-tbl .im-x { color: var(--c-primary-dark); margin-left: 6px; }
.imp-warn {
  margin: 8px 16px 10px; padding: 8px 10px; background: #fff7e6;
  border: 1px solid #ffd591; border-radius: 6px; font-size: 12.5px; line-height: 1.75; color: #8a5a00;
}
.imp-warn b { display: block; margin-bottom: 2px; }
.imp-tip { padding: 0 16px 10px; font-size: 11.5px; color: var(--c-text-2); }
.imp-danger {
  margin: 0 16px 12px; padding: 8px 10px; background: #fff1f0; border: 1px solid #ffccc7;
  border-radius: 6px; font-size: 12.5px; line-height: 1.75; color: #a8071a;
}

/* ============================================================
   ★第一百七十一轮（老板点名）：产品工艺 BOM 总表
   ① 货号列表头加「Excel 式」排序箭头（点一下升序、再点降序、再点回默认）
   ② 新加「建档时间 / 最后修改」两列
   ============================================================ */
.sort-hd {
  display: inline-flex; align-items: center; gap: 3px;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.sort-hd:hover { color: var(--c-primary); }
.sort-hd .sa {
  display: flex; flex-direction: column; font-style: normal;
  font-size: 9px; line-height: 8px; color: #b3bccb; letter-spacing: 0;
}
.sort-hd .sa.on { color: var(--c-primary); }
table.grid th.dtcol { font-size: 12px; }
table.grid td.dtcell {
  font-size: 12px; color: var(--c-text-2); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ★第172轮（老板点名）：
   ① 货号清单顶部「快速定位」三个按钮（全部 / 未审核 / 没录材料）
   ② 导出前弹「范围」选择框
   ============================================================ */
.bom-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-bottom: 1px solid var(--c-border); background: #fafcff;
}
.bf-label { font-size: 12.5px; color: var(--c-text-2); font-weight: 600; }
.bf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  font-size: 12.5px; line-height: 1;
}
.bf-chip b {
  font-size: 12px; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 9px; background: #eef1f6; color: var(--c-text-2);
}
.bf-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.bf-chip.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.bf-chip.on b { background: rgba(255, 255, 255, .28); color: #fff; }
.bf-chip.warn:not(.on) b { background: #fdf1dc; color: #a56500; }
.bf-chip.danger:not(.on) b { background: #fdeaea; color: #c0291f; }
.bf-chip.danger.on { background: var(--c-danger); border-color: var(--c-danger); }
.bf-chip.warn.on { background: var(--c-warn); border-color: var(--c-warn); }
.bf-tip { font-size: 12px; color: var(--c-muted); margin-left: 2px; }
table.grid span.zero-mat { color: var(--c-danger); font-weight: 600; }

/* 导出范围弹窗 */
.bx-modal { width: 560px; max-width: calc(100vw - 32px); }
.bx-on {
  font-size: 13px; color: var(--c-primary); background: #eef4ff;
  border: 1px solid #d6e4ff; border-radius: 6px; padding: 7px 10px; margin-bottom: 10px;
}
.bx-row { border: 1px solid var(--c-border); border-radius: 8px; margin-bottom: 8px; }
.bx-row:has(input:checked) { border-color: var(--c-primary); background: #f7faff; }
.bx-op { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; cursor: pointer; }
.bx-op input[type="radio"] { margin-top: 3px; }
.bx-op span { display: block; font-size: 13px; color: var(--c-text); line-height: 1.5; }
.bx-op i { display: block; font-style: normal; font-size: 11.5px; color: var(--c-muted); margin-top: 2px; }
.bx-num {
  width: 74px; height: 24px; padding: 0 6px; text-align: right;
  border: 1px solid var(--c-border); border-radius: 5px; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.bx-num:disabled { background: #f2f4f8; color: var(--c-muted); }
.bx-tip {
  font-size: 12px; color: var(--c-text-2); background: #f7f9fc;
  border: 1px dashed var(--c-border); border-radius: 6px; padding: 8px 10px; line-height: 1.6;
}
@media (max-width: 720px) {
  .bom-filters { padding: 7px 10px; gap: 6px; }
  .bf-tip { display: none; }
}

/* ============================================================
   ★第173轮：材料看板「直连地址」弹窗
   ============================================================ */
.kb-modal { width: 640px; max-width: calc(100vw - 32px); }
.kb-lead {
  font-size: 12.5px; color: var(--c-text-2); line-height: 1.7;
  background: #f5f8fd; border: 1px solid #e2ebf8; border-radius: 8px; padding: 9px 12px;
}
.kb-sec { border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.kb-sec > b { font-size: 13.5px; color: var(--c-text); margin-right: 8px; }
.kb-sec > span { display: block; font-size: 11.5px; color: var(--c-muted); margin-top: 3px; line-height: 1.5; }
.kb-url { display: flex; gap: 8px; margin-top: 8px; }
/* ★第312轮：地址框前面的「CSV / Excel 版」小标签 —— 固定宽度、不参与压缩，说清这条是什么格式 */
.kb-url .kb-fmt {
  flex: 0 0 auto; align-self: center; font-size: 11.5px; color: var(--c-muted);
  background: #f4f6fa; border: 1px solid var(--c-border); border-radius: 5px;
  padding: 2px 7px; white-space: nowrap;
}
.kb-url input {
  flex: 1; height: 30px; padding: 0 9px; font-size: 12px; font-family: Consolas, monospace;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fbfcfe; color: var(--c-text);
}
.kb-where { font-size: 12px; color: var(--c-text-2); margin-top: 6px; }
.kb-tip {
  font-size: 12px; color: var(--c-text-2); line-height: 1.75; margin-top: 10px;
  background: #f7f9fc; border: 1px dashed var(--c-border); border-radius: 6px; padding: 9px 11px;
}
.kb-note { font-size: 11.5px; color: var(--c-muted); margin-top: 8px; }

/* ★第298轮：看板直连管理页（系统管理 → 看板直连）
   一行一条地址：上面名字+条件，下面地址+按钮 */
.kb-row {
  border: 1px solid var(--c-border); border-radius: 8px;
  padding: 9px 11px; margin-top: 8px; background: #fff;
}
.kb-row-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--c-text);
}
.kb-row-top .io-sub { font-size: 11.5px; color: var(--c-muted); }
.kb-row .kb-url { margin-top: 6px; }
.kb-sel {
  height: 30px; padding: 0 8px; font-size: 12.5px; min-width: 200px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff; color: var(--c-text);
}

/* ============================================================
   ★第175轮（老板点名）：材料下单 —— 尺码铺开 / 两张表 / 冻结首列 / 60 秒勾选
   ============================================================ */
.mo-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--c-border); background: #fafcff;
}
.mo-tab {
  height: 27px; padding: 0 11px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2); font-size: 12.5px;
}
.mo-tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.mo-tab.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.mo-locktip { font-size: 11.5px; color: #8a94a3; white-space: nowrap; padding-left: 4px; }
@media (max-width: 1500px) { .mo-locktip { display: none; } }

/* 两张表：常用 35~40 / 含超大码 35~43 */
.mo-seg { display: inline-flex; margin-left: 6px; border: 1px solid var(--c-border); border-radius: 13px; overflow: hidden; }
.mo-tab2 {
  height: 26px; padding: 0 11px; border: 0; cursor: pointer; background: #fff;
  color: var(--c-text-2); font-size: 12px; border-right: 1px solid var(--c-border);
}
.mo-tab2:last-child { border-right: 0; }
.mo-tab2:hover { color: var(--c-primary); }
.mo-tab2.on { background: #eef4ff; color: #185fa5; font-weight: 600; }

/* 表格容器：自己滚动（横竖都在里面），表头 + 第一列都冻住 */
.mo-wrap { max-height: calc(100vh - 225px); overflow: auto; }
table.mo-table2 { table-layout: fixed; width: auto; min-width: 0; font-size: 11px; border-collapse: separate; border-spacing: 0; }
table.mo-table2 th, table.mo-table2 td {
  padding: 0 1px; border-bottom: 1px solid #eef1f6; border-right: 1px solid #f4f6fa;
  text-align: center; white-space: nowrap; height: 32px; vertical-align: middle;
}
table.mo-table2 thead th {
  position: sticky; top: 0; z-index: 3; background: #f5f8fc; color: #5b6675;
  font-size: 11.5px; font-weight: 600;
}
table.mo-table2 thead tr:nth-child(2) th { top: 32px; }
table.mo-table2 th.mo-g { border-left: 1px solid #dde5f0; }
table.mo-table2 th.mo-rd { color: #185fa5; background: #eef4ff; }
table.mo-table2 th.mo-sz { font-size: 9.5px; font-weight: 500; color: #7b8797; padding: 0; }
table.mo-table2 th.mo-pk-h { width: 30px; font-size: 10px; color: #8a94a3; }
/* ★第179轮：每一轮采购后面的「合计」列（35~43 全码合计，含隐藏的 41~43） */
table.mo-table2 th.mo-sum-h {
  width: 46px; font-size: 10px; color: #5b6675; font-weight: 600; background: #eef4ff;
}
table.mo-table2 td.mo-sum {
  position: relative;
  font-size: 11px; font-weight: 700; text-align: center; color: #185fa5;
  background: #f6f9ff; border-left: 1px solid #d7e0ec; font-variant-numeric: tabular-nums;
}
/* ★第180轮：打印过的那一轮 → 输入框冻结（看着还是数字，但光标插不进去） */
table.mo-table2 td.mo-sum.lock { background: #f1f3f6; }
table.mo-table2 td.mo-sum.lock .mo-sumv { color: #5b6675; }
.mo-in.mo-ro {
  background: transparent !important; border-color: transparent !important;
  color: #6b7688; cursor: default; caret-color: transparent;   /* 光标插不进去 */
}
.mo-in.mo-ro:focus { outline: none; }
/* ★合计后面那个很小的「修改」按钮（✎） */
.mo-edit {
  position: absolute; right: 1px; top: 1px; width: 13px; height: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1; font-style: normal; border-radius: 3px;
  color: #8b94a3; background: #e8edf5; cursor: pointer; user-select: none;
}
.mo-edit:hover { color: #fff; background: #2f6fd0; }
.mo-edit.on { color: #fff; background: #e08b2a; }
.mo-edit.on:hover { background: #c9761a; }
/* Excel 式框选 */
.mo-in.msel { background: #dceaff !important; border-color: #7aa7e8 !important; }

/* 冻结第一列（只冻材料名称，规格/单位跟着滚） */
table.mo-table2 th.mo-frz, table.mo-table2 td.mo-frz {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 #e3e8f0;
}
table.mo-table2 thead th.mo-frz { z-index: 5; background: #eef2f8; }
table.mo-table2 th.mo-frz2 { position: sticky; top: 32px; left: 0; z-index: 5; background: #eef2f8; }

.mo-name {
  font-weight: 500; font-size: 12.5px; line-height: 1.15; text-align: left; padding: 2px 6px !important;
  white-space: normal; word-break: break-all;
}
.mo-name .mo-rulebtn { margin-left: 3px; }
.mo-spec { font-size: 10px; color: #8a94a3; overflow: hidden; }
.mo-unit { font-size: 10px; color: #8a94a3; }
.mo-rulebtn {
  margin-left: 5px; font-size: 10.5px; line-height: 1; padding: 2px 5px; vertical-align: 1px;
  border: 1px solid #dfe5ee; border-radius: 3px; background: #fff; color: #8a94a3; cursor: pointer;
}
.mo-rulebtn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.mo-rulebtn.on { border-color: #b5d4f4; background: #eef4ff; color: #185fa5; }
/* ★第201轮：「没勾管理清单」提示 */
.mo-addbar-lock { font-size: 12.5px; color: var(--c-text-2); padding: 4px 2px; }
/* ★第201轮：规则弹窗里的「按码看 / 通码」二选一 */
.mo-kind { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; padding: 9px 12px;
  background: #f7f9fc; border: 1px solid var(--c-border); border-radius: 7px; }
.mo-kind .mo-radio { font-size: 13px; }
.mo-one-note { font-size: 13px; line-height: 1.75; color: var(--c-text-2); padding: 4px 2px 10px; }
.mo-hint-lock { font-size: 11.5px; color: var(--c-text-2); margin-left: 6px; }
.mo-big {
  display: inline-block; width: 0; height: 0; margin-right: 3px; cursor: pointer;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 8px solid #e24b4a; vertical-align: -1px;
}
.mo-big:hover { border-bottom-color: #a32d2d; }

/* 数格子 */
.mo-n {
  font-size: 11px; text-align: center; padding: 0 !important;
  font-variant-numeric: tabular-nums; color: #1f2733;
}
.mo-n.tot { border-right: 1px solid #dde5f0; }
table.mo-table2 td.gs, table.mo-table2 th.gs { border-left: 1px solid #d7e0ec; }
.mo-n.band { background: #f7faff; }
.mo-n.tot { font-weight: 600; background: #f2f7ff; }
.mo-n.neg, .mo-n.tot.neg { color: var(--c-danger); }
.mo-band { background: #f7faff; }
.mo-o { padding: 3px 1px !important; }
.mo-in {
  width: 100%; height: 24px; padding: 0 2px; font-size: 11px; text-align: right;
  border: 1px solid #cddcf0; border-radius: 3px; background: #fff; font-variant-numeric: tabular-nums;
}
.mo-in:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 2px #dbe9ff; }
.mo-in-g { text-align: center; font-weight: 600; border-color: #9dbbf0; background: #fbfdff; }
.mo-pk { padding: 0 !important; }
.mo-pick { width: 12px; height: 12px; margin: 0; vertical-align: middle; cursor: pointer; }
.mo-pick:disabled { cursor: not-allowed; opacity: .35; }

table.mo-table2 tbody tr:hover td { background: #f8fbff; }
table.mo-table2 tbody tr:hover td.mo-frz { background: #f1f7ff; }
table.mo-table2 tbody tr.mo-on td { background: #eaf2ff; }
table.mo-table2 tbody tr.mo-on td.mo-frz { background: #e2eeff; }
table.mo-table2 tbody tr.mo-flash td { background: #fff3d6; transition: background .5s; }
/* ★第203轮：定位闪一下要一眼看得见 —— 名字格左边加一条橙条 + 整行加粗一点 */
table.mo-table2 tbody tr.mo-flash td.mo-frz { box-shadow: inset 3px 0 0 #f0a500; }
table.mo-table2 tbody tr.mo-flash .mo-nm { font-weight: 700; }

/* ============================================================
   ★第184轮（老板点名）：常驻清单 —— 快速加 / 排序 / 删除
   ============================================================ */
.mo-addbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--c-border); background: #f7fbff;
}
.mo-addbar-t { font-size: 12.5px; font-weight: 600; color: #185fa5; }
.mo-addbox { position: relative; display: inline-block; }
.mo-addbox input {
  width: 320px; height: 30px; padding: 0 9px; font-size: 13px;
  border: 1px solid #cddcf0; border-radius: 5px; background: #fff;
}
.mo-addbox input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 2px #dbe9ff; }
.mo-sug {
  position: absolute; left: 0; top: 32px; z-index: 60; min-width: 420px; max-height: 300px; overflow: auto;
  background: #fff; border: 1px solid #cddcf0; border-radius: 6px; box-shadow: 0 8px 22px rgba(23,43,77,.16);
}
.mo-sug-i { display: flex; align-items: center; gap: 8px; padding: 6px 9px; font-size: 12.5px; cursor: pointer; }
.mo-sug-i b { font-weight: 600; }
.mo-sug-i .c { color: #8a94a3; font-size: 11.5px; }
.mo-sug-i .s { color: #8a94a3; font-size: 11px; }
.mo-sug-i .q { margin-left: auto; color: #185fa5; font-size: 11.5px; }
.mo-sug-i.on, .mo-sug-i:hover { background: #eef4ff; }

/* ★第203轮：材料快速定位框（在 #moq 左边，候选面板右对齐） */
.mo-findbox { position: relative; display: inline-block; margin-right: 6px; }
.mo-findbox input {
  width: 246px; height: 30px; padding: 0 22px 0 9px; font-size: 12.5px;
  border: 1px solid #cddcf0; border-radius: 5px; background: #fff;
}
.mo-findbox input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 2px #dbe9ff; }
.mo-find-clr {
  position: absolute; right: 4px; top: 5px; width: 20px; height: 20px; line-height: 18px;
  border: 0; background: transparent; color: #8a94a3; font-size: 15px; cursor: pointer; padding: 0;
}
.mo-find-clr:hover { color: #d9534f; }
.mo-find-sug { left: auto; right: 0; min-width: 470px; }
.mo-find-sug .mo-find-sub { color: #8a94a3; font-size: 11.5px; margin-left: 8px; }
.mo-mgbox { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: #4a5566; }

/* 行上只剩「已停用」一个标（第186轮去掉「自加」「仅在途」） */
.mo-tag-dead {
  display: inline-block; margin-left: 4px; padding: 1px 4px; border-radius: 3px;
  font-size: 10px; font-style: normal; line-height: 1.4; vertical-align: 1px; white-space: nowrap;
  color: #a32d2d; background: #fcebeb; border: 1px solid #f3c9c9;
}
/* ★第186轮（老板点名）：有未发货订单的料，名字标蓝加粗；其余黑 */
.mo-name .mo-nm.want { color: #185fa5; font-weight: 700; }
/* ★第186轮：单行移出 —— 鼠标移到那一行才显一个很淡的 ✕ */
.mo-x {
  display: inline-block; margin-left: 5px; padding: 0 3px; border-radius: 3px;
  font-size: 11px; font-style: normal; line-height: 1.3; vertical-align: 1px;
  color: #c2cad6; cursor: pointer; opacity: 0; transition: opacity .12s;
}
table.mo-table2 tbody tr:hover .mo-x { opacity: 1; }
.mo-x:hover { color: #fff; background: #e24b4a; }
/* ★第186轮：清单外面还有料的提示条（只提示，点了才加） */
.mo-hint {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  margin: 6px 0 0; padding: 6px 10px; border: 1px dashed #f0d59a; border-radius: 5px;
  background: #fffaf0; font-size: 12px; color: #7a5a12;
}
.mo-hint-i { display: inline-flex; align-items: center; gap: 4px; }
.mo-hint b { color: #c9761a; }
.mo-hint .btn-link { color: #1f6fd0; font-size: 12px; }

/* 管理模式：勾选框 + 拖拽手柄（都在名字格里，不加列） */
.mo-mpick { width: 13px; height: 13px; margin: 0 5px 0 0; vertical-align: -1px; cursor: pointer; }
.mo-grip {
  display: inline-block; margin-right: 4px; padding: 0 2px; cursor: grab; color: #9aa6b8;
  font-size: 11px; letter-spacing: -1px; vertical-align: 1px; user-select: none;
}
.mo-grip:hover { color: var(--c-primary); }
.mo-grip:active { cursor: grabbing; }
table.mo-table2.mo-managing tbody tr.mo-dragging td { opacity: .45; }
table.mo-table2 tbody tr.mo-drop-top td { box-shadow: inset 0 2px 0 #2f6fd0; }
table.mo-table2 tbody tr.mo-drop-bot td { box-shadow: inset 0 -2px 0 #2f6fd0; }
/* 管理模式下不让改数量（避免误改），只留勾选和拖拽 */
table.mo-table2.mo-managing .mo-in,
table.mo-table2.mo-managing .mo-pick { pointer-events: none; opacity: .5; }

/* ============================================================
   ★第190轮（老板点名）：空行 + 管理模式「行间插入条」
   · 空行 = 一条矮矮的留白，不是数据行（没有勾选框、不进任何合计、不打印）
   · 插入条 = 行与行之间 6px 的空档，鼠标移上去变蓝、中间浮出一个 ＋
   ============================================================ */
table.mo-table2 tbody tr.mo-blank td {
  height: 18px; padding: 0; border-bottom: 1px dashed #e3e9f2;
  background: repeating-linear-gradient(45deg, #fbfcfe 0 6px, #f3f7fc 6px 12px);
}
table.mo-table2 tbody tr.mo-blank td.mo-blank-l { text-align: center; white-space: nowrap; }
table.mo-table2 tbody tr.mo-blank .mo-blank-tip {
  display: inline-block; font-size: 10.5px; color: #b3bdcb;
  user-select: none; opacity: 0; transition: opacity .12s;
}
table.mo-table2 tbody tr.mo-blank:hover .mo-blank-tip { opacity: 1; }
table.mo-table2 tbody tr.mo-blank .mo-x { margin: 0 0 0 4px; vertical-align: 0; }
table.mo-table2 tbody tr.mo-blank:hover .mo-x { opacity: 1; }

table.mo-table2 tbody tr.mo-ins td { height: 9px; padding: 0; border: 0; }
/* ★ ＋ 放在冻结列里（td.mo-frz 自带 sticky）—— 整张表 1900px 宽要横向滚，
   按钮放表格正中一滚就出屏幕，老板会以为没有插入条 */
table.mo-table2 tbody tr.mo-ins:hover td { background: #eaf2ff; }
table.mo-table2 tbody tr.mo-ins td.mo-ins-l { text-align: center; line-height: 9px; }
table.mo-table2 tbody tr.mo-ins .mo-insbtn {
  display: inline-block; vertical-align: top;
  width: 28px; height: 14px; padding: 0; margin: 0;
  border: 1px solid #cfdae8; border-radius: 7px;
  background: #fff; color: #8b97a8; font-size: 11px; line-height: 11px; cursor: pointer;
  opacity: .6; transition: opacity .1s;
}
table.mo-table2 tbody tr.mo-ins:hover .mo-insbtn { opacity: 1; }
table.mo-table2 tbody tr.mo-ins .mo-insbtn:hover {
  color: #2f6fd0; border-color: #2f6fd0; background: #f2f8ff;
}

/* 插入条点开的两个选项：插入材料 / 插入空行 */
.mo-insmenu {
  position: absolute; z-index: 90; min-width: 138px; padding: 3px;
  background: #fff; border: 1px solid #c9d3e0; border-radius: 7px;
  box-shadow: 0 12px 28px rgba(15, 25, 45, .16);
}
.mo-insmenu button {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 5px;
  background: transparent; font-size: 13px; color: #1f2733; cursor: pointer; white-space: nowrap;
}
.mo-insmenu button:hover { background: #eef4ff; color: #185fa5; }

/* ============================================================
   ★第192轮：浏览添加弹窗 —— 批量选择 + 翻页
   ============================================================ */
.mw-foot { flex-wrap: wrap; gap: 8px; }
.mw-allbox { display: flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.mw-selected { font-size: 12.5px; color: #185fa5; font-weight: 600; }
.mw-pager { display: inline-flex; align-items: center; gap: 6px; }
.mw-pinfo { font-size: 12.5px; color: var(--c-text-2); min-width: 86px; text-align: center; }
.mw-size {
  height: 27px; border: 1px solid var(--c-border); border-radius: 5px;
  font-size: 12px; padding: 0 4px; background: #fff; color: var(--c-text);
}
/* ★第200轮（老板点名）：浏览添加窗口里「有订单还没加」的材料 → 蓝色加粗 + 小标 */
.mw-nm.want { color: #185fa5; font-weight: 700; }
.mw-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 16px; vertical-align: 1px; white-space: nowrap;
}
.mw-tag-need { background: #e6f1fb; color: #185fa5; border: 1px solid #bcdcf5; }
.mw-tag-open { background: #fff7e6; color: #a86a00; border: 1px solid #ffd591; }
.modal-foot .btn[disabled] { opacity: .45; cursor: not-allowed; }


/* 底部：勾了几笔 + 倒计时 + 两个按钮 */
.mo-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-top: 1px solid var(--c-border); background: #fafcff; font-size: 12.5px;
  position: sticky; bottom: 0; z-index: 6;
}
.mo-foot b { color: #185fa5; }
.mo-left { font-size: 12px; color: #185fa5; padding: 1px 8px; border-radius: 9px; background: #eef4ff; }
.mo-left.warn { color: #a32d2d; background: #fcebeb; }

/* 共码编辑器 */
.mo-rule-modal { width: 620px; max-width: calc(100vw - 32px); }
.mo-rule-lead { font-size: 12.5px; color: var(--c-text-2); margin-bottom: 12px; line-height: 1.6; }
.mo-cuts { display: flex; align-items: center; gap: 0; margin-bottom: 6px; }
.mo-cz { flex: 1; text-align: center; font-size: 12px; padding: 5px 0; background: #f3f6fb; border-radius: 3px; }
.mo-cut {
  width: 14px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; border-radius: 4px;
}
.mo-cut::after { content: ''; width: 2px; height: 22px; border-radius: 1px; background: #a9b8cb; }
.mo-cut:hover { background: #eaf1fd; }
.mo-cut:hover::after { background: var(--c-primary); }
.mo-cut.on { background: #e6f1fb; }
.mo-cut.on::after { background: var(--c-primary); height: 26px; width: 3px; }
.mo-rule-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.mo-gp { font-size: 12px; padding: 3px 9px; border-radius: 5px; background: #e6f1fb; color: #185fa5; }
.mo-align-box { border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.mo-align-hd { font-size: 12px; color: var(--c-text-2); margin-bottom: 8px; }
.mo-align-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mo-align-nm { font-size: 12px; min-width: 96px; color: #1f2733; }
.mo-align-row select { height: 26px; font-size: 12px; border: 1px solid var(--c-border); border-radius: 5px; padding: 0 6px; }
.mo-align-def { border-top: 1px dashed var(--c-border); padding-top: 10px; }
.mo-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin-right: 14px; color: var(--c-text-2); }
.mo-align-tip { font-size: 11px; color: var(--c-muted); margin-top: 6px; }
.mo-rule-presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--c-text-2); margin-bottom: 12px; }

/* 入库弹窗 */
.mo-buy-modal { width: 580px; max-width: calc(100vw - 32px); }
.mo-buy-lead { font-size: 12.5px; color: var(--c-text-2); margin-bottom: 10px; line-height: 1.6; }
.mo-buy-list { border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; margin-bottom: 12px; max-height: 44vh; overflow-y: auto; }
.mo-buy-grp { border-bottom: 1px solid var(--c-border); }
.mo-buy-grp:last-child { border-bottom: 0; }
.mo-buy-grp.warn { background: #fffaf0; }
.mo-buy-gh { display: flex; align-items: center; gap: 8px; padding: 7px 11px 4px; font-size: 12.5px; }
.mo-buy-gh b { font-weight: 600; }
.mo-buy-grp.warn .mo-buy-gh { color: #8a5a00; }
.mo-buy-li { display: flex; align-items: center; gap: 8px; padding: 3px 11px 5px 18px; font-size: 11.5px; color: var(--c-text-2); }
.mo-buy-nm { flex: 1; color: #1f2733; }
.mo-tagk { font-size: 10.5px; padding: 0 5px; border-radius: 3px; background: #eef4ff; color: #185fa5; white-space: nowrap; }
.mo-buy-q { width: 54px; text-align: right; font-variant-numeric: tabular-nums; color: #1f2733; }
.mo-buy-d { width: 78px; text-align: right; color: var(--c-muted); white-space: nowrap; }
.mo-buy-n { color: var(--c-text-2); font-size: 12px; }
.mo-buy-grp.warn .mo-buy-n { color: #8a5a00; }
.mo-buy-date { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--c-text-2); }
.mo-buy-date input { height: 28px; padding: 0 8px; border: 1px solid var(--c-border); border-radius: 5px; font-size: 12.5px; }
.mo-buy-tip { font-size: 11.5px; color: var(--c-muted); }

/* ============================================================
   ★第209轮：排单表 / 标签安排表
   ★★ 前缀必须写全 table.grid.rep-tbl.xxx —— 只写 .ps-tbl 会被
      styles.css:739 那条 table.grid.rep-tbl 盖掉（以前踩过）。
   ============================================================ */
.ps-tabs { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; flex-wrap: wrap; }
.ps-tab {
  height: 30px; padding: 0 14px; border: 1px solid var(--c-border); background: #fff;
  border-radius: 6px; font-size: 13px; color: var(--c-text-2); cursor: pointer;
}
.ps-tab:hover { border-color: #9dc0e8; color: #185fa5; }
.ps-tab.on {
  background: #185fa5; border-color: #185fa5; color: #fff; font-weight: 600;
  box-shadow: 0 1px 3px rgba(24, 95, 165, .25);
}
.ps-n {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 9px; background: rgba(0, 0, 0, .08); font-size: 11px; line-height: 16px; text-align: center;
}
.ps-tab.on .ps-n { background: rgba(255, 255, 255, .26); }

/* ★★★第216轮（老板点名：「货号 / 原货号 / 客户货号 / 客户商标 / 颜色 这些列都不要这么宽，
   大幅压缩一下」）—— 压窄的唯一有效手段是 **fixed + colgroup**：
   原来 `width:100%` + `auto` 会把余量按内容比例全摊给文字列，光加 max-width / min-width 没用。
   ★ `width:auto; min-width:0` 两行缺一不可（要盖掉 styles.css:128 的 `width:100%;min-width:100%`）。 */
table.grid.rep-tbl.ps-tbl { table-layout: fixed; width: auto; min-width: 0; }
table.grid.rep-tbl.ps-tbl th,
table.grid.rep-tbl.ps-tbl td { padding: 2px 3px; overflow: hidden; text-overflow: ellipsis; }
table.grid.rep-tbl.ps-tbl th.c-code,
table.grid.rep-tbl.ps-tbl td.c-code { font-weight: 600; color: #1f2733; white-space: nowrap; }
table.grid.rep-tbl.ps-tbl td.c-lang { text-align: center; }
table.grid.rep-tbl.ps-tbl td.c-lang .tag { font-size: 11px; padding: 0 4px; }

/* ★★ 首列（缩略图）冻在 left:0，货号列必须错开 30px（= colgroup 里图列宽）。
   两个都 left:0 的话，横向滚一下货号就压住缩略图（第216轮修的老毛病）。 */
table.grid.rep-tbl.ps-tbl thead th:nth-child(1),
table.grid.rep-tbl.ps-tbl tbody td:nth-child(1) {
  position: sticky; left: 0; z-index: 3; background: #fff;
}
table.grid.rep-tbl.ps-tbl thead th.c-code,
table.grid.rep-tbl.ps-tbl tbody td.c-code {
  position: sticky; left: 30px; z-index: 3; background: #fff;
  box-shadow: 1px 0 0 #e8eef7;
}
table.grid.rep-tbl.ps-tbl thead th:nth-child(1),
table.grid.rep-tbl.ps-tbl thead th.c-code { z-index: 5; background: #f2f6fb; }

/* ★★ 空行：`.scs-gap` 的高度只写在 `scs-tbl` 上（2031 / 2436），排单表用 ps-tbl → 空行一直是塌的。
   老板这轮专门提了「每个货号之间要空一行」，这里补上。 */
table.grid.rep-tbl.ps-tbl tr.scs-gap td,
table.grid.rep-tbl.la-tbl tr.scs-gap td {
  height: 16px; padding: 0; border-bottom: none; background: #fff;
}

/* 手机上再紧一档（列宽是固定的，字号/padding 小一点能少滚一点） */
@media (max-width: 720px) {
  table.grid.rep-tbl.ps-tbl th,
  table.grid.rep-tbl.ps-tbl td { padding: 1px 2px; font-size: 11.5px; }
}

table.grid.rep-tbl.la-tbl { table-layout: auto; }

/* ============================================================
   ★★★第274轮（老板点名）：「排版再紧凑一点；交货日期那一列去掉；备注整列往左移、加宽」
   · 交货日期列直接从表头和行里删掉了（导出那边不动 —— 导出排版是红线）
   · 让出来的宽度全给备注：屏幕 300 → 420 起，最多 720
   · 行高再压一档（padding 3px），一屏能多看几行
   ============================================================ */
table.grid.rep-tbl.la-tbl th,
table.grid.rep-tbl.la-tbl td { padding: 3px 6px; }
table.grid.rep-tbl.la-tbl { font-size: 12px; }
table.grid.rep-tbl.la-tbl th.memo-col { min-width: 420px; }
table.grid.rep-tbl.la-tbl td.memo-cell {
  /* ★第275轮：全局 `table.grid td.memo-cell` 那条 text-align:center 会把长备注居中，
     老板要的是「整列往左」—— 这里只给标签安排表改回左对齐，别的报表不动 */
  text-align: left;
  min-width: 420px; max-width: 720px; font-size: 12px; line-height: 1.45;
}
/* 货号格：平时就是普通文字，鼠标放上去才显出一个虚线框，点进去能改（只影响打标签） */
.la-code { padding: 2px 4px !important; }
.la-edit {
  width: 100%; min-width: 72px; padding: 2px 4px; font: inherit; color: var(--c-text);
  border: 1px dashed transparent; border-radius: 4px; background: transparent;
}
.la-edit:hover { border-color: #c9d6ea; background: #fbfcfe; }
.la-edit:focus { border-color: var(--c-primary); background: #fff; outline: none; }
.la-edit.on-edit {
  border-color: #e0b25a; background: #fffaf0; color: #7a4a00; font-weight: 600;
}
.la-edit::placeholder { color: #b0b7c3; font-weight: 400; }

/* ★第276轮：客户货号 / 唛头 是「从备注里认出来的」→ 输入框角上挂个淡黄「备」字，一眼看出是补救来的 */
.la-code { position: relative; }
.la-from-memo {
  position: absolute; right: 3px; top: 2px; z-index: 1;
  font-style: normal; font-size: 9px; line-height: 12px; padding: 0 2px;
  color: #7a6a2f; background: #fdf6e3; border: 1px solid #efe3c2; border-radius: 3px;
  pointer-events: none;
}
/* ★第275轮：老板要它在页签行**最右边**（红框那块）。`.grow` 只在 .toolbar/.bom-foot 里
   才是 flex:1，这里不撑开 → 直接给按钮 margin-left:auto。 */
#laPickEn { flex: 0 0 auto; margin-left: auto; }
table.grid.rep-tbl.la-tbl td.la-dim { font-size: 11.5px; color: var(--c-muted); white-space: nowrap; }
table.grid.rep-tbl.la-tbl td .tag { font-size: 11px; }

.la-pick { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.la-pick b { color: #185fa5; }

/* 第209轮：手机排单「备注与标签」小窗的背景小样式 */
.pm-f { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.pm-f label { width: 76px; flex: 0 0 auto; font-size: 12.5px; color: var(--c-text-2); }
.pm-f select, .pm-f input, .pm-f textarea { flex: 1; min-width: 0; }
.pm-meta { display: block; cursor: pointer; }
table.grid.rep-tbl.la-tbl td.la-pr { white-space: nowrap; }
table.grid.rep-tbl.la-tbl td.la-pr .tag { display: inline-block; }
/* 第209轮：排单明细最右边三格（标签类型/客户货号/客户商标）是这一轮新加的，
   表太宽平时要横滚才看得到 —— 表头给个淡蓝底，一眼知道往右还有东西 */
/* ★★★ 类名**不能叫 .pm-th**：styles.css:1915 有个全局 `.pm-th{display:inline-block;width:1.25em;height:1.25em}`
   是手机排单页的缩略图，撞上去这六个表头会被压成 1.25em 宽、字竖着挤在一起（第210轮实机踩过）。 */
table.grid.docgrid th.plan-meta { background: #eaf2fc; color: #185fa5; white-space: nowrap; }

/* 第210轮：订单明细最右边三列（唛头 / 内盒型号 / 特殊要求）。
   ★ 不能复用 .ccell —— test_round206 会数 .ccell 的个数（必须是 2）。 */
table.grid th.mcell, table.grid td.mcell { width: 108px; min-width: 108px; }

/* ============================================================
   ★第212轮：手机开单待确认
   · 汇总表表头那颗按钮（比普通 btn-sm 大一号，橙色，选中变实心）
   · 订单详情顶部的补字段提示条
   ============================================================ */
.btn.rpo-mob {
  height: auto; min-height: 34px; padding: 5px 14px; font-size: 13.5px;
  border: 1px solid #f0a83c; background: #fff8e8; color: #8a5a00; font-weight: 600;
  box-shadow: 0 1px 2px rgba(200, 120, 0, .08);
}
.btn.rpo-mob b { font-size: 15.5px; color: #c9761a; font-variant-numeric: tabular-nums; }
.btn.rpo-mob:hover { border-color: #e08a1e; background: #fff2d8; }
.btn.rpo-mob.on { background: #f0a83c; border-color: #e08a1e; color: #fff; }
.btn.rpo-mob.on b { color: #fff; }

.so-mob-hint {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 8px 0 6px; padding: 9px 12px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #f2d59a; color: #7a5300;
}
.so-mob-hint-t { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; min-width: 0; }
.so-mob-hint-t b { font-size: 13.5px; }
.so-mob-hint-t span { opacity: .88; }
.so-mob-hint-b { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.so-mob-hint-ok { font-size: 12px; color: var(--c-text-2); }
/* 已经点过「这单不用改」的：淡下去，但还能看到（旁边有「恢复提醒」） */
.so-mob-hint.off { background: #f7f9fc; border-color: #dde5ef; color: var(--c-text-2); }

/* 首页那条跟「超期未审核」同款式样，换个色调区分开 */
.home-stale.home-mob { background: #eef6ff; border-color: #b8d7f5; color: #17527f; }
.home-stale.home-mob:hover { border-color: #7fb6ea; box-shadow: 0 4px 14px rgba(20, 100, 170, .12); }

/* ============================================================
   ★★★第227轮（老板点名）：手机版《销售订单汇总表》只留两行（最多三行）
   · 顶部介绍那行整条不渲染（标题顶栏已经有）
   · 控件统一做小：字号 11~11.5px、高度 26px、下拉宽 ≤100px
   · 颜色 / 审核状态：竖屏（<620px）藏起来，横屏自动出来 —— 靠 body 类 + 媒体查询，
     不用 JS 判断方向（手机横屏 844 宽，单靠 `.ui-phone` 分不出方向）
   ============================================================ */
/* 手机全站：顶栏「提醒 / 改密码」不显示。
   ★ 只能改样式，绝不能删 DOM —— `$('pwdBtn').onclick` 是顶层无保护绑定，元素没了整份 app.js 后面全不执行 */
body.ui-phone #noticeBtn,
body.ui-phone #pwdBtn { display: none; }

.rep-card.rpo-phone .rep-title { display: none; }
.rep-card.rpo-phone .rep-bar { padding: 5px 4px; gap: 3px; }
.rep-card.rpo-phone .searchbox { flex: 0 1 auto; max-width: 100%; }
.rep-card.rpo-phone .searchbox > input { height: 26px; font-size: 11.5px; padding: 0 14px 0 5px; }
.rep-card.rpo-phone .searchbox .sb-clr { width: 16px; height: 16px; font-size: 13px; }
.rep-card.rpo-phone select.lf-sel {
  min-height: 26px; height: 26px; max-width: 92px;
  font-size: 11px; padding: 2px 2px;
}
.rep-card.rpo-phone .combo.rf-combo { width: 92px; }
/* ★★★第416轮（老板）：竖屏那个「颜色」框 —— 跟三个搜索框一样宽（88），别做太宽 */
.rep-card.rpo-phone .rpo-color .combo.rf-combo { width: 88px; }
.rep-card.rpo-phone .combo.rf-combo > .combo-in { min-height: 26px; font-size: 11.5px; padding: 3px 24px 3px 6px; }
.rep-card.rpo-phone .btn,
.rep-card.rpo-phone .btn-sm { height: 26px; line-height: 24px; font-size: 11.5px; padding: 0 4px; }
@media (max-width: 619px) {
  .rep-card.rpo-phone .rpo-m-shrink { display: none; }
}

/* ============================================================
   ★★★第229轮（老板点名）：手机版《销售订单汇总表》专用版面。
   · 下单时间只显示「月-日」（截断在前端做，排序仍按完整时间）
   · 表头 / 单元格的所有 title 提示已在 JS 里摘掉（不在 CSS）
   · 41/42/43 默认折叠：表格根挂 data-sz3="hide"，只隐藏这三列，数据仍在 DOM
   · 尺码列一律「4 个数字宽」= 26px，左右各 1px 内边距 → 紧挨着排
   · 整表从 2520px 压到 1440px（收起态），仍可横滚

   ★ 只在 .rep-card.rpo-phone 下生效，电脑版没有这个类 → 一个字节都不受影响。
   ★ 列宽全部 !important：这张表的宽度大量写成内联 style="width:XXpx"，
     不加 !important 压不住（也不能去改内联，源码字面量被老测试锁着）。
   ★ 前 5 列用 nth-child，尺码右边 23 列用 nth-last-child ——
     以后 SIZES 加减一个码，右边的列也不会整体错位。
   ============================================================ */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 { min-width: 1400px !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 th,
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td {
  font-size: 10.5px; line-height: 1.45; padding: 3px 2px;
}
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th { font-size: 10px; padding: 3px 2px; }

/* ① 尺码 35~43：4 个数字宽（10.5px 下 4 个数字 ≈ 24px，加左右各 1px = 26px），紧挨着排。
     th / td 必须同字号，否则两边字宽基数不同，「4 个数字宽」就对不上。 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 th.szcol,
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.szcol {
  width: 26px !important; min-width: 26px !important; max-width: 26px !important;
  padding: 0 1px !important;
  font-size: 10.5px !important; font-variant-numeric: tabular-nums; letter-spacing: 0;
}

/* ② 41/42/43 折叠（数据照旧在 DOM 里，只是不显示） */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37[data-sz3="hide"] th.rpo-szbig,
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37[data-sz3="hide"] td.rpo-szbig { display: none !important; }

/* ②-b ★★★第416轮（老板）：三态的第 3 档「全隐藏」—— 连 35~40 一起藏（所有尺码列都收）。
   数据照旧在 DOM 里，只是不显示；表头/合计行每一格都带 szcol，一起藏不会错位。 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37[data-sz3="none"] th.szcol,
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37[data-sz3="none"] td.szcol { display: none !important; }

/* ③ 前 5 列：下单时间 / 交货日 / 客户 / 货号 / 颜色
   ★第229轮补（老板当天补的两条）：手机版**不要「交货日」这一列**，客户列加宽到能放下 6 个汉字。
     交货日只能靠 nth-child 藏 —— 那个 <th> 的字面量被 test_round71 锁着，一个字符都不能改。
     ★ 同时合计行首格的 colspan 已经从 5 改成 `${PHONE ? 4 : 5}`（JS 里），否则整表错位。 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(2),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 tbody tr[data-order] td:nth-child(2) { display: none !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(1) { width: 46px !important; min-width: 46px !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(2) { width: 62px !important; min-width: 62px !important; }
/* 客户列 70px：10.5px 字号下 6 个汉字 = 63px，加左右各 2px 内边距 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(3) { width: 70px !important; min-width: 70px !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(4) { width: 72px !important; min-width: 72px !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-child(5) { width: 30px !important; min-width: 30px !important; }

/* ④ 尺码右边这些列（nth-last-child：从末尾数，尺码个数变了不会错）
   ★442：总双数挪到最末（position:sticky 的 right 只对最后一列有效），所以从末尾数的序号整体 +1：
     1=总双数、2=状态、3=编号 … 22=件数、23=每件双（最后这两个没动）。 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(23) { width: 34px !important; min-width: 34px !important; }  /* 每件双 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(22) { width: 30px !important; min-width: 30px !important; }  /* 件数 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(1) { width: 40px !important; min-width: 40px !important; }  /* 总双数（钉在右边） */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(21),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(20),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(19),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(18) { width: 36px !important; min-width: 36px !important; }  /* 已发/未发/已排/未排双 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(17) { width: 30px !important; min-width: 30px !important; }  /* 鞋型 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(16) { width: 84px !important; min-width: 84px !important; }  /* 备注 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(15) { width: 60px !important; min-width: 60px !important; }  /* 标签类型 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(14),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(13),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(12),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(11) { width: 34px !important; min-width: 34px !important; }  /* 已排件/未排件/已发件/单价 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(10),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(9),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(8) { width: 54px !important; min-width: 54px !important; }  /* 金额/已收金额/欠款 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(7),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(6),
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(5) { width: 46px !important; min-width: 46px !important; }  /* 收款状态/客户类型/结算方式 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(4) { width: 30px !important; min-width: 30px !important; }  /* 省份 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(3) { width: 96px !important; min-width: 96px !important; }  /* 编号 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 thead th:nth-last-child(2) { width: 30px !important; min-width: 30px !important; }  /* 状态 */

/* ⑤ 收掉几个会把整表撑到 2500px 的下限 —— 这一步才是「2520 → 1440」的关键 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 th.memo-col { min-width: 0 !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.memo-cell {
  min-width: 0 !important; max-width: 84px !important;
  font-size: 10px; line-height: 1.4; word-break: break-all;
}
/* ★ 备注最多露两行：`height` 在表格单元格里只是下限，长备注会把整行撑到 5~7 行（实测 77px），
   所以裁切必须挂在里面那层 span 上（max-height 对 display:table-cell 不生效）。 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.memo-cell > .memo-t {
  display: block; max-height: 2.8em; overflow: hidden;
}
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 th.tagcol { min-width: 0 !important; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.col-cust { max-width: none; }
/* 客户名 66px = 6 个汉字（10.5px × 6 = 63px），再多就把「省略号」留出来 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.col-cust .ell { max-width: 66px; }
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 td.col-code { font-size: 10px; }

/* ⑥ 双击一行（手机轻点两次）时别让浏览器顺手做双击缩放 */
.rep-card.rpo-phone table.grid.rep-tbl.rpo-37 tbody tr { touch-action: manipulation; }

/* ============================================================
   ★★★第230轮（老板点名）：手机版《销售订单汇总表》**横屏时筛选条只能一排**
   · 文案已经收成「展开 / 隐藏」两个字；再把搜索框/下拉/按钮各收一点，844 横屏正好一排。
   · 用 nowrap + overflow-x 兜底：窄横屏也不会把按钮挤掉、更不会藏起来，只是能横向滑一点。
   ★ 两条都要写：
     物理横屏（宽 ≥620）走媒体查询；
     点顶栏「⟳ 横屏」是 html.land-rot 把 layout 转 90°（832-844 行），
     那时 **CSS 视口还是 390 宽**，媒体查询不生效，必须单独认 land-rot。
   ============================================================ */
@media (min-width: 620px) {
  .rep-card.rpo-phone .rep-bar {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
  }
  .rep-card.rpo-phone .rep-bar::-webkit-scrollbar { display: none; }
}
html.land-rot .rep-card.rpo-phone .rep-bar {
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
html.land-rot .rep-card.rpo-phone .rep-bar::-webkit-scrollbar { display: none; }

/* ★第234轮（老板点名）：货号清单里「已删除（归档）」的行灰掉 ——
   让老板一眼看出它跟正常货号不一样（行尾只给「恢复」）。 */
table.grid.style-list tr.row-archived { opacity: .55; }
table.grid.style-list tr.row-archived td { background: #fbfbfc; }
table.grid.style-list tr.row-archived td b { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ============================================================
   ★第235轮（老板点名）：翻页条上的「跳至第 N 页」
   · 材料档案 1376 条 = 28 页，只有上/下页太磨人 → 加输入框 + 首页/末页
   · 输入框写死 px（不写 em/ch）：旁边就是 12.5px 的按钮字，字号一变宽度就飘
   · 手机版把「首页/末页」藏掉（屏幕就那么点，有跳页框就够了），输入框收窄
   ============================================================ */
.pg-jump { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--c-text-2); }
.pg-jump input {
  width: 56px; height: 26px; padding: 0 6px; text-align: center;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--c-text);
}
.pg-jump input:focus { outline: none; border-color: #7aa7e8; box-shadow: 0 0 0 2px rgba(122,167,232,.18); }
/* 数字框右边那两个上下小箭头在这么窄的框里太挤，直接不给 */
.pg-jump input::-webkit-outer-spin-button,
.pg-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-jump input[type=number] { -moz-appearance: textfield; appearance: textfield; }
/* 报表底下的翻页条：`.pager` 是 inline-flex，输入框跟着那条基线走 */
.pager .pg-jump { margin-left: 4px; }
.pager .pg-jump input { width: 52px; height: 24px; }

@media (max-width: 619px) {
  .pg-bar #firstBtn, .pg-bar #lastBtn { display: none; }
  .pg-jump input { width: 46px; }
  .pg-bar { flex-wrap: wrap; row-gap: 6px; }
}

/* ============================================================
   ★★第236轮（老板点名）：材料库存表 —— **手机版单独一页**（.msm）
   · 表格上方只有一行：搜索（占位「材料名称」）+ 货号下拉（占位「货号」）
     + 「展开」+ 统计；仓库/重置/导入导出打印 一个都不出现
   · 尺码列 26px = 4 个数字宽（写 px 不写 ch：th/td 字号差 0.5px，ch 会算歪）
   · 41~43 折叠只切 table[data-sz3="hide"]，**数据一直在 DOM 里**
   · 选择器都带 .content .msm：styles.css:2137 那条
     `.content table.grid:not(.scs-tbl):not(.pm-tbl) th,td` 是 (0,4,3)，少一个类压不住
   ============================================================ */
.msm-bar {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 5px;
  padding: 6px 8px 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.msm-bar::-webkit-scrollbar { display: none; }
.msm-bar .searchbox input {
  height: 26px; min-height: 24px; font-size: 11px; padding: 0 20px 0 6px;
}
.msm-bar .searchbox .sb-clr { font-size: 13px; }
.msm .msm-style { flex: 0 0 96px; width: 96px; }
.msm .msm-style .combo-in {
  min-height: 24px; height: 26px; padding: 0 40px 0 6px; font-size: 11px;
  border-radius: 6px; background: #fff;
}
.msm .msm-style .combo-tri { right: 24px; width: 18px; height: 22px; font-size: 10px; }
.msm .msm-style .combo-clr { right: 2px; width: 22px; height: 22px; font-size: 14px; }
#msmSzTog { height: 26px; padding: 0 7px; font-size: 11px; line-height: 24px; flex: 0 0 auto; }
#msmSzTog.on { border-color: #7aa7e8; color: var(--c-primary-dark); background: #eef4ff; }
/* 统计：完整文案（材料 1373 种 · 汇总为负 93 种 · 可用量不足 93 种）
   ★ 它单独占「控件那一行」下面的细条：整句 11px 实测 243px，
     硬塞进控件行得把两个输入框挤到 50px（点都点不准），所以宁可多这 16px 高的字条。 */
.msm-sum {
  padding: 0 8px 6px; font-size: 11px; line-height: 1.35;
  color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--c-border);
  font-variant-numeric: tabular-nums;
}
.msm-sum b { color: var(--c-text); font-weight: 600; }
.msm-sum .msm-neg { color: var(--c-danger); }
.msm-sum .msm-short { color: var(--c-warn); }

.content .msm table.grid.msm-tbl { font-size: 10.5px; }
.content .msm table.grid.msm-tbl th,
.content .msm table.grid.msm-tbl td {
  font-size: 10.5px; line-height: 1.45; padding: 3px 2px; white-space: nowrap;
}
.content .msm table.grid.msm-tbl thead th { font-size: 10px; padding: 4px 2px; }

/* 尺码：26px（4 个数字宽）+ 左右各 1px，紧挨着排 */
.content .msm table.grid.msm-tbl th.szcol,
.content .msm table.grid.msm-tbl td.szcol {
  width: 26px; min-width: 26px; max-width: 26px;
  padding: 0 1px; text-align: center;
  font-size: 10.5px; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.content .msm table.grid.msm-tbl thead th.szcol { font-size: 10px; }
/* 41~43 折叠（只藏显示，数据不动） */
.content .msm table.grid.msm-tbl[data-sz3="hide"] th.msm-big,
.content .msm table.grid.msm-tbl[data-sz3="hide"] td.msm-big { display: none !important; }

/* 各列下限（auto 布局下 min-width 才是真宽，width 只是建议） */
.content .msm table.grid.msm-tbl .msm-name { min-width: 150px; }
.content .msm table.grid.msm-tbl .msm-unit { min-width: 30px; padding-left: 0; padding-right: 0; text-align: center; }
.content .msm table.grid.msm-tbl .msm-sum { min-width: 52px; }
.content .msm table.grid.msm-tbl .msm-res { min-width: 44px; }
.content .msm table.grid.msm-tbl .msm-avail { min-width: 44px; }
.content .msm table.grid.msm-tbl .msm-price { min-width: 44px; }
.content .msm table.grid.msm-tbl .msm-amt { min-width: 60px; }
.content .msm table.grid.msm-tbl .msm-code { min-width: 66px; }
.content .msm table.grid.msm-tbl .msm-last { min-width: 84px; font-size: 10px; color: var(--c-text-2); }
.content .msm table.grid.msm-tbl .msm-ops { min-width: 150px; }
/* 行尾四个按钮：.btn-link 默认高 24px，会把每一行撑到 31px；
   手机上压到 18px —— 一屏能多看 4~5 行（按钮照样点得到） */
.content .msm table.grid.msm-tbl .msm-ops .btn-link { height: 18px; font-size: 11px; padding: 0 3px; }
.content .msm table.grid.msm-tbl .msm-dot { color: var(--c-muted); }
.content .msm table.grid.msm-tbl tbody tr { cursor: pointer; touch-action: manipulation; }

/* 底栏：共 N 种 · 仓库 + 翻页 */
.msm-foot {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border-top: 1px solid var(--c-border);
  font-size: 11.5px; color: var(--c-text-2);
}
.msm-foot b { color: var(--c-text); }
.msm-pg {
  height: 26px; padding: 0 8px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff; color: var(--c-text);
}
.msm-pg[disabled] { opacity: .45; cursor: not-allowed; }
.msm-pgn { font-size: 11.5px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }

/* 竖屏特别窄（≤360）时搜索框再收一点，保证统计不被挤出屏幕 */
@media (max-width: 360px) {
  .msm-bar .searchbox input { width: 82px; }
  .msm .msm-style { flex: 0 0 82px; width: 82px; }
  .msm-sum { font-size: 10px; }
}

/* ============================================================
   ★★第239轮（老板点名）：生产计划汇总表-明细 —— **手机版单独一页**（.pdm）
   · 表格上方只有一行：搜索 / 备注 / 过滤 / 展开（导出、日期、快捷键、重置 都不出现）
   · 尺码三态：data-sz="none" 全藏 → data-sz="mid" 只藏 41~43 → 没属性 = 全显示
   · 尺码列 26px = 4 个数字宽（写 px 不写 ch：th/td 字号差 0.5px，ch 算出来就飘）
   · 选择器多带一层 .table-wrap：styles.css:2137 那条 ≤720px 的紧凑规则是 (0,4,2)，
     少一个类压不住（第236轮踩过），写在文件末尾也一起保证赢
   ============================================================ */
.pdm-bar {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 5px;
  /* 上下合计 9px：26px 的控件 + 9 = 35px 一条，老板要的「一行」就是这个高度 */
  padding: 5px 8px 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.pdm-bar::-webkit-scrollbar { display: none; }
.pdm-bar .searchbox input {
  height: 26px; min-height: 24px; font-size: 11px; padding: 0 20px 0 6px;
}
.pdm-bar .searchbox .sb-clr { font-size: 13px; }
#pdmGo, #pdmSz {
  height: 26px; padding: 0 8px; font-size: 11.5px; line-height: 24px; flex: 0 0 auto;
}
#pdmSz.on { border-color: #7aa7e8; color: var(--c-primary-dark); background: #eef4ff; }

/* 表格本体：10.5px 才压得住列宽；一行一个字都不许换行 */
.content .pdm .table-wrap table.grid.pdm-tbl { font-size: 10.5px; width: auto; min-width: 100%; }
.content .pdm .table-wrap table.grid.pdm-tbl th,
.content .pdm .table-wrap table.grid.pdm-tbl td {
  font-size: 10.5px; line-height: 1.45; padding: 3px 2px; white-space: nowrap;
}
.content .pdm .table-wrap table.grid.pdm-tbl thead th { font-size: 10px; padding: 4px 2px; }

/* 尺码：26px（4 个数字宽）+ 左右各 1px，紧挨着排 */
.content .pdm .table-wrap table.grid.pdm-tbl th.szcol,
.content .pdm .table-wrap table.grid.pdm-tbl td.szcol {
  width: 26px; min-width: 26px; max-width: 26px;
  padding: 0 1px; text-align: center;
  font-size: 10.5px; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.content .pdm .table-wrap table.grid.pdm-tbl thead th.szcol { font-size: 10px; }

/* 三态：none = 35~43 全藏；mid = 只藏 41~43（数据一直在 DOM 里，只是不显示） */
.content .pdm .table-wrap table.grid.pdm-tbl[data-sz="none"] th.szcol,
.content .pdm .table-wrap table.grid.pdm-tbl[data-sz="none"] td.szcol { display: none !important; }
.content .pdm .table-wrap table.grid.pdm-tbl[data-sz="mid"] th.pdm-big,
.content .pdm .table-wrap table.grid.pdm-tbl[data-sz="mid"] td.pdm-big { display: none !important; }

/* 各列下限（auto 布局下 min-width 才是真宽，width 只是建议） */
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-dt { min-width: 42px; font-variant-numeric: tabular-nums; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-time { min-width: 62px; font-size: 10px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-cust { min-width: 78px; max-width: 78px; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-cust .ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-code { min-width: 88px; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-code .thumb-xs { margin-right: 2px; vertical-align: -3px; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-color { min-width: 38px; }
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-total { min-width: 46px; }
/* 备注：最多两行，多的裁掉（裁切必须挂里面那层 span，td 的 max-height 不生效） */
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-memo {
  min-width: 88px; max-width: 88px; font-size: 10px; color: var(--c-text-2); white-space: normal;
}
/* ★ 行高固定 1.4、限高正好 2 行（2.8em）：不然第二行会被切掉半截，看着像乱码 */
.content .pdm .table-wrap table.grid.pdm-tbl .pdm-memo .memo-t {
  display: block; line-height: 1.4; max-height: 2.8em; overflow: hidden; word-break: break-all;
}
.content .pdm .table-wrap table.grid.pdm-tbl tbody tr { cursor: default; }

/* 页脚：共 N 行 · 总双数 X + 翻页 */
.pdm-foot {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border-top: 1px solid var(--c-border);
  font-size: 11.5px; color: var(--c-text-2);
}
.pdm-foot b { color: var(--c-text); }
.pdm-pg {
  height: 26px; padding: 0 8px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff; color: var(--c-text);
}
.pdm-pg[disabled] { opacity: .45; cursor: not-allowed; }
.pdm-pgn { font-size: 11.5px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }

@media (max-width: 360px) {
  .pdm-bar .searchbox input { width: 82px; }
  #pdmGo, #pdmSz { padding: 0 6px; }
}

/* ============================================================
   ★★第241轮（老板点名）：手机版「生产领料」两页 → 密表
   · 选单浮层 .pmx：一行工具条 + 密表 + 底部「加进来」
     尺码 35~43 三态折叠（data-sz="none"/"mid"/无），26px 紧挨着
   · 编辑页明细 .pmk：序号 / 材料名称 / 规格 / 数量
   · 浮层挂在 body 上（不在 #content 里），所以只跟 table.grid 的通用规则打；
     编辑页那张在 #content 里，选择器要多带 .m2 .m2-body，才压得住 styles.css:2137
   ============================================================ */
.pmx-mask {
  position: fixed; inset: 0; z-index: 70; background: #fff;
  display: flex; flex-direction: column;
}
.pmx { display: flex; flex-direction: column; width: 100%; height: 100%; }
.pmx-h {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--c-border); background: #f7f9fc; font-size: 13px;
}
/* ★第242轮：.pmx-mask 挂在 body 上、不在 .m2 里，所以 .m2 .m2-btn 那套基础样式根本没生效
   （以前「关闭 / 加进来」是浏览器默认灰按钮）—— 这里补一份，别处再按需覆盖尺寸 */
.pmx .m2-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-border); border-radius: 7px; background: #fff;
  color: var(--c-text); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pmx .m2-btn.pri { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pmx-h .m2-btn, .pmx-f .m2-btn { height: 28px; padding: 0 10px; font-size: 12px; }

.pmx-bar {
  display: flex; align-items: center; gap: 3px; padding: 4px 6px;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  border-bottom: 1px solid var(--c-border); scrollbar-width: none;
}
.pmx-bar::-webkit-scrollbar { display: none; }
.pmx-bar .searchbox input {
  height: 22px; min-height: 22px; font-size: 11px; padding: 0 18px 0 5px;
}
.pmx-bar .m2-btn {
  height: 22px; line-height: 20px; padding: 0 5px; font-size: 11px; flex: 0 0 auto;
}
.pmx-bar .m2-btn.on { border-color: #7aa7e8; color: var(--c-primary-dark); background: #eef4ff; }
#pmxSz.on { border-color: #7aa7e8; color: var(--c-primary-dark); background: #eef4ff; }

/* 点「日期」展开的那一条（默认藏着，藏在 hidden 属性上） */
.pmx-dates {
  display: flex; align-items: center; gap: 4px; padding: 0 8px 5px;
  border-bottom: 1px solid var(--c-border); background: #fbfcfe;
}
.pmx-dates[hidden] { display: none !important; }
.pmx-date {
  flex: 0 0 92px; width: 92px; height: 22px; padding: 0 2px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  font-size: 10.5px; color: var(--c-text); font-variant-numeric: tabular-nums;
}
/* 收掉日历图标占掉的那 12px，92px 才装得下 YYYY-MM-DD */
.pmx-date::-webkit-calendar-picker-indicator { width: 12px; margin: 0; padding: 0; }
.pmx-tilde { flex: 0 0 auto; font-size: 11px; color: var(--c-text-2); }
.pmx-b { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.pmx-f {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-top: 1px solid var(--c-border); font-size: 12px; background: #f7f9fc;
}

/* 选单密表 */
table.grid.pmx-tbl { width: auto; min-width: 100%; font-size: 10.5px; }
table.grid.pmx-tbl th, table.grid.pmx-tbl td {
  padding: 3px 2px; font-size: 10.5px; line-height: 1.45; white-space: nowrap;
}
table.grid.pmx-tbl thead th {
  position: sticky; top: 0; z-index: 1; background: #f4f6fa;
  font-size: 10px; padding: 4px 2px;
}
/* 尺码：26px（4 个数字宽）+ 左右各 1px，紧挨着排 */
table.grid.pmx-tbl th.szcol, table.grid.pmx-tbl td.szcol {
  width: 26px; min-width: 26px; max-width: 26px;
  padding: 0 1px; text-align: center;
  font-size: 10.5px; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
table.grid.pmx-tbl thead th.szcol { font-size: 10px; }
/* 三态：none = 35~43 全藏；mid = 只藏 41~43（数据一直在 DOM 里） */
table.grid.pmx-tbl[data-sz="none"] th.szcol,
table.grid.pmx-tbl[data-sz="none"] td.szcol { display: none !important; }
table.grid.pmx-tbl[data-sz="mid"] th.pmx-big,
table.grid.pmx-tbl[data-sz="mid"] td.pmx-big { display: none !important; }

table.grid.pmx-tbl .pmx-ck { width: 26px; min-width: 26px; text-align: center; padding: 0; }
table.grid.pmx-tbl .pmx-dt { min-width: 42px; font-variant-numeric: tabular-nums; }
table.grid.pmx-tbl .pmx-cust { min-width: 72px; max-width: 72px; }
table.grid.pmx-tbl .pmx-cust .ell {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.grid.pmx-tbl .pmx-code { min-width: 84px; }
table.grid.pmx-tbl .pmx-thumb { width: 18px; height: 18px; margin-right: 2px; vertical-align: -4px; border-radius: 2px; }
table.grid.pmx-tbl .pmx-color { min-width: 34px; }
table.grid.pmx-tbl .pmx-pairs { min-width: 50px; }
table.grid.pmx-tbl .pmx-packs { min-width: 44px; }
table.grid.pmx-tbl .pmx-no { width: 24px; min-width: 24px; text-align: center; color: var(--c-muted); }
/* 备注：160px、允许换行（老板说自己拖过去看），别用 nowrap 把长备注挤成一条 */
table.grid.pmx-tbl th.pmx-rem, table.grid.pmx-tbl td.pmx-rem {
  min-width: 160px; max-width: 160px;
  white-space: normal; word-break: break-all;
  font-size: 10px; line-height: 1.35; color: var(--c-text-2);
}
table.grid.pmx-tbl tbody tr.on { background: #eef4ff; }

/* 编辑页那张表在 #content 里：样式仍用 .pmx-tbl 那套，但压缩规则要再压一层 */
.content .m2 .m2-body table.grid.pmx-tbl { width: 100%; }
.content .m2 .m2-body table.grid.pmx-tbl th,
.content .m2 .m2-body table.grid.pmx-tbl td {
  padding: 3px 2px; font-size: 10.5px; line-height: 1.45;
}
.content .m2 .m2-body table.grid.pmx-tbl thead th { font-size: 10px; padding: 4px 2px; }
.content .m2 .m2-body table.grid.pmx-tbl th.szcol,
.content .m2 .m2-body table.grid.pmx-tbl td.szcol {
  width: 26px; min-width: 26px; max-width: 26px; padding: 0 1px; text-align: center;
}

/* ★第242轮：领料编辑页改成跟选单表同一个 .pmx-tbl，原来那套 .pmk 明细表已废，删掉 */


/* ============================================================
   ★★第243轮（老板报的 bug）：手机上「保存」按钮看不见
   · 现象：新建生产领料选了 20 行，屏幕底下没有保存栏
   · 根子：`.m2-bar` 原来是 `position: sticky; bottom: 0`（107 轮），
     正文比屏幕高一倍多时 sticky 不钉底，它就躺在文档最末尾 —— 以前单据只有几行、
     整页刚好一屏，栏停在页尾正好等于屏幕底，所以一直没暴露。
   · 改法：这四张手机单据（进货/发货/领料/成品入库，根节点带 `m2-doc`）的底栏改成真·fixed；
     手机开单页也是 `.m2` 但没有 `m2-doc`，一点不受影响。
   · 用 `body.ui-phone` 而不是宽度媒体查询：横屏 844 宽也算手机（第 66 轮定的口径）。
   ============================================================ */
body.ui-phone .m2.m2-doc .m2-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 520px; margin: 0 auto; margin-top: 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
/* 底栏浮起来了，正文尾巴再让出一栏高（原来那 52vh 是留给键盘的，别动它） */
body.ui-phone .m2.m2-doc .m2-body { padding-bottom: calc(52vh + 46px); }
/* 宽的密表自己横滑：别让整页横向滚动（一滑「制单时间 / 领料仓库」就跟着跑出屏幕） */
body.ui-phone .m2.m2-doc .m2d-tscroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
body.ui-phone .m2.m2-doc .m2d-tscroll::-webkit-scrollbar { display: none; }

/* ============================================================
   ★第244轮（老板点名）：电脑版领料单 —— 从生产计划单选单来的，数量锁死
   · 用 disabled（不是 readonly）：readonly 还能被 TAB/↑↓ 聚焦住，看着能改其实改不了
   · disabled 的字默认发灰到看不清，这里给个灰底 + 正常字色
   ============================================================ */
.bom-in.num.qty-ro {
  background: #f1f3f7; color: #667085; cursor: not-allowed; border-color: #e4e9f1;
}
.bom-in.num.qty-ro:hover { border-color: #e4e9f1; }

/* ★第246轮：内盒型号 / 特殊要求 选择窗里每条右边那个编号（IB012） */
/* ★★★第273轮（老板点名）：内盒型号下拉每条后面跟上它自己的备注（双马 / 贝多娜 …），
   好一眼区分「同规格不同客户」的盒子。
   · 面板（.rmp-item）里：紧跟型号后面，浅黄小标签，长了换行不裁
   · 一体下拉（.lcb-item）里：挂在编号那一串后面，最多 78px、超出省略（hover 看全文） */
.rmp-item .rmp-rem {
  margin-left: 6px; font-size: 11.5px; color: #7a6a2f; background: #fdf6e3;
  border: 1px solid #efe3c2; border-radius: 4px; padding: 0 5px;
  display: inline-block; vertical-align: 1px; max-width: 100%;
}
.rmp-item .rmp-code {
  float: right; margin-left: 8px; font-size: 11px; color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ★★第247轮（老板点名）：内盒型号 / 特殊要求 —— 「输入框 + 分类页签 + 模糊搜索」一体下拉（.lcb）
   · 老板：「下拉列表为什么是单独做的？我要和输入框一起的、带模糊搜索的下拉列表框」
     → 不再有单独那颗 ▾、也不再弹一个另一样子的大面板；点输入框就在它正下方展开
   · 弹层 position:fixed + z-index:400：.mask 是 100、.mf-body 是 overflow:auto，
     用 absolute 会被裁掉（第 209 轮踩过），fixed 才能贴着输入框弹在弹窗上面
   · 高度写在 max-height 上，列表在 .lcb-list 里自己滚
   ============================================================ */
.lcb { position: relative; display: flex; align-items: center; min-width: 0; width: 100%; }
.lcb > .lcb-in {
  width: 100%; height: 28px; min-height: 0; padding: 0 42px 0 9px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  font-size: 13px; color: var(--c-text); font-family: inherit;
}
.lcb > .lcb-in:focus { outline: none; border-color: #7aa7e8; box-shadow: 0 0 0 2px rgba(122,167,232,.18); }
.lcb > .lcb-in:disabled { background: #f6f7f9; color: #8b94a3; cursor: not-allowed; }
.lcb-tri {
  position: absolute; right: 23px; top: 50%; transform: translateY(-50%);
  width: 15px; text-align: center; font-size: 10px; color: var(--c-muted);
  cursor: pointer; user-select: none; pointer-events: auto;
}
.lcb-clr {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; line-height: 16px; padding: 0; border: none;
  background: transparent; color: var(--c-muted); font-size: 14px;
  cursor: pointer; border-radius: 50%;
}
.lcb-clr:hover { background: #eef1f6; color: var(--c-text); }
.lcb-clr[hidden] { display: none !important; }

.lcb-pop {
  position: fixed; z-index: 400; display: flex; flex-direction: column;
  max-height: min(64vh, 520px); background: #fff; border: 1px solid var(--c-border);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(16,24,40,.18);
  overflow: hidden;
}
.lcb-pop[hidden] { display: none !important; }
/* 页签：横滑，不换行（41 条一般就 6~8 个页签） */
.lcb-tabs {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  padding: 5px 6px; border-bottom: 1px solid var(--c-border); background: #f9fbfe;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.lcb-tabs::-webkit-scrollbar { display: none; }
.lcb-tab {
  flex: 0 0 auto; height: 21px; padding: 0 7px; border-radius: 11px; cursor: pointer;
  border: 1px solid #c9d6ea; background: #f2f6fd; color: #1b4f9c;
  font-size: 11px; line-height: 19px; font-family: inherit; white-space: nowrap;
}
.lcb-tab i { margin-left: 3px; font-style: normal; opacity: .75; font-variant-numeric: tabular-nums; }
.lcb-tab.on { background: #1b4f9c; border-color: #1b4f9c; color: #fff; }
.lcb-list { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.lcb-item {
  display: flex; align-items: baseline; gap: 8px; justify-content: flex-start;
  padding: 5px 9px; cursor: pointer; border-bottom: 1px solid #f3f5f9;
}
.lcb-item:last-child { border-bottom: none; }
.lcb-item b { font-size: 12.5px; font-weight: 500; color: var(--c-text); word-break: break-all; }
.lcb-item span { flex: 0 0 auto; margin-left: auto; font-size: 10.5px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
/* ★第273轮：内盒型号下拉里编号后面那个备注（双马 / 贝多娜）—— 淡黄小标签，太长省略 */
.lcb-item .lcb-rem {
  flex: 0 0 auto; margin-left: 0; font-style: normal; font-size: 10.5px; color: #7a6a2f; background: #fdf6e3;
  border: 1px solid #efe3c2; border-radius: 4px; padding: 0 4px;
  display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: 1px;
}
.lcb-item.on { background: #eef4ff; }
.lcb-none { padding: 10px 9px; font-size: 12px; color: var(--c-muted); }

@media (max-width: 619px) {
  .lcb > .lcb-in { height: 32px; font-size: 13px; }
  .lcb-pop { max-height: 52vh; }
}

/* 销售订单明细里那两格只有 108px 宽（`td.mcell`）—— 右侧给三角和 × 让出 32px 就够，
   不然 42px 一让，剩下的地方只够两三个字 */
table.grid td.mcell .lcb > .lcb-in { padding: 0 32px 0 6px; font-size: 12.5px; }
table.grid td.mcell .lcb-tri { right: 16px; }
table.grid td.mcell .lcb-clr { right: 1px; width: 16px; }

/* ★★★第248轮（老板）：「弹框要大一点、最重要是宽一点，看到的信息多一点」
   · 宽不写死在这（由 lcbPlace 按 440/560 + 视口算），这里只把高度上限放宽到 520
   · ⚠ `position: fixed; z-index: 400` 那一行被 test_round247 逐字匹配，别动它 */
.lcb-pop { max-height: min(64vh, 520px); }

/* 多选（特殊要求）：已选的那几条打勾 + 淡绿底。用伪元素，别把 ✓ 塞进文字里 */
.lcb-item.pk { background: #f2f9f2; }
.lcb-item.pk::before { content: '✓'; color: #1a7f45; font-weight: 700; margin-right: 2px; }
.lcb-item.pk.on { background: #e6f4ea; }

/* 排单明细表那两格（不是 td.mcell，也套一份窄内边距） */
table.grid td .lcb > .lcb-in { padding: 0 32px 0 6px; font-size: 12.5px; }
table.grid td .lcb-tri { right: 16px; }
table.grid td .lcb-clr { right: 1px; width: 16px; }

/* 排单小窗里（.pm-f 是 flex，外面套了一层 .lcb，得让它吃满） */
.pm-f .lcb { flex: 1 1 auto; min-width: 0; }

@media (max-width: 619px) {
  .lcb-pop { max-height: min(70vh, 520px); }
}

/* ============================================================
   ★★★第258轮（老板点名）：宽表的横向滚动条**悬浮钉在屏幕最下方**

   · 单据明细 / 列表页的 .table-wrap 只有 overflow-x:auto、没有高度上限，
     横条长在整张表的最底边，页面长的时候要滚到最底才拖得到。
   · 做法：body 下挂一条单例浮条（#hscrollBar），JS 把 left/width 对齐到当前那张宽表，
     scrollLeft 双向同步；只在那张表的原生横条滚出屏幕时才显示。
   · 必须 fixed —— 第243轮已证明 sticky bottom 在长页面不钉底（见下面 .m2-bar 那条注释）。
   · 不接管 .mo-wrap / .rep-scroll（它们自己封了高度，横条本来就贴框底）。
   ============================================================ */
#hscrollBar {
  position: fixed;
  left: 0;
  right: auto;
  bottom: 0;
  z-index: 45;
  height: 16px;
  overflow-x: scroll;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  background: #f4f7fc;
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 6px rgba(23, 43, 77, .06);
  display: none;
}
#hscrollBar.on { display: block; }
#hscrollBar > i { display: block; height: 1px; width: 0; }
body.ui-phone #hscrollBar { display: none !important; }

/* ============================================================
   ★★★第258轮（老板点名）：材料下单顶部 4 行压成 2 行

   原来：① 标题 + 长解释  ② 页签/搜索条  ③ 🔒锁提示（或快速加料）  ④ 黄虚线提示条
   现在：① 标题 + 短解释 + 🔒锁提示 + 两条提示 + ☑管理清单（同一行）
         ② 页签/搜索条
         勾了「管理清单」后，快速加料那排仍单独占一行（编辑态才出现）。
   ============================================================ */
.rep-title.mo-head { gap: 4px 12px; }
.mo-head .mo-head-t { white-space: nowrap; }
.mo-head .mo-head-n { font-size: 11.5px; white-space: nowrap; }
.mo-head #moHint { order: 2; display: flex; align-items: center; min-width: 0; }
.mo-head #moHint .mo-hint {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 2px 12px;
  margin: 0; padding: 1px 8px; border: 0; border-radius: 5px;
  background: #fffaf0; font-size: 12px; font-weight: 400; white-space: nowrap;
}
.mo-head #moAddBar { order: 3; min-width: 0; }
.mo-head #moAddBar.mo-inl .mo-addbar {
  padding: 0; border: 0; background: none; flex-wrap: nowrap; gap: 6px;
}
.mo-head .mo-addbar-lock { padding: 0; font-weight: 400; white-space: nowrap; }
.mo-head .mo-grow { order: 7; flex: 1 1 20px; }
/* 勾选框就在这一行，「（勾上「管理清单」才能加）」这句纯属重复 —— 页面不显示，
   但源码里那串 mo-hint-lock 保留（test_round201 守着它） */
.mo-head .mo-hint-lock { display: none; }
/* 窄屏（1366 那种）把短解释让出来，保证整行不折 */
@media (max-width: 1400px) { .mo-head .mo-head-n { display: none; } }
.mo-head .mo-mgbox { order: 9; margin-left: auto; font-weight: 400; white-space: nowrap; }
/* 勾了管理清单 → 快速加料整条独占下一行（flex-basis:100% 在 wrap 容器里必然换行） */
.mo-head #moAddBar:not(.mo-inl) { order: 8; flex: 1 1 100%; }
.mo-head #moAddBar:not(.mo-inl) .mo-addbar { border: 0; border-top: 1px dashed var(--c-border); }

/* ============================================================
   ★★★第285轮（老板点名）：包装指导表
   · 每行前面一个复选框；三列（客户货号 / 内盒型号 / 备注）能直接改；
   · 尺码列没数的自动折叠（.pg-sz-off 用 !important —— td 是 table-cell，[hidden] 会被盖掉）；
   · 打完之后表格下方就地显示「内盒用量 + 大字特殊要求」。
   ============================================================ */
.pg-tabs { margin: 8px 0 2px; }
.pg-bar2 { gap: 8px; }
.pg-selinfo { font-size: 12.5px; color: var(--c-text-2); }
.pg-selinfo b { color: var(--c-text); }
.pg-tip { margin-left: 4px; }

/* 表格：复选框列 + 可编辑格 */
.pg-tbl td.pickcol, .pg-tbl th.pickcol { width: 34px; min-width: 34px; text-align: center; padding: 2px; }
.pg-tbl input[type=checkbox] { width: 15px; height: 15px; }
.pg-tbl tr.pg-on td { background: #f2f8ff; }
.pg-tbl td.pg-edit { padding: 1px 2px; }
.pg-tbl td.pg-edit .pg-in {
  width: 100%; min-width: 0; box-sizing: border-box; padding: 2px 4px; font-size: 12px;
  border: 1px solid transparent; border-radius: 3px; background: transparent; color: inherit;
}
.pg-tbl td.pg-edit .pg-in:hover { border-color: var(--c-border); background: #fff; }
.pg-tbl td.pg-edit .pg-in:focus { border-color: #2563eb; background: #fff; outline: none; }
.pg-tbl td.pg-edit .pg-memo { min-width: 200px; }
/* 手改过的格：淡黄底 + 左边一道琥珀线，一眼看出「这格是我改的，只影响这次打印」 */
.pg-tbl td.pg-edit.on-edit { box-shadow: inset 2px 0 0 #f0b429; }
.pg-tbl td.pg-edit.on-edit .pg-in { background: #fff8e6; border-color: #f0d08a; }

/* 尺码列折叠（屏幕口径：勾了就按勾选行算，没勾按当前结果算） */
.pg-tbl .pg-sz-off { display: none !important; }

/* 打印完就地显示的「这一批」摘要 */
.pg-sum { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 8px; background: #fbfcfe; }
.pg-sum-h { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.pg-sum-h .grow { flex: 1; }
.pg-sum-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 12px; }
@media (max-width: 900px) { .pg-sum-grid { grid-template-columns: 1fr; } }
.pg-sum-t { font-size: 12.5px; font-weight: 700; color: var(--c-text-2); margin-bottom: 4px; }
.pg-mini { border-collapse: collapse; width: 100%; }
.pg-mini th, .pg-mini td { border: 1px solid var(--c-border); padding: 3px 6px; font-size: 12.5px; }
.pg-mini th { background: #eef2f7; }
.pg-mini td.num, .pg-mini th.num { text-align: right; }
.pg-mini tr.pg-warn td { color: #b00000; }
.pg-bigreq { font-size: 19px; font-weight: 800; color: #b00000; line-height: 1.5; letter-spacing: 1px; }
.pg-raw { margin-top: 6px; font-size: 12.5px; color: var(--c-text-2); }
.pg-none { font-size: 12.5px; color: var(--c-text-2); }

/* ★第286轮（老板）：表头 + 表格内容全部居中（跟打印页一个口径） */
.pg-tbl th, .pg-tbl td { text-align: center; }
.pg-tbl td.pg-edit .pg-in { text-align: center; }

/* ★第286轮：内盒型号改用销售订单那套 lcb 下拉 —— 压到跟其他格一样高、一样居中 */
.pg-tbl td .lcb { min-width: 0; }
.pg-tbl td .lcb > .lcb-in {
  height: 24px; font-size: 12px; padding: 0 26px 0 4px; text-align: center;
  border-color: transparent; background: transparent; border-radius: 3px;
}
.pg-tbl td .lcb > .lcb-in:hover { border-color: var(--c-border); background: #fff; }
.pg-tbl td .lcb > .lcb-in:focus { border-color: #2563eb; background: #fff; }
.pg-tbl td .lcb-tri { right: 13px; font-size: 9px; }
.pg-tbl td .lcb-clr { right: 0; width: 15px; }
.pg-tbl td.pg-edit.on-edit .lcb > .lcb-in { background: #fff8e6; border-color: #f0d08a; }
/* 打印记录列表 */
.pg-doc-tbl td { font-size: 12.5px; }

/* ============================================================
    ★★★第290轮（老板点名）：系统设置 → 版本与功能
    套餐卡（三档）/ 模块总闸 / 每个页面一个 chip（灰勾=超档，🔒=系统必需）
   ============================================================ */
.fs-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 14px; }
@media (max-width: 900px) { .fs-tiers { grid-template-columns: 1fr; } }
.fs-tier { border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: #fff; }
.fs-tier:hover { border-color: #b9c6d8; background: #fbfcfe; }
.fs-tier.on { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary) inset; background: #f4f8ff; }
.fs-tn { font-size: 14px; font-weight: 700; }
.fs-tn b { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--c-primary); border-radius: 9px; padding: 0 7px; vertical-align: 1px; }
.fs-td { font-size: 12px; color: var(--c-text-2); line-height: 1.6; margin-top: 4px; }

.fs-mod { border-top: 1px dashed var(--c-border); padding: 10px 0 2px; }
.fs-mh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fs-master { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.fs-mc { font-size: 12px; color: var(--c-text-2); }
.fs-mc b { color: var(--c-text); }
.fs-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-it { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--c-border);
  border-radius: 6px; font-size: 12.5px; cursor: pointer; background: #fff; user-select: none; }
.fs-it input { width: 14px; height: 14px; margin: 0; }
.fs-it.on { border-color: #b6d3ff; background: #f3f8ff; }
.fs-it.lock { opacity: .48; cursor: not-allowed; }
.fs-it.prot { border-style: dashed; }
.fs-it.prot span::after { content: ' 🔒'; font-size: 10px; }
.fs-ph { font-style: normal; font-size: 10px; color: #fff; background: #8b95a5; border-radius: 3px;
  padding: 0 3px; margin-left: 3px; vertical-align: 1px; }
.fs-tag { font-style: normal; font-size: 10px; border-radius: 3px; padding: 0 4px; color: #fff; }
.fs-tag.t1 { background: #2f7d32; }
.fs-tag.t2 { background: #2563eb; }
.fs-tag.t3 { background: #b45309; }

/* ============================================================
   ★★★第306轮（老板点名）：左侧菜单自动折叠 · 按栏目精细控制
   勾上 = 这一栏参与自动折叠（默认全勾）；不勾 = 到点也不收这一栏
   ============================================================ */
.nf-cols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nf-col { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px;
  border: 1px solid var(--c-border); border-radius: 6px; font-size: 12.5px;
  cursor: pointer; background: #fff; user-select: none; }
.nf-col:hover { border-color: #b9c6d8; background: #fbfcfe; }
.nf-col.on { border-color: #b6d3ff; background: #f3f8ff; }
.nf-col input { width: 14px; height: 14px; margin: 0; }
.nf-col span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-n { font-style: normal; font-size: 10px; color: #8b95a5; background: #f1f4f9;
  border-radius: 3px; padding: 0 4px; }
.nf-tools { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.nf-sum { font-size: 12px; color: var(--c-text-2); }
.nf-sum b { color: var(--c-text); }
.nf-warn { margin-top: 8px; padding: 8px 10px; border: 1px solid #ffe082; background: #fff8e1;
  border-radius: 6px; font-size: 12.5px; line-height: 1.7; }
@media (max-width: 620px) {
  .nf-cols { display: grid; grid-template-columns: 1fr; }
  .nf-col span { max-width: none; }
}

/* ★第295轮：系统设置 →「图片运维」页签 */
.io-sub { font-weight: 400; font-size: 12px; color: var(--c-text-2); margin-left: 6px; }
.io-msg { padding: 6px 12px 10px; font-size: 12.5px; color: var(--c-text-2); min-height: 18px; line-height: 1.6; }
.io-kv { display: grid; grid-template-columns: 200px 1fr; gap: 5px 12px; padding: 4px 12px 12px; font-size: 13px; }
.io-kv:empty { display: none; }
.io-kv .k { color: var(--c-text-2); }
.io-warn { margin: 8px 0; padding: 9px 12px; background: #fff8e1; border: 1px solid #ffe082;
  border-radius: 6px; font-size: 12.5px; line-height: 1.7; }

/* ============================================================
   ★★★第301轮（老板点名）：重要材料「管理清单」
   · 基础档案 → 重要材料，和 报表中心 → 重要材料监测表，两页共用
   · 手柄 / 勾选框 / ✕ 都不占新列，全部塞在「材料名称」那一格里
   ============================================================ */
.km-mgbox { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px;
  font-size: 12.5px; color: var(--c-text-2); cursor: pointer; user-select: none; }
.km-mgbox input { width: 13px; height: 13px; cursor: pointer; }

.km-grip {
  display: inline-block; margin-right: 3px; padding: 0 2px; cursor: grab; color: #9aa6b8;
  font-size: 11px; letter-spacing: -1px; vertical-align: 1px; user-select: none;
}
.km-grip:hover { color: var(--c-primary); }
.km-grip:active { cursor: grabbing; }
.km-mpick { width: 13px; height: 13px; margin: 0 5px 0 0; vertical-align: -1px; cursor: pointer; }
.km-x { margin-left: 5px; color: #b3bdcb; cursor: pointer; font-size: 11px; font-style: normal; }
.km-x:hover { color: var(--c-danger); }

/* 管理模式下名字要跟手柄排一行（.ell 默认是块级，会把手柄挤到上面去） */
table.km-tbl.km-managing td.col-mat .ell,
table.km-tbl.km-list.km-managing td:first-child .ell {
  display: inline-block; max-width: calc(100% - 52px); vertical-align: middle;
}
/* 管理模式下别改安全库存（免得一边拖一边误改数字） */
table.km-tbl.km-managing input.km-safe { pointer-events: none; opacity: .5; }

table.km-tbl tbody tr.km-drop-top td { box-shadow: inset 0 2px 0 #2f6fd0; }
table.km-tbl tbody tr.km-drop-bot td { box-shadow: inset 0 -2px 0 #2f6fd0; }

/* 空行：一条矮矮的留白，不是数据行 */
table.km-tbl tbody tr.km-blank td {
  height: 18px; padding: 0; border-bottom: 1px dashed #e3e9f2;
  background: repeating-linear-gradient(45deg, #fbfcfe 0 6px, #f3f7fc 6px 12px);
}
table.km-tbl tbody tr.km-blank td.km-blank-l { text-align: center; white-space: nowrap; }
.km-blank-tip { display: inline-block; font-size: 10.5px; color: #b3bdcb; user-select: none; opacity: 0; transition: opacity .12s; }
table.km-tbl tbody tr.km-blank:hover .km-blank-tip,
table.km-tbl tbody tr.km-blank:hover .km-x { opacity: 1; }

/* 行间插入条：＋ 放在冻结首列里（宽表横向滚动也看得见） */
table.km-tbl tbody tr.km-ins td { height: 9px; padding: 0; border: 0; }
table.km-tbl tbody tr.km-ins:hover td { background: #eaf2ff; }
table.km-tbl tbody tr.km-ins td.km-ins-l { text-align: center; line-height: 9px; }
table.km-tbl tbody tr.km-ins .km-insbtn {
  display: inline-block; vertical-align: top; width: 28px; height: 14px; padding: 0; margin: 0;
  border: 1px solid #cfdae8; border-radius: 7px; background: #fff; color: #8b97a8;
  font-size: 11px; line-height: 11px; cursor: pointer; opacity: .6; transition: opacity .1s;
}
table.km-tbl tbody tr.km-ins:hover .km-insbtn { opacity: 1; }
table.km-tbl tbody tr.km-ins .km-insbtn:hover { color: #2f6fd0; border-color: #2f6fd0; background: #f2f8ff; }

/* 管理模式底部那条 */
.km-mgbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-top: 1px solid #e6ecf5; background: #f7faff; font-size: 12.5px; color: var(--c-text-2); }
.km-mgbar[hidden] { display: none; }
.km-mgbar .sep { width: 1px; height: 14px; background: #dbe3ee; }

/* 手机：空行 / 插入条一律不显示（老板定：空行只屏幕显示，手机不给管理入口） */
@media (max-width: 720px) {
  table.km-tbl tbody tr.km-blank,
  table.km-tbl tbody tr.km-ins { display: none; }
  .km-mgbar { display: none; }
}

/* ★第330轮：混色/散装弹窗 —— 标题栏的货号（老板要「货号也显示上去」） */
.lms-hd-no { font-size:17px; font-weight:700; letter-spacing:.4px; margin-right:10px; color:var(--c-text); }
.lms-sum b { color: var(--c-text); }

/* ★第330轮：扫码条上的「📷 扫一扫」占位按钮（摄像头要 HTTPS，云上部署后启用） */
.sc-cam { white-space: nowrap; opacity:.6; }
.sc-cam:hover { opacity:1; }

/* ============================================================
   ★★★第332轮（老板）：扫码出入库 6 个页签并成 3 个（装箱/入库/出库）
   「功能不要做得太散太乱」+「手机版要能用」
   ============================================================ */
.sc-subs { display: flex; gap: 6px; flex-wrap: wrap; padding: 9px 0 0; }
.sc-sub {
  padding: 5px 13px; border-radius: 20px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  transition: all .12s;
}
.sc-sub:hover { border-color: var(--c-primary); color: var(--c-primary); }
.sc-sub.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
#scGun.on { background: #eef6ff; border-color: var(--c-primary); color: var(--c-primary); font-weight: 600; }

/* 手机版：页签平分一行、小模式按钮加大、扫码条吸顶（扫完不用往上翻） */
@media (max-width: 720px) {
  .lbl-tabs { width: 100%; }
  .lbl-tabs .lbl-tab { flex: 1 1 0; text-align: center; padding: 9px 4px; font-size: 13.5px; }
  .sc-subs { padding: 8px 0 0; }
  .sc-sub { flex: 1 1 0; text-align: center; padding: 9px 8px; font-size: 13px; }
  .sc-scanbar {
    position: sticky; top: 0; z-index: 6;
    box-shadow: 0 4px 10px rgba(20, 40, 80, .06);
  }
  .sc-scanbar .btn, .sc-scanbar .sc-total, .sc-scanbar .sc-sb-lb { font-size: 13px; }
  .sc-work { padding: 8px 6px; }
  .sc-log { font-size: 12.5px; }
  /* 手机上一行一卡：表格不横向拉，关键列自己换行 */
  table.sc-tbl { min-width: 0; }
  table.sc-tbl th, table.sc-tbl td { padding: 7px 6px; font-size: 12.5px; }
}

/* 查箱 / 扫码枪 两个全局工具：手机上一整行，别跟「小模式」混在一排 */
.sc-tools { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 720px) {
  .sc-tools { flex: 1 1 100%; display: flex; gap: 8px; }
  .sc-tools .btn { flex: 1 1 0; }
}

/* ★334：扫箱入库池子里「混色/散装箱」那一段的标题 */
.sc-mix-hd {
  margin: 12px 0 6px; padding-left: 8px; font-size: 12.5px; color: var(--c-text-2);
  border-left: 3px solid var(--c-primary); line-height: 1.6;
}

/* ★第355轮（老板 #021）：前三个块新增的「合计」组标题 —— 跟数据列的合计同宽 */
table.mo-table thead th.mo-g.mo-gsum { width: 56px; min-width: 56px; max-width: 56px; }

/* ★第362轮：标签模板编辑器的缩放条 */
.tpl-zoom { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px; padding-left: 8px; border-left: 1px solid var(--c-border); }
.tpl-zoom b { font-size: 12px; color: var(--c-text-2); min-width: 46px; text-align: center; cursor: pointer; user-select: none; }
.tpl-zoom b:hover { color: var(--c-primary); }

/* ★第364轮：已打印的箱 —— 配码明细小字密排 */
.lbx-detail { font-size: 10.5px; line-height: 1.32; color: var(--c-text-2); }
.lbx-detail > div { white-space: nowrap; }
.lbx-detail b { color: var(--c-text); font-weight: 600; }
.lbx-detail i { font-style: normal; color: #8b94a3; }
.lbx-detail .lbx-p { color: var(--c-primary); font-weight: 700; margin-left: 6px; }
.lbx-cust { font-size: 12px; }
.lbx-void td { opacity: .45; }
.lbx-void td:last-child { opacity: 1; }
.lbx-new { font-size: 10.5px; color: #8b94a3; margin-top: 2px; }
.lbx-tbl td { vertical-align: top; padding-top: 5px; padding-bottom: 5px; }

/* ============================================================
   ★★★第366轮（老板 #012）：PDA / 手机扫码页 —— 大字号、大按钮
   手机上操作的人戴着工装手套、站着单手点，原来的小字小按钮根本点不中。
   只在窄屏生效（≤ 900px），电脑端一个字不动。
   ============================================================ */
@media (max-width: 900px) {
  /* 顶部：货号 + 进度，一眼能看清 */
  .sc-packbox .sc-pb-t { font-size: 19px; line-height: 1.3; }
  .sc-packbox .sc-pb-t b { font-size: 21px; }
  .sc-packbox .sc-pb-s { font-size: 12.5px; line-height: 1.5; }
  .sc-packbox .sc-pb-big { font-size: 26px; font-weight: 800; }
  .sc-packbox .sc-pb-big i { font-size: 13px; }

  /* 扫码输入框：大、居中、够高 */
  .sc-packbox .sc-scanbar { padding: 8px 0; }
  .sc-packbox .sc-scanbar .sc-lb { font-size: 13px; }
  .sc-packbox .sc-box-in {
    height: 54px; font-size: 20px; letter-spacing: .5px;
    border-radius: 10px; border: 2px solid #1f5fbf;
  }
  .sc-packbox .sc-box-in:focus { box-shadow: 0 0 0 3px rgba(31,95,191,.18); }

  /* 所有按钮：至少 48px 高（拇指能点中） */
  .sc-packbox .btn { min-height: 50px; font-size: 16px; padding: 0 18px; border-radius: 10px; }
  .sc-packbox .btn-primary { font-weight: 700; }

  /* 尺码格子：字号大一点，格子高一点 */
  .sc-packbox .sc-sz, .sc-packbox .sc-sz b { font-size: 15px; }
  .sc-packbox table td, .sc-packbox table th { font-size: 13.5px; padding: 5px 4px; }

  /* 提示条：成功/失败看得清 */
  .sc-packbox .sc-say { font-size: 15px; line-height: 1.5; }
}

/* ★第368轮：标签安排表 —— 作废后显示「需重打」 */
.la-need { display: inline-block; padding: 0 5px; border-radius: 3px; background: #fff3cd; color: #8a5a00; font-size: 11px; font-weight: 600; }

/* ============================================================
   ★★★第371轮（老板 #017）：PDA 扫码装箱界面
   老板原话：「PDA 上直接点网页上那些很小的条目很不现实」——
   所以扫了箱唛之后走这一套：大货号 / 大进度 / 大扫码框 / 底部大按钮。
   ============================================================ */
.sc-pda { padding: 12px 14px 18px; }
.sc-pda-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sc-pda-style { font-size: 25px; font-weight: 800; line-height: 1.15; color: var(--c-text); }
.sc-pda-cust { font-size: 12.5px; color: #6b7482; margin-top: 3px; line-height: 1.4; }
.sc-pda-prog { white-space: nowrap; color: #6b7482; font-size: 13px; }
.sc-pda-prog b { font-size: 30px; font-weight: 800; color: var(--c-primary); }
.sc-pda-prog i { font-style: normal; font-size: 17px; }
.sc-pda-prog span { font-size: 12px; margin-left: 2px; }

.sc-pda-bar { height: 10px; border-radius: 6px; background: #e8ecf3; margin: 12px 0 10px; overflow: hidden; }
.sc-pda-bar i { display: block; height: 100%; background: var(--c-primary); transition: width .18s ease; }
.sc-pda-bar i.full { background: #16a34a; }

.sc-pda-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sc-bz { display: inline-flex; align-items: baseline; gap: 2px; padding: 5px 9px; border-radius: 7px; background: #f1f4f9; font-size: 14px; color: #3b4554; }
.sc-bz em { font-style: normal; font-size: 10.5px; color: #8b94a3; margin-right: 1px; }
.sc-bz b { font-size: 17px; font-weight: 800; }
.sc-bz i { font-style: normal; font-size: 11px; color: #8b94a3; }
.sc-bz.ok { background: #dcf5e6; color: #14683a; }
.sc-bz.ok b { color: #14683a; }
.sc-bz.over { background: #ffe3e3; color: #9c1c1c; }
.sc-bz.part { background: #fff4d6; color: #8a5a00; }

.sc-pda-in { width: 100%; height: 56px; font-size: 20px; padding: 0 14px; border-radius: 10px;
  border: 2px solid var(--c-primary); outline: none; box-sizing: border-box; }
.sc-pda-in:focus { box-shadow: 0 0 0 3px rgba(31,95,191,.16); }

.sc-pda-say { font-size: 15px; line-height: 1.45; margin: 9px 0 4px; min-height: 22px; }
.sc-pda-say.ok { color: #14683a; }
.sc-pda-say.bad { color: #9c1c1c; font-weight: 600; }
.sc-pda-say.dim { color: #8b94a3; }

.sc-pda-ops { display: flex; gap: 8px; margin: 6px 0 12px; }
.sc-pda-ops .btn { min-height: 42px; flex: 1; font-size: 14px; }

.sc-pda-btn { width: 100%; height: 58px; font-size: 19px; font-weight: 800; border-radius: 12px;
  background: #e8ecf3; color: #8b94a3; border: none; }
.sc-pda-btn.go { background: #16a34a; color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,.28); }
.sc-pda-box { text-align: center; font-size: 11.5px; color: #a3abb8; margin-top: 8px; }

/* ★★★第372轮（老板 #018）：PDA 扫码首页 —— 三个大按钮，占满屏 */
.sc-home { display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 22px; min-height: calc(100vh - 150px); }
.sc-big { flex: 1; min-height: 118px; border-radius: 18px; border: none; cursor: pointer;
  background: linear-gradient(180deg, #2a6fce, #1f5fbf); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 10px 24px rgba(31,95,191,.22); }
/* ★★★第383轮（老板 #025 真凶）：这里原来有 transition: transform + :active { transform: scale(.985) }。
   老 Android WebView 在按下时元素发生 transform，会判定「手指在滑动」→ **不触发 click**。
   所以按钮看着能按、按下去有点反应，但 onclick 一次都不执行。去掉缩放，改成改亮度。 */
.sc-big:active { filter: brightness(.92); }
.sc-big b { font-size: 34px; font-weight: 800; letter-spacing: 6px; }
.sc-big i { font-style: normal; font-size: 13px; opacity: .82; letter-spacing: 1px; }
.sc-big:nth-child(2) { background: linear-gradient(180deg, #17a34a, #15803d); box-shadow: 0 10px 24px rgba(21,128,61,.22); }
.sc-big:nth-child(3) { background: linear-gradient(180deg, #e08a1e, #c2761a); box-shadow: 0 10px 24px rgba(194,118,26,.22); }
.sc-back { height: 54px; border-radius: 12px; background: #eef1f6; color: #47505e; border: none;
  font-size: 16px; font-weight: 600; margin-top: 6px; }

/* ★★★第373轮（老板 #019）：扫码装箱的选单界面 —— 日期按钮组 + 卡片列表 */
.sc-qd { display: flex; gap: 6px; padding: 10px 10px 0; }
.sc-qd button { flex: 1; height: 44px; border-radius: 9px; border: 1px solid #dde3ec; background: #fff;
  font-size: 14px; color: #47505e; font-weight: 600; }
.sc-qd button.on { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.sc-pkq { display: block; width: calc(100% - 20px); margin: 8px 10px 6px; height: 46px;
  border-radius: 9px; border: 1px solid #dde3ec; padding: 0 12px; font-size: 15px; box-sizing: border-box; }
.sc-cards { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px 12px; }
.sc-card { display: flex; align-items: center; gap: 10px; padding: 12px 12px;
  border-radius: 12px; background: #fff; border: 1px solid #e5eaf2; }
.sc-card.done { opacity: .5; }
.sc-card-l { flex: 1; min-width: 0; }
.sc-card-no { font-size: 17px; font-weight: 800; color: var(--c-text); letter-spacing: .3px; }
.sc-card-sub { font-size: 11.5px; color: #8b94a3; margin-top: 3px; }
.sc-card-r { text-align: right; }
.sc-card-num { font-size: 23px; font-weight: 800; color: var(--c-primary); line-height: 1.1; }
.sc-card-num i { display: block; font-style: normal; font-size: 10.5px; font-weight: 500; color: #8b94a3; }
.sc-card-tot { font-size: 10.5px; color: #a3abb8; margin-top: 2px; }
.sc-card-go { font-size: 13px; font-weight: 700; color: #1f5fbf; white-space: nowrap; }

/* ★375：选单明细卡片 */
.sc-card-detail { font-size: 11px; color: #6b7482; margin-top: 4px; line-height: 1.4; letter-spacing: .2px; }
.sc-card-per { color: #a3abb8; }

/* ★376：选单的日期控件行 */
.sc-qd2 { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0; }
.sc-qkdate, .sc-pkdate { flex: 1; height: 42px; border-radius: 9px; border: 1px solid #dde3ec; padding: 0 8px; font-size: 13px; box-sizing: border-box; min-width: 0; }
.sc-qd2-t { color: #8b94a3; font-size: 12px; }
.sc-qd2 .btn { height: 42px; white-space: nowrap; }

/* ★377：PDA 首页版本标记（手机上没法开 Console，用这个确认代码新旧） */
.sc-ver { text-align: center; font-size: 11.5px; color: #a3abb8; padding-top: 2px; }
.sc-ver b { color: #1f5fbf; }

/* ★★★第382轮（老板 #025）：大按钮点不动 —— 把可能挡住点击的几个原因一次堵死
   ① 老的 webview 对 flex 撑高的按钮触摸命中区算偏（经典问题）→ 给按钮明确的 position/z-index
   ② 滚动容器（#content）里的按钮触摸坐标偏移 → touch-action: manipulation
   ③ 按钮里的 <b>/<i> 被子元素挡住 → pointer-events: none */
.sc-home { position: relative; z-index: 5; }
.sc-big { position: relative; z-index: 20; pointer-events: auto; touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,.08); }
.sc-back { position: relative; z-index: 20; touch-action: manipulation; }
#content, .layout, .main { touch-action: manipulation; }

/* ★★★第387轮（老板）：PDA 功能页底部统一「← 上一层 / ⌂ 主界面」
   —— 以前进了装箱/零售就出不来，顶上那个「退出」是退出登录，不是返回。 */
.sc-nav { display: flex; gap: 8px; margin-top: 12px; }
.sc-nav .sc-back { flex: 1; width: auto; margin-top: 0; height: 48px; font-size: 15px; }
.sc-nav .sc-back:only-child { flex: 1; }

/* 这一行已经装完了：把「已装的箱 + 撤箱」摆出来，别再让人白扫 */
.sc-fullbox { border: 1px solid #f0c9c9; background: #fff6f6; border-radius: 12px; padding: 14px 14px 12px; margin-top: 12px; }
.sc-fullbox h4 { margin: 0 0 6px; font-size: 17px; color: #9c1c1c; }
.sc-fullbox p { margin: 4px 0; font-size: 13.5px; color: #47505e; line-height: 1.5; }
.sc-fullbox .sc-fb { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sc-fullbox .sc-fb .btn { height: 46px; font-size: 15px; }

/* ★★★第388轮（老板）：选单装箱「待装 / 已装记录」页签 + 混装散装组卡 + 记录卡 */
.sc-seg { display: flex; gap: 6px; padding: 4px 10px 8px; }
.sc-seg button { flex: 1; height: 40px; border-radius: 9px; border: 1px solid #dde3ec; background: #fff;
  font-size: 14px; color: #47505e; font-weight: 600; }
.sc-seg button.on { background: #1f5fbf; color: #fff; border-color: #1f5fbf; }
.sc-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px;
  background: #eef1f6; color: #47505e; vertical-align: middle; }
.sc-tag.ok { background: #e7f6ec; color: #14683a; }
.sc-card-grp { border-left: 4px solid #e08a1e; }
.sc-card-ops { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.sc-card-ops .btn { min-width: 66px; height: 34px; }

/* ★★★第390轮（老板）：散装出库（散客零售）PDA 版 —— 大扫码按钮 + 固定底栏 */
.rt-page { padding-bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
.rt-page.kb { padding-bottom: 14px; }
.rt-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; }
.rt-date { font-size: 11.5px; color: #8b94a3; white-space: nowrap; }
.rt-cust { position: relative; flex: 1; min-width: 0; display: flex; gap: 6px; }
.rt-cust-in { flex: 1; min-width: 0; height: 40px; font-size: 16px; padding: 0 10px;
  border: 1px solid #dde3ec; border-radius: 10px; background: #fff; }
.rt-cust-in:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(31,95,191,.14); }
.rt-scanrow { display: flex; gap: 8px; padding: 6px 12px 0; }
.rt-scan { flex: 1; height: 64px; border: 0; border-radius: 14px; color: #fff; font-size: 22px;
  font-weight: 800; letter-spacing: 2px; touch-action: manipulation;
  background: linear-gradient(180deg, #2a6fce, #1f5fbf); box-shadow: 0 8px 20px rgba(31,95,191,.24); }
.rt-scan:active { filter: brightness(.92); }
.rt-scanrow .sc-cam { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 14px; font-size: 20px; }
/* ★★★第391轮（老板）：扫码框改回「看得见的窄条」——
   PDA 的扫码服务只往真实可见的焦点输入框里注入字符，1px + opacity:0 的框在很多安卓 WebView 里收不到。
   老板原话：「加一个小一点的输入框，字体小一点，排版紧凑一点，加到扫码那个按钮的上方」 */
.rt-gunrow { padding: 2px 12px 0; }
.rt-gunin { display: block; width: 100%; height: 34px; box-sizing: border-box;
  padding: 0 10px; font-size: 14px; line-height: 32px; border: 1px solid #dde3ec; border-radius: 9px;
  background: #fff; color: #1c2430; -webkit-appearance: none; }
.rt-gunin::placeholder { font-size: 13px; color: #9aa3b2; }
.rt-gunin:focus { outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(31,95,191,.14); }
.rt-gunin.on { border-color: #1f5fbf; box-shadow: 0 0 0 3px rgba(31,95,191,.22); }
.rt-tools { display: flex; align-items: center; gap: 8px; padding: 7px 12px 0; }
.rt-cnt { font-size: 12.5px; color: #8b94a3; }
.rt-clear { margin-left: auto; height: 36px; padding: 0 16px; border-radius: 9px;
  border: 1px solid #f0c9c9; background: #fff6f6; color: #c0392b;
  font-size: 14px; font-weight: 700; touch-action: manipulation; }
.rt-clear:active { filter: brightness(.95); }
.rt-clear[disabled] { opacity: .45; }
.rt-tip { min-height: 18px; padding: 6px 12px 0; font-size: 12.5px; color: #8b94a3; }
.rt-tip.bad { color: #d4380d; font-weight: 700; }
.rt-lines { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.rt-line { border: 1px solid #e5eaf2; border-radius: 12px; padding: 10px 12px; background: #fff; }
.rt-line-hd { display: flex; align-items: baseline; gap: 8px; }
.rt-line-hd b { font-size: 16px; font-weight: 800; }
.rt-line-hd span { font-size: 12.5px; color: #5b6876; }
.rt-line-hd em { margin-left: auto; font-style: normal; font-size: 16px; font-weight: 800; color: var(--c-primary); }
.rt-line-sz { margin-top: 4px; font-size: 12.5px; color: #47505e;
  font-family: ui-monospace, Consolas, monospace; }
.rt-line-f { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rt-line-f i { font-style: normal; font-size: 13px; color: #5b6876; }
.rt-line-f .rt-price { width: 86px; height: 34px; text-align: right; font-size: 16px; }
.rt-line-f .rt-del { margin-left: auto; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid #f0c9c9; background: #fff6f6; color: #c0392b; font-size: 18px; line-height: 1; }
@media (min-width: 720px) {
  .rt-line { display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; gap: 10px; }
  .rt-line-sz { margin: 0; }
  .rt-line-f { margin: 0; }
}
.rt-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
  border-top: 1px solid #dfe5ee; box-shadow: 0 -6px 18px rgba(20,40,80,.10);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
.rt-dock.kb { display: none; }
.rt-dock-in { max-width: 720px; margin: 0 auto; }
.rt-sum { font-size: 13px; color: #5b6876; padding: 0 2px 6px; }
.rt-sum b { font-size: 18px; color: #1c2430; font-variant-numeric: tabular-nums; }
.rt-sum .bad { color: #d4380d; font-weight: 700; font-size: 12.5px; }
.rt-acts { display: flex; gap: 8px; }
.rt-btn { height: 56px; border: 0; border-radius: 12px; font-size: 17px; font-weight: 800;
  touch-action: manipulation; }
.rt-btn-main { flex: 2; color: #fff; background: linear-gradient(180deg, #17a34a, #15803d);
  box-shadow: 0 6px 18px rgba(21,128,61,.26); }
.rt-btn-print { flex: 1; color: #1f5fbf; background: #eef4ff; border: 1px solid #cfe0ff; }
.rt-btn:active { filter: brightness(.94); }
.rt-btn[disabled] { opacity: .6; }
.rt-dock .sc-nav { margin-top: 6px; }
.rt-dock .sc-nav .sc-back { height: 38px; font-size: 14px; background: #f2f4f8; }
html.land-rot .rt-dock { position: static; padding-bottom: 8px; }

/* ★★★第393轮（老板）：扫码框要一眼看出「现在能不能扫」—— 有焦点=绿边+绿点，没焦点=灰字提示 */
.rt-gunrow.ready { position: relative; }
.rt-gunrow.ready::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #17a34a;
  box-shadow: 0 0 0 3px rgba(23,163,74,.16);
  pointer-events: none;
}
.rt-gunrow.ready .rt-gunin {
  border-color: #17a34a;
  box-shadow: 0 0 0 3px rgba(23,163,74,.14);
  padding-left: 26px;
}

/* ★★★第396轮（老板）：散客零售「单据清单」—— 作废 / 收款 / 补打 */
/* 底栏「合计」那一行右侧放一个小按钮；不改原来的 .rt-sum 规则，只包一层 */
.rt-sumrow { display: flex; align-items: center; gap: 8px; }
.rt-sumrow .rt-sum { flex: 1 1 auto; min-width: 0; }
.rt-mini { flex: 0 0 auto; height: 30px; padding: 0 10px; border-radius: 7px;
  border: 1px solid #d6dbe4; background: #fff; color: #33445c; font-size: 12.5px;
  touch-action: manipulation; }
.rt-mini:active { filter: brightness(.95); }
.rt-mini.rtd-danger { color: #c0392b; border-color: #f0c8c2; background: #fff6f4; }
.rt-mini.rtd-okbtn { color: #fff; background: #17a34a; border-color: #17a34a; }

.rtd-page { padding-bottom: 8px; }
.rtd-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rtd-q { flex: 1; height: 34px; padding: 0 10px; border: 1px solid #d6dbe4; border-radius: 8px; font-size: 14px; }
.rtd-dates { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.rtd-dates input { flex: 1; height: 32px; padding: 0 6px; border: 1px solid #d6dbe4; border-radius: 7px; font-size: 13px; }
.rtd-dates select { height: 32px; border: 1px solid #d6dbe4; border-radius: 7px; font-size: 13px; padding: 0 4px; }
.rtd-sum { font-size: 12.5px; color: #5b6876; padding: 2px 2px 8px; }
.rtd-sum b { font-size: 15px; color: #1c2430; font-variant-numeric: tabular-nums; }
.rtd-sum .bad { color: #d4380d; font-weight: 700; }
.rtd-list { display: flex; flex-direction: column; gap: 8px; }
.rtd-card { background: #fff; border: 1px solid #e3e7ef; border-radius: 10px; padding: 9px 10px; }
.rtd-card.cancelled { background: #fafbfc; border-style: dashed; }
.rtd-top { display: flex; align-items: center; gap: 6px; }
.rtd-top b { font-size: 14px; letter-spacing: .3px; }
.rtd-tag { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: #eef2f8; color: #5b6675; }
.rtd-tag.draft { background: #fff7e6; color: #ad6800; }
.rtd-tag.locked { background: #e8f2ff; color: #1f5fbf; }
.rtd-tag.cancelled { background: #f2f4f8; color: #8b94a3; }
.rtd-t { margin-left: auto; font-size: 11.5px; color: #8b94a3; }
.rtd-mid { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 13px; color: #33445c; }
.rtd-mid i { font-style: normal; font-variant-numeric: tabular-nums; }
.rtd-cust { font-weight: 600; }
.rtd-un { color: #d4380d; font-weight: 700; }
.rtd-ok { color: #17a34a; }
.rtd-acts { display: flex; gap: 6px; margin-top: 7px; }
.rtd-acts .rt-mini { flex: 1; }
.rtd-detail { margin-top: 7px; border-top: 1px dashed #e3e7ef; padding-top: 7px; }
.rtd-lines div { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; padding: 2px 0; }
.rtd-lines em { font-style: normal; margin-left: auto; color: #5b6876; font-variant-numeric: tabular-nums; }
.rtd-lines .dim { color: #8b94a3; }
.rtd-pay { font-size: 12.5px; color: #33445c; }
.rtd-payrow { display: flex; gap: 8px; margin-top: 6px; }
.rtd-payrow input { flex: 1; height: 34px; padding: 0 8px; border: 1px solid #d6dbe4; border-radius: 7px; font-size: 14px; }

/* ============================================================
   ★★★第402轮（老板）：角色与权限 —— 三级树（模块 → 功能 → 动作）
     左边角色列表、右边只画当前角色一棵树（以前 5 张卡并排 = 一屏 4000px）
     ★ 上面 .fs-* 那套（版本与功能）**一个字都不动** —— test_round290 逐字锁着
   ============================================================ */
.perm-wrap { display: grid; grid-template-columns: 206px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .perm-wrap { grid-template-columns: 1fr; } .perm-side { position: static !important; } }
.perm-side { border: 1px solid var(--c-border); border-radius: 8px; background: #fff; overflow: hidden; position: sticky; top: 8px; }
.perm-side-hd { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px;
  font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--c-border); background: #f7f9fc; }
.perm-side-hd span { font-weight: 400; font-size: 12px; color: var(--c-text-2); }
.perm-roles { padding: 6px; }
.perm-role { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 6px;
  font-size: 13px; color: var(--c-text); text-decoration: none; }
.perm-role:hover { background: #f3f7fd; }
.perm-role.on { background: #eef4ff; color: var(--c-primary-dark); font-weight: 700; box-shadow: inset 0 0 0 1px #cfe0ff; }
.perm-role-n { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-tag { font-style: normal; font-size: 10px; color: #fff; background: #8b95a5; border-radius: 3px; padding: 0 4px; }
.perm-role-c { font-style: normal; font-size: 11.5px; color: var(--c-text-2); font-weight: 400; }
.perm-side-tip { padding: 8px 12px 10px; font-size: 11.5px; color: var(--c-text-2); line-height: 1.7; border-top: 1px dashed var(--c-border); }

.perm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.perm-search { flex: 0 1 300px; padding: 6px 10px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 13px; }
.perm-tools-tip { font-size: 12px; color: var(--c-text-2); }
.perm-help { font-size: 12.5px; line-height: 1.8; color: var(--c-text-2); background: #fafbfd;
  border: 1px solid var(--c-border); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.perm-help b { color: var(--c-text); }

.perm-tree { border-top: 1px solid var(--c-border); }
.perm-mod { border-bottom: 1px solid var(--c-border); }
.perm-mh, .perm-fh { display: flex; align-items: center; gap: 8px; }
.perm-mh { padding: 9px 4px; background: #fafbfd; }
.perm-mh:hover, .perm-fh:hover { background: #f4f8ff; }
.perm-mt { flex: 0 0 auto; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--c-text); }
.perm-ft { font-size: 13px; cursor: pointer; color: var(--c-text); }
.perm-mc, .perm-c { font-size: 12px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.perm-mc.part, .perm-c.part { color: #b45309; }
.perm-mc.all, .perm-c.all { color: #2f7d32; }
.perm-mf { font-size: 12px; color: var(--c-text-2); }
.perm-arrow { margin-left: auto; font-size: 11px; color: var(--c-text-2); transition: transform .12s; }
.perm-mod.open > .perm-mh .perm-arrow { transform: rotate(90deg); }
.perm-fns { padding: 2px 0 6px 22px; }
.perm-fn { border-top: 1px dashed #eef1f6; }
.perm-fh { padding: 6px 4px; }
.perm-fn.open > .perm-fh .perm-ft { font-weight: 700; color: var(--c-primary-dark); }
.perm-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 9px 26px; }
.perm-act { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--c-border);
  border-radius: 6px; background: #fff; font-size: 12.5px; cursor: pointer; user-select: none; max-width: 100%; }
.perm-act input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.perm-act.on { border-color: #b6d3ff; background: #f3f8ff; }
.perm-act.on span { color: var(--c-primary-dark); }
.perm-sum { font-size: 12.5px; color: var(--c-text-2); }
.perm-dirty { font-size: 11.5px; color: #b45309; background: #fff7e8; border: 1px solid #f2dcae; border-radius: 9px; padding: 0 7px; }
.perm-admin-tip { font-size: 12.5px; color: var(--c-text-2); }

/* ---------- ★★★第407轮（老板）：材料图 ---------- */
/* 「借用：XX 的图」那条小黄条 —— 一眼看出这张图不是自己的 */
.imgf-ref {
  margin-top: 5px; font-size: 12px; line-height: 1.5; color: #8a6d3b;
  background: #fdf6e3; border: 1px solid #f3e1b3; border-radius: 5px;
  padding: 2px 8px; display: inline-block; max-width: 100%;
}
/* 材料档案列表里的缩略图那一列：窄、居中、不撑行高 */
table.grid td.thumbcell img.thumb { width: 40px; height: 40px; }

/* ---------- ★★★第408轮：材料图 / 引用弹窗的常驻错误提示 ---------- */
/* 失败原因不能只靠 4 秒的 toast —— 老板反复点七八次的那种，提示早没了 */
.imgf-err { margin-top: 5px; font-size: 12px; line-height: 1.55; color: #b3261e; background: #fdecea; border: 1px solid #f6c8c4; border-radius: 5px; padding: 4px 8px; }
.imgf-err[hidden] { display: none; }

/* ---------- ★★★第408轮：引用别的材料的图（带缩略图的列表）---------- */
.imgpick { margin-top: 8px; max-height: 320px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: 8px; }
.imgpick-i { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px; border: 0;
  background: #fff; border-bottom: 1px solid #eef2f7; text-align: left; cursor: pointer; }
.imgpick-i:hover { background: #f2f7ff; }
.imgpick-i img { width: 42px; height: 42px; object-fit: cover; border-radius: 5px; border: 1px solid var(--c-border); flex: 0 0 auto; }
.imgpick-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imgpick-t b { font-size: 13px; font-weight: 600; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imgpick-t i { font-style: normal; font-size: 11.5px; color: var(--c-muted); }
.imgpick-empty { padding: 22px 14px; text-align: center; font-size: 12.5px; color: var(--c-muted); line-height: 1.7; }

/* ★423 工序进度列（排单列表 / 订单总表）—— 小字、一行放得下，做完的绿色打勾 */
.cro-prog { font-size: 11.5px; line-height: 1.6; white-space: normal; }
.cro-prog .crp { display: inline-block; margin-right: 7px; color: var(--c-text-2); white-space: nowrap; }
.cro-prog .crp.ok { color: var(--c-ok); }


/* ★★★第424轮（老板）：工序派工明细 —— 尺码三态（默认 35~40 显示，41~43 折叠）
   · data-sz3="hide"：只藏最后三码（.szcol-late）
   · data-sz3="none"：全藏（所有 .szcol）
   · 数据一直在 DOM 里，只是不显示；加上 !important 压得住 table.grid 的通用规则 */
.cro-wrap[data-sz3="hide"] th.szcol-late,
.cro-wrap[data-sz3="hide"] td.szcol-late { display: none !important; }
.cro-wrap[data-sz3="none"] th.szcol,
.cro-wrap[data-sz3="none"] td.szcol { display: none !important; }
.cro-wrap table.grid th.szcol,
.cro-wrap table.grid td.szcell { padding-left: 1px; padding-right: 1px; }
.cro-wrap table.grid .szin { width: 100%; text-align: center; padding: 0 2px; }
.cro-szsum { font-size: 12px; color: var(--c-text-2); }
.cro-szsum b { color: var(--c-text); }

/* ============================================================
   ★★★第432轮（老板）：工序派工的「工序页签」
   每个工序一个页签，页签上带「N 单 · M 行」；工序多了自动换行。
   ============================================================ */
.cr-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border); }
.cr-tabs .cr-tab { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
  border: 1px solid var(--c-border); border-radius: 6px; background: #fff; font-size: 13px;
  color: var(--c-text); cursor: pointer; white-space: nowrap; }
.cr-tabs .cr-tab:hover { background: #f4f7fc; }
.cr-tabs .cr-tab.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.cr-tabs .cr-n { font-style: normal; font-size: 11.5px; color: var(--c-text-2); background: #eef1f6;
  border-radius: 9px; padding: 1px 7px; }
.cr-tabs .cr-tab.on .cr-n { color: #fff; background: rgba(255,255,255,.22); }
/* ============================================================
   ★436（老板）：工单派工单 —— 一组一行（颜色+面料+名称），
   点 ▸ 展开才是订单行（数量在那里改）。
   ============================================================ */
.cro-grid tr.cro-grp > td { background: #f5f8fd; font-weight: 600; }
.cro-grid tr.cro-grp > td .bom-in { font-weight: 600; }
.cro-grid tr.cro-sub > td { background: #fff; font-weight: 400; border-left: 3px solid #dbe4f3; }
.cro-grid tr.cro-sub > td:nth-child(2) { padding-left: 14px; }
.cro-grid tr.cro-sub:hover > td { background: #fbfcfe; }

/* ============================================================
   ★439（老板）：工序派工「选单」表 —— 照销售订单汇总表排版，
   备注列不用 300px 那么宽（这边列多，收窄一点少横向滚动）
   ============================================================ */
table.grid.rep-tbl.crp-tbl th.memo-col,
table.grid.rep-tbl.crp-tbl td.memo-cell { min-width: 220px; max-width: 220px; }
table.grid.rep-tbl.crp-tbl td.memo-cell { white-space: normal; word-break: break-word; }

/* ============================================================
   ★440（老板）：材料下单 —— 名称后面那个 1 个字的「调」
   比「全码/共码」小一圈（那个约 33×17），点它直接开新建损溢单、把材料预填第一行。
   ============================================================ */
.mo-name .mo-adjbtn { margin-left: 3px; }
.mo-adjbtn {
  width: 16px; height: 15px; padding: 0; line-height: 13px; font-size: 11px;
  border: 1px solid #dfe5ee; border-radius: 3px; background: #fff; color: #8a94a3;
  cursor: pointer; vertical-align: 1px; font-family: inherit;
}
.mo-adjbtn:hover { border-color: var(--c-primary); color: var(--c-primary); background: #f7faff; }

/* ============================================================
   ★★★第445轮（老板）：全站表格「文字靠左」（总闸在 3924 行那里）
     这里只做两件事：① 把「不是文字」的列写回居中；② 客户名吃满列宽。
     ★ 为什么放在文件最末：要压过前面几十年攒下的
       `td.col-cust .ell{8em}` / `td.col-shoetype .ell{4em}` / `.pg-tbl td{center}` 等。
     ★ 只改对齐，不动任何数据、逻辑、列宽计算、colspan。
   ============================================================ */
table.grid th.num, table.grid td.num,
table.grid th.szcol, table.grid td.szcol,
table.grid th.bulkcol, table.grid td.bulkcol,
table.grid th.pickcol, table.grid td.pickcol,
table.grid th.thumbcell, table.grid td.thumbcell,
table.grid th.perm-ckcell, table.grid td.perm-ckcell,
table.grid th.c, table.grid td.c,
table.grid td.empty { text-align: center; }
/* 客户账（.fin-tbl）的金额 / 欠款列：2577 行给的是 right，这里写回居中 */
table.grid.rep-tbl.fin-tbl th.num,
table.grid.rep-tbl.fin-tbl td.num { text-align: center; }
/* 包装指导（.pg-tbl）是 A5 打印件的屏幕镜像（286/291 轮定的版面）——
   整表保持居中，跟打印出来一致；里面的客户名也没有限宽盒子，不存在空一截的问题 */
table.grid.pg-tbl th, table.grid.pg-tbl td { text-align: center; }
/* 客户名：整格就一个省略号盒子，靠左、吃满列宽。
   auto 布局下最多 16em（再长就省略号 + 悬停看全）；
   37 列那张表用的是 `.rep-tbl td.col-cust .ell{8em}`，特异性更高，不会被这条放大。 */
td.col-cust .ell {
  display: block; margin: 0; max-width: 16em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help;
}
/* ★ 拖过 / 存过列宽的表（freezeCols 已经打了 data-colw-frozen="1"）：
   彻底不封顶，文字用满那一列 —— 这就是「列拖宽了，字也得跟着宽」 */
table.grid[data-colw-frozen="1"] td .ell { max-width: none !important; }
.bom-hint-row #bnPull { flex: 0 0 auto; margin: 7px 10px 0 0; font-size: 12px; white-space: nowrap; }
