* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --bg:#f1f5f9; --card:#ffffff; --line:#e2e8f0; --txt:#0f172a; --sub:#64748b;
  --pri:#2563eb; --ok:#16a34a; --warn:#ea580c; --err:#dc2626;
  --pri-soft:#eff6ff;
  --side:#0f172a; --side-hi:#1e293b; --side-a:rgba(15,23,42,.90); --side-pri:#1d4ed8;
  --glow1:rgba(37,99,235,.30); --glow2:rgba(14,165,233,.24); --glow3:rgba(16,185,129,.20);
  --glass-card:rgba(255,255,255,.58); --glass-line:rgba(255,255,255,.66);
}
/* ---------- 仓库主题配色（只换变量，版式不动） ---------- */
html[data-theme="steel"] {
  --bg:#eceff4; --card:#ffffff; --line:#d7dee8; --txt:#101827; --sub:#5c6779;
  --pri:#4b5b70; --pri-soft:#eef1f5;
  --side:#161d29; --side-hi:#232c3b; --side-a:rgba(22,29,41,.90); --side-pri:#3c4a5d;
  --glow1:rgba(71,85,105,.34); --glow2:rgba(148,163,184,.30); --glow3:rgba(56,189,248,.16);
}
html[data-theme="orange"] {
  --bg:#fdf6ee; --card:#fffdf9; --line:#f0dfcb; --txt:#1e1206; --sub:#8a6a4d;
  --pri:#ea580c; --pri-soft:#fff3e6;
  --side:#221507; --side-hi:#382312; --side-a:rgba(34,21,7,.90); --side-pri:#c2410c;
  --glow1:rgba(234,88,12,.28); --glow2:rgba(245,158,11,.26); --glow3:rgba(239,68,68,.14);
}
html[data-theme="green"] {
  --bg:#eff6f1; --card:#ffffff; --line:#d9e8de; --txt:#0b1f14; --sub:#57735f;
  --pri:#15803d; --pri-soft:#eaf6ee;
  --side:#0a1f15; --side-hi:#163024; --side-a:rgba(10,31,21,.90); --side-pri:#166534;
  --glow1:rgba(21,128,61,.28); --glow2:rgba(45,212,191,.24); --glow3:rgba(132,204,22,.18);
}
html[data-theme="navy"] {
  --bg:#eef2f8; --card:#ffffff; --line:#dce4f0; --txt:#0b1626; --sub:#5a6a82;
  --pri:#1d4ed8; --pri-soft:#eaf1ff;
  --side:#081426; --side-hi:#122441; --side-a:rgba(8,20,38,.92); --side-pri:#1739a3;
  --glow1:rgba(29,78,216,.30); --glow2:rgba(56,189,248,.24); --glow3:rgba(99,102,241,.18);
}

html,body { height:100%; }
body { font-family:"Microsoft YaHei","PingFang SC",-apple-system,sans-serif; background:var(--bg); color:var(--txt); font-size:14px; }

/* ---------- login ---------- */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#1e3a8a 0%,#2563eb 55%,#0ea5e9 100%); }
.login-box { background:#fff; border-radius:16px; padding:40px 36px; width:380px; box-shadow:0 24px 60px rgba(0,0,0,.25); }
.login-box h1 { font-size:22px; text-align:center; margin-bottom:6px; }
.login-box .sub { text-align:center; color:var(--sub); margin-bottom:24px; font-size:13px; }
.login-box .logo { text-align:center; font-size:44px; margin-bottom:8px; }
/* v155 登录方式切换 / 记住本设备 / 验证码 */
.li-tabs { display:flex; gap:6px; background:#f1f5f9; border-radius:10px; padding:4px; margin:0 0 14px; }
.li-tab { flex:1; border:0; background:transparent; color:var(--sub); font-size:13px; padding:8px 6px; border-radius:8px;
  cursor:pointer; font-family:inherit; transition:background .15s,color .15s; }
.li-tab.on { background:#fff; color:var(--pri); font-weight:bold; box-shadow:0 1px 4px rgba(15,23,42,.12); }
.li-rem { display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--sub); margin:2px 0 2px; cursor:pointer; user-select:none; }
.li-rem input { width:15px; height:15px; accent-color:var(--pri); flex-shrink:0; }
.li-rem-tip { background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46; font-size:12px; line-height:1.55;
  border-radius:9px; padding:7px 10px; margin:0 0 12px; }
.li-hint { font-size:12px; color:var(--sub); line-height:1.7; margin-top:10px; text-align:center; word-break:break-all; }

/* ---------- layout ---------- */
.layout { display:flex; min-height:100vh; }
.sidebar { width:178px; background:var(--side); color:#cbd5e1; flex-shrink:0; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; }
.sidebar .brand { padding:18px 16px 14px; border-bottom:1px solid #1e293b; }
.sidebar .brand b { color:#fff; font-size:17px; }
.sidebar .brand .s { font-size:11px; color:#64748b; margin-top:3px; }
.menu { flex:1; padding:8px 0; }
.menu .mg { padding:12px 16px 4px; font-size:11px; letter-spacing:.1em; color:#475569; font-weight:600; }
.menu .mg:first-child { padding-top:4px; }
.menu-item { display:flex; align-items:center; gap:8px; margin:3px 10px; padding:7px 10px; cursor:pointer; font-size:13px;
  border-radius:9px; color:#fff; font-weight:600; white-space:nowrap; overflow:hidden;
  background-image:linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.06) 45%, rgba(0,0,0,.16));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.18), 0 2px 5px rgba(0,0,0,.28);
  transition:transform .12s, box-shadow .12s, filter .12s; user-select:none; }
.menu-item:hover { filter:brightness(1.1); transform:translateY(-1px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.18), 0 4px 9px rgba(0,0,0,.34); }
.menu-item:active { transform:translateY(1px); box-shadow:inset 0 2px 5px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.2); }
.menu-item.active { outline:2px solid rgba(255,255,255,.85); outline-offset:-2px; font-weight:bold; filter:brightness(1.12); }
.menu-item .mi { width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12.5px; flex-shrink:0;
  background:rgba(255,255,255,.22); box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }
.menu-item .mi + span { overflow:hidden; text-overflow:ellipsis; }
.menu-item.active .mi { box-shadow:0 0 0 2px rgba(255,255,255,.4); }
/* v203 菜单样式变体：扁平 / ERP风（默认立体3D即上面基础样式） */
html[data-mstyle="flat"] .menu-item { background-image:none; box-shadow:none; }
html[data-mstyle="flat"] .menu-item:hover { filter:brightness(1.08); transform:none; box-shadow:none; }
html[data-mstyle="flat"] .menu-item:active { transform:none; box-shadow:none; }
html[data-mstyle="flat"] .menu-item.active { filter:none; }
html[data-mstyle="flat"] .menu-item .mi { background:rgba(255,255,255,.24); box-shadow:none; }
html[data-mstyle="erp"] .menu-item { border-radius:2px; padding:6px 9px; font-size:12.5px;
  background-image:linear-gradient(180deg,rgba(255,255,255,.12),rgba(0,0,0,.10));
  border:1px solid rgba(0,0,0,.45);
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.26), inset -1px -1px 0 rgba(0,0,0,.30); }
html[data-mstyle="erp"] .menu-item:hover { filter:brightness(1.14); transform:none;
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.26), inset -1px -1px 0 rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.25); }
html[data-mstyle="erp"] .menu-item:active { transform:none; box-shadow:inset 1px 1px 3px rgba(0,0,0,.35); }
html[data-mstyle="erp"] .menu-item.active { filter:none; outline:2px solid #f59e0b; outline-offset:-2px; }
html[data-mstyle="erp"] .menu-item .mi { border-radius:3px; background:rgba(0,0,0,.28); box-shadow:none; }
/* v204 彩色区分开关：关闭后统一主题主色 */
html[data-mstyle="3d"] .menu-item .mi { background:rgba(255,255,255,.22); }
html[data-mcol="off"]:not([data-mstyle="classic"]) .menu-item { background-color:var(--pri) !important; background-image:none !important; }
html[data-mcol="off"] .menu-item .mi { background:rgba(255,255,255,.18) !important; }
html[data-mcol="off"][data-mstyle="classic"] .menu-item .mi { background:var(--pri) !important; }
/* v204 经典样式：之前默认（透明行 + 彩色小徽标 + 文字在旁） */
html[data-mstyle="classic"] .menu-item { background-color:transparent; background-image:none; box-shadow:none;
  border-left:4px solid transparent; border-radius:0; margin:0; padding:8px 14px; gap:10px; font-size:13.5px; font-weight:normal; color:#cbd5e1; }
html[data-mstyle="classic"] .menu-item:hover { background-color:var(--side-hi); filter:none; transform:none; box-shadow:none; }
html[data-mstyle="classic"] .menu-item:active { transform:none; box-shadow:none; }
html[data-mstyle="classic"] .menu-item.active { background-color:var(--side-hi); filter:none; outline:none; font-weight:bold; }
html[data-mstyle="classic"] .menu-item .mi { width:26px; height:26px; border-radius:7px; font-size:14px; box-shadow:none; }
html[data-mstyle="classic"] .menu-item.active .mi { box-shadow:0 0 0 2px rgba(255,255,255,.35); }
html[data-side="light"][data-mstyle="classic"] .menu-item { color:var(--txt); }
html[data-side="light"][data-mstyle="classic"] .menu-item.active { color:var(--pri); }
html[data-side="pri"][data-mstyle="classic"] .menu-item { color:rgba(255,255,255,.88); }
.main { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar { background:var(--card); border-bottom:1px solid var(--line); padding:12px 22px; display:flex; align-items:center; justify-content:space-between; gap:10px; position:sticky; top:0; z-index:50; overflow:hidden; }
.topbar .title { min-width:0; }
.topbar .title #tbTitle { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.userbox { flex-shrink:0; }
.topbar .title { font-size:17px; font-weight:bold; display:flex; align-items:center; gap:10px; }
.topbar .title .dot { width:10px; height:10px; border-radius:50%; }
.userbox { display:flex; align-items:center; gap:12px; font-size:13px; color:var(--sub); }
.userbox .role { background:var(--pri-soft); color:var(--pri); padding:2px 8px; border-radius:10px; font-size:12px; }
.content { padding:18px 22px; flex:1; }

/* ---------- common ---------- */
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; margin-bottom:16px; }
.card h3 { font-size:15px; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.row { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.fld { display:flex; flex-direction:column; gap:4px; margin-bottom:8px; }
.fld label { font-size:12px; color:var(--sub); }
/* 发货/退货记录弹窗里的客户联系信息行：自适应宽度，手机上自动换行不溢出 */
.sf-info { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.sf-info .fld { flex:1 1 120px; min-width:0; max-width:100%; }
.sf-info .fld input { width:100%; }
@media (max-width:640px){ .sf-info .fld { flex:1 1 100%; } .sf-sub { display:none; } }
/* 发货/退货明细表：型号列优先给足宽度，型号长也能整条看清（按百分比分栏，手机一屏放得下） */
.sf-tbl td { padding:6px 5px; }
.sf-tbl .sf-model { font-size:13px; letter-spacing:0; }
.sf-tbl .sf-qty { text-align:right; }
.sf-tbl td:last-child { padding:6px 2px; text-align:center; }
.sf-tbl .sf-del { padding:4px 6px; min-width:0; }
@media (max-width:640px){
  .sf-tbl th, .sf-tbl td { font-size:12px; }
  .sf-tbl .sf-model, .sf-tbl .sf-remark { font-size:12.5px; padding:7px 6px; }
}
input,select,textarea { border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:13.5px; font-family:inherit; background:#fff; color:var(--txt); outline:none; }
input:focus,select:focus,textarea:focus { border-color:var(--pri); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.btn { border:none; border-radius:8px; padding:9px 16px; font-size:13.5px; cursor:pointer; background:#e2e8f0; color:var(--txt); font-family:inherit; white-space:nowrap; }
.btn:hover { filter:brightness(.95); }
.btn-pri { background:var(--pri); color:#fff; }
.btn-ok { background:var(--ok); color:#fff; }
.btn-warn { background:var(--warn); color:#fff; }
.btn-err { background:var(--err); color:#fff; }
.btn-sm { padding:4px 10px; font-size:12.5px; border-radius:6px; }
.btn-ghost { background:transparent; border:1px solid var(--line); }
/* v126 默认自动布局：列宽按内容自适应，一行显示不换行；拖过列宽后切回 fixed + 超出省略号 */
table.tbl { width:100%; border-collapse:collapse; background:#fff; table-layout:auto; }
/* 全站表格统一框线：表头与单元格都有边线 */
.tbl th { background:#f8fafc; font-size:12.5px; color:var(--sub); text-align:left; padding:9px 8px;
  border:1px solid var(--line); position:relative; white-space:nowrap; line-height:1.35; }
.tbl td { padding:8px; border:1px solid var(--line); font-size:13px; vertical-align:top;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tbl th.num, .tbl td.num { text-align:right; }
.tbl tr:hover td { background:#f8fafc; }
.tbl .num { text-align:right; font-variant-numeric:tabular-nums; }
/* 操作列按钮不拆行 */
.tbl td:last-child { white-space:nowrap; }
/* 可点击排序表头 */
.tbl th.th-sort { cursor:pointer; user-select:none; white-space:nowrap; }
.tbl th.th-sort:hover { color:var(--pri); background:#eff6ff; }
.tbl th.th-sort span { font-size:10px; color:#94a3b8; margin-left:2px; }
.tbl th.th-sort:hover span { color:var(--pri); }
.col-resizer { position:absolute; right:0; top:0; width:7px; height:100%; cursor:col-resize; }
.col-resizer:hover { background:rgba(37,99,235,.25); }
/* 表头拖拽调列宽手柄（makeColsResizable 注入，双击恢复自动） */
.tbl thead th { position:relative; }
.tbl thead th .rz { position:absolute; top:0; right:0; width:8px; height:100%; cursor:col-resize; z-index:3; }
.tbl thead th .rz::after { content:''; position:absolute; top:22%; bottom:22%; right:1px; width:1px; background:#cbd5e1; }
.tbl thead th .rz:hover, .tbl thead th .rz.on { background:linear-gradient(90deg,transparent,rgba(37,99,235,.2)); }
.tbl thead th .rz:hover::after, .tbl thead th .rz.on::after { background:var(--pri); width:2px; }
/* 指针落在表头上就把列边界点亮，提示这里能拖 */
.tbl thead th:hover .rz::after { background:#93c5fd; }
.sl-tip { margin:4px 0 0; font-size:12px; }
@media (max-width:640px) { .sl-tip { display:none; } }
.tag { display:inline-block; padding:2px 9px; border-radius:10px; font-size:11.5px; }
.tag-ok { background:#dcfce7; color:#15803d; }
.tag-warn { background:#ffedd5; color:#c2410c; }
.tag-err { background:#fee2e2; color:#b91c1c; }
.tag-info { background:#dbeafe; color:#1d4ed8; }
.tag-gray { background:#f1f5f9; color:#475569; }
.tbl-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.empty { text-align:center; color:var(--sub); padding:30px; font-size:13px; }
.muted { color:var(--sub); font-size:12px; }
.link { color:var(--pri); cursor:pointer; }
.total-bar { display:flex; justify-content:space-between; align-items:center; padding:10px 4px 0; font-size:13px; color:var(--sub); }

/* ---------- dashboard ---------- */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; margin-bottom:16px; }
.stat-card { border-radius:12px; padding:14px 16px; color:#fff; cursor:pointer; transition:transform .12s; position:relative; overflow:hidden; }
.stat-card:hover { transform:translateY(-2px); }
.stat-card .v { font-size:26px; font-weight:bold; margin-top:4px; }
.stat-card .n { font-size:12.5px; opacity:.92; }
.stat-card .ic { position:absolute; right:12px; top:10px; font-size:26px; opacity:.35; }
.quick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
.quick-btn { border:1px solid var(--line); border-radius:10px; padding:12px 8px; text-align:center; cursor:pointer; background:#fff; transition:all .15s; }
.quick-btn:hover { border-color:var(--pri); box-shadow:0 4px 12px rgba(37,99,235,.12); }
.quick-btn .qi { font-size:22px; }
.quick-btn .qn { font-size:12.5px; margin-top:4px; }
.dash-cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:1000px){ .dash-cols{grid-template-columns:1fr;} }

/* ---------- dashboard v2 ---------- */
.dash-hero { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.dash-hero h2 { font-size:20px; letter-spacing:-.3px; }
.dash-hero p { color:var(--sub); font-size:12.5px; margin-top:5px; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(196px,1fr)); gap:12px; margin-bottom:16px; }
/* 宽屏固定 4 列：8 个指标卡刚好两行整齐排布 */
@media (min-width:1180px){ .kpi-grid { grid-template-columns:repeat(4,1fr); } }
.kpi { background:#fff; border:1px solid var(--line); border-radius:12px; padding:13px 15px 12px 17px;
  cursor:pointer; transition:all .15s; position:relative; overflow:hidden;
  display:flex; flex-direction:column; min-height:104px; }
.kpi:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(15,23,42,.08); border-color:#cbd5e1; }
.kpi::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--kc,#2563eb); }
.kpi .kh { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--sub); }
.kpi .kic { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:14px; background:var(--kb,#eff6ff); }
.kpi .kv { font-size:26px; font-weight:700; margin:9px 0 4px; letter-spacing:-.6px; font-variant-numeric:tabular-nums; line-height:1.1; white-space:nowrap; }
.kpi .ku { font-size:12px; color:var(--sub); font-weight:400; margin-left:4px; letter-spacing:0; }
.kpi .kt { font-size:11.5px; color:var(--sub); display:block; line-height:1.5; margin-top:auto; word-break:break-word; }
.kpi .kt .up { color:#dc2626; font-weight:600; }
.kpi .kt .down { color:#16a34a; font-weight:600; }
.panel { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px 16px; }
.panel-hd { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; gap:8px; }
.panel-hd h3 { font-size:14px; font-weight:600; display:flex; align-items:center; gap:6px; }
.panel-hd .more { font-size:12px; color:var(--pri); cursor:pointer; white-space:nowrap; }
.panel-hd .more:hover { text-decoration:underline; }
.dash-grid { display:grid; gap:16px; margin-bottom:16px; }
.g-2-1 { grid-template-columns:1.55fr 1fr; }
.g-1-1 { grid-template-columns:1fr 1fr; }
.g-1-2 { grid-template-columns:1fr 1.55fr; }
@media (max-width:1000px){ .g-2-1,.g-1-1,.g-1-2 { grid-template-columns:1fr; } }
.legend { display:flex; flex-direction:column; gap:9px; font-size:12.5px; }
.legend .li { display:flex; align-items:center; gap:8px; min-width:0; }
.legend .dotc { width:9px; height:9px; border-radius:3px; flex-shrink:0; }
.legend .ln { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.legend .lv { margin-left:auto; font-variant-numeric:tabular-nums; color:var(--txt); font-weight:600; }
.legend .lp { width:38px; text-align:right; color:var(--sub); font-variant-numeric:tabular-nums; }
.donut-wrap { display:flex; align-items:center; gap:16px; }
@media (max-width:560px){ .donut-wrap { flex-direction:column; align-items:stretch; gap:10px; } .donut-wrap canvas { margin:0 auto; } }
.rank-row { display:flex; align-items:center; gap:9px; padding:8px 0; font-size:12.5px; border-bottom:1px dashed #f1f5f9; }
.rank-row:last-child { border-bottom:0; }
.rank-row .idx { width:20px; height:20px; border-radius:6px; background:#f1f5f9; color:var(--sub);
  display:flex; align-items:center; justify-content:center; font-size:11px; flex-shrink:0; font-weight:600; }
.rank-row .idx.top1 { background:#fee2e2; color:#b91c1c; }
.rank-row .idx.top2 { background:#ffedd5; color:#c2410c; }
.rank-row .idx.top3 { background:#fef3c7; color:#a16207; }
.rank-row .rn { width:34%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-row .rbar { flex:1; height:8px; background:#f1f5f9; border-radius:5px; overflow:hidden; min-width:40px; }
.rank-row .rbar i { display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,#93c5fd,#2563eb); }
.rank-row .rv { width:66px; text-align:right; font-variant-numeric:tabular-nums; font-weight:600; }
.todo-item { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px dashed #f1f5f9; cursor:pointer; }
.todo-item:last-child { border-bottom:0; }
.todo-item:hover { background:#f8fafc; }
.todo-item .ti { width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.todo-item .tt { flex:1; font-size:13px; }
.todo-item .tv { font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.todo-item .tu { font-size:11px; font-weight:400; color:var(--sub); margin-left:2px; }
.ck { display:flex; align-items:center; gap:7px; font-size:13px; padding:3px 0; cursor:pointer; color:var(--txt); }
.ck input { width:15px; height:15px; accent-color:var(--pri); }
.qk-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(136px,1fr)); gap:8px 14px;
  padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.qk-grid .ck { padding:4px 6px; border-radius:8px; }
.qk-grid .ck:hover { background:#eef4ff; }
@media (max-width:560px){ .qk-grid { grid-template-columns:1fr 1fr; gap:6px 10px; padding:10px; } }
@media (max-width:760px){
  .content { padding:14px 12px; }
  .dash-hero h2 { font-size:17px; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); gap:9px; }
  .kpi { padding:11px 12px 10px 14px; min-height:92px; }
  .kpi .kv { font-size:22px; }
  /* 产品资料管理：手机上表格保持可读宽度横向滚动，搜索框不被按钮挤扁 */
  #pmKw { min-width:0; }
  #pmTable { min-width:820px; }
  .panel { padding:12px; }
  /* 明细表格在手机上改为卡片式逐行编辑（编码/型号/名称/数量/仓库/库位/批号全部可见） */
  #ibTable, #obTable, #icTable { min-width:0; display:block; table-layout:auto; }
  #ibTable thead, #obTable thead, #icTable thead { display:none; }
  #ibTable tbody, #obTable tbody, #icTable tbody { display:block; }
  #ibTable tbody tr, #obTable tbody tr, #icTable tbody tr {
    display:grid; grid-template-columns:1fr 1fr; gap:9px 10px;
    padding:11px 11px 9px; margin:0 0 10px; background:#f8fafc;
    border:1px solid var(--line); border-radius:10px;
  }
  #ibTable tbody tr:last-child, #obTable tbody tr:last-child, #icTable tbody tr:last-child { margin-bottom:0; }
  #ibTable tbody td, #obTable tbody td, #icTable tbody td {
    display:flex; flex-direction:column; gap:4px; min-width:0;
    padding:0; border:0; font-size:13px; word-break:normal;
  }
  #ibTable tbody td::before, #obTable tbody td::before, #icTable tbody td::before {
    content:attr(data-l); font-size:11px; color:var(--sub); line-height:1.1; white-space:nowrap;
  }
  #ibTable tbody td input, #obTable tbody td input, #icTable tbody td input,
  #ibTable tbody td select, #obTable tbody td select, #icTable tbody td select {
    width:100% !important; min-width:0 !important; box-sizing:border-box;
  }
  #ibTable .it-c-code, #obTable .it-c-code, #icTable .it-c-code,
  #ibTable .it-c-model, #obTable .it-c-model, #icTable .it-c-model,
  #ibTable .it-c-name, #obTable .it-c-name, #icTable .it-c-name,
  #ibTable td[data-l="备注"], #obTable td[data-l="备注"], #icTable td[data-l="备注"] { grid-column:1 / -1; }
  #ibTable .it-c-del, #obTable .it-c-del, #icTable .it-c-del { grid-column:1 / -1; align-items:flex-end; }
  #ibTable .it-c-del::before, #obTable .it-c-del::before, #icTable .it-c-del::before { display:none; }
  #ibTable .it-c-del .btn, #obTable .it-c-del .btn, #icTable .it-c-del .btn { padding:5px 14px; font-size:12px; }
  #bmTable { min-width:940px; }
  /* 供应商/客户档案列多，手机上保持可读宽度横向滚动 */
  #supTable { min-width:920px; }
  #cuTable { min-width:900px; }
  #icListTable { min-width:900px; }
  /* 长表单弹窗：底部操作条吸底，随时可保存 */
  .modal-actions {
    position:sticky; bottom:0; z-index:2; background:#fff;
    display:grid; grid-template-columns:auto 1fr; gap:8px;
    margin:14px -14px -16px !important; padding:10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top:1px solid var(--line); box-shadow:0 -6px 14px rgba(15,23,42,.06);
  }
  .modal-actions #icSaveIn { grid-column:1 / -1; }
  .modal-actions .btn { white-space:nowrap; padding:10px 12px; font-size:13px; }
}
@media (max-width:560px){
  .quick-grid { grid-template-columns:repeat(4,1fr); gap:8px; }
  .quick-btn { padding:10px 2px; }
  .quick-btn .qi { font-size:19px; }
  .quick-btn .qn { font-size:10.5px; margin-top:3px; }
  .panel-hd h3 { font-size:13px; }
  .panel-hd .more { font-size:11.5px; }
  .legend { font-size:12px; }
  .rank-row .rn { width:32%; }
}

/* ---------- 移动端折叠侧边栏 ---------- */
.menu-toggle { display:none; }
.side-mask { display:none; }
.side-head { display:none; }
@media (max-width:900px){
  .menu-toggle { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
    border-radius:9px; background:#f1f5f9; border:1px solid var(--line); font-size:17px; cursor:pointer; flex-shrink:0; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:208px; height:100vh;
    transform:translateX(-100%); transition:transform .22s ease; z-index:130;
    box-shadow:6px 0 34px rgba(15,23,42,.35); }
  .sidebar.open { transform:translateX(0); }
  .side-mask { display:block; position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:125;
    opacity:0; pointer-events:none; transition:opacity .2s; }
  .side-mask.show { opacity:1; pointer-events:auto; }
  .side-head { display:flex; justify-content:flex-end; padding:8px 10px 0; }
  .side-head button { background:none; border:none; color:#94a3b8; font-size:20px; cursor:pointer; padding:2px 6px; }
  .topbar { padding:10px 12px; gap:8px; }
  .topbar .title { font-size:15px; gap:7px; }
  .userbox { gap:7px; font-size:12px; }
  .userbox > .uname { display:none; }
  .userbox .role { font-size:11px; padding:2px 6px; }
  .userbox .btn-sm { padding:3px 8px; font-size:12px; }
  .content { padding:12px 10px; }
}
@media (max-width:640px){
  .userbox .role { display:none; }
  .card h3 { flex-wrap:wrap; row-gap:8px; }
  .card h3 > .muted { display:none; }
  #lfCode, #lfModel, #lfName, #lfCat, #lfSup, #lfPo, #lfQty, #lfDate, #lfCopies { width:100% !important; }
  .lbl-card .row > .fld { flex:1 1 140px; min-width:0; }
}

/* ---------- sidebar colors ---------- */
.mc-blue,.mi.mc-blue{background-color:#2563eb} .mc-cyan,.mi.mc-cyan{background-color:#0891b2} .mc-violet,.mi.mc-violet{background-color:#7c3aed}
.mc-green,.mi.mc-green{background-color:#059669} .mc-amber,.mi.mc-amber{background-color:#d97706} .mc-red,.mi.mc-red{background-color:#dc2626}
.mc-orange,.mi.mc-orange{background-color:#ea580c} .mc-purple,.mi.mc-purple{background-color:#9333ea} .mc-teal,.mi.mc-teal{background-color:#0d9488}
.mc-indigo,.mi.mc-indigo{background-color:#4f46e5} .mc-sky,.mi.mc-sky{background-color:#0284c7} .mc-lime,.mi.mc-lime{background-color:#65a30d}
.mc-brown,.mi.mc-brown{background-color:#b45309} .mc-pink,.mi.mc-pink{background-color:#be185d} .mc-slate,.mi.mc-slate{background-color:#475569}
.mc-rose,.mi.mc-rose{background-color:#e11d48} .mc-gray,.mi.mc-gray{background-color:#334155} .mc-stone,.mi.mc-stone{background-color:#64748b} .mc-olive,.mi.mc-olive{background-color:#78716c}

/* ---------- modal ---------- */
.modal-mask { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:200; display:flex; align-items:flex-start; justify-content:center; padding:40px 16px; overflow-y:auto; }
.modal { background:#fff; border-radius:14px; width:680px; max-width:100%; min-width:0; padding:20px 22px; box-shadow:0 24px 60px rgba(0,0,0,.3); }
.modal.wide { width:920px; }
.modal.xwide { width:1140px; }
/* 质量台账：列多，按内容自适应，列收窄时文字自动换行 */
table.tbl.auto { table-layout:auto; min-width:940px; }
.modal h3 { margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; }
.modal .x { cursor:pointer; color:var(--sub); font-size:18px; border:none; background:none; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:14px; }
.loc-hint { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 10px;
  padding:9px 12px; background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; border-radius:9px; font-size:12.5px; }
.loc-hint input { height:30px; width:150px; }
.loc-hint b { white-space:nowrap; }
@media (max-width:760px){
  .loc-hint { display:flex; flex-direction:column; align-items:stretch; gap:7px; }
  .loc-hint b { white-space:normal; }
  .loc-hint input { width:100% !important; height:32px; }
  .loc-hint .btn { width:100%; }
}

/* ---------- toast ---------- */
#toastRoot { position:fixed; top:18px; left:50%; transform:translateX(-50%); z-index:400; display:flex; flex-direction:column; gap:8px; }
.toast { padding:10px 18px; border-radius:10px; color:#fff; font-size:13.5px; box-shadow:0 8px 24px rgba(0,0,0,.2); animation:tin .2s; }
@keyframes tin { from{opacity:0;transform:translateY(-8px)} to{opacity:1} }
.toast.ok{background:var(--ok)} .toast.err{background:var(--err)} .toast.warn{background:var(--warn)} .toast.info{background:#334155}

/* ---------- scan ---------- */
.scan-video-wrap { position:relative; background:#000; border-radius:10px; overflow:hidden; width:100%; max-width:420px; height:200px; margin:0 auto; }
.scan-video-wrap video { width:100%; height:100%; object-fit:cover; display:block; }
.scan-shot { border:1px dashed var(--line); border-radius:12px; padding:18px 12px; text-align:center; background:#f8fafc; }
.scan-line { position:absolute; left:8%; right:8%; top:0; height:2px; background:#22c55e; box-shadow:0 0 12px #22c55e; animation:scanmv 2s linear infinite; }
@keyframes scanmv { 0%{top:10%} 50%{top:88%} 100%{top:10%} }

/* ---------- location board ---------- */
.loc-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:5px; }
.loc-card { border:1px solid var(--line); border-radius:8px; padding:6px 2px; cursor:pointer; text-align:center; background:#fff; transition:all .15s;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; overflow:hidden; min-width:0; }
.loc-card:hover { border-color:var(--pri); box-shadow:0 4px 14px rgba(37,99,235,.14); }
.loc-card .lc { font-size:15px; font-weight:700; color:var(--pri); word-break:break-all; line-height:1.25; }
.loc-card .li { font-size:9.5px; color:var(--sub); line-height:1.3; word-break:break-all; }
@media (max-width:600px){ .loc-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:6px; } .loc-card { padding:9px 4px; } .loc-card .lc { font-size:14px; } .loc-card .li { font-size:10.5px; } }
.wh-title { font-size:14px; font-weight:bold; margin:14px 0 8px; color:#334155; }
.wh-title[data-whhd] { cursor:pointer; user-select:none; display:flex; align-items:center; gap:6px; }
.wh-title[data-whhd]:hover { color:var(--pri); }
.wh-title[data-whhd] .rk-arrow { margin-left:auto; font-size:11px; color:var(--sub); transition:transform .15s; }
.wh-title[data-whhd].open .rk-arrow { transform:rotate(90deg); }
.wh-body { display:none; }
.wh-body.open { display:block; }
/* 货架方块：一排 5 个、两行高的方形（名称+库位数上下排），点开的货架自动占满整行（内部层并排像库位看板） */
.wh-racks { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; align-items:start; margin:0 0 6px; }
/* 库位看板货架方块：一排 3 个（小屏沿用 .wh-racks 的 2/1 列降级） */
.lb-racks { grid-template-columns:repeat(3,minmax(0,1fr)); }
.lb-racks .rack-hd .rk-sum { white-space:normal; line-height:1.5; }
.wh-racks .rack { margin:0; border-radius:10px; }
.wh-racks .rack-hd { position:relative; flex-direction:column; align-items:flex-start; gap:4px; padding:12px 12px 11px; font-size:13.5px; }
.wh-racks .rack-hd .rk-tools { display:flex; align-items:center; gap:5px; min-width:0; }
.wh-racks .rack-hd .rk-sum { font-size:11.5px; white-space:nowrap; }
.wh-racks .rack-hd .rk-arrow { position:absolute; top:11px; right:10px; margin-left:0; }
.wh-racks .rack-hd .rk-mv { padding:0 7px; font-size:11.5px; }
.wh-racks .rack.open { grid-column:1 / -1; }
.wh-racks .rack.open .rack-hd { flex-direction:row; align-items:center; gap:5px; font-size:15px; padding:10px 14px; }
.wh-racks .rack.open .rack-hd .rk-arrow { position:static; }
.wh-racks .rack.open .rack-hd .rk-mv { padding:1px 8px; font-size:12px; }
.wh-racks .rack-bd { padding:8px 10px 12px; }
@media (max-width:900px){ .wh-racks { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px){ .wh-racks { grid-template-columns:1fr; } }
/* 货架折叠 */
.rack { border:1px solid var(--line); border-radius:12px; margin:10px 0; background:#fff; overflow:hidden; }
.rack-hd { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 14px; cursor:pointer; font-weight:bold; font-size:15px; color:#334155; background:#f8fafc; user-select:none; }
.rack-hd:hover { background:#eef2f7; }
.rack-hd .rk-sum { font-weight:normal; font-size:12px; color:var(--sub); }
.rack-hd .rk-arrow { margin-left:auto; font-size:11px; color:var(--sub); transition:transform .15s; }
.rack.open .rack-hd .rk-arrow { transform:rotate(90deg); }
.rack-bd { display:none; padding:2px 14px 14px; }
.rack.open .rack-bd { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-start; justify-content:flex-start; }
/* 层 = 并排小模块（一行 2 层，填充色底，不足 8 个靠左） */
.rk-layer { flex:0 0 calc(50% - 6px); min-width:0; background:#f1f5f9; border:1px solid var(--line); border-radius:12px; padding:8px 10px 10px; }
.rk-layer-t { display:flex; align-items:center; gap:5px; font-size:12px; font-weight:bold; color:var(--pri); margin:0 0 7px; cursor:pointer; user-select:none; }
.rk-layer-t:hover { text-decoration:underline; }
.rk-layer-t .rk-arrow { margin-left:0; font-size:9px; }
.rk-layer .loc-grid { display:none; }
.rk-layer.open .loc-grid { display:grid; }
.rk-layer.open .rk-layer-t .rk-arrow { transform:rotate(90deg); }
@media (max-width:900px){ .rk-layer { flex:0 0 100%; } }

/* ---------- stars ---------- */
.stars { color:#f59e0b; letter-spacing:2px; cursor:pointer; font-size:15px; white-space:nowrap; }

/* ---------- print ---------- */
#printArea { display:none; }
/* ---------- 查看权限（只读）：被禁用的按钮统一灰化，避免红色删除键看起来还能点 ---------- */
#content button:disabled, #modalMask button:disabled {
  filter:grayscale(.92); opacity:.45; cursor:not-allowed; box-shadow:none;
}
#content button:disabled:hover, #modalMask button:disabled:hover { transform:none; box-shadow:none; }
/* 只读禁用后的输入框：保留清晰文字，看得出内容但改不了 */
#content input:disabled, #content select:disabled, #content textarea:disabled {
  background:#f8fafc !important; color:#475569 !important; -webkit-text-fill-color:#475569 !important;
  opacity:1; cursor:not-allowed;
}
#content input:disabled::placeholder { color:#94a3b8; -webkit-text-fill-color:#94a3b8; }
/* 出入库页面（查看权限）：按钮统一灰底，一眼看出不能点 */
#content.ro-frozen button:disabled {
  background:#e2e8f0 !important; border-color:#cbd5e1 !important; color:#8a97a8 !important; filter:none; opacity:1;
}

@media print {
  body.print-mode #app, body.print-mode #modalRoot, body.print-mode #toastRoot { display:none !important; }
  body.print-mode #printArea { display:block !important; }
  body { background:#fff; }
}
/* 送货单（表格版式：整体外框 + 逐格可编辑） */
/* A4 纸张预览：210 × 297mm，四周 10mm 页边距，与打印结果一致 */
.dv-sheet { background:#eef2f7; border-radius:10px; padding:14px 0; }
.dn-paper { width:210mm; min-height:297mm; margin:0 auto; background:#fff; padding:10mm; box-sizing:border-box;
  box-shadow:0 8px 24px rgba(15,23,42,.16); }
.dn { width:100%; margin:0 auto; color:#000; font-size:12.5px; background:#fff; border:1.6px solid #000; box-sizing:border-box; }
.dn .dn-head { text-align:center; padding:7px 0 5px; border-bottom:1px solid #000; }
.dn .dn-company { font-size:21px; font-weight:700; letter-spacing:5px; line-height:1.3; }
.dn .dn-title { font-size:17px; font-weight:700; letter-spacing:11px; margin-top:3px; }
.dn table { width:100%; border-collapse:collapse; table-layout:fixed; }
.dn td, .dn th { border:1px solid #000; padding:4px 6px; font-size:12.5px; vertical-align:middle; word-break:break-all; }
.dn td.lb { background:#fff; font-weight:700; white-space:nowrap; }
.dn td.lb-b { background:#d6e0f2; }
.dn-info td { height:26px; }
.dn-tbl thead th { background:#dbe4f4; font-weight:700; text-align:center; height:26px; }
.dn-tbl td { height:25px; text-align:center; }
.dn-tbl td.spec { text-align:left; }
.dn-tbl td.spec .spec-t { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:calc(var(--dnfs, 12.5px) * 0.84); line-height:1.3; }
.dn-tbl td[data-c="remark"] { font-size:calc(var(--dnfs, 12.5px) * 0.84); }
.dn-tbl tbody td:first-child { font-size:calc(var(--dnfs, 12.5px) * 0.84); padding:4px 2px; }
/* v159 送货单：列宽/行高拖拽 + 删行删列 + 字号变量 */
.dn th, .dn td { position:relative; }
.dn .col-h { position:absolute; right:-3px; top:0; width:8px; height:100%; cursor:col-resize; z-index:5; }
.dn .col-h::after { content:''; position:absolute; right:2px; top:20%; height:60%; width:3px; background:#b9c5d8; border-radius:2px; }
.dn th .col-h:hover::after { background:#4a7ddc; }
.dn th .col-x { position:absolute; right:3px; top:2px; font-size:10px; line-height:1; color:#d33; cursor:pointer; font-style:normal; opacity:.5; }
.dn th .col-x:hover { opacity:1; }
.dn .dn-op { width:26px; background:#f6f8fc; white-space:nowrap; }
.dn td.dn-op { position:relative; text-align:center; }
.dn .dn-op .row-x { cursor:pointer; color:#d33; font-size:12px; user-select:none; }
.dn .dn-op .row-h { position:absolute; left:0; bottom:0; width:100%; height:7px; cursor:row-resize; }
.dn .dn-op .row-h::after { content:''; position:absolute; left:20%; bottom:2px; width:60%; height:3px; background:#b9c5d8; border-radius:2px; }
.dn .dn-op .row-h:hover::after { background:#4a7ddc; }
.dn td, .dn th { font-size:var(--dnfs, 12.5px); }
.dn-tbl tfoot td { height:26px; background:#fafbfe; }
.dn-sign td { height:32px; }
.dn td[contenteditable] { cursor:text; }
.dn td[contenteditable]:hover { background:#eef6ff; }
.dn td[contenteditable]:focus { outline:2px solid #93c5fd; outline-offset:-2px; background:#f5faff; }
.dn .dn-note { text-align:center; font-size:12px; padding:6px 0; border-top:1px solid #000; letter-spacing:1px; }
@media print {
  .dn { width:100%; border-width:1.2px; }
  .dn td[contenteditable]:hover, .dn td[contenteditable]:focus { background:transparent; outline:none; }
  .dn-tbl tr { page-break-inside: avoid; }
  .dn-info { page-break-after: avoid; }
  .dn-head { page-break-after: avoid; }
  .dn .col-h, .dn .col-x, .dn .row-h { display:none !important; }
}
.dv-thumb { max-height:120px; border:1px solid var(--line); border-radius:8px; margin-top:8px; }
/* v163 盘点外联卡：统计 + 链接块（对齐参考样式） */
.pd-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.pd-stat { border:1px solid var(--line); border-radius:10px; padding:10px 14px; background:#fbfcfe; }
.pd-stat b { font-size:22px; line-height:1.2; }
.pd-stat div { font-size:13px; margin-top:2px; }
.pd-stat .muted { font-size:11.5px; margin-top:2px; }
.pd-link { display:flex; gap:14px; align-items:center; border:1px solid var(--line); border-radius:10px; padding:10px 14px; margin-top:10px; flex-wrap:wrap; }
@media (max-width:760px) { .pd-stats { grid-template-columns:repeat(2,1fr); } }
/* 标签：物料标识卡模板（尺寸由 JS 内联，默认 80×60mm） */
.label-card { background:#fff; color:#000; border:1.4px solid #000; margin:0 auto; box-sizing:border-box; line-height:1.22; overflow:hidden; }
.label-card table { width:100%; height:100%; border-collapse:collapse; table-layout:fixed; }
.label-card td { border:1px solid #000; padding:2px 3px; vertical-align:middle; word-break:break-all; }
.label-card .lb-head { text-align:center; font-weight:bold; letter-spacing:1px; line-height:1.3; }
.label-card .lb-l { font-weight:bold; text-align:center; white-space:nowrap; }
.label-card .lb-qr { text-align:center; padding:2px 1px; }
.label-card .lb-qr img { display:block; margin:0 auto; }
.label-card .lb-qty { font-weight:700; }
.label-card .lb-date { text-align:center; line-height:1.1; white-space:nowrap; }
.label-card .lb-box { display:block; text-align:center; color:#333; white-space:nowrap; line-height:1.05; }
/* 分箱提示条：总数量 + 箱数 → 每箱数量 */
.split-bar { margin:6px 0 2px; padding:7px 11px; background:#ecfdf5; border:1px solid #a7f3d0;
  border-radius:8px; color:#065f46; font-size:12.5px; line-height:1.6; }
.split-bar b { color:#047857; }
/* 送货标签（仅送货单使用：供应商名称/订单号/客户料号/物料名称/内部编号/数量/出货日期） */
.dv-label td { line-height:1.16; padding:1.4px 3px; }
.dv-label .dv-lb-h td { position:relative; text-align:center; padding:1.4mm 2mm; background:#fff; }
.dv-label .dv-lb-t { font-weight:700; letter-spacing:2px; line-height:1.2; }
.dv-label .dv-lb-no { position:absolute; right:2mm; top:50%; transform:translateY(-50%); font-weight:400; color:#333; }
.dv-label .dv-lb-qty { font-weight:700; text-align:left; }
/* 标签内容格文字左对齐（订单号/客户料号/物料名称/内部编号/数量等），表头与左侧栏名保持居中 */
.dv-label tr:not(.dv-lb-h) td:not(.lb-l) { text-align:left; }
/* 标签内容可直接点改：悬停/聚焦给出明显提示（打印稿不带 contenteditable，不影响出纸） */
.dv-label td[data-f] { cursor:text; }
.dv-label td[data-f]:hover { background:#f0f9ff; box-shadow:inset 0 0 0 1px #7dd3fc; }
.dv-label td[data-f]:focus { background:#fff; outline:none; box-shadow:inset 0 0 0 2px #0ea5e9; }
.dv-lb-list input { text-align:center; }
/* 表格内的可编辑文字列 */
.dvlb .dv-lb-list input[type=text] { width:100%; min-width:0; padding:6px 5px; font-size:13px; text-align:left; }
/* 送货单标签弹窗：宽版 + 表格可拉伸（列宽可拖、行高可拉） */
.modal.dvlb { width:1120px; }
/* 标签预览区：一次最多显示 6 张，按宽度自动缩放到一行 3 张 */
.dvlb #dvLbPv { min-height:140px; }
.dvlb .split-bar { margin:5px 0 2px; padding:5px 11px; font-size:12px; }
.dvlb .dv-lb-tip { margin:2px 0 0; }
.modal-mask.dvlb-mask { padding:20px 16px; }
/* 弹窗较长时「打印标签」固定在可见区域底部，不用滚到底 */
.modal.dvlb > div:last-child { position:sticky; bottom:0; background:#fff; padding:10px 0 6px;
  box-shadow:0 -8px 12px -8px rgba(15,23,42,.18); z-index:3; }
@media (max-width:640px) {
  .dvlb #dvLbPv { min-height:180px; max-height:58vh; }
  .modal-mask.dvlb-mask { padding:10px 8px 0; }
}
/* 批量核对弹窗：整块限高 + 表格区域可拖拽拉长，尽量多显示行 */
.modal.sbmodal { display:flex; flex-direction:column; height:calc(100vh - 48px); max-height:none; padding:16px 18px; }
.modal.sbmodal .sb-hd { flex:0 0 auto; margin-bottom:10px; }
.modal.sbmodal .sb-wrap { flex:1 1 auto; min-height:160px; max-height:none; overflow:auto; }
.modal.sbmodal.sb-tall { height:calc(100vh - 16px); }
.modal.sbmodal .modal-actions { flex:0 0 auto; margin-top:8px; }
.modal.sbmodal #sbTable td { padding:2px 6px; }
.modal.sbmodal #sbTable input { height:26px; padding:2px 6px; font-size:13px; }
.modal.sbmodal #sbZoom { margin-right:8px; }
.modal-mask.sb-mask { padding:20px 16px 24px; }
.modal-mask.sb-mask.tall { padding:4px 8px 6px; }
.dvlb .dv-lb-list { margin-top:6px; height:auto; max-height:260px; min-height:96px; overflow:auto; resize:vertical; }
.dvlb .dv-lb-list table { table-layout:fixed; width:100%; max-width:100%; }
.dvlb .dv-lb-list th { position:relative; white-space:nowrap; overflow:hidden; }
.dvlb .dv-lb-list th .rz { position:absolute; top:0; right:0; width:7px; height:100%; cursor:col-resize; z-index:2; }
.dvlb .dv-lb-list th .rz:hover, .dvlb .dv-lb-list th .rz.on {
  background:linear-gradient(180deg, rgba(37,99,235,0), rgba(37,99,235,.35), rgba(37,99,235,0)); }
.dvlb .dv-lb-list input[type=number] { width:100%; min-width:0; padding:6px 4px; }
.dvlb .dv-lb-list input[type=number]::-webkit-inner-spin-button,
.dvlb .dv-lb-list input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.dvlb .dv-lb-list input[type=number] { -moz-appearance:textfield; appearance:textfield; }
.dvlb .dv-lb-list td .clip1 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dvlb .dv-lb-list td .clip3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; line-height:1.4; cursor:pointer; }
.dvlb .dv-lb-list td .clip3.exp { display:block; -webkit-line-clamp:none; overflow:visible; }
.dvlb .dv-lb-list td.sp { font-size:12.5px; line-height:1.45; white-space:normal; }
.dvlb .dv-lb-tip { margin:4px 0 0; font-size:12px; }
@media (max-width:640px){
  /* 手机：隐藏品名规格列，让「拆分结果」不用横向滚动就能看到；输入框按列宽自适应 */
  .dv-lb-list th:nth-child(3), .dv-lb-list td:nth-child(3) { display:none; }
  .dv-lb-list table { min-width:0 !important; }
  .dv-lb-list th, .dv-lb-list td { padding:4px 3px; font-size:12.5px; }
  .dv-lb-list input { width:100% !important; padding:6px 2px; font-size:13px; }
  .dv-lb-list th:nth-child(5), .dv-lb-list th:nth-child(6) { white-space:nowrap; }
  /* 手机不显示列宽拖拽把手；固定列宽保证所有列都看得见、不出现横向滚动 */
  .dvlb .dv-lb-list th .rz { display:none; }
  .dvlb .dv-lb-list table { table-layout:fixed !important; width:100% !important; }
  .dvlb .dv-lb-list col { width:auto !important; }
  .dvlb .dv-lb-list th:nth-child(1) { width:34px !important; }
  .dvlb .dv-lb-list th:nth-child(2) { width:92px !important; }
  .dvlb .dv-lb-list th:nth-child(4),
  .dvlb .dv-lb-list th:nth-child(5) { width:74px !important; }
  .dvlb .dv-lb-list th:nth-child(6) { width:132px !important; }
  .dvlb .dv-lb-list { height:auto; max-height:300px; resize:none; }
  /* 发货记录：表格按最小宽度横向滚动，避免「内部型号」列被压成一字一行 */
  #slTable { min-width:860px; }
  #sbTable { min-width:980px; }
  /* 发货记录筛选：手机上每个条件占一行，输入框铺满 */
  #slFCus, #slFModel, #slFKw { width:100% !important; }
  #slFCus, #slFModel { max-width:100%; }
  #slFCus, #slFModel, #slFKw { min-width:0; }
  .sl-filters .fld { flex:1 1 100%; width:100%; }
}
/* 输入联想下拉 */
.sg { position:absolute; top:100%; left:0; z-index:80; display:none; min-width:280px; max-width:540px; max-height:250px;
  overflow:auto; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 14px 30px rgba(15,23,42,.16); }
.sg div { padding:6px 10px; cursor:pointer; font-size:13px; display:flex; gap:8px; align-items:baseline;
  border-bottom:1px solid #f8fafc; white-space:normal; }
.sg div:last-child { border-bottom:none; }
.sg div:hover { background:#eff6ff; }
.sg div b { font-weight:600; flex:0 0 auto; }
.sg div span { color:var(--sub); font-size:12px; flex:1 1 auto; min-width:0; word-break:break-all; }

/* ---------- 库存列表列宽 ---------- */
#invTable th:nth-child(1) { width:120px; }
#invTable th:nth-child(2) { width:138px; }
#invTable th:nth-child(3) { width:70px; }
#invTable th:nth-child(4) { width:156px; }
#invTable th:nth-child(5) { width:58px; }
#invTable th:nth-child(6) { width:68px; }
#invTable th:nth-child(7) { width:74px; }
#invTable th:nth-child(8) { width:68px; }
#invTable th:nth-child(9) { width:76px; }
#invTable th:nth-child(10) { width:52px; }
#invTable th:nth-child(11) { width:70px; }
#invTable th:nth-child(12) { width:74px; }
#invTable th:nth-child(13) { width:104px; }
/* 列宽只是默认值：拖动表头边缘收窄或窗口变窄时，单元格内容自动换行（不再截断省略） */

/* ---------- 二级页签（BOM备料 / 标签打印） ---------- */
.subtabs { display:flex; gap:8px; flex-wrap:wrap; background:var(--card); border-radius:12px; padding:8px 10px;
  box-shadow:0 1px 3px rgba(15,23,42,.07); margin-bottom:14px; }
.subtab { border:1px solid var(--line); background:#fff; color:#475569; border-radius:9px;
  padding:8px 14px; font-size:13.5px; font-weight:600; cursor:pointer; transition:all .15s; }
.subtab:hover { background:#f8fafc; border-color:#cbd5e1; }
.subtab.on { background:var(--pri); border-color:var(--pri); color:#fff; box-shadow:0 3px 10px rgba(15,23,42,.18); }

/* ---------- v148 基础设置：长方形按钮式分区（与二级页签同款样式） ---------- */
.set-hint { font-size:11.5px; color:var(--sub); margin:-6px 0 6px 2px; }
.set-btns { display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; background:var(--card); border-radius:12px; padding:10px 12px;
  box-shadow:0 1px 3px rgba(15,23,42,.07); margin-bottom:14px; }
.set-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; border:1px solid var(--line); background:#fff; color:#475569;
  border-radius:12px; padding:12px 6px 10px; font-size:12.5px; font-weight:600; cursor:grab; transition:box-shadow .15s,border-color .15s;
  font-family:inherit; line-height:1.3; text-align:center; user-select:none; -webkit-user-select:none; touch-action:none; }
.set-btn i { font-style:normal; font-size:26px; line-height:1; }
.set-btn .gsub { font-size:10.5px; color:var(--sub); }
.set-btn:hover { background:#f8fafc; border-color:#cbd5e1; }
.set-btn.on { background:var(--pri); border-color:var(--pri); color:#fff; box-shadow:0 3px 10px rgba(15,23,42,.18); }
.set-btn.on .gsub { color:rgba(255,255,255,.8); }
.set-btn.dragging { opacity:.8; box-shadow:0 10px 24px rgba(15,23,42,.28); cursor:grabbing; position:relative; z-index:5; }
.set-btn .tag { font-weight:600; font-size:10.5px; }
.set-btn.on .tag { background:rgba(255,255,255,.22); color:#fff; border-color:rgba(255,255,255,.35); }
.set-panel { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin:0 0 12px; }
.set-panel[hidden] { display:none; }

/* ---------- 箱号标签（78×58mm，尺寸由 JS 内联） ---------- */
.box-card { background:#fff; color:#000; box-sizing:border-box; display:flex; flex-direction:column;
  overflow:hidden; margin:0 auto; font-family:"Microsoft YaHei","PingFang SC",sans-serif; }
.box-card .box-head { text-align:center; font-weight:700; line-height:1.05; padding:.6mm 2.4mm 2.4mm;
  white-space:normal; word-break:break-all; overflow:hidden; box-sizing:border-box;
  display:flex; align-items:center; justify-content:center; }
.box-card .box-line { border-top:.7mm dashed #000; margin:0 1.5mm; }
.box-card .box-body { flex:1 1 auto; display:flex; align-items:stretch; min-height:0; }
.box-card .box-num { flex:1 1 0; display:flex; align-items:center; justify-content:center;
  font-weight:700; line-height:1; overflow:hidden; }
.box-card .box-sep { width:0; border-left:.55mm solid #000; margin:3mm 0 0; }
.box-card .box-foot { text-align:center; padding:0 2mm 1.2mm; line-height:1.1; white-space:nowrap; overflow:hidden; }

/* ---------- 下拉菜单（识别/扫码/上传收纳）与折叠（手动录入 / 扫码区） ---------- */
.dd { position:relative; display:inline-block; }
.dd-btn .dd-a { font-size:10px; opacity:.7; }
.dd-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:80; min-width:176px; padding:6px;
  background:var(--card); border:1px solid var(--line); border-radius:10px;
  box-shadow:0 10px 28px rgba(15,23,42,.18); display:flex; flex-direction:column; gap:2px; }
.dd-menu[hidden] { display:none; }
.dd-item { text-align:left; padding:9px 12px; border:0; border-radius:8px; background:none; color:var(--txt);
  font-size:13.5px; cursor:pointer; white-space:nowrap; font-family:inherit; }
.dd-item:hover { background:var(--bg); }
.dd-item:disabled { opacity:.4; cursor:not-allowed; }
/* v117 折叠搜索改为 contents 展开：summary 的包含块变成整张卡片，冻结搜索条不被折叠框底边推走 */
details.fold { display:contents; }
/* v147 修复：display:contents 会让 details 失去「收起隐藏内容」的默认行为，必须显式补上 */
details.fold:not([open]) > .fold-body { display:none; }
details.fold > summary { cursor:pointer; padding:10px 14px; font-weight:700; font-size:14px; list-style:none;
  display:flex; align-items:center; gap:8px; user-select:none;
  background:var(--card); border:1px solid var(--line); border-radius:10px; margin:10px 0 0; }
details.fold:last-child > summary { margin-top:10px; }
details.fold > summary::-webkit-details-marker { display:none; }
details.fold > summary::after { content:'▾'; margin-left:auto; opacity:.6; transition:transform .15s; }
details.fold[open] > summary::after { transform:rotate(180deg); }
/* 暂存草稿提示条 */
.draft-bar { border-left:3px solid #f59e0b; display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:13px; }
details.fold > .fold-body { padding:2px 14px 14px; background:var(--card); border:1px solid var(--line); border-top:0;
  border-radius:0 0 10px 10px; margin:0 0 12px; }
details.fold:last-child > .fold-body { margin-bottom:0; }
details.fold[open] > summary { border-radius:10px 10px 0 0; }

/* ---------- 供应商质量台账 ---------- */
.q-sum { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px; }
.q-sum > div { background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.q-sum span { font-size:12px; color:var(--sub); }
.q-sum b { font-size:20px; font-variant-numeric:tabular-nums; line-height:1.2; }
.q-sum i { font-style:normal; font-size:11px; color:var(--sub); }
.q-calc { margin:2px 0 12px; padding:9px 12px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:9px;
  font-size:13px; color:#1e40af; display:flex; align-items:baseline; gap:4px; flex-wrap:wrap; }
.q-calc b { font-size:17px; }
.q-calc span { color:#3b82f6; font-size:12px; }
@media (max-width:560px){
  .q-sum { grid-template-columns:1fr 1fr; gap:8px; }
  .q-sum b { font-size:17px; }
  .sq-row > .fld { flex:1 1 140px; min-width:0; }
  #sqDate, #sqCode, #sqModel, #sqName, #sqQty, #sqBad, #sqOrder, #sqSup { width:100% !important; }
}

/* ---------- 来料单：明细表与列表列宽 ---------- */
@media (min-width:761px){ #icTable { min-width:1040px; } }
#icTable th:nth-child(4) { width:150px; }
#icListTable { min-width:900px; }

@media print {
  .subtabs { display:none !important; }
  .box-card { page-break-inside:avoid; }
}

/* ---------- 手机 / 微信内打开（iPhone 刘海屏、输入框不缩放） ---------- */
@media (max-width:560px){
  .login-wrap { padding:18px 14px; min-height:100dvh; }
  .login-box { width:100%; max-width:380px; padding:26px 20px; border-radius:14px; }
  .login-box .logo { font-size:36px; }
  .login-box h1 { font-size:19px; }
  .login-box .sub { margin-bottom:18px; }
  input,select,textarea { font-size:16px; }        /* 小于 16px 时 iOS 聚焦会放大页面 */
  .btn { padding:10px 16px; }
  .subtab { padding:7px 12px; font-size:13px; }
  .modal-mask { padding:12px 10px 0; }
  .modal { padding:16px 14px; border-radius:12px 12px 0 0; }
  .topbar { padding-top:calc(10px + env(safe-area-inset-top)); }
  .content { padding-bottom:calc(16px + env(safe-area-inset-bottom)); }
}


/* 输入联想浮层（客户名称等：打一个字就匹配） */
.sug-pop { position:absolute; z-index:300; left:0; top:calc(100% + 4px); min-width:100%; max-width:360px;
  max-height:250px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:10px;
  box-shadow:0 10px 26px rgba(15,23,42,.16); padding:4px; }
.sug-item { display:flex; align-items:baseline; gap:8px; padding:7px 9px; border-radius:7px; cursor:pointer;
  font-size:13px; white-space:nowrap; }
.sug-item.on, .sug-item:hover { background:#eff6ff; }
.sug-item .sug-v { flex:1; overflow:hidden; text-overflow:ellipsis; }
.sug-item .sug-s { color:var(--sub); font-size:12px; }
/* 日历式日期选择（发货记录筛选等） */
.dp-pop { position:fixed; z-index:1000; width:258px; background:#fff; border:1px solid var(--line);
  border-radius:12px; box-shadow:0 10px 28px rgba(15,23,42,.16); padding:10px 12px; user-select:none; }
.dp-hd { display:flex; align-items:center; gap:4px; }
.dp-hd b { flex:1; text-align:left; font-size:14px; padding-left:2px; }
.dp-nav { width:26px; height:26px; border:1px solid var(--line); background:#fff; border-radius:7px;
  cursor:pointer; font-size:13px; line-height:1; color:var(--sub); }
.dp-nav:hover { background:#f1f5f9; }
.dp-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; margin-top:8px; text-align:center; }
.dp-wd { font-size:12px; color:var(--sub); padding:3px 0; }
.dp-day { padding:6px 0; border-radius:7px; cursor:pointer; font-size:13px; }
.dp-day:hover { background:#eff6ff; }
.dp-day.dim { color:#cbd5e1; }
.dp-day.dim:hover { background:#f8fafc; }
.dp-day.sel { background:#64748b; color:#fff; font-weight:600; }
.dp-ft { display:flex; justify-content:space-between; margin-top:8px; }
.dp-ft a { font-size:13px; cursor:pointer; }
.dp-ft .dp-clr { color:var(--sub); }
.dp-ft .dp-today { color:#2563eb; }
@media (max-width:640px){
  .dp-pop { width:min(300px, calc(100vw - 24px)); }
}
.sl-tools { gap:8px; align-items:center; margin-bottom:10px; }

/* ================= 数据看板（大屏模板） ================= */
.dashboard { position:relative; border-radius:14px; padding:14px 16px 16px; color:var(--dtxt);
  background:
    radial-gradient(1100px 380px at 50% -12%, var(--dglow), transparent 72%),
    linear-gradient(158deg, var(--dbg1) 0%, var(--dbg2) 55%, var(--dbg1) 100%);
  border:1px solid var(--dline); overflow:hidden; font-variant-numeric:tabular-nums; }
.dashboard::before { content:''; position:absolute; inset:0; pointer-events:none; opacity:.45;
  background-image:linear-gradient(var(--dsoft) 1px, transparent 1px), linear-gradient(90deg, var(--dsoft) 1px, transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:radial-gradient(circle at 50% 0%, #000, transparent 76%);
  mask-image:radial-gradient(circle at 50% 0%, #000, transparent 76%); }
.dashboard > * { position:relative; z-index:1; }

/* 顶部标题条 */
.db-top { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; margin-bottom:8px; }
.db-top-l, .db-top-r { display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--dsub); min-width:0; }
.db-top-r { justify-content:flex-end; }
.db-top-c { text-align:center; }
.db-top-c h1 { position:relative; display:inline-block; padding:0 42px; font-size:20px; font-weight:700;
  letter-spacing:5px; color:var(--dtxt); text-shadow:0 0 20px var(--dglow); white-space:nowrap; }
.db-top-c h1::before, .db-top-c h1::after { content:''; position:absolute; top:50%; width:30px; height:2px;
  background:linear-gradient(90deg, transparent, var(--dacc)); transform:skewX(-32deg); opacity:.85; }
.db-top-c h1::before { left:0; }
.db-top-c h1::after { right:0; background:linear-gradient(90deg, var(--dacc), transparent); }
.db-top-c p { font-size:9px; letter-spacing:3.6px; color:var(--dsub); margin-top:3px; opacity:.8; }
.db-clock { font-family:Consolas, "Courier New", monospace; font-size:13px; color:var(--dacc); letter-spacing:.6px; }
.db-live { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border-radius:20px;
  border:1px solid var(--dline); color:var(--dacc); font-size:11px; background:var(--dsoft); }
.db-live i { width:6px; height:6px; border-radius:50%; background:var(--dacc); box-shadow:0 0 8px var(--dacc);
  animation:dbPulse 1.6s infinite; }
@keyframes dbPulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.35; transform:scale(.75); } }
.db-stamp { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.db-btn { background:transparent; color:var(--dtxt); border:1px solid var(--dline); border-radius:4px;
  padding:4px 10px; font-size:11.5px; cursor:pointer; transition:all .15s; white-space:nowrap; }
.db-btn:hover { border-color:var(--dacc); color:var(--dacc); box-shadow:0 0 12px var(--dglow); }
.db-subbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.db-subbar span { font-size:11.5px; color:var(--dsub); border:1px solid var(--dline); border-radius:20px;
  padding:3px 10px; background:var(--dsoft); white-space:nowrap; }
.db-foot { text-align:center; font-size:11px; color:var(--dsub); margin-top:12px; opacity:.75; }

/* 面板 */
.db-grid { display:grid; grid-template-columns:repeat(12,1fr); gap:12px; }
.db-panel { position:relative; grid-column:span 4; padding:10px 12px 12px; border-radius:6px;
  background:var(--dpanel); border:1px solid var(--dline);
  box-shadow:inset 0 0 26px var(--dglow), 0 2px 10px rgba(0,0,0,.16); }
.db-panel::before, .db-panel::after { content:''; position:absolute; width:9px; height:9px;
  border:1px solid var(--dacc); opacity:.8; }
.db-panel::before { left:-1px; top:-1px; border-right:0; border-bottom:0; }
.db-panel::after { right:-1px; bottom:-1px; border-left:0; border-top:0; }
.db-panel[data-panel="kpi"], .db-panel[data-panel="quick"] { grid-column:span 12; }
.db-panel[data-panel="trend"], .db-panel[data-panel="warn"] { grid-column:span 8; }
.db-panel[data-panel="custom"] { grid-column:span 6; }
@media (max-width:1100px){ .db-panel { grid-column:span 12 !important; } }
.db-hd { display:flex; align-items:center; gap:8px; margin-bottom:9px; padding-bottom:7px; border-bottom:1px solid var(--dline); }
.db-hd-t { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:600; letter-spacing:.5px; color:var(--dtxt); }
.db-hd-t i { width:3px; height:13px; border-radius:2px; background:var(--dacc); box-shadow:0 0 8px var(--dacc); }
.db-hd-r { margin-left:auto; font-size:11.5px; color:var(--dsub); cursor:pointer; white-space:nowrap; }
.db-hd-r:hover { color:var(--dacc); }
.db-x { margin-left:auto; background:transparent; border:1px solid var(--dline); color:var(--dsub);
  border-radius:4px; font-size:11px; padding:2px 8px; cursor:pointer; }
.db-x:hover { color:#f87171; border-color:#f87171; }
.db-empty { color:var(--dsub); font-size:12.5px; text-align:center; padding:14px 6px; }

/* 版式编辑（仅系统管理员：拖动排序 / 调宽窄高低） */
.db-editing .db-panel { outline:1px dashed var(--dline); outline-offset:2px; }
.db-editing .db-hd { padding-right:118px; }
.db-editing .db-hd-r, .db-editing .db-x { display:none !important; }
.db-tools { position:absolute; top:4px; right:4px; display:none; align-items:center; gap:3px; z-index:6;
  padding:2px 4px; border-radius:4px; background:var(--dpanel); border:1px solid var(--dline);
  font-size:11px; color:var(--dsub); }
.db-editing .db-tools { display:flex; }
.db-grip { cursor:grab; touch-action:none; -webkit-user-select:none; user-select:none;
  padding:0 3px; font-size:15px; line-height:1; color:var(--dacc); }
.db-grip:active { cursor:grabbing; }
.db-tools button { width:17px; height:17px; padding:0; line-height:1; font-size:11px; cursor:pointer;
  background:transparent; border:1px solid var(--dline); border-radius:3px; color:var(--dtxt); }
.db-tools button:hover { border-color:var(--dacc); color:var(--dacc); }
.db-tools .vw, .db-tools .hw { min-width:24px; text-align:center; color:var(--dsub); font-variant-numeric:tabular-nums; }
.db-panel.db-dragging { opacity:.66; outline:2px dashed var(--dacc); outline-offset:2px; z-index:9; }
@media (max-width:1100px){ .db-tools { gap:2px; padding:2px 3px; } .db-editing .db-hd { padding-right:104px; } }
@media (max-width:560px){
  .db-tools { gap:4px; padding:3px 5px; }
  .db-tools button { width:22px; height:22px; font-size:13px; }
  .db-grip { font-size:17px; padding:0 5px; }
  .db-editing .db-hd { padding-right:150px; }
}

/* 数据模块卡片 */
.db-kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(166px,1fr)); gap:10px; }
@media (min-width:1340px){ .db-kpis { grid-template-columns:repeat(6,1fr); } }
.db-kpi { position:relative; overflow:hidden; cursor:pointer; min-height:86px; border-radius:5px;
  padding:10px 12px 9px 14px; border:1px solid var(--kcbd);
  background:linear-gradient(150deg, var(--kcbg), transparent 82%); transition:transform .14s, box-shadow .14s; }
.db-kpi::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--kc); box-shadow:0 0 10px var(--kc); }
.db-kpi:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,.26); }
.db-kpi-h { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--dsub); }
.db-kpi-ic { width:22px; height:22px; border-radius:5px; display:flex; align-items:center; justify-content:center;
  font-size:12.5px; background:var(--kcbg); flex-shrink:0; }
.db-kpi-n { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-kpi-v { font-size:23px; font-weight:700; line-height:1.16; margin:7px 0 2px; color:var(--kc); letter-spacing:-.4px; }
.db-kpi-u { font-size:11px; font-weight:400; color:var(--dsub); margin-left:4px; letter-spacing:0; }
.db-kpi-s { font-size:11px; color:var(--dsub); line-height:1.45; word-break:break-word; }

/* 便捷功能 */
.db-quick { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:9px; }
.db-qbtn { cursor:pointer; text-align:center; padding:9px 5px; border-radius:5px; border:1px solid var(--dline);
  background:linear-gradient(160deg, var(--dglow), transparent 86%); transition:all .15s; }
.db-qbtn:hover { border-color:var(--dacc); box-shadow:0 0 14px var(--dglow); transform:translateY(-2px); }
.db-qbtn .qi { font-size:19px; line-height:1.2; }
.db-qbtn .qn { font-size:11.5px; margin-top:3px; color:var(--dtxt); }

/* 图表与图例 */
.db-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:16px; margin-top:6px; font-size:11.5px; color:var(--dsub); }
.db-legend i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:5px; }
.db-donut { display:flex; align-items:center; gap:14px; }
.db-lg { flex:1; min-width:0; display:flex; flex-direction:column; gap:7px; font-size:11.5px; }
.db-lg .li { display:flex; align-items:center; gap:7px; min-width:0; }
.db-lg .li i { width:8px; height:8px; border-radius:2px; flex-shrink:0; }
.db-lg .ln { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dtxt); }
.db-lg .lv { font-variant-numeric:tabular-nums; color:var(--dtxt); }
.db-lg .lp { width:34px; text-align:right; color:var(--dsub); }
@media (max-width:560px){ .db-donut { flex-direction:column; align-items:stretch; } .db-donut canvas { margin:0 auto; } }
.db-mstat { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:8px; }
.db-mstat > div { text-align:center; padding:6px 3px; border-radius:5px; background:var(--dsoft); }
.db-mstat span { display:block; font-size:10.5px; color:var(--dsub); margin-bottom:2px; }
.db-mstat b { font-size:14px; }

/* 表格 */
.db-tw { overflow-x:auto; }
.db-tbl { width:100%; border-collapse:collapse; font-size:12px; }
.db-tbl th { text-align:left; font-weight:500; font-size:11.5px; color:var(--dsub); padding:6px 8px;
  border-bottom:1px solid var(--dline); white-space:nowrap; }
.db-tbl td { padding:6px 8px; border-bottom:1px solid var(--dsoft); color:var(--dtxt); vertical-align:middle; }
.db-tbl tr:last-child td { border-bottom:0; }
.db-tbl tbody tr:hover { background:var(--dsoft); }
.db-tbl .num { text-align:right; }
.db-sub { color:var(--dsub); font-size:11px; margin-top:1px; }
.db-clip { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-tag { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; border:1px solid; white-space:nowrap; }
.db-tag.ok { color:#34d399; border-color:rgba(52,211,153,.45); background:rgba(52,211,153,.12); }
.db-tag.warn { color:#fbbf24; border-color:rgba(251,191,36,.45); background:rgba(251,191,36,.12); }
.db-tag.err { color:#f87171; border-color:rgba(248,113,113,.45); background:rgba(248,113,113,.12); }

/* 待办 / 排行 */
.db-todo { display:flex; align-items:center; gap:9px; padding:9px 0; border-bottom:1px dashed var(--dsoft); cursor:pointer; }
.db-todo:last-child { border-bottom:0; }
.db-todo:hover .tt { color:var(--dacc); }
.db-todo .ti { width:26px; height:26px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.db-todo .tt { flex:1; font-size:12.5px; }
.db-todo .tv { font-size:17px; font-weight:700; }
.db-todo .tu { font-size:10.5px; font-weight:400; color:var(--dsub); margin-left:2px; }
.db-rank { display:flex; align-items:center; gap:8px; padding:7px 0; font-size:12px; border-bottom:1px dashed var(--dsoft); }
.db-rank:last-child { border-bottom:0; }
.db-rank .idx { width:18px; height:18px; border-radius:4px; background:var(--dsoft); color:var(--dsub);
  display:flex; align-items:center; justify-content:center; font-size:10.5px; font-weight:600; flex-shrink:0; }
.db-rank .idx.t1 { background:rgba(248,113,113,.22); color:#f87171; }
.db-rank .idx.t2 { background:rgba(251,146,60,.22); color:#fb923c; }
.db-rank .idx.t3 { background:rgba(251,191,36,.22); color:#fbbf24; }
.db-rank .rn { width:38%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-rank .rbar { flex:1; height:7px; min-width:36px; border-radius:4px; background:var(--dsoft); overflow:hidden; }
.db-rank .rbar i { display:block; height:100%; border-radius:4px; background:var(--dacc); opacity:.85; }
.db-rank .rv { width:58px; text-align:right; font-weight:600; }

/* 看板配置弹窗 */
.cfg-wrap { display:flex; flex-direction:column; gap:12px; max-height:62vh; overflow:auto; padding-right:4px; }
.cfg-sec { border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.cfg-t { display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; margin-bottom:8px; }
.cfg-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; font-size:12.5px; }
.cfg-row > label { width:56px; color:var(--sub); flex-shrink:0; }
.db-skins { display:grid; grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); gap:8px; }
.db-skin { display:flex; align-items:center; gap:6px; padding:7px 8px; border-radius:8px; cursor:pointer;
  border:1px solid var(--line); background:linear-gradient(120deg, var(--s1), var(--s2)); font-size:11.5px; }
.db-skin i { width:12px; height:12px; border-radius:3px; background:var(--sa); box-shadow:0 0 8px var(--sa); flex-shrink:0; }
.db-skin span { color:#e8f0ff; white-space:nowrap; }
.db-skin[data-skin="light"] span { color:#334155; }
.db-skin.on { outline:2px solid var(--pri); outline-offset:1px; }
.db-card-list { max-height:250px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.db-crow { display:flex; align-items:center; gap:8px; padding:6px 9px; font-size:12.5px; border-bottom:1px solid #f1f5f9; }
.db-crow:last-child { border-bottom:0; }
.db-crow.on { background:#f8fbff; }
.db-crow .ic { font-size:13px; }
.db-crow .nm { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.db-crow .md { font-size:11px; color:var(--sub); background:#f1f5f9; border-radius:4px; padding:1px 6px; }
.db-crow .cc { width:26px; height:22px; padding:0; border:1px solid var(--line); border-radius:5px; background:#fff; cursor:pointer; flex-shrink:0; }
.db-crow .mv { display:flex; gap:2px; width:38px; justify-content:flex-end; }
.db-crow .mv button { width:17px; height:17px; line-height:1; font-size:9px; border:1px solid var(--line);
  border-radius:4px; background:#fff; cursor:pointer; color:#64748b; padding:0; }
.db-crow .mv button:hover { border-color:var(--pri); color:var(--pri); }
.cfg-panels { display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; }
@media (max-width:560px){ .cfg-panels { grid-template-columns:1fr; } }

@media (max-width:760px){
  .dashboard { padding:12px 11px 14px; border-radius:11px; }
  .db-top { grid-template-columns:1fr; gap:8px; text-align:center; }
  .db-top-l, .db-top-r { justify-content:center; }
  .db-top-c { order:-1; }
  .db-top-c h1 { font-size:16px; letter-spacing:2.5px; padding:0 26px; }
  .db-top-c h1::before, .db-top-c h1::after { width:18px; }
  .db-subbar { gap:6px; }
  .db-subbar span { font-size:11px; padding:2px 8px; }
  .db-kpis { grid-template-columns:repeat(2,1fr); gap:8px; }
  .db-kpi { min-height:78px; padding:9px 10px 8px 12px; }
  .db-kpi-v { font-size:20px; }
  .db-quick { grid-template-columns:repeat(4,1fr); gap:7px; }
  .db-qbtn { padding:8px 3px; }
  .db-qbtn .qi { font-size:17px; }
  .db-qbtn .qn { font-size:11px; }
  .db-grid { gap:10px; }
}

/* 看板配置弹窗：加高，内容区内部滚动 */
.modal.dbcfg { width:960px; display:flex; flex-direction:column; max-height:calc(100vh - 64px); }
.modal.dbcfg .cfg-wrap { flex:1; min-height:0; max-height:none; }
.cfg-row input[type="color"] { width:34px; height:24px; padding:0; border:1px solid var(--line);
  border-radius:6px; background:#fff; cursor:pointer; }
@media (max-width:760px){
  .modal.dbcfg { width:100%; max-height:calc(100vh - 24px); }
  .cfg-row > label { width:48px; }
}
/* 客户 / 供应商档案标题行：窄屏时按钮自动换行，不挤出屏幕 */
.pf-hd { flex-wrap:wrap; row-gap:6px; }
@media (max-width:640px){ .pf-hd { gap:6px; } .pf-hd .btn { padding:6px 10px; font-size:12.5px; } }

/* 客户 / 供应商档案：表头下的逐列筛选行 */
.tbl thead tr.pf-flt th { background:#fff; padding:3px 4px; }
.tbl thead tr.pf-flt input { width:100%; min-width:0; padding:4px 6px; font-size:12px;
  border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--txt); }
.tbl thead tr.pf-flt input::placeholder { color:#b6c0cd; font-size:11.5px; }
.tbl thead tr.pf-flt input:focus { border-color:var(--pri); outline:none; box-shadow:0 0 0 2px rgba(37,99,235,.12); }
/* 产品型号小标签 */
.pm-chip { display:inline-block; margin:1px 4px 1px 0; padding:1px 7px; border-radius:9px;
  background:#eff6ff; color:#1d4ed8; font-size:11.5px; border:1px solid #dbeafe; line-height:1.6; }
/* 产品型号格子：只留一个查看入口，型号收进弹窗里 */
.pm-td { white-space:nowrap; }
.pm-view { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:3px 8px;
  border:1px solid #dbeafe; border-radius:9px; background:#eff6ff; color:#1d4ed8;
  font-size:12px; line-height:1.5; cursor:pointer; font-family:inherit; }
.pm-view b { font-size:13px; }
.pm-view .pm-tip { color:#7290c9; font-size:11px; }
.pm-view.is-empty { background:#fff; border-style:dashed; border-color:#cbd5e1; color:#64748b; }
.pm-view:hover { background:#dbeafe; }
/* 产品型号弹窗 */
.pm-list { max-height:min(52vh,420px); overflow:auto; border:1px solid var(--line); border-radius:10px; padding:6px 8px; background:#fbfdff; }
.pm-item { display:flex; align-items:center; gap:8px; padding:7px 6px; border-bottom:1px dashed #e6edf7; }
.pm-item:last-child { border-bottom:0; }
.pm-item .pm-mn { flex:1; min-width:0; display:flex; align-items:center; gap:6px; }
.pm-item .pm-mn b { font-size:13px; color:#1d4ed8; word-break:break-all; }
.pm-item .pm-meta { color:var(--sub); font-size:11.5px; white-space:nowrap; }
.pm-item.is-man { background:#fffdf5; }
.pm-tag { flex-shrink:0; padding:0 5px; border-radius:6px; background:#fef3c7; color:#b45309; font-size:10.5px; }
.pm-cp, .pm-del { flex-shrink:0; border:1px solid var(--line); background:#fff; border-radius:7px;
  padding:2px 7px; font-size:11.5px; color:var(--sub); cursor:pointer; font-family:inherit; }
.pm-cp:hover { border-color:var(--pri); color:var(--pri); }
.pm-del { color:#dc2626; border-color:#fecaca; }
.pm-del:hover { background:#fef2f2; }
.pm-add { display:flex; gap:8px; align-items:center; margin-top:10px; }
.pm-add input { flex:1; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:8px;
  font-size:13px; font-family:inherit; color:var(--txt); background:#fff; }
.pm-add input:focus { border-color:var(--pri); outline:none; box-shadow:0 0 0 2px rgba(37,99,235,.12); }
@media (max-width:640px){
  .tbl thead tr.pf-flt th { padding:2px 2px; }
  .tbl thead tr.pf-flt input { padding:3px 4px; font-size:11px; }
  .pm-chip { font-size:11px; }
  .pm-item { flex-wrap:wrap; gap:4px 8px; }
  .pm-item .pm-meta { order:3; width:100%; }
}
/* 客户 / 供应商表格：操作列按钮收紧，三颗按钮一行放得下 */
.pf-tbl td:last-child .btn { padding:4px 7px; font-size:12px; margin-right:3px; }
.pf-tbl td:last-child .btn:last-child { margin-right:0; }
@media (max-width:640px){ .pf-tbl td:last-child .btn { padding:4px 6px; font-size:11.5px; margin-right:2px; } }


/* 单据中心 */
.dc-stat { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:4px; }
.dc-s { background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:10px 12px; text-align:center; }
.dc-s b { display:block; font-size:20px; color:var(--pri); line-height:1.3; }
.dc-s span { font-size:12px; color:var(--sub); }
.dc-tbl td { vertical-align:middle; }
/* ---------- v210 单据记录·类型页签栏 ---------- */
.dc-tabs { display:flex; flex-wrap:wrap; gap:6px; background:#f1f5f9; border:1px solid var(--line);
  border-radius:12px; padding:6px; margin-bottom:10px; }
.dc-tab { padding:8px 20px; border:none; border-radius:9px; background:transparent;
  color:var(--sub); font-size:14px; font-weight:600; cursor:pointer; transition:all .12s; }
.dc-tab:hover { color:var(--pri); }
.dc-tab-on { background:#fff; color:#2563eb; box-shadow:0 1px 5px rgba(15,23,42,.14); }
.dc-kid { display:inline-block; min-width:20px; padding:0 6px; border-radius:8px; background:#fef3c7; color:#b45309; font-size:11.5px; }
/* 单据中心：录入批次卡片（一行 4 个方块，日期组头占满整行） */
.bt-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; align-items:start; }
#dcBtList > .empty { grid-column:1 / -1; }
.bt-item { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:#fff; transition:border-color .15s, box-shadow .15s; min-width:0; }
.bt-item:hover { border-color:#bfdbfe; box-shadow:0 2px 10px rgba(37,99,235,.06); }
.bt-hd { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.bt-when { font-weight:700; font-size:12.5px; color:var(--txt); letter-spacing:.02em; }
.bt-by { font-size:11.5px; color:var(--sub); }
.bt-num { margin-left:auto; font-size:12px; font-weight:700; color:var(--pri); white-space:nowrap; }
.bt-sub { margin-top:4px; font-size:12px; color:var(--sub); line-height:1.55; word-break:break-all; }
.bt-sub .bt-long { display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; }
.bt-act { display:flex; gap:6px; margin-top:7px; }
.bt-act .btn { padding:4px 10px; font-size:12px; }
/* 「删整批」永远排在按钮组最后（行尾） */
.bt-act .bt-del { margin-left:auto; }
.modal-actions #bdtAll { margin-left:auto; }
/* 批次列表按天分组标题（网格内占满整行） */
.bt-day { grid-column:1 / -1; font-size:13.5px; font-weight:700; color:var(--txt); padding:10px 2px 0; border-top:1px dashed var(--line); }
#dcBtList > .bt-day:first-child { border-top:none; padding-top:0; }
.bt-day .muted { font-weight:400; font-size:12px; margin-left:6px; }
/* 批次卡片内嵌明细（折叠） */
.bt-dtl { margin-top:7px; border:1px solid var(--line); border-radius:9px; background:var(--bg, #f8fafc); min-width:0; }
.bt-dtl summary { cursor:pointer; padding:6px 9px; font-size:12px; font-weight:600; color:var(--pri); user-select:none; list-style:none; display:flex; align-items:center; gap:6px; }
.bt-dtl summary::-webkit-details-marker { display:none; }
.bt-dtl summary::before { content:'▸'; font-size:11px; transition:transform .15s; }
.bt-dtl[open] summary::before { transform:rotate(90deg); }
.bt-dtl[open] summary { border-bottom:1px solid var(--line); }
.bt-dtl-list { display:flex; flex-direction:column; gap:6px; padding:8px; max-height:420px; overflow:auto; }
.bt-dtl-list .bd-row { background:#fff; }
@media (max-width:1020px){ .bt-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){
  .bt-list { grid-template-columns:1fr; }
  .bt-item { padding:9px 10px; }
  .bt-num { margin-left:0; }
  .bt-act .btn { flex:1; }
}
/* 批次详情：单据行（窄屏也不横向滚动） */
.bd-list { display:flex; flex-direction:column; gap:6px; max-height:52vh; overflow:auto; padding-right:2px; }
.bd-row { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:9px; padding:7px 10px; }
.bd-l { display:flex; align-items:center; gap:6px; white-space:nowrap; font-size:13px; }
.bd-m { flex:1; min-width:0; font-size:12px; color:var(--sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bd-b { display:flex; gap:6px; flex-shrink:0; }
.bd-b .btn { min-width:56px; padding:5px 10px; }
@media (max-width:640px){
  .bd-row { flex-wrap:wrap; gap:6px; }
  .bd-m { order:3; flex-basis:100%; white-space:normal; }
  .bd-b { margin-left:auto; }
}
@media (max-width:760px){
  .dc-stat { grid-template-columns:repeat(2,1fr); }
  .dc-s b { font-size:17px; }
}

/* 单据中心：窄屏时表格横向滚动，不挤成一列一个字 */
@media (max-width:760px){
  .dc-tbl { min-width:1020px; }
  .dc-tbl th, .dc-tbl td { white-space:nowrap; }
  .dc-tbl td:nth-child(4) { max-width:150px; overflow:hidden; text-overflow:ellipsis; }
}

/* 单据行联想浮层（入库/出库明细）：显示完整 编码/型号/名称/分类 */
.it-sg { position:absolute; z-index:320; display:none; max-height:300px; overflow:auto;
  background:var(--card); border:1px solid var(--line); border-radius:10px; padding:4px 0;
  box-shadow:0 14px 34px rgba(15,23,42,.2); font-size:12.5px; }
.it-sg div { padding:6px 12px; cursor:pointer; border-bottom:1px solid #f1f5f9;
  display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; line-height:1.5; }
.it-sg div:last-child { border-bottom:none; }
.it-sg div:hover { background:#eff6ff; }
.it-sg div b { font-weight:600; }
.it-sg div span { color:#334155; word-break:break-all; }
.it-sg div i { color:var(--sub); font-style:normal; font-size:11.5px; }

/* 送货单标签打印弹窗：从产品档案选择模块 */
.dvlb details.dv-pick { margin:8px 0 0; border:1px solid var(--line); border-radius:10px;
  background:#fff; padding:6px 11px 9px; }
.dvlb details.dv-pick > summary { cursor:pointer; font-weight:600; font-size:13.5px; padding:3px 0;
  list-style-position:inside; }
.dvlb details.dv-pick > summary:hover { color:var(--pri); }
.dvlb details.dv-pick .tbl-wrap { margin-top:4px; }
.dvlb details.dv-pick table.tbl td { padding:5px 8px; font-size:12.5px; vertical-align:middle; }
.dvlb #dvLbWrap tbody tr.pick-on { background:#eff6ff; }

/* 客户管理：客户档案 / 客户要求汇总 页签 */
.cus-tabs { display:flex; gap:8px; margin:0 0 10px; flex-wrap:wrap; }
/* 客户要求汇总表：每格可直接改 */
.cr-tbl td.cr-c { padding:4px 5px; vertical-align:top; }
.cr-tbl textarea { width:100%; min-width:0; border:1px solid transparent; border-radius:6px; background:transparent;
  padding:5px 6px; font:inherit; font-size:12.5px; line-height:1.5; resize:vertical; overflow:hidden; color:inherit; display:block; }
.cr-tbl textarea:hover { border-color:var(--line); background:#f8fafc; }
.cr-tbl textarea:focus { border-color:var(--pri); background:#fff; outline:none; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.cr-tbl textarea[readonly] { cursor:default; }
.cr-tbl textarea.cr-ok { background:#dcfce7; border-color:#86efac; }
.cr-tbl td b { font-size:12.5px; }

/* ---------- 快递跟踪 ---------- */
.kd-badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; line-height:1.5; white-space:nowrap; vertical-align:middle; }
.kd-st-ok   { background:#dcfce7; color:#15803d; }
.kd-st-go   { background:#dbeafe; color:#1d4ed8; }
.kd-st-warn { background:#fef3c7; color:#b45309; }
.kd-st-gray { background:#f1f5f9; color:#64748b; }
/* 快递徽标三色：无在途=红 / 派件=黄 / 签收=白 */
.kd-st-red    { background:#fee2e2; color:#b91c1c; font-weight:700; }
.kd-st-yellow { background:#fef9c3; color:#a16207; font-weight:700; }
.kd-st-white  { background:#fff; color:#334155; border:1px solid var(--line); }
.kd-mini { cursor:pointer; text-decoration:none; margin:0; }
.kd-mono { font-family:ui-monospace,Consolas,Menlo,monospace; letter-spacing:.02em; }
.kd-todo { border:1px solid #fde68a; background:#fffbeb; border-radius:10px; padding:9px 12px; font-size:12.5px; line-height:1.8; color:#92400e; margin-top:8px; }
.kd-todo .btn { margin-left:10px; }
.kd-tl { position:relative; margin:4px 0 0; padding-left:6px; }
.kd-tl-item { position:relative; padding:0 0 14px 16px; border-left:2px solid var(--line); }
.kd-tl-item:last-child { border-left-color:transparent; padding-bottom:2px; }
.kd-tl-item::before { content:''; position:absolute; left:-5px; top:3px; width:8px; height:8px; border-radius:50%; background:#cbd5e1; }
.kd-tl-item.first::before { background:#2563eb; }
.kd-tl-t { font-size:12px; color:var(--sub); }
.kd-tl-c { font-size:13px; color:var(--txt); line-height:1.55; }
.kd-tm-hd { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
/* 快递跟踪页：每一站内嵌在表格里 */
.kd-tg { border:0; background:transparent; color:var(--sub); font-size:11px; padding:0 4px 0 0; cursor:pointer; line-height:1; }
.kd-tg:hover { color:var(--pri); }
tr.kd-det > td { background:#f8fafc; padding:0 10px 10px; border-top:0; }
tr.kd-det.hide { display:none; }
.kd-st-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; padding:7px 2px; }
.kd-st-bar b { font-size:12.5px; color:#334155; }
.kd-st-empty { font-size:12.5px; color:var(--sub); line-height:1.8; padding:6px 2px 2px; }
.kd-st-tbl { background:#fff; }
.kd-st-tbl th { font-size:12px; padding:5px 8px; }
.kd-st-tbl td { font-size:12.5px; padding:5px 8px; line-height:1.55; }
.kd-st-tbl .kd-st-time { white-space:nowrap; color:var(--sub); font-variant-numeric:tabular-nums; }
.kd-st-tbl tr.kd-st-man td { background:#fefce8; }
.kd-tag { display:inline-block; margin-left:6px; padding:0 6px; border-radius:999px; background:#fef3c7; color:#92400e; font-size:11px; }
@media (max-width:640px){
  .kd-tm-hd .btn { flex:1; }
  .kd-tl-item { padding-bottom:10px; }
  .kd-st-tbl th:nth-child(2), .kd-st-tbl td:nth-child(2) { display:none; }
}

/* 货架排序按钮（仓库设置） */
.rack-hd .rk-mv { padding:1px 8px; font-size:12px; line-height:1.5; color:var(--sub); }
.rack-hd .rk-mv:hover { color:var(--pri); border-color:#bfdbfe; }

/* ---------- 柔光玻璃（设置里可开关） ---------- */
body.glass .layout { position:relative; z-index:1; }
body.glass::before { content:''; position:fixed; inset:-8%; z-index:0; pointer-events:none;
  background:
    radial-gradient(44% 36% at 12% 4%, var(--glow1), transparent 70%),
    radial-gradient(40% 32% at 90% 8%, var(--glow2), transparent 72%),
    radial-gradient(46% 40% at 58% 100%, var(--glow3), transparent 70%);
  filter:blur(28px); }
body.glass .card,
body.glass .subtabs,
body.glass .set-btns,
body.glass .set-panel,
body.glass .modal,
body.glass .topbar {
  background:var(--glass-card);
  border-color:var(--glass-line);
  -webkit-backdrop-filter:blur(18px) saturate(1.3);
  backdrop-filter:blur(18px) saturate(1.3);
  box-shadow:0 12px 30px -18px rgba(15,23,42,.38), inset 0 1px 0 rgba(255,255,255,.72);
}
body.glass .topbar { box-shadow:0 8px 22px -16px rgba(15,23,42,.30); }
body.glass .sidebar { background:var(--side-a);
  -webkit-backdrop-filter:blur(16px) saturate(1.2); backdrop-filter:blur(16px) saturate(1.2); }
body.glass .card input:not([type=checkbox]):not([type=radio]),
body.glass .card select, body.glass .card textarea { background:rgba(255,255,255,.82); }
@media print {
  body.glass::before { display:none !important; }
  body.glass .card, body.glass .modal, body.glass .subtabs, body.glass .set-btns, body.glass .set-panel, body.glass .topbar {
    background:#fff !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
    box-shadow:none !important; }
}

/* ---------- 设置里「主题与观感」选择器 ---------- */
.theme-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:10px; }
.theme-chip { border:2px solid var(--line); border-radius:12px; padding:8px 9px; cursor:pointer;
  background:var(--card); transition:border-color .15s, box-shadow .15s; display:flex; flex-direction:column; gap:7px; }
.theme-chip:hover { border-color:var(--sub); }
.theme-chip.on { border-color:var(--pri); box-shadow:0 0 0 3px var(--pri-soft); }
.theme-chip .tc-bar { height:26px; border-radius:8px; border:1px solid rgba(15,23,42,.07); }
.theme-chip .tc-name { font-size:12.5px; font-weight:600; display:flex; align-items:center; justify-content:space-between; gap:6px; }
.theme-chip .tc-name i { font-style:normal; color:var(--pri); font-size:12px; }
.glass-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px; padding-top:12px; border-top:1px dashed var(--line); }
.glass-row .gtxt { font-size:13px; font-weight:600; }
.glass-row .gsub { font-size:12px; color:var(--sub); }
.glass-sw { position:relative; width:46px; height:26px; border-radius:999px; background:#cbd5e1; cursor:pointer;
  transition:background .18s; flex-shrink:0; border:none; padding:0; }
.glass-sw::after { content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.3); transition:transform .18s; }
.glass-sw.on { background:var(--pri); }
.glass-sw.on::after { transform:translateX(20px); }

/* ---------- 功能区（侧边栏）配色：浅色 / 主题色 ---------- */
html[data-side="light"] .sidebar { background:var(--card); color:var(--txt); border-right:1px solid var(--line); }
html[data-side="light"] .sidebar .brand { border-bottom-color:var(--line); }
html[data-side="light"] .sidebar .brand b { color:var(--txt); }
html[data-side="light"] .sidebar .brand .s { color:var(--sub); }
html[data-side="light"] .menu .mg { color:var(--sub); }
html[data-side="light"] body.glass .sidebar { background:rgba(255,255,255,.74); border-right-color:var(--glass-line); }
html[data-side="pri"] .sidebar { background:linear-gradient(180deg,var(--side-pri) 0%,var(--pri) 100%); color:rgba(255,255,255,.9); }
html[data-side="pri"] .sidebar .brand { border-bottom-color:rgba(255,255,255,.18); }
html[data-side="pri"] .sidebar .brand b { color:#fff; }
html[data-side="pri"] .sidebar .brand .s { color:rgba(255,255,255,.68); }
html[data-side="pri"] .menu .mg { color:rgba(255,255,255,.6); }
html[data-side="pri"] body.glass .sidebar { background:linear-gradient(180deg,var(--side-pri) 0%,var(--pri) 100%); }
/* 设置里的分段选择按钮 */
.side-seg { display:flex; gap:8px; flex-wrap:wrap; }
.side-seg-btn { border:2px solid var(--line); border-radius:10px; background:var(--card); cursor:pointer;
  padding:7px 14px; text-align:left; display:flex; flex-direction:column; gap:2px; transition:border-color .15s, box-shadow .15s; }
.side-seg-btn:hover { border-color:var(--sub); }
.side-seg-btn.on { border-color:var(--pri); box-shadow:0 0 0 3px var(--pri-soft); }
.side-seg-btn b { font-size:13px; color:var(--txt); }
.side-seg-btn.on b { color:var(--pri); }
.side-seg-btn i { font-style:normal; font-size:11.5px; color:var(--sub); }

/* ---------- 表头列宽手动拖拽 ---------- */
.col-grip { position:absolute; top:0; right:0; width:8px; height:100%; cursor:col-resize; user-select:none; z-index:6; touch-action:none; pointer-events:none; }
.col-grip::after { content:''; position:absolute; top:22%; bottom:22%; right:3px; width:3px; border-radius:2px;
  background:transparent; transition:background .12s; }
.tbl th:hover .col-grip::after { background:var(--pri); opacity:.35; }
.tbl thead th:hover { box-shadow:inset -2px 0 0 rgba(37,99,235,.18); }

/* 备份中心的三个页签 */
.bk-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.bk-tab { padding:7px 13px; border-radius:999px; border:1px solid var(--line); background:var(--card);
  font-size:12.5px; color:var(--txt); cursor:pointer; }
.bk-tab.on { background:var(--pri); border-color:var(--pri); color:#fff; }
body.col-dragging { cursor:col-resize; }
body.col-dragging .col-grip::after { background:var(--pri); opacity:.5; }
@media print { .col-grip { display:none !important; } }

/* ---------- v117 冻结表头/搜索：页签、搜索条、表头随滚动固定，大表格内部滚动 ---------- */
.subtabs { position:sticky; top:var(--stk-tb,57px); z-index:40; }
details.fold > summary { position:sticky; top:calc(var(--stk-l2,57px) + 10px); z-index:35; background:var(--card); }
.stk-head { position:sticky; top:var(--stk-l2,57px); z-index:30; background:var(--card); }
.tbl thead th { position:sticky; top:0; z-index:4; box-shadow:inset 0 -1px 0 var(--line); }
body.glass .stk-head, body.glass details.fold > summary { background:var(--glass-card); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
body.glass .tbl thead th { background:rgba(248,250,252,.86); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
@media print {
  .subtabs, details.fold > summary, .stk-head, .tbl thead th { position:static !important; }
  .tbl-wrap { max-height:none !important; overflow:visible !important; }
}

/* ---------- v120 单据中心：展开本批明细直接显示产品汇总（客户/型号/数量） ---------- */
.bt-prod-tbl { width:100%; font-size:12.5px; background:#fff; border-radius:6px; margin-bottom:2px; }
.bt-prod-tbl th { padding:5px 8px; font-size:12px; }
.bt-prod-tbl td { padding:4px 8px; }
@media print { .bt-prod-tbl th, .bt-prod-tbl td { position:static; } }

/* ---------- v121 单据中心批次明细悬浮窗：可拖动 + 右下角拉伸 ---------- */
.modal.bfloat { position:fixed; width:min(760px,94vw); height:min(560px,86vh);
  display:flex; flex-direction:column; padding:14px 16px 8px; }
.modal.bfloat h3 { flex:0 0 auto; margin-bottom:8px; gap:8px; font-size:14.5px; line-height:1.4; }
.bf-body { flex:1 1 auto; min-height:0; overflow:auto; border:1px solid var(--line); border-radius:8px;
  padding:8px; background:var(--bg, #f8fafc); }
.bf-body .bd-row { background:#fff; }
.bf-docs { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.bf-grip { flex:0 0 auto; align-self:flex-end; width:20px; height:14px; cursor:nwse-resize; opacity:.5; margin-top:5px;
  border-radius:3px; background:linear-gradient(135deg, transparent 0 42%, var(--sub,#64748b) 42% 50%, transparent 50% 60%, var(--sub,#64748b) 60% 68%, transparent 68% 78%, var(--sub,#64748b) 78% 86%, transparent 86%); }
.bf-grip:hover { opacity:.9; }
@media print { .modal.bfloat { position:static; width:auto; height:auto; } .bf-grip { display:none; } }

/* v127 点击被截断单元格弹出完整内容 */
.peek-full { white-space:pre-wrap; word-break:break-all; font-size:13.5px; line-height:1.7; max-width:72vw; }
@media (max-width:640px) { .peek-full { max-width:80vw; } }

/* 微信 X5/XWeb 内核：display:none / hidden 的文件选择器 click() 不生效（拍照识别打不开相机），
   统一改成屏外 1px 可见元素 —— 样式表 !important 可覆盖内联 display:none 与 [hidden] */
input[type=file] {
  display: block !important;
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* 指定长文本列自动换行（客户要求 / 发货·退货备注），覆盖 .tbl 的 nowrap+ellipsis */
.tbl td.td-wrap{white-space:normal !important;text-overflow:clip !important;word-break:break-all;line-height:1.5}

/* v169 侧栏功能区分组折叠 */
.menu .mgrp:first-child .mg { padding-top:4px; }
.menu .mg-h { cursor:pointer; user-select:none; }
.menu .mg-h .mg-ar { font-style:normal; font-size:10px; transition:transform .15s; opacity:.65; }
.menu .mgrp.collapsed .mg-ar { transform:rotate(-90deg); }
.menu .mgrp.collapsed .mgrp-items { display:none; }

/* v172 盘点扫码录入弹窗页签 */
.scan-tabs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
.scan-tab{border:1px solid var(--line);background:#fff;border-radius:12px;padding:14px 6px 10px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;color:#334155;transition:all .15s}
.scan-tab i{font-style:normal;font-size:26px;line-height:1}
.scan-tab span{font-size:13px}
.scan-tab:hover{border-color:var(--pri);box-shadow:0 4px 12px rgba(37,99,235,.12)}
.scan-tab.on{border-color:var(--pri);background:#eff6ff;color:#1d4ed8;font-weight:700;box-shadow:0 4px 12px rgba(37,99,235,.14)}
@media (max-width:640px){ [id$="ScanHost"]{display:flex;flex-direction:column} [id$="ScanHost"]>.scan-pane#dsPane_cam{order:-1} }

.scan-shot{text-align:center;background:#f8fafc;border:1px dashed #e2e8f0;border-radius:12px;padding:18px 12px;margin-top:10px}

/* ---------- v177 打包记录：AI 识别少装 / 多装 ---------- */
.pk-grid2 { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:14px; align-items:start; }
@media (max-width:900px) { .pk-grid2 { grid-template-columns:1fr; } }
.pk-cam { position:relative; border-radius:12px; overflow:hidden; background:#0b1220; aspect-ratio:4/3; }
.pk-cam video { width:100%; height:100%; object-fit:cover; display:block; }
.pk-guide { position:absolute; inset:0; pointer-events:none; opacity:.5; }
.pk-cam-bar { position:absolute; left:0; right:0; bottom:0; padding:5px 10px; background:rgba(15,23,42,.62); color:#e2e8f0; font-size:11.5px; }
.pk-cells { border:1px solid var(--line); border-radius:12px; padding:10px 12px; background:#fbfcfe; }
.pk-cells-h { font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:6px; margin-bottom:8px; flex-wrap:wrap; }
.pk-cells-g { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:6px; }
.pk-cell { border:1px dashed #cbd5e1; border-radius:8px; background:#fff; padding:6px 7px; min-height:56px; display:flex; flex-direction:column; gap:2px; }
.pk-cell.has { border-style:solid; border-color:#bfdbfe; background:#f8fbff; }
.pk-cell b { font-size:11px; color:#94a3b8; }
.pk-cell span { font-size:12px; line-height:1.3; word-break:break-all; }
.pk-cell em { font-size:11.5px; color:#1d4ed8; font-style:normal; }
.pk-bad { background:#fef2f2; border:1px solid #fca5a5; color:#b91c1c; border-radius:9px; padding:8px 10px; font-size:12.5px; font-weight:600; margin-bottom:8px; }
.pk-extra { margin-top:8px; background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; border-radius:9px; padding:7px 10px; font-size:12.5px; }
.tbl tr.pk-row-bad td { background:#fff5f5; }
.pk-alarm { position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(127,29,29,.55); animation:pkflash .5s steps(2,end) infinite; }
@keyframes pkflash { 0%,100% { background:rgba(190,18,60,.55); } 50% { background:rgba(15,23,42,.74); } }
.pk-alarm-in { background:#fff; border-radius:18px; padding:22px 24px; max-width:360px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.35); border:3px solid #ef4444; }
.pk-alarm-ic { font-size:46px; animation:pkpulse .55s ease-in-out infinite alternate; }
@keyframes pkpulse { from { transform:scale(1); } to { transform:scale(1.18); } }
.pk-alarm-t { font-size:20px; font-weight:800; color:#b91c1c; margin:6px 0 4px; }
.pk-alarm-s { font-size:12.5px; color:#64748b; line-height:1.6; }
.pk-alarm-btn { margin-top:16px; width:100%; padding:13px; font-size:15px; border-radius:11px; background:#ef4444; color:#fff; }

/* ---------- v183 设置页签方块 + 箭头移动 ---------- */
.subtabs.tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; background:transparent; border-radius:0; padding:0; box-shadow:none; margin-bottom:12px; }
.subtabs.tiles .subtab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; border:1px solid var(--line); background:#fff; color:#475569; border-radius:12px; padding:12px 6px 8px; font-size:12.5px; font-weight:600; }
.subtabs.tiles .subtab i { font-style:normal; font-size:24px; line-height:1; }
.mv { display:flex; gap:2px; margin-top:2px; }
.mv b { font-size:9px; line-height:1; color:#94a3b8; background:#f1f5f9; border-radius:4px; padding:2px 3px; cursor:pointer; font-weight:700; font-style:normal; }
.mv b:hover { background:#e2e8f0; color:#1d4ed8; }
.subtab.on .mv b, .set-btn.on .mv b { background:rgba(255,255,255,.22); color:#fff; }

/* ---------- v185 编辑摆放开关 ---------- */
.subtabs.tiles .subtab.set-edit { border-style:dashed; color:#64748b; background:#f8fafc; font-size:12px; }
.subtabs.tiles .subtab.set-edit.on { border-style:solid; border-color:var(--pri); background:#eff6ff; color:#1d4ed8; font-weight:700; }
.subtabs.tiles .subtab.set-edit span { font-size:12px; }

/* ---------- v208 单据中心·录入批次日历 ---------- */
.cal-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.cal-title { font-size:16px; min-width:120px; text-align:center; }
/* v209 日历线框：整块外框 + 格格分隔线，一眼看清网格 */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:0; }
.cal-weekhead { margin-bottom:0; border:1.5px solid #94a3b8; border-bottom:none; border-radius:8px 8px 0 0; overflow:hidden; background:#f1f5f9; }
.cal-wh { text-align:center; font-size:12.5px; font-weight:700; color:var(--sub); padding:5px 0; border-right:1px solid #cbd5e1; }
.cal-wh:last-child { border-right:none; }
.cal-grid:not(.cal-weekhead) { border:1.5px solid #94a3b8; border-radius:0 0 8px 8px; overflow:hidden; }
.cal-cell { min-height:62px; background:#f8fafc; border-right:1px solid #cbd5e1; border-bottom:1px solid #cbd5e1;
  padding:3px 6px; font-size:12px; line-height:1.4; overflow:hidden; display:flex; gap:6px; align-items:flex-start; }
.cal-cell:nth-child(7n) { border-right:none; }
.cal-cell:nth-last-child(-n+7) { border-bottom:none; }
.cal-left { flex:0 0 30%; max-width:66px; min-width:22px; }
.cal-right { flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-out { opacity:.38; }
.cal-num { font-size:20px; font-weight:800; color:var(--txt); line-height:1.15; letter-spacing:.5px; }
.cal-today { background:#e0f2fe; box-shadow:inset 0 0 0 2px #38bdf8; }
.cal-today .cal-num::after { content:'今'; font-size:10px; color:#0284c7; margin-left:4px; }
.cal-has { cursor:pointer; transition:box-shadow .12s; }
.cal-has:hover { box-shadow:0 3px 10px rgba(15,23,42,.15), inset 0 0 0 1.5px #64748b; }
.cal-n { font-size:10.5px; font-weight:700; color:#166534; white-space:nowrap; }
.cal-t { font-size:10.5px; color:#475569; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-more { color:#94a3b8; }
.cal-batch { padding:4px 0; }
.cal-batch-sep { border-top:1px dashed var(--line); margin:10px 0; }
@media (max-width:860px) { .cal-cell { min-height:54px; padding:2px 3px; gap:2px; } .cal-left { flex:0 0 22px; } .cal-num { font-size:15px; } .cal-t, .cal-n { font-size:9.5px; } }

/* ---------- v214 设置页顶部冻结 ---------- */
/* 二级页签（设置页的方块页签）滚动时固定在顶部工具条下面，页签始终可点 */
.subtabs.tiles { position:sticky; top:55px; z-index:40; background:var(--bg); padding:8px 6px 4px; margin-left:-6px; margin-right:-6px; box-shadow:0 6px 14px rgba(15,23,42,.10); }
@media (max-width:900px) { .subtabs.tiles { top:49px; padding:6px 4px 3px; } }
/* 展开某个面板后，面板标题也留在上方，长内容往下滚时不迷路 */
.set-panel.sticky-h { position:sticky; top:0; z-index:39; }

/* ---------- v215 识别入口：一个按钮 + 弹窗选功能 ---------- */
.scan-pick { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 4px; }
#dsPick { display:inline-flex; align-items:center; gap:6px; font-weight:700; }
.scan-pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.scan-pick-item { display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:left;
  border:1px solid var(--line); background:#fff; border-radius:12px; padding:12px 12px 10px; cursor:pointer;
  font-family:inherit; transition:box-shadow .15s,border-color .15s; }
.scan-pick-item:hover { border-color:var(--pri); box-shadow:0 4px 12px rgba(15,23,42,.12); }
.scan-pick-item i { font-style:normal; font-size:22px; line-height:1; }
.scan-pick-item span { font-size:13.5px; font-weight:700; color:var(--txt); }
.scan-pick-item em { font-style:normal; font-size:11.5px; color:var(--sub); line-height:1.45; }
/* ---------- v222 备份文件夹选择弹窗 ---------- */
.fd-drives { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.fd-dr { min-width:44px; }
.fd-dr.on { border-color:var(--pri); color:var(--pri); font-weight:700; background:#eff6ff; }
.fd-path { display:flex; align-items:center; gap:8px; padding:6px 8px; background:#f8fafc; border:1px solid var(--line); border-radius:8px; font-size:12.5px; overflow:hidden; }
.fd-path b { font-weight:700; color:var(--txt); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fd-list { margin-top:8px; max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.fd-item { padding:7px 10px; font-size:13px; cursor:pointer; border-bottom:1px solid #f1f5f9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fd-item:hover { background:#eff6ff; color:#1d4ed8; }
.fd-item:last-child { border-bottom:none; }
#fdNewRow { display:none; gap:8px; align-items:center; }
/* ---------- v223 批量照片查重弹窗 ---------- */
.pdc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:10px; max-height:52vh; overflow:auto; padding:2px; }
.pdc-item { display:flex; flex-direction:column; gap:6px; border:1px solid var(--line); border-radius:10px; padding:8px; background:#fff; cursor:pointer; position:relative; }
.pdc-item.is-dup { background:#fef2f2; border-color:#fca5a5; }
.pdc-item input { position:absolute; top:8px; right:8px; width:16px; height:16px; cursor:pointer; }
.pdc-item img { width:100%; height:96px; object-fit:cover; border-radius:6px; background:#f1f5f9; }
.pdc-meta { display:flex; flex-direction:column; gap:2px; font-size:12px; line-height:1.45; }
.pdc-meta b { font-size:12.5px; color:var(--txt); }
.pdc-meta span { color:#475569; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pdc-meta i { color:#94a3b8; font-style:normal; font-size:11.5px; }
.pdc-tag { display:inline-block; margin-top:3px; padding:1px 6px; border-radius:6px; font-size:11px; font-weight:700; }
.pdc-dup { background:#fee2e2; color:#b91c1c; }
.pdc-sim { background:#fef3c7; color:#b45309; }
/* ---------- v225 右上角接入方式徽标 ---------- */
.netbadge { display:inline-flex; align-items:center; gap:3px; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:700;
  cursor:pointer; user-select:none; white-space:nowrap; border:1px solid transparent; margin-right:2px; }
.netbadge.nb-local { background:#e0f2fe; color:#075985; border-color:#bae6fd; }
.netbadge.nb-lan { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.netbadge.nb-wan { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.netbadge:hover { filter:brightness(0.96); }
@media (max-width:640px) { .netbadge { font-size:11px; padding:1px 6px; } }