/* 采购计划 · 设计系统 3.0
   左边栏（PC 管理台）+ 手机端底部导航；零外链、零框架 */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #eaecf0;
  --line-2: #f2f4f7;
  --ink: #0f172a;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;

  --brand: #2563eb;
  --brand-d: #1d4ed8;
  --brand-weak: #eff4ff;
  --ok: #12b76a;
  --ok-weak: #e8f8f0;
  --warn: #f79009;
  --warn-weak: #fef6e7;
  --danger: #f04438;
  --danger-weak: #fdecea;
  --violet: #7a5af8;
  --violet-weak: #f2effe;
  --cyan: #06aed4;

  --side-bg: #101828;
  --side-line: #1d2939;
  --side-ink: #cdd5e0;
  --side-muted: #7d8899;
  --side-w: 240px;

  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0; }
.sep { height: 1px; background: var(--line-2); margin: 12px 0; }
.ico { flex: 0 0 auto; }

/* ============================================================ 外壳 */
.is-shell .app { margin-left: var(--side-w); }
.is-shell .wrap { max-width: none; padding: 22px 28px 48px; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 60;
  display: flex; flex-direction: column;
  background: var(--side-bg); color: var(--side-ink);
  border-right: 1px solid var(--side-line);
}
.side-logo {
  display: flex; align-items: center; gap: 10px;
  height: 62px; padding: 0 18px; color: #fff;
  border-bottom: 1px solid var(--side-line);
}
.side-logo .mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #1e40af);
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, .55);
}
.side-logo .txt { display: flex; flex-direction: column; line-height: 1.15; }
.side-logo b { font-size: 14px; letter-spacing: .01em; }
.side-logo i { font-style: normal; font-size: 10.5px; color: var(--side-muted); letter-spacing: .06em; }
/* logo 里现在有两个链接（图标回首页、版本号看更新日志），去掉 a 的默认外观 */
.side-logo a { color: inherit; text-decoration: none; }
.side-logo .txt a:hover i, .side-logo .txt a:hover b { color: #fff; }
.side-logo .txt a i { transition: color .14s; }

.side-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: #263244; border-radius: 3px; }
.nav-group { margin-bottom: 6px; }
.nav-label {
  padding: 10px 10px 6px; font-size: 10.5px; letter-spacing: .1em;
  color: #5d6b80; text-transform: uppercase;
}
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; margin: 2px 0; border-radius: 9px;
  color: var(--side-ink); font-size: 13.5px;
  transition: background .14s, color .14s;
}
.side-nav a:hover { background: #18212f; color: #fff; }
.side-nav a.on { background: #1c2b45; color: #fff; font-weight: 500; }
.side-nav a.on::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.side-nav a .ico { color: #8b97a8; transition: color .14s; }
.side-nav a:hover .ico, .side-nav a.on .ico { color: #93b4f8; }

.side-foot {
  border-top: 1px solid var(--side-line); padding: 10px; display: flex; gap: 6px; align-items: center;
}
.side-user {
  flex: 1; display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 9px;
  color: var(--side-ink); min-width: 0;
}
.side-user:hover { background: #18212f; }
.side-user .avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #23324a; color: #c7d7f5; font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.side-user .txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-user b { font-size: 12.5px; color: #e7ecf3; font-weight: 500; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.side-user i { font-style: normal; font-size: 10.5px; color: var(--side-muted); }
.side-logout {
  height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid #263244; color: #8b97a8; font-size: 12px;
  font-family: inherit;
}
.side-logout:hover { color: #fff; border-color: #3a4a63; background: #18212f; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 62px; padding: 0 28px;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-size: 16px; font-weight: 600; flex: 1; color: var(--ink); }
.topbar .who { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.2; }
.topbar .who b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.topbar-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.back {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: #f4f6f9; color: var(--ink); font-size: 18px; flex: 0 0 auto;
}
.back:hover { background: #e9edf3; }

/* ============================================================ 卡片 / 面板 */
.wrap { padding: 14px 12px 40px; max-width: 820px; margin: 0 auto; }
.wrap.narrow { max-width: 500px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-1); margin-bottom: 12px; overflow: hidden;
}
.card > .hd {
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 8px;
}
.card > .hd h3 { font-size: 14px; flex: 1; }
.card > .bd { padding: 14px 16px; }
.card > .bd.tight { padding: 6px 8px; }
.card > .ft { padding: 12px 16px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; }

/* ============================================================ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: center;
  font-family: inherit; transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
  white-space: nowrap;
}
.btn:hover { background: #f7f9fc; border-color: #dfe3ea; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff;
               box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn.danger { background: #fff; border-color: #f6c8c4; color: var(--danger); }
.btn.danger:hover { background: #fff6f5; }
.btn.ghost { background: #f4f6f9; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #eaeef4; }
.btn.soft { background: var(--brand-weak); border-color: #dbe6fb; color: var(--brand-d); }
.btn.soft:hover { background: #e3edff; border-color: #c9dbfa; }
.btn.block { width: 100%; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.inline-form { display: contents; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

/* ============================================================ 表单 */
.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
/* 必填星号统一红色。原来只写 .field / .hero-field 两个作用域，
   三步录入里的 .qty-label（下单总数）、.unit-row（单位）会继承灰色。
   2026-11-06：加全局兜底，以后新字段也不会漏。 */
.req { color: var(--danger); }
.field .req { color: var(--danger); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel],
select, textarea {
  width: 100%; min-width: 0; min-height: 40px; padding: 9px 12px; font-size: 15px;
  border: 1px solid #dfe3ea; border-radius: 9px; background: #fff; color: var(--ink);
  font-family: inherit; transition: border-color .14s, box-shadow .14s;
}
input::placeholder, textarea::placeholder { color: #b3bbc8; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
textarea { min-height: 130px; resize: vertical; }
.hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
.err-tip { font-size: 12px; color: var(--danger); margin-top: 5px; }
.code-input { text-align: center; font-size: 30px; letter-spacing: 10px; font-weight: 700;
              font-variant-numeric: tabular-nums; padding-left: 16px; }

/* ============================================================ 徽标 / 状态 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 6px; font-size: 11.5px; line-height: 18px;
  background: var(--line-2); color: var(--muted); white-space: nowrap; font-weight: 500;
}
.badge.blue { background: #e8f0fe; color: #1d4ed8; }
.badge.cyan { background: #e2f7fb; color: #0b7285; }
.badge.purple { background: var(--violet-weak); color: #5b3fd6; }
.badge.green { background: var(--ok-weak); color: #0b7c4a; }
.badge.red { background: var(--danger-weak); color: #b42318; }
.badge.gray { background: #f0f2f5; color: #5b6675; }
.badge.dark { background: #e7eaee; color: #3a4451; }
.badge.light { background: #f5f6f8; color: #98a2b3; }
.badge.warn { background: var(--warn-weak); color: #b54708; }
.badge.teal { background: #dff5ee; color: #0f6e56; }

/* ============================================================ 列表（手机） */
.item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-2);
        color: var(--ink); background: var(--panel); }
.item:last-child { border-bottom: none; }
.item:hover { background: #fbfcfe; }
.item .l1 { display: flex; align-items: center; gap: 8px; }
.item .nm { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.item .l2 { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 8px;
            flex-wrap: wrap; align-items: center; }
.item .l3 { font-size: 12px; color: var(--muted); margin-top: 3px; }
.item .qty { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.item .qty.up { color: var(--danger); }
.item .qty.down { color: var(--ok); }

/* 手机上给列表加勾选（2026-11-11 全部明细批量填证件）：
   勾选框必须放在 <a class="item"> 外面 —— 塞进链接里点一下会顺带跳详情页，
   勾一条就被弹走，批量根本勾不起来。所以外层包一层 .item-row 做 flex。 */
.item-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); }
.item-row:last-child { border-bottom: none; }
.item-row > .item { flex: 1; min-width: 0; border-bottom: none; }
.item-row .m-ck { display: flex; align-items: center; padding: 0 2px 0 12px; cursor: pointer; }
.item-row .m-ck input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.item-row .m-ck + .item { padding-left: 10px; }

/* ============================================================ 标签页 */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px; background: #fff;
  color: var(--muted); font-size: 13px; border: 1px solid var(--line); white-space: nowrap;
}
.tabs a b { font-weight: 600; color: inherit; opacity: .85; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 500; }
.is-shell .tabs { padding: 0 0 12px; }

/* ============================================================ 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel); }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left;
                       vertical-align: middle; }
.table th { background: #fafbfc; font-weight: 500; color: var(--muted); font-size: 12px; }
.table tbody tr:hover { background: #fbfcfe; }
.table th.num, .table td.num, .table th.r, .table td.r {
  text-align: right; font-variant-numeric: tabular-nums;
}
.table.fixed { table-layout: fixed; }
.table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table td .pname { font-weight: 600; color: var(--ink); }
.table td a.pname:hover { color: var(--brand); }
.table th.c, .table td.c { text-align: center; }
.table td.dt { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tdot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 7px;
        vertical-align: 1px; }
.table .q { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.table .u { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 3px; }
.table .diff { margin-left: 6px; font-size: 11px; color: var(--danger); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.scroll-x { overflow-x: auto; }

/* ============================================================ 分段（三段底色） */
.seg { border-radius: var(--r); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line);
       background: var(--panel); box-shadow: var(--sh-1); }
.seg > .seg-hd { padding: 10px 14px; font-size: 12.5px; font-weight: 600; display: flex; gap: 8px;
                 align-items: center; }
.seg > .seg-bd { padding: 14px; background: var(--panel); }
.seg.wh > .seg-hd { background: #eef4fd; color: #1e4b8f; }
.seg.buy > .seg-hd { background: #eef7f0; color: #22653c; }
.seg.price > .seg-hd { background: #eef7f0; color: #22653c; }
.seg.in > .seg-hd { background: #fdf3ec; color: #8a4b1a; }
.seg .tag-lock { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--faint); }

/* 只读字段行（仓库单详情的三段都用它）：标签在左、值靠右，一行一个字段。
   手机上比「标签在上、值在下」省一半高度，扫读也顺。 */
.frows { border-top: 1px solid var(--line-2); }
.seg-bd > .frows:first-child { border-top: none; }
.frow { display: flex; align-items: flex-start; gap: 14px; padding: 9px 0;
        border-bottom: 1px solid var(--line-2); }
.frow:last-child { border-bottom: none; }
.frow .k { flex: 0 0 auto; min-width: 84px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.frow .v { flex: 1 1 auto; min-width: 0; text-align: right; font-size: 13px; color: var(--ink);
           line-height: 1.6; word-break: break-word; }
@media (max-width: 560px) {
  .seg-bd > .frow, .seg-bd > .frows > .frow { padding: 9px 0; gap: 10px; }
  .frow .k { min-width: 76px; font-size: 12.5px; }
  .frow .v { font-size: 13.5px; }
}

/* ============================================================ 提示 / 空态 */
.flash { margin: 14px 28px 0; padding: 10px 14px; border-radius: 10px; font-size: 13px;
         background: var(--ok-weak); color: #0b7c4a; border: 1px solid #cdeedd; }
.flash.err { background: var(--danger-weak); color: #b42318; border-color: #f8d3cf; }
.wrap > .flash { margin: 0 0 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--faint); font-size: 13px; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .45; }

/* ============================================================ 详情页杂项 */
pre.paste-preview { background: #fafbfc; border: 1px solid var(--line); border-radius: 9px;
                    padding: 10px; font-size: 12px; overflow-x: auto; max-height: 260px; }
.tl { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 16px; }
.tl .ev { position: relative; padding-bottom: 16px; }
.tl .ev::before { content: ""; position: absolute; left: -23px; top: 4px; width: 9px; height: 9px;
                  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #e8f0fe; }
.tl .ev .h { font-size: 13px; font-weight: 600; }
.tl .ev .b { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.tl .ev .b .chg { background: #f6f8fb; border: 1px solid var(--line-2); border-radius: 6px;
                  padding: 2px 7px; margin-right: 6px; display: inline-block; margin-top: 4px; font-size: 12.5px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eef1f5;
         border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
            background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center;
            font-size: 14px; border: none; }
.photo-add { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px dashed #cdd5e0;
             border-radius: 10px; color: var(--muted); font-size: 12px; background: #fbfcfd; }
.photo-add input { display: none; }

details.help { margin-top: 12px; }
details.help summary { font-size: 13px; color: var(--brand); cursor: pointer; list-style: none; }
details.help summary::-webkit-details-marker { display: none; }
details.help .bd { font-size: 12.5px; color: var(--muted); padding: 8px 0 0 4px; line-height: 1.8; }

/* ============================================================ 登录 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
              background: radial-gradient(1200px 600px at 50% -10%, #e8effc 0%, #f6f7f9 55%, #f6f7f9 100%); }
.login-box { width: 100%; max-width: 372px; }
.login-box .logo { font-size: 38px; text-align: center; }
.login-box h1 { text-align: center; font-size: 20px; margin: 8px 0 4px; }
.login-box .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-box .card { border-radius: var(--r-lg); box-shadow: var(--sh-2); }

/* ============================================================ 手机底栏 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 20px rgba(16, 24, 40, .07);   /* P0：内容被底栏接住时看得出是分层 */
}

/* P0 试验（2026-11-06）：手机端横滑标签被硬裁时，给一个「还能往右滑」的箭头。
   JS 只给真正溢出、且没滑到头的容器加 .hs-more，滑到头自动撤掉。
   不想要就删掉这段 + app.js 末尾的横滑 IIFE。 */
@media (max-width: 700px) {
  .hs-more::after {
    content: '›';
    position: sticky; right: 0; align-self: center; flex: 0 0 18px;
    width: 18px; height: 20px; margin-left: -18px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 55%);
    color: var(--brand); font-size: 17px; line-height: 20px; text-align: right;
    pointer-events: none;
  }
}
.tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
            padding: 8px 0 6px; font-size: 11px; color: var(--faint); }
.tabbar a span { white-space: nowrap; }
.tabbar a .ico { opacity: .85; }
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar a.on .ico { opacity: 1; }
/* 主管有 6 格（总览/仓库/采购/台账/管理/我），窄屏再收一点，别挤成两行 */
@media (max-width: 400px) {
  .tabbar a { font-size: 10.5px; gap: 2px; }
  .tabbar a .ico { width: 19px; height: 19px; }
}

/* ============================================================ 首页仪表盘 */
/* 铺满：用户要求采购端/汇总/明细/报价页两侧不留白。
   内容自己靠 padding 和网格控制，不再整体限宽。 */
.dash { max-width: none; margin: 0; padding: 24px 28px 56px; }
.dash-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.dash-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.dash-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.dash-actions { margin-left: auto; display: flex; gap: 8px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-row.compact { grid-template-columns: repeat(2, minmax(0, 320px)); }
.kpi {
  display: block; padding: 16px 18px 15px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-1);
  color: inherit; transition: box-shadow .16s, transform .16s, border-color .16s;
  position: relative; overflow: hidden;
}
.kpi:hover { box-shadow: var(--sh-2); border-color: #dfe4ec; transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kpi-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-weak); color: var(--brand);
}
.kpi-ico.ok { background: var(--ok-weak); color: #0b7c4a; }
.kpi-ico.warn { background: var(--warn-weak); color: #b54708; }
.kpi-ico.danger { background: var(--danger-weak); color: #b42318; }
.kpi-ico.violet { background: var(--violet-weak); color: #5b3fd6; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-num { font-size: 30px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums;
           letter-spacing: -.02em; }
.kpi-num .kpi-unit { font-size: 13px; font-weight: 500; color: var(--faint); margin-left: 4px;
                     letter-spacing: 0; }
.kpi-sub { margin-top: 8px; font-size: 12px; color: var(--faint); line-height: 1.5;
           display: block; min-height: 18px; }
.kpi-sub b { color: var(--ink-2); font-weight: 600; }
.kpi-sub .sep-dot { color: #cfd6e0; margin: 0 5px; }
.kpi.is-alert { border-color: #f6d5d1; background: linear-gradient(180deg, #fffafa, #fff 60%); }
.kpi.is-alert .kpi-num { color: #b42318; }
.kpi.is-warn { border-color: #f7e3bd; }
.kpi.is-warn .kpi-num { color: #b54708; }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 16px; }
.dash-grid.two { grid-template-columns: 1fr 1fr; }
.dash-grid.flat { grid-template-columns: 1fr 1fr; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
         box-shadow: var(--sh-1); overflow: hidden; display: flex; flex-direction: column; }
.panel-hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px;
            border-bottom: 1px solid var(--line-2); }
.panel-hd h3 { font-size: 14px; }
.panel-sub { font-size: 12px; color: var(--faint); }
.panel-link { margin-left: auto; font-size: 12.5px; color: var(--brand); }
.panel-link:hover { text-decoration: underline; }
.panel-bd { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.panel-bd.flush { padding: 0; }
.mt-auto { margin-top: auto; }

/* 采购进度 —— 环形 */
.ring-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px 10px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring .rb { fill: none; stroke: #eef1f6; stroke-width: 8; }
.ring .rf { fill: none; stroke-width: 8; stroke-linecap: round;
            transition: stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1); }
.ring-wrap { position: relative; }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column;
          align-items: center; justify-content: center; }
.ring-c b { font-size: 22px; font-weight: 650; letter-spacing: -.02em;
            font-variant-numeric: tabular-nums; line-height: 1; }
.ring-c span { font-size: 10.5px; color: var(--faint); margin-top: 3px;
               font-variant-numeric: tabular-nums; }
.ring-k { font-size: 12.5px; color: var(--muted); }
.ring-k i { font-style: normal; color: var(--faint); font-size: 11px; margin-left: 3px; }
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.pipe-stage { padding: 12px 12px 10px; border-radius: 10px; background: #fafbfc;
              border: 1px solid var(--line-2); }
.pipe-num { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pipe-name { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.pipe-bar { height: 5px; border-radius: 3px; background: #eceff4; overflow: hidden; }
.pipe-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.pipe-stage.s-quote .pipe-bar i { background: var(--violet); }
.pipe-stage.s-order .pipe-bar i { background: var(--warn); }
.pipe-stage.s-inbound .pipe-bar i { background: var(--ok); }
.pipe-pct { margin-top: 6px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.type-row { display: grid; grid-template-columns: 92px 1fr 64px 52px; align-items: center;
            gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.type-row:first-child { border-top: none; }
.type-name { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.type-dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.type-bar { height: 7px; border-radius: 4px; background: #eef0f4; overflow: hidden; }
.type-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.type-num { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.type-pct { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* 卡在谁手上 */
.stuck-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.stuck-row:last-child { border-bottom: none; }
.stuck-av { width: 28px; height: 28px; border-radius: 50%; background: #eef2f8; color: #475467;
            display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.stuck-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stuck-n { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stuck-bar { width: 74px; height: 6px; border-radius: 3px; background: #eef0f4; overflow: hidden; flex: 0 0 auto; }
.stuck-bar i { display: block; height: 100%; background: var(--warn); border-radius: 3px; }

/* 事件列表（推迟/改单/最近） */
.ev-row { display: flex; gap: 10px; padding: 11px 8px; margin: 0 -8px; border-radius: 9px;
          border-bottom: 1px solid var(--line-2); color: inherit;
          transition: background .13s; }
.ev-row:hover { background: #f8fafc; }
.ev-row:last-child { border-bottom: none; }
.ev-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
          background: var(--warn-weak); color: #b54708; flex: 0 0 auto; margin-top: 1px; }
.ev-ico.violet { background: var(--violet-weak); color: #5b3fd6; }
.ev-body { flex: 1; min-width: 0; }
.ev-t { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-t a { color: var(--ink); }
.ev-t a:hover { color: var(--brand); }
.ev-m { font-size: 12px; color: var(--faint); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.ev-chg { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.ev-chg .o { color: var(--faint); text-decoration: line-through; }
.ev-chg .n { color: #b54708; font-weight: 600; }
.ev-row.compact { padding: 8px 0; }

/* 数据表：固定列宽 + 表头/数据同向对齐 + 双行单元格垂直居中 */
.tbl-mini { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl-mini col { min-width: 0; }
.tbl-mini th {
  padding: 0 12px 9px; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  color: #7d8797; text-align: left; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl-mini td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; font-size: 13px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tbl-mini th:first-child, .tbl-mini td:first-child { padding-left: 18px; }
.tbl-mini th:last-child, .tbl-mini td:last-child { padding-right: 18px; }
.tbl-mini tbody tr:hover { background: #fafbfc; }
.tbl-mini tr:last-child td { border-bottom: none; }
.tbl-mini .r { text-align: right; }
.tbl-mini .c { text-align: center; }
.tbl-mini .pname { font-weight: 600; color: var(--ink); font-size: 13px; line-height: 1.35;
                   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-mini .psub { font-size: 11.5px; color: #7d8797; margin-top: 2px; line-height: 1.4;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-mini .q { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tbl-mini .u { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 2px;
               font-weight: 400; }
.tbl-mini .dt { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.tbl-mini .dt-late { font-variant-numeric: tabular-nums; color: var(--danger); font-weight: 600;
                     white-space: nowrap; }
.tbl-mini .sub-late { color: var(--danger); }
.tbl-mini .psub.today { color: var(--brand); font-weight: 600; }
.tbl-mini a.pname:hover { color: var(--brand); }
/* 兼容旧写法 */
.tbl-mini .nm { font-weight: 600; color: var(--ink); }
.tbl-mini .sub { color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.tbl-mini .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-mini a.nm:hover { color: var(--brand); }

/* 筛选条 */
.filter-bar { display: grid; gap: 8px; align-items: center;
              grid-template-columns: 132px 150px minmax(140px, 1fr) minmax(232px, 1.05fr) auto; }
.filter-bar select, .filter-bar input { min-height: 38px; font-size: 13.5px; }
.filter-bar .chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
                   white-space: nowrap; }
.filter-bar .chk input { width: 16px; height: 16px; }
.filter-actions { display: flex; gap: 6px; }
/* 两个勾 + 重置/筛选 挤在一行，省出竖直空间给列表 */
.filter-ends { display: flex; align-items: center; gap: 14px; min-width: 0; }
.filter-ends .filter-actions { margin-left: auto; }

/* 日期：两个框并排，前面标「下单」、中间一个「至」——
   光两个裸日期框没人看得出来筛的是哪个日期 */
.date-range { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
              gap: 5px; align-items: center; }
.date-range > i { font-style: normal; color: var(--faint); font-size: 12px; }
.date-range > .dr-t { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.date-range input { width: 100%; min-width: 0; }

/* 仓库多选下拉（用原生 details，JS 只负责改摘要文字） */
.msel { position: relative; min-width: 0; }
.msel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
                  min-height: 38px; padding: 0 10px; background: #fff; border: 1px solid var(--line);
                  border-radius: 9px; font-size: 13.5px; color: var(--ink); }
.msel > summary::-webkit-details-marker { display: none; }
.msel > summary::after { content: '▾'; margin-left: auto; color: var(--faint); font-size: 11px; }
.msel[open] > summary, .msel > summary:hover { border-color: var(--brand); }
.msel-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-pop { position: absolute; z-index: 40; top: calc(100% + 4px); right: 0; width: 230px;
            max-height: 300px; overflow: auto; padding: 6px; background: #fff;
            border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-2); }
.msel-pop label { display: flex; align-items: center; gap: 8px; padding: 9px 8px;
                  border-radius: 7px; font-size: 13px; cursor: pointer; }
.msel-pop label:hover { background: var(--bg); }
.msel-pop input { flex: 0 0 auto; width: 17px; height: 17px; min-height: 0; }
.msel-foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; padding: 8px 2px 2px;
             border-top: 1px solid var(--line-2); background: #fff;
             position: sticky; bottom: -6px; }

/* 桌面表格 / 手机卡片 二选一 */
.list-desktop { display: none; }
@media (min-width: 901px) {
  .list-desktop { display: block; }
  .list-mobile { display: none; }
}
@media (max-width: 1180px) {
  .filter-bar { grid-template-columns: 1fr 1fr 1fr; }
  .filter-ends { grid-column: span 3; }
  .filter-actions { justify-content: flex-end; }
}
@media (max-width: 700px) {   /* 原 900：整站手机壳（藏侧栏/开底栏）收到 700 */
  /* 手机上列表就是主角：筛选压成 4 行，空状态别占半屏 */
  .items-filter > .bd { padding: 10px 10px; }
  .list-mobile .empty { padding: 22px 14px; }
  .list-mobile .empty .big { font-size: 24px; margin-bottom: 6px; }
}
@media (max-width: 560px) {
  /* 必须是 minmax(0,1fr)：写 1fr 等于 minmax(auto,1fr)，日期框的 min-content 会把列撑宽，
     于是右边的按钮被挤出屏幕（上一版就是这么翻车的） */
  .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
  .filter-bar > * { min-width: 0; }
  .filter-bar > input[name="q"], .date-range, .filter-ends { grid-column: 1 / -1; }
  .filter-bar .chk { justify-self: stretch; width: auto; min-height: 30px; }
  .filter-bar .chk input { flex: 0 0 auto; width: 16px; height: 16px; }
  .filter-ends { gap: 10px; flex-wrap: wrap; }
  .filter-actions { margin-left: auto; justify-content: flex-end; }
  .msel-pop { width: min(280px, calc(100vw - 34px)); }
}

/* 端面头部 */
.portal-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin-bottom: 16px;
               border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line);
               box-shadow: var(--sh-1); }
.portal-hero .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
                   background: var(--brand-weak); color: var(--brand); }
.portal-hero h1 { font-size: 18px; }
.portal-hero p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

/* ============================================================ 响应式 */
@media (max-width: 1180px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid.two, .dash-grid.flat { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {   /* 原 900：整站手机壳（藏侧栏 / 开底栏 / 缩顶栏）收到 700 */
  .side { display: none; }
  .is-shell .app { margin-left: 0; }
  .tabbar { display: flex; }
  .dash { padding: 18px 14px 92px; }
  .is-shell .wrap { padding: 14px 14px 92px; }
  .wrap { padding-bottom: 92px; }
  .topbar { padding: 0 16px; height: 56px; }
  .dash-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dash-actions { margin-left: 0; width: 100%; }
  .dash-actions .btn { flex: 1; }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  .flash { margin: 12px 14px 0; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* P0：点「汇总」这类锚点跳过去时，标题别被固定底栏盖住 */
  html { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-num { font-size: 25px; }
  .kpi-label { font-size: 12px; }
  .panel-bd { padding: 14px; }
  .type-row { grid-template-columns: 74px 1fr 46px; }
  .type-pct { display: none; }
}

/* ============================================================ 仓库端录入 */
/* 不要写 max-width: 用大屏时两侧会空出一大块，内容挤在中间。
   靠 padding 控制呼吸感就够了，宽度交给浏览器。 */
.entry { max-width: none; margin: 0; padding: 18px 28px 40px; }
.entry-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.entry-head h1 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.entry-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.entry-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.entry-actions .btn { min-height: 32px; font-size: 12.5px; padding: 0 11px; }
/* 表单区（左）+ 统计（右）整体不要拉满屏：输入框太长，看一行要横跨半个屏幕。
   表格区仍然是全宽的（.sum-section 单独铺满），所以整体不会显得空。
   720 是按键反馈里红框的宽度定的。 */
.entry-grid { display: grid; grid-template-columns: minmax(0, 720px) minmax(340px, 1fr); gap: 16px;
              align-items: start; justify-content: start; }
.entry-grid > * { min-width: 0; }

.ef-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
           box-shadow: var(--sh-1); padding: 14px 16px 13px; min-width: 0; }
.ef-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.ef-top h2 { font-size: 14px; font-weight: 600; }
.ef-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.ef-tabs { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ef-tabs a { padding: 4px 9px; border-radius: 999px; font-size: 11.5px; color: var(--muted);
             border: 1px solid var(--line); background: #fff; white-space: nowrap; }
.ef-tabs a:hover { border-color: #d3dae5; }
.ef-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.hero-field { margin-bottom: 11px; position: relative; }
.hero-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.hero-field .req, .field .req { color: var(--danger); }
.hero-input {
  width: 100%; height: 46px; font-size: 16.5px; font-weight: 500; padding: 0 14px;
  border: 1.5px solid #dfe3ea; border-radius: 11px; background: #fcfdfe; color: var(--ink);
  font-family: inherit;
}
.hero-input::placeholder { font-weight: 400; font-size: 15px; color: #b3bbc8; }
.hero-input:focus { outline: none; border-color: var(--brand); background: #fff;
                    box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }

.ef-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.ef-grid > .field { min-width: 0; margin-bottom: 9px; }
.ef-grid .field > label { font-size: 12px; margin-bottom: 4px; }
.ef-grid .field > input, .ef-grid .field > select { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.fz-hint { font-size: 10.5px; color: var(--faint); margin-top: 3px; min-height: 13px;
           line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-hint.ok { color: var(--brand-d); }
.fz-hint.bad { color: var(--danger); }
.fz-bad { border-color: #f0b4ae !important; background: #fffaf9 !important; }

.ef-btns { display: flex; gap: 8px; margin-top: 3px; }
.ef-btns .btn { flex: 1; min-height: 40px; font-size: 13.5px; border-radius: 10px; }
.ef-btns .btn.primary { flex: 1.4; }
.ef-foot { font-size: 11px; color: var(--faint); margin-top: 8px; text-align: center; }

/* ---------------- 仓库报量：三步录入（2026-11-05 手机优先改版） ----------------
   不会用电脑的仓库员照着 ①②③ 走：报什么 → 要多少 → 什么时候要 → 提交。
   其余字段收进「更多选项」，默认收起，不占屏幕。 */
.step { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px;
        border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px;
        font-weight: 700; line-height: 1; vertical-align: 1px; }
.fld-tip { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.fld-inline { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 4px; }

/* 数量：大号字 + 两边加减，手指点得准 */
/* ② 单位在左、数量在右并排一行（2026-11-06 仓库反馈：右边原本空一大片，还多占一行） */
.qty-block { margin-bottom: 13px; }
.qty-line { display: flex; gap: 10px; align-items: stretch; }
.unit-col { flex: 0 0 34%; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qty-col  { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qty-label, .ur-k {
  display: block; font-size: 12px; color: var(--muted); line-height: 18px; white-space: nowrap;
}

/* 数量：大号字 + 两边加减，手指点得准 */
.qty-row { display: flex; gap: 6px; align-items: stretch; }
.qty-row input {
  flex: 1 1 auto; min-width: 0; height: 48px; min-height: 48px; padding: 0 6px;
  font-size: 19px; font-weight: 650; text-align: center; letter-spacing: .01em;
  border: 1.5px solid #dfe3ea; border-radius: 11px; background: #fff;
  font-variant-numeric: tabular-nums;
}
.qty-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }
.qty-btn { flex: 0 0 40px; height: 48px; border-radius: 11px; border: 1px solid var(--line);
           background: #fff; font-size: 18px; font-weight: 600; color: var(--ink-2);
           line-height: 1; cursor: pointer; }
.qty-btn:active { background: var(--brand-weak); border-color: var(--brand); color: var(--brand); }
/* 桌面上一行太宽会把「- 25 +」拉成一条长带，收窄到手指/眼睛舒服的宽度 */
@media (min-width: 901px) {
  .qty-row { max-width: 300px; }
  .quick-dates { max-width: 360px; }
}

/* 单位：直接输入，16px 字号保证 iOS 聚焦不放大页面；与数量框等高对齐 */
.unit-row { display: flex; align-items: stretch; }
.unit-row input {
  flex: 1 1 auto; width: 100%; min-width: 0; height: 48px; min-height: 48px; padding: 0 8px;
  font-size: 16px; text-align: center;
  border: 1.5px solid #dfe3ea; border-radius: 11px; background: #fff;
}
.unit-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }

/* 到仓时间：三个快捷日 */
.need-field { margin-bottom: 13px; }
.quick-dates { display: flex; gap: 6px; margin-top: 7px; }
.quick-dates button { flex: 1; height: 34px; border-radius: 9px; border: 1px dashed #d8dfe9;
                      background: #fbfcfe; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.quick-dates button:active { border-style: solid; border-color: var(--brand); color: var(--brand);
                             background: var(--brand-weak); }

/* 更多选项 */
.more-fields { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.more-fields > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
                         gap: 6px; padding: 3px 0; font-size: 12.5px; color: var(--muted); }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::before { content: '＋'; color: var(--brand); font-weight: 700; font-size: 13px; }
.more-fields[open] > summary::before { content: '－'; }
.more-fields .mf-sub { color: var(--faint); font-size: 11.5px; }
.more-fields .ef-grid { margin-top: 11px; }

/* ============================================================ 商品档案联想 */
.lk-tip { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 6px; }
.lk {
  position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16); overflow: auto; max-height: 328px;
  padding: 5px;
}
.lk[hidden] { display: none !important; }
.lk-item { padding: 7px 10px; border-radius: 8px; cursor: pointer; line-height: 1.35; }
.lk-item:hover, .lk-item.sel { background: #eef4ff; }
.lk-nm { font-size: 14px; font-weight: 600; color: var(--ink); }
.lk-meta {
  font-size: 11.5px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============================================================ 智能批量导入 */
.fuzzy-box { margin-top: 14px; border: 1px dashed #d8dfe8; border-radius: 11px; background: #fbfcfe; }
.fuzzy-head {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 10px 12px;
  background: transparent; border: 0; cursor: pointer; color: var(--ink-2);
  font-size: 13px; font-weight: 600; text-align: left; font-family: inherit;
}
.fuzzy-head:hover { color: var(--brand); }
.fuzzy-sub { font-weight: 400; font-size: 11.5px; color: var(--faint); }
.fuzzy-arr { margin-left: auto; font-size: 10px; color: var(--faint); transition: transform .18s; }
.fuzzy-head.on .fuzzy-arr { transform: rotate(180deg); }
/* Excel 导入入口：同一位置、不同形状 —— 实线框 + 淡蓝底，跟上面那个可折叠的区分开 */
.xls-box { border-style: solid; border-color: #dbe6f7; background: #f7faff; }
.xls-link { display: flex; text-decoration: none; }
.xls-link:hover { color: var(--brand); border-color: #b9d2f3; }
.fuzzy-body { padding: 0 12px 12px; }
.fuzzy-body[hidden] { display: none !important; }
.fuzzy-body textarea {
  width: 100%; resize: vertical; min-height: 74px; padding: 9px 11px;
  border: 1px solid #d8dfe8; border-radius: 9px; font-family: inherit;
  font-size: 13px; line-height: 1.6; color: var(--ink); background: #fff;
}
.fuzzy-body textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.fuzzy-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.fuzzy-hint { font-size: 11px; color: var(--faint); flex: 1; min-width: 0; }

.entry-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sum-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* 三张数字卡同一个 grid 里，桌面上「在采购手里」独占一行（跟原来一样） */
.sum-row > .sum-card.wide { grid-column: 1 / -1; }
.sum-card { display: block; background: var(--panel); border: 1px solid var(--line);
            border-radius: 12px; padding: 10px 13px 11px; box-shadow: var(--sh-1); color: inherit;
            min-width: 0; }
.sum-card.is-accent { border-color: #dbe6fb; background: linear-gradient(180deg, #f7faff, #fff); }
.sum-k { font-size: 11.5px; color: var(--muted); }
.sum-n { font-size: 21px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px;
         font-variant-numeric: tabular-nums; }
.sum-n i { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 3px; font-weight: 400; }
.sum-hint { font-size: 11px; color: var(--brand); margin-top: 3px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rc-row { display: flex; align-items: center; gap: 9px; padding: 8px 14px;
          border-bottom: 1px solid var(--line-2); color: inherit; }
.rc-row:last-child { border-bottom: none; }
.rc-row:hover { background: #fafbfc; }
.rc-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.rc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis;
           white-space: nowrap; }
.rc-meta { font-size: 11px; color: var(--faint); margin-top: 1px; overflow: hidden;
           text-overflow: ellipsis; white-space: nowrap; }
.rc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.rc-qty { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rc-qty i { font-style: normal; font-size: 10.5px; color: var(--faint); margin-left: 2px; }
.entry-side .badge { font-size: 10.5px; padding: 1px 6px; }

/* 底部汇总 */
.entry-sum { margin-top: 14px; }
.entry-sum .panel-hd { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; }
.hd-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.range-tabs { display: flex; gap: 2px; background: #f1f4f8; padding: 3px; border-radius: 999px; }
.range-tabs a { padding: 4px 11px; font-size: 12px; color: var(--muted); border-radius: 999px;
                white-space: nowrap; }
.range-tabs a:hover { color: var(--ink-2); }
.range-tabs a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.10); }
.sum-filter { display: flex; gap: 7px; align-items: center; padding: 9px 16px;
              border-bottom: 1px solid var(--line-2); flex-wrap: wrap; background: #fcfdfe; }
.sum-filter select, .sum-filter input[type=text] {
  width: auto; min-width: 128px; min-height: 30px; padding: 3px 9px; font-size: 12.5px;
  border-radius: 8px;
}
.entry-sum .sum-scroll { max-height: 430px; }
.entry-note { margin-top: 9px; }

@media (max-width: 1120px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  .entry-side { flex-direction: row; flex-wrap: wrap; }
  .entry-side > .sum-row { flex: 1 1 300px; }
  .entry-side > .panel { flex: 2 1 340px; }
}
@media (max-width: 700px) {   /* 原 900：手机布局收到 700，桌面窗口再窄也不该变手机版 */
  /* 底部给固定提交栏留位置（原来 88px 是给 tabbar 的） */
  .entry { padding: 12px 12px 170px; }
  .entry-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* topbar 已经写着「仓库报量」，手机上别再重复一遍，省一行给表单 */
  .entry-head h1 { display: none; }
  .entry-head p { font-size: 11.5px; }
  .entry-actions { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto;
                   scrollbar-width: none; }
  .entry-actions::-webkit-scrollbar { display: none; }
  .entry-actions .btn { flex: 0 0 auto; }
  .ef-grid { grid-template-columns: 1fr; }
  .ef-top { flex-wrap: wrap; }
  /* 类型也改成一行横滑，别占两行 */
  .ef-tabs { margin-left: 0; justify-content: flex-start; flex-wrap: nowrap; width: 100%;
             overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ef-tabs::-webkit-scrollbar { display: none; }
  .hero-input { height: 46px; font-size: 16px; }
  .ef-card { padding: 14px 13px; }

  /* 提交按钮钉在底部（tabbar 上方）：滚到哪儿都能点，新人不会找不到 */
  .ef-btns {
    position: fixed; left: 0; right: 0; z-index: 45;
    bottom: calc(56px + env(safe-area-inset-bottom));  /* = tabbar 实际高度 55 + 1 */
    margin: 0; padding: 9px 12px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 22px rgba(16, 24, 40, .08);
  }
  .ef-btns .btn { flex: 1; min-height: 46px; font-size: 15px; border-radius: 12px; }
  /* 和桌面一致：两个按钮等宽（原来主按钮 1.7，一大一小不对称） */
  .ef-btns .btn.primary { flex: 1; }
  .ef-foot { display: none; }

  .guide-ops { display: none; }

  /* 概况卡：1120 断点给的 flex:1 1 220px 是按「横排宽度」写的，手机一竖排就变成卡片的最小
     高度，220/180/340 撑出三块大白。这里把高度交还给内容，三张数字卡挤成一行。 */
  .entry-side { flex-direction: column; gap: 8px; }
  .entry-side > .sum-row,
  .entry-side > .panel { flex: 0 0 auto; }
  .sum-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sum-row > .sum-card.wide { grid-column: auto; }
  .sum-card { padding: 8px 10px 9px; border-radius: 10px; }
  .sum-k { font-size: 11px; }
  .sum-n { font-size: 19px; margin-top: 2px; }
  .sum-n i { font-size: 10px; }
  .sum-hint { font-size: 10px; margin-top: 2px; }
  /* 下单次数：行高也压一压，别占半屏 */
  .entry-side .panel-hd { padding: 9px 11px; }
  .entry-side .panel-bd.flush { padding: 0; }
  .pr-row { padding: 5px 11px; }

  .hd-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .entry-sum .sum-scroll { max-height: 70vh; }
  .sum-table th.act, .sum-table td.act { width: 112px; padding-right: 6px; }
  .act-row { gap: 2px; }
}

/* ============================================================ 仓库汇总表 */
.sum-scroll { overflow: auto; max-height: calc(100vh - 300px); }
.sum-table thead th {
  position: sticky; top: 0; z-index: 3; background: #f8fafc;
  border-bottom: 1px solid var(--line); padding-top: 11px; padding-bottom: 11px;
  box-shadow: 0 1px 0 var(--line);
}
.sum-table td { padding-top: 11px; padding-bottom: 11px; }
.sum-table tbody tr:nth-child(even) { background: #fcfdfe; }
.sum-table tbody tr:hover { background: #f4f7fc; }
.sum-foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 18px;
  border-top: 1px solid var(--line); background: #fbfcfe; font-size: 12.5px; color: var(--muted);
}
.sum-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-foot-item { font-variant-numeric: tabular-nums; }

/* 排序表头 */
.sum-table th { white-space: nowrap; }
.sum-table .so { color: inherit; display: inline-flex; align-items: center; gap: 3px; }
.sum-table .so:hover { color: var(--brand); }
.sum-table .so.on { color: var(--ink); font-weight: 600; }
.sum-table .sarr { font-size: 10px; width: 9px; color: var(--brand); }
.sum-table .so:not(.on) .sarr { color: #c4ccd8; }
.sum-table .so:not(.on):hover .sarr::after { content: "↕"; }
.sum-table .so.on .sarr { color: var(--brand); }

/* 采购台表头排序：和台账同一套观感。
   以前只有 .sum-table 有这组样式，采购台加了排序链接却没样式，
   箭头会是纯文本、也不给悬停反馈。 */
.b-table th { white-space: nowrap; }
.b-table .so { color: inherit; display: inline-flex; align-items: center; gap: 3px;
  text-decoration: none; }
.b-table .so:hover { color: var(--brand); }
.b-table .so.on { color: var(--ink); font-weight: 600; }
.b-table .sarr { font-size: 10px; width: 9px; color: var(--brand); }
.b-table .so:not(.on) .sarr { color: #c4ccd8; }
.b-table .so:not(.on):hover .sarr::after { content: "↕"; }
.b-table .so.on .sarr { color: var(--brand); }

/* 勾选列 / 操作列 */
.sum-table th.ck, .sum-table td.ck { width: 34px; padding-left: 14px; padding-right: 0; }
.sum-table td.ck input, .sum-table th.ck input {
  width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; margin: 0;
  vertical-align: -2px;
}
/* 操作列：5 个图标按钮加起来要 160+ px，原来给 132px 装不下，图标溢出到表格外面。
   2026-11-13：表格拉得比列宽之和大时（大屏），fixed 布局会把**所有列等比放大**，
   操作列跟着涨到 400+，图标居中后右边空出一大块（用户报「不是应该固定在最右边」）。
   table 没法只让某一列吸收剩余空间，所以改成：图标一律靠右贴边、表头也跟着右对齐，
   不管列被拉多宽，「操作」始终钉在表格最右边。
   注意：别在这一列上加 position:sticky —— 1366 这类窄屏表格本来就要横滑，
   吸附会直接盖住「状态」列，反而更难读。 */
.sum-table th.act, .sum-table td.act {
  text-align: right; padding-right: 12px; padding-left: 6px; white-space: nowrap;
}
.sum-table td.act .act-row { justify-content: flex-end; }
.act-row { display: inline-flex; align-items: center; gap: 4px; }
/* 行内操作按钮。原来 24px / 图标 14px / 默认灰，满屏都是小灰点，
   用户反馈「看不到、很难点」。现在统一放大到 30px、图标 16px，
   并且每种操作给固定颜色，不靠 hover 才显色。 */
.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: #475569; cursor: pointer; vertical-align: middle;
  padding: 0; transition: background .12s, color .12s, border-color .12s;
}
.ibtn:hover { background: #eef2f7; color: var(--ink); border-color: var(--line); }

/* 修改：蓝 */
.ibtn.warn { color: #b54708; }
.ibtn.warn:hover { background: #fff6ed; border-color: #f7d9b8; color: #93370d; }

/* 删除：红（默认就红，不用等 hover） */
.ibtn.danger { color: #c2410c; }
.ibtn.danger:hover { background: #fff3f2; color: #b91c1c; border-color: #f6d5d2; }

/* 确认收货：绿 */
.ibtn.ok { color: #15803d; }
.ibtn.ok:hover { background: #f0faf3; color: #166534; border-color: #cbe8d7; }

.sum-table tr:hover .ibtn { color: var(--ink-2); }
.sum-table tr:hover .ibtn.ok { color: #15803d; }
.sum-table tr:hover .ibtn.danger { color: #c2410c; }

/* 不可用：给虚线框 + 提到 45%，鼠标上去能看到，但一眼知道点不了 */
.ibtn.off {
  opacity: .5; cursor: not-allowed;
  border-style: dashed; border-color: #d9dfe7; color: #94a3b8;
}
.ibtn.off:hover { background: transparent; border-color: #d9dfe7; color: #94a3b8; }
.sum-table tr:hover .ibtn.off { color: #94a3b8; }

/* 操作列稍微宽松一点，四个按钮不挤 */
.sum-table .act-row { display: inline-flex; align-items: center; gap: 2px; }

/* 文字版行内按钮（2026-11-25：操作列不用图标，直接写 编辑/删除/提交/收货/详情）。
   颜色沿用 ibtn 那套（warn 橙 / danger 红 / sub 蓝 / ok 绿），只是形状变文字药丸。
   2026-11-26：外观改成采购端那种淡底圆角药丸，最终样式在文件末尾统一覆盖。 */
.ibtn.tt {
  width: auto; min-width: 0; height: 26px; padding: 0 10px;
  border-radius: 7px; border-color: var(--line); background: #fff;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.ibtn.tt:hover { background: #f6f8fb; }
/* 置灰的（点不了的）再小一号、字重变细：没有彩色药丸衬着，纯灰字容易显得又大又虚 */
.ibtn.tt.off { font-size: 11.5px; font-weight: 400; padding: 0 8px; height: 24px; opacity: .45; }
.sum-table .act-row { gap: 6px; }

/* 行内编辑 */
.rowform { display: none; }
.sum-table tr:not(.editing) .edit-only { display: none !important; }
.sum-table tr.editing .view-only { display: none !important; }
.sum-table tr.editing { background: #fffdf6 !important; box-shadow: inset 0 0 0 1px #f2e2b8; }
.sum-table tr.editing td { padding: 6px 5px; }
.sum-table tr.editing td.ck { padding-left: 10px; padding-right: 0; }
.sum-table tr.editing td.act { padding-right: 8px; }
.cell-in, .sum-table td input.cell-in, .sum-table td select.cell-in {
  width: 100%; min-width: 0; height: 30px; min-height: 30px;
  padding: 2px 6px; font-size: 12.5px; line-height: 1.2;
  border: 1px solid #d8dfe8; border-radius: 6px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.cell-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.10); }
.cell-in.r { text-align: right; font-variant-numeric: tabular-nums; }
.cell-in.c { text-align: center; }
select.cell-in { padding: 0 4px; }
/* 类型下拉：96px 的类型格里要放「副食周需」四个字 + 下拉箭头，
   按普通 cell-in 的 12.5px 会被裁掉最后半个字（2026-11-17 截图发现）。
   必须带上 .sum-table td 前缀：上面那条 `.sum-table td select.cell-in` 的权重更高，
   只写 select.cell-in.type-in 会被它盖掉（试过，字号仍是 12.5）。 */
.sum-table td select.cell-in.type-in { font-size: 11.5px; padding: 0 2px; }
.act-inline { display: inline-flex; align-items: center; gap: 4px; }
.act-inline .btn.sm { min-height: 26px; height: 26px; padding: 0 7px; font-size: 12px; }

/* 批量条 */
.batch { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.batch[hidden] { display: none !important; }

/* 排序是局部刷新的：等数据时给点反馈，顺便挡住连点 */
#sum-live.is-loading { opacity: .55; transition: opacity .12s ease; }
#sum-live.is-loading .sum-scroll { pointer-events: none; }

/* 筛选加载提示（2026-11-26）：数据多时浏览器重绘要一会儿，给个明确提示，
   免得同事以为点坏了反复点。只在请求超过 150ms 才由 JS 显示（见 app.js sumLoadShow）。 */
.sum-panel { position: relative; }
.sum-load-tip {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px;
  background: #fff; border: 1px solid #dbe6fb;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .12);
  color: #2563eb; font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.sum-load-tip[hidden] { display: none; }
.sum-load-tip .spinner {
  width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid #d4e5ff; border-top-color: #2563eb;
  border-radius: 50%; animation: sum-spin .7s linear infinite;
}
@keyframes sum-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sum-load-tip .spinner { animation-duration: 1.6s; }
}

/* 提示条：别处正在发生的事，先告一声 */
.notice {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 10px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f2e2b8; color: #8a5a00; font-size: 13px;
  line-height: 1.5;
}
.notice b { color: #6b4500; }
.notice a { color: #8a5a00; text-decoration: underline; font-weight: 600; }

/* 到货差异徽章（采购端） */
.badge.diff { background: #fff4e5; color: #b54708; border: 1px solid #f5d9b0; }

/* 实际到货数量：到了的用青绿，没到的显示 — */
.sum-table .q.vin { color: #0f766e; }

/* 实际到货输入框：小一号、右对齐，填完回车就存 */
.sum-table input.arr-in {
  width: 100%; max-width: 74px; height: 26px; padding: 1px 6px; text-align: right;
  font-size: 12.5px; font-variant-numeric: tabular-nums; font-family: inherit;
  border: 1px solid #d8dfe8; border-radius: 6px; background: #fff; color: var(--ink);
}
.sum-table input.arr-in::placeholder { color: #b9c0cb; font-size: 11.5px; }
.sum-table input.arr-in:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
.sum-table input.arr-in.is-ok { border-color: #34a853; box-shadow: 0 0 0 2px rgba(52, 168, 83, .12); }
.sum-table input.arr-in.is-bad { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(220, 38, 38, .12); }

/* 刚新增的那一行：静态黄边（不滚动、不抢注意力），外加闪一下 */
.sum-table tr.is-new > td { background: #fffbe6; }
.sum-table tr.is-new > td:first-child { box-shadow: inset 3px 0 0 0 #f0b429; }
.sum-table tr.flash > td { animation: ppRowFlash 2.6s ease; }
@keyframes ppRowFlash {
  0%   { background: #fff2c2; }
  45%  { background: #fff6d6; }
  100% { background: transparent; }
}
.batch-n { color: var(--muted); }
.batch-n b { color: var(--brand); }
.sum-filter .sf-sep { font-size: 11.5px; color: var(--faint); padding-left: 4px; }
.sum-filter .sf-dash { color: #c3cad6; font-size: 12px; }
.sum-filter input[name=sd1], .sum-filter input[name=sd2] { min-width: 104px; width: 118px; }

/* ============================================================ 顶部引导条 */
.guide {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(180deg, #f6f9ff, #fbfdff);
  border: 1px solid #dde7f8; border-radius: 12px;
  padding: 10px 40px 10px 14px; margin-bottom: 12px; position: relative;
  font-size: 12.5px; color: #2b4a76;
}
.guide[hidden] { display: none !important; }
.guide-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.guide-steps { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.guide-steps b {
  width: 17px; height: 17px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center;
  justify-content: center; flex: 0 0 auto;
}
.guide-steps .arr { color: #a9bcd8; font-size: 11px; }
.guide-ops { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: #5b7396; font-size: 12px; }
.guide-ops span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.guide-ops .ico { color: #8ba3c4; }
.guide-x {
  position: absolute; right: 8px; top: 8px; width: 22px; height: 22px;
  border: 0; background: transparent; color: #93a7c2; font-size: 16px; line-height: 1;
  cursor: pointer; border-radius: 6px;
}
.guide-x:hover { background: #e8effb; color: #45618b; }
.ibtn.warn { color: #b54708; }
.ibtn.warn:hover { background: #fff6ed; border-color: #f7d9b8; color: #93370d; }
@media (max-width: 900px) {
  .guide { padding: 10px 34px 10px 12px; }
  .guide-steps { gap: 8px 12px; }
  .guide-ops { gap: 8px 12px; }
}

/* 详情页底部返回 */
.detail-back { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 30px; }
.detail-back .btn { min-height: 38px; }

/* ============================================================ 采购工作台 */
.b-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.b-kpi-card {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 13px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-1); color: inherit; text-decoration: none; min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.b-kpi-card:hover { border-color: #cdd7e5; box-shadow: var(--sh-2); transform: translateY(-1px); }
.b-kpi-k { font-size: 12px; color: var(--muted); }
.b-kpi-n { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
.b-kpi-h { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-kpi-card.is-hot { border-color: #f3d9a8; background: #fffdf5; }
.b-kpi-card.is-hot .b-kpi-n { color: #b54708; }
.b-kpi-card.is-warm .b-kpi-n { color: var(--ink-2); }
.b-kpi-card.is-bad { border-color: #f3c9c4; background: #fff7f6; }
.b-kpi-card.is-bad .b-kpi-n { color: var(--danger); }

@media (max-width: 760px) {
  .b-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 列表行：超期整行左边一条红线 */
.item.is-late { box-shadow: inset 3px 0 0 0 #e2564b; }
.tl-late { color: var(--danger); font-weight: 600; }
.tl-soon { color: #b54708; font-weight: 600; }
.tl-ok { color: #15803d; }
.tl-need { color: var(--faint); }

/* ============================================================ 采购详情 */
.buy-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.buy-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.buy-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.buy-figs { display: flex; gap: 18px; flex-wrap: wrap; }
.buy-fig { display: flex; flex-direction: column; gap: 1px; }
.buy-fig .k { font-size: 11px; color: var(--faint); }
.buy-fig .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.buy-fig .v.sm { font-size: 15px; }
.buy-fig .v i { font-size: 12px; font-weight: 400; font-style: normal; color: var(--muted); margin-left: 2px; }
.buy-note { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }

/* ---------------- 汇总页备注：别人的只读、自己那句可编辑 ----------------
   以前整格只读，采购一留话仓库就以为"写不了"。现在自己的那句是输入框，
   底下那点虚线是"这里能改"的暗示，跟数量那一格一个写法。 */
.wh-note-cell { min-width: 150px; }
.wh-note-tag {
  display: block; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px;
  padding: 1px 0;
}
.wh-note-tag + .note-in { margin-top: 3px; }
.note-in {
  width: 100%; min-width: 96px; box-sizing: border-box;
  border: 0; border-bottom: 1px dashed var(--line); background: transparent;
  padding: 3px 2px; font: inherit; font-size: 12.5px; color: var(--text);
  border-radius: 0;
}
.note-in::placeholder { color: var(--faint); }
.note-in:hover { border-bottom-color: var(--brand); }
.note-in:focus { outline: none; border-bottom: 1px solid var(--brand); background: #f7faff; }
.note-in.has-val { color: var(--text); font-weight: 500; }
.note-in.is-bad { border-bottom-color: #d92d20; background: #fff5f4; }
.note-in.is-ok { border-bottom-color: #12b76a; }

.buy-sect { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.buy-sect:first-child { padding-top: 2px; }
.buy-sect:last-child { border-bottom: 0; padding-bottom: 2px; }
.buy-sect-t { font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: .04em; margin-bottom: 8px; }
.buy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.buy-grid .field { min-width: 0; }
@media (max-width: 620px) {
  .buy-grid { grid-template-columns: 1fr; }
}

/* 预计到货：快捷按钮 + 与仓库要求的对比提示 */
.eta-quick { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.eta-quick button {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted); font-family: inherit;
}
.eta-quick button:hover { border-color: var(--brand); color: var(--brand); background: #f6f9ff; }
.eta-hint { font-size: 11.5px; margin-top: 5px; min-height: 15px; }
.eta-hint.ok { color: #15803d; }
.eta-hint.bad { color: var(--danger); }

.buy-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.buy-actions .btn.lg { min-height: 42px; padding: 0 22px; font-size: 15px; }
.buy-actions .btn.primary.lg { box-shadow: 0 6px 18px rgba(37, 99, 235, .22); }

/* 仓库汇总表里：预计到货小字 */
.eta-mini { display: block; font-size: 11px; color: #b54708; margin-top: 1px; }
.eta-mini.late { color: var(--danger); font-weight: 600; }

/* 采购把货改送到别的仓：原仓库这行给个标记 */
.wh-moved {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px;
  font-size: 10.5px; line-height: 15px; background: #fff4e5; color: #b54708;
  border: 1px solid #f5d9b0; vertical-align: 1px;
}

/* ============================================================ 采购工作台（表格版） */
.notice.slim { padding: 7px 12px; font-size: 12.5px; margin-bottom: 8px; }

.b-kpi { gap: 8px; margin-bottom: 10px; }
.b-kpi-card { padding: 9px 12px 10px; border-radius: 10px; }
.b-kpi-n { font-size: 22px; }
.b-kpi-k { font-size: 11.5px; }
.b-kpi-h { font-size: 10.5px; }

.b-filter {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 10px; box-shadow: var(--sh-1);
}
.b-filter select, .b-filter input[type="text"] {
  height: 32px; min-height: 32px; padding: 0 9px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.b-filter select { min-width: 130px; }
.b-filter input[type="text"] { flex: 1; min-width: 160px; max-width: 320px; }
.b-filter select:focus, .b-filter input[type="text"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}

/* 日期框：和筛选栏其他控件同高同圆角，宽度刚好放下 2026/11/06 + 日历图标。
   2026-11-10 试过「起–止」双框，占太宽还难看，用户否掉了，就一个框。 */
.b-filter input.od-one {
  height: 32px; min-height: 32px; padding: 0 9px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); font-family: inherit; width: 148px; flex: 0 0 auto;
  box-sizing: border-box;
}
.b-filter input.od-one:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
/* 没填的时候浏览器会显示 yyyy/mm/日 —— 调成占位符的灰，别看着像已经填了东西。
   has-val 这个类是 app.js 打的（date 框没有 placeholder-shown 可用）。 */
.b-filter input.od-one:not(.has-val)::-webkit-datetime-edit { color: #c2cad6; }

.c-panel { overflow: hidden; }
.c-scroll { max-height: calc(100vh - 290px); overflow: auto; }
.c-table { width: 100%; }
.c-table thead th {
  position: sticky; top: 0; z-index: 3; background: #f8fafc;
  font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
}
.c-table td { padding: 9px 12px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; font-size: 13px; }
.c-table tbody tr:hover { background: #f7faff; }
.c-table tbody tr.is-late { box-shadow: inset 3px 0 0 0 #e2564b; }
.c-table .r { text-align: right; }
.c-table .act { text-align: right; padding-right: 14px; white-space: nowrap; }
.c-table .u { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 2px; }

.c-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.c-name:hover { color: var(--brand); text-decoration: underline; }
.c-sub { font-size: 11px; color: var(--faint); margin-top: 2px; line-height: 1.35; }
.c-sub .tdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }

/* 缺的字段：橙色「待填」，一眼看到还差什么 */
.c-todo { color: #b54708; background: #fff4e5; border: 1px solid #f5d9b0;
          padding: 0 5px; border-radius: 5px; font-size: 11.5px; white-space: nowrap; }
.c-none { color: #c3cad4; }
.c-diff { font-size: 11px; color: #0f766e; margin-top: 2px; }

.c-ok { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.c-soon { color: #b54708; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-late { color: var(--danger); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-soon i, .c-late i {
  font-style: normal; font-size: 10px; font-weight: 500; margin-left: 4px;
  padding: 0 4px; border-radius: 4px; background: currentColor;
}
.c-soon i { color: #fff; background: #e09b32; }
.c-late i { color: #fff; background: #e2564b; }

.c-foot {
  padding: 9px 14px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line); background: #fbfcfe;
}

/* 采购工作台：顶部与内容左边缘对齐 */
.b-tabs { padding: 0 0 12px; }
.b-filter-tip { font-size: 11.5px; color: var(--faint); margin-left: auto; }

/* 表格里可直接编辑的格子 */
.c-table input.q-in {
  width: 100%; height: 28px; padding: 0 7px; font-size: 12.5px; font-family: inherit;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink);
  box-sizing: border-box;
}
.c-table input.q-in:hover { border-color: #dee5ef; background: #fff; }
.c-table input.q-in:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
.c-table input.q-in.r { text-align: right; font-variant-numeric: tabular-nums; }
.c-table input.q-in::placeholder { color: #b8873a; }
/* 还没填的格子：淡橙底，一眼看得出缺什么 */
.c-table input.q-in.empty { background: #fff8ec; border-color: #f5e2c4; }
.c-table input.q-in.empty:hover { background: #fffdf7; }
.c-table input.q-in.warn { color: var(--danger); font-weight: 600; }
.c-table input.q-in.saved { border-color: #34a853; background: #f3fbf5; }
.c-table input.q-in.bad { border-color: var(--danger); background: #fff6f5; }

/* ============================================================ 采购工作台 v2：就地填写 */
.b-table .c-chk { text-align: center; padding-left: 12px; padding-right: 0; }
.b-table .c-chk input { width: 15px; height: 15px; cursor: pointer; vertical-align: middle; }
/* 商品编码：等宽小字，能对得上单号就行，不抢商品名的注意力（2026-11-11 加的列） */
.b-cards .bc-code { color: #6b7684; font-variant-numeric: tabular-nums; }

/* 类型列：上面「下单 11-05」，下面类型。两行都从同一个左边缘起（2026-11-11 用户说没对齐） */
.b-table td.c-type .c-twrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
/* 两行视觉对称：下面那行的文字被 7px 色点 + 7px 间距顶开 14px，
   所以上行的「下单」也留同样左边距，两行文字从同一条竖线起。 */
.b-table td.c-type .c-od {
  font-size: 13px; color: #55606e; font-variant-numeric: tabular-nums;
  line-height: 1.2; white-space: nowrap;
}
.b-table td.c-type .c-od > i {
  font-style: normal; font-size: 13px; color: #9aa4b2; margin-right: 5px;
}
.b-table td.c-type .c-tn { display: flex; align-items: center; line-height: 1.2; }
.b-table td.c-type .c-tn > .tdot { flex: 0 0 auto; margin-right: 7px; }
/* 仓库名对不上仓库表的老数据：红色 + 虚线圈，一眼能挑出来（2026-11-12） */
.b-table .c-sub.is-unknown {
  color: #c2410c; font-weight: 600;
  border-bottom: 1px dashed #fdba74; display: inline-block;
}

.b-table td.c-code {
  font-size: 16px; color: #3f4854; font-variant-numeric: tabular-nums;
  font-weight: 600; letter-spacing: .2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.b-table tbody tr.b-row:hover { background: #f7faff; }
.b-table tbody tr.b-row.is-late { box-shadow: inset 3px 0 0 0 #e2564b; }

/* 导出被「缺项」挡下来的行（2026-11-09）：
   后端回跳时带 bad=id,id ，这些行整行浅红 + 左边红条 + 闪两下。
   以前只弹一句「这 N 条还没填齐」，人还得自己满屏找是哪几条。 */
.b-table tbody tr.b-row.is-bad { box-shadow: inset 3px 0 0 0 #d64545; background: #fff1f0; }
.b-table tbody tr.b-row.is-bad:hover { background: #ffe9e7; }
.b-table tbody tr.b-row.is-bad > td { background: inherit; }
@keyframes b-bad-flash {
  0%, 100% { background: #fff1f0; }
  50%      { background: #ffd7d2; }
}
.b-table tbody tr.b-row.is-bad { animation: b-bad-flash 1.1s ease-in-out 2; }

.b-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.b-school {
  font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px;
  background: #eef4ff; color: #2f6fd0; border: 1px solid #d8e4fb; white-space: nowrap;
}
.b-gap {
  font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px;
  background: #fff4e5; color: #b54708; border: 1px solid #f5d9b0; white-space: nowrap;
}
.b-need {
  font-size: 11.5px; line-height: 18px; padding: 0 6px; border-radius: 5px;
  background: #fff8ec; color: #b54708; border: 1px solid #f5e2c4; white-space: nowrap;
}
.b-val { font-size: 13px; color: var(--ink-2); }
.b-tag {
  font-style: normal; font-size: 10px; line-height: 15px; padding: 0 4px;
  border-radius: 4px; margin-left: 4px; vertical-align: 1px;
}
.b-tag.bad { background: #fdeceb; color: #b42318; border: 1px solid #f6d5d2; }
.b-tag.warn { background: #fff4e5; color: #b54708; border: 1px solid #f5d9b0; }

/* 展开行 */
.b-edit > td {
  padding: 0 !important; background: #f6f9ff;
  border-bottom: 1px solid #dbe6f7 !important;
  box-shadow: inset 3px 0 0 0 var(--brand);
}
.b-edit-form { padding: 12px 16px 13px 18px; }
.b-edit-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.b-edit-head b { font-size: 13.5px; }
.b-edit-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px;
}
.b-edit-grid .field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.b-edit-grid .field > span { font-size: 11px; color: var(--muted); }
.b-edit-grid input, .b-edit-grid select {
  height: 30px; min-height: 30px; padding: 0 8px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--ink); font-family: inherit; width: 100%; box-sizing: border-box;
}
.b-edit-grid input:focus, .b-edit-grid select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
.b-edit-note { grid-column: span 2; }
.b-edit-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.b-edit-foot .btn { height: 30px; min-height: 30px; padding: 0 14px; font-size: 12.5px; }
.b-edit-hint { font-size: 11.5px; color: var(--faint); margin-left: auto; }

/* 批量条 */
.b-bulk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 10px; border-radius: 10px;
  background: #f0f6ff; border: 1px solid #cddff8; box-shadow: var(--sh-1);
}
.b-bulk[hidden] { display: none !important; }
.b-bulk b { font-size: 12.5px; color: #185fa5; }
.b-bulk-sep { width: 1px; height: 18px; background: #cddff8; }
.b-bulk input[type="text"] {
  height: 30px; min-height: 30px; padding: 0 9px; font-size: 12.5px; width: 148px;
  border: 1px solid #cddff8; border-radius: 7px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.b-bulk input[type="text"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
.b-bulk-tip { font-size: 11.5px; color: var(--faint); margin-left: auto; }

@media (max-width: 1180px) {
  .b-edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-edit-note { grid-column: span 3; }
}
@media (max-width: 900px) {
  .b-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-edit-note { grid-column: span 2; }
}

/* 证明标记（列表里） */
.b-cert-tag {
  font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px;
  white-space: nowrap; border: 1px solid transparent; display: inline-block;
}
.b-cert-tag.ok { background: #eaf7ef; color: #15803d; border-color: #cbe9d7; }
.b-cert-tag.no { background: #fdeceb; color: #b42318; border-color: #f6d5d2; }

/* 展开区里的证明上传 */
.b-cert {
  margin: 0 16px 13px 18px; padding: 10px 12px 11px;
  border: 1px dashed #cddff8; border-radius: 9px; background: #fff;
}
.b-cert-hd {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px;
}
.b-cert-hd .tiny { font-weight: 400; color: var(--faint); }
.b-cert-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.b-cert-item {
  position: relative; width: 66px; height: 66px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--line); background: #f3f6fa;
}
.b-cert-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-cert-item form { margin: 0; height: 0; }
.b-cert-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; border: 0; background: rgba(15, 23, 42, .58); color: #fff;
  font-size: 12px; line-height: 18px; cursor: pointer; padding: 0;
}
.b-cert-del:hover { background: var(--danger); }
.b-cert-add { margin: 0; }
.b-cert-add label {
  display: flex; align-items: center; justify-content: center; width: 66px; height: 66px;
  border: 1px dashed #c3d4ea; border-radius: 8px; cursor: pointer;
  color: var(--muted); font-size: 11.5px; background: #fbfcfe; text-align: center;
}
.b-cert-add label:hover { border-color: var(--brand); color: var(--brand); background: #f6f9ff; }
.b-cert-add input[type="file"] { display: none; }

/* ============================================================ 仓库端：实际收货 */
.sum-table input.arr-in {
  width: 62px; height: 26px; padding: 0 6px; text-align: right;
  font-size: 12.5px; font-variant-numeric: tabular-nums; font-family: inherit;
  border: 1px dashed #dcc9a4; border-radius: 6px; background: #fffdf6;
  color: var(--ink); box-sizing: border-box; transition: border-color .12s, background .12s;
}
.sum-table input.arr-in::placeholder { color: #b8873a; font-size: 11px; letter-spacing: .02em; }
.sum-table input.arr-in:hover { border-style: solid; border-color: #c9b48a; background: #fff; }
.sum-table input.arr-in:focus {
  outline: none; border: 1px solid var(--brand); background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
/* 已经填过的：平时就是干净的数字，悬停/聚焦才露出可以改 */
.sum-table input.arr-in.has-val {
  border-color: transparent; background: transparent;
  font-weight: 600; color: #0f766e;
}
.sum-table input.arr-in.has-val:hover { border: 1px solid #d8dfe8; background: #fff; }
.sum-table input.arr-in.has-val:focus { border-color: var(--brand); background: #fff; color: var(--ink); }

.arr-cell { white-space: nowrap; }
.arr-diff {
  display: inline-block; margin-left: 3px; padding: 0 4px;
  font-size: 10.5px; line-height: 15px; border-radius: 4px; vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.arr-diff.minus { background: #fdeceb; color: #b42318; }
.arr-diff.plus { background: #eaf7ef; color: #15803d; }

/* ============================================================ 采购台顶部：分段切换 + 一行指标 */
.b-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.b-seg { display: inline-flex; gap: 2px; padding: 3px; background: #eef2f7; border-radius: 10px; }
.b-seg a {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 8px;
  font-size: 12.5px; color: #64748b; text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s;
}
.b-seg a:hover { color: #0f172a; background: rgba(255, 255, 255, .65); }
.b-seg a.on { background: #fff; color: #0f172a; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .10); }
.b-seg a b { font-size: 11px; font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums; }
.b-seg a.on b { color: #2563eb; }

.b-stat { display: flex; align-items: center; gap: 15px; font-size: 12px; color: #64748b; }
.b-stat a { color: #64748b; text-decoration: none; white-space: nowrap; }
.b-stat a:hover { color: #0f172a; }
.b-stat b { color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 3px; }
.b-stat a.hot b { color: #b54708; }
.b-stat a.bad b { color: #b42318; }

.b-tip {
  font-size: 12.5px; color: #64748b; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; margin-bottom: 10px;
}
.b-tip b { color: #0f172a; }

.b-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.b-tools .b-filter { flex: 1 1 auto; margin: 0; padding: 6px 8px; }
.b-tools .b-filter input[type="text"] { max-width: 260px; }
.b-tools-tip { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* 行尾的「···」更多 */
.b-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: 4px; padding: 0; vertical-align: middle;
  border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer;
}
.b-more:hover { background: #eef2f7; border-color: var(--line); color: var(--ink); }
.b-table .act { white-space: nowrap; text-align: right; padding-right: 10px; }
/* 操作列：下单 + ··· 并排，宽度统一、垂直居中，别一个宽一个窄看着乱 */
.b-table .act .act-row { justify-content: flex-end; gap: 6px; }
.b-table .act .act-row .btn { min-width: 52px; justify-content: center; }
.b-table .act .act-row .b-more { width: 28px; flex: 0 0 28px; }
/* 填完采购负责人自动下单后的两种反馈：成功标记 / 还差什么 */
.b-ordered { font-size: 12px; color: #0f8a4a; font-weight: 600; white-space: nowrap; }
.b-gapmsg { font-size: 12px; color: #b4530a; white-space: nowrap; max-width: 150px;
            overflow: hidden; text-overflow: ellipsis; }

/* ============================================================ 采购台 v3：对齐仓库端的干净感 */
.b-bar { margin-bottom: 9px; }

.b-tools { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.b-tools .b-filter {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0;
}
.b-tools .b-filter select {
  width: auto; min-width: 112px; max-width: 150px; flex: 0 0 auto;
  height: 32px; min-height: 32px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  padding: 0 26px 0 9px;
}
.b-tools .b-filter input[type="text"] {
  flex: 0 0 210px; width: 210px; max-width: 210px;
  height: 32px; min-height: 32px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 0 10px;
}
.b-tools .b-filter select:focus, .b-tools .b-filter input[type="text"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.b-stat { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #8a94a6; }
.b-stat-sep { width: 1px; height: 11px; background: #e3e9f1; }

/* 表格：白底留白，输入格子彻底无痕 */
.b-table td { padding: 7px 12px; border-bottom: 1px solid #f2f5f9; }
.b-table thead th {
  padding: 9px 12px; font-size: 11.5px; font-weight: 600; color: #8a94a6;
  letter-spacing: .02em; background: #fbfcfe; border-bottom: 1px solid var(--line);
}
.b-table .c-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.b-table .c-name:hover { color: var(--brand); }
.b-table .c-sub { font-size: 11px; color: #9aa4b2; margin-top: 1px; line-height: 1.35; }
.b-table .u { font-style: normal; font-size: 10.5px; color: #9aa4b2; margin-left: 2px; }

.b-table input.q-in {
  width: 100%; height: 30px; padding: 0 8px; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  font-size: 13px; color: var(--ink); font-family: inherit;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.b-table input.q-in::placeholder { color: #c6cedb; font-size: 12.5px; }
.b-table input.q-in:hover { background: #fff; border-color: #e5eaf1; }

/* 备注格子：有内容时要一眼看见（2026-11-08 用户说太淡，容易漏看）。
   空的保持原样（只有淡灰的 placeholder），填过的给浅黄底 + 琥珀字 + 加粗，
   和「缺项」的红色区分开 —— 它不是错误，只是要提醒的事。
   桌面表格和手机卡片各一套 DOM，两个都要盖到。 */
/* 空着时那句提示语原来用的是 #c6cedb，浅到基本看不见（2026-11-10 用户又骂了一次）。
   单独把备注这一列调深一档：看得清「这里能填什么」，又不会像已经写了内容。 */
.b-table input.q-in[data-q="remark_buy"]::placeholder,
.b-cards input.q-in[data-q="remark_buy"]::placeholder { color: #5f6b7a; opacity: 1; }

/* 仓库写的备注（采购还没填这格）：浅蓝底 + 蓝字。
   2026-11-10 用户要求「蓝色是仓库、黄色是采购」，两种来源一眼分清。
   注意它同时带 empty 类，所以下面那条 :not(.empty) 的黄底不会命中它。 */
.b-table input.q-in[data-q="remark_buy"].has-wh,
.b-cards input.q-in[data-q="remark_buy"].has-wh {
  background: #eef4ff; border-color: #d8e4fb;
}
.b-table input.q-in[data-q="remark_buy"].has-wh::placeholder,
.b-cards input.q-in[data-q="remark_buy"].has-wh::placeholder { color: #2563c9; opacity: 1; font-weight: 500; }
.b-table input.q-in[data-q="remark_buy"].has-wh:hover,
.b-cards input.q-in[data-q="remark_buy"].has-wh:hover { background: #e6efff; border-color: #c6daf8; }
.b-table input.q-in[data-q="remark_buy"].has-wh:focus,
.b-cards input.q-in[data-q="remark_buy"].has-wh:focus {
  background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}
.b-table input.q-in[data-q="remark_buy"]:not(.empty),
.b-cards input.q-in[data-q="remark_buy"]:not(.empty) {
  background: #fff8e6; border-color: #f2dda6; color: #7c5400; font-weight: 600;
}
.b-table input.q-in[data-q="remark_buy"]:not(.empty):hover,
.b-cards input.q-in[data-q="remark_buy"]:not(.empty):hover {
  background: #fffcf2; border-color: #e6cc8b;
}
.b-table input.q-in[data-q="remark_buy"]:focus,
.b-cards input.q-in[data-q="remark_buy"]:focus {
  background: #fff; border-color: var(--brand); color: var(--ink); font-weight: 400;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}
.b-table input.q-in:focus {
  outline: none; background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}
.b-table input.q-in.empty { background: transparent; border-color: transparent; }
.b-table input.q-in.empty:hover { background: #fff; border-color: #e5eaf1; }
.b-table input.q-in.warn { color: #b54708; font-weight: 600; }
.b-table input.q-in.saved { border-color: #34a853; background: #f4fbf6; }
.b-table input.q-in.bad { border-color: var(--danger); background: #fff6f5; }

/* 缺口：一个安静的小点，不喊数字 */
.b-gap {
  display: inline-block; width: 6px; height: 6px; padding: 0;
  border: 0; border-radius: 50%; background: #e8ab45;
  font-size: 0; line-height: 0; vertical-align: middle; position: relative; top: -1px;
}

.b-table .btn.sm {
  height: 28px; min-height: 28px; padding: 0 13px; font-size: 12.5px; border-radius: 7px;
}
.b-table .btn.sm[disabled] { opacity: .45; }
.b-more { width: 24px; height: 24px; font-size: 12px; }

/* 顶部切换：再松一点 */
.b-seg a { padding: 6px 12px; font-size: 13px; }
.b-seg a b { font-size: 11px; }

/* 顶部变矮了，表格多吃一点高度 */
.b-panel .c-scroll { max-height: calc(100vh - 248px); }
.b-panel { border-radius: 12px; }

/* 与仓库汇总表对齐：表头底色、行高 */
.b-table td { padding: 9px 12px; }
.b-table thead th { background: #f8fafc; box-shadow: 0 1px 0 var(--line); }
.b-table tbody tr.b-row:hover { background: #f4f7fc; }

/* ============================================================ 采购台 v4：指标用总览同款卡片 */
.b-kpi5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
/* 采购台「缺证件」卡下线后只剩 3 张，别再按总览的 5 列留空位（总览 .dash 不受影响） */
@media (min-width: 1121px) {
  .wrap-buy > .kpi-row.b-kpi5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.b-kpi5 .kpi { padding: 13px 14px 12px; border-radius: 12px; }
.b-kpi5 .kpi-top { margin-bottom: 9px; gap: 8px; }
.b-kpi5 .kpi-ico { width: 28px; height: 28px; border-radius: 8px; }
.b-kpi5 .kpi-label { font-size: 12.5px; }
.b-kpi5 .kpi-num { font-size: 26px; }
.b-kpi5 .kpi-num .kpi-unit { font-size: 12px; }
.b-kpi5 .kpi-sub { margin-top: 6px; font-size: 11.5px; min-height: 16px; color: #9aa4b2; line-height: 1.45; }
.b-kpi4 { gap: 12px; margin-bottom: 14px; }
.b-kpi4 .kpi { padding: 13px 16px 12px; border-radius: 12px; }
.b-kpi4 .kpi-top { margin-bottom: 9px; gap: 9px; }
.b-kpi4 .kpi-ico { width: 28px; height: 28px; border-radius: 8px; }
.b-kpi4 .kpi-label { font-size: 12.5px; }
.b-kpi4 .kpi-num { font-size: 26px; }
.b-kpi4 .kpi-num .kpi-unit { font-size: 12px; }
.b-kpi4 .kpi-sub { margin-top: 6px; font-size: 11.5px; min-height: 16px; color: #9aa4b2; line-height: 1.45; }
.b-kpi4 .kpi-sub b { color: var(--ink-2); }

/* 切换：加大一档，别显得小气 */
.b-bar { margin-bottom: 12px; }
.b-seg { padding: 4px; border-radius: 12px; gap: 3px; }
.b-seg a { padding: 8px 16px; font-size: 13.5px; border-radius: 9px; }
.b-seg a b { font-size: 12px; margin-left: 1px; }

/* 筛选控件：高度和字都提上来 */
.b-tools { gap: 12px; margin-bottom: 12px; }
.b-tools .b-filter { gap: 10px; }
.b-tools .b-filter select,
.b-tools .b-filter input[type="text"] {
  height: 38px; min-height: 38px; font-size: 13px; border-radius: 9px;
}
.b-tools .b-filter select { min-width: 128px; max-width: 168px; padding: 0 30px 0 12px; }
.b-tools .b-filter input[type="text"] {
  flex: 0 0 240px; width: 240px; max-width: 240px; padding: 0 12px;
}
.b-tools-tip { font-size: 12px; color: #9aa4b2; }

@media (max-width: 1400px) {
  .b-kpi5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .b-kpi4, .b-kpi5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 顶部变高了，表格可视高度跟着算 */
.b-panel .c-scroll { max-height: calc(100vh - 300px); }

/* ============================================================ 仓库汇总：到货状态 */
.arr-switch {
  display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap;
}
.arr-switch a {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 6px 13px; border-radius: 9px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  text-decoration: none; transition: all .13s;
}
.arr-switch a:hover { border-color: #cdd7e5; color: var(--ink); }
.arr-switch a b {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.arr-switch a.on {
  background: var(--brand-weak); border-color: #bcd2f7; color: var(--brand); font-weight: 600;
}
.arr-switch a.on b { color: var(--brand); }

/* 收货列下面的状态小字 */
.arr-meta { margin-top: 2px; line-height: 1.2; white-space: nowrap; }
.arr-tag {
  display: inline-block; font-size: 10px; line-height: 14px; padding: 0 4px;
  border-radius: 4px; margin-left: 2px; vertical-align: 1px;
}
.arr-tag.on { background: #eef4ff; color: #2f6fd0; border: 1px solid #d8e4fb; }
.arr-tag.ok { background: #eaf7ef; color: #15803d; border: 1px solid #cbe9d7; }
.arr-tag.late { background: #fdeceb; color: #b42318; border: 1px solid #f6d5d2; }
.arr-tag.bad { background: #fdf2f8; color: #9d174d; border: 1px solid #f7cfe3; }

/* ============================================================ 流程步骤条：一眼看到第几步 */
.steps {
  display: inline-flex; align-items: center; gap: 3px;
  margin-right: 7px; vertical-align: middle;
}
.steps i {
  display: inline-block; width: 11px; height: 4px; border-radius: 2px;
  background: #e4e9f1;
}
.steps i.done { background: #a8bcd8; }
.steps i.cur { background: #2563eb; width: 15px; }
.steps + .badge { vertical-align: middle; }

/* ============================================================ 采购台账：勾选去下单 */
.table th.ck, .table td.ck {
  width: 36px; text-align: center; padding-left: 12px; padding-right: 0;
}
.table th.ck input, .table td.ck input {
  width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer;
  margin: 0; vertical-align: -2px;
}
.pick-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; margin-bottom: 10px; border-radius: 10px;
  background: #f0f6ff; border: 1px solid #cddff8;
}
.pick-bar[hidden] { display: none !important; }
.pick-bar > span:first-child { font-size: 12.5px; color: #185fa5; }
.pick-bar b { font-size: 14px; color: #185fa5; }
.pick-bar .btn { height: 28px; min-height: 28px; padding: 0 13px; font-size: 12.5px; }
.pick-tip { font-size: 11.5px; color: var(--faint); margin-left: auto; }
/* 勾的全是已下单的单：「去下单」点了没意义，灰掉并说明原因，别让人点空 */
.pick-bar .btn.is-mute { opacity: .45; }
.pick-tip.is-warn { color: #b54708; }

/* ============================================================ 仓库汇总表 v2：8 列不横拖 */
/* 时间列：要求发货为主，下单时间做小字，采购承诺的到货日再一行 */
.sum-table .dt-main {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.sum-table .dt-sub {
  display: block; font-size: 10.5px; color: #9aa4b2; margin-top: 2px;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.sum-table .dt .eta-mini { display: block; margin-top: 2px; font-size: 10.5px; }

/* 商品列：名称一行，编码 · 描述一行 */
.sum-table .p-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sum-table .p-line .pname {
  font-weight: 600; color: var(--ink); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sum-table .p-line .pname:hover { color: var(--brand); text-decoration: underline; }
.sum-table .p-meta {
  display: block; margin-top: 2px; font-size: 10.5px; color: #9aa4b2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

/* 数量：数字后面跟单位 */
.sum-table .q { font-variant-numeric: tabular-nums; font-weight: 600; }
.sum-table i.u {
  font-style: normal; font-size: 10.5px; color: #9aa4b2; margin-left: 3px;
}

/* 状态列：一句业务话 */
.sum-table .st-cell { white-space: nowrap; }
.fl {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  font-size: 11.5px; line-height: 17px; border: 1px solid transparent;
  font-weight: 500; letter-spacing: .01em;
}
.fl-gray { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.fl-warn { background: #fff7e8; color: #b54708; border-color: #f5e0bd; }
.fl-blue { background: #eef4ff; color: #2563eb; border-color: #d8e4fb; }
.fl-info { background: #ecfdf5; color: #0f766e; border-color: #c7ece2; }
.fl-ok   { background: #eaf7ef; color: #15803d; border-color: #cbe9d7; }
.fl-teal { background: #dff5ee; color: #0f6e56; border-color: #b9e6d8; }
.fl-bad  { background: #fdeceb; color: #b42318; border-color: #f6d5d2; }
.fl-sub { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.2; }
.fl-sub.bad { color: #b42318; }

/* 列宽收紧后，行高和内边距也收一点，一屏能多看几条 */
.sum-table td { padding-top: 7px; padding-bottom: 7px; }
.sum-table th { padding-top: 8px; padding-bottom: 8px; }

/* 发货日没填：淡一点，别像正常数据 */
.sum-table .dt-main.is-empty { color: #b9c0cb; font-weight: 400; }

/* 状态格：两边台账共用 */
.st-cell { white-space: nowrap; }

/* 采购台账：商品两行、数量两行 */
.p-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.p-line .pname { font-weight: 600; color: var(--ink); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-line .pname:hover { color: var(--brand); text-decoration: underline; }
.p-meta { display: block; margin-top: 2px; font-size: 10.5px; color: #9aa4b2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 采购备注列：仓库收货时要照着做，用琥珀色和普通正文区分开 */
.sum-table .buy-note {
  display: block; padding: 1px 6px; border-radius: 5px;
  font-size: 11.5px; line-height: 1.6; color: #b54708; background: #fff8ec;
  border-left: 2px solid #f3c99a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.sum-table .buy-note-cell { padding-top: 6px; padding-bottom: 6px; }
.c-sub b.diff { color: var(--danger); font-weight: 600; }

/* 表格里的第二行小字统一成 block */
.table td .c-sub { display: block; }


/* ============================================================ 表格列宽可拖 */
.table th { position: relative; }
.col-grip {
  /* right 写负数会让手柄探出表头，窄屏把整页撑出横向滚动（375 下多 4px） */
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; z-index: 6; user-select: none; touch-action: none;
}
/* 常驻一条很淡的竖线，鼠标上去变蓝 —— 不然没人知道这里能拖 */
.col-grip::after {
  content: ''; position: absolute; top: 22%; left: 50%;
  width: 1px; height: 56%; background: #e6ecf5; transition: background .1s;
}
.col-grip:hover::after { background: var(--brand); width: 2px; left: calc(50% - .5px); }
body.col-dragging, body.col-dragging * { cursor: col-resize !important; user-select: none !important; }

/* 拖表头换列顺序 */
th[draggable="true"] { cursor: grab; }
th.col-drag-src { opacity: .4; }
th.col-drop-l { box-shadow: inset 2px 0 0 var(--brand); }
th.col-drop-r { box-shadow: inset -2px 0 0 var(--brand); }

/* 拖宽的表格允许横向滚动，别把内容吃掉 */
.sum-scroll, .panel-bd.flush { overflow-x: auto; }

/* 从台账勾选带过来的那几条：顶部一条说明 */
.picked-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 10px;
  background: #f0f6ff; border: 1px solid #cddff8;
}
.picked-n { font-size: 13px; color: #185fa5; }
.picked-n b { font-size: 15px; }
.picked-tip { font-size: 12px; color: #5b7a9e; }
.picked-bar .btn { margin-left: auto; height: 28px; min-height: 28px; padding: 0 13px; font-size: 12.5px; }

/* 实际收货：差异单独一行，别挤在数字右边被省略号吃掉 */
.arr-diff-row { margin-top: 2px; line-height: 1; }
.sum-table .arr-diff {
  display: inline-block; padding: 0 5px; border-radius: 4px;
  font-size: 10.5px; line-height: 15px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sum-table .arr-diff.minus { background: #fdeceb; color: #b42318; }
.sum-table .arr-diff.plus { background: #eaf7ef; color: #15803d; }

/* ============================================================ 不要让内容被吃掉：重点列允许换行 */
.table td.p-cell { white-space: normal; overflow: visible; text-overflow: clip; }
.table td.p-cell .p-line { align-items: flex-start; }
.table td.p-cell .p-line .pname {
  white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word;
}
.table td.p-cell .p-meta {
  white-space: normal; overflow: visible; text-overflow: clip;
  word-break: break-word; line-height: 1.35;
}

/* 状态格里的小字：预计到货（超期标红）/ 缺证件 */
.fl-sub.late { color: var(--danger); font-weight: 600; }
.sum-table .st-cell { white-space: normal; }

/* 一键收货：青绿，和蓝色的导出区分开 */
.btn.accent { background: #0f766e; border-color: #0f766e; color: #fff; }
.btn.accent:hover { background: #115e59; border-color: #115e59; color: #fff; }
.btn.accent:active { background: #134e4a; }

/* 采购台 KPI：5 张卡（多了「缺证件」） */
.b-kpi4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) {
  .b-kpi4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .b-kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 状态格：主标签一行，预计到货和缺证件挤在同一行，不再三行堆叠 */
.sum-table .st-cell .fl-sub {
  display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.3;
  white-space: nowrap; color: #9aa4b2;
}
.sum-table .st-cell .fl-sub .dot { color: #c6cedb; margin: 0 2px; }
.sum-table .st-cell .fl-sub .late { color: var(--danger); font-weight: 600; }
.sum-table .st-cell .fl-sub .bad { color: #b42318; font-weight: 600; }

/* 缺证标记：挂在商品名后面，不占状态列 */
.sum-table .cert-miss {
  display: inline-block; margin-left: 5px; padding: 0 4px;
  font-size: 10px; line-height: 14px; border-radius: 4px;
  background: #fdeceb; color: #b42318; border: 1px solid #f6d5d2;
  white-space: nowrap; vertical-align: 1px;
}
/* 时间列第三行：采购承诺的到货日 */
.sum-table .dt .eta-mini {
  display: block; margin-top: 2px; font-size: 10.5px;
  color: #b54708; white-space: nowrap;
}
.sum-table .dt .eta-mini.late { color: var(--danger); font-weight: 600; }

/* 时间列：发货 / 下单 / 预计 三个前缀对齐，一眼看出哪个是哪个 */
.sum-table .dt .k {
  font-style: normal; font-size: 10px; color: #a9b2c0;
  margin-right: 3px; letter-spacing: .02em;
}
.sum-table .dt-main .k { color: #8a94a6; }
.sum-table .dt-main { font-size: 12px; }

/* 状态格里的「预计 10-29」：小字，跟状态标签一起看 */
.sum-table .st-cell .eta-sub {
  display: block; margin-top: 3px; font-size: 10.5px;
  line-height: 1.3; color: #b54708; white-space: nowrap;
}
.sum-table .st-cell .eta-sub.late { color: var(--danger); font-weight: 600; }

/* 行高放宽：两行小字挤在一起太密，给点呼吸空间 */
.sum-table td { padding-top: 11px; padding-bottom: 11px; }
.sum-table th { padding-top: 10px; padding-bottom: 10px; }
.sum-table .st-cell .eta-sub { margin-top: 4px; }
.sum-table .dt .dt-sub { margin-top: 3px; }

/* ============================================================ 入库确认列表 */
.i-panel .c-scroll { max-height: calc(100vh - 350px); }
.i-table td { padding-top: 10px; padding-bottom: 10px; }
.i-table .c-name {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.i-table .b-main { gap: 7px; flex-wrap: nowrap; }
.i-table .b-main > .b-school, .i-table .b-main > .b-cert-tag { flex: 0 0 auto; }
.i-table .i-sup { color: var(--ink-2); }
.i-table input.q-in {
  height: 30px; font-variant-numeric: tabular-nums; background: transparent;
  border: 1px dashed #d9e0ea; color: var(--muted);
}
.i-table input.q-in::placeholder { color: #9aa4b2; }
.i-table input.q-in:hover { border-color: #bcc9da; background: #fff; }
.i-table input.q-in.has-val {
  border-color: transparent; background: transparent;
  font-weight: 600; color: var(--ink);
}
.i-table input.q-in.has-val:hover { border-color: #d9e0ea; background: #fff; }
.i-table td .c-diff { font-weight: 600; }
.i-table td .c-diff.bad { color: var(--danger); }
.i-table .st-cell .fl { white-space: nowrap; }
.i-table .act .ibtn { vertical-align: middle; margin-left: 2px; }


/* ============================================================ 入库详情 */
.mt14 { margin-top: 14px; }
.i-detail { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; align-items: start; }
.i-col { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1000px) { .i-detail { grid-template-columns: minmax(0, 1fr); } }

.i-qty-label { font-size: 12.5px; color: var(--muted); }
.i-qty {
  width: 100%; height: 56px; margin-top: 6px; box-sizing: border-box;
  font-size: 26px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums;
  border: 1px solid #dde3ec; border-radius: 11px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.i-qty:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.i-quick { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.i-quick .chip {
  height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.i-quick .chip:hover { border-color: #c3d3ea; background: #f7faff; color: var(--brand); }
.i-quick .chip:active { transform: translateY(1px); }
.i-qty-tip { margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.i-qty-tip.warn { color: #b54708; }

.i-kv { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 12.5px; }
.i-kv dt { color: var(--faint); }
.i-kv dd { margin: 0; color: var(--ink-2); word-break: break-all; }

.i-foot {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.i-foot .tiny { margin-right: auto; }

.i-result { padding: 2px 0 2px; }
.i-result-num { font-size: 34px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.i-result-num i { font-style: normal; font-size: 14px; font-weight: 500; color: var(--faint); margin-left: 5px; }
.i-result-sub { margin-top: 6px; font-size: 12.5px; color: var(--muted); }

.i-help-sum { padding: 11px 16px; }

/* 批量凭证 */
.i-batch { display: grid; grid-template-columns: 1.42fr .58fr; gap: 14px; align-items: start; }
@media (max-width: 1080px) { .i-batch { grid-template-columns: minmax(0, 1fr); } }
.i-batch-scroll { max-height: calc(100vh - 340px); }
.i-batch .c-chk { text-align: center; padding-left: 12px; padding-right: 0; }
.i-batch .c-chk input { width: 15px; height: 15px; cursor: pointer; vertical-align: -2px; }
.i-batch tr.i-batch-row:hover { background: #f7faff; }
.i-batch .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.i-batch .c-foot b { color: var(--ink); }

/* 入库详情：核对步骤 */
.i-steps { margin: 0; padding-left: 17px; font-size: 12.5px; color: var(--ink-2); line-height: 1.95; }
.i-steps b { color: var(--ink); font-weight: 600; }

/* 入库确认：空状态 */
.i-empty { padding: 52px 20px 56px; text-align: center; }
.i-empty-ico {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px;
  display: grid; place-items: center; background: #f2f6fc; color: #9db0c9;
}
.i-empty-t { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.i-empty-s { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.i-empty-s a { color: var(--brand); }

/* ============================================================ 全部明细：整行可点 */
.table tr.row-go { cursor: pointer; }
.table tr.row-go:hover td { background: #f7faff; }
.table tr.row-go:hover .pname { color: var(--brand); }
.ck-off { display: inline-block; width: 15px; text-align: center; color: #cfd6e0; font-size: 12px; }
.table th.act, .table td.act { text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.table td.act .btn { height: 26px; padding: 0 10px; font-size: 12px; }

/* 全部明细：数量摘要 + 可做的事 */
.i-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.i-sum-item { background: #f8fafc; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.i-sum-k { display: block; font-size: 11.5px; color: var(--faint); }
.i-sum-v {
  display: block; margin-top: 3px; font-size: 21px; font-weight: 650; line-height: 1.2;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.i-sum-v i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--faint); margin-left: 3px; }
.i-sum-v.bad { color: var(--danger); }
.i-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.i-actions .inline-form { display: inline; margin: 0; }

/* 全部明细：行高与其它表一致，方便点 */
.list-desktop .table td { padding-top: 11px; padding-bottom: 11px; }
.list-desktop .table th { padding-top: 10px; padding-bottom: 10px; }

/* 侧栏外壳下：顶栏不再重复显示用户，手机底部栏接管 */
.is-shell .topbar .who { display: none; }
@media (max-width: 900px) {
  .is-shell .topbar .who { display: block; }
}

/* ============================================================ 窄屏：侧栏收成图标条，把宽度让给表格 */
@media (max-width: 1280px) {
  :root { --side-w: 66px; }
  .side-logo { padding: 0; justify-content: center; }
  .side-logo .txt { display: none; }
  .nav-label { display: none; }
  .side-nav { padding: 10px 8px 16px; }
  .side-nav a { justify-content: center; padding: 0; height: 40px; gap: 0; }
  .side-nav a span { display: none; }
  .side-nav a.on::before { left: 4px; top: 10px; bottom: 10px; }
  .nav-group { margin-bottom: 2px; }
  .side-foot { flex-direction: column; gap: 6px; padding: 8px 6px; }
  .side-user { justify-content: center; padding: 4px; }
  .side-user .txt { display: none; }
  .side-logout { width: 44px; height: 26px; padding: 0; font-size: 11px; }
}

/* 类型列：小圆点 + 类型名，窄一点 */
.sum-table th.tp, .sum-table td.tp { padding-left: 8px; padding-right: 6px; white-space: nowrap; }
.sum-table td.tp { font-size: 12px; color: var(--ink-2); }
.sum-table td.tp .tdot { margin-right: 5px; }
/* 仓库格下面的学校 */
.sum-table .wh-school { display: block; margin-top: 2px; color: var(--faint); }

/* 全部明细：表头不折行，供应商格带价格小字 */
.list-desktop th { white-space: nowrap; }
.list-desktop td.sup-cell { line-height: 1.3; }
.list-desktop td.sup-cell .c-sub { margin-top: 1px; }

/* 窄屏表格：单元格左右留白收一收，把宽度让给内容 */
@media (max-width: 1280px) {
  .sum-table td, .sum-table th { padding-left: 9px; padding-right: 9px; }
  .sum-table th.ck, .sum-table td.ck { padding-left: 10px; padding-right: 0; }
  .sum-table th.act, .sum-table td.act { padding-right: 8px; }
  .act-row { gap: 2px; }
  .c-table td, .c-table th { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 1280px) {
  .sum-table .ibtn { width: 22px; height: 22px; }
  .sum-table .ibtn .ico { width: 13px; height: 13px; }
  .sum-table .ibtn.tt { width: auto; height: 24px; padding: 0 8px; font-size: 12px; }
}

/* 窄屏：KPI 卡四张的走 2×2，五张的走 3+2，别出现 3+1 */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-row:has(> .kpi:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-num { font-size: 26px; }
  .dash-head h1 { font-size: 19px; }
}

/* ============================================================ 证件端 */
.doc-up { display: inline; }
.doc-up label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.doc-up input[type="file"] { display: none; }
.doc-table td.doc-sup { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-table .act { white-space: nowrap; }
.doc-table .act .btn { margin-left: 4px; }
.b-kpi3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .b-kpi3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 证件端：四件套格子 */
.doc-table th.c-doc, .doc-table td.c-doc { text-align: center; padding-left: 5px; padding-right: 5px; }
.doc-table th.c-doc { font-size: 11.5px; }
.doc-slot-form { margin: 0; display: block; }
.doc-slot {
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; min-width: 44px; padding: 0 6px; border-radius: 7px;
  font-size: 11.5px; white-space: nowrap; line-height: 1;
}
.doc-slot.ok {
  background: #eaf7ef; color: #15803d; border: 1px solid #cbe9d7; text-decoration: none;
}
.doc-slot.ok:hover { background: #d9f1e3; }
.doc-slot.miss {
  width: 38px; background: #fff; color: #9aa4b2;
  border: 1px dashed #cbd5e1; font-size: 15px; cursor: pointer; font-family: inherit;
}
.doc-slot.miss:hover { border-color: var(--brand); color: var(--brand); background: #f7faff; }
.doc-slot.miss input[type="file"] { display: none; }

/* 单据详情：四类证件分组 */
.doc-group { margin-bottom: 10px; }
.doc-group:last-child { margin-bottom: 0; }
.doc-group-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.doc-group-hd .miss { color: var(--danger); font-weight: 600; }

.b-cert-tag.warn { background: #fff8ec; color: #b54708; border-color: #f5e2c4; }

/* ============================================================ 证件端 v2：供应商资质 + 随货证件 */
.doc-sec { margin-bottom: 18px; }
.doc-sec-hd { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; flex-wrap: wrap; }
.doc-sec-hd h2 { font-size: 15px; font-weight: 650; color: var(--ink); }
.doc-sec-sub { font-size: 12px; color: var(--faint); }
.doc-sup-scroll { max-height: 320px; }
.sup-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 5px;
  font-size: 10.5px; line-height: 16px; border: 1px solid transparent; white-space: nowrap;
}
.sup-tag.miss { background: #fff8ec; color: #b54708; border-color: #f5e2c4; }
.sup-tag.ok { background: #eaf7ef; color: #15803d; border-color: #cbe9d7; }
.doc-table td.doc-sup span { font-size: 12.5px; }

/* 入库详情里的证件分组 */
.doc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-line-k { font-size: 12px; color: var(--faint); }
.doc-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px;
  font-size: 11.5px; border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.doc-tag.ok { background: #eaf7ef; color: #15803d; border-color: #cbe9d7; }
.doc-tag.ok:hover { background: #d9f1e3; }
.doc-tag.miss { background: #fdeceb; color: #b42318; border-color: #f6d5d2; }
.doc-thumb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-thumb-row .thumb.sm { width: 64px; height: 64px; aspect-ratio: auto; flex: 0 0 auto; }
.photo-add.sm {
  width: 64px; height: 64px; aspect-ratio: auto; font-size: 11px; line-height: 1.25;
  text-align: center; padding: 4px;
}

/* 证件端：供应商名下面的资质小标换行显示，别把名字挤没 */
.doc-table td.doc-sup { white-space: normal; line-height: 1.3; }
.doc-table td.doc-sup .sup-tag { display: block; margin: 3px 0 0; width: fit-content; }

/* 入库详情底部操作条：滚到哪都看得见 */
.i-foot-sticky {
  position: sticky; bottom: 10px; z-index: 8;
  box-shadow: 0 6px 20px -8px rgba(16, 24, 40, .25);
}
.doc-thumb-row .photo-add.sm { width: 72px; height: 68px; }

.i-batch-kind { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.i-batch-kind select {
  height: 30px; border-radius: 8px; border: 1px solid var(--line); padding: 0 8px;
  font-family: inherit; font-size: 12.5px; background: #fff; color: var(--ink);
}

/* ============================================================ 手机（≤700）：
   仓库/入库主要在手机上用，先把横向溢出掐掉，再砍掉次要列 */
@media (max-width: 700px) {
  .dash { padding: 14px 12px 96px; }
  .wrap { padding: 12px 12px 92px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .title { font-size: 15px; }
  .dash-head { flex-wrap: wrap; gap: 8px; }
  .dash-head h1 { font-size: 18px; }
  .dash-actions { flex-wrap: wrap; width: 100%; }
  .dash-actions .btn { flex: 1 1 auto; }

  /* 卡片：两列，内容允许压缩 */
  /* 两列；不要 !important —— ≤560 那条单列规则要能覆盖它（同权重时后写的赢） */
  .kpi-row, .b-kpi4, .b-kpi3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; min-width: 0; }
  .kpi-num { font-size: 24px; }
  .kpi-sub { font-size: 11px; }

  /* 分段条：横向滑动，不撑破页面 */
  .b-seg { display: flex; overflow-x: auto; max-width: 100%; padding: 3px; }
  .b-seg a { flex: 0 0 auto; padding: 7px 12px; font-size: 13px; }

  /* 筛选：换行铺满 */
  .b-tools, .b-filter { flex-wrap: wrap; }
  .b-filter select, .b-filter input[type="text"] {
    flex: 1 1 130px; min-width: 0; max-width: none; width: auto;
  }
  .b-tools-tip { display: none; }

  /* 详情页两栏并一栏，底部按钮换行 */
  .i-detail { grid-template-columns: minmax(0, 1fr); }
  .i-kv { grid-template-columns: 66px minmax(0, 1fr); }
  .i-foot { flex-wrap: wrap; gap: 8px; }
  .i-foot .tiny { flex: 1 1 100%; }
  .i-foot .btn { width: 100%; }
  .i-qty { height: 48px; font-size: 22px; }

  /* 入库列表：手机上只留 商品 / 下单数 / 实收 / 状态 / 操作 */
  .i-list-table th:nth-child(4), .i-list-table td:nth-child(4),
  .i-list-table th:nth-child(5), .i-list-table td:nth-child(5),
  .i-list-table th:nth-child(6), .i-list-table td:nth-child(6) { display: none; }

  /* 仓库台账：只留 勾选 / 商品 / 数量 / 实收 / 状态 / 操作 */
  .sum-table th:nth-child(2), .sum-table td:nth-child(2),
  .sum-table th:nth-child(4), .sum-table td:nth-child(4),
  .sum-table th:nth-child(6), .sum-table td:nth-child(6),
  .sum-table th:nth-child(8), .sum-table td:nth-child(8) { display: none; }
  .sum-table th.act, .sum-table td.act { width: 112px; }
}

@media (max-width: 700px) {
  /* 手机上一律用自动列宽，别让 colgroup 把某列挤成 0 */
  .i-list-table, .sum-table, .doc-table { table-layout: auto; width: 100%; }
  .i-list-table colgroup, .sum-table colgroup, .doc-table colgroup { display: none; }
  .dash-actions .btn { flex: 1 1 140px; }
  .is-shell .topbar .who { display: none; }
  .topbar-date { display: none; }
  .doc-slot.miss { width: 34px; }
}

@media (max-width: 700px) {
  /* 覆盖 .table.fixed（特异性更高），否则自动列宽不生效 */
  .table.fixed.i-list-table, .table.fixed.sum-table, .table.fixed.doc-table {
    table-layout: auto; width: 100%; min-width: 0;
  }
  .i-list-table th, .i-list-table td,
  .sum-table th, .sum-table td { white-space: normal; padding-left: 6px; padding-right: 6px; }
  .sum-table td .arr-in { width: 100%; min-width: 56px; }
  .sum-table .act-row { flex-wrap: wrap; justify-content: flex-end; }
  .sum-table th.act, .sum-table td.act { width: auto; padding-right: 6px; }
}

@media (max-width: 700px) {
  /* 页面级不再横向滚动，宽表交给表格自己的滚动区 */
  html, body { overflow-x: hidden; max-width: 100%; }
  .sum-scroll, .c-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash, .wrap, .panel { max-width: 100%; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar select, .filter-bar input { flex: 1 1 130px; min-width: 0; }
  .filter-actions { width: 100%; justify-content: flex-end !important; }
}

/* 对账单 */
.stmt-panel { margin-bottom: 14px; }
.stmt-table td .c-sub { display: block; }
.stmt-table th { font-size: 11.5px; }
.b-filter input.stmt-month { flex: 0 0 auto; min-width: 132px; }

.b-filter input[type="month"] {
  height: 38px; min-height: 38px; padding: 0 9px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}

@media (max-width: 700px) {
  .b-table th.c-note, .b-table td.c-note { display: none; }
}


/* ============================================================ 报价映射（只读查看） */
.pm-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-scroll { max-height: calc(100vh - 370px); }
.pm-table td { padding-top: 9px; padding-bottom: 9px; }
.pm-name {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  font-weight: 500; color: var(--ink);
}
.pm-table .c-sub { display: block; margin-top: 1px; }
a.pm-name { text-decoration: none; color: inherit; }
.pm-mobile { display: none; }
a.pm-name:hover { color: var(--brand); }
.pm-sup, .pm-sup2 {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.pm-sup2 { max-width: 100%; color: var(--ink-2); }
.pm-tag {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px;
  font-size: 10.5px; line-height: 16px; background: #eef2f7; color: #64748b;
  border: 1px solid #e2e8f0; vertical-align: 1px;
}
.pm-gap {
  display: block; margin: 1px 0 0; font-size: 11px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.pm-gap i { font-style: normal; margin-left: 3px; }
.pm-gap.bad i { color: var(--danger); font-weight: 600; }
.pm-gap.good i { color: var(--ok); font-weight: 600; }
.pm-table th { white-space: nowrap; }
.pm-table .c-foot { gap: 8px; }
.pm-table td:last-child, .pm-table th:last-child { padding-right: 14px; }
.pm-table td:nth-child(5) { padding-right: 8px; }

/* ============================================================ 采购台：按映射补齐空白 */
.b-tools-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.b-fill { margin: 0; }
.b-fill .btn { white-space: nowrap; }
.b-tools .b-filter select.blank-filter { min-width: 118px; }
@media (max-width: 900px) {
  .b-tools-right { width: 100%; margin-left: 0; justify-content: space-between; }
  .b-tools-tip { display: none; }
  .b-fill { flex: 1; }
  .b-fill .btn { width: 100%; }
}

/* ============================================================ 供应商报价（可维护） */
.sup-table th { white-space: nowrap; }
.sup-table th, .sup-table td { padding-left: 8px; padding-right: 8px; }
.sup-table td { padding-top: 8px; padding-bottom: 8px; }
.sup-table tr.is-primary td { background: #fbfdf9; }
/* 行内直接改：供应商 / 单位 / 单价 */
.sup-cell { display: flex; align-items: center; gap: 5px; min-width: 0; }
/* 注意：全局 input[type=text] 样式特异性更高，这里必须带上 .sup-table 才压得住 */
.sup-table input.sup-in {
  width: 100%; min-width: 0; height: 28px; padding: 0 7px; font-family: inherit;
  font-size: 12.5px; line-height: 26px; color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: 7px;
}
.sup-table input.sup-in::placeholder { color: var(--faint); }
.sup-table input.sup-in:hover { background: #fff; border-color: var(--line); }
.sup-table input.sup-in:focus {
  outline: none; background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}
.sup-table input.sup-in-name { flex: 1 1 auto; font-weight: 500; }
.sup-table input.sup-in-unit { text-align: center; }
.sup-table input.sup-in-price { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
.sup-table .act .btn.primary { padding: 0 10px; }
.sup-price { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin: 0; }
.sup-price input {
  width: 78px; height: 28px; padding: 0 8px; font-family: inherit; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  text-align: right; font-variant-numeric: tabular-nums;
}
.sup-price input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.sup-price .btn { height: 28px; padding: 0 8px; }
.sup-table .act { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.sup-table .act .inline-form { display: inline-flex; margin: 0; }
.sup-table .act .btn { flex: none; white-space: nowrap; min-width: 28px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fdeceb; border-color: #f6d5d2; }

.sup-add { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sup-add .field { margin: 0; min-width: 140px; }
.sup-add .field span { font-size: 11.5px; color: var(--faint); }
.sup-add .field input {
  height: 34px; padding: 0 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.sup-add .sup-note { flex: 1 1 200px; }
.sup-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.sup-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.pm-unit-inline { display: none; }
@media (max-width: 700px) {
  .sup-add .field { flex: 1 1 100%; }
  /* 手机上一律自动列宽，别让 colgroup 把供应商列挤成 0；宽度按内容走，超出就横向滚 */
  .table.fixed.sup-table { table-layout: auto; width: max-content; min-width: 100%; }
  .sup-table colgroup { display: none; }
  .sup-table th, .sup-table td { padding-left: 6px; padding-right: 6px; }
  .sup-table td { white-space: nowrap; }
  .sup-table th { white-space: normal; }
  .sup-table .fl { white-space: nowrap; }
  .sup-table .act { flex-wrap: wrap; gap: 3px; }
  /* 详情页：只留 供应商 / 单位 / 单价 / 操作 */
  .sup-edit th:nth-child(4), .sup-edit td:nth-child(4),
  .sup-edit th:nth-child(5), .sup-edit td:nth-child(5),
  .sup-edit th:nth-child(6), .sup-edit td:nth-child(6) { display: none; }
  .sup-edit td input.sup-in-name { width: 108px; flex: none; }
  .sup-edit td input.sup-in-unit { width: 52px; }
  .sup-edit td input.sup-in-price { width: 70px; }
  .sup-edit .act { justify-content: flex-start; width: 96px; }
  .sup-edit th { white-space: normal; }
  /* 手机上先看价改价，设首选留到电脑上做 */
  .sup-edit .act .sup-primary-form { display: none; }
  /* 列表页：只留 商品 / 首选供应商 / 单价（单位并进单价里） / 操作 */
  .sup-list th:nth-child(2), .sup-list td:nth-child(2),
  .sup-list th:nth-child(3), .sup-list td:nth-child(3),
  .sup-list th:nth-child(4), .sup-list td:nth-child(4),
  .sup-list th:nth-child(5), .sup-list td:nth-child(5),
  .sup-list th:nth-child(6), .sup-list td:nth-child(6),
  .sup-list th:nth-child(7), .sup-list td:nth-child(7) { display: none; }
  /* 手机上一行说清：首选供应商 + 单价，点商品名进详情 */
  .pm-mobile { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
  a.pm-name { text-decoration: none; color: var(--brand); }
  .sup-list th { white-space: normal; }
  .sup-list .pm-name { max-width: 132px; }
  .sup-list .pm-sup { max-width: 92px; }
  .pm-unit-inline { display: inline; margin-left: 2px; font-size: 11px; color: var(--muted); }
}

/* 供应商报价：操作列窄按钮 */
.sup-table .act { padding-left: 0; padding-right: 8px; gap: 3px; }
.sup-table .act .btn { padding: 0 7px; font-size: 11.5px; }

.sup-table .act .btn { padding: 0 8px; font-size: 12px; height: 26px; }

/* 报价映射：卡片可点筛选 */
.pm-kpi .kpi { color: inherit; }
.pm-kpi .kpi.is-on { box-shadow: inset 0 0 0 2px var(--brand); border-color: transparent; }
.pm-kpi .kpi.is-on .kpi-label { color: var(--brand); }

/* =========================================================   v2 流程与页面重构（T05）
   ================================================================ */

/* ---- 建议值：虚线格 + 「映射」角标 ----
   角标挂在 .q-wrap 上：input 不能有伪元素，所以模板里给这三个格套了一层 span。
   角标放**左上角外侧**：右上角留给差异琥珀点，两者互不遮挡，也不压住格子里的数字 */
.q-wrap { position: relative; display: block; }
.q-wrap.is-sug::after {
  content: "映射";
  position: absolute; top: -5px; left: -3px; z-index: 2;
  padding: 0 4px; border-radius: 5px;
  font-size: 9px; line-height: 14px; letter-spacing: 0;
  color: #7a5af8; background: #f1eeff; border: 1px solid #ddd6fe;
  pointer-events: none;
}
.c-table .q-wrap.is-sug::after, .b-table .q-wrap.is-sug::after { top: -5px; left: -3px; }
.c-table input.q-in.suggested { border-style: dashed; border-color: #c3b5fb; }
.b-table input.q-in.suggested {
  border-style: dashed; border-color: #c3b5fb; background: #fdfcff;
}
.b-table input.q-in.suggested:focus { border-style: solid; }
/* 单位是「只显示」的建议值（不是可编辑格），用虚下划线提示来源 */
.b-table .u.suggested-u { border-bottom: 1px dashed #c3b5fb; }
.b-table .u.suggested-u::before { content: ""; }

/* ---- 总览「采购备注」区块：浅黄底 + 2 行截断 ----
   注意别叫 .buy-note —— 那个类名在 934 行已被采购备注列占用 */
.dnote-cell { background: #fffcf2; }
.dnote-txt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px; line-height: 1.45; color: #7a5c13; font-weight: 500;
  word-break: break-all;
}
.tbl-mini .psub.sub-late { color: var(--danger); font-weight: 600; }
a.dnote-late { color: var(--danger); font-weight: 600; }
a.dnote-late:hover { text-decoration: underline; }
/* 卡片是 <a>，里面不能再套 <a>（HTML 会提前闭合外层把 5 张卡挤塌），
   所以逾期这里用 span 红字提示，深链放在「待收货明细」副标题 */
.kpi-sub .kpi-late { color: var(--danger); font-weight: 600; white-space: nowrap; }
.kpi-sub .kpi-late b { color: var(--danger); }
.kpi-sub .kpi-late .ico { vertical-align: -2px; margin-right: 2px; }
/* 逾期是 span+data-href（卡片本身是 <a>，不能嵌套），样式上仍要像链接 */
.kpi-sub .kpi-late[data-href] {
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.kpi-sub .kpi-late[data-href]:hover { color: #912018; }
.kpi-sub .kpi-late[data-href]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px;
}

/* ---- 仓库台账「回货概览」一行（替代原来四档 arr-switch） ---- */
.wst-ov {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); font-size: 13px;
}
.wst-item { display: inline-flex; align-items: baseline; gap: 5px; }
.wst-ov a {
  color: var(--ink-2); padding: 2px 7px; border-radius: 7px;
  border: 1px solid transparent; white-space: nowrap;
}
.wst-ov a:hover { background: #f7f9fc; border-color: var(--line); color: var(--ink); }
.wst-ov a b {
  margin-left: 5px; font-variant-numeric: tabular-nums;
  font-size: 12px; color: var(--muted);
}
.wst-ov a.on { background: var(--brand-weak); border-color: #d8e4fb; color: var(--brand-d); }
.wst-ov a.on b { color: var(--brand); }
.wst-ov .wst-late { color: var(--danger); font-size: 11.5px; font-weight: 600; }
.wst-ov .wst-late:hover { background: #fff5f4; border-color: #f6d5d2; }
.wst-ov .wst-dot { color: #cfd6e0; }

/* 仓库报量页汇总区的七档 chips */
.wst-tabs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px 0;
}
.wst-tabs a {
  font-size: 12.5px; color: var(--ink-2); padding: 3px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  /* 横滑容器里不能被压缩，否则「待下单」会被挤成三行竖排 */
  white-space: nowrap; flex: 0 0 auto;
}
.wst-tabs a:hover { border-color: #cdd7e5; color: var(--ink); }
.wst-tabs a b {
  margin-left: 5px; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wst-tabs a.on { background: var(--brand-weak); border-color: #d8e4fb; color: var(--brand-d); }
.wst-tabs a.on b { color: var(--brand); }
.wst-tabs a.wst-late { color: var(--danger); border-color: #f6d5d2; }
.wst-tabs a.wst-late.on { background: #fff5f4; }

/* ---- 采购台：类型 chip（一级）---- */
.b-type .b-seg a { display: inline-flex; align-items: center; gap: 5px; }
.b-type .b-seg a .type-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none;
}
.b-type .b-seg a.is-zero { opacity: .55; }
.b-type .b-seg a.is-zero:hover { opacity: .8; }

/* ---- 明细页「只看采购备注」生效提示条 ---- */
.filter-note {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding: 7px 12px;
  font-size: 12.5px; color: #7a5c13;
  background: #fffcf2; border: 1px solid #f3e4bd; border-radius: 10px;
}
.filter-note b { color: #7a5c13; }
.filter-note a {
  margin-left: auto; color: #a1741a; font-size: 14px; line-height: 1;
  padding: 2px 6px; border-radius: 6px;
}
.filter-note a:hover { background: #f7ecd0; }

/* ---- 差异角标：价格格 / 供应商格右上角的琥珀色小圆点（无差异不渲染） ----
   定位基准是 .q-wrap（它 is 相对定位的父级），圆点**骑在输入框右上角**：
   -3px 让它压在框角上（半个点在外面），既明确属于这一格，也不会飘到列缝里；
   12px 的 td padding 足够容纳，不会被 .table td{overflow:hidden} 裁掉。 */
.b-table .diff-dot,
.c-table .diff-dot {
  position: absolute; top: -3px; right: -3px; z-index: 3;
  width: 7px; height: 7px; border-radius: 50%;
  background: #f79009;
  box-shadow: 0 0 0 2px #fff;      /* 白描边，压在任何底色上都看得清 */
  cursor: help;
}
/* 表脚那句「本页 N 条不一致」 */
.c-foot-diff { color: #b54708; font-weight: 600; }

/* ================================================================
   T10 移动端适配（≤900 / ≤560）
   全部写在媒体查询里 —— 桌面（≥901）视觉零变化。
   ================================================================ */

/* ---- 手机端卡片（台账 /w/summary 与 /w/new 汇总区共用） ---- */
.wh-cards { border-radius: var(--r-lg); overflow: hidden; }
.wh-card { background: var(--panel); border-bottom: 1px solid var(--line-2); }
.wh-card:last-child { border-bottom: none; }
.wh-card-main { display: block; padding: 12px 14px 10px; color: inherit; }
.wh-card-main:active { background: #f8fafc; }
.wh-card .l1 { display: flex; align-items: baseline; gap: 8px; }
.wh-card .nm {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-card .qty { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.wh-card .qty i { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 2px; }
.wh-card .l2 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 7px; font-size: 12px; color: var(--muted);
}
.wh-card .l2 .fl { font-size: 11.5px; padding: 2px 8px; }
/* 卡片里副标签是行内小字，不要桌面那套「块级 + 上边距」 */
.wh-card .l2 .fl-sub { display: inline; margin: 0; font-size: 11.5px; }
.wh-card .l2 .fl-sub.late { color: var(--danger); font-weight: 600; }
.wh-card .l2 .fl-sub.bad { color: #b42318; font-weight: 600; }
.wh-card .wh-in { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wh-card .l3 {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 5px; font-size: 11.5px; color: var(--faint);
}
/* 两列字段格：标签 11px 压在上面做说明，值 13px 在下面读。
   空字段在模板里整格不输出，所以格子数不固定。 */
.wh-card .f2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line-2);
}
.wh-card .fi { min-width: 0; }
.wh-card .fi .k { display: block; font-size: 11px; color: var(--faint); line-height: 1.4; }
.wh-card .fi .v {
  display: block; margin-top: 1px; font-size: 13px; color: var(--ink-2);
  line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-card .wh-note {
  margin-top: 7px; padding: 5px 8px; border-radius: 7px;
  background: #fffcf2; border: 1px solid #f3e4bd;
  font-size: 11.5px; color: #7a5c13; line-height: 1.45;
}
/* 备注：别人的一行小字，自己那句是虚线输入框（和桌面表格同一个 /w/{id}/remark）。
   放在 <a> 外面，点输入框不会跳详情。 */
.wh-card-note { padding: 0 14px 10px; }
.wh-card-note .wh-note-tag {
  display: block; max-width: 100%; font-size: 11.5px; line-height: 1.5;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wh-card-note .note-in { margin-top: 2px; padding: 5px 2px; font-size: 12.5px; }
.wh-card-note .note-in::placeholder { font-size: 11.5px; color: var(--faint); }
.wh-card-note .note-in:focus { border-bottom: 1px solid var(--brand); background: #f7faff; }
.wh-card-note .note-in.is-ok { border-bottom-color: var(--ok); }
.wh-card-note .note-in.is-bad { border-bottom-color: var(--danger); background: #fff6f5; }

.wh-card-act {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 12px; flex-wrap: wrap;
}
.wh-card-act .arr-in { flex: 0 0 92px; width: 92px; }
.wh-card-act .btn { flex: 1 1 auto; justify-content: center; }

@media (max-width: 900px) {
  /* ---- 1. chips / 页签 / 概览：横滑不换行（换行会把页面拉得老长） ---- */
  .b-bar { flex-wrap: nowrap; max-width: 100%; }
  .b-seg, .wst-ov, .wst-tabs, .range-tabs, .arr-switch {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    max-width: 100%; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .b-seg::-webkit-scrollbar, .wst-ov::-webkit-scrollbar,
  .wst-tabs::-webkit-scrollbar, .range-tabs::-webkit-scrollbar,
  .arr-switch::-webkit-scrollbar { display: none; }
  .b-seg > a, .wst-ov > .wst-item, .range-tabs > a { flex: 0 0 auto; }
  .wst-ov { gap: 2px 4px; }
  .wst-ov .wst-dot { display: none; }        /* 横滑时省掉分隔点，省宽度 */

  /* ---- 2. 筛选栏：换行，按钮不被挤出去 ---- */
  .b-bar { margin-bottom: 8px; }
  .b-tools { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .b-tools .b-filter {
    flex: 1 1 100%; flex-wrap: wrap; gap: 8px;
    min-width: 0;
  }
  .b-tools .b-filter select,
  .b-tools .b-filter input[type="text"] {
    flex: 1 1 46%; width: auto; max-width: none; min-width: 0;
    height: 34px; min-height: 34px; font-size: 12.5px;
  }
  .b-tools-right { flex: 1 1 100%; width: 100%; flex-wrap: wrap; gap: 8px; }
  .b-tools-right .b-fill { flex: 1 1 100%; }
  .b-tools-right .b-fill .btn { width: 100%; justify-content: center; }

  /* 采购台筛选栏：默认收起成一行摘要（.b-fsum），点开才展开。
     桌面 .fsum 是 display:none，这块规则全在媒体查询里，桌面完全不受影响。 */
  .b-tools { display: block; }
  button.b-fsum {
    display: flex; margin-bottom: 8px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--sh-1);
  }
  .b-tools:not(.is-open) .b-filter,
  .b-tools:not(.is-open) .b-tools-right { display: none; }
  .b-tools.is-open .b-filter { display: flex; }

  /* ---- 3. 批量条：没勾行时只留一行（勾了才展开，勾选状态由 app.js 切 .is-collapsed） ---- */
  .b-bulk { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .b-bulk input[type="text"] { flex: 1 1 45%; min-width: 0; }
  .b-bulk-sep { display: none; }
  .b-bulk-tip { margin-left: 0; }
  .b-bulk.is-collapsed { padding: 7px 10px; }
  .b-bulk.is-collapsed > *:not(.b-bulk-n):not(#bulk-order) { display: none; }
  .b-bulk.is-collapsed #bulk-order { margin-left: auto; }

  /* ---- 4. 宽表格：横滑 + 惯性滚动（列宽照旧，不压缩） ---- */
  .sum-scroll, .c-scroll, .panel-bd.flush {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  /* ---- 5. 报量页顶部：标题/按钮/说明都换行 ---- */
  .entry-head { flex-wrap: wrap; gap: 10px; }
  .entry-actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .entry-actions .btn { flex: 1 1 auto; min-width: 0; }
  .entry-note { flex-wrap: wrap; line-height: 1.7; }
  .guide-ops { flex-wrap: wrap; gap: 6px 12px; }
  .guide-steps { flex-wrap: wrap; }

  /* ---- 6. 合计行别撑宽 ---- */
  .sum-foot { flex-wrap: wrap; gap: 6px 12px; }

  /* ---- 6b. 台账：帮助说明是给桌面的，手机上白占 120px（它本来就带 × 可关） ---- */
  .guide { display: none; }

  /* ---- 6c. 台账筛选栏：手机上默认收起成一行摘要，点开才展开 ----
     注意用 button.fsum 提权：基础规则 `.fsum{display:none}` 在文件更靠后处，
     单类选择器会被它压掉（这坑踩过一次） */
  button.fsum { display: flex; }
  form.sum-filter .bd { padding: 0; }
  form.sum-filter:not(.is-open) .bd { display: none; }
  form.sum-filter:not(.is-open) { padding: 0; }
  form.sum-filter.is-open .bd { padding: 12px; }
  form.sum-filter.is-open .filter-bar { display: grid; }

  /* 快捷时间（今天/本周/本月/全部）挪出折叠区：手机上永远可见（2026-11-26）。
     之前藏在「筛选」折叠面板里，没人翻出来切时间，数据一多列表又长又难用。
     form 改 block，让「快捷时间 → 筛选摘要 → 展开字段」竖着排；
     收起时给快捷时间留自己的内边距，展开时和 .bd 的 12px 对齐。
     只作用于收货/汇总页那个带折叠面板的表单（.wf-card）——
     下单页底部还有个同名 .sum-filter 的平铺筛选条，不能被误伤成 block。 */
  form.sum-filter.wf-card { display: block; }
  form.sum-filter .sum-quick { padding: 10px 13px 6px; }
  form.sum-filter.is-open .sum-quick { padding: 12px 12px 0; }
}

/* 筛选摘要行（桌面不显示；手机上取代 4 个下拉框占的高度） */
.fsum {
  display: none; align-items: center; gap: 8px; width: 100%;
  padding: 11px 13px; background: transparent; border: 0;
  font-family: inherit; font-size: 13px; color: var(--ink-2);
  text-align: left; cursor: pointer;
}
.fsum .fsum-ico { color: var(--brand); display: inline-flex; }
.fsum .fsum-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsum .fsum-on {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #b54708;
  background: var(--warn-weak); border-radius: 6px; padding: 1px 6px;
}
.fsum .caret { flex: 0 0 auto; color: var(--faint); transition: transform .15s; }
form.sum-filter.is-open .fsum .caret { transform: rotate(180deg); }

@media (max-width: 560px) {
  /* ---- 7. KPI 卡：**两列**（真 375 下放得下两列；单列会把首屏全吃掉） ----
     5 张卡排成 2+2+1，比单列省一半高度；副行最多两行，别让它继续长高 */
  .kpi-row,
  .kpi-row.b-kpi5, .b-kpi5,
  .kpi-row.b-kpi4, .b-kpi4 { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpi { padding: 9px 11px; }
  .kpi-top { margin-bottom: 6px; }
  .kpi-num { font-size: 22px; }
  .kpi-sub {
    margin-top: 3px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ---- 8. 采购进度 4 个环：2×2，别把第 4 个裁掉 ---- */
  .ring-row { grid-template-columns: repeat(2, 1fr); }
  .ring svg { width: 76px; height: 76px; }
  .ring-c b { font-size: 19px; }

  /* ---- 9. 台账卡片、按钮在窄屏 ---- */
  .wh-card-act .btn { flex: 1 1 0; padding: 0 10px; }
  .wh-card-act .arr-in { flex: 0 0 80px; width: 80px; }
}

/* ================================================================
   T12 采购台表格：手机上商品列不能塌、且横滑时钉在左边
   ================================================================ */
@media (max-width: 900px) {
  /* 商品列塌成 0 的原因：colgroup 里 8 个定宽列加起来正好 886px（= 表格总宽），
     唯一的 auto 列（商品）分不到任何宽度 → 首屏只剩「□ | 数量 | 供应商」。
     给表格一个下限，多出来的 154px 全归商品列，不需要 !important 去改 col 宽度。 */
  .b-table { min-width: 1040px; }

  /* 勾选列 + 商品列钉在左边：滑到右边看价格时也知道是哪一行 */
  /* z-index 要压过格子里的「映射」角标（.q-wrap.is-sug::after 是 2）和差异点（3），
     否则横滑时那些小标签会浮在商品名上 */
  .b-table th:nth-child(1),
  .b-table td:nth-child(1) {
    position: sticky; left: 0; z-index: 6;
    background: #fff;
  }
  .b-table th:nth-child(2),
  .b-table td:nth-child(2) {
    position: sticky; left: 34px; z-index: 5;
    background: #fff;
    box-shadow: 1px 0 0 var(--line-2);
  }
  .b-table thead th:nth-child(1),
  .b-table thead th:nth-child(2) { background: #f8fafc; z-index: 7; }
  .b-table tbody tr.b-row:hover td:nth-child(1),
  .b-table tbody tr.b-row:hover td:nth-child(2) { background: #f4f7fc; }
}

/* 手机上页面标题重复（topbar 已经写了「仓库汇总」），≤560 把内容区的大标题收掉 */
@media (max-width: 560px) {
  .page-h1 { display: none; }
}

/* 320 这类超窄屏（iPhone SE 一代）：按钮一行放不下就换行，别顶出屏幕 */
@media (max-width: 380px) {
  .entry-actions .btn,
  .dash-actions .btn { flex: 1 1 46%; }
  .panel-hd, .hd-right { flex-wrap: wrap; }
  .hd-right { margin-left: 0; }
}

/* 明细页顶部：类型多选标签贴到标题行右侧（复用采购台的 .b-seg 外观） */
.b-seg.right { margin-left: auto; }
@media (max-width: 900px) {
  .b-seg.right {
    margin: 10px 0 0; max-width: 100%;
    overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .b-seg.right::-webkit-scrollbar { display: none; }
}

/* 台账新增「商品描述」列：一行放不下就省略，别把行高撑起来 */
.sum-table .sp-cell {
  color: var(--muted); font-size: 12.5px; max-width: 128px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 下单时间/发货时间拆成两列后都是单行 */
.sum-table td.dt { white-space: nowrap; }
.sum-table td.dt .view-only.is-empty { color: #b9c0cb; }

/* 商品名一行放不下就省略，别换行把行高撑成两行 */
.sum-table .p-cell .pname {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 侧栏「下单次数」排行：名字 + 细条 + 次数 */
.rank-tabs { display: inline-flex; gap: 2px; }
.rank-tabs a {
  font-size: 11.5px; color: var(--muted); text-decoration: none;
  padding: 2px 7px; border-radius: 999px;
}
.rank-tabs a:hover { background: #eef2f7; color: var(--ink-2); }
.rank-tabs a.on { background: var(--brand-weak); color: var(--brand); font-weight: 600; }

.pr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px 44px;
  align-items: center; gap: 8px; padding: 6px 12px;
}
.pr-row + .pr-row { border-top: 1px dashed var(--line); }
.pr-name {
  font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pr-bar { height: 4px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.pr-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.pr-n { font-size: 12.5px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.pr-n i { font-style: normal; font-size: 10.5px; color: var(--faint); margin-left: 1px; }
.pr-empty { padding: 14px 12px; font-size: 12.5px; color: var(--faint); text-align: center; }

/* 下单次数面板升级：副标题左、tab 靠右；仓库切换 chip、类型小标签、单位、频率第二行
   （.pr-row 还是三列骨架，只多一行用 grid-column 跨满） */
.entry-side .panel-hd .rank-tabs { margin-left: auto; flex: none; }
.entry-side .panel-hd .panel-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-whs { display: flex; padding: 8px 12px 0; flex-wrap: wrap; }
.pr-main { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pr-type { flex: none; font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 999px; font-weight: 600; }
.pr-unit { flex: none; font-size: 10.5px; color: var(--faint); }
.pr-meta { grid-column: 1 / -1; margin-top: 1px; font-size: 10.5px; color: var(--faint); }

/* 下单次数收起来：行高 57~58px（桌面/手机一致），287 = 第 6 条的 offsetTop，正好露 5 条 */
.rank-scroll { max-height: 287px; overflow-y: auto; overscroll-behavior: contain; }
.rank-scroll::-webkit-scrollbar { width: 6px; }
.rank-scroll::-webkit-scrollbar-thumb { background: #d6dde8; border-radius: 3px; }
.rank-tools { display: flex; align-items: center; gap: 6px; padding: 8px 12px 6px; }
.rank-q { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 8px; font-size: 12px;
          border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--ink-2); }
.rank-q:focus { outline: none; border-color: var(--brand); background: #fff; }
.rank-cnt { flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* 采购台新增列：下单时间 / 发货时间 / 描述 */
.b-table td.c-date { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.b-table td.c-spec {
  color: var(--muted); font-size: 12.5px; max-width: 116px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 采购端的表格也铺满：不再用固定宽度挤在中间 */

/* 台账「类型」多选条。
   注意别用 .type-bar —— 那个类被「类型分布条」（高 7px 的进度条）占着，
   同名会把这一行压成 7px 看不见（踩过一次）。 */
.tfilter {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 12.5px;
}
.tfilter .tf-lab { color: var(--faint); margin-right: 6px; }
.tfilter a {
  padding: 3px 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
}
.tfilter a:hover { background: #eef2f7; }
.tfilter a.on { background: var(--brand-weak); color: var(--brand); font-weight: 600; border-color: #dbe6fb; }
.tfilter .tf-on { color: var(--brand); font-size: 11.5px; margin-left: 8px; }
@media (max-width: 900px) {
  .tfilter { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tfilter::-webkit-scrollbar { display: none; }
}

/* 数量 / 单位这两格很窄（72 / 62px），不能沿用供应商那种宽输入框的内边距，
   否则 padding 吃掉一半宽度，「箱」字被挤到左上角。用属性选择器精确覆盖。 */
.b-table td input[data-q="qty_plan"],
.b-table td input[data-q="unit"] {
  /* 这两格是采购最常盯的数，字号宁可大：12.5 → 14 → 20px（2026-11-09 用户连提两次）。
     列窄就加宽列、收内边距，绝不靠缩小字号来塞进去。
     20px 塞 30 高太挤，格高放到 36。 */
  height: 36px; padding: 0 1px; font-size: 20px; line-height: 34px;
  text-align: center; border-radius: 6px; width: 100%;
  font-variant-numeric: tabular-nums;
}
.b-table td input[data-q="qty_plan"] { text-align: right; font-weight: 600; color: var(--ink); }
.b-table td input[data-q="unit"] { font-weight: 500; color: var(--ink-2); }

/* 采购台类型多选时的提示 */
.b-type .type-on { font-size: 11.5px; color: var(--brand); margin-left: 6px; white-space: nowrap; }

/* ============================================================
   仓库台账顶部筛选面板（类型多选 + 时间范围）
   之前是两行裸链接，跟状态标签混成一片。收进一张浅灰卡片，
   左侧统一 32px 标签栏，芯片选中用蓝底白字，层级清楚。
   ============================================================ */
.wf-bar {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 14px; margin: -6px 0 12px;   /* 上移一点，和上面的状态卡片贴成一组 */
  display: flex; flex-direction: column; gap: 6px;
}
.wf-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wf-lab {
  flex: 0 0 34px; font-size: 12px; color: var(--faint);
  letter-spacing: .02em;
}
.wf-chips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.wf-chips a {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 999px; font-size: 12.5px; color: var(--ink-2);
  text-decoration: none; background: #f4f6f9; border: 1px solid transparent;
  white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
.wf-chips a:hover { background: #e8edf4; color: var(--ink); }
.wf-chips a.on {
  /* 和状态标签的选中态保持一致：浅蓝底 + 蓝字，别用深蓝实心，
     页面里同时出现两块筛选时，实心蓝会显得太吵 */
  background: var(--brand-weak); color: var(--brand-d);
  border-color: #d8e4fb; font-weight: 600;
}
.wf-chips a.on:hover { background: #e4eefe; }
.wf-note { font-size: 11.5px; color: var(--brand); margin-left: 4px; white-space: nowrap; }
.wf-hint { font-size: 11.5px; color: var(--faint); margin-left: 4px; white-space: nowrap; }

@media (max-width: 900px) {
  .wf-row { flex-wrap: wrap; gap: 6px; }
  .wf-lab { flex-basis: 100%; }
  .wf-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  .wf-chips::-webkit-scrollbar { display: none; }
  .wf-hint { display: none; }
}

/* 窄机（≤420）总览页会多出 4px 横向溢出，来源是卡片边框和圆角的累积。
   收一下右内边距就压住了，不影响 375 以上的布局。 */
@media (max-width: 420px) {
  .dash { padding-left: 12px; padding-right: 10px; }
}

/* 状态列：主标签 + 逾期/缺证件 横排一行，预计到货单独一行小字。
   原来四个 span 各自 block，一格子里堆四行，行高全被撑高。 */
.sum-table .st-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.sum-table .st-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; overflow: hidden; }
.sum-table .st-cell .fl { white-space: nowrap; }
.sum-table .st-cell .fl-sub { white-space: nowrap; font-size: 11px; }
.sum-table .st-cell .eta-sub { font-size: 11px; color: var(--faint); white-space: nowrap; }

/* 到货日对不上：仓库要求的到仓时间比采购承诺的预计到货还晚（多半是仓库后来改了
   到仓时间、采购承诺没跟着变）。不自动改日期，只在「预计」后面挂个小感叹号，
   鼠标停上去能看到两个日期，提示找采购确认。 */
.sum-table .st-cell .eta-warn {
  display: inline-block; width: 13px; height: 13px; line-height: 13px;
  border-radius: 50%; background: #f79009; color: #fff; text-align: center;
  font-size: 9px; font-weight: 700; font-style: normal;
  vertical-align: 1px; margin-left: 3px; cursor: help;
}

/* 提交给采购：蓝色，和「确认收货」的绿、「删除」的红区分开 */
.ibtn.sub { color: #2563eb; }
.ibtn.sub:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.sum-table tr:hover .ibtn.sub { color: #2563eb; }

/* ============================================================
   表格「列设置」：右上角一个按钮，点开勾选显示哪些列。
   列多的表每个人关心的不一样，让人自己裁。
   ============================================================ */
/* 放在筛选条里、搜索框右边：和「重置 / 筛选」同一排，不额外占地方 */
.colset-btn {
  flex: 0 0 auto;                 /* 别被筛选栏的 input 一起拉伸 */
  height: 34px; padding: 0 12px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; line-height: 1; width: auto;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.colset-btn:hover { color: var(--brand); background: #f6faff; border-color: #bfd4f7; }
/* 兜底：页面上没有筛选条时，浮在表格右上角 */
.colset-host > .colset-btn {
  position: absolute; top: 3px; right: 3px; z-index: 60;
  height: 21px; padding: 0 5px; border-radius: 6px; font-size: 11px;
}
/* 用 fixed 定位，坐标由 JS 按按钮位置算：贴按钮正下方，出界自动翻边 */
.colset-panel {
  position: fixed; z-index: 900;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  padding: 10px 12px 12px; width: 248px; max-width: calc(100vw - 16px);
  max-height: 70vh; overflow-y: auto;
}
.cs-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--faint); padding: 0 4px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.cs-all {
  font-size: 11.5px; color: var(--brand); background: none; border: 0;
  cursor: pointer; padding: 2px 4px;
}
/* 两列网格：13 个列名排 7 行，不用滚动就能看全 */
.cs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; }
.cs-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px; margin: 0;
  font-size: 12.5px; color: var(--ink-2);
  border-radius: 6px; cursor: pointer; min-width: 0;
}
.cs-row:hover { background: #f1f5fb; }
.cs-row input { margin: 0; cursor: pointer; flex: 0 0 auto; width: 14px; height: 14px; }
.cs-row span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block; line-height: 1.4;
}
@media (max-width: 900px) {
  .colset-panel { right: 4px; min-width: 160px; }
}

/* 列设置按钮的定位容器：只是包住表格，不影响表格本身的宽度 */
.colset-host { position: relative; }
.colset-host > table { width: 100%; }
/* 页面没有筛选条时按钮会浮在表格右上角 —— 最后一列表头往左让出位置，
   不然「操作」两个字被压住（用户原话：把操作那两个字往左边移动） */
.colset-host > table > thead > tr > th:last-child { padding-right: 34px; }

/* 供应商模糊联想下拉（替代浏览器原生的 datalist 大白框） */
.sup-pop {
  position: fixed; z-index: 1200;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .16);
  max-height: 264px; overflow-y: auto; padding: 4px;
}
.sup-pop-item {
  padding: 7px 10px; font-size: 13px; color: var(--ink-2);
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sup-pop-item:hover, .sup-pop-item.on { background: #eef4ff; color: var(--brand); }

/* ============================================================ 详情页操作日志 */
.i-tl { list-style: none; margin: 0; padding: 0 0 0 6px; }
.i-tl li { position: relative; padding: 0 0 16px 20px; border-left: 1px solid var(--line); }
.i-tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -4.5px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #eef4ff;
}
.tl-body { min-width: 0; }
.tl-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.tl-top b { color: var(--ink); font-weight: 650; }
.tl-act { color: var(--brand); font-size: 12.5px; }
.tl-to { color: var(--muted); font-size: 12px; }
.tl-time { margin-left: auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-detail { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) {
  .tl-time { margin-left: 0; }
}

/* ---------------- 供应商别名（疑似重名确认 + 别名表） ----------------
   只在 supalias.suspects 有命中时才出现，所以不需要「空态占位」的样式。 */
.alias-card { padding: 14px 16px 10px; margin-bottom: 14px; }
.alias-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: space-between; margin-bottom: 10px;
}
.alias-head b { font-size: 14px; }
.alias-head .c-sub { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
.alias-list { list-style: none; margin: 0; padding: 0; }
.alias-list li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.alias-list li:first-child { border-top: 0; }
.alias-pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.alias-raw {
  display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--danger, #c0392b); font-size: 13px;
}
.alias-arrow { color: var(--faint); }
.alias-canon {
  display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--brand); font-weight: 600; font-size: 13px;
}
.alias-why { color: var(--muted); font-size: 12.5px; flex: 1 1 160px; min-width: 120px; }
.alias-act { display: flex; align-items: center; gap: 6px; }
.alias-more { padding: 10px 0 4px; color: var(--muted); font-size: 12.5px; }
.alias-badge {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 4px;
  border-radius: 9px; background: var(--danger, #c0392b); color: #fff;
  font-size: 11px; line-height: 17px; text-align: center; font-weight: 600;
}

/* ---------------- 已收货价的两个提醒 ----------------
   ① .recv-late —— 采购台那格：下单超过 7 天还没回填收货价
      和 .diff-dot 同一个位置（格子右上角），但更大更显眼：
      那一个只是"值不一样"，这一个是"该有的东西没有"。 */
.c-table .recv-late {
  position: absolute; top: -6px; right: -4px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #f79009; color: #fff; font-size: 10px; font-weight: 700;
  font-style: normal; line-height: 1; cursor: help;
  box-shadow: 0 0 0 2px #fff;
}
/* ② .recv-src —— 报价明细那格：计划价空，单价是拿收货价顶上来的 */
.recv-src {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #f79009; color: #fff; font-size: 10px; font-weight: 700;
  font-style: normal; line-height: 1; cursor: help;
  vertical-align: middle; margin-right: 2px;
}
/* 已收货价与单价不一致时的差额标识（涨红跌绿，和全站一致） */
.recv-up { color: #d92d20; font-variant-numeric: tabular-nums; }
.recv-down { color: #039855; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .alias-list li { align-items: flex-start; }
  .alias-why { flex-basis: 100%; }
  .alias-raw, .alias-canon { max-width: 42vw; }
}

/* ---------------- 切换身份（代操作） ----------------
   顶栏右上角那个名字点开就是「切换成谁」。规则：同岗位互切，管理员切任何人。
   切过去之后页面顶部出现琥珀色横幅，随时能一键切回。 */
.who-wrap { position: relative; }
.who-wrap > summary { list-style: none; cursor: pointer; }
.who-wrap > summary::-webkit-details-marker { display: none; }
.who-wrap > summary::after { content: "▾"; font-size: 9px; margin-left: 4px; color: var(--faint); }
.whopop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 268px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .22); padding: 8px;
}
.whohd { font-size: 11.5px; color: var(--muted); padding: 4px 8px 8px; }
.whohd span { color: var(--faint); margin-left: 6px; }
.wrow {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px;
  border: 0; background: none; border-radius: 8px; cursor: pointer;
  text-align: left; font-size: 13px; color: var(--ink); font-family: inherit;
}
.wrow:hover { background: var(--line-2); }
.wrow .wav {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand-weak);
  color: var(--brand-d); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex: 0 0 22px;
}
.wrow i { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: auto; }
.whofoot {
  font-size: 11px; color: var(--muted); line-height: 1.55;
  padding: 8px; margin-top: 4px; border-top: 1px dashed var(--line);
}
.actbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 28px;
  background: var(--warn-weak); border-bottom: 1px solid #f5deb0;
  color: #8a5a00; font-size: 12.5px;
}
.actbar b { color: #7a4d00; }
.actbar .grow { flex: 1; }
@media (max-width: 640px) {
  .actbar { padding: 8px 14px; flex-wrap: wrap; gap: 6px; }
  .whopop { width: min(280px, calc(100vw - 24px)); }
}

/* 桌面端侧栏已经显示姓名，顶栏就收成一个「⇄ 切换身份」小按钮；
   窄屏（侧栏收起）才把姓名和岗位放出来。 */
@media (min-width: 901px) {
  .is-shell .topbar .who { display: block; }
  .who-wrap .who b, .who-wrap .who .who-role { display: none; }
  .who-sw { display: inline-block; }
}
@media (max-width: 900px) {
  .who-sw { display: none; }
}
.who-sw {
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink-2); font-size: 12px; line-height: 1.2;
  white-space: nowrap;
}
.who-wrap:hover .who-sw { border-color: #d0d5dd; color: var(--ink); }
.is-acting .who-sw { background: var(--warn-weak); border-color: #f5deb0; color: #8a5a00; font-weight: 600; }

/* ---------------- 蔬东坡凭据页（/b/suppliers/scm-cred） ----------------
   一页把「现在用哪份 / 通不通 / 换一条」讲完，配一次管很久，别做得太花。 */
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table th, .kv-table td {
  text-align: left; padding: 5px 0; vertical-align: top; font-weight: 400;
}
.kv-table th {
  width: 84px; color: var(--muted); font-size: 12px; padding-right: 10px; white-space: nowrap;
}
.kv-table td { color: var(--ink); font-size: 12.5px; word-break: break-all; }
.note {
  font-size: 12.5px; line-height: 1.65; color: var(--ink-2);
  background: var(--line-2); border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 8px; padding: 9px 12px;
}
.note.warn { background: var(--warn-weak); border-color: #f5deb0; border-left-color: var(--warn); color: #8a5a00; }
.note.ok { background: var(--ok-weak); border-color: #cdeedd; border-left-color: var(--ok); color: #0b7c4a; }
.note.bad { background: var(--danger-weak); border-color: #f8d3cf; border-left-color: var(--danger); color: #b42318; }
.warn-txt { color: #b42318; }
.mini-more { margin: 4px 0 13px; }
.mini-more > summary {
  cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none;
  padding: 6px 0; border-top: 1px dashed var(--line);
}
.mini-more > summary::-webkit-details-marker { display: none; }
.mini-more > summary::before { content: "▸ "; color: var(--faint); }
.mini-more[open] > summary::before { content: "▾ "; }
.mini-more > summary:hover { color: var(--ink); }
.field textarea { width: 100%; font-family: inherit; resize: vertical; }

/* ================================================================
   仓库汇总 / 采购台账 表格视觉规范（2026-11-05 重设计）
   ----------------------------------------------------------------
   改这一版的原因：15 列固定宽加起来 1236px，比表格本体（1214px）还宽，
   `<col>` 留给「商品」的那一列被压成 0 —— 商品名只剩一个字，编码 FS199
   逐字竖排。同时表体 13px 比表头 12px 还大，层级是反的。
   这里的规则一律排在上面那些零碎覆盖之后，以下面这套为准。
   ================================================================ */

.sum-table {
  /* 15 列塞不进 1214px。给表格一个下限，宁可横向滚一点，
     也不让「商品名」被压成竖条 —— 那是这张表最主要的阅读对象。 */
  table-layout: fixed;
  min-width: 1320px;
}

/* ---- 表头：小一号、加字重、降低彩度，让它退到背景里 ---- */
.sum-table thead th {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7686;
  letter-spacing: .03em;
  white-space: nowrap;
  padding: 9px 8px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}

/* ---- 表体：12.5px 统一，不要比表头还大 ---- */
.sum-table tbody td {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  padding: 9px 8px;
  vertical-align: middle;
}
.sum-table tbody tr + tr td { border-top: 1px solid #f1f4f8; }
.sum-table tbody tr:nth-child(even) { background: #fcfdfe; }
.sum-table tbody tr:hover { background: #f5f8fd; }

/* ---- 商品：这张表的主角，给足宽度，名称单行省略 ---- */
.sum-table td.p-cell,
.sum-table thead th:nth-child(5) { min-width: 200px; }
.sum-table .p-cell .view-only { display: block; min-width: 0; }
.sum-table .p-cell .pname {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sum-table .p-cell .p-meta {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  letter-spacing: .02em;
  color: #9aa4b2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 描述：次要信息，压小一号、单行 ---- */
.sum-table .sp-cell {
  font-size: 12px;
  color: #8a94a6;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 数字列：等宽数字 + 右对齐，纵向能对成一条线 ---- */
.sum-table td.r,
.sum-table td .q,
.sum-table td.arr-cell {
  font-variant-numeric: tabular-nums;
}
.sum-table td.r .q { font-weight: 500; color: var(--ink); }

/* ---- 日期列：小一号，别抢商品名的注意力 ---- */
.sum-table td.dt { font-size: 12px; color: #7a8598; }

/* ---- 类型：色块 + 短名，压成一个小标记 ---- */
.sum-table td.tp { font-size: 11.5px; color: #7a8598; }
.sum-table td.tp .tdot { width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; }

/* ---- 备注：别人的话小字排，自己那句是虚线下划线输入框 ---- */
.wh-note-tag {
  font-size: 11.5px;
  line-height: 1.4;
  color: #8a94a6;
  max-width: 118px;
}
.sum-table .note-in {
  height: 26px;
  font-size: 12px;
  border-bottom: 1px dashed #d5dce6;
  background: transparent;
  box-shadow: none;
}
.sum-table .note-in::placeholder { font-size: 11.5px; color: #b9c0cb; }
.sum-table .note-in.has-val { font-weight: 500; color: var(--ink); }

/* ---- 状态：小标签，宽度收窄别顶到操作列 ---- */
.sum-table .st-cell .fl { font-size: 11.5px; padding: 2px 7px; }

/* ---- 操作：图标按钮压到 26px，默认淡、悬停才显色 ---- */
.sum-table th.act,
.sum-table td.act { width: 170px; }
.sum-table .ibtn { width: 26px; height: 26px; border-radius: 6px; opacity: .55; transition: opacity .12s, background .12s; }
.sum-table tr:hover .ibtn { opacity: .95; }
.sum-table .ibtn:hover { background: #eef3fb; opacity: 1; }

/* ---- 窄屏仍然交回自动列宽（原来那套规则不能被我上面的 fixed 干掉） ---- */
@media (max-width: 700px) {
  .sum-table { min-width: 0; table-layout: auto; }
  .sum-table td.p-cell, .sum-table thead th:nth-child(5) { min-width: 0; }
}

/* ---- 操作列固定在右侧：横向滚到哪儿都能点到，不用滚回去找 ---- */
.sum-table { min-width: 1280px; }
.sum-table thead th.act,
.sum-table tbody td.act {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -10px 0 12px -10px rgba(16, 24, 40, .18);
}
.sum-table thead th.act { background: #f7f9fc; z-index: 4; }
.sum-table tbody tr:nth-child(even) td.act { background: #fcfdfe; }
.sum-table tbody tr:hover td.act { background: #f5f8fd; }
.sum-table tr.is-new > td.act { background: #fffbe6; }

/* ---- 备注输入框：盖掉通用输入框的边框样式，做成"可写的下划线" ---- */
.sum-table tbody td.wh-note-cell input.note-in {
  border: 0;
  border-bottom: 1px dashed #d5dce6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  height: 24px;
  padding: 2px 2px;
  font-size: 12px;
}
.sum-table tbody td.wh-note-cell input.note-in:hover { border-bottom-color: var(--brand); }
.sum-table tbody td.wh-note-cell input.note-in:focus {
  border-bottom: 1px solid var(--brand);
  background: #f7faff;
  box-shadow: none;
}

/* 操作列 sticky 到右边缘时会被 .sum-scroll 的竖向滚动条压住，
   预留出滚动条的位置，最后一个图标才不会被切掉 */
.sum-scroll { scrollbar-gutter: stable; }

/* 操作列最后那个「更多」图标老是被右边缘切掉：收窄按钮、右边留出内边距 */
.sum-table th.act,
.sum-table td.act { width: 156px; padding-right: 14px; }
.sum-table td.act .act-row { gap: 2px; }
.sum-table .ibtn { width: 24px; height: 24px; }

/* 1280 在 1512 屏幕上还是差几十像素、会横向滚一点、把「更多」顶到边上。
   降到 1240 正好塞进内容区：商品列仍有 200px 以上，各项都不挤。 */
.sum-table { min-width: 1240px; }
/* ================================================================
   采购工作台 · 手机卡片（≤900px）
   ----------------------------------------------------------------
   16 列宽表在手机上要横滑五次才摸得到「供应商」，采购根本填不了单。
   这里按仓库卡片同一套语言重排：一条一卡，只突出要动的那四格 ——
   供应商 / 计划价 / 预计到货 / 采购负责人；四格 + 负责人齐了就自动下单。
   输入框仍是 .q-in + data-q + data-id，和桌面共用同一套 JS（失焦保存、
   建议值虚线、自动下单、差异角标），没有第二套逻辑。
   ================================================================ */
.b-cards { background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--r-lg); overflow: hidden; }
.b-card { padding: 12px 14px 11px; border-bottom: 1px solid var(--line-2); }
.b-card:last-child { border-bottom: 0; }
.b-card.is-late { box-shadow: inset 3px 0 0 0 #e2564b; }   /* 超期未到，左侧红竖线 */

.bc-hd { display: flex; align-items: center; gap: 9px; }
.bc-hd .row-chk { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; cursor: pointer; }
.bc-nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink);
         overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-nm a { color: inherit; }
.bc-qty { font-size: 14px; font-weight: 650; white-space: nowrap;
          font-variant-numeric: tabular-nums; }
.bc-qty i { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 2px; }

.bc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
           margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.bc-meta .tdot { width: 5px; height: 5px; margin-right: -3px; vertical-align: 1px; }
.bc-flag { padding: 1px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1.5; }
.bc-flag.warn { background: #fff8ec; color: #b54708; border: 1px solid #f5e2c4; }
.bc-flag.danger { background: #fdeceb; color: #b42318; border: 1px solid #f6d5d2; }

/* 字段区：两列；供应商名字长，占满一行 */
.bc-f { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px;
        margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.bc-fi { display: block; min-width: 0; }
.bc-fi.bc-wide { grid-column: 1 / -1; }
.bc-fi .k { display: flex; align-items: baseline; gap: 4px;
            font-size: 11px; color: var(--faint); line-height: 1.7; }
.bc-fi .k em { font-style: normal; font-size: 10.5px; color: #b9c0cb; }

/* 输入框：尺寸放大到手指好点，其余（虚线建议 / 差异点 / 存好变绿）和桌面一致 */
.b-card input.q-in {
  width: 100%; height: 35px; padding: 0 9px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; background: #fcfdff;
  font-size: 13.5px; color: var(--ink); font-family: inherit;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.b-card input.q-in::placeholder { color: #c6cedb; font-size: 12.5px; }
.b-card input.q-in.empty { background: #fff; border-style: dashed; border-color: #e2e8f0; }
.b-card input.q-in:focus {
  outline: none; background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}
.b-card input.q-in.warn { color: #b54708; font-weight: 600; }
.b-card input.q-in.saved { border-color: #34a853; background: #f4fbf6; }
.b-card input.q-in.bad { border-color: var(--danger); background: #fff6f5; }
.b-card input.q-in.suggested { border-style: dashed; border-color: #c3b5fb; background: #fdfcff; color: #5b46b8; }
.b-card input.q-in.suggested:focus { border-style: solid; }
.b-card .diff-dot {
  position: absolute; top: -3px; right: -3px; z-index: 3;
  width: 7px; height: 7px; border-radius: 50%;
  background: #f79009; box-shadow: 0 0 0 2px #fff; cursor: help;
}

/* 备注：一条虚线，不抢地方 */
.bc-note { margin-top: 9px; }
.bc-note input.q-in {
  height: 33px; font-size: 12.5px; background: transparent;
  border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; padding-left: 2px;
}
.bc-note input.q-in:focus {
  background: #fff; border: 1px solid var(--brand); border-radius: 8px; padding-left: 9px;
}

.bc-ft { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.bc-ft .act-row { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bc-ft .btn.sm { height: 30px; min-height: 30px; padding: 0 13px; font-size: 12.5px; }
.bc-st { font-size: 11.5px; color: var(--faint); }

/* 手机采购卡片：确认下单 → 浅色「运输中」（2026-11-08，替代证件「未确认」chip）。
   自动下单成功后由 app.js 的 markOrdered 原地替换，不再另挂「已下单」小字。 */
.bc-order-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 16px; border: 0; border-radius: 8px;
  background: var(--brand); color: #fff; font-family: inherit;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .18); white-space: nowrap;
}
.bc-order-btn:active { transform: translateY(1px); }
.bc-transit {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 16px; border-radius: 8px; white-space: nowrap;
  border: 1px solid #dbe4f0; background: #f2f6fb; color: #7d8da3;
  font-size: 12.5px; font-weight: 600;
}
.bc-transit.is-done { border-color: #dcece1; background: #f2f9f4; color: #6f9c81; }


/* ================================================================
   字号整体放大（2026-11-05 第二版）
   上一版把表体压到 12.5px，用户反馈"看着眼睛疼"。字号这件事要以
   长时间盯着屏幕的人为准，不能为了"精致"牺牲可读性。这里统一放大
   一档，同时把数量/单位/实收这些只放数字的列收窄，腾出来的宽度给商品名。
   ================================================================ */

.sum-table { min-width: 1310px; }

.sum-table thead th {
  font-size: 12.5px;
  letter-spacing: .02em;
  padding: 10px 8px;
}

.sum-table tbody td {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 11px 8px;
}

/* 商品名：全表最该看清的东西，再大一号 */
.sum-table .p-cell .pname { font-size: 14.5px; }
.sum-table .p-cell .p-meta { font-size: 11.5px; margin-top: 2px; }

/* 数字列：字号跟着放大，但列宽收窄，不让空荡荡的格子占地方 */
.sum-table td.r .q { font-size: 14px; }
.sum-table td.k { font-size: 14px; }

/* 描述 / 日期 / 类型：次要但也要看得清 */
.sum-table .sp-cell { font-size: 12.5px; max-width: 110px; }
.sum-table td.dt { font-size: 13px; }
.sum-table td.tp { font-size: 12.5px; }

/* 备注 */
.wh-note-tag { font-size: 12.5px; max-width: 122px; }
.sum-table tbody td.wh-note-cell input.note-in { font-size: 13px; height: 26px; }
.sum-table tbody td.wh-note-cell input.note-in::placeholder { font-size: 12.5px; }

/* 状态标签 */
.sum-table .st-cell .fl { font-size: 12.5px; padding: 3px 8px; }

/* 操作图标回到 28px：24 太小，点起来也累 */
.sum-table th.act, .sum-table td.act { width: 150px; padding-right: 12px; }
.sum-table .ibtn { width: 28px; height: 28px; }
.sum-table .ibtn svg { width: 16px; height: 16px; }

/* 宽屏（≥1600）再放大一档，大屏上不用凑着看 */
@media (min-width: 1600px) {
  .sum-table { min-width: 1420px; }
  .sum-table thead th { font-size: 13px; }
  .sum-table tbody td { font-size: 14px; }
  .sum-table .p-cell .pname { font-size: 15px; }
}

/* 数量列窄到 44 时 4 位数会被截成 "1…"，放宽到 58 并禁止换行/省略 */
.sum-table td.r, .sum-table th.r { white-space: nowrap; }

/* 数字列：表头跟数字一起右对齐，别再居中悬在一片空白上方；
   内边距收窄，格子里不留那么多空气。 */
.sum-table thead th.r { text-align: right; padding-right: 10px; }
.sum-table tbody td.r { padding-left: 4px; padding-right: 10px; }
.sum-table tbody td.c { padding-left: 4px; padding-right: 6px; }

/* ================================================================
   全站表格统一规格（2026-11-05）
   ----------------------------------------------------------------
   之前每个页面各写一套：表头 11 / 11.5 / 12 / 12.5 都有，表体全是 13。
   共同毛病是「表头比表体还小」，层级是反的，看着散。
   这里给所有表格一套同一把尺子：
       表头 12.5 / 600 / 灰   表体 13.5 / 行高 1.5
       主名称列 14.5 / 600    数字列右对齐 + 等宽数字
   改一处、全站生效，别再按页面单个调。
   ================================================================ */

/* ---- 表头：统一小一号、加字重、降彩度 ---- */
.table thead th,
.b-table thead th,
.c-table thead th,
.sum-table thead th,
.tbl-mini thead th {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7686;
  letter-spacing: .02em;
  padding: 10px 8px;
  vertical-align: middle;
}

/* ---- 表体：统一 13.5，行距放开 ---- */
.table tbody td,
.b-table tbody td,
.c-table tbody td,
.sum-table tbody td,
.tbl-mini tbody td {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 11px 8px;
  vertical-align: middle;
}

/* 总览那种小表原来 th 内边距是 0，表头贴着上边框，给它一点呼吸 */
.tbl-mini thead th { padding: 7px 6px; }
.tbl-mini tbody td { padding: 8px 6px; }

/* ---- 主名称列（商品 / 供应商）：全站最该看清的，统一大一号 ---- */
.b-table .p-line .pname,
.c-table .p-line .pname,
.table .p-cell .pname,
.sum-table .p-cell .pname {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

/* ---- 数字列：右对齐 + 等宽数字，纵向对成一条线 ---- */
.table td.r, .b-table td.r, .c-table td.r,
.sum-table td.r, .tbl-mini td.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table thead th.r, .b-table thead th.r, .c-table thead th.r,
.sum-table thead th.r, .tbl-mini thead th.r {
  text-align: right;
  padding-right: 10px;
}
.table tbody td.r, .b-table tbody td.r, .c-table tbody td.r,
.sum-table tbody td.r, .tbl-mini tbody td.r { padding-right: 10px; }

/* ---- 行分隔线统一淡一档，斑马纹也统一 ---- */
.table tbody tr + tr td,
.b-table tbody tr + tr td,
.c-table tbody tr + tr td,
.tbl-mini tbody tr + tr td { border-top: 1px solid #f1f4f8; }

/* ---- 次要信息（编码 / 规格 / 时间）：比正文小一档但别小到看不清 ---- */
.table .p-meta, .b-table .p-meta, .c-table .p-meta, .sum-table .p-meta { font-size: 11.5px; }
.table .c-sub, .b-table .c-sub, .c-table .c-sub, .sum-table .c-sub,
.tbl-mini .c-sub { font-size: 11.5px; }

/* 采购台列多（14 列），字号放大后横向溢出 51px。
   把左右内边距从 8 收到 7，纵向保持 11 不动 —— 行高不变，宽度省回来。 */
.b-table thead th { padding-left: 7px; padding-right: 7px; }
.b-table tbody td { padding-left: 7px; padding-right: 7px; }

/* 采购台：16 列定宽合计 1394px，把唯一的 auto 列（商品）挤成 0 ——
   商品名只剩两个字。这里跟仓库汇总一个做法：给表格下限、给商品列兜底宽度，
   操作列固定在右侧，横向滚动时也点得到。 */
.b-table {
  min-width: 1356px;
  table-layout: fixed;
}
.b-table td.p-cell,
.b-table thead th:nth-child(4) { min-width: 180px; }
.b-table td.p-cell .p-line { min-width: 0; }
.b-table td.p-cell .p-line .pname {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b-table td.sup-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-table thead th.act,
.b-table tbody td.act {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -10px 0 12px -10px rgba(16, 24, 40, .18);
}
.b-table thead th.act { background: #f7f9fc; z-index: 4; }
.b-table tbody tr:hover td.act { background: #f5f8fd; }

/* 再放宽一档：供应商 140、负责人 92，商品 200+。列多了总要滚，
   宁可横向滚也不要把人名裁成两个字。 */
.b-table { min-width: 1420px; }
.b-table td.p-cell, .b-table thead th:nth-child(4) { min-width: 200px; }

/* 采购台商品格没有类名（就是裸 <td>），名字是 .c-name ——
   之前按 .p-cell / .pname 写的规则全落空了，所以字号没变、列也没撑开。
   这里按第 4 列定位，稳妥。 */
.b-table thead th:nth-child(4) { white-space: nowrap; }
.b-table tbody td:nth-child(4) { min-width: 0; }
.b-table tbody td:nth-child(4) .b-main { min-width: 0; }
.b-table tbody td:nth-child(4) .c-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.b-table tbody td:nth-child(4) .c-name:hover { color: var(--brand); }
.b-table tbody td:nth-child(4) .c-sub { font-size: 11.5px; }

/* ================================================================
   关键修复：表格吃了 width:100% + table-layout:fixed 的亏
   ----------------------------------------------------------------
   fixed 布局下，列宽会「按比例缩」到表格宽度里 —— 所以 colgroup 里写
   92px 的列，实际只有 78px，人名就被截成两个字；min-width 也压不住它。
   改成把表格宽度直接写成 colgroup 的合计值，容器本来就有 overflow:auto，
   多出来的部分横向滚动，列宽才会按写的一分不少。
   ================================================================ */
.b-table { width: 1426px; }      /* 32+78+66+220+96+56+38+140+78+78+66+88+92+110+72+116 */
.sum-table { width: 1310px; }    /* 与 _wh_summary.html 的 colgroup 合计一致 */

/* 真正的元凶：「☰ 列」功能会把表格包进 .colset-host，
   那里有一条 `.colset-host > table { width: 100% }`（优先级 0,1,1），
   比 `.b-table`（0,1,0）高，把列宽按比例压回去了。
   这里用同样带元素的写法把优先级顶上去。 */
.colset-host > table.b-table { width: 1426px; }
.colset-host > table.sum-table { width: 1310px; }

/* ================================================================
   表格文字加深（2026-11-05）
   之前日期、类型、描述用的是自己调的浅灰（#7a8598 / #8a94a6），
   在白色背景上发飘、看不清。统一回到深色系：
       正文 → var(--ink) #0f172a
       次要列 → var(--ink-2) #344054
       描述/说明 → var(--muted) #667085
   只有真正的空值（—）继续用浅灰，那是"没有内容"的语义，不该变黑。
   ================================================================ */

.table tbody td,
.b-table tbody td,
.c-table tbody td,
.sum-table tbody td,
.tbl-mini tbody td { color: var(--ink); }

.table thead th,
.b-table thead th,
.c-table thead th,
.sum-table thead th,
.tbl-mini thead th { color: #475467; }

.sum-table td.dt,
.table td.dt,
.b-table td.c-date,
.c-table td.c-date { color: var(--ink-2); }

.sum-table td.tp,
.table td.tp,
.b-table td.tp { color: var(--ink-2); }

.sum-table .sp-cell,
.table .sp-cell,
.b-table td.c-spec { color: var(--muted); }

/* 商品名 / 供应商：最黑那一档 */
.sum-table .p-cell .pname,
.table .p-cell .pname,
.b-table tbody td:nth-child(4) .c-name,
.b-table .sup-cell .sup-name { color: var(--ink); }

/* 空值占位保持浅灰（— 表示没有内容，不是文字） */
.faint,
.sum-table td .faint,
.table td .faint,
.b-table td .faint { color: var(--faint); }

/* 商品描述再深一档：原来 #667085 还是偏飘，跟着正文一起看得清 */
.sum-table .sp-cell,
.table .sp-cell,
.b-table td.c-spec { color: #475467; }

/* ================================================================
   表格文字一律黑色（2026-11-05 定稿）
   用户要求：除了空值（—）之外全部纯黑。
   深灰在投影/缩放屏上还是会发飘，这里不再分级，正文、表头、日期、
   类型、描述、编码全用 #000；只有"没有内容"的占位保持浅灰。
   ================================================================ */

.table tbody td,
.b-table tbody td,
.c-table tbody td,
.sum-table tbody td,
.tbl-mini tbody td,
.table thead th,
.b-table thead th,
.c-table thead th,
.sum-table thead th,
.tbl-mini thead th {
  color: #000;
}

/* 上面这组会把 --ink 也盖掉，商品名重新强调一次（加粗而不是换色） */
.sum-table .p-cell .pname,
.table .p-cell .pname,
.b-table tbody td:nth-child(4) .c-name { color: #000; font-weight: 600; }

.sum-table td.dt, .table td.dt, .b-table td.c-date, .c-table td.c-date,
.sum-table td.tp, .table td.tp, .b-table td.tp,
.sum-table .sp-cell, .table .sp-cell, .b-table td.c-spec { color: #000; }

/* 小字（编码 / 次数 / 仓库名）：也是黑的，只是小 */
.sum-table .p-meta, .table .p-meta, .b-table .p-meta, .c-table .p-meta,
.sum-table .c-sub, .table .c-sub, .b-table .c-sub, .c-table .c-sub,
.tbl-mini .c-sub { color: #000; }

/* 唯一的例外：空值占位。— 表示"没有内容"，黑掉反而像有数据 */
.faint,
.sum-table td .faint,
.table td .faint,
.b-table td .faint,
.c-table td .faint,
.tbl-mini td .faint { color: #b6bdc9; }

/* 下单时间 / 到仓时间：日期本来就短，字号小了要凑近看。
   比正文（13.5）再大两档，到 15.5，并加一点字重让它立住。 */
.sum-table td.dt,
.table td.dt,
.b-table td.c-date,
.b-table td.c-date,
.c-table td.c-date {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .01em;
}
/* 这两列的表头跟着大一点，不然头小身子大 */
.sum-table thead th:nth-child(3),
.sum-table thead th:nth-child(4) { font-size: 13.5px; }

/* 类型列原来 12.5，比正文还小，跟放大的日期列放一起更显得缩，提到正文级 13.5 */
.sum-table td.tp, .table td.tp, .b-table td.tp { font-size: 13.5px; }


/* ================================================================
   整体放大 1.2 倍（2026-11-05）
   用户常年开 150% 缩放，说明默认字号偏小。但整页 zoom 会把宽表撑散
   （试过 1.5 倍：中间几列直接被挤出可视区、行高翻倍），所以改成
   "字号和列宽一起按 1.2 放大"，表格靠横向滚动承载，结构不散。
   ================================================================ */

/* 表头 / 表体 */
.table thead th, .b-table thead th, .c-table thead th,
.sum-table thead th, .tbl-mini thead th { font-size: 15px; }
.table tbody td, .b-table tbody td, .c-table tbody td,
.sum-table tbody td, .tbl-mini tbody td { font-size: 16px; }

/* 主名称列 */
.sum-table .p-cell .pname, .table .p-cell .pname,
.b-table tbody td:nth-child(4) .c-name { font-size: 17.5px; }

/* 日期（本来就要求大两号） */
.sum-table td.dt, .table td.dt, .b-table td.c-date, .c-table td.c-date { font-size: 18.5px; }
.sum-table thead th:nth-child(3), .sum-table thead th:nth-child(4) { font-size: 15px; }

/* 类型 / 描述 / 小字 */
.sum-table td.tp, .table td.tp, .b-table td.tp { font-size: 16px; }
.sum-table .sp-cell, .table .sp-cell, .b-table td.c-spec { font-size: 15px; }
.sum-table .p-meta, .table .p-meta, .b-table .p-meta, .c-table .p-meta,
.sum-table .c-sub, .table .c-sub, .b-table .c-sub, .c-table .c-sub,
.tbl-mini .c-sub { font-size: 13.5px; }

/* 数量等数字 */
.sum-table td.r .q, .sum-table td.k { font-size: 16.5px; }

/* 备注格 */
.wh-note-tag { font-size: 15px; max-width: 150px; }
.sum-table tbody td.wh-note-cell input.note-in { font-size: 15px; height: 30px; }
.sum-table tbody td.wh-note-cell input.note-in::placeholder { font-size: 15px; }

/* 状态标签 */
.sum-table .st-cell .fl { font-size: 15px; padding: 4px 10px; }

/* 行高跟着放开 */
.sum-table tbody td, .b-table tbody td, .table tbody td { padding-top: 12px; padding-bottom: 12px; }

/* 表格总宽跟着列宽走（列宽已按 1.2 缩放） */
.sum-table { width: 1572px; }
.b-table { width: 1447px; }
.colset-host > table.sum-table { width: 1572px; }
.colset-host > table.b-table { width: 1447px; }

/* ================================================================
   全部明细页重做（2026-11-05）
   ----------------------------------------------------------------
   原来的毛病：
     1. 供应商格是 flex，名称是裸文本节点 —— 长了就往左溢出，
        左边几个字被裁掉，视觉上跟数量列叠在一起（用户截图圈的就是这个）。
     2. 仓库和学校挤在一行，100px 装不下，必然截断。
     3. 商品列吃满剩余宽度，右边几列被压扁。
   这里给这一页自己的视觉规则，跟仓库汇总/采购台同一套字号和间距。
   ================================================================ */

.list-table td { vertical-align: middle; }

/* 商品：名称一行（可省略），类型·规格一行小字 */
.list-table td.p-cell .p-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.list-table td.p-cell .pname {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-table td.p-cell .p-meta {
  display: block; margin-top: 2px;
  font-size: 13px; color: #475467;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 仓库 / 学校：两行，仓库是正文，学校是小字 */
.list-table td.wh-cell { line-height: 1.35; }
.list-table td.wh-cell .w1 { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-table td.wh-cell .w2 { display: block; font-size: 12.5px; color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 供应商：名称占剩余宽度可省略，价格固定右侧不被挤 */
.list-table td.sup-cell {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  white-space: nowrap;
}
.list-table td.sup-cell .sup-name {
  flex: 1 1 auto; min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink);
}
.list-table td.sup-cell .sup-price {
  flex: 0 0 auto; font-size: 13px; color: #475467;
  font-variant-numeric: tabular-nums;
}
.list-table td.sup-cell .sup-price.dim { color: #b6bdc9; }

/* 数量：数字 + 单位贴着，右对齐；实收差异一行小字 */
.list-table td.qty-cell { white-space: nowrap; }
.list-table td.qty-cell .u { font-style: normal; margin-left: 2px; font-size: 13px; color: #475467; }
.list-table td.qty-cell .c-sub { display: block; margin-top: 2px; font-size: 12.5px; color: #475467; }
.list-table td.qty-cell .diff { color: #d92d20; }

/* 状态标签、操作按钮：跟其他表一致 */
.list-table .st-cell .fl { font-size: 14px; padding: 3px 9px; }
.list-table td.act .btn { font-size: 14px; }

/* ================================================================
   全部明细：卡片式列表（2026-11-05 重做）
   ----------------------------------------------------------------
   表格版的问题：一行里没有任何"主角"，商品名 8 个字占 280px，
   右边四列全是「—」，看着就是一片灰。卡片版把层级做出来：
     左色条（类型）→ 商品名（标题）→ 类型·规格（副标题）
     → 仓库 / 数量 / 供应商（第二信息层）→ 状态（右侧锚点）
   ================================================================ */

.il-panel { background: #f6f8fb; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.il-panel .c-foot { background: #fff; border-top: 1px solid var(--line); }

.il-head,
.il-card {
  display: grid;
  grid-template-columns: 40px minmax(160px, 1.6fr) 96px 104px minmax(130px, 1.1fr) 76px 100px 84px 82px 64px;
  align-items: center;
  gap: 11px;
}

/* 表头：一格一个列名，跟卡片对齐，扫读时知道每块是什么 */
.il-head {
  padding: 10px 16px 10px 20px;
  font-size: 13.5px; font-weight: 600; color: #5b6678;
  background: #eef2f7; border-bottom: 1px solid var(--line);
}
.il-head .r { text-align: right; }
.il-head .c { text-align: center; }

.il-list { padding: 10px 12px 4px; }

/* 卡片本体 */
.il-card {
  position: relative;
  padding: 12px 14px 12px 20px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow .14s, border-color .14s, transform .14s;
}
/* 左侧类型色条：不用读字就能分辨品类 */
.il-card::before {
  content: "";
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--tc, #94a3b8);
}
.il-card:hover {
  border-color: #c7d7f0;
  box-shadow: 0 4px 14px -6px rgba(16, 24, 40, .18);
  transform: translateY(-1px);
}
.il-card.is-lock { background: #fcfcfd; }
.il-card.is-lock .il-name { color: #1f2937; }

/* 勾选 */
.il-ck { display: flex; align-items: center; justify-content: center; }
.il-ck input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.il-ck .ck-off { color: #c9d0da; }

/* 商品：标题 + 副标题 */
.il-main { min-width: 0; }
.il-name {
  display: block;
  font-size: 17.5px; font-weight: 600; color: #000;
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
.il-name:hover { color: var(--brand); }
.il-sub { margin-top: 2px; font-size: 13px; color: #5b6678; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-sub b { font-weight: 600; }
.il-sub span { color: #7a8598; }

/* 仓库 / 学校、数量、负责人、到货 */
.il-wh span, .il-own, .il-eta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-wh { font-size: 15px; color: #000; line-height: 1.35; }
.il-wh .il-dim { font-size: 12.5px; color: #6b7686; }
.il-own, .il-eta { font-size: 15px; color: #000; }
.il-eta { font-variant-numeric: tabular-nums; }

.il-qty { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.il-qty b { font-size: 18px; font-weight: 600; color: #000; }
.il-qty i { font-style: normal; font-size: 13px; color: #5b6678; margin-left: 1px; }
.il-qty .il-dim { display: block; font-size: 12.5px; color: #5b6678; margin-top: 1px; }
.il-qty .il-diff { color: #d92d20; font-weight: 600; }

/* 供应商：名称一行可省略，价格跟在后面 */
.il-sup { min-width: 0; }
.il-sup-nm {
  display: block; font-size: 15px; color: #000; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.il-sup-pr { display: block; margin-top: 1px; font-size: 12.5px; color: #5b6678; font-variant-numeric: tabular-nums; }
.il-sup-pr em { font-style: normal; margin-left: 6px; color: #0f766e; }

/* 状态：右侧固定锚点 */
.il-st { text-align: center; }
.il-card .fl { display: inline-block; font-size: 14px; padding: 3px 10px; border-radius: 999px; }

.il-act { text-align: right; }

/* 窄屏仍然走手机卡片版，桌面卡片版收起来。
   窄屏少两样：负责人（il-own）和「详情」按钮（il-act）—— 整张卡片本来就能点，
   留按钮只会把证件/状态挤到下一行去。 */
@media (max-width: 1100px) {
  .il-head, .il-card { grid-template-columns: 36px minmax(130px, 1.5fr) 80px 92px minmax(110px, 1fr) 104px 74px 70px; }
  .il-card .il-own, .il-card .il-act { display: none; }
  .il-head > span:nth-child(6), .il-head > span:nth-child(10) { display: none; }
}
@media (max-width: 880px) {
  .il-panel { display: none; }
}

/* ================================================================
   证件：卡片上的小格子 + 四件套弹窗（2026-11-09 从采购台挪到全部明细）
   三个色：齐全=绿、有缺=红、没确认=黄。缺哪几样直接写在格子里
   （「缺许可·官检」比「缺 2 项」有用），完整说法放 title。
   ================================================================ */
.il-cert { text-align: center; }

.cert-chip {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f2f4f7; color: #5b6678;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .12s, box-shadow .12s;
}
.cert-chip.ok   { background: #e9f7ee; color: #067647; border-color: #b8e2c6; }
.cert-chip.miss { background: #fdecea; color: #b42318; border-color: #f6c9c3; }
.cert-chip.todo { background: #fff7e8; color: #b54708; border-color: #f3d9a6; }
.cert-chip:hover { box-shadow: 0 1px 0 rgba(16, 24, 40, .12); }
.cert-chip.bump { animation: cert-bump .5s ease; }
@keyframes cert-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.cert-chip.is-ro { cursor: default; }
.cert-chip.is-ro:hover { box-shadow: none; }
.cert-chip.sm { padding: 2px 7px; font-size: 11.5px; }

/* 弹窗：手机上要能单手点到保存，所以卡片窄、按钮高 */
.cert-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; }
.cert-modal[hidden] { display: none; }
.cert-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .42); }
.cert-card {
  position: relative;
  width: min(370px, calc(100vw - 28px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px -16px rgba(16, 24, 40, .38);
  overflow: hidden;
}
.cert-hd { padding: 16px 18px 8px; }
.cert-hd b { font-size: 16.5px; color: #101828; }
.cert-nm { display: block; margin-top: 3px; font-size: 13px; color: #6b7686; }
.cert-bd { padding: 2px 18px 14px; }
.cert-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 15px; color: #101828;
  cursor: pointer;
}
.cert-row input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.cert-row-ok span { font-weight: 600; }
.cert-split { height: 1px; background: var(--line); margin: 6px 0; }
.cert-tip { margin-top: 10px; font-size: 12.5px; color: #6b7686; line-height: 1.5; }
/* 批量模式多出来的一条说明：这次是「覆盖」，不是往原来的缺件上追加 */
.cert-bulk {
  margin: 6px 0 10px; padding: 9px 11px; border-radius: 9px;
  background: #fff7e8; border: 1px solid #f3d9a6;
  font-size: 12.5px; color: #8a4a06; line-height: 1.55;
}
.cert-bulk[hidden] { display: none; }
.cert-bulk b { color: #b54708; }
.cert-bulk u { text-decoration-color: #e2a33f; text-underline-offset: 2px; }
.cert-ft {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line); background: #fafbfc;
}
.cert-sp { flex: 1; }
@media (max-width: 700px) {
  .cert-row { padding: 10px 0; font-size: 16px; }
  .cert-ft .btn { min-height: 40px; }
}

/* ================================================================
   筛选栏：日期框收窄（2026-11-05）
   原生 date 输入框在 Chrome 里会按"yyyy/mm/dd + 日历图标"撑到 180px 以上，
   两个并排就把整行挤满，看着很笨。这里统一压到 132px、高度一致、
   去掉多余内边距，跟下拉框同一视觉重量。
   ================================================================ */
.filter-bar input[type="date"],
.card .filter-bar input[type="date"] {
  width: 132px;
  min-width: 0;
  padding: 6px 8px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  text-align: left;
}
/* 日历图标别把文字挤出去 */
.filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: .55; margin-left: 2px; padding: 0; cursor: pointer;
}
.filter-bar input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: .9; }

/* 下拉框也统一一下高度和圆角，跟日期框并列时对齐 */
.filter-bar select,
.filter-bar input[type="text"] {
  height: 38px;
  border-radius: 8px;
}
.filter-bar input[type="date"] { height: 38px; }

/* 筛选栏「下单 从… 至 …」这一组：有文字说明才知道筛的是什么 */
.fl-range {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 10px;
  background: #fff; border: 1px solid #d8dfe8; border-radius: 8px;
  height: 38px; box-sizing: border-box;
}
.fl-range-t { font-size: 13.5px; color: #5b6678; font-weight: 600; white-space: nowrap; }
.fl-range-x { font-size: 13px; color: #98a2b3; }
/* 放进组里之后，日期框自己不要再画边框 */
.fl-range input[type="date"] {
  width: 118px; height: 30px; padding: 0 4px;
  border: 0; background: transparent;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.fl-range input[type="date"]:focus { outline: none; background: #f7faff; border-radius: 6px; }
.fl-range:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }

/* 卡片里的日期块：下单 / 到仓 / 预计，三行小字，标签统一灰 */
.il-dates { font-size: 13.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.il-dates span { display: block; white-space: nowrap; }
.il-dates em {
  font-style: normal; display: inline-block; width: 30px;
  color: #8a94a6; font-size: 12.5px;
}
.il-dates .il-eta-line em { color: #b8873a; }
.il-dates .il-eta-line { color: #b8873a; }





/* ================================================================
   仓库报量：桌面 = 老版多字段表单，手机 = 三步录入（2026-11-06 定稿）
   ----------------------------------------------------------------
   两套表单都在 DOM 里切换显示；不可见那份的控件由 app.js 置为
   disabled，不会重复提交同名字段。
   2026-11-06 二次修正：一度改成「按 UA 认手机」，结果企微/微信内置浏览器、
   桌面模式 UA 认不出来，手机上反而显示桌面表单（可整站底栏已按宽度变成
   手机壳，出现混搭）。UA 不可靠，已撤掉。
   现在只按宽度，且把断点单独收到 560px：
     · 手机常见 CSS 宽 320~430（大屏机、折叠外屏也 <560）→ 三步录入
     · 电脑正常宽度、以及把窗口拉窄到 561~700 → 老版多字段表单
     · 平板 / 手机横屏 >560 → 老版多字段表单（屏幕宽，放得下）
   整站手机壳仍是 700 断点，这里只收「新增一条」这一个表单区域。
   ================================================================ */
.entry-m { display: none; }

@media (max-width: 560px) {
  .entry-d { display: none; }
  .entry-m { display: block; }
}

/* ================================================================
   总览两处观感修正（2026-11-06）
   1) 采购备注列原来是整格浅黄底（#fffcf2），看着像可以打字的输入框，
      其实是只读引用。改成左侧一条竖线 + 正常深色文字。
   2) 总览卡片默认被网格拉成等高，待收货明细没数据时下半截全空。
      改成「各自按内容高度」，空卡片就不会拖出一大片白。
   ================================================================ */

.dnote-cell { background: transparent; }
.dnote-txt {
  border-left: 2px solid #e6c473;
  padding-left: 8px;
  color: var(--ink);
  font-weight: 500;
}

.dash-grid { align-items: start; }

/* 备注列：竖线在 96px 的窄格里看着像滚动条，改成纯文本引用（模板里加了「」） */
.dnote-txt {
  border-left: none;
  padding-left: 0;
  color: var(--ink-2);
  font-weight: 500;
}

/* ================================================================
   总览：卡片恢复等高 + 内容少的卡在卡内垂直居中（2026-11-06 修回）
   ----------------------------------------------------------------
   上一版用 align-items:start 让卡片各自按内容高度，结果「采购进度」441px
   旁边「卡在谁手上」只有 165px，右下角空出一大块，视觉上不平衡。
   改回等高（同一行两张卡同高），再让内容少的卡把内容垂直居中，
   这样既对称、又不会出现"上半截有内容、下半截全空"。
   ================================================================ */
.dash-grid { align-items: stretch; }

.dash-grid > .panel { display: flex; flex-direction: column; }
.dash-grid > .panel > .panel-bd {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* 表格类的 body 别被 flex 压窄，保持整宽 */
.dash-grid > .panel > .panel-bd.flush { display: block; }

/* ================================================================
   总览：三排卡片统一列宽（2026-11-06）
   ----------------------------------------------------------------
   原来第一排是 1.55fr : 1fr，二三排是 1fr : 1fr，三排的分界线对不上，
   看着像「采购进度把位置挤歪了」。统一成同一组比例，上下对齐。
   2026-11-06 修正：这条原来是全局规则，把 634 行「≤1180 单列」覆盖掉了，
   结果 400px 手机还在硬塞两列。现在只管桌面，平板/手机恢复单列。
   ================================================================ */
/* 采购台筛选栏：新增「采购负责人」输入 + 「下单时间」日期框
   日期框没有默认宽度会撑满一整行（把整条挤成三行），这里给死宽度；
   采购负责人也别跟商品搜索抢宽度。 */
.b-filter input[type="date"] {
  flex: 0 0 140px;
  width: 140px;
  height: 32px; padding: 0 8px;
  font-size: 13px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.b-filter input[type="date"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
}
.b-filter input[name="owner"] { flex: 0 1 150px; min-width: 118px; max-width: 150px; }
/* 140px 装不下「yyyy/mm/dd + 日历图标」，会显示成 yyyy/mm/日，加宽一点 */
.b-filter input[type="date"] { flex: 0 0 158px; width: 158px; padding: 0 6px; }
/* 收尾修正：min-width 会盖过 max-width（负责人框被撑到 240），
   日期框高度也跟其他控件不齐（40 vs 32），统一一下 */
.b-filter input[name="owner"] {
  flex: 0 0 150px; width: 150px; min-width: 0; max-width: 150px;
}
.b-filter input[type="date"] {
  flex: 0 0 168px; width: 168px; height: 32px;
  box-sizing: border-box; padding: 0 6px; line-height: 30px;
}

/* 采购台筛选栏收尾（重要）：.b-tools .b-filter input[type="text"] 的选择器
   比 .b-filter input[name="owner"] 更具体（0,3,1 > 0,2,1），
   所以我们写的 150px 一直被它按成 240px。这里用同样具体度的选择器压过去。 */
.b-tools .b-filter input[name="owner"] {
  flex: 0 0 150px; width: 150px; min-width: 0; max-width: 150px;
  padding: 0 10px;
}
.b-tools .b-filter input[type="date"] {
  flex: 0 0 168px; width: 168px; min-width: 168px; max-width: 168px;
  height: 38px; min-height: 38px; padding: 0 8px;
  font-size: 13px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.b-tools .b-filter input[type="date"] { flex: 0 0 196px; width: 196px; min-width: 196px; max-width: 196px; }
/* 实测：这个「yyyy/mm/日」是 Chrome 中文环境下 date 输入框的默认占位，
   不是被截断（加宽到 196 也一模一样）。回到紧凑宽度。 */
.b-tools .b-filter input[type="date"] { flex: 0 0 168px; width: 168px; min-width: 168px; max-width: 168px; }

/* 导入预览：双击复制后的反馈（整格淡绿 + 右上角「已复制」） */
.io-preview td { position: relative; cursor: copy; }
.io-preview td.copied { background: #e9f7ef !important; }
.io-preview td.copied::after {
  content: attr(data-copied);
  position: absolute; right: 4px; top: 2px;
  font-size: 10px; color: #1a7f45; opacity: .85;
}

/* 导入预览页：类型胶囊（沿用仓库端那排的观感，但这里是按钮不是链接） */
.io-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 4px 10px; }
.io-tabs button {
  padding: 5px 13px; border-radius: 999px;
  font-size: 12.5px; font-family: inherit; cursor: pointer;
  color: var(--muted); background: #fff; border: 1px solid var(--line);
  transition: border-color .12s, background .12s, color .12s;
}
.io-tabs button b { font-weight: 600; margin-left: 4px; opacity: .9; }
.io-tabs button:hover { border-color: #d3dae5; color: var(--ink); }
.io-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ================================================================
   列表分页条（桌面 / 手机通用）
   共 N 条 · ‹ 1 2 3 … 17 › · 20 条/页
   ================================================================ */
.pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 4px; margin-top: 2px;
}
.pager .pg-total { font-size: 12.5px; color: var(--muted); }
.pager .pg-nums { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.pager .pg-btn {
  min-width: 28px; height: 28px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--ink); font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.pager .pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager .pg-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg-btn:disabled { opacity: .4; cursor: default; }
.pager .pg-gap { color: var(--faint); font-size: 12.5px; padding: 0 2px; }
.pager .pg-per {
  height: 28px; padding: 0 6px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink);
}
@media (max-width: 700px) {
  .pager { gap: 8px; }
  .pager .pg-nums { margin: 0; }
  .pager .pg-total { width: 100%; }
}

/* 分页条里的下拉被页面上的 select{width:100%} 拉成整行，这里钉死宽度 */
.pager .pg-per {
  flex: 0 0 auto; width: auto; min-width: 96px; max-width: 120px;
  height: 28px; margin: 0;
}

/* 分页条挂进页面底栏（.c-foot / .sum-foot）时的排版：
   底栏本来是一行说明文字，这里让它变成「左侧说明 + 右侧分页控件」 */
.c-foot.has-pager,
.sum-foot.has-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.c-foot.has-pager > .pager,
.sum-foot.has-pager > .pager { margin-left: auto; }

.pager.in-bar { padding: 0; margin: 0; }
.pager.no-total .pg-total { display: none; }

@media (max-width: 700px) {
  .c-foot.has-pager,
  .sum-foot.has-pager { align-items: flex-start; }
  .pager.in-bar { margin-left: 0; width: 100%; }
}

/* 导入预览：复制结果浮层 */
.io-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  padding: 9px 16px; border-radius: 999px;
  background: rgba(24, 28, 36, .92); color: #fff; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  z-index: 9999; max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.io-toast.on { opacity: 1; transform: translate(-50%, 0); }
.io-toast.bad { background: rgba(180, 35, 24, .95); }

/* 导入预览：每行的「复制名」小按钮 */
.io-copy {
  display: inline-block; margin-top: 3px;
  padding: 1px 7px; border-radius: 6px;
  font-size: 11px; font-family: inherit; cursor: pointer;
  color: var(--brand); background: #fff; border: 1px solid #cfe0fb;
}
.io-copy:hover { background: #eff5ff; }

/* 列表行里的小「复制」按钮：平时淡淡的，鼠标移到这一行才明显 */
.rowcopy {
  margin-left: 5px; padding: 0 5px;
  font-size: 10.5px; line-height: 16px; font-family: inherit; cursor: pointer;
  color: #8a94a3; background: #fff; border: 1px solid #e3e8ef; border-radius: 5px;
  opacity: .35; transition: opacity .12s, color .12s, border-color .12s;
  vertical-align: middle;
}
tr:hover .rowcopy, .il-card:hover .rowcopy, .rowcopy:focus { opacity: 1; color: var(--brand); border-color: #cfe0fb; }
.rowcopy:hover { background: #eff5ff; }
.copied-flash { background: #e9f7ef !important; border-radius: 4px; }
@media (max-width: 700px) { .rowcopy { opacity: .8; } }

/* 表格里的复制按钮浮在格子右上角：不插进文字流，就不会把行挤高 */
.rowcopy-abs {
  position: absolute; right: 3px; top: 3px; margin: 0;
  opacity: 0; pointer-events: none;
}
tr:hover .rowcopy-abs,
td:hover .rowcopy-abs { opacity: 1; pointer-events: auto; }
@media (max-width: 700px) {
  .rowcopy-abs { opacity: .9; pointer-events: auto; }
}

@media (min-width: 1181px) {
  .dash-grid,
  .dash-grid.two,
  .dash-grid.flat { grid-template-columns: 1.45fr 1fr; }
}

/* P0 试验配套：横滑标签右侧留 24px 给「›」箭头，别压住最后一个标签的文字。
   恒定留白（不随 .hs-more 增减），滑到头时内容不会左右跳。 */
@media (max-width: 700px) {
  .b-seg, .wst-ov, .wst-tabs, .wf-chips, .ef-tabs, .entry-actions, .tabs {
    padding-right: 24px;
  }
  /* 七档状态尽量一屏排下：收紧字号/内边距，有数字角标或窄屏放不下时仍可横滑 */
  .wst-tabs { gap: 4px; padding-left: 10px; }
  .wst-tabs a { font-size: 12px; padding: 4px 7px; }
  .wst-tabs a b { margin-left: 3px; }
}

/* ================================================================
   总览手机布局（2026-11-06）：≤700 一律单列
   ----------------------------------------------------------------
   单列后面板不再互相挤，标题不会竖排、内容少的卡也不会被拉出半屏空白。
   顺带收拾几个连带问题：顶部按钮溢出、5 张 KPI 的落单卡、4 个环占两行。
   ================================================================ */
@media (max-width: 700px) {
  .dash-grid, .dash-grid.two, .dash-grid.flat {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }
  /* 等高 + 垂直居中只在桌面两列时有意义；单列下会让短卡显得空 */
  .dash-grid > .panel > .panel-bd { flex: 0 0 auto; justify-content: flex-start; }

  /* 顶部按钮：挤一行会顶出屏幕，改成可换行平铺 */
  .dash-actions { flex-wrap: wrap; gap: 8px; }
  .dash-actions .btn { flex: 1 1 46%; min-width: 0; }

  /* 面板标题 / 副标题 / 链接：允许换行，别互相挤成竖排 */
  .panel-hd { flex-wrap: wrap; gap: 4px 8px; padding: 12px 14px; }
  .panel-hd h3 { font-size: 14px; white-space: nowrap; }
  .panel-sub { font-size: 11.5px; line-height: 1.45; min-width: 0; flex: 1 1 auto; }
  .panel-link { font-size: 12px; white-space: nowrap; }

  /* 只管总览的 5 张 KPI：2+2+1 最后一张孤零零，让它跨满一行；
     跨行后内部改横排（图标 / 数字 / 说明），否则右半张全是空白 */
  .dash > .kpi-row.b-kpi5 > .kpi:last-child {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 12px;
  }
  .dash > .kpi-row.b-kpi5 > .kpi:last-child .kpi-top { margin-bottom: 0; flex: 0 0 auto; }
  .dash > .kpi-row.b-kpi5 > .kpi:last-child .kpi-num { flex: 0 0 auto; }
  .dash > .kpi-row.b-kpi5 > .kpi:last-child .kpi-sub {
    margin: 0 0 0 auto; text-align: right; -webkit-line-clamp: 1;
  }

  /* colgroup 写死的列宽在窄屏兜底允许横滑，不撑破卡片 */
  .dash-grid .panel-bd.flush { overflow-x: auto; }
  /* 「近 7 天没有改单 / 没留话」这类空状态别撑出半屏空白
     （模板里是 inline padding，只能靠 !important 压下来） */
  .dash-grid .panel-bd .empty,
  .dash-grid .panel-bd.flush .empty { padding: 14px 0 !important; }
}

/* 单列后卡片全宽，≥380px 放得下 4 个环并排，省一整行高度 */
@media (min-width: 380px) and (max-width: 700px) {
  .ring-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
  .ring { gap: 5px; padding: 4px 0 8px; }
  .ring svg { width: 68px; height: 68px; }
  .ring-c b { font-size: 17px; }
  .ring-c span { font-size: 9.5px; }
  .ring-k { font-size: 11.5px; }
}

/* ===== 手机端「待办优先」：任务卡片上移，KPI 看板下移并压成一行横滑 =====
   只在 ≤700px 生效，且用页面专属 class 限定；桌面布局一行不动。
   总览 /overview 保持原样：它是看板页，面板分散在多个 .dash-grid 容器里，
   只靠 order 挪不动「采购进度环」，实测改完首屏变成空面板 + 环形图，反而更差。
   回退：删掉本段，并去掉两个模板上的 wrap-buy / dash-wsum class。 */
@media (max-width: 700px) {
  /* 采购台 /b：类型与状态页签、筛选、批量条留在上面，待办卡片紧跟其后 */
  .wrap-buy { display: flex; flex-direction: column; }
  .wrap-buy > .b-bar.b-type { order: 1; }
  .wrap-buy > .b-bar { order: 2; }
  .wrap-buy > .b-tools { order: 3; }
  .wrap-buy > #bulk-form { order: 4; }
  .wrap-buy > .list-mobile.b-cards { order: 5; }
  .wrap-buy > .empty { order: 6; }
  .wrap-buy > .kpi-row.b-kpi5 { order: 7; }
  .wrap-buy > .b-tip { order: 8; }
  .wrap-buy > .picked-bar { order: 9; }
  .wrap-buy > .list-desktop { order: 10; }

  /* 仓库汇总 /w/summary：把管理按钮压成一行，收货卡片提到状态统计之前 */
  .dash-wsum { display: flex; flex-direction: column; }
  .dash-wsum > .dash-head { order: 1; }
  .dash-wsum > .wf-bar { order: 2; }
  .dash-wsum > .sum-filter { order: 3; }
  .dash-wsum > .panel { order: 4; }
  .dash-wsum > .wst-ov { order: 5; }
  .dash-wsum > .tiny.faint { order: 6; }
  .dash-wsum .dash-actions {
    flex-wrap: nowrap; overflow-x: auto; gap: 8px;
    padding-bottom: 4px; -webkit-overflow-scrolling: touch;
  }
  .dash-wsum .dash-actions .btn { flex: 0 0 auto; white-space: nowrap; }

  /* KPI 看板：五个数字卡压成一行横滑，藏掉长描述，放在任务后面 */
  .wrap-buy > .kpi-row.b-kpi5 {
    display: flex; gap: 8px; overflow-x: auto;
    margin: 14px 0 4px; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .wrap-buy > .kpi-row.b-kpi5 > .kpi {
    flex: 0 0 132px; width: 132px; min-width: 132px; padding: 10px 12px;
  }
  .wrap-buy > .kpi-row.b-kpi5 .kpi-sub { display: none; }
  .wrap-buy > .kpi-row.b-kpi5 .kpi-num { font-size: 21px; }
}

/* ===== 采购台手机卡片：必填框状态 + 更多字段折叠 =====
   2026-11-08 按确认取消红/黄/绿进度条。下单规则直接生效：
   预计到货 + 采购负责人两格填完，供应商 / 计划价（含映射建议值）也齐了，
   失焦就自动下单；没齐只保存，等补齐再下。全部规则限定在 .b-card 内。 */

/* 两个必填框：空态红虚线、填上淡绿边 */
.b-card input.q-in.is-req.empty { border-color: #e8a9a4; background: #fff8f7; }
.b-card input.q-in.is-req:not(.empty) { border-color: #a9d8c3; }

.bc-readonly { height: 35px; display: flex; align-items: center; padding: 0 9px;
               box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px;
               background: #f7f8fa; color: var(--faint); font-size: 13px;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-more { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #c7bdf0; }
.bc-more-hd { font-size: 11px; color: var(--brand); margin-bottom: 8px; }
.bc-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.bc-more .q-in { border-color: #d8d0f2; background: #fdfcff; }
.bc-more .q-in.empty { border-style: dashed; border-color: #c7bdf0; }
.bc-more-btn { white-space: nowrap; }

/* ===== 2026-11-08 B 方案：计划价「当前价 / 最近价 / 差多少」对比条 =====
   只读展示，点「采用」才写库；桌面表格和手机卡片共用一套类名。
   桌面计划价列只有 94px，所以压成两行小字、隐藏日期（日期在 title 里）。 */
.price-cmp { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px;
             margin-top: 3px; font-size: 10.5px; line-height: 1.35; white-space: nowrap; }
.price-cmp .pc-last { color: var(--faint); white-space: nowrap; }
.price-cmp .pc-last i { font-style: normal; margin-left: 3px; opacity: .8; }
.price-cmp .pc-gap { font-weight: 600; }
.price-cmp .pc-gap.up { color: #d14343; }     /* 比最近一单贵 → 红 */
.price-cmp .pc-gap.down { color: #16845b; }   /* 比最近一单便宜 → 绿 */
.price-cmp .pc-same { color: var(--faint); }
.price-cmp .pc-done { color: #16845b; }
.price-cmp.pc-none { color: #b9c0cb; font-size: 10px; }
.pc-adopt { border: 1px solid #b9c8ef; background: #f2f6ff; color: #2f5bd0;
            border-radius: 999px; padding: 1px 8px; font-size: 10.5px;
            line-height: 1.5; cursor: pointer; }
.pc-adopt:hover { background: #e3ecff; }
.pc-adopt:disabled { opacity: .5; cursor: default; }
.b-table .price-cmp { font-size: 10px; gap: 2px 4px; white-space: normal; }
.b-table .price-cmp .pc-last i { display: none; }
.b-table .price-cmp .pc-adopt { padding: 0 6px; font-size: 10px; }

@media (max-width: 700px) {
  .b-card .price-cmp { margin-top: 5px; padding: 4px 7px; max-width: none;
                       background: #f7f9ff; border: 1px solid #e6ecfb;
                       border-radius: 7px; font-size: 11px; white-space: normal; }
  .b-card .pc-adopt { padding: 3px 11px; font-size: 11px; min-height: 24px; }
}

/* ================================================================
   仓库端 Excel 导入（2026-11-09）
   手机上这张预览表列太多会被裁：规格列先收掉，表头不换行，
   底部「重选文件 / 确认导入」改成上下两行，拇指够得着。
   ================================================================ */
.wh-imp .scroll-x { min-width: 0; }
.wh-imp-preview th, .wh-imp-preview td { white-space: nowrap; }
.wh-imp-preview td.c-name { white-space: normal; min-width: 90px; }

@media (max-width: 700px) {
  .wh-imp-preview .col-spec { display: none; }
  .wh-imp-preview th, .wh-imp-preview td { padding-left: 7px; padding-right: 7px; font-size: 13px; }
  /* 「第5行 数量看不懂」这种长提示，手机上不许 nowrap，否则把表格撑出屏幕 */
  .wh-imp-preview td:last-child, .wh-imp-preview th:last-child {
    white-space: normal; max-width: 92px; line-height: 1.35;
  }
  .wh-imp .ft { flex-wrap: wrap; gap: 8px; }
  .wh-imp .ft .inline-form { flex: 1 0 100%; margin-left: 0; }
  .wh-imp .ft .btn { width: 100%; min-height: 44px; }
}

/* 导入预览的手机版：一行一条，不再横滑表格 */
.wh-imp-list { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 700px) {
  .wh-imp .scroll-x { display: none; }
  .wh-imp-list { display: block; }
  .wh-imp-list li { padding: 9px 2px; border-bottom: 1px solid var(--line); }
  .wh-imp-list li.is-dup { background: #fffbf0; }
  .wh-imp-list li.is-bad { background: #fdf1f1; }
  .wh-imp-list .l1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .wh-imp-list .l1 b { font-size: 15px; color: #101828; }
  .wh-imp-list .l1 span { font-size: 14px; color: #344054; font-variant-numeric: tabular-nums; }
  .wh-imp-list .l2 { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; font-size: 12px; }
  .wh-imp-list .l2 em { font-style: normal; color: #6b7686; }
  .wh-imp-list .l2 .muted { color: #b54708; }
  .wh-imp-list .l2 .bad { color: #b42318; }
  .wh-imp-list .l2 .ok { color: #067647; }
}

/* ---- 缺货 / 转交 / 拆单弹窗（2026-11-10）----
   桌面居中卡片，手机底部抽屉；两套列表共用 #sf-mask 这一份 DOM。 */
.sf-mask { position: fixed; inset: 0; z-index: 90; background: rgba(16,24,40,.45);
           display: flex; align-items: center; justify-content: center; padding: 18px; }
.sf-mask[hidden] { display: none; }
.sf-box { width: min(520px, 100%); max-height: min(88vh, 760px); overflow: auto;
          background: var(--panel); border: 1px solid var(--line);
          border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.sf-hd { position: sticky; top: 0; z-index: 1; display: flex; align-items: center;
         justify-content: space-between; padding: 14px 18px; background: var(--panel);
         border-bottom: 1px solid var(--line); font-size: 15px; }
.sf-x { border: 0; background: transparent; font-size: 22px; line-height: 1;
        color: var(--muted); cursor: pointer; padding: 0 4px; }
.sf-bd { padding: 16px 18px 18px; }
.sf-item { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sf-item .sf-k { color: var(--muted); font-size: 12px; }
.sf-item b { font-size: 15px; }
.sf-item .sf-qty { margin-left: auto; font-weight: 600; color: var(--brand-d);
                   font-variant-numeric: tabular-nums; }
.sf-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.sf-kinds { display: grid; gap: 8px; margin: 16px 0 14px; }
.sf-kind { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px;
           border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sf-kind:hover { background: var(--line-2); }
.sf-kind:has(input:checked) { border-color: var(--brand); background: var(--brand-weak); }
.sf-kind input { margin-top: 3px; }
.sf-kind input:checked ~ span b { color: var(--brand-d); }
.sf-kind span { display: flex; flex-direction: column; }
.sf-kind i { font-style: normal; color: var(--muted); font-size: 12px; }
.sf-field { display: block; margin-bottom: 11px; }
.sf-field > label, .sf-field > span { display: block; font-size: 12.5px;
                                      color: var(--ink-2); margin-bottom: 5px; }
.sf-field input, .sf-field select { width: 100%; min-height: 36px; padding: 6px 9px;
    border: 1px solid var(--line); border-radius: 8px; font: inherit;
    color: var(--ink); background: #fff; }
.sf-field input:focus, .sf-field select:focus { outline: 2px solid var(--brand-weak);
                                                border-color: var(--brand); }
.sf-field .req { color: var(--danger); }
.sf-hint { background: var(--warn-weak); border: 1px solid #f5e0a3; color: #92400e;
           border-radius: 8px; padding: 9px 11px; font-size: 12px; margin: 8px 0 12px; }
.sf-row { border: 1px solid var(--line); border-radius: 10px;
          padding: 11px 12px 1px; margin-bottom: 11px; }
.sf-row-hd { font-weight: 600; font-size: 13px; margin-bottom: 9px; color: var(--ink-2); }
.sf-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 9px; }
.sf-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px;
          padding: 9px 12px; border-radius: 9px; background: var(--line-2);
          font-size: 13px; margin-bottom: 11px; }
.sf-sum.is-check { background: var(--ok-weak); color: #067647; }
.sf-sum.is-check.is-bad { background: var(--danger-weak); color: #b42318; }
.sf-sum b { font-variant-numeric: tabular-nums; }
.sf-err { display: none; background: var(--danger-weak); color: #b42318;
          border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin-bottom: 10px; }
.sf-ft { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.sf-btn { white-space: nowrap; }
@media (max-width: 700px) {
  .sf-mask { align-items: flex-end; padding: 0; }
  .sf-box { width: 100%; max-height: 90vh; border-radius: 16px 16px 0 0; }
  .sf-hd { padding: 13px 15px; }
  .sf-bd { padding: 14px 15px 22px; }
  .sf-grid { grid-template-columns: 1fr 1fr; }
  .sf-grid .sf-field:first-child { grid-column: 1 / -1; }
  .sf-ft .btn { flex: 1; }
}

/* ---- 缺货 / 延期「我自己继续跟」（2026-11-10）----
   三个子处理按钮 + 日期前后对照；桌面和手机共用 #sf-mask 这一份 DOM。 */
.sf-new { display: inline-block; font-style: normal; font-size: 10px; line-height: 1.5;
          padding: 1px 7px; border-radius: 999px; margin-left: 4px;
          background: var(--ok-weak); color: #067647; border: 1px solid #a6e9c5; }
.sf-subs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 13px; }
.sf-sub { border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
          color: var(--ink-2); font: inherit; font-size: 12.5px; padding: 8px 5px;
          cursor: pointer; text-align: center; }
.sf-sub small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.sf-sub:hover { background: var(--line-2); }
.sf-sub.is-on { border-color: var(--brand); background: var(--brand-weak);
                color: var(--brand-d); font-weight: 600; }
.sf-sub.is-on small { color: var(--brand-d); }
.sf-date-row { display: grid; grid-template-columns: 1fr 22px 1fr; gap: 7px; align-items: end; }
.sf-date-row > div > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.sf-date-row input { width: 100%; min-height: 36px; padding: 6px 9px;
    border: 1px solid var(--line); border-radius: 8px; font: inherit;
    color: var(--ink); background: #fff; }
.sf-date-row .sf-old { background: var(--line-2); color: var(--muted); }
.sf-arrow { text-align: center; padding-bottom: 9px; color: var(--muted); }
.sf-msg { display: none; color: var(--danger); font-size: 12px; margin-top: 5px; }
.sf-note { background: var(--brand-weak); border-left: 2px solid var(--brand);
           color: var(--ink-2); border-radius: 0 7px 7px 0; padding: 9px 11px;
           font-size: 12px; line-height: 1.65; margin: 8px 0 11px; }
.sf-warn { background: var(--warn-weak); border: 1px solid #f5e0a3; color: #92400e;
           border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-bottom: 10px; }
.sf-keep { background: var(--ok-weak); border: 1px solid #a6e9c5; color: #067647;
           border-radius: 8px; padding: 8px 10px; font-size: 12px; }
/* 改单弹窗里的「直接走仓库调拨」勾选条（2026-11-13） */
.sf-flag { display: flex; gap: 9px; align-items: flex-start; cursor: pointer;
           border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
           margin: 9px 0 3px; background: #fff; }
.sf-flag:hover { border-color: var(--brand); }
.sf-flag input { margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.sf-flag > span { display: block; line-height: 1.5; }
.sf-flag b { font-size: 13px; font-weight: 600; color: var(--ink); }
.sf-flag i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.sf-flag:has(input:checked) { border-color: var(--brand); background: var(--brand-weak); }
/* 改单时「已按商品档案带出描述 / 单位」那一行小字 */
.sf-auto { font-size: 11.5px; line-height: 1.5; color: #0F6E56; margin-top: 4px; }
.sf-auto:empty { display: none; }
@media (max-width: 700px) {
  .sf-subs { grid-template-columns: 1fr; gap: 6px; }
  .sf-sub { padding: 7px 8px; }
  .sf-sub small { display: inline; margin-left: 6px; }
}

/* 仓库端导入页顶部的「下载模板」条：左侧说明、右侧按钮 */
.imp-tpl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; padding: 11px 13px;
  border: 1px solid #dbe6f7; background: #f7faff; border-radius: 10px;
}
.imp-tpl b { display: block; font-size: 13.5px; color: #101828; }
.imp-tpl span.tiny { display: block; margin-top: 2px; }
.imp-tpl .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 700px) {
  .imp-tpl { flex-direction: column; align-items: stretch; gap: 9px; }
  .imp-tpl .btn { width: 100%; min-height: 42px; }
}

/* ---- 登录日志（2026-11-10）：今日四个小卡 + 窄屏两列 ---- */
.lg-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.lg-kpi .card { padding: 12px 14px; }
.lg-kpi b { display: block; font-size: 22px; line-height: 1.25; }
.lg-kpi small { color: var(--muted); font-size: 12px; }
.lg-kpi .is-ok b { color: #0b7c4a; }
.lg-kpi .is-fail b { color: #b42318; }
.lg-kpi .is-lock b { color: #b54708; }
.lg-kpi .is-ppl b { color: var(--brand-d); }
@media (max-width: 700px) { .lg-kpi { grid-template-columns: 1fr 1fr; } }
/* ================================================================
   新手引导（2026-11-10）：聚光灯 + 气泡
   ----------------------------------------------------------------
   遮罩是「一个空 div + 超大 box-shadow」铺出来的，不是四块 div 拼接：
   四块拼在非整数像素上有 1px 缝（手机上特别明显），而且要同时动四个元素。
   也不用 clip-path：微信 X5 上圆角有锯齿，配合 transition 会整块重绘。
   层级要高于 .sf-mask(90) 和 .tabbar(50)，否则遮不住底栏。
   注意顺序：白圈 → 蓝圈 → 铺满全屏的暗色，box-shadow 越靠后越在外层。
   ================================================================ */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour[hidden] { display: none !important; }
.tour-shield { position: absolute; inset: 0; }

.tour-hole {
  position: absolute; pointer-events: none;
  background: transparent; border-radius: 10px;
  box-shadow: 0 0 0 3px #fff,
              0 0 0 5px var(--brand),
              0 0 0 9999px rgba(16, 24, 40, .58);
  transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
.tour-hole[hidden] { display: none !important; }

.tour-tip {
  position: absolute; z-index: 2; width: 332px; max-width: calc(100vw - 24px);
  max-height: 64vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: 0 16px 44px -14px rgba(16, 24, 40, .42);
  padding: 12px 16px 13px; outline: none;
}
/* 小三角按 data-pos 指回高亮的元素 */
.tour-tip::before {
  content: ''; position: absolute; width: 10px; height: 10px;
  background: var(--panel); border-left: 1px solid var(--line);
  border-top: 1px solid var(--line); transform: rotate(45deg);
}
.tour-tip[data-pos="bottom"]::before { left: 50%; margin-left: -5px; top: -6px; }
.tour-tip[data-pos="top"]::before { left: 50%; margin-left: -5px; bottom: -6px;
  transform: rotate(225deg); }
.tour-tip[data-pos="right"]::before { top: 50%; margin-top: -5px; left: -6px;
  transform: rotate(-45deg); }
.tour-tip[data-pos="left"]::before { top: 50%; margin-top: -5px; right: -6px;
  transform: rotate(135deg); }
.tour-tip[data-pos="sheet"]::before { display: none; }

.tour-hd { display: flex; align-items: center; gap: 8px; }
.tour-kicker {
  font-size: 12px; font-weight: 600; color: var(--brand-d);
  background: var(--brand-weak); border-radius: 999px; padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.tour-kicker:empty { display: none; }
.tour-skip {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; padding: 6px 2px; cursor: pointer;
}
.tour-skip:hover { color: var(--ink-2); }
.tour-t { font-size: 15.5px; margin: 9px 0 5px; color: var(--ink); }
.tour-d { margin: 0; font-size: 13.5px; line-height: 1.78; color: var(--ink-2); }
.tour-d b { color: var(--ink); }

.tour-ft { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.tour-dots { display: flex; gap: 4px; margin-right: auto; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { width: 16px; border-radius: 3px; background: var(--brand); }

.tour-btn {
  min-height: 38px; padding: 0 15px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--panel); color: var(--ink-2);
  font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.tour-btn:hover { background: var(--line-2); }
.tour-btn.is-main { background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600; }
.tour-btn.is-main:hover { background: var(--brand-d); }
.tour-btn[disabled] { opacity: .4; cursor: default; }

/* 欢迎页 / 完成页：不指元素，整屏压暗 + 卡片居中。
   洞被藏起后遮罩就没了（遮罩全靠洞的 box-shadow 铺），所以这里补一层背景。 */
.tour.is-center { background: rgba(16, 24, 40, .58); }
.tour.is-center .tour-hole { display: none !important; }
.tour.is-center .tour-tip {
  position: fixed; left: 50%; top: 50%; width: min(370px, calc(100vw - 32px));
  max-height: none; transform: translate(-50%, -50%);
}
.tour.is-center .tour-tip::before { display: none; }

/* 手机（≤700）：气泡改成底部卡片，跟 .sf-mask 一个观感，避开 Home 指示条 */
@media (max-width: 700px) {
  .tour-tip {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-width: none;
    max-height: 68vh; border-radius: 16px 16px 0 0; border-bottom: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 34px -10px rgba(16, 24, 40, .4);
  }
  .tour-tip::before { display: none !important; }
  .tour-t { font-size: 16px; margin-top: 8px; }
  .tour-d { font-size: 14px; }
  .tour-ft { gap: 9px; margin-top: 14px; }
  .tour-btn { flex: 1; min-height: 46px; font-size: 15px; }
  .tour-dots { display: none; }        /* 手机上进度看顶部 2/7 就够，别挤按钮 */
  .tour.is-center .tour-tip {
    left: 8px; right: 8px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto; transform: none; border-radius: var(--r-lg); border-bottom: 1px solid var(--line);
  }
}

/* ---- 引导入口行（替代原来那条 .guide）----
   为什么不用 .guide 那个类：它在 @media(max-width:900px) 里被全局 display:none，
   手机上根本看不见，而手机才是主要场景；同一个类 /w/summary 也在用，不能改。 */
.tour-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 10px 13px; font-size: 12.5px; color: #2b4a76;
  background: linear-gradient(180deg, #f6f9ff, #fbfdff);
  border: 1px solid #dde7f8; border-radius: 12px;
}
.tour-bar-lead { flex: 1 1 auto; min-width: 0; }
.tour-bar .btn { flex: 0 0 auto; min-height: 30px; font-size: 12.5px; padding: 0 12px; }
.tour-bar.is-mini {
  padding: 8px 12px; background: transparent; border-style: dashed; color: var(--muted);
}
.tour-bar.is-mini .btn { min-height: 28px; }
@media (max-width: 700px) {
  .tour-bar { font-size: 12px; padding: 9px 11px; gap: 8px; }
  .tour-bar .btn { min-height: 36px; }
}

/* 全部明细里「草稿被删除」的行：整行一条橙色说明，采购一眼看到谁什么时候删的 */
.il-del { grid-column: 1 / -1; margin-top: 4px; font-size: 12px; color: #b4530a; }
.il-del a { color: var(--brand); text-decoration: underline; margin-left: 6px; }
.del-tag { font-size: 12px; color: #b4530a; }

/* ============================================================
   蓝色科技风 · 配色重涂 (skin overlay)
   —— 只改颜色/按钮观感，不动任何结构、字号、间距、内容。
      靠"同名选择器后置覆盖"+更高权重实现，不修改上面的原始规则。
      想还原：删掉本段即可（原件已备份 app.css.bak-before-skin）。
   ============================================================ */

/* ---- 1. 全局色票：灰底 -> 淡蓝灰，深色侧栏 -> 白色侧栏 ---- */
:root {
  --bg: #eef3fa;                 /* 页面底色：截图那种淡蓝灰 */
  --panel: #ffffff;              /* 卡片纯白 */
  --line: #e8eef7;               /* 描边偏蓝 */
  --line-2: #f1f5fb;
  --ink: #1f2a44;                /* 主文字深蓝灰 */
  --ink-2: #344054;
  --muted: #64748b;
  --faint: #94a3b8;
  --brand: #2563eb;
  --brand-d: #1d4ed8;
  --brand-weak: #eaf2ff;
  --ok: #16a34a;
  --ok-weak: #e8f8ee;
  --warn: #d97706;
  --danger: #dc2626;
  --danger-weak: #fdecea;
  --side-bg: #ffffff;            /* 侧栏改白 */
  --side-line: #e8eef7;
  --side-ink: #475569;
  --side-muted: #94a3b8;
  --sh-1: 0 2px 12px rgba(30, 64, 175, .06);
  --sh-2: 0 8px 28px -12px rgba(30, 64, 175, .18), 0 2px 6px rgba(30, 64, 175, .06);
}

/* ---- 2. 左侧栏：深色 -> 白底 + 蓝色高亮 ---- */
.side { background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--side-line); }
/* logo 图标 + 文字合成一个整体蓝色按钮块 */
.side-logo {
  margin: 12px 12px 14px; height: 50px; padding: 0 12px; gap: 10px;
  border: none; border-radius: 11px; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb 60%, #1d4ed8);
  box-shadow: 0 5px 14px -3px rgba(37, 99, 235, .5);
}
.side-logo .mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  background: rgba(255, 255, 255, .22); box-shadow: none; color: #fff;
}
.side-logo b, .side-logo .txt b { color: #fff; font-size: 15px; }
.side-logo i, .side-logo .txt i { color: rgba(255, 255, 255, .82); }
.side-logo .txt a:hover i, .side-logo .txt a:hover b { color: #fff; }
.side-nav { scrollbar-color: #d7e3f7 transparent; }
.side-nav::-webkit-scrollbar-thumb { background: #d7e3f7; }
.nav-label { color: #9db0cc; }
.side-nav a { color: var(--side-ink); }
.side-nav a:hover { background: #f2f7ff; color: var(--brand-d); }
.side-nav a.on { background: #eaf2ff; color: var(--brand-d); font-weight: 600;
                 box-shadow: none; }
.side-nav a.on::before { background: var(--brand); }              /* 左侧蓝色指示条 */
.side-nav a .ico { color: #94a3b8; }
.side-nav a:hover .ico { color: var(--brand); }
.side-nav a.on .ico { color: var(--brand); opacity: 1; }
.side-foot { border-top: 1px solid var(--side-line); }
.side-user { color: var(--side-ink); }
.side-user:hover { background: #f4f8ff; }
.side-user .avatar { background: linear-gradient(135deg, #93c5fd, #3b82f6); color: #fff; }
.side-user b { color: #1f2a44; }
.side-logout { border: 1px solid #dbe6fb; color: #64748b; }
.side-logout:hover { color: #fff; border-color: var(--brand); background: var(--brand); }

/* ---- 3. 顶栏：更干净的浅蓝描边 ---- */
.topbar { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); }
.back { background: #eef4ff; color: var(--brand); }
.back:hover { background: #e0ecff; }

/* ---- 4. 按钮：主按钮改蓝色渐变 + 柔光；次按钮描边偏蓝 ---- */
.btn { border-color: #dbe6fb; }
.btn:hover { background: #f6f9ff; border-color: #c9dbfa; }
.btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb 60%, #1d4ed8);
  border-color: #2563eb; color: #fff;
  box-shadow: 0 3px 10px -2px rgba(37, 99, 235, .45);
}
.btn.primary:hover { background: linear-gradient(135deg, #4b90f8, #2563eb 60%, #1d4ed8);
                     border-color: #1d4ed8; box-shadow: 0 5px 14px -2px rgba(37, 99, 235, .55); }
.btn.ghost { background: #f0f5ff; color: var(--ink-2); }
.btn.ghost:hover { background: #e4edff; }
.btn.soft { background: #eaf2ff; border-color: #d7e6fb; color: var(--brand-d); }
.btn.soft:hover { background: #dfeaff; }

/* ---- 5. 页签 / 分段选中：蓝色渐变胶囊 ---- */
.tabs a.on, .ef-tabs a.on { background: linear-gradient(135deg, #3b82f6, #2563eb);
                            border-color: #2563eb; color: #fff; }
.tabbar a.on { color: var(--brand); }

/* ---- 6. 卡片 / 表格头：淡蓝底，圆角柔和 ---- */
.card, .panel, .seg { border-color: var(--line); box-shadow: var(--sh-1); }
.table th { background: #f5f8fd; color: #7b8aa3; }
.table tbody tr:hover, .item:hover { background: #fafcff; }
.seg.wh > .seg-hd { background: #e9f1ff; color: #1e4b8f; }

/* ---- 7. KPI 图标：渐变方块 ---- */
.kpi-ico { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }
.kpi-ico.ok { background: linear-gradient(135deg, #4ade80, #16a34a); color: #fff; }
.kpi-ico.warn { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; }
.kpi-ico.danger { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; }
.kpi-ico.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }
.kpi.is-alert { border-color: #f6d5d1; background: linear-gradient(180deg, #fffafa, #fff 60%); }

/* ---- 8. 徽标状态色微调为截图那套 ---- */
.badge.blue { background: #e0edff; color: #2563eb; }
.badge.green { background: #dcfce7; color: #16a34a; }
.badge.warn { background: #fef3c7; color: #b45309; }

/* ---- 9. 提示条 / 引导条 ---- */
.flash { border-color: #c9dbfa; }
.tour-bar { background: linear-gradient(100deg, #e4f0ff, #f7fbff); border-color: #dbe9ff; color: #23406f; }
.actbar { background: linear-gradient(100deg, #fff7e6, #fffdf7); border-color: #f7e3bd; }

/* ---- 10. 登录页 ---- */
body:not(.is-shell) .app { background: var(--bg); }

/* ---- 11. 仓库报量页布局：表单整宽横排，统计块移到底部 ---- */
/* 原来表单是左侧窄列（720），右侧统计；现在表单铺满整行、字段 4 列横排，
   统计（今日已报/待提交/在采购手里/下单次数）搬到页面最下方。 */
.entry-grid { grid-template-columns: minmax(0, 1fr); }
.entry-grid > .ef-card { width: 100%; }
.entry-d .ef-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.entry-d .ef-grid > .field { margin-bottom: 11px; }
/* 两个按钮等宽、各占一半，跟上面 4 列字段的网格对齐（原来主按钮 flex:1.4 更宽，
   整排又卡在 560px，看着一边长一边短，不对称） */
@media (min-width: 701px) {
  .entry-d .ef-btns {
    max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px; margin-top: 6px;
  }
  .entry-d .ef-btns .btn {
    flex: none; width: 100%; min-height: 44px; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }
  .entry-d .ef-btns .btn.primary { flex: none; }
}
.entry-d .ef-foot { max-width: none; }

/* 汇总表：一屏固定露 8 条以上（约 41px/行 + 表头），
   超出走「每页 10 条」的分页；选「全部显示」时靠内部滚动兜住高度 */
.entry-sum .sum-scroll { max-height: 470px; min-height: 376px; }

/* 汇总面板收起：只留标题那行，勾选/筛选状态都保留在 DOM 里 */
.entry-sum.is-collapsed .sum-body { display: none; }
.entry-sum.is-collapsed .panel-hd { border-bottom: 0; }
[data-sum-toggle] { min-width: 62px; }
.entry-sum.is-collapsed [data-sum-toggle] { color: var(--brand); border-color: #c9dbfa; }

/* ---- 11.1 底部概况：三张卡并成一条，下单次数整宽两列排行 ---- */
.entry-side-bottom {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 12px; align-items: start; margin-top: 14px;
}
.entry-side-bottom .panel { min-width: 0; }

/* 三张数字卡原来各占一个白块，拉满整宽后空得像三个空抽屉。
   现在合成「一条卡片 + 竖分隔线」：左标签右数字，高度压到 62px 上下。 */
.entry-side-bottom .sum-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--sh-1); overflow: hidden;
}
.entry-side-bottom .sum-card {
  display: block; padding: 12px 18px 13px;
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
/* 「在采购手里」那张卡原来带 .wide（旧布局里独占一行），
   并进一条以后必须收回 grid-column，否则它会自己换行、把前两张挤到上面 */
.entry-side-bottom .sum-row > .sum-card.wide { grid-column: auto; }
.entry-side-bottom .sum-card + .sum-card { border-left: 1px solid var(--line); }
.entry-side-bottom .sum-card.is-accent { background: linear-gradient(180deg, #f7faff, #fff); }
.entry-side-bottom .sum-card:hover { background: #f8fbff; }
.entry-side-bottom .sum-k {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
}
.entry-side-bottom .sum-k::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: #bfd2ee;
}
.entry-side-bottom .sum-card:nth-child(1) .sum-k::before { background: #60a5fa; }
.entry-side-bottom .sum-card:nth-child(2) .sum-k::before { background: #f59e0b; }
.entry-side-bottom .sum-card:nth-child(3) .sum-k::before { background: #34d399; }
.entry-side-bottom .sum-n {
  margin: 3px 0 0; font-size: 25px; line-height: 1.15; color: var(--ink); font-weight: 700;
}
.entry-side-bottom .sum-n i { font-size: 11px; }
.entry-side-bottom .sum-hint { margin-top: 2px; font-size: 11px; }

/* 下单次数：整宽 + 两列排行。
   原来是窄栏里「名称+类型+单位+细条+次数+频率」全挤一行，字挤成一坨；
   现在一行只放 名称 / 类型 / 次数，细条和频率各占一行，左边加序号。 */
.entry-side-bottom .rank-scroll { max-height: none; }
/* 面板头两个胶囊组（本周/本月/全部）+ 仓库切换，统一成浅底分段控件，
   仓库切换从单独一行挪到搜索栏里，少一行空白 */
.entry-side-bottom .panel-hd .rank-tabs {
  gap: 2px; padding: 3px; border-radius: 999px; background: #f2f6fc;
}
.entry-side-bottom .panel-hd .rank-tabs a { padding: 3px 12px; border-radius: 999px; font-size: 12px; }
.entry-side-bottom .panel-hd .rank-tabs a.on {
  background: #fff; color: var(--brand); font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .18);
}
.entry-side-bottom .rank-tools { padding: 10px 14px 8px; gap: 8px; }
.rank-whs-inline {
  display: inline-flex; gap: 2px; padding: 3px; flex: none;
  background: #f2f6fc; border-radius: 999px;
}
.rank-whs-inline a {
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.rank-whs-inline a:hover { color: var(--brand); }
.rank-whs-inline a.on {
  background: #fff; color: var(--brand); font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .18);
}
.rank-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px; padding: 6px 8px 10px;
}
.pr-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px; align-items: start; padding: 9px 10px; border-radius: 10px;
}
.pr-row + .pr-row { border-top: 0; }
.pr-row:hover { background: #f6faff; }
.pr-rank {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #7c8aa5; background: #f1f5fb;
  font-variant-numeric: tabular-nums;
}
.pr-rank.is-top {
  color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 3px 8px -2px rgba(37, 99, 235, .55);
}
.pr-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pr-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pr-line .pr-name {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pr-line .pr-n {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.pr-body .pr-bar { height: 5px; background: #edf2f9; border-radius: 999px; overflow: hidden; }
.pr-body .pr-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #93c5fd, #2563eb);
}
.pr-body .pr-meta { grid-column: auto; margin: 0; font-size: 10.5px; color: var(--faint); }
.rank-grid .pr-empty { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .entry-d .ef-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rank-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .entry-d .ef-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机上一条卡片的三个格子太窄，标签会折行 —— 压小字号和留白 */
  .entry-side-bottom .sum-card { padding: 9px 10px 10px; }
  .entry-side-bottom .sum-k { font-size: 10.5px; gap: 4px; }
  .entry-side-bottom .sum-k::before { width: 5px; height: 5px; }
  .entry-side-bottom .sum-n { margin-top: 2px; font-size: 19px; }
  .entry-side-bottom .sum-hint { display: none; }
  .entry-sum .sum-scroll { min-height: 0; }
}
/* ---- 改单商品：列表里那条小字 + 「改前 → 改后」对比小窗（2026-11-13） ----
   小字挂在备注格下面（桌面表格 td / 手机卡片 .bc-note / 详情页商品名下面），
   点开拉 /b/{id}/rewrite-info，DOM 是 base.html 里的 #rw-mask（复用 .sf-mask 那套）。 */
.rw-link { display: inline-block; margin-top: 3px; padding: 0; border: 0; background: none;
  color: var(--brand); font-size: 11.5px; line-height: 1.5; text-align: left; cursor: pointer;
  border-bottom: 1px dashed currentColor; }
.rw-link:hover { color: var(--brand-d); }
.rw-cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px;
  align-items: stretch; margin: 6px 0 12px; }
.rw-col { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--line-2); }
.rw-col.is-new { border-color: var(--brand); background: var(--brand-weak); }
.rw-hd { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rw-row { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; }
.rw-row > span { color: var(--muted); flex: 0 0 34px; }
.rw-row > b { font-weight: 600; word-break: break-all; }
.rw-arrow { align-self: center; color: var(--muted); font-size: 18px; }
@media (max-width: 720px) {
  .rw-cmp { grid-template-columns: 1fr; }
  .rw-arrow { text-align: center; transform: rotate(90deg); }
}

/* ============================================================ 消息通知（右上角下滑）
   2026-11-14：以前所有提示都是一条 .flash 挤在页面顶上、把内容往下推，
   网址里还挂着 ?msg=…，刷新会再弹一次。现在改成悬在右上角的卡片：
   成功 2.6 秒自己收（鼠标停上去不走），失败留着手动点 ×；
   显示完 app.js 把 msg/err 从地址栏抹掉。窄屏改成顶部通栏。 */
html.js .flash[data-toast] { display: none; }   /* JS 跑起来就不占版面，交给卡片 */
.toast-stack {
  position: fixed; top: 74px; right: 20px; width: 322px;
  max-width: calc(100vw - 24px); z-index: 85;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;               /* 空白处不挡下面的按钮 */
}
.toast {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 11px; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--muted);
  border-radius: 9px; box-shadow: var(--sh-2);
  transform: translateY(-14px); opacity: 0;
  transition: transform .26s cubic-bezier(.2,.8,.3,1), opacity .26s;
  pointer-events: auto;
}
.toast.in { transform: none; opacity: 1; }
.toast-ic {
  flex: 0 0 17px; height: 17px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1;
}
.toast-tx { flex: 1; min-width: 0; }
.toast-tt { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.45;
  word-break: break-all; }
.toast-ds { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px;
  word-break: break-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
.toast-x {
  flex: 0 0 18px; height: 18px; margin: -1px -1px 0 0; padding: 0;
  border: 0; background: none; cursor: pointer; color: var(--faint);
  font-size: 15px; line-height: 1; border-radius: 5px;
}
.toast-x:hover { color: var(--ink-2); background: var(--line-2); }
/* 「数据有更新」提示卡上的刷新按钮（2026-12-02）：点了才真正刷，不自动覆盖 */
.toast-act {
  flex: 0 0 auto; align-self: center; margin-right: 2px; padding: 4px 10px;
  border: 1px solid var(--line-2); background: var(--panel); border-radius: 7px;
  font: inherit; font-size: 12px; font-weight: 600; color: #2563eb; cursor: pointer;
  white-space: nowrap;
}
.toast-act:hover { background: var(--line-2); }
/* 三种：ok 绿 / note 琥珀（不是错但要留意）/ bad 红 */
.toast.ok   { border-left-color: var(--ok); }
.toast.ok   .toast-ic { background: var(--ok-weak); color: #0b7a4a; }
.toast.ok   .toast-ic::before { content: "✓"; }
.toast.note { border-left-color: var(--warn); }
.toast.note .toast-ic { background: var(--warn-weak); color: #b54708; }
.toast.note .toast-ic::before { content: "!"; }
.toast.bad  { border-left-color: var(--danger); }
.toast.bad  .toast-ic { background: var(--danger-weak); color: #b42318; }
.toast.bad  .toast-ic::before { content: "!"; }
@media (max-width: 760px) {
  .toast-stack { top: 66px; left: 10px; right: 10px; width: auto; }
  .toast { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity .15s; transform: none; }
}

/* ================================================================
   表格冻结窗格（电脑端，2026-11-15）
   ----------------------------------------------------------------
   要的是 Excel「冻结窗格」那种手感：横着滑的时候，勾选 / 类型 /
   下单时间 / 到仓时间 这 4 列钉在左边不动，中间（商品 → 状态）
   正常滑，最右边的「操作」列本来就 fixed 在右侧（见上面 3475 那条）。

   偏移量不写死：列宽会被「拖表头改宽」（pp_colw_v11）和窗口缩放
   按比例放大，写死 36/125/209 一拖就错位。app.js 的 freezeCols()
   量出前 4 列的真实宽度写进 --fz1..--fz4，这里只引用变量。
   ================================================================ */
@media (min-width: 900px) {
  /* 原来 border-collapse: collapse 下，sticky 单元格的边框会跟着内容滚走、
     接缝处还会叠出一道深线；换成 separate 后边框跟着格子走，才稳。 */
  .sum-table { border-collapse: separate; border-spacing: 0; }

  .sum-table thead th:nth-child(-n+4),
  .sum-table tbody td:nth-child(-n+4) {
    position: sticky;
    /* body 的冻结格要盖住滑过来的内容（z 比普通格高），
       但必须比表头低，否则竖着滚时会把表头压掉 */
    z-index: 2;
    background: #fff;          /* 必须实色：半透明/透明会让下面的字透出来 */
  }

  /* 表头 + 左冻结列 是两层 sticky 的交叉角，压最高，免得被行内容穿过去 */
  .sum-table thead th:nth-child(-n+4) { z-index: 6; background: #f7f9fc; }

  .sum-table :nth-child(1) { left: 0; }
  .sum-table :nth-child(2) { left: var(--fz2, 36px); }
  .sum-table :nth-child(3) { left: var(--fz3, 125px); }
  .sum-table :nth-child(4) { left: var(--fz4, 209px); }

  /* 冻结列要跟着行状态变色，否则永远是一块死白，斑马纹/悬停/新建行全断掉 */
  .sum-table tbody tr:nth-child(even) td:nth-child(-n+4) { background: #fcfdfe; }
  .sum-table tbody tr:hover td:nth-child(-n+4) { background: #f5f8fd; }
  .sum-table tr.is-new > td:nth-child(-n+4) { background: #fffbe6; }
  .sum-table tr.editing > td:nth-child(-n+4) { background: #fffdf6; }

  /* 冻结区右缘一条投影当分隔线，跟「操作」列左边的 -10px 阴影对称。
     inset 那 1px 是实线：光靠投影在浅色底上几乎看不见，滚起来分不清哪边是冻结区 */
  .sum-table th:nth-child(4),
  .sum-table td:nth-child(4) {
    box-shadow: inset -1px 0 0 #e3e8ef, 10px 0 12px -10px rgba(16, 24, 40, .18);
  }
}

/* 通用「写句原因再提交」小窗（2026-11-16）
   仓库「调不到货」用它。字段样式沿用改单小窗那套 .sf-field，
   只补一条多行文本框和说明段的行高。 */
.sf-rd { margin: 0 0 12px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.sf-field textarea {
  width: 100%; min-height: 70px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font: 13.5px/1.55 inherit; color: var(--ink); resize: vertical; outline: none;
}
.sf-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.sf-flag + .sf-flag { margin-top: 8px; }

/* ================================================================
   仓库汇总：筛选条压成一行（2026-11-17 重构）
   ----------------------------------------------------------------
   从左到右：快捷时间（轻量胶囊）→ 类型 / 仓库下拉 → 商品 →
   时间区间 → 筛选 / 清空。
   以前类型是 chips 多选、时间是另一行 chips，两行各占 34px 还把表格推得很低；
   现在一行解决，快捷时间也不再跟右上角的操作按钮挨在一起（免得看着像按钮）。
   ================================================================ */
.wf-card { padding: 10px 14px; border-bottom: none; background: #fff; }
.wf-card > .bd { padding: 0; }   /* .card > .bd 默认 14/16，这里已经有一圈留白了 */
.wf-one { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.wf-one .range-tabs { flex: 0 0 auto; }
.wf-one .range-tabs a { padding: 5px 12px; font-size: 12.5px; }
.wf-one select { min-height: 32px; font-size: 12.5px; border-radius: 8px; }
.wf-one input[type=text] { min-height: 32px; font-size: 12.5px; border-radius: 8px; }
.wf-one input[name=q] { flex: 1 1 150px; min-width: 0; max-width: 260px; }
/* 时间区间：前面一个「时间」小字，两个框中间一个 ~ —— 光两个裸日期框看不出筛的是哪个日期 */
.wf-date { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.wf-date > span { font-size: 12px; color: var(--muted); }
.wf-date > i { font-style: normal; color: var(--faint); font-size: 12px; }
/* .sum-filter input[type=text] 带着 min-width:128px，权重比只有 .wf-date input 高，
   日期框会被撑宽、把「筛选」挤到第二行 —— 这里用 .wf-one 前缀把权重提上去 */
.wf-one .wf-date input { width: 104px; min-width: 0; }
.wf-one select { min-width: 0; }
.wf-act { display: flex; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.wf-act .btn { min-height: 32px; padding: 0 14px; font-size: 12.5px; }

/* 顶栏操作按钮：同一排、同一高度，按「先提交、再收货、最后导入导出」排 */
.dash-wsum .dash-actions .btn { min-height: 34px; }

@media (max-width: 1320px) {
  /* 笔记本横屏这种宽度：先把关键词框收窄、日期框收窄，尽量让「筛选 / 清空」留在同一行 */
  .wf-one input[name=q] { max-width: 180px; }
  .wf-one .wf-date input { width: 92px; }
}
@media (max-width: 1180px) {
  .wf-one input[name=q] { max-width: none; }
  .wf-date > span { display: none; }   /* 窄了就把「时间」二字让出来，两个占位符自己说清楚了 */
  .wf-act { margin-left: 0; }
}
@media (max-width: 760px) {
  .wf-one { gap: 7px; }
  .wf-date { flex: 1 1 100%; }
  .wf-one .wf-date input { flex: 1 1 0; width: auto; min-width: 0; }
  .wf-act { flex: 1 1 100%; }
  .wf-act .btn { flex: 1 1 0; }
}
@media (max-width: 560px) {
  /* 手机：展开的筛选字段定死成「下拉两个一行 → 关键词整行 → 日期整行 → 按钮整行」，
     2026-11-26：之前靠内容宽度自然折行，字段一挤就把「筛选」冲到日期中间去 */
  .wf-one select { flex: 1 1 46%; min-height: 34px; }
  .wf-one input[name=q] { flex: 1 1 100%; max-width: none; min-height: 34px; }
  .wf-one .wf-date input { min-height: 34px; }
  .wf-act .btn { min-height: 36px; }
}

/* ================================================================
   报量页汇总表：宽屏右侧那条白带 + 双滚动条（2026-11-17 晚）
   ----------------------------------------------------------------
   两个毛病，都是 main 的报量页改版带进来的：
   ① 表格宽度被写死成 1572px（colgroup 合计）。屏幕一宽（内容区 > 1572），
      表格右边缘就到头了：「操作」列 sticky 到右边也没用 —— 因为压根没横向滚动，
      右边留出一条比「状态」列还宽的白带（用户报「一大片空白」）。
      改成 max(100%, 1572px)：窄屏仍是 1572 靠横滑，宽屏铺满、多余宽度喂给「商品」列。
   ② 汇总表 max-height 写 470，本意「一屏露 8 条」，但真实行高 40~60px（带备注/两行商品名），
      10 条/页一放就溢出 → 表格自己又长出一条竖向滚动条，和页面滚动条打架。
      干脆不设上限：每页 10 条本来就定高，让整页跟着滚；嫌长点「收起」把它折起来。
      （留着 70vh 的话，笔记本 768 高只能露 6 条，等于白分页。）
   ================================================================ */
.sum-table { width: max(100%, 1572px); }
.colset-host > table.sum-table { width: max(100%, 1572px); }

@media (min-width: 900px) {
  .entry-sum .sum-scroll { max-height: none; min-height: 0; }
}

/* ============ 收货批次（生产日期）· 2026-11-24 ============ */
/* 行内：日期框 + 「多批次」按钮；批次多了换成蓝底标签 */
.prod-cell { display: flex; align-items: center; gap: 6px; }
.sum-table .prod-in {
  width: 122px; height: 26px; padding: 0 5px; font-size: 12px;
  font-variant-numeric: tabular-nums; font-family: inherit;
  border: 1px solid #d8dfe8; border-radius: 6px; background: #fff; color: var(--ink);
}
.sum-table .prod-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.10); }
.sum-table .prod-in[hidden] { display: none; }
.prod-tags {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px; background: var(--brand-weak); color: var(--brand);
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.prod-tags i { font-style: normal; font-size: 10.5px; opacity: .75; }
.prod-tags[hidden] { display: none; }
.prod-txt { font-size: 12.5px; color: var(--ink-2); }
.mini-btn {
  flex: none; height: 24px; padding: 0 7px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #f8fafc; color: var(--ink-2);
  font-size: 11.5px; font-family: inherit; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--brand); color: var(--brand); }

/* 手机卡片上的批次行 */
.wh-card-batch { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.wh-card-batch .k { font-size: 12px; color: var(--faint); flex: none; }
.wh-card-batch .prod-in {
  flex: 1; min-width: 0; height: 30px; font-size: 13px; padding: 0 8px;
  border: 1px solid #d8dfe8; border-radius: 7px; font-family: inherit;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.wh-card-batch .prod-in[hidden] { display: none; }

/* 多批次小窗 */
.bmask {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.bmask[hidden] { display: none; }
.bmodal {
  width: 340px; max-width: 100%; background: #fff; border-radius: 12px;
  padding: 20px 20px 16px; box-shadow: 0 12px 40px rgba(16,24,40,.2);
}
.bmodal h3 { margin: 0 0 8px; font-size: 15.5px; }
.bmodal .bnote { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.brow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.brow > span { width: 62px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.brow > span i { font-style: normal; color: var(--warn); font-size: 11px; margin-left: 3px; }
.brow input {
  flex: 1; height: 32px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 8px; font-size: 13px; font-family: inherit; font-variant-numeric: tabular-nums;
}
.brow input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.10); }
.berr { margin: 4px 0 0 72px; font-size: 12px; color: var(--danger); }
.berr[hidden] { display: none; }
.bacts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
@keyframes bshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-3px)} 75%{transform:translateX(3px)} }
.brow input.shake { animation: bshake .3s; border-color: var(--warn); box-shadow: 0 0 0 2px rgba(247,144,9,.18); }

/* ============ 侧边栏二级菜单（仓库端 → 下单/收货）· 2026-11-24 ============ */
/* 配色必须跟文件末尾的浅蓝主题覆盖块一致：
   选中 = #eaf2ff 底 + var(--brand-d) 字 + var(--brand) 图标，别再用深色侧边栏那套白字 */
.nav-sub summary {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; margin: 2px 0; border-radius: 9px;
  color: var(--side-ink); font-size: 13.5px; cursor: pointer;
  list-style: none; user-select: none;
  transition: background .14s, color .14s;
}
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub summary:hover { background: #f2f7ff; color: var(--brand-d); }
.nav-sub summary .ico { color: #94a3b8; transition: color .14s; }
.nav-sub summary:hover .ico { color: var(--brand); }
.nav-sub summary .arr { margin-left: auto; color: #94a3b8; transition: transform .15s; flex: 0 0 auto; }
.nav-sub summary:hover .arr { color: var(--brand); }
.nav-sub[open] summary .arr { transform: rotate(90deg); }
/* 子项被选中时父项点亮（浅色口径：淡蓝字，不加底，避免和子项的选中底叠在一起） */
.nav-sub summary.parent-on { color: var(--brand-d); font-weight: 600; }
.nav-sub summary.parent-on .ico { color: var(--brand); }
/* 子项：缩进 + 小一号 */
.nav-sub a.sub {
  height: 34px; padding-left: 37px; font-size: 13px; color: #5a6a82;
}
.nav-sub a.sub .ico { color: #94a3b8; }
.nav-sub a.sub:hover { color: var(--brand-d); }
.nav-sub a.sub:hover .ico { color: var(--brand); }
/* 选中的子项：底色交给主题的 .side-nav a.on（#eaf2ff），这里只把字从白改回深蓝 */
.nav-sub a.sub.on { color: var(--brand-d); }
.nav-sub a.sub.on .ico { color: var(--brand); }

/* 手机/窄屏（图标模式）：子项居中、去缩进、箭头隐藏 */
@media (max-width: 900px) {
  .nav-sub summary { justify-content: center; padding: 0; height: 40px; gap: 0; }
  .nav-sub summary span, .nav-sub summary .arr { display: none; }
  .nav-sub a.sub { justify-content: center; padding: 0; height: 36px; }
}

/* ============ 顶栏面包屑（上级页面 › 当前位置）· 2026-11-24 ============ */
/* 电商路径风格：整条链路同样大小，前几级灰蓝可点，最后一级（当前页）深色加重 */
.crumb { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; font-weight: 400; }
.crumb a, .crumb > span { font-size: 13.5px; font-weight: 400; color: #5c6b80; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: #b6bfcb; font-size: 13px; height: auto; background: none; margin: 0; }
/* 有面包屑的页面：标题并入路径，同样大小、当前页深色加重；没有面包屑的页面标题保持 16px 原样 */
.topbar .title.has-crumb { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* ============ 仓库操作列按钮 = 采购端风格（2026-11-26） ============
   目标：和采购台「调拨 / 缺货 / 详情」一样的淡底圆角药丸，但保留每种操作的语义色
   （编辑橙 / 删除红 / 提交蓝 / 收货绿 / 详情中性），删除依旧一眼是红的。
   放在文件末尾：前面 .sum-table .ibtn 的多处覆盖（24/26/28px、opacity .55）会把
   老 .ibtn.tt 压回小方块，这里用 .sum-table td.act .ibtn.tt 提高优先级统一盖掉。 */
.sum-table td.act .ibtn.tt {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 0; height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid transparent; font-size: 12.5px; font-weight: 500;
  white-space: nowrap; cursor: pointer; opacity: 1;
  transition: background .12s, color .12s, border-color .12s;
}
/* 编辑 / 退采购：橙 */
.sum-table td.act .ibtn.tt.warn,
.sum-table td.act .ibtn.tt.warn:hover { background: #fff6ed; color: #b54708; border-color: #f7d9b8; }
.sum-table td.act .ibtn.tt.warn:hover { background: #ffe9d2; color: #93370d; border-color: #f2c79c; }
/* 删除：红 */
.sum-table td.act .ibtn.tt.danger,
.sum-table td.act .ibtn.tt.danger:hover { background: #fff3f2; color: #c2410c; border-color: #f6d5d2; }
.sum-table td.act .ibtn.tt.danger:hover { background: #ffe5e1; color: #b91c1c; border-color: #f0bdb5; }
/* 提交：蓝 */
.sum-table td.act .ibtn.tt.sub,
.sum-table td.act .ibtn.tt.sub:hover { background: #eff6ff; color: #2563eb; border-color: #d4e5ff; }
.sum-table td.act .ibtn.tt.sub:hover { background: #dfeaff; color: #1d4ed8; border-color: #bfd6fb; }
/* 收货 / 直出：绿 */
.sum-table td.act .ibtn.tt.ok,
.sum-table td.act .ibtn.tt.ok:hover { background: #f0faf3; color: #15803d; border-color: #cbe8d7; }
.sum-table td.act .ibtn.tt.ok:hover { background: #dcf3e4; color: #166534; border-color: #b6e0c6; }
/* 详情：中性灰蓝 */
.sum-table td.act .ibtn.tt:not(.warn):not(.danger):not(.sub):not(.ok):not(.off),
.sum-table td.act .ibtn.tt:not(.warn):not(.danger):not(.sub):not(.ok):not(.off):hover {
  background: #f0f5ff; color: #475569; border-color: #dbe6fb;
}
.sum-table td.act .ibtn.tt:not(.warn):not(.danger):not(.sub):not(.ok):not(.off):hover {
  background: #e4edff;
}
/* 置灰（点不了）：淡灰虚线，别再缩成小字 */
.sum-table td.act .ibtn.tt.off,
.sum-table td.act .ibtn.tt.off:hover {
  background: #f4f6f9; color: #94a3b8; border: 1px dashed #d9dfe7;
  width: auto; min-width: 0; height: 30px; padding: 0 11px;
  font-size: 12.5px; font-weight: 500; opacity: .55;
}
/* 窄屏收一档，四个药丸不挤 */
@media (max-width: 1280px) {
  .sum-table td.act .ibtn.tt,
  .sum-table td.act .ibtn.tt.off { height: 26px; padding: 0 8px; font-size: 12px; }
}

/* ============ 左下角用户区：点一下向上弹菜单 · 2026-11-26 ============ */
/* 浅蓝主题口径：白底 + 淡蓝描边，选中 #eaf2ff / var(--brand-d) */
.side-foot { position: relative; }
.user-menu { position: relative; flex: 1; min-width: 0; }
.side-user {
  width: 100%; background: transparent; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
.side-user .caret { margin-left: auto; display: flex; color: var(--faint); }
.side-user .caret .ico { transform: rotate(-90deg); transition: transform .16s; }
.user-menu.open > .side-user { background: #f4f8ff; }
.user-menu.open > .side-user .caret .ico { transform: rotate(90deg); }

.user-menu-pop {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
  padding: 6px; z-index: 80;
  background: #fff; border: 1px solid #dbe6fb; border-radius: 12px;
  box-shadow: 0 14px 34px -10px rgba(16, 24, 40, .24), 0 2px 8px rgba(16, 24, 40, .08);
}
.user-menu-pop[hidden] { display: none; }
.user-menu-pop::after {
  content: ""; position: absolute; left: 24px; bottom: -6px;
  width: 10px; height: 10px; background: #fff;
  border-right: 1px solid #dbe6fb; border-bottom: 1px solid #dbe6fb;
  transform: rotate(45deg);
}
.pop-label {
  padding: 6px 10px 4px; font-size: 10.5px; letter-spacing: .1em;
  color: #9db0cc; text-transform: uppercase;
}
.user-menu-pop a,
.user-menu-pop .pop-logout {
  display: flex; align-items: center; gap: 9px; width: 100%;
  height: 34px; padding: 0 10px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  text-align: left;
}
.user-menu-pop a .ico,
.user-menu-pop .pop-logout .ico { color: #94a3b8; }
.user-menu-pop a:hover,
.user-menu-pop .pop-logout:hover { background: #f2f7ff; color: var(--brand-d); }
.user-menu-pop a:hover .ico,
.user-menu-pop .pop-logout:hover .ico { color: var(--brand); }
.user-menu-pop a.on { background: #eaf2ff; color: var(--brand-d); font-weight: 600; }
.user-menu-pop a.on .ico { color: var(--brand); }
.pop-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.pop-logout-form { margin: 0; }
.pop-logout .out { transform: rotate(180deg); }

/* 窄屏（侧栏 66px 图标条）：菜单从侧栏右边弹出来，别挤成 54px 一列 */
@media (max-width: 1280px) {
  .side-foot { padding: 8px 6px; }
  .user-menu { flex: 0 0 auto; width: 100%; }
  .side-user { justify-content: center; padding: 4px; }
  .side-user .txt, .side-user .caret { display: none; }
  .user-menu-pop { left: 0; right: auto; width: 210px; }
  .user-menu-pop::after { left: 22px; }
}

/* ================================================================
   下单页手机布局收尾（2026-11-26 晚）
   ----------------------------------------------------------------
   用户反馈三处挤：
   ① 顶部「批量粘贴/导入/收货/汇总/怎么用?/我的报量」六个按钮全挤一行
      → 模板里撤掉「批量粘贴」「导入」两个（功能在表单底部两块还在），
        剩下的按 2 列网格两行摆完，不再横滑；
   ② 汇总面板标题行（hd-right）：快捷时间 + 批量提交/导入/导出/收起
      space-between 挤一行、快捷时间被挤没 → 快捷时间独占一行，
      按钮 2×2 摆开，快捷时间从此在手机上看得见；
   ③ 汇总筛选条：字段随内容乱折行（日期被冲到按钮行）→
      定死「类型/仓库一行 → 商品一行 → 日期一行 → 按钮一行」。
   放在文件末尾，压过前面 ≤700 的横滑规则（padding-right:24px 那条）。 */
@media (max-width: 900px) {
  .entry-actions { display: grid; grid-template-columns: repeat(2, 1fr);
                   gap: 8px; overflow: visible; padding-right: 0; }
  .entry-actions .btn { flex: initial; min-height: 38px;
                        justify-content: center; padding: 0 8px; }

  .entry-sum .hd-right { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
  .entry-sum .hd-right .range-tabs { flex: 1 1 100%; justify-content: center; }
  .entry-sum .hd-right .btn { flex: 1 1 46%; justify-content: center; min-height: 36px; }

  .entry-sum form.sum-filter { display: flex; flex-wrap: wrap; gap: 8px; }
  .entry-sum form.sum-filter select,
  .entry-sum form.sum-filter input[type=text] {
    flex: 1 1 46%; min-width: 0; max-width: none; min-height: 34px; }
  .entry-sum form.sum-filter input[name=sq] { flex: 1 1 100%; }
  .entry-sum form.sum-filter .sf-sep,
  .entry-sum form.sum-filter .sf-dash { display: none; }
  .entry-sum form.sum-filter .btn { flex: 1 1 46%; min-height: 36px; }
}

/* ===== 网站备案号页脚（2026-12-02）=====
   合规要求：ICP 备案号每页底部展示，且可点击跳转工信部。
   放在 body block 之外，登录/初始化/错误/验证码页也都有。 */
.beian-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 14px; padding: 18px 14px 26px; text-align: center;
  font-size: 12px; line-height: 1.6; color: var(--faint);
}
.beian-foot a { color: var(--faint); text-decoration: none; }
.beian-foot a:hover { color: #2563eb; text-decoration: underline; }
.beian-co { color: var(--faint); opacity: .85; }
/* 手机端：底栏 tabbar 固定占 72px+，备案号再留出这个高度，别被盖住 */
@media (max-width: 720px) {
  .beian-foot { padding-bottom: calc(72px + env(safe-area-inset-bottom) + 10px); }
}
