
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #16181d;
  --text2: #5b6270;
  --text3: #9098a6;
  --line: #e8eaef;
  --primary: #2563eb;
  --primary-soft: #eef3ff;
  --danger: #dc2626;
  --danger-soft: #fdeceb;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --ok: #0f9d7a;
  --ok-soft: #e8f7f2;
  --purple: #7c3aed;
  --purple-soft: #f2ecff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  /* 数字 / 金额统一用的等宽字体：和流水台账里的日期、物品单价一致 */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 12px 90px; }

/* ---------- header ---------- */
.head {
  position: sticky; top: 0; z-index: 30;
  margin: 0 -12px; padding: 12px 12px 8px;
  background: rgba(245, 246, 248, .94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.head h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.head .sub { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.head-acts { display: flex; gap: 8px; align-items: center; }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--text2);
  height: 34px; padding: 0 13px; border-radius: 10px; font-size: 13px; font-weight: 550;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f6d5d2; background: #fff; }

.menu {
  position: absolute; right: 12px; top: 58px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .13);
  padding: 6px; min-width: 178px;
}
.menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 11px; border-radius: 8px; font-size: 13.5px; color: var(--text); cursor: pointer;
  font-family: inherit;
}
.menu button:hover { background: #f3f5f9; }
.menu button.danger { color: var(--danger); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 6px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto; border: 1px solid transparent; background: #eceef3; color: var(--text2);
  height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 550;
  cursor: pointer; font-family: inherit;
}
.tabs button.on { background: var(--text); color: #fff; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px;
}
.stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 11px 12px;
}
.stat .k { font-size: 11px; color: var(--text3); }
.stat .v { font-size: 17px; font-weight: 650; margin-top: 3px; letter-spacing: -.01em; }
.stat .v small { font-size: 11px; font-weight: 500; color: var(--text3); margin-left: 2px; }
.stat.hot .v { color: var(--danger); }

/* ---------- table ---------- */
.table-wrap {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: auto; -webkit-overflow-scrolling: touch; max-height: calc(100vh - 210px);
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 5; background: #fafbfd;
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text3);
  padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td {
  padding: 0; border-bottom: 1px solid #f1f3f6; vertical-align: middle;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
tbody tr.out td { background: #fffaf7; }
tbody tr.out:hover td { background: #fff6f1; }

td input, td select {
  width: 100%; border: 0; background: transparent; padding: 9px 8px;
  font-size: 13px; color: var(--text); font-family: inherit; border-radius: 6px;
  min-width: 0;
}
td input:focus, td select:focus {
  outline: 2px solid #c7d9ff; background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .06);
}
td.num input { text-align: right; }
td.num { text-align: right; padding: 9px 10px; font-variant-numeric: tabular-nums; font-family: var(--mono); }
td.mid { text-align: center; padding: 9px 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.amt { text-align: right; padding: 9px 10px; color: var(--text2); font-variant-numeric: tabular-nums; }
.c-date input { width: 118px; }
.c-kind select { width: 62px; }
.c-name input { min-width: 132px; }
.c-spec input { min-width: 88px; }
.c-unit input { width: 48px; text-align: center; }
.c-loc input { min-width: 110px; }
.c-qty input { width: 62px; }
.c-price input { width: 74px; }
.c-sup input { min-width: 110px; }
.c-exp input { width: 118px; }
.c-note input { min-width: 130px; }
/* 赠品：行内勾选列（默认隐藏，可在「列」里打开）+ 商品名旁的小标记 */
td.c-gift { text-align: center; }
td.c-gift input { width: 16px; height: 16px; accent-color: var(--primary); }
.gifttag {
  display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px;
  background: var(--warn-soft); color: var(--warn); font-size: 10.5px;
  line-height: 15px; vertical-align: middle;
}
.c-op { width: 92px; }

.opbtn {
  border: 0; background: transparent; color: var(--text3); cursor: pointer;
  font-size: 12px; padding: 6px 6px; border-radius: 6px; font-family: inherit;
}
.opbtn:hover { background: #f1f3f7; color: var(--danger); }

.rowbtn { border: 0; background: #f3f5f9; color: var(--text2); cursor: pointer; padding: 5px 9px; border-radius: 7px; font-size: 12px; font-family: inherit; margin-right: 4px; }
.rowbtn:hover { background: #e9edf5; }

/* ---------- 分组行 / 列设置 ---------- */
tr.grouprow td {
  background: #f7f9fc; padding: 7px 10px; font-size: 11.5px; font-weight: 600;
  color: var(--text2); border-bottom: 1px solid var(--line); position: sticky; left: 0;
}
tr.grouprow td .gc { color: var(--text3); font-weight: 500; margin-left: 6px; }
/* 分组行 / 合计行里的金额、件数：数字统一等宽 */
.gc { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.colmenu {
  position: absolute; right: 0; top: 34px; z-index: 25; min-width: 178px;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .14); padding: 7px; max-height: 340px; overflow: auto;
}
.colmenu label {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.colmenu label:hover { background: #f4f6fa; }
.colmenu input { width: 15px; height: 15px; accent-color: var(--primary); }
.toolbar { position: relative; }

.c-cat input, .c-tag input { min-width: 132px; }
.c-net input { width: 86px; }

.unitprice { font-size: 11px; color: var(--text3); }

.chip {
  display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 550;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.purple { background: var(--purple-soft); color: var(--purple); }
.chip.blue { background: var(--primary-soft); color: var(--primary); }
.chip.gray { background: #f1f3f7; color: var(--text2); }

.best td { background: #f5f9ff !important; }

/* ---------- misc ---------- */
.empty {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px 22px; text-align: center;
}
.empty .big { font-size: 30px; color: #ccd2dc; margin-bottom: 8px; }
.empty .t { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.empty .d { font-size: 12.5px; color: var(--text3); line-height: 1.7; }

.footnote {
  margin-top: 12px; font-size: 11.5px; color: var(--text3); text-align: center; line-height: 1.7;
}

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 8px; }
.toolbar .hint { font-size: 12px; color: var(--text3); }
.toolbar select, .toolbar input {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  height: 30px; padding: 0 8px; font-size: 12.5px; color: var(--text2); font-family: inherit;
}

/* ---------- sheet ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(18, 22, 30, .38); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--card); width: 100%; max-width: 520px;
  border-radius: 16px 16px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto; animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(14px); opacity: .6; } }
.sheet h3 { margin: 2px 0 12px; font-size: 16px; font-weight: 650; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fafbfd; border-radius: 9px;
  padding: 9px 10px; font-size: 14px; color: var(--text); font-family: inherit;
}
.field input:focus, .field select:focus { outline: 0; border-color: #9dbcff; background: #fff; }
.field .seg { display: flex; gap: 6px; }
.field .seg button {
  flex: 1; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fafbfd;
  color: var(--text2); font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.field .seg button.on { background: var(--text); border-color: var(--text); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.sheet-acts { display: flex; gap: 9px; margin-top: 4px; }
.sheet-acts .btn { flex: 1; height: 44px; border-radius: 11px; font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 12px);
  background: rgba(22, 24, 29, .92); color: #fff; padding: 9px 16px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .head h1 { font-size: 17.5px; }
  .btn { height: 32px; padding: 0 11px; }
}

/* ---------- 套组（合并下单）表头 ---------- */
.ordrow td { background: #f7f8fb; border-top: 1px solid var(--line); padding: 7px 10px !important; }
.ordline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ordtag {
  background: #e8eeff; color: #2f5fd0; font-size: 11px; padding: 2px 7px;
  border-radius: 6px; letter-spacing: .5px; white-space: nowrap;
}
.ordname {
  border: 0; border-bottom: 1px dashed transparent; background: transparent;
  font-size: 13.5px; font-weight: 650; color: var(--text); font-family: inherit;
  padding: 2px 2px; min-width: 150px; max-width: 100%;
}
.ordname:hover { border-bottom-color: #c9d2e3; }
.ordname:focus { outline: 0; border-bottom-color: #9dbcff; background: #fff; }
.ordmeta { font-size: 11.5px; color: var(--text3); white-space: nowrap; }
.ordsum { font-size: 11.5px; color: var(--text2); white-space: nowrap; }
.ordsum b { color: var(--text); font-size: 12.5px; }
.ordtotal {
  width: 74px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 11.5px; padding: 2px 6px; font-family: inherit; color: var(--text2);
}
.ordtotal:focus { outline: 0; border-color: #9dbcff; color: var(--text); }
.ordrow .rowbtn { margin-left: auto; }

/* ---------- 顶部提示条 ---------- */
.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff8e8; border: 1px solid #f3e0b5; color: #8a6415;
  padding: 9px 12px; border-radius: 11px; font-size: 12.5px; margin-bottom: 12px;
}
.notice span { flex: 1; min-width: 180px; line-height: 1.5; }

/* 套组列窄一点 */
.c-grp { min-width: 120px; }
.c-grp input { font-size: 12px; color: var(--text2); }

/* =========================================================
   v4：级联类目 / 规格 / 出库 / 补货
   ========================================================= */

/* ---------- 级联选择（类目 / 渠道 / 位置） ---------- */
.catpick { display: block; }
.catpick-row { display: flex; gap: 6px; flex-wrap: wrap; }
.catpick-row select {
  flex: 1 1 0; min-width: 92px; border: 1px solid var(--line); background: #fafbfd;
  border-radius: 9px; height: 38px; padding: 0 8px; font-size: 13.5px;
  color: var(--text); font-family: inherit;
}
.catpick-row select:focus { outline: 0; border-color: #9dbcff; background: #fff; }
.catpick-row select:disabled { color: var(--text3); background: #f4f5f8; }

/* 新增下一级 */
.pathadd { display: flex; gap: 6px; margin-top: 6px; }
.pathadd-in {
  flex: 1; min-width: 0; border: 1px dashed #d7dde9; background: #fff; border-radius: 8px;
  height: 32px; padding: 0 9px; font-size: 12.5px; font-family: inherit; color: var(--text);
}
.pathadd-in:focus { outline: 0; border-color: #9dbcff; border-style: solid; }
.pathadd-btn {
  flex: 0 0 auto; width: 34px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: #f6f8fc; color: var(--text2); font-size: 16px; line-height: 1; cursor: pointer;
  font-family: inherit;
}
.pathadd-btn:hover { background: #eaeff8; color: var(--primary); }

/* 表格里的类目按钮 */
td.c-cat { padding: 6px 8px; }
.catbtn {
  border: 0; background: transparent; text-align: left; cursor: pointer; font-family: inherit;
  font-size: 12.5px; color: var(--text2); padding: 3px 0; white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; display: block;
}
.catbtn:hover { color: var(--primary); }
.catbtn.empty { color: #c4cad4; }

/* ---------- 规格三件套 ---------- */
.spec-box { background: #f7f9fc; border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px 4px; }
.spec-box .lab { font-size: 11.5px; color: var(--text3); margin-bottom: 5px; }
.spec-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; color: var(--text2); }
.spec-line input {
  width: 62px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 7px 8px; font-size: 13.5px; text-align: center; font-family: inherit; color: var(--text);
}
.spec-line input.wide { width: 74px; }
.spec-line input.narrow { width: 62px; }
.spec-line select {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; height: 34px;
  padding: 0 4px; font-size: 13.5px; font-family: inherit; color: var(--text);
}
.spec-preview {
  font-size: 12px; color: var(--primary); background: var(--primary-soft);
  border-radius: 8px; padding: 6px 9px; margin: 2px 0 8px; line-height: 1.5;
}
.spec-preview b { font-weight: 650; }
.spec-preview .dim { color: var(--text3); }

/* ---------- 库存页 ---------- */
td.c-bal { text-align: right; padding: 8px 10px; }
.bal-main { font-size: 15px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.bal-main small { font-size: 11px; font-weight: 500; color: var(--text3); margin-left: 2px; }
.bal-sub { font-size: 10.5px; color: var(--text3); margin-top: 1px; }
.bal-zero .bal-main { color: var(--danger); }

td.c-act { padding: 6px 8px; white-space: nowrap; }
.actbtn {
  border: 1px solid var(--line); background: #fff; color: var(--text2); cursor: pointer;
  padding: 4px 9px; border-radius: 7px; font-size: 12px; font-family: inherit; margin-right: 4px;
}
.actbtn:hover { background: #f2f5fa; }
.actbtn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.actbtn.done { color: var(--text3); }

.openline { font-size: 10.5px; color: var(--warn); margin-top: 2px; }

/* ---------- 订单折叠 ---------- */
.ordrow td { background: #f6f8fc; padding: 0 !important; border-top: 1px solid var(--line); }
.ordline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; }
.ordcaret {
  border: 0; background: #e5eaf4; color: #4a5568; width: 20px; height: 20px;
  border-radius: 6px; cursor: pointer; font-size: 11px; line-height: 1; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.ordcaret:hover { background: #d8e0ee; }
.ordtag {
  background: #e8eeff; color: #2f5fd0; font-size: 10.5px; padding: 2px 6px;
  border-radius: 5px; white-space: nowrap; font-weight: 600;
}
.ordname {
  border: 0; border-bottom: 1px dashed transparent; background: transparent;
  font-size: 13px; font-weight: 650; color: var(--text); font-family: inherit;
  padding: 1px 2px; min-width: 120px; max-width: 240px;
}
.ordname:hover { border-bottom-color: #c9d2e3; }
.ordname:focus { outline: 0; border-bottom-color: #9dbcff; background: #fff; }
.ordmeta { font-size: 11px; color: var(--text3); white-space: nowrap; }
.ordsum { font-size: 11px; color: var(--text2); white-space: nowrap; }
.ordsum b { color: var(--text); font-size: 12.5px; }
.ordtotal {
  width: 70px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 11px; padding: 2px 5px; font-family: inherit; color: var(--text2);
}
.ordtotal:focus { outline: 0; border-color: #9dbcff; color: var(--text); }
.ordline .rowbtn { margin-left: auto; }
tr.kid td:first-child { box-shadow: inset 3px 0 0 #dfe6f2; }

/* ---------- 补货 ---------- */
.refill-hero {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.refill-hero .t { font-size: 13.5px; font-weight: 650; margin-bottom: 3px; }
.refill-hero .d { font-size: 12px; color: var(--text3); line-height: 1.7; }
.rate { font-size: 11px; color: var(--text3); }
.warnrow td { background: #fffaf7; }

/* ---------- 顶部主操作 ---------- */
.head-acts .btn.out { background: #fff; color: var(--danger); border-color: #f2d3cf; }

/* ---------- 提示块 ---------- */
.tip {
  background: #f0f6ff; border: 1px solid #dbe8ff; color: #2c4a7c; border-radius: 10px;
  padding: 8px 11px; font-size: 12px; line-height: 1.65; margin-bottom: 10px;
}
.tip b { color: #1c3a6b; }
.tip.warn { background: #fff8e8; border-color: #f3e0b5; color: #8a6415; }

/* 批量修改：勾选列 + 底部操作条 + 预览框 */
table.lg th.c-chk { width: 34px; padding: 0; text-align: center; }
table.lg td.c-chk { width: 34px; padding: 0; text-align: center; }
table.lg td.c-chk input, table.lg th.c-chk input {
  width: 16px; height: 16px; cursor: pointer; margin: 0; accent-color: var(--accent);
}
.batchbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 8px; background: #f0f6ff; border: 1px solid #dbe8ff; border-radius: 10px;
}
.batchbar .batchinfo { font-size: 13px; color: #2c4a7c; }
.batchbar .batchinfo b { font-size: 15px; }
.batchbar .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.batchbar .btn:disabled { opacity: .5; cursor: not-allowed; }
.prev-box {
  max-height: 160px; overflow: auto; background: #f7f8fa; border: 1px solid #eef0f4;
  border-radius: 8px; padding: 8px 10px;
}
.prev-row { font-size: 12.5px; color: var(--text); padding: 3px 0; border-bottom: 1px solid #f0f2f5; }
.prev-row:last-child { border-bottom: 0; }
.prev-row.dim { color: var(--text3); }

/* 表格里的小字说明 */
.sub2 { font-size: 10.5px; color: var(--text3); font-weight: 400; }

/* 台账里的结存列 */
td.c-stk { text-align: right; padding: 9px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.c-stk b { font-weight: 650; }

td.c-op { white-space: nowrap; min-width: 88px; }

/* ---------- 通用 flex / 小屏适配 ---------- */
.flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar { flex-wrap: wrap; row-gap: 6px; }

@media (max-width: 620px) {
  .head { flex-wrap: wrap; }
  .head-acts { width: 100%; }
  .head-acts .btn { flex: 1 1 0; }
  .ordname { max-width: 140px; }
  .ordmeta { display: none; }
  .catpick-row select { min-width: 74px; height: 36px; font-size: 13px; }
  .spec-line { font-size: 12.5px; }
  .spec-line input { width: 54px; }
}

/* =========================================================
   v5：图片 / 标签 / 封存 / 总价 / 选项设置
   ========================================================= */

/* 图片缩略图 */
td.c-photo, .c-photo { padding: 5px 6px !important; width: 46px; }
.thumbbtn {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line);
  background: #f6f8fc; padding: 0; overflow: hidden; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; color: #b9c1cf; font-size: 15px; font-family: inherit;
  vertical-align: middle; flex: 0 0 auto;
}
.thumbbtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbbtn.empty { border-style: dashed; }
.thumbbtn:hover { border-color: #9dbcff; color: var(--primary); }

.pcell { display: flex; align-items: center; gap: 8px; }
  .stock-cards { display: flex; flex-direction: column; gap: 18px; }
  .card-group { min-width: 0; }
  .card-gtitle {
    display: flex; align-items: center; gap: 6px; margin: 0 2px 10px;
    font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer;
  }
  .card-gtitle .tri { color: var(--text3); font-size: 11px; }
  .card-gtitle .gc { color: var(--text3); font-weight: 500; margin-left: 2px; }
  .card-gtitle.sub { font-weight: 500; padding-left: 14px; }
  .card-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-bottom: 6px;
  }
  @media (max-width: 1100px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 820px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 540px) {
    .card-grid { grid-template-columns: 1fr; }
  }
  .stock-card {
    background: var(--card); border: 1px solid #e9ecf1; border-radius: 12px;
    padding: 11px 13px 10px; display: flex; flex-direction: column; gap: 9px; min-width: 0;
  }
  .stock-card:hover { border-color: #c7d6f5; box-shadow: 0 2px 10px rgba(20, 60, 140, .06); }
  .stock-card.archivedrow { opacity: .82; }
  .sc-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
  .sc-top .thumbbtn { width: 42px; height: 42px; border-radius: 8px; font-size: 17px; }
  .sc-main { min-width: 0; flex: 1 1 auto; }
  .sc-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc-name .chip { vertical-align: 1px; }
  .sc-sub { font-size: 11px; color: var(--text3); margin-top: 3px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc-open { font-size: 10px; color: var(--warn); margin-top: 3px; line-height: 1.35; }
  .sc-meta { display: flex; gap: 7px; min-width: 0; }
  .sc-cell { flex: 1 1 0; background: #f7f8fa; border-radius: 8px; padding: 7px 9px; text-align: center; min-width: 0; overflow: hidden; }
  .sc-cell .k { font-size: 10px; color: var(--text3); }
  .sc-cell .v { font-size: 13.5px; font-weight: 600; margin-top: 2px; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .sc-cell .v small { font-size: 10px; color: var(--text3); font-weight: 400; margin-left: 2px; }
  .sc-cell .v .up { display: block; font-size: 10px; color: var(--text3); font-weight: 400; margin-top: 1px; }
  .sc-cell.st .v { white-space: normal; }
  .sc-cell.st .v .tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; line-height: 1.5; }
  .sc-cell.st .v .tag.danger { background: #fdecea; color: #c62828; }
  .sc-cell.st .v .tag.warn { background: #fff4e5; color: #b45309; }
  .sc-cell.st .v .tag.ok { background: #e8f5e9; color: #2e7d32; }
  .sc-cell.st .v .tag.none { background: #eef1f6; color: #7a8494; }
  .sc-safety { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .sc-safety .lbl { font-size: 10.5px; color: var(--text3); }
  .sc-safety input {
    width: 34px; height: 18px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text1);
    background: transparent; border: none; border-bottom: 1px solid #d5dae2; border-radius: 0;
    padding: 0; outline: none;
  }
  .sc-safety input:focus { border-bottom-color: var(--accent); }
  .sc-safety input::placeholder { color: #c2c9d4; font-weight: 400; }
  .sc-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .sc-act .actbtn { font-size: 11px; padding: 4px 10px; }

  .alert-badges { display: flex; gap: 10px; margin-bottom: 14px; }
  .abadge { flex: 1 1 0; max-width: 280px; display: flex; align-items: center; gap: 6px; justify-content: center; padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
  .abadge b { font-size: 17px; }
  .abadge.refill { background: #fff4e5; color: #b45309; border: 1px solid #f5d9b0; }
  .abadge.expiry { background: #fdecea; color: #c62828; border: 1px solid #f5c6c6; }
  .abadge.refill:hover { background: #ffedd5; }
  .abadge.expiry:hover { background: #fbdcdc; }
  .alert-sec { margin-bottom: 22px; scroll-margin-top: 70px; }
  .alert-sec-h { font-size: 15px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
  .alert-sec-h .asub { font-size: 12px; font-weight: 400; color: var(--text3); }
  .alert-sec-tool { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); margin-bottom: 8px; }
  .alert-sec-tool select { font-size: 12px; padding: 3px 6px; }
  .alert-empty { padding: 18px; text-align: center; color: var(--text3); font-size: 13px; background: #f7f8fa; border-radius: 10px; }
  .exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 1100px) { .exp-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 720px) { .exp-grid { grid-template-columns: 1fr; } }
  .exp-card {
    background: var(--card); border: 1px solid #e9ecf1; border-radius: 12px;
    padding: 11px 13px 10px; display: flex; flex-direction: column; gap: 9px; min-width: 0;
    border-top: 3px solid #dfe3e9;
  }
  .exp-card:hover { border-color: #c7d6f5; box-shadow: 0 2px 10px rgba(20, 60, 140, .06); }
  .exp-card.danger { border-top-color: #e24b4a; }
  .exp-card.warn { border-top-color: #ef9f27; }
  .ec-badge { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
  .ec-badge.danger { background: #fdecea; color: #c62828; }
  .ec-badge.warn { background: #fff4e5; color: #b45309; }
  .ec-badge.ok { background: #eef1f6; color: #7a8494; }
  .ec-src { font-size: 11.5px; }
  .ec-src.blue { color: var(--accent); }
  .ec-src.gray { color: var(--text2); }
  .ec-loc { margin-left: auto; font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }

.pname { min-width: 0; }

/* 标签筛选条 */
.tagbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 2px 9px; }
.tagchip {
  border: 1px solid var(--line); background: var(--card); color: var(--text2);
  height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.tagchip.on { background: var(--text); border-color: var(--text); color: #fff; }
.tagchip:hover { border-color: #c3cddf; }

/* 标签编辑器 */
.tagbox { border: 1px solid var(--line); background: #fafbfd; border-radius: 10px; padding: 8px; }
.taglist { display: flex; gap: 6px; flex-wrap: wrap; min-height: 20px; }
.taglist .tagchip { background: #fff; }
.taglist .tagchip.on { background: var(--text); color: #fff; }
.tagbox .pathadd { margin-top: 8px; }

/* 图片选择 */
.photo-row { display: flex; align-items: center; gap: 8px; }
.photobtn {
  border: 1px dashed #c9d3e4; background: #fff; color: var(--text2); height: 38px;
  padding: 0 12px; border-radius: 9px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.photobtn:hover { border-color: #9dbcff; color: var(--primary); }
.photo-pv {
  width: 54px; height: 54px; border-radius: 9px; border: 1px solid var(--line);
  background: #f6f8fc; display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: 0 0 auto;
}
.photo-pv img { width: 100%; height: 100%; object-fit: cover; }
.photo-big {
  width: 100%; min-height: 150px; border-radius: 12px; border: 1px solid var(--line);
  background: #f7f9fc; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-big img { max-width: 100%; max-height: 260px; display: block; }

/* 出库选中的商品卡 */
.picked { margin-bottom: 11px; }
.pickbox {
  display: flex; gap: 10px; align-items: flex-start; background: #f6f8fc;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px;
}
.pickbox .thumbbtn { width: 46px; height: 46px; }

/* 封存 */
tr.archivedrow td { background: #f7f7f9; opacity: .82; }
tr.archivedrow .bal-main { color: var(--text3); }

/* 选项设置 */
.optblock { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.optblock:first-of-type { border-top: 0; }
.optlabel { font-size: 12.5px; font-weight: 650; color: var(--text); margin-bottom: 7px; }
.optlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.optchip {
  display: inline-flex; align-items: center; gap: 5px; background: #f4f6fa; border-radius: 8px;
  padding: 4px 6px 4px 9px; font-size: 12px; color: var(--text2);
}
.optchip small { color: var(--text3); font-size: 10.5px; }
.optchip button {
  border: 0; background: transparent; color: #b6bfcd; cursor: pointer; font-size: 14px;
  line-height: 1; padding: 0 1px; font-family: inherit;
}
.optchip button:hover { color: var(--danger); }

.req { color: var(--danger); }

/* 单价列 */
td.c-price { font-variant-numeric: tabular-nums; color: var(--text2); white-space: nowrap; }
td.c-tag { max-width: 210px; overflow: hidden; padding: 6px 8px; }
td.c-tag .catbtn { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.c-tag .chip { margin-right: 2px; }

/* =========================================================
   v6：拆封记录 / 套装摊分
   ========================================================= */
.field .hint { font-size: 11.5px; color: var(--text3); line-height: 1.65; margin-top: 6px; }
.field .hint b { color: var(--text2); }

.chkline {
  display: flex; align-items: center; gap: 7px; height: 38px;
  font-size: 13px; color: var(--text2); cursor: pointer;
}
.chkline input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* 拆封记录列表 */
.openrec {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text2);
}
.openrec:last-child { border-bottom: 0; }
.openrec b { color: var(--text); }

/* 套装摊分按钮 */
.ordline [data-spread] { color: var(--primary); border-color: #cddffd; }

/* ---------- 台账页搜索 ---------- */
.searchbar {
  display: flex; align-items: center; gap: 6px;
  margin: 0 2px 8px; padding: 0 10px;
  height: 36px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within { border-color: #9dbcff; box-shadow: 0 0 0 3px rgba(61,125,255,.1); }
.searchbar.on { border-color: #bfd4ff; background: #f7faff; }
.searchbar .sicon { font-size: 15px; color: var(--text3); line-height: 1; }
.searchbar input {
  flex: 1 1 auto; min-width: 0; height: 34px; border: 0; background: transparent;
  font-size: 13px; color: var(--text); font-family: inherit;
}
.searchbar input:focus { outline: 0; }
.searchbar input::-webkit-search-cancel-button { cursor: pointer; }
.searchbar .shits { font-size: 11.5px; color: var(--text3); white-space: nowrap; }
.searchbar .sclr {
  width: 20px; height: 20px; border: 0; border-radius: 50%; padding: 0;
  background: #e3e8f2; color: var(--text2); font-size: 14px; line-height: 18px;
  cursor: pointer; flex: 0 0 auto;
}
.searchbar .sclr:hover { background: #d5dced; }
.empty.small { padding: 26px 10px; }
.empty.small .t { font-size: 13.5px; }

/* ---------- 二级类目分组行 ---------- */
tr.grouprow.sub td {
  padding: 5px 10px 5px 26px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  border-bottom: 1px dashed var(--line);
}
tr.grouprow.sub .gc { margin-left: 6px; }

/* 比价明细展开行 */
tr.cmpdet > td { background: rgba(127, 127, 127, .06); padding: 8px 12px 10px 22px; }
.cmpdetline { padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; color: var(--text2); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.cmpdetline:last-child { border-bottom: 0; }
.cmpno { color: var(--text3); margin-right: 2px; }

/* 台账时间分组行（按月 / 按年折叠） */
tr.lgrow td {
  background: #eef2f8; padding: 6px 10px !important; font-size: 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; position: sticky; left: 0; color: var(--text2);
}
tr.lgrow td b { color: var(--text); font-weight: 650; margin-right: 2px; }
tr.lgrow td .gc { color: var(--text3); font-weight: 500; margin-left: 8px; }
tr.lgrow:hover td { background: #e6ecf6; }
tr.lgrow .ordcaret { margin-right: 7px; }
/* 库存类目折叠三角 */
.lgtri { display: inline-block; width: 12px; color: var(--text3); }
tr.grouprow { cursor: pointer; }
tr.grouprow:hover td { background: #eef2f8; }
/* 工具栏里的小下拉 */
.selsm {
  height: 30px; font-size: 12.5px; padding: 0 6px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-family: inherit;
}

/* =========================================================
   v6.9 云端同步：状态条 / 登录遮罩 / 账号面板
   ========================================================= */

/* 页头下方那行同步状态 */
.syncline {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 3px; padding: 1px 7px 1px 6px; border-radius: 20px;
  font-size: 10.5px; line-height: 16px; color: var(--text3);
  cursor: pointer; user-select: none; background: rgba(127, 127, 127, .07);
}
.syncline:active { background: rgba(127, 127, 127, .14); }
.syncline .sdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.syncline.s-synced { color: var(--ok); }
.syncline.s-syncing { color: var(--primary); }
.syncline.s-dirty { color: var(--warn); }
.syncline.s-offline { color: var(--warn); }
.syncline.s-error { color: var(--danger); }
.syncline.s-local { color: var(--text3); }

/* 登录遮罩 */
.authgate {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(245, 246, 248, .92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.ag-card {
  width: 100%; max-width: 348px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 22px 16px; text-align: center;
  box-shadow: 0 10px 44px rgba(16, 24, 40, .13);
}
.ag-logo { font-size: 42px; line-height: 1; }
.ag-card h2 { margin: 10px 0 7px; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.ag-sub { margin: 0 0 20px; font-size: 12.5px; color: var(--text2); line-height: 1.75; }
.ag-btn {
  display: block; width: 100%; height: 46px; margin-bottom: 10px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--text);
}
.ag-btn.wx { background: #07c160; border-color: #07c160; color: #fff; }
.ag-btn.wb { background: var(--text); border-color: var(--text); color: #fff; }
.ag-btn:active { transform: translateY(1px); }
.ag-skip {
  border: 0; background: transparent; color: var(--text3); font-size: 12.5px;
  cursor: pointer; padding: 9px 4px; font-family: inherit; text-decoration: underline;
}
.ag-err { color: var(--danger); font-size: 12.5px; min-height: 16px; margin-top: 4px; line-height: 1.5; }
.ag-hint { font-size: 11px; color: var(--text3); margin-top: 6px; line-height: 1.6; }

/* 账号与同步面板 */
.syncpanel {
  position: fixed; inset: 0; z-index: 260; background: rgba(18, 22, 30, .38);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.sp-card {
  width: 100%; max-width: 324px; background: var(--card); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .25); overflow: hidden;
}
.sp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px; font-size: 14.5px; font-weight: 650;
}
.sp-x {
  border: 0; background: transparent; font-size: 15px; color: var(--text3);
  cursor: pointer; padding: 4px 6px; font-family: inherit; line-height: 1;
}
.sp-body { padding: 0 16px 4px; }
.sp-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px; color: var(--text3);
}
.sp-row:last-child { border-bottom: 0; }
.sp-row b {
  color: var(--text); font-weight: 600; max-width: 62%; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-acts { display: flex; gap: 8px; padding: 12px 16px 2px; }
.sp-acts .btn { flex: 1 1 0; height: 38px; }
.sp-note { padding: 8px 16px 15px; font-size: 11.5px; color: var(--text3); line-height: 1.65; }

/* =========================================================
   手机端（<= 640）：能单手填完一笔
   ========================================================= */
@media (max-width: 640px) {
  /* iOS 上输入框小于 16px 会触发页面自动放大，导致填表时画面乱跳 */
  td input, td select, .ordname, .ordtotal,
  .field input, .field select, .field textarea,
  .searchbar input, .pathadd-in, .spec-line input, .spec-line select {
    font-size: 16px;
  }
  .wrap { padding: 0 8px 80px; }
  .head { margin: 0 -8px; padding: 10px 8px 6px; }
  .head h1 { font-size: 17px; }
  .head-acts { gap: 6px; }
  .head-acts .btn { height: 38px; font-size: 13.5px; }
  .tabs { gap: 5px; padding: 2px 0 8px; }
  .tabs button { font-size: 12.5px; padding: 0 11px; }
  /* 手机地址栏会伸缩，用 dvh 才不会切掉最后一行 */
  .table-wrap { max-height: calc(100dvh - 230px); border-radius: 10px; }
  td input, td select { padding: 11px 8px; }
  thead th { padding: 8px 8px; }
  .sheet { border-radius: 16px 16px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); }
  .sheet-acts { position: sticky; bottom: 0; background: var(--card); padding-top: 6px; }
  .ag-card { padding: 22px 18px 12px; border-radius: 18px; }
  .stat .v { font-size: 17px; }
}

@supports (padding: env(safe-area-inset-top)) {
  .head { padding-top: calc(12px + env(safe-area-inset-top)); }
  @media (max-width: 640px) {
    .head { padding-top: calc(10px + env(safe-area-inset-top)); }
  }
}

/* =========================================================
   v6.10 出库行的只读格（渠道 / 位置 / 类目 / 规格 / 有效期 / 订单）
   内容全部来自入库，这里不给改，只留一个小锁标记
   ========================================================= */
td.lockcell { color: var(--text2); cursor: default; padding: 9px 8px; }
td.lockcell .lockv { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
td.lockcell.c-sup .lockv, td.lockcell.c-loc .lockv { min-width: 84px; }
td.lockcell.c-exp .lockv { min-width: 88px; }
td.lockcell .lockv.dim { color: var(--text3); }
td.lockcell .lk {
  font-style: normal; font-size: 9px; line-height: 1; margin-left: 3px;
  color: var(--text3); opacity: .3; vertical-align: 1px; user-select: none;
}
td.lockcell:hover .lk { opacity: .6; }
tr.out td.lockcell { background: rgba(127, 127, 127, .028); }
.field input:disabled, .field select:disabled {
  background: rgba(127, 127, 127, .06); color: var(--text3); cursor: not-allowed;
}


  /* ---------- 补丁：商品列横向滚动时固定 + 保存后行高亮 ---------- */
  .table-wrap th.c-pin, .table-wrap td.c-pin {
    position: sticky; left: 0; z-index: 4; background: var(--card);
    box-shadow: inset -1px 0 0 #eef1f6;
  }
  .table-wrap thead th.c-pin { z-index: 9; background: #fafbfd; }
  .table-wrap tbody tr:hover td.c-pin { background: #fbfcfe; }
  .table-wrap tbody tr.out td.c-pin { background: #fffaf7; }
  .table-wrap tbody tr.out:hover td.c-pin { background: #fff6f1; }
  .table-wrap.scrolled th.c-pin, .table-wrap.scrolled td.c-pin {
    box-shadow: inset -1px 0 0 #eef1f6, 12px 0 10px -10px rgba(15, 23, 42, .32);
  }
  .table-wrap tbody tr.rowflash td { background: #fff7e0; }
  .table-wrap tbody tr.rowflash td.c-pin { background: #fff7e0; }

  /* ---------- 补丁：库存页「有效期」= 最早到期批次，点开看全部批次 ---------- */
  .table-wrap td.c-expv { cursor: pointer; white-space: nowrap; }
  .table-wrap td.c-expv:hover b { text-decoration: underline dotted; }
  .table-wrap td.c-expv .unitprice { font-size: 11px; color: var(--text3); }
  .btbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0 10px; }
  .btbl th, .btbl td { padding: 7px 8px; border-bottom: 1px solid #eef1f6; text-align: left; }
  .btbl th { font-weight: 500; color: var(--text3); font-size: 11.5px; }
  .btbl td.num { text-align: right; white-space: nowrap; }
  .btbl input[type=date] { width: 132px; }

  /* ---------- 补丁：流水台账「数量」后面带单位（与「结存」列一致） ---------- */
  .table-wrap td.c-qu { min-width: 92px; padding-right: 6px; }
  .table-wrap td.c-qu .qu-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 1px; }
  .table-wrap td.c-qu .qu-wrap input { flex: 1 1 auto; width: auto; min-width: 30px; padding: 9px 3px; }
  .table-wrap td.c-qu .qu {
    flex: none; font-style: normal; font-size: 11px; line-height: 1;
    color: var(--text3); white-space: nowrap; padding: 0 2px;
  }

  /* ---------- 补丁：赠品小标不再撑出商品格、盖住「规格」 ----------
     定位容器放在内层 .nm 上：td.c-name 在台账里同时是 .c-pin（sticky），
     直接给 td 加 position 会把固定列顶掉 */
  .table-wrap td.c-name .nm { position: relative; display: block; }
  .table-wrap td.c-name.hasgift input { padding-right: 24px; }
  .table-wrap td.c-name .nm .gifttag {
    position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
    margin-left: 0; z-index: 1;
  }

  /* ---------- 补丁：规格列别占那么宽 ----------
     规格内容是 .catbtn（max-width:190px），表格自动布局会按它的最大宽度分列，
     撑出很宽的一条空列。这里把列和按钮都压到 84px，长的用省略号 + 悬停看全名。 */
  .table-wrap td.c-spec { width: 84px; }
  .table-wrap td.c-spec .catbtn { max-width: 84px; }

  /* ---------- 补丁：入库 / 出库表单新版式 ---------- */
  .grid3 { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 9px; }
  .sheet-acts { position: sticky; bottom: 0; z-index: 3; background: var(--card); padding-top: 8px; }
  .moretoggle {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px;
    font-size: 12px; color: var(--text2); cursor: pointer; margin: 12px 0 6px;
  }
  .moretoggle:hover { background: #fafbfd; }
  .moretoggle .st { font-size: 11.5px; color: var(--text3); flex: none; }
  .morebox { display: none; }
  .morebox.open { display: block; }

  /* ---------- 补丁：入库表单「标签左置 + 矮输入框」（方案 C） ----------
     弹窗加宽到 720px、输入框 30px 高 / 12.5px 字，标签移到左侧 96px；
     输入框因此横向拉长到约 580px，长内容不用再靠省略号。 */
  .sheet { max-width: 720px; }
  .sheet h3 { font-size: 15px; margin: 0 0 8px; }
  .field { margin-bottom: 7px; }
  .field label { font-size: 11px; margin-bottom: 2px; }
  .field input, .field select, .frow input, .frow select {
    height: 30px; padding: 0 8px; font-size: 12.5px; border-radius: 6px;
  }
  .field textarea { padding: 6px 8px; font-size: 12.5px; border-radius: 6px; }
  .photobtn { height: 30px; font-size: 12.5px; border-radius: 6px; }

  .frow { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
  .frow > .fl { flex: 0 0 96px; text-align: right; font-size: 11.5px; line-height: 1.3; color: var(--text3); }
  .frow > .fr { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .frow > .fr > input, .frow > .fr > select, .frow > .fr > div { flex: 1 1 0; min-width: 0; }
  .frow > .fr > .chkline, .frow > .fr > .photo-row { flex: 1 1 auto; }
  .frow > .fr > .w-qty { flex: 0 0 84px; text-align: center; font-size: 14px; }
  .frow > .fr > .w-unit { flex: 0 0 82px; }
  .frow > .fr > .w-date { flex: 0 0 134px; }
  .frow > .fr > .w-pao { flex: 0 0 70px; text-align: center; }
  .frow > .fr > .w-paounit { flex: 0 0 78px; }
  .frow > .fr > .w-gtotal { flex: 0 0 132px; }
  .frow .frl { flex: none; font-size: 11px; color: var(--text3); }
  .qrow #o-qty { height: 36px; }
  .formc .pickw > * { width: 100%; max-width: none; }
  .formc > .chkline { margin: 0 0 6px 105px; height: 26px; font-size: 12px; }
  .formc .spec-preview { margin-left: 105px; }
  .frow .chkline { height: 30px; font-size: 12px; }
  .formc .frow > .fr > .spec-box { flex: 1 0 100%; padding: 8px 10px 2px; }
  .formc .frow > .fr > .tagbox { flex: 1 0 100%; }
  .formc .spec-line { font-size: 12.5px; }
  .formc .spec-line input { width: 62px; height: 30px; padding: 0 6px; font-size: 12.5px; border-radius: 6px; }
  .formc .spec-line select { height: 30px; font-size: 12.5px; border-radius: 6px; }
  .formc .hint { margin: 0 0 6px; }
  /* 出库：数量 + 快捷按钮一行 */
  .qrow { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
  .qrow input { width: 92px; flex: none; }
  .qrow .btn { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  /* 出库：可输入的商品选择列表 */
  .opick { max-height: 208px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
  .opick-item {
    display: flex; justify-content: space-between; gap: 10px; width: 100%;
    border: 0; background: transparent; text-align: left; padding: 9px 11px;
    font-size: 13px; font-family: inherit; color: var(--text); cursor: pointer;
    border-bottom: 1px solid #f1f3f6;
  }
  .opick-item:last-child { border-bottom: 0; }
  .opick-item:hover { background: #f5f8ff; }
  .opick-item.on { background: #eef4ff; }
  .opick-item .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .opick-item .r { color: var(--text3); font-size: 12px; white-space: nowrap; flex: none; }
  .opick-empty { padding: 10px 11px; font-size: 12px; color: var(--text3); }

  /* ---------- 补丁：商品格两行（名称 + 规格·位置），行高不增加 ---------- */
  .table-wrap td.c-name .nm input { font-size: 12.5px; line-height: 16px; padding: 2px 8px; }
  .table-wrap td.c-name.hasgift .nm input { padding-right: 24px; }
  .table-wrap td.c-name .cnsub {
    font-size: 10.5px; line-height: 13px; color: var(--text3);
    padding: 0 8px 3px;
    /* 规格 / 位置 不再单列，全部跟在商品名下面：内容多就换行显示完整，不再用省略号 */
    white-space: normal; overflow: visible; word-break: break-all;
  }
  .table-wrap td.c-name .cnsub .dot { color: #c9ced8; padding: 0 3px; }

  /* ---------- 补丁：台账列宽按「内容需要」定死，别让某一列被撑变形 ----------
     原来 table-layout:auto，谁的内容长谁就抢宽度（商品 293px、类目 255px、位置 185px），
     规格只有 42px 的文字却被分到 100px 上下，看着又空又长。
     改成 fixed：每列一个固定宽度，多出来的空间全给「商品」列（规格 / 位置的小字要写得下）。 */
  table.lg { table-layout: fixed; width: 100%; min-width: 1444px; }
  table.lg .c-photo { width: 32px; }
  table.lg .c-date  { width: 120px; }
  table.lg .c-kind  { width: 62px; }
  /* 商品列：按内容写死（最长商品名约 282px + 左右内边距）。
     绝不能用 width:auto —— fixed 布局里 auto 列会被别的列挤到 0，商品名就整片看不见了 */
  table.lg .c-name  { width: 300px; }
  table.lg .c-qty   { width: 60px; }
  table.lg .c-stk   { width: 60px; }
  /* 总价：列宽跟「物品单价」一样（88px），整组金额列宽度统一 */
  table.lg .c-total { width: 88px; }
  /* 物品单价 / 产品单价：两列一样宽、一样右对齐 */
  table.lg .c-price { width: 88px; }
  table.lg .c-uprice { width: 88px; }
  table.lg .c-sup   { width: 76px; }
  table.lg .c-loc   { width: 120px; }
  table.lg .c-tag   { width: 72px; }
  table.lg .c-exp   { width: 96px; }
  table.lg .c-cat   { width: 126px; }
  table.lg .c-spec  { width: 60px; }
  table.lg .c-grp   { width: 100px; }
  table.lg td.c-qu  { min-width: 0; }
  table.lg .c-gift  { width: 42px; }
  table.lg .c-note  { width: 112px; }
  /* 操作列写死宽度：剩余空间只属于商品列，操作区不再剩一大片空白 */
  table.lg .c-op { width: 176px; }
  table.lg td.c-op { white-space: nowrap; }
  /* 总价按记账格式：¥ 紧贴数字（同一个字号、同一个颜色），整体右对齐；输入框照样能直接改。
     颜色跟「物品单价 / 产品单价」统一用 --text2，不在整行里冒出一块纯黑。 */
  table.lg td.c-total { color: var(--text2); white-space: nowrap; }
  table.lg td.c-total .mw { display: flex; align-items: center; justify-content: flex-end; width: 100%; }
  table.lg td.c-total .mw .cur {
    flex: none; font-style: normal; font-size: 13px; line-height: 1;
    color: var(--text2); padding: 0; margin: 0 2px 0 0;
  }
  table.lg td.c-total .mw input {
    flex: 1 1 auto; width: auto; min-width: 0; text-align: right;
    padding: 5px 1px 5px 0; font-variant-numeric: tabular-nums;
    color: var(--text2); background: transparent;
  }
  /* 正在编辑时才回到常规深色，平时和同组金额一起保持低调 */
  table.lg td.c-total .mw input:focus { color: var(--text); }
  /* 产品单价：¥0.069/抽，字号 / 对齐 / 颜色 / 宽度都照「物品单价」来 */
  table.lg td.c-uprice { color: var(--text2); }
  table.lg td.c-uprice .upu { font-size: 11px; color: var(--text3); margin-left: 1px; }
  /* 列宽定死之后，格子里的小控件一律撑满可用宽度，不许再把列顶开 */
  table.lg .c-date input,
  table.lg .c-price input, table.lg .c-exp input,
  table.lg .c-note input, table.lg .c-unit input,
  table.lg .c-qty input { width: 100%; min-width: 0; }
  table.lg td.c-qu .qu-wrap input, table.lg td.c-qu .qu-wrap .qu { width: auto; }
  table.lg .c-name input { width: 100%; min-width: 0; }
  table.lg .c-spec input { min-width: 0; }
  table.lg .c-spec .catbtn,
  table.lg .c-cat .catbtn,
  table.lg .c-loc .catbtn,
  table.lg .c-sup .catbtn { max-width: 100%; }
  table.lg td.lockcell.c-sup .lockv,
  table.lg td.lockcell.c-loc .lockv { min-width: 0; }
  table.lg td.lockcell.c-exp .lockv { min-width: 0; }
  table.lg td.c-op .rowbtn { margin-right: 3px; padding: 5px 8px; }
  table.lg td.c-op .rowbtn[data-outorder] { padding: 5px 6px; font-size: 11.5px; }

  /* ---------- 补丁：数字框不再显示上下箭头，直接输入 ---------- */
  input[type=number]::-webkit-outer-spin-button,
  input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  input[type=number] { -moz-appearance: textfield; appearance: textfield; }

  /* =========================================================
     补丁：彻底扁平化 —— 全部柔和阴影 → 1px 细线 + 纯色块
     ========================================================= */
  /* 1) 页面卡片：去阴影、加细边 */
  .stat, .table-wrap, .empty, .refill-hero, .ag-card, .sp-card, .menu, .colmenu {
    box-shadow: none !important;
  }
  .stat, .table-wrap, .empty, .refill-hero { border: 1px solid #e9ecf1; }
  .menu, .colmenu { border-color: #e4e8ef; }

  /* 2) 弹窗：白卡 + 1px 边，不要浮起来的影子 */
  .mask { background: rgba(17, 24, 39, .32); }
  .sheet {
    border: 1px solid #e6e9ef; border-bottom: 0;
    box-shadow: none; border-radius: 14px 14px 0 0;
  }
  .sheet h3 {
    padding-bottom: 9px; margin-bottom: 11px;
    border-bottom: 1px solid var(--line); letter-spacing: -.01em;
  }

  /* 3) 表单控件：白底 + 1px 边；聚焦只换边色，不画发光圈 */
  .field input, .field select, .field textarea,
  .frow input, .frow select, .frow textarea {
    background: #fff; border: 1px solid #e3e7ee; box-shadow: none;
  }
  .field input:focus, .field select:focus, .field textarea:focus,
  .frow input:focus, .frow select:focus, .frow textarea:focus {
    outline: 0; border-color: var(--primary); background: #fff; box-shadow: none;
  }
  .frow input::placeholder, .field input::placeholder { color: #b6bcc8; }

  /* 4) 台账单元格聚焦：不再画 2px 光圈 */
  td input:focus, td select:focus {
    outline: 0 !important; box-shadow: none !important; background: #f4f8ff;
  }

  /* 5) 按钮：扁平实色，按下不位移 */
  .btn { box-shadow: none; border-radius: 8px; }
  .btn:active { transform: none; }
  .btn.primary { background: var(--primary); border-color: var(--primary); }
  .btn.primary:hover { background: #1d55d0; border-color: #1d55d0; }

  /* 6) 折叠条：虚线改实线浅灰，像工具条而不是便签 */
  .moretoggle {
    border: 1px solid #e7eaf0; background: #fafbfc; border-radius: 8px;
    margin: 14px 0 8px; padding: 8px 10px; font-size: 11.5px; color: var(--text2);
  }
  .moretoggle:hover { background: #f4f6f9; }

  /* 7) 预览条 / 提示条：浅灰底 + 左侧色条，比整块浅蓝干净 */
  .spec-preview {
    background: #f7f8fa; border-left: 2px solid var(--primary); border-radius: 0 6px 6px 0;
    padding: 6px 10px; font-size: 11.5px; color: var(--text2); line-height: 1.55;
  }
  .tip {
    background: #f7f8fa; border: 0; border-left: 2px solid #c8d3e6;
    border-radius: 0 6px 6px 0; color: var(--text2);
    padding: 7px 10px; font-size: 11.5px; line-height: 1.6;
  }
  .tip b { color: var(--text); }

  /* 8) 底部按钮区：一条细分隔线，按钮扁一点 */
  .sheet-acts {
    border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px;
    background: var(--card);
  }
  .sheet-acts .btn { height: 40px; font-size: 14px; border-radius: 8px; }

  /* 9) 开封类别：短标题下拉 + 下面 11px 小字说明 */
  .frow select.omsel { flex: 0 0 176px; }
  #s-openhint, #e-openhint {
    font-size: 11px; line-height: 1.6; color: var(--text3);
    margin: 5px 0 0; padding: 0;
  }
  #s-openhint b, #e-openhint b { font-weight: 600; color: var(--text2); }

  /* 10) 套组「实付」：只能输数字；摊分按钮没填实付时灰掉 */
  .ordtotal { color: var(--text2); }
  .rowbtn.off, .rowbtn[disabled] { opacity: .42; cursor: not-allowed; }

  /* 11) 台账横向滚动时，固定列右侧那条黑影也换成细线 */
  .table-wrap.scrolled th.c-pin, .table-wrap.scrolled td.c-pin {
    box-shadow: inset -1px 0 0 #e2e6ee;
  }

  /* 12) 宽屏：弹窗居中成一张卡片，不再贴着屏幕底边 */
  @media (min-width: 760px) {
    .mask { align-items: center; padding: 24px; }
    .sheet {
      border-radius: 14px; border-bottom: 1px solid #e6e9ef;
      max-height: 86vh;
      box-shadow: none;
    }
  }

  /* =========================================================
     24. 台账版式：方案 C —— 密排 · 财务版
     行高 36px 上下、表头 10.5px 宽字距、数字等宽、收支用 ＋/−
     商品格仍然是「名称 + 规格·位置」两行，一行不多占，长名字不会被截
     ========================================================= */
  /* 24.1 表头：小一号 + 宽字距，像报表的栏目名 */
  table.lg thead th {
    font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
    color: var(--text3); padding: 8px 7px; background: #f8f9fb;
  }
  /* 24.2 表体：字号 12.5、行高 36 上下、分隔线更淡 */
  table.lg tbody td { font-size: 12.5px; border-bottom: 1px solid #eef1f5; }
  table.lg td input, table.lg td select { font-size: 12.5px; line-height: 16px; padding: 5px 7px; }
  table.lg td.num { padding: 5px 8px; }
  /* 24.3 不用斑马纹：行里混着月份带 / 套组行，nth-child 会把条纹错开，
     反而看着乱。改用更淡的横线 + 悬停整行变色（跟「精修版」一个思路） */
  table.lg tbody tr:hover td, table.lg tbody tr:hover td.c-pin { background: #f6f9ff; }
  /* 出库行：极淡的暖色，一眼能分出支出，又不抢斑马纹 */
  table.lg tbody tr.out td { background: #fffcf9; }
  table.lg tbody tr.out td.c-pin { background: #fffcf9; }
  table.lg tbody tr.out:nth-child(even) td { background: #fdf8f4; }
  table.lg tbody tr.out:nth-child(even) td.c-pin { background: #fdf8f4; }
  table.lg tbody tr.out:hover td, table.lg tbody tr.out:hover td.c-pin { background: #fff6ef; }
  /* 刚保存过的那一行仍然闪黄，优先级要盖过斑马纹 */
  table.lg tbody tr.rowflash td, table.lg tbody tr.rowflash td.c-pin { background: #fff7e0; }
  /* 24.4 数字列：等宽字体，小数点自然对齐 */
  table.lg td.c-date, table.lg td.c-qty, table.lg td.c-stk,
  table.lg td.c-total, table.lg td.c-price, table.lg td.c-uprice {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
  }
  table.lg td.c-date input, table.lg td.c-qty input, table.lg td.c-qty .qu,
  table.lg td.c-stk, table.lg td.c-price, table.lg td.c-uprice {
    font-size: 11.5px;
  }
  table.lg td.c-total .mw input { font-size: 11.5px; padding: 5px 1px 5px 0; }
  table.lg td.c-total .mw .cur { font-size: 11.5px; }
  /* 24.5 类型：跟类目一样是纯文字按钮 —— 没有下拉框、没有边框、没有底色，
     点一下就在「入库 / 出库」之间切换（只有两种，不需要再弹一层） */
  table.lg td.c-kind { padding: 0 3px; }
  table.lg .kindbtn {
    display: inline-flex; align-items: center; gap: 2px;
    border: 0; background: transparent; font-family: inherit; cursor: pointer;
    padding: 3px 4px; border-radius: 5px; white-space: nowrap;
    font-size: 11.5px; font-weight: 600; line-height: 16px;
    color: var(--primary);
  }
  table.lg .kindbtn .sg { font-size: 13px; line-height: 1; font-weight: 600; font-style: normal; }
  table.lg .kindbtn.out { color: var(--warn); }
  table.lg .kindbtn:hover { background: #eef3fd; }
  table.lg .kindbtn.out:hover { background: #fdf3ec; }
  table.lg .kindbtn:focus-visible { outline: 2px solid rgba(47, 111, 237, .35); outline-offset: 1px; }
  /* 24.6 商品格：名称一行、规格·位置一行，字号压小但整行更矮 */
  .table-wrap td.c-name .nm input { font-size: 12.5px; font-weight: 600; line-height: 17px; padding: 2px 7px 0; }
  .table-wrap td.c-name.hasgift .nm input { padding-right: 26px; }
  .table-wrap td.c-name .cnsub { font-size: 10px; line-height: 13px; padding: 0 7px 3px; }
  /* 24.7 月份分组带 */
  table.lg tbody tr.grouprow td {
    background: #f2f5fa; font-size: 11px; font-weight: 600; color: var(--text2);
    padding: 5px 9px; letter-spacing: .02em;
  }
  /* 24.8 套组行：压成一条，别比明细还高 */
  table.lg tbody tr.ordrow td { background: #f4f7fc; }
  .ordline { padding: 4px 9px; gap: 7px; }
  .ordname { font-size: 12.5px; padding: 1px 2px; }
  .ordmeta, .ordsum { font-size: 11px; }
  .ordsum b { font-size: 12px; }
  .ordtag { font-size: 10px; padding: 1px 5px; }
  .ordcaret { width: 18px; height: 18px; }
  .ordline .rowbtn { padding: 3px 7px; font-size: 11px; }
  .ordline .ordtotal { font-size: 11.5px; padding: 2px 4px; }
  /* 24.9 操作列：轻一点，不跟数字抢眼睛 */
  table.lg td.c-op .rowbtn { padding: 3px 7px; font-size: 11px; margin-right: 3px; }
  table.lg td.c-op .rowbtn[data-outorder] { padding: 3px 6px; font-size: 11px; }
  table.lg td.c-op .opbtn { font-size: 11px; padding: 3px 5px; }
  /* 24.10 类目 / 位置 / 渠道 / 标签的字号跟上表体 */
  table.lg td .catbtn { font-size: 11.5px; }
  table.lg td.c-tag .chip { font-size: 10px; padding: 1px 5px; }
  /* 24.11 图片格：缩略图从 38px 缩到 26px（它是行高的隐形天花板，不缩这行永远矮不下来） */
  table.lg td.c-photo { padding: 3px 4px !important; width: 32px; }
  table.lg td.c-photo .thumbbtn { width: 26px; height: 26px; border-radius: 6px; font-size: 12px; }
  /* 24.12 其它列的内边距：跟新的行高对齐，别再被单独的内边距顶高 */
  table.lg td.c-stk { padding: 5px 8px; }
  table.lg td.c-qu .qu-wrap input { padding: 5px 3px; }
  table.lg td.c-tag { padding: 4px 8px; }
  table.lg td.c-op { padding: 4px 6px; }
  /* 24.13 「钱」到这里为止：渠道列左边一条极细的分隔线，不然「¥0.123/抽 山姆」会连成一串 */
  table.lg th.c-sup, table.lg td.c-sup { box-shadow: inset 1px 0 0 #eef1f6; }
  /* 24.14 空标签默认隐掉：整列都是「加标签」太吵，鼠标划过这一行才显出来 */
  table.lg td.c-tag .catbtn.empty {
    color: transparent; background: transparent; border-color: transparent;
  }
  table.lg tbody tr:hover td.c-tag .catbtn.empty {
    color: var(--text3); border-color: var(--line); background: #fff;
  }
  /* 27. 套组行：名称按长短自适应，后面的信息跟着名字走 */
  .ordline .ordname { flex: 0 0 auto; min-width: 96px; max-width: none; }
  /* 27.1 套组行的按钮全部跟着文字走：先「按实付摊分」，再「解散」，不再被顶到行尾 */
  .ordline .rowbtn { margin-left: 0; }
  .ordline .rowbtn[data-ungroup] { margin-left: 2px; }
  /* 27.2 量宽用的隐形尺子：绝对定位 + 0 尺寸，不参与排版 */
  .ordfit {
    position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden;
    visibility: hidden; pointer-events: none; white-space: pre;
  }
  /* 28. 类型列：浏览时只显示 ＋ / −，点开才出「入库 / 出库」两项 */
  table.lg .c-kind { width: 44px; }
  table.lg th.c-kind { text-align: center; }
  table.lg td.c-kind { text-align: center; padding: 0 2px; }
  table.lg .kindbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 22px; padding: 0; margin: 0;
    border: 0; background: transparent; border-radius: 6px; cursor: pointer;
    font-family: inherit; font-size: 13.5px; font-weight: 700; line-height: 1;
    color: var(--primary);
  }
  table.lg .kindbtn .sg { font-style: normal; font-size: 13.5px; }
  /* 减号（−）本身比 ＋ 短一截，单独放大一点，两个符号看着一样重 */
  table.lg .kindbtn.out .sg { font-size: 16px; line-height: 1; }
  table.lg .kindbtn.out { color: var(--warn); }
  table.lg .kindbtn:hover { background: #eef3fd; box-shadow: inset 0 0 0 1px #d9e3f6; }
  table.lg .kindbtn.out:hover { background: #fdf3ec; box-shadow: inset 0 0 0 1px #f2ddc8; }
  /* 28.1 弹出的小选择板：贴在 ＋ / − 下面，点一项就生效 */
  .kindpop {
    position: fixed; z-index: 95; min-width: 106px;
    background: #fff; border: 1px solid #e4e8ef; border-radius: 10px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .14);
    padding: 5px;
  }
  .kindpop button {
    display: flex; align-items: center; gap: 7px; width: 100%;
    border: 0; background: transparent; border-radius: 7px;
    padding: 7px 9px; font-family: inherit; font-size: 12.5px; line-height: 1.2;
    color: var(--text); cursor: pointer; text-align: left;
  }
  .kindpop button:hover { background: #f3f5f9; }
  .kindpop button .sg {
    font-style: normal; font-weight: 700; font-size: 13px;
    width: 12px; text-align: center;
  }
  .kindpop button[data-k="in"] .sg { color: var(--primary); }
  .kindpop button[data-k="out"] .sg { color: var(--warn); }
  .kindpop button.on { background: #eef3fd; font-weight: 650; }
  .kindpop button.on::after {
    content: '✓'; margin-left: auto; font-size: 10.5px; color: var(--primary);
  }

  /* ===== 29. 入库 / 出库表单：跟流水台账同一张表 ===== */
  /* 29.1 弹窗加宽：13 列固定 1249px，窄屏里面横向滚 */
  .sheet.wide { max-width: 1310px; padding: 0; border-radius: 14px; overflow: hidden; }
  .sheet.wide .lgf-top {
    display: flex; align-items: center; gap: 9px; padding: 12px 16px 11px;
    border-bottom: 1px solid #eef1f6;
  }
  .sheet.wide .lgf-top h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
  .sheet.wide .lgf-top .grp {
    background: #e8eeff; color: #2f5fd0; font-size: 10.5px; font-weight: 600;
    padding: 1px 6px; border-radius: 5px; max-width: 220px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sheet.wide .lgf-top .gtip { color: var(--text3); font-size: 11.5px; margin-left: auto; }
  .sheet.wide .lgf-top .x {
    border: 0; background: transparent; color: #aeb5c2; font-size: 15px; cursor: pointer;
    width: 26px; height: 26px; border-radius: 7px; line-height: 1; flex: none;
  }
  .sheet.wide .lgf-top .x:hover { background: #f2f5f9; color: var(--text2); }

  /* 29.2 表格骨架：尺寸全部照抄台账。
     桌面端不裁剪纵向（否则出库的商品下拉浮层会被 overflow-x:auto 连带裁掉）；
     只有窄到放不下 1249px 表时才启用横向滚动 */
  .lgf-scroll { overflow: visible; }
  table.lgf { width: 1249px; table-layout: fixed; border-collapse: collapse; }
  table.lgf th {
    height: 30px; padding: 0 8px; background: #f8f9fb; border-bottom: 1px solid var(--line);
    font-size: 10.5px; font-weight: 600; color: #6b7280; letter-spacing: .08em;
    text-align: left; white-space: nowrap;
  }
  table.lgf th.num { text-align: right; }
  table.lgf th.c { text-align: center; }
  table.lgf td {
    height: 38px; padding: 0 6px; border-bottom: 1px solid #eef1f5;
    vertical-align: middle; font-size: 12.5px; color: var(--text);
  }
  table.lgf td.num {
    text-align: right; font-family: var(--mono); font-size: 11.5px;
    font-variant-numeric: tabular-nums;
  }
  table.lgf .c-photo { width: 32px; }
  table.lgf .c-date { width: 120px; }
  table.lgf .c-kind { width: 44px; text-align: center; padding: 0 2px; }
  table.lgf .c-name { width: 300px; }
  table.lgf .c-qty { width: 60px; }
  table.lgf .c-stk { width: 60px; }
  table.lgf .c-total { width: 88px; }
  table.lgf .c-price { width: 88px; }
  table.lgf .c-uprice { width: 88px; }
  table.lgf .c-ch { width: 76px; }
  table.lgf .c-tag { width: 72px; }
  table.lgf .c-exp { width: 96px; }
  table.lgf .c-cat { width: 124px; }

  /* 29.3 格子里的小输入：无边框，hover / 聚焦才显出边界 */
  table.lgf .ci {
    width: 100%; min-width: 0; border: 0; background: transparent;
    font: inherit; color: inherit; padding: 4px 4px; border-radius: 5px; outline: 0;
  }
  table.lgf .ci:hover { background: #f6f8fc; }
  table.lgf .ci:focus { background: #fff; box-shadow: inset 0 0 0 1px #bfd4ff; }
  table.lgf .ci.mono { font-family: var(--mono); font-size: 11.5px; }
  table.lgf .ci::placeholder { color: #b9c0cc; }

  /* 29.4 商品格：名称 + 下面一行小字（规格 · 位置 ＋ 赠品） */
  table.lgf .gcell { display: flex; flex-direction: column; justify-content: center; }
  table.lgf .gcell .ci.name { font-size: 12.5px; font-weight: 600; line-height: 17px; padding: 2px 4px; }
  table.lgf .gcell .sub {
    display: flex; align-items: center; gap: 4px; padding: 0 4px 2px; min-height: 15px;
  }
  table.lgf .gcell .sub .txt {
    font-size: 10px; line-height: 13px; color: var(--text3); min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  table.lgf .gcell .sub .txt i { font-style: normal; color: #c9ced8; padding: 0 3px; }
  table.lgf .giftchip {
    flex: none; margin-left: auto; border: 1px dashed #d6dce6; background: transparent;
    color: #a6aebc; font: inherit; font-size: 9.5px; line-height: 14px;
    padding: 0 5px; border-radius: 4px; cursor: pointer;
  }
  table.lgf .giftchip:hover { color: var(--text2); border-color: #c3ccda; }
  table.lgf .giftchip.on {
    background: var(--warn-soft); border-color: #f0dcbb; border-style: solid;
    color: var(--warn); font-weight: 600;
  }

  /* 29.5 数量格：数字 + 单位贴着写 */
  table.lgf .qcell { display: flex; align-items: center; justify-content: flex-end; gap: 1px; }
  table.lgf .qcell .ci { text-align: right; padding-right: 1px; font-family: var(--mono); font-size: 11.5px; }
  table.lgf .qcell .un {
    width: 32px; flex: none; border: 0; background: transparent; font: inherit;
    font-size: 11.5px; color: var(--text2); padding: 4px 1px; border-radius: 5px; outline: 0;
  }
  table.lgf .qcell .un:hover { background: #f2f5fa; }
  table.lgf .qcell .un:focus { background: #fff; box-shadow: inset 0 0 0 1px #bfd4ff; }

  /* 29.6 总价：¥ 跟数字贴死，右对齐 */
  table.lgf .money {
    display: flex; align-items: center; justify-content: flex-end; gap: 0;
    font-family: var(--mono); font-size: 11.5px;
  }
  table.lgf .money .cur { color: var(--text3); flex: none; }
  table.lgf .money input {
    width: auto; max-width: 100%; min-width: 1.4em; field-sizing: content;
    border: 0; background: transparent; font: inherit;
    text-align: right; color: var(--text); padding: 4px 2px 4px 0; border-radius: 5px; outline: 0;
  }
  table.lgf .money input:hover { background: #f6f8fc; }
  table.lgf .money input:focus { background: #fff; box-shadow: inset 0 0 0 1px #bfd4ff; }

  /* 29.7 日期格：显示成 2026-10-25 + 一颗小日历 */
  table.lgf .datecell { display: flex; align-items: center; gap: 1px; }
  table.lgf .datecell .ci { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--text2); padding: 4px 2px; }
  table.lgf .datecell .cal {
    flex: none; width: 17px; height: 20px; border: 0; background: transparent;
    color: #b7bec9; cursor: pointer; border-radius: 5px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  table.lgf .datecell .cal:hover { background: #f2f5fa; color: var(--text2); }
  table.lgf .datecell .native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

  /* 29.8 图片格：26px 缩略图，点一下换图，hover 出小 × */
  table.lgf td.c-photo { padding: 3px 4px; text-align: center; }
  table.lgf .photocell { position: relative; width: 26px; height: 26px; margin: 0 auto; }
  table.lgf .photobtn2 {
    width: 26px; height: 26px; padding: 0; border-radius: 6px; overflow: hidden;
    border: 1px dashed #d7dde8; background: #fbfcfe; color: #bcc4d1;
    font-size: 12px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  table.lgf .photobtn2:hover { border-color: #b9c6dc; color: var(--primary); }
  table.lgf .photobtn2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
  table.lgf .photobtn2 .sub2 { display: none; }
  table.lgf .photobtn2:has(.sub2)::after { content: '＋'; }
  table.lgf .photobtn2:has(img) { border-style: solid; border-color: #e3e8f0; }
  table.lgf .photodel {
    position: absolute; right: -5px; top: -5px; width: 13px; height: 13px; padding: 0;
    border: 1px solid #e4e8ef; border-radius: 50%; background: #fff; color: var(--text3);
    font-size: 9px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s;
  }
  table.lgf .photocell:hover .photodel { opacity: 1; }
  table.lgf .photodel:hover { color: var(--danger); border-color: #f3c9c6; }

  /* 29.9 标签格：平时显示一串标签，点开才出选择板 */
  table.lgf td.c-tag { position: relative; padding: 0 6px; }
  table.lgf .tagtrig {
    max-width: 100%; border: 0; background: transparent; font: inherit; font-size: 11.5px;
    color: var(--text2); padding: 3px 4px; border-radius: 5px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
  }
  table.lgf .tagtrig.empty { color: #c4cad4; }
  table.lgf .tagtrig:hover { background: #f2f5fa; color: var(--primary); }
  table.lgf .tagpop {
    position: absolute; z-index: 30; left: 0; top: calc(100% + 2px); width: 320px;
    background: #fff; border: 1px solid #e4e8ef; border-radius: 10px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .14); padding: 8px; display: none;
  }
  table.lgf .tagpop.on { display: block; }
  table.lgf .tagpop .tagbox { border: 0; background: transparent; padding: 0; }
  table.lgf .tagpop .taglist { max-height: 148px; overflow-y: auto; }

  /* 29.10 表单里的类型符号是固定的：就是个标记，不是按钮 */
  table.lgf .kfix {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 22px; font-size: 13.5px; font-weight: 700; line-height: 1;
    color: var(--primary);
  }
  table.lgf .kfix.out { color: var(--warn); font-size: 16px; }

  /* 29.11 出库带出来的只读格子 */
  table.lgf .ro {
    display: inline-block; max-width: 100%; padding: 0 3px; font-size: 11.5px;
    color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    vertical-align: middle;
  }
  table.lgf .dash { color: #c9ced8; }

  /* 29.12 主行放不下的：几条小字带 */
  .lgf-extra {
    display: flex; flex-direction: column; gap: 6px;
    padding: 8px 14px 9px; background: #fbfcfe; border-top: 1px solid #eef1f6;
  }
  .lgf-extra .row { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; }
  .lgf-extra .g { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text3); }
  .lgf-extra .g > b { font-weight: 400; color: var(--text3); letter-spacing: .02em; }
  .lgf-extra .sep { width: 1px; height: 14px; background: #e6eaf1; }
  .lgf-extra input, .lgf-extra select {
    border: 0; background: #fff; box-shadow: inset 0 0 0 1px #e6eaf1; border-radius: 6px;
    height: 24px; padding: 0 7px; font: inherit; font-size: 11.5px; color: var(--text); outline: 0;
  }
  .lgf-extra input:hover, .lgf-extra select:hover { box-shadow: inset 0 0 0 1px #cfd8e6; }
  .lgf-extra input:focus, .lgf-extra select:focus {
    box-shadow: inset 0 0 0 1px #9dbcff, 0 0 0 3px rgba(37, 99, 235, .10);
  }
  .lgf-extra .w-num { width: 46px; text-align: right; font-family: var(--mono); }
  .lgf-extra .w-txt { width: 132px; }
  .lgf-extra .w-money { width: 74px; text-align: right; font-family: var(--mono); }
  .lgf-extra .money input { padding: 0 6px 0 0; text-align: right; }
  .lgf-extra .money .cur { padding-right: 0; margin-right: -1px; }
  .lgf-extra .chk {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
    color: var(--text2); cursor: pointer;
  }
  .lgf-extra .chk input { width: 13px; height: 13px; margin: 0; accent-color: var(--primary); box-shadow: none; }
  .lgf-extra .pickw { min-width: 96px; }
  .lgf-extra .pickw > * { font-size: 11.5px; }

  /* 29.13 规格编辑器压成一行：每 1 包 含 14 片 */
  .lgf-extra .spec-box { display: flex; align-items: center; gap: 5px; }
  .lgf-extra .spec-box .lab, .lgf-extra .spec-box .spec-preview { display: none; }
  .lgf-extra .spec-line {
    display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text3);
  }
  .lgf-extra .spec-line b { color: var(--text2); font-weight: 600; }
  .lgf-extra .spec-line input { width: 46px; text-align: right; font-family: var(--mono); }
  .lgf-extra .spec-line input.narrow { width: 52px; text-align: left; font-family: inherit; }
  .lgf-extra .spec-line .sub2 { display: none; }

  /* 29.14 开封那一行：类别 + 说明 + 可用时长，固定一行 */
  .lgf-extra .openhint {
    flex: 0 1 auto; max-width: 520px; font-size: 11px; line-height: 1.5;
    color: #98a0ae; border-left: 2px solid #e9edf4; padding-left: 8px;
  }
  .lgf-extra .openrow .g > b { color: var(--text2); }

  /* 29.15 底栏：算出来的结果 + 取消 / 保存 */
  .lgf-foot {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    border-top: 1px solid #eef1f6; background: #fff;
  }
  .lgf-foot .calc {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
    font-size: 11.5px; color: var(--text3);
  }
  .lgf-foot .calc b { font-family: var(--mono); font-size: 12.5px; color: var(--text); font-weight: 650; }
  .lgf-foot .calc .dot { color: #d5dae3; }
  .lgf-foot .acts { margin-left: auto; display: flex; gap: 8px; flex: none; }
  .lgf-foot .btn {
    height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid #e3e7ee;
    background: #fff; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer;
  }
  .lgf-foot .btn:hover { background: #f7f9fc; }
  .lgf-foot .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
  .lgf-foot .btn.primary:hover { background: #1d55d0; border-color: #1d55d0; }
  .lgf-foot .btn.soft { background: #f4f7fd; border-color: #e2eafa; color: #2f5fd0; }
  .lgf-foot .btn.soft:hover { background: #eaf1fe; }

  /* 29.16 窄屏：表格横向滚，弹窗贴着屏幕 */
  @media (max-width: 1330px) {
    /* 窄屏把遮罩的 24px 边距借给弹窗，台账那张 1249px 的表就不用横向滚了 */
    .sheet.wide { flex: none; max-width: none; width: calc(100vw - 24px); }
  }
  /* 更窄（放不下 1249px 表）时才启用横向滚动；此时商品下拉浮层仍会被裁，
     所以给滚动区留出纵向空间，让下拉能往下展开而不被截断 */
  @media (max-width: 1273px) {
    .lgf-scroll { overflow-x: auto; overflow-y: visible; padding-bottom: 280px; margin-bottom: -280px; }
  }

  /* 29.17 出库商品格的下拉候选：浮在格子下面，聚焦才展开 */
  table.lgf .opickwrap { position: relative; }
  table.lgf .opick.opickpop {
    display: none;
    position: absolute; left: -4px; top: calc(100% + 2px); width: 340px; z-index: 40;
    max-height: 264px; overflow-y: auto; margin: 0; padding: 4px;
    background: #fff; border: 1px solid #e4e8ef; border-radius: 10px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .14);
  }
  table.lgf .opick.opickpop.on { display: block; }
  table.lgf .opick-item { padding: 7px 9px; font-size: 12.5px; }

  /* 29.18 渠道 / 类目 / 位置：格子里只显示当前值，点开才展开多级选择 */
  .lgfpick { position: relative; }
  .lgfpick .celltrig {
    width: 100%; max-width: 100%; border: 0; background: transparent; font: inherit;
    font-size: 11.5px; line-height: 1.4; color: var(--text2); padding: 3px 4px;
    border-radius: 5px; cursor: pointer; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .lgfpick .celltrig.empty { color: #c4cad4; }
  .lgfpick .celltrig:hover { background: #f2f5fa; color: var(--primary); }
  .lgfpick .cellpop {
    display: none; position: absolute; z-index: 40; left: 0; top: calc(100% + 2px);
    width: 320px; background: #fff; border: 1px solid #e4e8ef; border-radius: 10px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .14); padding: 8px;
  }
  .lgfpick.open .cellpop { display: block; }
  .lgfpick .cellpop .catpick-row { display: flex; flex-wrap: wrap; gap: 6px; }
  .lgfpick .cellpop select {
    width: 100%; max-width: 100%; height: 26px; padding: 0 6px; font-size: 11.5px;
    border: 1px solid var(--line); background: #fafbfd; border-radius: 6px; color: var(--text);
  }
  .lgfpick .cellpop .pathadd { display: flex; gap: 5px; margin-top: 7px; }
  .lgfpick .cellpop .pathadd-in {
    flex: 1; min-width: 0; height: 26px; padding: 0 7px; font-size: 11.5px;
    border: 1px solid var(--line); background: #fafbfd; border-radius: 6px; color: var(--text);
  }
  .lgfpick .cellpop .pathadd-btn {
    flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line);
    background: #fff; color: var(--text2); cursor: pointer; font-size: 12px; line-height: 1;
  }
  /* 补充行里的「位置」：触发器做成一个小输入框的样子 */
  .lgfpick.inline { display: inline-block; }
  .lgfpick.inline .celltrig {
    height: 24px; padding: 0 7px; background: #fff; box-shadow: inset 0 0 0 1px #e6eaf1;
    border-radius: 6px; line-height: 22px; min-width: 96px; max-width: 190px;
  }
  .lgfpick.inline .celltrig:hover { box-shadow: inset 0 0 0 1px #cfd8e6; background: #fff; color: var(--text); }
  /* 靠右的两列浮层向左展开，免得被滚动容器裁掉 */
  table.lgf td.c-ch .cellpop, table.lgf td.c-cat .cellpop { left: auto; right: 0; }

  /* 29.19 补充行收口：规格框去掉卡片皮 / 金额符号进框 / 单位框不再被 placeholder 撑破 */
  .lgf-extra .spec-box {
    flex: 0 0 auto; padding: 0; border: 0; background: transparent;
    border-radius: 0; min-height: 0; box-shadow: none;
  }
  .lgf-extra .spec-line input.narrow { width: 58px; }
  .lgf-extra .money {
    display: flex; align-items: center; justify-content: flex-end;
    width: 100px; height: 24px; padding: 0 8px 0 7px; gap: 2px;
    border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px #e6eaf1;
  }
  .lgf-extra .money:hover { box-shadow: inset 0 0 0 1px #cfd8e6; }
  .lgf-extra .money:focus-within { box-shadow: inset 0 0 0 1px #9dbcff, 0 0 0 3px rgba(37, 99, 235, .10); }
  .lgf-extra .money .cur { color: var(--text3); font-size: 11px; flex: none; }
  .lgf-extra .money input,
  .lgf-extra .money input:hover,
  .lgf-extra .money input:focus {
    flex: 1 1 auto; width: 0; min-width: 0; height: 22px; padding: 0;
    box-shadow: none; background: transparent; border: 0;
  }

  /* ===== 30. 扁平下拉：原生 select 退成数据源，界面只用一颗安静的小按钮 ===== */
  .flatpick { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
  /* 原生 select 留在 DOM 里（.value / change 全靠它），但一个像素都不显示 */
  .flatpick > select.fpn {
    position: absolute; left: 0; top: 0; width: 1px; height: 1px;
    padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none;
    -webkit-appearance: none; appearance: none;
  }
  .flatpick .fp-trig {
    display: inline-flex; align-items: center; gap: 3px;
    height: 26px; padding: 0 5px 0 4px; margin: 0;
    border: 0; background: transparent; border-radius: 6px;
    font-family: inherit; font-size: 12.5px; line-height: 1; color: var(--text2);
    cursor: pointer; white-space: nowrap;
  }
  .flatpick .fp-trig:hover { background: #eef2f8; color: var(--text); }
  .flatpick.open .fp-trig { background: #e9eff9; color: var(--text); }
  .flatpick .fp-trig:focus-visible { outline: 2px solid rgba(47, 111, 237, .35); outline-offset: 1px; }
  .flatpick .fpc { width: 8px; height: 5px; flex: none; color: #a8b0bd; transition: transform .12s ease; }
  .flatpick .fp-trig:hover .fpc, .flatpick.open .fpc { color: #7c8798; }
  .flatpick.open .fpc { transform: rotate(180deg); }

  /* 30.1 工具栏：跟旁边的 ghost 按钮同高，不再是一颗白底原生下拉 */
  .toolbar .flatpick .fp-trig { height: 30px; padding: 0 7px 0 5px; }
  /* 30.2 入库 / 出库表单的补充行：跟「位置」一样是纯文字，不跟输入框抢边框 */
  .lgf-extra .flatpick .fp-trig { height: 24px; padding: 0 4px; font-size: 11.5px; }
  /* 30.3 竖排弹窗里的字段：撑满一格，跟 input 同高同边 */
  .field .flatpick { display: flex; width: 100%; }
  .field .flatpick .fp-trig {
    width: 100%; height: 30px; padding: 0 9px; justify-content: space-between;
    border: 1px solid #e3e7ee; border-radius: 6px; background: #fff;
    font-size: 12.5px; color: var(--text);
  }
  .field .flatpick .fp-trig:hover { border-color: #cfd8e6; background: #fff; color: var(--text); }
  .field .flatpick .fp-trig:focus-visible,
  .field .flatpick.open .fp-trig { outline: 0; border-color: var(--primary); background: #fff; }
  /* 30.4 级联选择（渠道 / 类目 / 位置）里每一级：一排扁平小格，换掉原来的原生下拉 */
  .catpick-row .flatpick { flex: 1 1 0; min-width: 92px; }
  .catpick-row .flatpick .fp-trig {
    width: 100%; height: 32px; padding: 0 8px; justify-content: space-between;
    border-radius: 6px; background: #f4f6fa; font-size: 13px; color: var(--text);
  }
  .catpick-row .flatpick .fp-trig:hover { background: #eaeff7; }
  .cellpop .flatpick .fp-trig { height: 26px; padding: 0 7px; font-size: 11.5px; }
  /* 30.5 浮层：跟「类型」那颗同一张卡，宽度跟着触发器走 */
  .flatpop { min-width: 108px; padding: 4px; }
  .flatpop button { padding: 7px 9px; gap: 0; }
  .flatpop button.on { background: #eef3fd; }
  /* 30.6 格子里的浮层（渠道 / 类目 / 位置 / 标签）：所在的表格和弹窗都是
     overflow:hidden / auto，absolute 会整块被裁掉，用户看着就像「点不动」。
     改成 fixed 由 JS 按触发器位置摆放，才能露在弹窗外面。 */
  .cellpop.fixedpop, .tagpop.fixedpop { position: fixed !important; z-index: 94 !important; }

  /* ---------- 32. 分表统一风格（补货 / 临期 / 大件 / 比价） ---------- */
  /* 32.1 顶部说明：跟流水台账的工具栏一致，只留一行小字，不再用大块提示卡 */
  #view .tip {
    background: transparent; border: 0; border-radius: 0;
    padding: 0 2px; margin: 0 2px 8px;
    font-size: 12px; color: var(--text3); line-height: 1.7;
  }
  #view .tip b { color: var(--text2); font-weight: 600; }
  /* 32.2 紧急程度交给状态小签，行里不再铺一层粉底 */
  tbody tr.warnrow td, tbody tr.warnrow:hover td { background: transparent; }
  /* 32.3 行内操作：细边浅蓝，不再整块实心蓝 */
  .actbtn.acc { color: var(--primary); border-color: #cdddff; background: #fff; }
  .actbtn.acc:hover { background: #f2f7ff; border-color: #b9d0ff; }
  /* 32.4 工具栏里的「单件 ≥」标签：纯文字，别抢下拉的视觉重量 */
  .toolbar .picklab { font-size: 12.5px; color: var(--text3); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
  /* 32.5 大件 / 比价里的日期、天数：等宽数字，扫一眼能对齐 */
  #view table td.num { font-variant-numeric: tabular-nums; }
  /* ---------- 33. 按位置找：条目压成一行 ---------- */
  /* 33.1 位置列只在一组的第一行标注，其余行留空，靠左边界对齐读出归属 */
  table.plc { table-layout: fixed; width: 100%; }
  table.plc thead th { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--text3); }
  table.plc tbody td { padding: 6px 10px; font-size: 12.8px; line-height: 18px; }
  table.plc td.plc-loc {
    width: 172px; font-size: 11.5px; line-height: 16px; color: var(--text2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  table.plc td.plc-loc .pin {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #b9c2d2; margin: 0 6px 1px 1px; vertical-align: middle;
  }
  /* 33.2 商品：品牌前缀淡一点，名字 + 规格同一行 */
  table.plc td.plc-nm { color: var(--text); }
  table.plc td.plc-nm b { font-weight: 600; }
  table.plc td.plc-nm .br { color: var(--text3); font-size: 11.5px; font-weight: 500; margin-right: 1px; }
  table.plc td.plc-nm i {
    font-style: normal; font-size: 11px; color: var(--text3);
    margin-left: 6px; white-space: nowrap;
  }
  /* 33.3 数字列收窄靠右，别把名字孤零零甩在左边 */
  table.plc th.plc-num, table.plc td.plc-num {
    width: 96px; text-align: right;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
  }
  table.plc th.plc-st, table.plc td.plc-st { width: 84px; text-align: center; }
  table.plc td.plc-st .chip { margin: 0; font-size: 10.5px; line-height: 16px; padding: 1px 6px; }
  table.plc tbody tr:hover td { background: #f8fafd; }
  
[hidden] { display: none !important; }
.auth-card { max-width: 440px; margin: 8vh auto; padding: 28px; background: #fff; border: 1px solid #e4e7ec; border-radius: 20px; box-shadow: 0 12px 40px #172b4d0c; }
.auth-card label { display: block; margin: 16px 0; font-weight: 600; }
.auth-card input { width: 100%; margin-top: 6px; min-height: 42px; box-sizing: border-box; }
.auth-card p { line-height: 1.65; color: #667085; }
.auth-card #auth-error { color: #b42318; }
#auth-links { margin-top: 16px; }
.account-dialog { max-width: min(640px,90vw); border: 1px solid #ddd; border-radius: 18px; padding: 24px; overflow-wrap: anywhere; }
.account-dialog::backdrop { background: #1118; }
.account-dialog .btn { margin: 6px; }
@media(max-width:520px) { .auth-card { margin: 24px 12px; padding: 20px; } }
