/* ============================================================
   成品发货系统 · 样式
   电脑 / 手机 / PDA 触摸屏通用；打印单独一套
   ============================================================ */

:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --sunken: #eef2f7;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #16202c;
  --ink-2: #46536a;
  --ink-3: #78859a;
  --ink-4: #9aa6b6;
  --brand: #12609e;
  --brand-2: #1c7cbe;
  --brand-soft: #e8f2fb;
  --brand-deep: #0e5184;
  --ok: #10805c;
  --ok-soft: #e3f6ee;
  --warn: #a86a06;
  --warn-soft: #fdf2dc;
  --danger: #bf3427;
  --danger-soft: #fdeceb;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 52, .05), 0 6px 20px -12px rgba(16, 32, 52, .18);
  --sidebar: 216px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.2px; }
p { margin: 0 0 8px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------------- 布局 ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: linear-gradient(180deg, #0f1b2b 0%, #16273d 100%);
  color: #cfdae8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(160deg, #2b93d6, #12609e);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 14px -6px rgba(43, 147, 214, .9);
  flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-text b { display: block; color: #fff; font-size: 14px; letter-spacing: .2px; }
.brand-text span { display: block; font-size: 11px; color: #7f93ab; margin-top: 1px; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-group { margin-top: 12px; }
.nav-group > span {
  display: block; padding: 4px 10px; font-size: 10.5px; letter-spacing: .12em;
  color: #64798f; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px; color: #c3cfdd;
  font-size: 13px; margin-top: 2px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active {
  background: linear-gradient(90deg, rgba(28, 124, 190, .95), rgba(28, 124, 190, .55));
  color: #fff; font-weight: 600;
  box-shadow: 0 6px 16px -10px rgba(28, 124, 190, .9);
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: .9; }

.sidebar-foot {
  padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11.5px; color: #7f93ab;
}
.sidebar-foot .who { display: flex; align-items: center; gap: 8px; color: #dbe6f2; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(150deg, #2b93d6, #0f4b78);
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex: 0 0 64px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
/* 页面标题区：图标 + 21px 标题 + 系统代号 + 13px 业务口径，全站统一 */
.page-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-ico {
  width: 28px; height: 28px; flex: 0 0 28px;
  display: grid; place-items: center; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-line, var(--line));
}
.page-ico svg { width: 16px; height: 16px; }
.page-head-main { min-width: 0; }
.page-title-row { display: flex; align-items: center; gap: 8px; }
.topbar h1 { font-size: 21px; letter-spacing: -.2px; line-height: 1.2; }
.page-code {
  flex: 0 0 auto; padding: 2px 6px; border-radius: 3px;
  background: var(--sunken); border: 1px solid var(--line);
  color: var(--ink-3); white-space: nowrap;
  font: 600 10px/1.4 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .06em;
}
.topbar .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.topbar .spacer { flex: 1; }

.content { padding: 16px 18px 28px; flex: 1; min-width: 0; }

/* ---------------- 卡片 / 网格 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.card-head h2, .card-head h3 { font-size: 13px; }
.card-body { padding: 14px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 12px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 10px; }

/* ---------------- KPI ---------------- */
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 13px 14px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--brand-2);
}
.kpi.ok::after { background: var(--ok); }
.kpi.warn::after { background: var(--warn); }
.kpi.danger::after { background: var(--danger); }
.kpi .label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.kpi .value { font-size: 25px; font-weight: 700; letter-spacing: -.6px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer; white-space: nowrap; transition: .15s;
  text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(180deg, var(--brand-2), var(--brand-deep));
  box-shadow: 0 6px 16px -8px rgba(18, 96, 158, .9);
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); background: linear-gradient(180deg, var(--brand-2), var(--brand-deep)); }

.btn-ok { border-color: transparent; background: var(--ok); color: #fff; }
.btn-ok:hover { background: #0c6d4e; color: #fff; }
.btn-danger { border-color: transparent; background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a52a1f; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- 表单 ---------------- */
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; font-weight: 550; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder { color: var(--ink-4); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8494a8 50%), linear-gradient(135deg, #8494a8 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.input-inline { display: flex; align-items: center; gap: 6px; }
.hint { font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .05em;
  color: var(--ink-3); text-transform: uppercase;
  background: var(--sunken); padding: 8px 10px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.sel { background: var(--brand-soft); }
.table tbody tr.bad { background: var(--danger-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.table-compact td, .table-compact th { padding: 5px 8px; }

.empty {
  padding: 44px 16px; color: var(--ink-4); font-size: 12.5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center;
}
.empty svg { width: 26px; height: 26px; opacity: .45; margin-bottom: 2px; }
.empty b { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.empty span { font-size: 12px; line-height: 1.7; }

/* ---------------- 徽标 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: var(--brand-soft); color: var(--brand-deep); }
.badge.gray { background: var(--sunken); color: var(--ink-3); }

/* ---------------- 提示条 ---------------- */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 200px; max-width: 380px; padding: 10px 13px; border-radius: 9px;
  background: #16273d; color: #fff; font-size: 13px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: toast-in .18s ease-out;
}
.toast.ok { background: #0e7350; }
.toast.err { background: #a52a1f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.flash { padding: 10px 13px; border-radius: 9px; font-size: 13px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: #b6e3d2; color: #0b6349; }
.flash.err { background: var(--danger-soft); border-color: #f2c4bf; color: #a02b20; }
.flash.warn { background: var(--warn-soft); border-color: #f0d9a5; color: #8a5604; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 22, 36, .55);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 80;
  backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 460px; background: var(--surface); border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); overflow: hidden;
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: scale(.97); opacity: .6; } }
.modal-head { padding: 14px 16px; font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 0 16px 14px; font-size: 13.5px; color: var(--ink-2); }
.modal-foot { padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* 拦截弹窗（红色，醒目） */
.modal.m-danger .modal-head { background: var(--danger); color: #fff; }
.modal.m-danger .modal-body { background: #fff8f7; }
.modal.m-danger .big { font-size: 17px; font-weight: 700; color: var(--danger); margin: 6px 0; }
.modal.m-ok .modal-head { background: var(--ok); color: #fff; }

/* ---------------- 登录页 ---------------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #0d1826;
}
.login-art {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 10% 0%, rgba(43, 147, 214, .35), transparent 60%),
    linear-gradient(160deg, #0f2135, #0a1626 70%);
  padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-art .wm {
  position: absolute; right: -60px; bottom: -60px; font-size: 260px; font-weight: 800;
  color: rgba(255, 255, 255, .035); line-height: 1; letter-spacing: -10px; user-select: none;
}
.login-art h1 { font-size: 30px; letter-spacing: -.6px; line-height: 1.25; }
.login-art h1 em { font-style: normal; color: #4fb0ee; }
.login-art p { color: #9fb3c8; max-width: 420px; margin-top: 12px; font-size: 13.5px; line-height: 1.7; }
.login-art img.art { max-width: 100%; border-radius: 12px; margin-top: 22px; box-shadow: 0 20px 50px -20px #000; }
.login-points { display: grid; gap: 10px; margin-top: 26px; max-width: 460px; }
.login-points div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #c6d5e4; }
.login-points b { color: #fff; font-weight: 600; }
.login-points i {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto; margin-top: 1px;
  background: rgba(79, 176, 238, .16); color: #4fb0ee; display: grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 700;
}
/* 右侧：真实仓库视频背景，视频和遮罩都在卡片下层 */
.login-form-wrap {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; padding: 32px; background: var(--bg);
}
.login-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  /* 画面本身很亮，压一点对比度，避免抢登录框 */
  filter: saturate(.78) contrast(.94);
}
.login-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(12, 30, 50, .12), transparent 42%),
    linear-gradient(180deg, rgba(238, 244, 250, .50), rgba(226, 236, 246, .62));
}
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 372px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 24px;
  box-shadow: 0 30px 70px -28px rgba(12, 28, 48, .55), 0 4px 18px rgba(12, 28, 48, .12);
}
.login-card .mark {
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 14px;
  background: linear-gradient(160deg, #2b93d6, #12609e); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
  box-shadow: 0 10px 22px -12px rgba(43, 147, 214, .95);
}
.login-card h2 { font-size: 21px; }
.login-card .sub { color: var(--ink-3); font-size: 12.5px; margin: 4px 0 22px; }
.login-card .input { height: 42px; font-size: 14px; }
.login-card .btn { height: 42px; font-size: 14.5px; margin-top: 4px; }
.login-foot { margin-top: 18px; font-size: 11.5px; color: var(--ink-4); text-align: center; }

/* ---------------- 扫码区 ---------------- */
.scan-box {
  border: 2px dashed var(--line-strong); border-radius: 12px;
  padding: 14px; background: var(--surface-2); transition: .15s;
}
.scan-box:focus-within { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.scan-box .label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.scan-input {
  width: 100%; height: 52px; font-size: 19px; font-weight: 600; letter-spacing: .5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 12px; background: #fff; outline: none;
}
.scan-input:focus { border-color: var(--brand-2); }

.scan-result { border-radius: 10px; padding: 12px 14px; margin-top: 12px; display: none; font-size: 13.5px; }
.scan-result.show { display: block; }
.scan-result.ok { background: var(--ok-soft); border: 1px solid #a9dfc9; color: #0a6349; }
.scan-result.err { background: var(--danger-soft); border: 1px solid #f2bdb7; color: #9d2a1f; }
.scan-result.warn { background: var(--warn-soft); border: 1px solid #eed6a0; color: #7f5003; }
.scan-result b { font-size: 15px; }

/* ---------------- 打印 ---------------- */
.print-sheet { background: #fff; color: #000; }
.print-only { display: none; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toast-wrap { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; border-radius: 0; }
  .print-only { display: block; }
  table.table { font-size: 11px; }
  .table th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet { display: block !important; }
}

/* A4 / B5 打印范围（纸张尺寸由页面内联 @page 决定） */
.sheet-a4 { width: 210mm; min-height: 297mm; padding: 12mm 10mm; margin: 0 auto; background: #fff; }
.sheet-b5 { width: 176mm; min-height: 250mm; padding: 8mm; margin: 0 auto; background: #fff; }
@media print {
  .sheet-a4, .sheet-b5 { width: auto; min-height: auto; padding: 0; margin: 0; }
}

/* 打印抬头 */
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.doc-head h1 { font-size: 19px; letter-spacing: 1px; }
.doc-head .meta { font-size: 11.5px; color: #333; text-align: right; line-height: 1.7; }
.doc-sub { display: flex; gap: 18px; font-size: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.doc-sub b { font-weight: 650; }
.doc-foot { margin-top: 14px; display: flex; justify-content: space-between; font-size: 11.5px; color: #333; }
.sign-line { display: flex; gap: 24px; font-size: 11.5px; margin-top: 18px; }
.sign-line span { border-bottom: 1px solid #666; min-width: 110px; display: inline-block; }

/* 托盘单 */
.pallet-sheet { font-size: 12px; }
.pallet-sheet .ph { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px solid #000; padding-bottom: 6px; }
.pallet-sheet .ph h1 { font-size: 16px; }
.pallet-sheet .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; }
.pallet-sheet .kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; margin: 8px 0; }
.pallet-sheet .kv div { display: flex; gap: 6px; font-size: 11.5px; }
.pallet-sheet .kv span { color: #444; min-width: 58px; }
.pallet-sheet .qr { text-align: center; }
.pallet-sheet .qr canvas, .pallet-sheet .qr img { width: 34mm; height: 34mm; }
.pallet-sheet .qr .t { font-size: 9px; color: #444; margin-top: 2px; letter-spacing: .5px; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs a {
  padding: 8px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-weight: 550;
}
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs a:hover { color: var(--brand); }

/* ---------------- PDA / 手机 ---------------- */
.pda-tabs {
  display: none;
}
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar {
    position: static; width: auto; height: auto; flex: none;
    background: #0f1b2b;
  }
  .sidebar .nav { display: flex; overflow-x: auto; padding: 6px; gap: 4px; }
  .sidebar .nav-group { display: contents; }
  .sidebar .nav-group > span { display: none; }
  .sidebar .nav a { white-space: nowrap; padding: 8px 11px; font-size: 12.5px; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; }
  .brand { padding: 9px 12px; }
  .brand-mark { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
  .brand-text b { font-size: 13px; }
  .brand-text span { display: none; }
  .sidebar-foot { padding: 7px 12px; }
  .avatar { width: 24px; height: 24px; font-size: 11px; }
  .content { padding: 12px; }
  .topbar { position: static; height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .topbar h1 { font-size: 18px; }
  .page-ico { width: 24px; height: 24px; flex-basis: 24px; border-radius: 5px; }
  .page-ico svg { width: 14px; height: 14px; }
  .topbar .sub { font-size: 12px; }
  .topbar a[href*="p=pda"] { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3.as-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none !important; }
  .kpi { padding: 10px 11px; }
  .kpi .label { font-size: 11px; }
  .kpi .value { font-size: 21px; }
  .kpi .hint { font-size: 10px; }
  .doc-sub { gap: 8px 14px; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form-wrap { min-height: 100vh; }
}

/* 触摸屏 PDA：按钮更大、字号更大、去掉 hover 依赖 */
body.touch .btn { height: 44px; font-size: 15px; padding: 0 16px; }
body.touch .btn-sm { height: 36px; font-size: 13.5px; }
body.touch .input, body.touch select.input { height: 46px; font-size: 16px; }
body.touch .scan-input { height: 60px; font-size: 22px; }
body.touch .table td, body.touch .table th { padding: 11px 10px; font-size: 14px; }
body.touch .kpi .value { font-size: 28px; }
body.touch .nav a { padding: 12px 12px; }

/* 手机端扫码页：结果条吸底 */
.pda-sticky { position: sticky; bottom: 0; }

/* ---------------- 杂项 ---------------- */
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.flex1 { flex: 1; min-width: 0; }
.w-full { width: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.scroll-y { overflow-y: auto; }
.side-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
@media (max-width: 1100px) { .side-split { grid-template-columns: 1fr; } }

/* 登录页流程图（填充左侧留白） */
.login-flow {
  display: flex; align-items: stretch; gap: 10px; width: 100%;
  margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .09);
}
.login-flow > div {
  flex: 1 1 0; min-width: 0;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px; padding: 11px 10px;
}
.login-flow b { display: block; color: #e4edf7; font-size: 13px; font-weight: 650; white-space: nowrap; }
.login-flow span { display: block; color: #8399b0; font-size: 10.5px; margin-top: 3px; white-space: nowrap; }
.login-flow > i {
  width: 18px; height: 1px; flex: 0 0 18px; align-self: center;
  background: linear-gradient(90deg, rgba(79, 176, 238, .08), rgba(79, 176, 238, .8));
  position: relative;
}
.login-flow > i::after {
  content: ''; position: absolute; right: -1px; top: -2.5px;
  width: 6px; height: 6px; border-top: 1px solid rgba(79, 176, 238, .8); border-right: 1px solid rgba(79, 176, 238, .8);
  transform: rotate(45deg);
}
@media (max-width: 1100px) { .login-flow { display: none; } }

/* ---------------- 登录视频：降级 ---------------- */
/* 手机 / PDA 用静态首帧（省流量省电）；系统开了「减少动态效果」也一样。
   注意：CSS 里的 url() 相对 assets/ 目录，不是站点根目录。 */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .login-video { display: none; }
  .login-form-wrap {
    background-image:
      linear-gradient(180deg, rgba(238, 244, 250, .62), rgba(226, 236, 246, .74)),
      url("video/login-bg.jpg");
    background-size: cover;
    background-position: center;
  }
  .login-veil {
    background: linear-gradient(180deg, rgba(238, 244, 250, .26), rgba(226, 236, 246, .36));
  }
}
