:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --line: #e7e5e0;
  --line-2: #d6d3cc;
  --text: #17171a;
  --text-2: #57554f;
  --muted: #8a877f;
  --brand: #b3261e;
  --brand-ink: #ffffff;
  --brand-soft: #fbeceb;
  --side: #1c1b1a;
  --side-text: #c9c6bf;
  --good: #1e7b3c;      --good-bg: #e7f4ea;
  --warn: #9a6200;      --warn-bg: #fdf3dc;
  --bad: #b3261e;       --bad-bg: #fbeceb;
  --info: #1f5fb4;      --info-bg: #e8f0fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 18, 14, .05), 0 1px 1px rgba(20, 18, 14, .03);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--info); }
a.link:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sub { color: var(--text-2); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 216px; flex: 0 0 216px; background: var(--side); color: var(--side-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex;
  flex-direction: column; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: #fff; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid;
  place-items: center; font-weight: 800; font-size: 14px; color: #fff;
}
.brand b { font-size: 13.5px; line-height: 1.2; }
.brand small { display: block; font-size: 11px; color: #8d8a83; font-weight: 400; }
.nav-group { font-size: 11px; color: #75726b; padding: 14px 12px 6px; letter-spacing: .04em; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px;
  color: var(--side-text); margin-bottom: 1px;
}
.nav a:hover { background: #2a2927; color: #fff; }
.nav a.on { background: #34322f; color: #fff; }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.nav a .badge { margin-left: auto; }
.side .me {
  margin-top: auto; border-top: 1px solid #2f2d2a; padding: 12px 10px 4px; font-size: 13px;
}
.side .me .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side .me a, .side .me button { color: #a9a59d; font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0;
  z-index: 20;
}
.topbar .title { font-weight: 650; font-size: 16px; }
.topbar .spacer { flex: 1; }
.bell { position: relative; padding: 6px 8px; border-radius: 8px; font-size: 18px; }
.bell:hover { background: var(--surface-2); }
.bell .dot {
  position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center;
  padding: 0 4px; font-weight: 600;
}
.content { padding: 20px 24px 40px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .spacer { flex: 1; }
.menu-btn { display: none; font-size: 20px; background: none; border: 0; padding: 4px 6px; }
.tabbar { display: none; }
.scrim { display: none; }

/* ---------- 卡片与网格 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-h {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap;
}
.card-h .spacer { flex: 1; }
.card-b { padding: 4px 16px 16px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }

/* KPI */
.kpi { padding: 14px 16px; }
.kpi .label { color: var(--text-2); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.kpi .value { font-size: 24px; font-weight: 680; margin-top: 4px; letter-spacing: -.02em; }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.up-bad { color: var(--bad); }
.delta.down-good { color: var(--good); }
.meter { height: 6px; background: #eeece7; border-radius: 4px; position: relative; margin-top: 10px; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--brand); }
.meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 1px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 12px; color: var(--text-2); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fbfaf8; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 标签 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; font-weight: 550; white-space: nowrap; border: 1px solid transparent;
  line-height: 18px;
}
.s-todo { background: #efeee9; color: #57554f; }
.s-doing { background: var(--info-bg); color: var(--info); }
.s-review { background: var(--warn-bg); color: var(--warn); }
.s-done { background: var(--good-bg); color: var(--good); }
.s-cancel { background: #f1f0ec; color: var(--muted); text-decoration: line-through; }
.p-P0 { background: var(--bad); color: #fff; }
.p-P1 { border-color: #e2a56b; color: #a14d06; background: #fff7ef; }
.p-P2 { border-color: var(--line-2); color: var(--text-2); }
.tag { display: inline-block; padding: 0 7px; border-radius: 5px; background: #f0eee9; color: var(--text-2); font-size: 12px; line-height: 20px; }
.due-overdue { color: var(--bad); font-weight: 600; }
.due-today { color: var(--warn); font-weight: 600; }
.due-soon { color: #a14d06; }
.lvl-critical { background: var(--bad-bg); color: var(--bad); }
.lvl-warning { background: var(--warn-bg); color: var(--warn); }
.lvl-good { background: var(--good-bg); color: var(--good); }
.lvl-zero, .lvl-none { background: #efeee9; color: var(--text-2); }
.badge { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 650; line-height: 17px; }
.dot-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

/* ---------- 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
  padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #9c1f18; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--bad); border-color: #ebc0bd; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.input, select.input, textarea.input {
  height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px;
  background: #fff; font: inherit; color: var(--text); width: 100%; min-width: 0;
}
textarea.input { height: auto; padding: 8px 10px; min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid #f3c9c5; border-color: var(--brand); }
.input.sm { height: 30px; font-size: 13px; }
label.f { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 4px; font-weight: 550; }
.field { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .input { width: auto; min-width: 120px; height: 32px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 5px 12px; font-size: 13px; color: var(--text-2); border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--text); color: #fff; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow-y: auto; padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; }
.multi label { padding: 3px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; cursor: pointer; }
.multi input { display: none; }
.multi input:checked + span { color: var(--brand); font-weight: 650; }
.multi label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- 提示 ---------- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.flash.ok { background: var(--good-bg); color: var(--good); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* ---------- 任务 ---------- */
.task-row { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fbfaf8; }
.task-row .main-col { flex: 1; min-width: 0; }
.task-row .ttl { font-weight: 560; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); }
.task-row .side-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.mini-prog { width: 64px; height: 4px; background: #eeece7; border-radius: 3px; overflow: hidden; }
.mini-prog i { display: block; height: 100%; background: var(--info); }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eceae5; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 600; font-size: 13px; }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--line-2); }
.kcard .ttl { font-weight: 560; font-size: 13.5px; }
.kcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 10px 8px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.desc { white-space: pre-wrap; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; font-size: 12.5px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .who { font-weight: 600; font-size: 13px; }
.comment .when { font-size: 12px; color: var(--muted); margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bigprog { height: 8px; background: #eeece7; border-radius: 5px; overflow: hidden; }
.bigprog i { display: block; height: 100%; background: var(--info); }
.review-note { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-top: 10px; }

/* ---------- 图表 ---------- */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--side); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 30px 28px; }
.login-card .brand { color: var(--text); padding: 0 0 20px; }

/* ---------- 手机 ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .side {
    position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease; visibility: hidden;
  }
  body.nav-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 0 12px; height: 52px; }
  .content { padding: 14px 12px 90px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 12px; }
  .kpi .value { font-size: 20px; }
  .chart-box { height: 220px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
    border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--muted); position: relative; }
  .tabbar a .ico { display: block; font-size: 19px; line-height: 1.2; }
  .tabbar a.on { color: var(--brand); font-weight: 600; }
  .tabbar a .badge { position: absolute; top: 3px; left: 54%; }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .task-row { padding: 11px 12px; }
  .hide-m { display: none !important; }
  .filters .input { min-width: 0; flex: 1 1 40%; }
  table.t th, table.t td { padding: 8px 10px; }
  .page-head h1 { font-size: 18px; }
  .mfold:not(.open) select.input, .mfold:not(.open) .msel { display: none; }
  .mfold input[name=q] { flex: 1 1 50%; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }

/* ---------- 库存管理 ---------- */
.rg { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; white-space:nowrap; }
.rg::before { content:""; width:8px; height:8px; border-radius:2px; background:currentColor; }
.rg-NJ { color:#2a78d6; } .rg-GA { color:#6250d6; } .rg-TX { color:#c4561f; } .rg-CA { color:#14865d; }
.rg-CAN { color:#c2416f; } .rg-FBA { color:#a87400; } .rg-WFS { color:#0f7a0f; } .rg-OTHER { color:#8a877f; }
.th-NJ { border-top:3px solid #2a78d6 !important; } .th-GA { border-top:3px solid #6250d6 !important; }
.th-TX { border-top:3px solid #eb6834 !important; } .th-CA { border-top:3px solid #1baf7a !important; }
.th-CAN { border-top:3px solid #e87ba4 !important; } .th-FBA { border-top:3px solid #eda100 !important; }
.th-WFS { border-top:3px solid #008300 !important; } .th-OTHER { border-top:3px solid #b9b5ac !important; }
.subtabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:14px; border-bottom:1px solid var(--line); }
.subtabs a { padding:8px 14px; font-size:13.5px; color:var(--text-2); border-bottom:2px solid transparent; margin-bottom:-1px; }
.subtabs a.on { color:var(--brand); border-bottom-color:var(--brand); font-weight:600; }
.mini-kpis { display:grid; grid-template-columns:repeat(8, minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.mini-kpis .card { padding:10px 12px; }
.mini-kpis .v { font-size:19px; font-weight:680; font-variant-numeric:tabular-nums; margin-top:2px; }
.mini-kpis .l { font-size:12px; color:var(--text-2); }
.bars { display:flex; flex-direction:column; gap:7px; }
.bar-row { display:grid; grid-template-columns:86px 1fr 70px; gap:8px; align-items:center; font-size:12.5px; }
.bar-track { height:12px; background:#f0eee9; border-radius:3px; overflow:hidden; }
.bar-fill { height:100%; border-radius:3px; }
.age-chip { display:inline-block; padding:0 6px; border-radius:4px; margin:0 3px 3px 0; background:#f0eee9; font-size:11.5px; line-height:19px; white-space:nowrap; }
.age-chip.warn { background:var(--warn-bg); color:var(--warn); }
.age-chip.danger { background:var(--bad-bg); color:var(--bad); font-weight:650; }
.adj-mark { display:inline-block; font-size:11px; padding:0 5px; border-radius:4px; background:#efe8fb; color:#5b3fb5; font-weight:600; line-height:18px; }
table.t.stock td, table.t.stock th { padding:7px 9px; }
table.t.stock td.num { white-space:nowrap; }
table.t.stock tbody tr { cursor:pointer; }
.cell-zero { color:#c9c6bf; }
.name-cell { max-width:280px; }
.name-cell .n { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:550; }
.name-cell .s { font-size:11.5px; color:var(--muted); font-family:ui-monospace,Menlo,monospace; }
.sticky-col { position:sticky; left:0; background:#fff; z-index:1; }
table.t tbody tr:hover td.sticky-col { background:#fbfaf8; }
.wh-cards { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; }
.wh-card { border:1px solid var(--line); border-radius:10px; padding:12px; position:relative; background:#fff; }
.wh-card.rec { border-color:#7cc89b; background:linear-gradient(180deg,#eef8f1,#fff 60%); }
.wh-card.dim { opacity:.6; }
.wh-badge { position:absolute; top:-9px; right:10px; font-size:11px; font-weight:700; padding:1px 9px; border-radius:20px; }
.wh-badge.rec { background:var(--good); color:#fff; } .wh-badge.alt { background:#efeee9; color:var(--text-2); } .wh-badge.short { background:#eda100; color:#fff; }
.kv-row { display:flex; justify-content:space-between; font-size:12.5px; margin-top:4px; }
.qrow { display:grid; grid-template-columns:2fr 1fr 80px 1.2fr 34px; gap:8px; align-items:end; margin-bottom:8px; }
.sug { position:absolute; left:0; right:0; top:100%; z-index:30; background:#fff; border:1px solid var(--line-2); border-radius:8px; max-height:300px; overflow:auto; box-shadow:0 10px 30px rgba(0,0,0,.12); display:none; }
.sug.open { display:block; }
.sug div { padding:7px 10px; cursor:pointer; border-bottom:1px solid var(--line); font-size:13px; }
.sug div:hover, .sug div.hl { background:var(--brand-soft); }
.copy-btn { border:1px solid var(--line-2); background:#fff; border-radius:6px; font-size:11px; padding:0 6px; cursor:pointer; }
@media (max-width:1100px) { .mini-kpis { grid-template-columns:repeat(4, minmax(0,1fr)); } .wh-cards { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:860px) { .mini-kpis { grid-template-columns:repeat(2, minmax(0,1fr)); } .qrow { grid-template-columns:1fr 1fr; } .wh-cards { grid-template-columns:1fr; } .sticky-col { position:static; } }
/* 发货推荐 */
.modal-bg { position:fixed; inset:0; background:rgba(20,18,14,.42); z-index:100; display:none; align-items:flex-start; justify-content:center; padding:6vh 10px; overflow:auto; }
.modal-bg.open { display:flex; }
.modal { background:#fff; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.25); max-height:86vh; overflow:auto; }
.seg a { cursor:pointer; }
.qrow .field { position:relative; margin:0; }
.qrow .row-del { height:34px; border:1px solid var(--line-2); background:#fff; border-radius:8px; cursor:pointer; color:var(--muted); }
.sug .tag { display:inline-block; font-size:10.5px; padding:0 5px; border-radius:4px; background:#efeaff; color:#6250d6; margin-right:6px; }
.sug .tag.g { background:#e8f1fb; color:#2a78d6; }
.sug .meta { font-size:11.5px; color:var(--muted); }
.rrow { border:1px solid var(--line); border-radius:12px; background:#fff; padding:12px 14px; margin-bottom:12px; }
.rrow-head { display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:13px; color:var(--text-2); margin-bottom:10px; }
.rrow-head .no { font-weight:700; color:var(--text); }
.chip { display:inline-block; padding:1px 8px; border-radius:20px; background:#f0eee9; font-size:12px; }
.chip.note { background:#fff6dc; color:#8a6400; }
.variant { border-top:1px dashed var(--line); padding-top:10px; margin-top:10px; }
.variant:first-of-type { border-top:0; margin-top:0; padding-top:0; }
.variant-h { display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; margin-bottom:12px; }
.variant-h .nm { font-weight:650; }
.variant-h .sk { font-size:12px; color:var(--muted); font-family:ui-monospace,Menlo,monospace; }
.wh-card .wn { font-weight:700; font-size:14px; }
.wh-card .wl { font-size:10.5px; color:var(--muted); letter-spacing:.04em; margin-bottom:6px; }
.store-line { display:flex; gap:6px; align-items:center; font-size:11.5px; margin-top:6px; padding-top:6px; border-top:1px solid var(--line); }
.store-line .st { flex:0 0 auto; max-width:38%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-2); }
.store-line .wh { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.store-line .q { font-weight:600; }
.store-more { font-size:11.5px; color:var(--brand); cursor:pointer; margin-top:6px; }
.rec-note { font-size:12.5px; margin-top:10px; color:var(--text-2); }
.rec-note.bad { color:var(--bad); } .rec-note.warn { color:#a06b00; }
.result-error { color:var(--bad); font-size:13px; }
.copy-btn.copied { background:var(--good); color:#fff; border-color:var(--good); }
.mono { font-family:ui-monospace,Menlo,monospace; }
.seg a { white-space:nowrap; }
@media (max-width:860px) { .card-h { flex-wrap:wrap; gap:8px; } .seg { max-width:100%; overflow-x:auto; } .qrow .row-del { grid-column:1/-1; } }
/* 多选下拉 */
.msel { position:relative; display:inline-block; min-width:140px; max-width:260px; }
.msel-btn { width:100%; display:flex; align-items:center; gap:6px; text-align:left; cursor:pointer; background:#fff; padding-right:26px; position:relative; }
.msel-btn::after { content:''; position:absolute; right:10px; top:50%; width:6px; height:6px; border-right:1.5px solid #6b6860; border-bottom:1.5px solid #6b6860; transform:translateY(-70%) rotate(45deg); }
.msel-txt { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msel-n { flex:0 0 auto; font-size:11px; font-weight:650; color:#fff; background:var(--brand); border-radius:10px; padding:0 6px; line-height:17px; }
.msel-n:empty { display:none; }
.msel.has .msel-btn { border-color:var(--brand); color:var(--brand); }
.msel-pop { display:none; position:absolute; z-index:60; left:0; top:calc(100% + 4px); width:320px; max-width:92vw; background:#fff; border:1px solid var(--line-2); border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.14); padding:10px; }
.msel-pop.right { left:auto; right:0; }
.msel.open .msel-pop { display:block; }
.msel-q { width:100%; margin-bottom:8px; }
.msel-groups { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.msel-groups a { font-size:11.5px; padding:2px 8px; border-radius:12px; background:#f1efea; cursor:pointer; color:var(--text-2); }
.msel-groups a:hover { background:#e7e3da; }
.msel-acts { display:flex; gap:12px; align-items:center; font-size:12px; margin-bottom:6px; }
.msel-acts a { color:var(--brand); cursor:pointer; }
.msel-acts span { margin-left:auto; }
.msel-list { max-height:280px; overflow:auto; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:4px 0; }
.msel-list label { display:flex; gap:8px; align-items:center; padding:5px 4px; font-size:13px; cursor:pointer; border-radius:6px; }
.msel-list label:hover { background:#f6f4ef; }
.msel-list input { width:15px; height:15px; accent-color:var(--brand); flex:0 0 auto; }
.msel-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
@media (max-width:860px) { .msel { max-width:none; min-width:0; width:100% !important; } .msel-pop { position:fixed; left:4vw !important; right:4vw !important; width:auto; top:15vh; } .msel-list { max-height:45vh; } }
/* 销售 KPI 卡片可点选 */
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width:1280px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width:860px) { .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; } }
.kpi-pick .kpi { cursor:pointer; color:inherit; text-decoration:none; transition:border-color .12s, box-shadow .12s; position:relative; }
.kpi-pick .kpi:hover { border-color:#cfcabf; }
.kpi-pick .kpi.on { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand) inset; }
.kpi-pick .kpi.on::after { content:''; position:absolute; left:50%; bottom:-7px; width:12px; height:12px; background:#fff; border-right:1.5px solid var(--brand); border-bottom:1.5px solid var(--brand); transform:translateX(-50%) rotate(45deg); }
.kpi-ico { font-size:11px; opacity:.35; margin-left:auto; }
.kpi-pick .kpi.on .kpi-ico { opacity:1; }
.kpi-pick .kpi .value { font-size:22px; }
/* ---------- 利润报表 ---------- */
.pf-entry-wrap { max-height: 70vh; overflow: auto; }
table.pf-entry { font-size: 12.5px; }
table.pf-entry th { white-space: nowrap; font-size: 11.5px; position: sticky; top: 0; z-index: 2; background: var(--surface-2, #faf9f6); }
table.pf-entry th.sticky-col { z-index: 3; }
table.pf-entry td { padding: 4px 4px; }
table.pf-entry td.sticky-col, table.pf-entry tfoot td.sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.pf-in { width: 76px; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; font: inherit; text-align: right; background: #fff; }
.pf-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(179,38,30,.12); }
.pf-t { text-align: left; }
.w-prod .pf-in { width: 150px; } .w-sku .pf-in { width: 130px; } .w-sm .pf-in { width: 82px; }
.pf-cell { position: relative; display: inline-block; }
.pf-cell.fc .pf-in { background: #f3f8ff; }
.pf-cell.auto .pf-in { background: #f6f3ff; color: #5b47c4; }
.pf-cell.auto.manual .pf-in { background: #fff7e6; color: #8a5a00; }
.pf-reset { display: none; position: absolute; right: -2px; top: -7px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #e0c48a; background: #fff; font-size: 10px; line-height: 13px; padding: 0; cursor: pointer; color: #8a5a00; }
.pf-cell.manual .pf-reset { display: block; }
.pf-out { white-space: nowrap; }
.th-fc { color: #2a78d6 !important; } .th-auto { color: #5b47c4 !important; } .th-rmb { color: #57554f; } .th-calc { color: #1c1b1a !important; }
.lg { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11px; }
.lg-fc { background: #f3f8ff; color: #2a78d6; } .lg-rmb { background: #f1efea; } .lg-auto { background: #f6f3ff; color: #5b47c4; }
table.pf-wide { font-size: 12px; } table.pf-wide th { white-space: nowrap; font-size: 11px; }
tr.row-on td { background: #fdf6f4; }
.auth-grid { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.auth-grid label { min-width: 150px; }
.kpi-static .kpi .value { font-size: 21px; }
table.pf-set td { padding: 6px 6px; }
.input.sm.num { text-align: right; }
/* 月度核算 */
.neg { color: var(--bad); } .pos { color: var(--good); }
.sub-h { padding: 12px 14px 6px; font-weight: 650; font-size: 13px; color: var(--text-2); }
details.mdet summary { cursor: pointer; font-size: 12px; color: var(--brand); margin-top: 3px; }
table.kvt { font-size: 12px; margin-top: 4px; border-collapse: collapse; min-width: 240px; }
table.kvt td { padding: 2px 8px 2px 0; border-bottom: 1px dashed var(--line); }
tr.row-adj td { background: #fbfaf5; }
.flash.info { background: var(--info-bg); color: var(--info); }
.hide { display:none !important; }
