/* ============================================================
 * 智能拣货分拣系统 — 现代仪表板风格
 * 设计方向：简洁 / 清爽 / 专业 SaaS Dashboard
 * ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  /* 主色 */
  --primary: #4f6df5;
  --primary-dark: #3b54d4;
  --primary-light: #eef1fe;
  --primary-50: #f5f7ff;

  /* 中性色 */
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;

  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --text-1: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;
  --text-4: #d0d5dd;

  /* 语义色 */
  --green: #12b76a;
  --green-bg: #ecfdf3;
  --green-border: #abefc6;
  --orange: #f79009;
  --orange-bg: #fef7ec;
  --orange-border: #fedf89;
  --red: #f04438;
  --red-bg: #fef3f2;
  --red-border: #fecdca;
  --blue: #2e90fa;
  --blue-bg: #eff8ff;
  --blue-border: #b2ddff;
  --purple: #7a5af8;
  --purple-bg: #f4f3ff;
  --purple-border: #d9d6fe;

  /* 深色侧栏 */
  --sidebar-bg: #101828;
  --sidebar-bg-2: #1d2939;
  --sidebar-border: #2d3748;
  --sidebar-text: #d0d5dd;
  --sidebar-text-active: #ffffff;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 4px 12px -2px rgba(16,24,40,.10), 0 2px 6px -2px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px -4px rgba(16,24,40,.14), 0 4px 12px -2px rgba(16,24,40,.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --font-display: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Noto Sans SC', ui-monospace, monospace;

  --nav-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 危险斜纹带（保留但弱化） ---------- */
.hazard {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 2px;
}
.hazard--thin { height: 3px; }

/* ============================================================
   骨架
   ============================================================ */
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

/* ---------- 侧栏 ---------- */
.rail {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 4px; }

.rail__brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
}
.rail__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.rail__mark::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,109,245,.2);
}
.rail__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-top: 10px;
  line-height: 1.25;
  color: var(--sidebar-text-active);
}
.rail__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.rail__nav { padding: 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }

.navitem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.navitem__no {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .02em;
  min-width: 20px;
}
.navitem__label { flex: 1; }
.navitem__hint {
  display: none;
}
.navitem:hover {
  background: var(--sidebar-bg-2);
  color: var(--sidebar-text-active);
}
.navitem[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
}
.navitem[aria-selected="true"] .navitem__no { color: rgba(255,255,255,.7); }
.navitem:disabled { opacity: .38; cursor: not-allowed; }
.navitem:disabled:hover { background: none; }

.rail__foot {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  line-height: 1.8;
}
.rail__foot b { color: var(--green); font-weight: 600; }

/* ---------- 大屏模式：默认收起侧栏，隐藏格口操作按钮 ---------- */
.shell.display-mode {
  grid-template-columns: 56px 1fr; /* 侧栏收窄为图标窄条，几乎不可见 */
}
.shell.display-mode .rail__brand,
.shell.display-mode .rail__foot,
.shell.display-mode .navitem__label,
.shell.display-mode .navitem__hint,
.shell.display-mode .navitem__no {
  display: none;
}
.shell.display-mode .rail { padding-top: 12px; align-items: center; }
.shell.display-mode .rail__nav { align-items: center; gap: 8px; }
.shell.display-mode .navitem { width: 40px; height: 40px; padding: 0; border-radius: 10px; }
/* 大屏模式隐藏顶部白色导航栏（06 分拣显示屏 / 分拣线 / 当前批次 / 退出登录），显示屏上移填满 */
.shell.display-mode .topbar { display: none; }
.shell.display-mode .display { min-height: 100vh; padding-top: 10px; }
/* 大屏上的格口不显示「确认投放 / 装箱打印」按钮 */
.display .gate__act,
.display .gate__print { display: none; }

/* ---------- 主区 ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.topbar__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.topbar__spacer { flex: 1; }

.stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-2);
}
.stat b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.stat__sel { color: var(--text-3); font-size: 12px; }
.stat__sel b { color: var(--primary); font-size: 14px; }
}

.view { padding: 24px 28px 60px; max-width: 1520px; }
.view[hidden] { display: none; }

/* ---------- 区块标题 ---------- */
.sec {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.sec h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.sec p { font-size: 13px; color: var(--text-3); }
.sec__spacer { flex: 1; }

/* ============================================================
   通用控件
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-1);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--surface-3); border-color: var(--text-3); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--dark { background: var(--text-1); color: #fff; border-color: var(--text-1); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text-1); }
.btn--danger { background: var(--red); color: #fff; border-color: var(--red); font-weight: 600; }
.btn--danger:hover { background: #d92d20; border-color: #d92d20; }
.btn--sm { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field > span {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-2);
}
.input, .select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-1);
  border-radius: var(--radius-sm);
  min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,109,245,.12);
}
.input::placeholder { color: var(--text-3); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.tag--ok { color: var(--green); background: var(--green-bg); border-color: var(--green-border); }
.tag--warn { color: var(--orange); background: var(--orange-bg); border-color: var(--orange-border); }
.tag--err { color: var(--red); background: var(--red-bg); border-color: var(--red-border); }
.tag--mute { color: var(--text-2); background: var(--surface-3); border-color: var(--border); }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
.table th {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-1); }
.table tbody tr:hover { background: var(--primary-50); }
.table tr[data-picked="1"] { background: var(--primary-light); }
.table tr[data-picked="1"]:hover { background: #e0e5fc; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0; }

input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; border-radius: 4px; }

/* ============================================================
   01 分拣线配置
   ============================================================ */
.grid-lines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.linecard {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.linecard:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.linecard__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.linecard__code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}
.linecard__name { font-weight: 600; font-size: 14px; flex: 1; color: var(--text-1); }
.linecard__body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.linecard__metrics { display: flex; gap: 24px; }
.metric__k {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}
.metric__v {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}
.metric__v small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 3px; }

.gatestrip { display: flex; flex-wrap: wrap; gap: 3px; }
.gatestrip i {
  width: 16px; height: 20px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.linecard__foot {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.lineform {
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  align-items: end;
}

/* ============================================================
   02 出货指令单
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

/* ---- 顶部数据卡片 ---- */
.kpicards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.kpi {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kpi:hover { box-shadow: var(--shadow-sm); }
.kpi::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 0 2px 2px 0;
  background: var(--text-3);
}
.kpi--bill::before { background: var(--primary); }
.kpi--style::before { background: var(--blue); }
.kpi--skc::before { background: var(--green); }
.kpi--sku::before { background: var(--orange); }
.kpi--qty::before { background: var(--red); }
.kpi__v {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}
.kpi--bill .kpi__v { color: var(--primary); }
.kpi__r {
  text-align: right;
  flex-shrink: 0;
}
.kpi__k {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}
.kpi__sel {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 4px;
}
.kpi__sel b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.kpi--style .kpi__sel b { color: var(--blue); }
.kpi--skc .kpi__sel b { color: var(--green); }
.kpi--sku .kpi__sel b { color: var(--orange); }
.kpi--qty .kpi__sel b { color: var(--red); }

/* ---- 同步按钮 ---- */
.btn--sync {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.btn--sync:hover { background: var(--primary-dark); }
.btn--sync:disabled { opacity: .6; }

/* ---- 表格滚动容器 ---- */
.tablewrap { max-height: 56vh; overflow-y: auto; border-radius: var(--radius) var(--radius) 0 0; }
.tablewrap .table thead th { position: sticky; top: 0; z-index: 2; }

/* ---- 分页条 ---- */
.pager {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-2);
}
.pager__info { font-variant-numeric: tabular-nums; }
.pager__cur { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-1); }

/* ---- 空闲分拣线卡片 ---- */
.idlelines { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.idleline {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
.idleline[data-id]:hover { border-color: var(--primary); cursor: pointer; }
.idleline__code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}
.idleline__name { font-size: 13px; font-weight: 500; }
.idleline__gates {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-2);
}
.idleline__gates b { font-size: 16px; color: var(--text-1); font-variant-numeric: tabular-nums; font-weight: 700; }
.idleline__tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e6f7ed;
  color: #1a9e57;
}
.idleline--busy { opacity: .7; }
.idleline--busy .idleline__tag { background: #fdeced; color: #d23f3f; }
.idleline--empty { border-style: dashed; color: var(--text-3); font-size: 13px; text-align: center; justify-content: center; }

.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel__hd {
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.panel__bd { padding: 16px; }

.gauge { padding: 18px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.gauge__v {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.gauge__v em { font-style: normal; color: var(--text-3); font-size: 22px; }
.gauge__k {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}
.gauge[data-state="over"] .gauge__v { color: var(--red); }
.gauge[data-state="ok"] .gauge__v { color: var(--green); }

.bar { height: 8px; background: var(--surface-3); border-radius: 4px; display: flex; margin-top: 12px; overflow: hidden; }
.bar i { display: block; background: var(--primary); border-radius: 4px; transition: width .3s cubic-bezier(.22,1,.36,1); }
.bar[data-state="over"] i { background: var(--red); }

.checklist { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  align-items: start;
}
.check i {
  font-style: normal;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.check[data-ok="1"] i { color: var(--green); }
.check[data-ok="0"] i { color: var(--red); }
.check[data-ok="0"] { color: var(--red); }

.alert {
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: #912018;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px;
}
.alert b { font-weight: 700; }

/* ============================================================
   03 拣货单打印
   ============================================================ */
.sheet {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 1100px;
}
.sheet__hd { display: flex; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--text-1); padding-bottom: 14px; }
.sheet__t { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.sheet__meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px 24px; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }
.sheet__code {
  margin-left: auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-2);
}
.barcode {
  height: 44px;
  width: 168px;
  background: repeating-linear-gradient(90deg,
    var(--text-1) 0 2px, transparent 2px 4px, var(--text-1) 4px 5px, transparent 5px 9px,
    var(--text-1) 9px 12px, transparent 12px 13px, var(--text-1) 13px 14px, transparent 14px 17px);
  margin-bottom: 4px;
  border-radius: 2px;
}
.sheet .table { margin-top: 16px; background: #fff; }
.sheet .table th { background: var(--surface-3); color: var(--text-1); border-bottom: 2px solid var(--text-1); }
.sheet .table td { border-bottom: 1px dashed var(--border); }
.dist { display: flex; flex-wrap: wrap; gap: 4px; }
.dist span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
}
.dist span b { color: var(--primary); }
.sheet__subtotal td { background: var(--surface-3); border-bottom: 1px solid var(--border); padding: 7px 12px; }
.sheet__subtotal-lbl { text-align: right; font-weight: 700; color: var(--text-2); font-family: var(--font-body); }
.sheet__subtotal .num { color: var(--primary); }
.sheet__ft {
  margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; gap: 40px; font-family: var(--font-mono); font-size: 11px; color: var(--text-2);
}

/* ---- 03 拣货单列表 ---- */
.sheet-top { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.sheet-top .sec { padding: 0; }
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: stretch;
}
.sheet-row {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  cursor: default;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sheet-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.sheet-row--pending { border-left: 3px solid var(--orange); }
.sheet-row--printed { border-left: 3px solid var(--green); }
.sheet-row--sorting { border-left: 3px solid var(--blue); }
.sheet-row--done    { border-left: 3px solid var(--purple); }
.sheet-row[data-active="1"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,109,245,.12);
}
.sheet-row__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; align-items: start; }
.sc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc label { font-family: var(--font-body); font-size: 10px; color: var(--text-3); font-weight: 500; }
.sc b { font-size: 13px; font-weight: 700; color: var(--text-1); }
.sc span { font-size: 13px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.sc--no { grid-column: 1 / -1; padding-right: 64px; }
.sc--no b { font-size: 15px; font-weight: 800; letter-spacing: 0; }
.sc--acts { grid-column: 1 / -1; align-items: flex-start; }
.sheet-row__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-row__act {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  padding: 4px 10px; cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-1);
  border-radius: var(--radius-sm);
  transition: all .15s ease;
}
.sheet-row__act:hover { background: var(--surface-3); }
.sheet-row__act--print { border-color: var(--primary); color: var(--primary); }
.sheet-row__act--print:hover { background: var(--primary); color: #fff; }
.sheet-row__act--revoke { border-color: var(--red-border); color: var(--red); }
.sheet-row__act--revoke:hover { background: var(--red); color: #fff; }
.sheet-row__tag {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.tag--wait { color: var(--orange); background: var(--orange-bg); }
.tag--ok   { color: var(--green); background: var(--green-bg); }
.tag--run  { color: var(--blue); background: var(--blue-bg); }
.tag--done { color: var(--purple); background: var(--purple-bg); }
.sheet-row--empty {
  border-style: dashed; cursor: default; color: var(--text-3);
  text-align: center; font-size: 13px; justify-content: center; display: block;
}

/* ---- 浮层 ---- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: none;
  align-items: flex-start; justify-content: center;
  background: rgba(16,24,40,.5); padding: 30px 16px; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.overlay__box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 980px; width: 100%; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.overlay__bd { padding: 20px 24px; }
.form-row { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text-2); font-weight: 500; text-align: right; }
.form-row .input { width: 100%; box-sizing: border-box; }
.rfid-tip { color: var(--red); font-size: 12px; min-height: 16px; text-align: right; }
.overlay__ft { border-top: 1px solid var(--border); padding: 14px 20px; display: flex; justify-content: flex-end; gap: 8px; }
/* ---- 分拣线选择浮层 ---- */
.linepick { max-width: 560px; }
.linepick .overlay__hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
}
.overlay__title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.overlay__sub { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.overlay__sub b { color: var(--primary); }
.linepick__grid { display: grid; gap: 10px; padding: 18px 22px; max-height: 60vh; overflow-y: auto; }
.linepick__item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  text-align: left; cursor: pointer; padding: 14px 16px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-1);
  font-family: var(--font-body); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.linepick__item:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }
.linepick__item[selected], .linepick__item--sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,109,245,.12); }
.linepick__code { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-1); }
.linepick__name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.linepick__meta { grid-column: 1 / -1; font-family: var(--font-body); font-size: 11px; color: var(--text-3); }
.linepick__cur { font-family: var(--font-body); font-size: 10px; color: var(--primary); border: 1px solid var(--primary); padding: 2px 8px; border-radius: 20px; }
.linepick__empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============================================================
   04 分拣工作台（深色大屏）
   ============================================================ */
.station {
  background: #161b26;
  border: 1px solid #2d3748;
  color: #e4e7ec;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.station__hd {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid #2d3748;
  background: #1d2330;
}
.station__top {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid #2d3748;
  background: #1d2330;
}
.station__field { display: flex; flex-direction: column; gap: 4px; }
.station__field label { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: #98a2b3; }
.station__field b { font-size: 24px; font-weight: 700; color: #fff; }
.station__field b.mono { font-family: var(--font-mono); font-size: 24px; font-variant-numeric: tabular-nums; }
.station__field--metric { padding-left: 14px; border-left: 1px solid #2d3748; }
.station__field--metric b .m-done { color: var(--green); }
.station__field--metric b .m-task { color: #475467; }
.station__field--metric #pPct { color: var(--green); }
.station__field--bar { flex: 0 0 auto; align-items: flex-start; padding-left: 14px; border-left: 1px solid #2d3748; }
.station__field--bar label { color: #98a2b3; }
.progbar--inrow { width: 160px; height: 12px; border-radius: 4px; background: #161b26; border: 1px solid #2d3748; overflow: hidden; }
.station__field--bar .progbar--inrow i { display: block; height: 100%; background: var(--green); }
.station__sub { font-family: var(--font-mono); font-size: 10px; color: var(--orange); }
.station__spacer { flex: 1; }
.station__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.station__field--btn {
  align-items: flex-start; gap: 2px; padding: 8px 14px; margin: 0;
  background: #2d3748; border: 1px solid #374151;
  border-radius: var(--radius-sm); cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s;
}
.station__field--btn:hover { border-color: var(--primary); background: #374151; }
.station__field--btn label { color: #98a2b3; }
.station__field--btn b { color: #fff; }
.pill {
  font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border: 1px solid #374151; color: #98a2b3; border-radius: 20px;
}
.pill--live { border-color: var(--green); color: var(--green); }
.pill--live::before {
  content:''; display:inline-block; width:6px; height:6px; border-radius:50%;
  background: var(--green); margin-right:6px; vertical-align: middle;
  animation: blink 1.4s steps(1,end) infinite;
}
@keyframes blink { 0%,60%{opacity:1} 61%,100%{opacity:.2} }

.scanbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
}
.scanbar__icon {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--primary); text-transform: uppercase; white-space: nowrap;
}
.scan-input {
  width: 360px; max-width: 42vw;
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 600; letter-spacing: .08em;
  padding: 11px 16px;
  background: #161b26;
  border: 1px solid #374151;
  color: #e4e7ec;
  border-radius: var(--radius-sm);
}
.scan-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,109,245,.15); }
.scan-input::placeholder { color: #475467; letter-spacing: .04em; font-size: 14px; }

.station__mid {
  display: flex; align-items: stretch; gap: 0;
  background: #1d2330;
  border-bottom: 1px solid #2d3748;
}
.station__mid .scanbar { flex: 0 0 auto; padding: 16px 18px; border-right: 1px solid #2d3748; border-bottom: 0; }
.station__body {
  padding: 16px 18px; display: flex; flex-direction: column; gap: 14px;
}
.station__left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-width: 0; }
.station__left .scanbar { flex: 0 0 auto; padding: 14px 16px; border: 1px solid #2d3748; border-radius: var(--radius); }
.station__left #skuCard { flex: 1; min-width: 0; }
.verify-tip {
  margin: 14px 0 0; padding: 12px 16px;
  border: 1px solid var(--orange); background: rgba(247,144,9,.1);
  color: var(--orange); font-size: 13px; line-height: 1.6; border-radius: var(--radius-sm);
}
.verify-tip b { color: #fff; }
.verify-gate {
  margin: 20px 0 4px; padding: 40px 24px; text-align: center;
  border: 1px dashed #374151; background: rgba(255,255,255,.02);
  border-radius: var(--radius);
}
.verify-gate__icon { font-size: 34px; }
.verify-gate__t { margin-top: 10px; font-size: 15px; font-weight: 700; color: #e4e7ec; }
.verify-gate__s { margin-top: 7px; font-size: 12px; color: #475467; line-height: 1.6; max-width: 460px; margin-left: auto; margin-right: auto; }

.station__body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* ---- 顶部完成率进度条 ---- */
.progress-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; border-bottom: 1px solid #2d3748; background: #1a1f2e;
}
.progress-row--top { border-top: 0; }
.prog-cell { display: flex; align-items: baseline; gap: 6px; }
.prog-cell label { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: #475467; }
.prog-cell b { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.progbar { flex: 1; min-width: 160px; height: 8px; background: #161b26; border: 1px solid #2d3748; border-radius: 4px; }
.progbar--wide { flex: 1; width: 100%; height: 10px; }
.progbar i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .35s cubic-bezier(.22,1,.36,1); }
.prog-cell--log { flex: 1; min-width: 220px; }
.log--inline { max-height: 34px; overflow-y: auto; font-family: var(--font-mono); font-size: 10px; line-height: 1.5; border: 1px solid #2d3748; background: #161b26; padding: 3px 8px; border-radius: 4px; }
.log--inline div { padding: 1px 0; border: 0; color: #98a2b3; display: flex; gap: 8px; }

/* ---- 格口墙（全宽） ---- */
.wall--full { padding: 16px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; align-content: start; }

.skucard {
  border: 1px solid #2d3748;
  background: #1d2330;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: stretch; gap: 20px; flex-wrap: nowrap;
  margin-bottom: 16px;
}
.skucard--empty { color: #475467; font-family: var(--font-mono); font-size: 13px; justify-content: center; padding: 36px; }
.skucard--text { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.skucard__info { display: flex; flex-wrap: wrap; gap: 10px 28px; flex: 1; min-width: 0; }
.skucard__row { display: flex; align-items: baseline; gap: 8px; }
.skucard__row label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #98a2b3; white-space: nowrap; }
.skucard__row span { font-size: 17px; color: #fff; }
.skucard__row .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.skucard--text #btnAllDone { flex: 0 0 auto; }

/* ---- 格口墙 ---- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }

.gate {
  border: 1px solid #2d3748;
  background: #1d2330;
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  min-height: 128px;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
/* 本次作业用到的格口：明显高亮 */
.gate--used {
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, #20345c 0%, #1d2330 70%);
  box-shadow: 0 0 0 3px rgba(79,109,245,.22), 0 4px 14px rgba(79,109,245,.25);
}
.gate--used[data-done="1"] {
  border-color: var(--green);
  background: linear-gradient(180deg, #1c3b2e 0%, #1d2330 75%);
  box-shadow: 0 0 0 3px rgba(18,183,106,.22);
}
.gate__hd {
  display: flex; align-items: baseline; gap: 6px;
  padding: 12px 12px 8px;
  border-bottom: 1px solid #2d3748;
  color: #98a2b3;
}
.gate__no {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: #374151;
  padding: 4px 12px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.gate__nolbl {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #e4e7ec;
  margin-left: 2px;
}
.gate__status {
  margin-left: auto;
  align-self: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 4px 12px;
  border: 1px solid #374151;
  color: #98a2b3;
  border-radius: 20px;
  white-space: nowrap;
}
.gate__shop {
  padding: 9px 10px 3px;
  font-size: 13px; font-weight: 500;
  color: #e4e7ec;
  line-height: 1.3;
}
.gate__shopcode { padding: 0 10px 6px; font-family: var(--font-mono); font-size: 9.5px; color: #475467; }

/* LED 数码屏 */
.led {
  margin: auto 8px 8px;
  background: #0d1117;
  border: 1px solid #0d1117;
  border-radius: 4px;
  padding: 14px 16px;
  min-height: 128px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.led::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.04) 0.7px, transparent 0.9px);
  background-size: 3px 3px;
  pointer-events: none;
}
.led__n {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 108px; line-height: 1;
  color: #332b1a;
  font-variant-numeric: tabular-nums;
  transition: color .18s, text-shadow .18s;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}


.gate[data-active="1"] {
  border-color: var(--primary);
  background: rgba(79,109,245,.12);
}
.gate[data-active="1"] .led__n {
  color: #82b4ff;
  text-shadow: 0 0 8px rgba(130,180,255,.6);
}
.gate[data-active="1"] .led__u { color: rgba(130,180,255,.5); }
.gate[data-active="1"] .gate__no { background: var(--primary); color: #fff; }
.gate[data-active="1"] .gate__nolbl { color: #c7d2fe; }
.gate[data-active="1"] .gate__status { border-color: var(--primary); color: #82b4ff; }

.gate[data-done="1"] { border-color: var(--green); background: rgba(18,183,106,.08); }
.gate[data-done="1"] .led__n { color: var(--green); text-shadow: 0 0 7px rgba(18,183,106,.5); }
.gate[data-done="1"] .gate__no { background: var(--green); color: #fff; }
.gate[data-done="1"] .gate__nolbl { color: #abefc6; }
.gate[data-done="1"] .gate__status { border-color: var(--green); color: var(--green); }

.gate[data-idle="1"] { opacity: .4; }

/* 已分拣数量 > 0 的格口高亮 */
.gate[data-sorted="1"] { border-color: var(--green); box-shadow: inset 0 0 0 1px rgba(18,183,106,.35), 0 0 14px rgba(18,183,106,.18); }
.gate[data-sorted="1"] .gate__sorted { background: rgba(18,183,106,.12); color: #86efac; }
.gate[data-sorted="1"] .gate__sorted b { color: #4ade80; }

.gate__act {
  border: 0; border-top: 1px solid #2d3748;
  background: #2d3748; color: #e4e7ec;
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  padding: 7px; cursor: pointer;
  pointer-events: auto;
  transition: background .15s ease;
}
.gate__act:hover { background: var(--primary); color: #fff; }
.gate__act:disabled { opacity: .3; cursor: default; }
.gate__act:disabled:hover { background: #2d3748; color: #e4e7ec; }

.gate__sorted {
  font-family: var(--font-body); font-size: 14px; color: #cbd5e1; font-weight: 500;
  padding: 8px 10px; border-top: 1px solid #2d3748;
}
.gate__sorted b { color: #4ade80; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gate__print {
  border: 0; border-top: 1px solid #2d3748;
  background: #1f6f43; color: #eafff2;
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  padding: 7px; cursor: pointer; pointer-events: auto;
  transition: background .15s ease;
}
.gate__print:hover { background: #28a35f; color: #fff; }
.gate__print:disabled { opacity: .3; cursor: default; }

@keyframes pop { 0% { transform: scale(1) } 40% { transform: scale(1.04) } 100% { transform: scale(1) } }
.gate--pop { animation: pop .34s cubic-bezier(.22,1,.36,1); }

/* ---- 格口打印机配置 ---- */
.gp-line { display: flex; align-items: center; gap: 10px; }
.gp-line .input { flex: 1; min-width: 0; }
.gp-shop { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.input--sm { padding: 7px 10px; font-size: 13px; }

/* ---- 右栏 ---- */
.side { display: flex; flex-direction: column; gap: 16px; }
.sidebox { border: 1px solid #2d3748; background: #1d2330; border-radius: var(--radius); overflow: hidden; }
.sidebox__hd {
  padding: 10px 12px; border-bottom: 1px solid #2d3748;
  font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: #98a2b3;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebox__bd { padding: 12px; }

.prog { display: flex; align-items: baseline; gap: 7px; }
.prog b { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.prog span { font-family: var(--font-mono); font-size: 11px; color: #475467; }
.progbar { height: 6px; background: #161b26; border: 1px solid #2d3748; border-radius: 4px; margin-top: 9px; }
.progbar i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .35s cubic-bezier(.22,1,.36,1); }

.mini { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; padding: 4px 0; color: #98a2b3; }
.mini b { color: #fff; font-variant-numeric: tabular-nums; }

.log { max-height: 268px; overflow-y: auto; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65; }
.log div { padding: 4px 12px; border-bottom: 1px solid rgba(45,55,72,.5); color: #98a2b3; display: flex; gap: 8px; }
.log time { color: #475467; flex-shrink: 0; }
.log .lv-tx { color: var(--orange); }
.log .lv-ok { color: var(--green); }
.log .lv-er { color: #f97066; }
.log::-webkit-scrollbar { width: 5px; }
.log::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
.log::-webkit-scrollbar-track { background: #161b26; }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast > div {
  border: 1px solid var(--text-1);
  background: var(--text-1); color: #fff;
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: slidein .28s cubic-bezier(.22,1,.36,1);
}
.toast > div.t-err { background: var(--red); border-color: var(--red); color: #fff; }
.toast > div.t-ok { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes slidein { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ============================================================
   05 ERP 网关配置
   ============================================================ */
.filterrow {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.input--sm { padding: 6px 10px; font-size: 12px; min-width: 110px; }
.input--sm[type="date"] { min-width: 140px; }

.erp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.panel--wide { grid-column: 1 / -1; }
@media (max-width: 880px) { .erp-grid { grid-template-columns: 1fr; } }

.form { display: flex; flex-direction: column; gap: 14px; }
.form .field { display: flex; flex-direction: column; gap: 5px; }
.form .field > span {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--text-2);
}
.form .field input, .form .field select {
  font-family: var(--font-mono); font-size: 13px; padding: 9px 12px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-1); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form .field input:focus, .form .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,109,245,.12); }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.erp-state {
  margin-top: 14px; padding: 12px 14px; font-size: 13px;
  border: 1px solid; border-radius: var(--radius-sm); display: flex; gap: 9px; align-items: center;
}
.erp-state.ok { border-color: var(--green-border); background: var(--green-bg); color: #067647; }
.erp-state.warn { border-color: var(--orange-border); background: var(--orange-bg); color: #b54708; }
.erp-state.err { border-color: var(--red-border); background: var(--red-bg); color: #912018; }
.erp-state b { font-size: 15px; }

.panel__hd-sub {
  margin-left: auto; font-family: var(--font-body); font-size: 11px;
  color: var(--text-3); font-weight: 500;
}

.cache-list {
  max-height: 320px; overflow-y: auto; font-family: var(--font-mono); font-size: 12px;
  border-top: 1px solid var(--border);
}
.cache-row {
  display: grid; grid-template-columns: 1.4fr 1.6fr 1fr; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border); align-items: center;
}
.cache-row:nth-child(odd) { background: var(--surface-2); }
.cache-row .mono { color: var(--primary); }

.hint { font-size: 12px; color: var(--text-3); font-family: var(--font-body); }

.erp-log {
  margin-top: 12px; max-height: 320px; overflow-y: auto;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.6;
  border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm);
}
.erp-log div { padding: 4px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 9px; color: var(--text-2); }
.erp-log time { color: var(--text-3); flex-shrink: 0; }
.erp-log .lv-tx { color: var(--orange); }
.erp-log .lv-ok { color: var(--green); }
.erp-log .lv-er { color: var(--red); }

.empty {
  border: 1px dashed var(--border-strong);
  padding: 48px 28px;
  text-align: center;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: var(--radius);
}
.empty h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.empty p { font-size: 13px; max-width: 460px; margin: 0 auto 16px; line-height: 1.65; }

/* ============================================================
   06 分拣显示屏（大屏）
   ============================================================ */
.display { min-height: calc(100vh - 64px); background: #161b26; padding: 18px; color: #e4e7ec; }
.display__inner { display: flex; flex-direction: column; gap: 16px; }
.display__top {
  background: #161b26; border: 1px solid #2d3748; border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.display__line { display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding-right: 22px; border-right: 1px solid #2d3748; }
.display__line label { font-size: 13px; font-weight: 500; color: #98a2b3; }
.display__line b { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: #4f6df5; }
.display__cards { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; align-items: center; }
.display__card { display: flex; flex-direction: column; gap: 4px; }
.display__card label { font-size: 12px; font-weight: 500; color: #98a2b3; }
/* 拣货单号 */
.display__card--sheet b { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: #e4e7ec; }
/* 完成率 */
.display__card--pct b { font-family: var(--font-mono); font-size: 28px; font-weight: 800; color: var(--green); }
/* 总数量：完成数量 / 任务数量 */
.dq { display: flex; align-items: flex-end; gap: 8px; }
.dq-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dq-label { font-size: 11px; font-weight: 500; color: #64748b; }
.dq-num { font-family: var(--font-mono); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.dq-num--done { font-size: 52px; color: var(--green); }
.dq-num--task { font-size: 36px; color: #e4e7ec; }
.dq-sep { font-size: 30px; color: #475569; font-weight: 300; padding-bottom: 4px; }
.display__card span { font-size: 12px; color: #98a2b3; }
.display__card--putinfo { min-width: 280px; max-width: 420px; }
/* 投放信息两行 */
.putinfo { display: flex; flex-direction: column; gap: 3px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.putinfo .pi-row { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.putinfo .pi-item { display: inline-flex; align-items: baseline; gap: 4px; font-size: 15px; color: #e4e7ec; font-weight: 700; }
.putinfo .pi-item em { font-style: normal; font-size: 11px; font-weight: 500; color: #98a2b3; font-family: var(--font-body); }
.putinfo .pi-item--name { color: #fff; font-weight: 800; }
.putinfo .pi-item--qty { color: var(--green); font-weight: 800; font-size: 17px; }
.display .wall { background: transparent; border: none; padding: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .station__body { flex-direction: column; }
  .kpicards { grid-template-columns: repeat(3, 1fr); }
  .sheet-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; overflow-x: auto; }
  .rail__brand, .rail__foot { display: none; }
  .rail__nav { display: flex; padding: 0; }
  .navitem { white-space: nowrap; }
  .navitem__no { display: none; }
  .view { padding: 16px; }
  .kpicards { grid-template-columns: repeat(2, 1fr); }
  .sheet-grid { grid-template-columns: 1fr; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: #fff; }
  .rail, .topbar, .hazard, .no-print, .toast { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .view { padding: 0; max-width: none; }
  .sheet { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .sheet .table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table { font-size: 11px; }
  .table td { padding: 5px 7px; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ---------- 店铺多选筛选框 ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal__mask { position: absolute; inset: 0; background: rgba(16,24,40,.45); }
.modal__box {
  position: relative; z-index: 1; width: min(92vw, 760px); max-height: 86vh;
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(16,24,40,.28); overflow: hidden;
}
.modal__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.modal__title { font-size: 16px; font-weight: 700; color: var(--text-1); margin: 0; }
.modal__head-actions { margin-left: auto; display: flex; gap: 8px; }
.modal__body { padding: 16px 20px; overflow: auto; }
.modal__foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border); background: var(--surface-2);
}
.shop-filterbar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.shop-filterbar .input--sm { min-width: 96px; flex: 1 1 96px; }
.shop-listhead {
  display: flex; align-items: center; gap: 12px; padding: 8px 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.shop-count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.shop-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.shop-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.shop-item:nth-child(odd) { background: var(--surface-2); }
.shop-item:hover { background: var(--primary-50); }
.shop-item__code { font-family: var(--font-mono); color: var(--primary); font-size: 13px; flex: 0 0 110px; }
.shop-item__name { font-size: 13px; color: var(--text-1); flex: 1 1 auto; }
.shop-item__meta { font-size: 11px; color: var(--text-3); flex: 0 0 auto; text-align: right; }
.shop-item input { transform: scale(1.1); }
.shop-empty { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }

/* ============================================================
   登录页
   ============================================================ */
.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f2f5 0%, #e8eaf0 100%);
}
.login[hidden] { display: none; }

.login__card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.login__hazard { height: 4px; background: linear-gradient(90deg, var(--primary), var(--purple)); }

.login__brand {
  padding: 32px 28px 20px;
}
.login__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.login__mark::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,109,245,.2);
}
.login__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-top: 12px;
  line-height: 1.2;
  color: var(--text-1);
}
.login__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-top: 8px;
}

.login__form {
  padding: 8px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login__input {
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.login__err {
  margin: 0 28px;
  padding: 10px 14px;
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: #912018;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.login__err[hidden] { display: none; }
.login__btn {
  margin: 8px 0 6px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.login__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-3);
}
.login__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18,183,106,.2);
}
