/* Pacific 新系统通用样式（主后台 + 仓库端 + 登录页）。无构建步骤；页面模块只用这里的类名。 */
:root {
  --bg: #f4f6f9; --panel: #fff; --line: #e3e7ee; --line2: #eef1f5;
  --text: #1f2633; --muted: #6b7484; --faint: #9aa3b2;
  --primary: #2563eb; --primary-d: #1d4ed8; --primary-l: #e8efff;
  --ok: #15803d; --ok-l: #e7f6ec; --warn: #b45309; --warn-l: #fff4e0;
  --bad: #c62828; --bad-l: #fdecec; --info: #0e7490; --info-l: #e3f5f9;
  --side: #121a2b; --side-text: #c4cbd8; --side-active: #2563eb;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.loading, .empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ── 按钮 / 表单 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font-size: 14px; cursor: pointer;
  white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: #f7f8fa; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { color: var(--bad); border-color: #f2c4c4; } .btn-danger:hover { background: var(--bad-l); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; } .btn-ok:hover { filter: brightness(.95); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 48px; font-size: 16px; padding: 0 18px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 4px 6px; font-size: 14px; }
.icon-btn { background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px 8px; color: inherit; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px;
  background: #fff; min-height: 34px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-l); border-color: var(--primary); }
label.field { display: block; margin-bottom: 12px; } label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
label.field input, label.field select, label.field textarea { width: 100%; }
.pw-wrap { display: flex; gap: 6px; align-items: stretch; } .pw-wrap input { flex: 1 1 auto; min-width: 0; } .pw-wrap .pw-toggle { flex: 0 0 auto; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 13px; color: var(--text); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip .n { opacity: .75; margin-left: 2px; }

/* ── 卡片 / 统计 / 徽章 / 表格 ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card-title { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: default; }
.stat.clickable { cursor: pointer; } .stat.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.stat-label { color: var(--muted); font-size: 12px; } .stat-value { font-size: 22px; font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; line-height: 18px; background: var(--line2); color: var(--muted); white-space: nowrap; }
.tag-ok { background: var(--ok-l); color: var(--ok); } .tag-warn { background: var(--warn-l); color: var(--warn); }
.tag-bad { background: var(--bad-l); color: var(--bad); } .tag-info { background: var(--info-l); color: var(--info); }
.tag-primary { background: var(--primary-l); color: var(--primary); }
.badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
.table th { background: #f8f9fb; color: var(--muted); font-weight: 500; white-space: nowrap; position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hl td { background: #fffbe6; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--line2); cursor: zoom-in; display: block; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px; }
.progress { height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); }
.bar { padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; font-size: 13px; }
.bar-info { background: var(--primary-l); color: var(--primary-d); } .bar-warn { background: var(--warn-l); color: var(--warn); }
.bar-ok { background: var(--ok-l); color: var(--ok); } .bar-bad { background: var(--bad-l); color: var(--bad); }

/* ── 弹窗 / 提示 ── */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 860px; }
.modal-head { padding: 14px 16px; font-weight: 600; border-bottom: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sheet-mask { align-items: flex-end; padding: 0; }
.sheet { border-radius: 14px 14px 0 0; max-width: 560px; }
.sheet .sheet-btn { display: block; width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--line2); background: #fff; font-size: 16px; cursor: pointer; }
.sheet .sheet-btn.danger { color: var(--bad); }
.toast-box { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1f2633; color: #fff; padding: 8px 16px; border-radius: 6px; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 1500; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; }
.photo-edit-modal.wide { max-width: 1180px; }
.photo-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 16px; align-items: start; }
.photo-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; height: min(630px, calc(100dvh - 190px)); min-height: 300px; }
.photo-edit-viewer { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.photo-edit-tools { gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.photo-edit-stage { flex: 1; min-height: 0; overflow: auto; position: relative; background: #edf1f5; border: 1px solid var(--line2); border-radius: 8px; }
.photo-edit-canvas { position: relative; }
.photo-edit-image { position: absolute; left: 50%; top: 50%; max-width: none; object-fit: contain; visibility: hidden; }
.photo-edit-image.is-ready { visibility: visible; }
.photo-edit-status { position: absolute; inset: 20px; display: grid; place-items: center; text-align: center; }
.photo-edit-status[hidden] { display: none; }
.photo-edit-fields { overflow: auto; }
.purchase-change { background: #fff3cd; box-shadow: inset 4px 0 var(--warn); }
.purchase-status-change-list { max-height: 240px; overflow: auto; }
.purchase-actions .btn { white-space: normal; max-width: 100%; }
.settlement-grid { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.settlement-grid .field { flex: 1 1 180px; max-width: 260px; }
.settlement-number { width: 110px; }
.settlement-result { margin-top: 6px; font-size: 12px; }
.purchase-order-table { min-width: 1680px; }
.purchase-order-table th:first-child, .purchase-order-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 190px; max-width: 220px; box-shadow: inset -1px 0 var(--line); }
.purchase-order-table th:first-child { background: #f6f8fa; z-index: 3; }
.surface-admin .purchase-order-table th:first-child { position: sticky; left: 0; z-index: 6; }
.purchase-order-table tr.hl td:first-child { background: #fff3cd; }
.purchase-order-table .settlement-number { width: 100px; scroll-margin-inline-start: 220px; }
.purchase-order-table .settlement-result { min-width: 135px; white-space: normal; }
.purchase-settlement-settings { margin-bottom: 12px; }
.settlement-totals { padding: 12px 0; font-weight: 600; }
.settlement-actions { gap: 12px; margin-top: 4px; }
.settlement-line { display: grid; grid-template-columns: minmax(180px,1.4fr) repeat(3,minmax(100px,1fr)); gap: 16px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line2); }
.settlement-line input { width: 100%; }
.settlement-line .field { margin: 0; }
@media (max-width: 980px) {
  .photo-layout { grid-template-columns: minmax(0,1fr); }
  .photo-batches { max-height: 260px; overflow: auto; }
}
@media (max-width: 700px) {
  .photo-edit-grid { grid-template-columns: 1fr; height: auto; gap: 12px; }
  .photo-edit-viewer { height: min(440px, 47dvh); min-height: 250px; }
  .photo-edit-fields { overflow: visible; }
  .settlement-line { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .settlement-line > :first-child { grid-column: 1 / -1; }
  .settlement-line > :last-child { grid-column: 1 / -1; }
}

/* ── 登录 / 错误页（主系统；浅底 + 完整标，沿用旧系统 iOS 浅色登录习惯） ── */
.surface-login { min-height: 100vh; background: var(--bg); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px 28px;
  box-shadow: 0 1px 2px rgba(11,46,74,.04), 0 12px 32px rgba(11,46,74,.08); display: flex; flex-direction: column; gap: 14px; }
.login-logo { width: 56px; height: 56px; display: block; margin: 0 auto; }
.login-title { font-size: 22px; font-weight: 650; text-align: center; margin: 2px 0 0; color: var(--brand-deep, var(--text)); letter-spacing: .2px; }
.login-sub { color: var(--muted); text-align: center; margin: -10px 0 6px; font-size: 13px; letter-spacing: 2px; }
.login-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-field > span { font-size: 13px; color: var(--muted); }
.login-card input { height: 44px; font-size: 15px; width: 100%; }
.login-card .btn { height: 44px; font-size: 15px; font-weight: 600; }
.login-error { color: var(--bad); min-height: 20px; font-size: 13px; margin: -4px 0 -6px; }
.login-error:empty { min-height: 0; margin: 0; }
.error-card { text-align: center; }
.error-code { font-size: 44px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; }

/* ── 主后台布局 ── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 208px; flex: 0 0 208px; background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; color: #fff; font-weight: 700; font-size: 17px; }
.nav-group { padding: 6px 0; } .nav-group-title { font-size: 12px; color: #7d879a; padding: 6px 16px; }
.nav-item { display: block; padding: 8px 16px 8px 24px; color: var(--side-text); font-size: 14px; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(37,99,235,.18); color: #fff; border-left-color: var(--side-active); }
.nav-empty { padding: 16px; color: #7d879a; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 16px; position: sticky; top: 0; z-index: 50; }
.page-title { font-size: 17px; margin: 0; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 4px; }
.user-name { color: var(--muted); margin: 0 6px; }
.menu-btn { display: none; }
.content { padding: 16px; flex: 1; min-width: 0; }
.sidebar-mask { display: none; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 200; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 150; }
  .menu-btn { display: inline-block; }
  .user-name { display: none; }
  .content { padding: 10px; }
}

/* ── 仓库端布局（手机优先） ── */
.surface-warehouse { background: #f2f4f7; }
.wh-layout { min-height: 100vh; display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; background: #f2f4f7; }
.wh-topbar { height: 48px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; position: sticky; top: 0; z-index: 50; }
.wh-title { font-weight: 700; font-size: 16px; }
.wh-content { flex: 1; padding: 10px 10px calc(76px + env(safe-area-inset-bottom)); }
.wh-tabs { position: fixed; bottom: 0; left: 0; right: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 60; max-width: 900px; margin: 0 auto; }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 15px; position: relative; text-decoration: none !important; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--primary); border-radius: 0 0 3px 3px; }
.tab .badge { position: absolute; top: 6px; right: calc(50% - 46px); }
.wh-list { display: flex; flex-direction: column; gap: 8px; }
.wh-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; gap: 10px; align-items: flex-start; }
.wh-item.need-retake { border-color: #f5b5b5; background: #fff8f8; } .wh-item.dup { border-color: #f3d48b; background: #fffcf2; }
.wh-item .thumb { width: 64px; height: 64px; flex: 0 0 64px; }
.wh-item .main { flex: 1; min-width: 0; } .wh-item .title { font-weight: 600; word-break: break-all; }
.wh-item .sub { color: var(--muted); font-size: 12px; word-break: break-all; }
.wh-big-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wh-big-btns .btn { height: 64px; font-size: 17px; }
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.queue .q { position: relative; } .queue .q img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.queue .q span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); text-align: center; border-radius: 0 0 6px 6px; }
.queue .q.err span { background: rgba(198,40,40,.85); } .queue .q.done span { background: rgba(21,128,61,.8); }
.id-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.id-card .head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.id-card .photo-no { font-size: 18px; font-weight: 700; }
.id-card .body { display: grid; grid-template-columns: 1fr 180px; gap: 10px; }
.id-card .qr { text-align: center; } .id-card .qr img { width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 6px; }
.id-card .shots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; } .id-card .shots img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.deadline-safe { color: var(--ok); } .deadline-warning { color: var(--warn); } .deadline-danger, .deadline-overdue { color: var(--bad); font-weight: 600; }
@media (max-width: 560px) { .id-card .body { grid-template-columns: 1fr; } }
@media print {
  .wh-topbar, .wh-tabs, .topbar, .sidebar, .no-print { display: none !important; }
  .wh-content, .content { padding: 0; }
}

/* ════════════════════════════════════════════════════════════════════════════
   主后台 + 主系统登录页视觉层（2026-10-31，anthropics/skills frontend-design 方法）
   品牌色取自新 Pacific 标：Deep Sea #0B2E4A / Tide #0A6CB0 / Lagoon #22A3DE / Foam #E7F2FA / Mist #F3F6F9 / Ink #17212E。
   只作用于 body.surface-admin / body.surface-login；仓库端沿用上面的基础样式（与主系统隔离）。
   ════════════════════════════════════════════════════════════════════════════ */
body.surface-admin, body.surface-login {
  --bg: #f3f6f9; --panel: #fff; --line: #dfe5ec; --line2: #edf1f5;
  --text: #17212e; --muted: #5f6b7a; --faint: #7b8696;
  --primary: #0a6cb0; --primary-d: #08598f; --primary-l: #e7f2fa;
  --brand-deep: #0b2e4a; --brand-lagoon: #22a3de;
  --ok: #157a3c; --ok-l: #e6f4ea; --warn: #a3520a; --warn-l: #fff3e0; --bad: #c22d2d; --bad-l: #fdecec; --info: #0b6e86; --info-l: #e2f3f7;
  --side: #0b2e4a; --side-text: #c9d6e3; --side-active: #22a3de;
  --radius: 10px; --shadow: 0 1px 2px rgba(11,46,74,.05);
  --focus: 0 0 0 3px rgba(10,108,176,.28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  font-size: 14px; line-height: 1.55; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
.surface-admin h1, .surface-admin h2, .surface-admin h3 { letter-spacing: .2px; }

/* 键盘焦点：只在键盘操作时出现清晰焦点环 */
.surface-admin :focus-visible, .surface-login :focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.surface-admin input:focus, .surface-admin select:focus, .surface-admin textarea:focus,
.surface-login input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.skip-link { position: absolute; left: 8px; top: -40px; z-index: 300; background: #fff; color: var(--primary); padding: 6px 12px; border-radius: 6px; box-shadow: var(--shadow); }
.skip-link:focus { top: 8px; }

/* 控件：统一高度 34 / 小号 30，数字等宽 */
.surface-admin .btn, .surface-login .btn { height: 34px; border-radius: 7px; font-weight: 500; border-color: #d3dbe4; transition: background-color .12s, border-color .12s, box-shadow .12s; }
.surface-admin .btn:hover { background: #f4f7fa; border-color: #c4ced9; }
.surface-admin .btn:active { background: #eaf0f5; }
.surface-admin .btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.surface-admin .btn-primary, .surface-login .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.surface-admin .btn-primary:hover, .surface-login .btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.surface-admin .btn-danger { background: #fff; color: var(--bad); border-color: #efc2c2; }
.surface-admin .btn-danger:hover { background: var(--bad-l); border-color: #e6a5a5; }
.surface-admin .btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.surface-admin .btn:disabled, .surface-login .btn:disabled { opacity: .45; cursor: not-allowed; }
.surface-admin .btn.is-loading, .surface-login .btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.surface-admin .btn.is-loading::after, .surface-login .btn.is-loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(127,140,155,.5); border-top-color: var(--primary); animation: p-spin .7s linear infinite; }
.surface-admin .btn-primary.is-loading::after, .surface-login .btn-primary.is-loading::after { border-color: rgba(255,255,255,.45); border-top-color: #fff; }
.surface-admin .btn-link { color: var(--primary); border-radius: 6px; }
.surface-admin .btn-link:hover { background: var(--primary-l); }
.surface-admin input, .surface-admin select, .surface-admin textarea, .surface-login input {
  border-color: #d3dbe4; border-radius: 7px; min-height: 34px; background-color: #fff; transition: border-color .12s, box-shadow .12s; }
.surface-admin input:hover, .surface-admin select:hover, .surface-admin textarea:hover { border-color: #b9c5d2; }
.surface-admin input::placeholder, .surface-admin textarea::placeholder { color: #8b96a5; }
.surface-admin select { padding-right: 28px; }
.surface-admin input[type=checkbox], .surface-admin input[type=radio] { min-height: 0; width: 16px; height: 16px; accent-color: var(--primary); vertical-align: -3px; }
.surface-admin input[type=date] { font-variant-numeric: tabular-nums; }
.surface-admin label.field > span { color: var(--text); font-weight: 500; }
.surface-admin .chip { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-color: #d3dbe4; color: var(--text); font-variant-numeric: tabular-nums; transition: background-color .12s; }
.surface-admin .chip:hover { background: #f4f7fa; }
.surface-admin .chip.active { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.surface-admin .chips + .chips { margin-top: 6px; }

/* 卡片 / 统计：卡片只做分组；卡片里的统计块不再叠边框阴影 */
.surface-admin .card { border-color: var(--line); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.surface-admin .card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.surface-admin .stats { gap: 12px; margin-bottom: 14px; }
.surface-admin .stat { border-color: var(--line); padding: 12px 14px; box-shadow: var(--shadow); }
.surface-admin .card .stat { background: #f7f9fb; border-color: transparent; box-shadow: none; }
.surface-admin .stat.clickable:hover { border-color: #b9c5d2; }
.surface-admin .card .stat.clickable:hover { background: #eef3f7; }
.surface-admin .stat.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-l); }
.surface-admin .stat-label { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.surface-admin .stat-value { font-size: 24px; font-weight: 600; letter-spacing: -.2px; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 2px; }
.surface-admin .tag { border-radius: 5px; padding: 1px 7px; font-weight: 500; }
.surface-admin .bar { border-radius: 8px; padding: 9px 12px; border: 1px solid transparent; }
.surface-admin .bar-info { border-color: #cfe4f3; } .surface-admin .bar-warn { border-color: #f4dcb5; }
.surface-admin .bar-ok { border-color: #c7e6d1; } .surface-admin .bar-bad { border-color: #f1c6c6; }

/* 表格：表头吸顶、行悬停、数字列右对齐等宽（P.decorate 自动标 .num） */
.surface-admin .table-wrap { border-color: var(--line); border-radius: 8px; }
.surface-admin .card > .table-wrap, .surface-admin .card .table-wrap { box-shadow: none; }
.surface-admin table.table { font-size: 13px; font-variant-numeric: tabular-nums; }
.surface-admin .table th, .surface-admin .table td { padding: 9px 12px; border-bottom-color: var(--line2); }
.surface-admin .table th { background: #f6f8fa; color: var(--muted); font-weight: 600; font-size: 12.5px; z-index: 1; box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.surface-admin .table tbody tr:hover td { background: #f7fafc; }
.surface-admin .table tr.hl td, .surface-admin .table tr.hl:hover td { background: #fff8e1; }
.surface-admin .table th.num, .surface-admin .table td.num { text-align: right; white-space: nowrap; }
.surface-admin .table td.empty-row { text-align: center; color: var(--muted); padding: 28px 12px; }
.surface-admin .table td.clickable { cursor: pointer; }
.surface-admin .table .nowrap-code { white-space: nowrap; }
.surface-admin .table a { font-weight: 500; }
.surface-admin .mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: -.1px; }
.surface-admin .pager { gap: 10px; color: var(--muted); font-variant-numeric: tabular-nums; padding: 14px 8px 2px; }
.surface-admin .thumb { border-radius: 6px; border: 1px solid var(--line2); }

/* 加载 / 空 / 错误 */
.surface-admin .loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--muted); }
.surface-admin .loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--primary); animation: p-spin .7s linear infinite; }
.surface-admin .empty { padding: 40px 16px; color: var(--muted); }
.surface-admin .page-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@keyframes p-spin { to { transform: rotate(360deg); } }
/* 请求进行中：顶部细进度条（>150ms 才出现，避免闪烁） */
.busy-bar { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 2100; pointer-events: none; opacity: 0; transition: opacity .15s;
  background: linear-gradient(90deg, transparent 0, var(--brand-lagoon, #22a3de) 30%, var(--primary) 60%, transparent 100%); background-size: 50% 100%; background-repeat: no-repeat; }
body.is-busy .busy-bar { opacity: 1; animation: p-busy 1.1s ease-in-out infinite; }
@keyframes p-busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* 弹窗 / 提示 */
.surface-admin .modal-mask, .surface-login .modal-mask { background: rgba(11,46,74,.42); }
.surface-admin .modal { border-radius: 12px; box-shadow: 0 24px 60px rgba(11,46,74,.28); }
.surface-admin .modal-head { font-size: 16px; padding: 14px 18px; }
.surface-admin .modal-head .icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 6px; color: var(--muted); }
.surface-admin .modal-head .icon-btn:hover { background: var(--line2); color: var(--text); }
.surface-admin .modal-body { padding: 18px; }
.surface-admin .modal-foot { padding: 12px 18px; background: #fafbfc; border-radius: 0 0 12px 12px; }
.surface-admin .modal .bar-bad.form-error { margin: 0 0 12px; }
.surface-admin .toast, .surface-login .toast { background: #17212e; border-radius: 8px; padding: 10px 16px; box-shadow: 0 8px 24px rgba(11,46,74,.25); }
.surface-admin .toast.ok { background: var(--ok); } .surface-admin .toast.bad { background: var(--bad); }

/* 侧栏：深海色 + 新浪花标（全页唯一的“大胆”处） */
.surface-admin .admin-layout { align-items: flex-start; background: linear-gradient(to right, var(--side) 216px, transparent 216px); }
.surface-admin .sidebar { width: 216px; flex-basis: 216px; background: var(--side); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.surface-admin .brand { padding: 18px 18px 14px; gap: 10px; color: #fff; font-size: 17px; font-weight: 650; letter-spacing: .3px; text-decoration: none; }
.surface-admin .brand:hover { text-decoration: none; }
.surface-admin .brand-img { width: 30px; height: 30px; display: block; }
.surface-admin .nav { padding-bottom: 16px; }
.surface-admin .nav-group { padding: 4px 0 6px; }
.surface-admin .nav-group-title { font-size: 12px; color: #8aa3ba; padding: 8px 18px 4px; letter-spacing: .5px; }
.surface-admin .nav-item { margin: 1px 10px; padding: 7px 10px 7px 12px; border-radius: 7px; border-left: 0; color: var(--side-text); position: relative; }
.surface-admin .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.surface-admin .nav-item.active { background: rgba(34,163,222,.18); color: #fff; font-weight: 600; }
.surface-admin .nav-item.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-active); }
.surface-admin .nav-item:focus-visible { box-shadow: 0 0 0 2px var(--brand-lagoon); }

/* 顶栏 */
.surface-admin .topbar { height: 56px; padding: 0 20px; border-bottom-color: var(--line); gap: 12px; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); }
.surface-admin .page-title { font-size: 18px; font-weight: 650; color: var(--text); }
.surface-admin .topbar-right { gap: 2px; }
.surface-admin .topbar-right .btn-link { color: var(--muted); font-size: 13.5px; padding: 6px 10px; }
.surface-admin .topbar-right .btn-link:hover { color: var(--text); background: var(--line2); text-decoration: none; }
.surface-admin .user-name { color: var(--text); font-weight: 500; margin: 0 8px 0 4px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 13.5px; }
.surface-admin .content { padding: 20px; }
.surface-admin .menu-btn { width: 36px; height: 36px; border-radius: 8px; font-size: 20px; padding: 0; color: var(--text); }
.surface-admin .menu-btn:hover { background: var(--line2); }

@media (max-width: 900px) {
  .surface-admin .sidebar { height: 100vh; height: 100dvh; }
  .surface-admin.nav-open .sidebar { box-shadow: 8px 0 24px rgba(11,46,74,.25); }
  .surface-admin .topbar { height: 52px; padding: 0 8px 0 6px; gap: 6px; }
  .surface-admin .page-title { font-size: 17px; }
  .surface-admin .topbar-right .btn-link { padding: 6px 8px; min-height: 36px; }
  .surface-admin .content { padding: 10px; }
  .surface-admin .card { padding: 12px; margin-bottom: 10px; border-radius: 10px; }
  .surface-admin .stats { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .surface-admin .stat-value { font-size: 20px; }
  /* 手机：表格不压缩换行，横向滚动（芯片仍换行，保证「待付款」等异常入口一眼可见） */
  .surface-admin .chip { height: 34px; }
  .surface-admin .table th, .surface-admin .table td { white-space: nowrap; padding: 9px 10px; }
  .surface-admin .btn, .surface-admin input, .surface-admin select { min-height: 38px; }
  .surface-admin .btn { height: 38px; } .surface-admin .btn-sm { height: 34px; }
  .surface-admin .row > input:not([type=checkbox]):not([type=radio]), .surface-admin .row > select { flex: 1 1 140px; min-width: 0; }
  .surface-admin .modal-mask { align-items: flex-end; padding: 0; }
  .surface-admin .modal { max-width: none; border-radius: 14px 14px 0 0; max-height: 92vh; }
  .surface-admin .modal-foot { border-radius: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .surface-admin .modal-foot .btn { flex: 1; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .surface-admin *, .surface-login * { transition: none !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  body.is-busy .busy-bar { animation: none; background-position: 50% 0; }
}
@media print { .surface-admin .busy-bar, .skip-link { display: none !important; } }
.surface-login .login-card .btn { height: 44px; margin-top: 4px; }
.surface-login .login-error:empty { margin: -7px 0; }
@media (max-width: 900px) { .surface-admin .admin-layout { background: none; } }

/* 站内导航进行中（shell.js navFeedback）：点下的链接立刻高亮、顶部进度条 */
body.is-navigating { cursor: progress; }
body.is-navigating::after { content: ""; position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 2100; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--primary, #2563eb), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: p-nav 1s ease-in-out infinite; }
@keyframes p-nav { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.nav-item.is-pending, .wh-tab.is-pending { background: rgba(34,163,222,.28) !important; color: #fff; }
.wh-tab.is-pending { color: inherit; }
@media (prefers-reduced-motion: reduce) { body.is-navigating::after { animation: none; background-position: 50% 0; } }

/* ════════════════════════════════════════════════════════════════════════════
   可读性层（2026-11-01，Tian：表格/数字不够清晰、排版小问题）。只改显示，不改任何业务逻辑。
   行类型由 core.js P.decorateTables 自动标：.num 数字列 / .zero 零值 / .nw 不折行短词 / .group-row 分组标题 /
   .sum-row 小计合计 / td.actions 操作格 / .table-wrap.narrow 少列表 / .table-wrap.tall 长表。
   ════════════════════════════════════════════════════════════════════════════ */
body.surface-admin { --faint: #687384; --zebra: #f9fbfc; --num-ink: #111a26; }
/* 字号：表格正文 13→14px，表头 13px；行高收紧保持密度 */
.surface-admin table.table { font-size: 14px; line-height: 1.45; font-feature-settings: "tnum" 1, "lnum" 1; }
.surface-admin .table th { font-size: 13px; color: #4f5b6b; padding-top: 8px; padding-bottom: 8px; }
.surface-admin .table td { padding-top: 8px; padding-bottom: 8px; }
.surface-admin .table td.num { color: var(--num-ink); letter-spacing: .1px; }
.surface-admin .table td.num.zero, .surface-admin .table td.num.zero * { color: #a3acb9 !important; font-weight: 400 !important; }
.surface-admin .table .nw { white-space: nowrap; }
/* 斑马纹：大表横向读不串行（分组/合计/高亮行不参与） */
.surface-admin .table tbody tr:nth-child(even):not(.hl):not(.group-row):not(.sum-row) td { background: var(--zebra); }
.surface-admin .table tbody tr:hover:not(.group-row) td { background: #eef4f9; }
/* 分组标题行（现货/直发/寄售…）：中性底 + 粗体，左侧一道品牌色，不再用“高亮黄” */
.surface-admin .table tr.group-row td, .surface-admin .table tr.group-row.hl td { background: #eef2f6; font-weight: 600; color: var(--text);
  box-shadow: inset 3px 0 0 var(--primary); padding-top: 7px; padding-bottom: 7px; }
.surface-admin .table tr.group-row td .muted, .surface-admin .table tr.group-row td .faint { font-weight: 400; }
/* 小计 / 合计行：粗体 + 上边线 */
.surface-admin .table tr.sum-row td { font-weight: 600; border-top: 1px solid #cfd8e2; background: #fbfcfd; }
.surface-admin .table tbody tr.sum-row:last-child td { border-top: 2px solid #b9c5d2; }
/* 操作格：按钮之间留 6px；≤3 个不折行，更多时整齐换行 */
.surface-admin .table td.actions-nw { white-space: nowrap; }
.surface-admin .table td.actions-nw > .row { flex-wrap: nowrap; gap: 6px; }
.surface-admin .table td.actions-wrap { min-width: 240px; }
.surface-admin .table td.actions > .btn, .surface-admin .table td.actions > button, .surface-admin .table td.actions > a { margin: 2px 6px 2px 0; vertical-align: middle; }
.surface-admin .table td.actions > :last-child { margin-right: 0; }
/* 少列表不拉满：日期与数字不隔半个屏幕 */
.surface-admin .table-wrap.narrow { max-width: 760px; }
/* 长表：桌面端在框内滚动，表头始终可见 */
@media (min-width: 901px) {
  .surface-admin .table-wrap.tall { max-height: calc(100vh - 150px); overflow: auto; }
}
/* 统计卡：数字加深、负数红 / 零值淡，标签不挤成三行 */
.surface-admin .stat-value { color: var(--num-ink); }
.surface-admin .stat { display: flex; flex-direction: column; }
/* 经营图表：桌面双列，手机自然纵排；宽表只在自己的容器滚动。 */
.analytics-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:4px 0 22px; flex-wrap:wrap; }
.analytics-heading h2 { margin:5px 0 7px; font-size:25px; line-height:1.3; color:var(--num-ink); }
.analytics-eyebrow { color:#2474a6; font-size:12px; font-weight:700; letter-spacing:1px; }
.contribution-tabs { display:flex; gap:6px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.contribution-tabs a { padding:10px 14px; color:var(--muted); border-bottom:3px solid transparent; text-decoration:none; }
.contribution-tabs a[aria-current] { color:#2474a6; border-color:#2474a6; font-weight:700; }
.contribution-overview { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; }
.contribution-stat strong { display:block; font-size:28px; color:var(--num-ink); margin:7px 0; }
.contribution-table { margin-top:18px; }
.contribution-table .table { min-width:1000px; }
.contribution-table th:first-child,.contribution-table td:first-child { position:sticky; left:0; background:var(--card,#fff); min-width:130px; max-width:160px; white-space:normal; z-index:1; box-shadow:1px 0 #e7edf3; }
.contribution-table thead th:first-child { z-index:2; background:#f5f8fb; }
.contribution-chart-heading { justify-content:space-between; flex-wrap:wrap; }
@media(max-width:600px) {
  .contribution-overview { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .contribution-stat { padding:12px; }
  .contribution-stat strong { font-size:24px; }
  .contribution-table th:first-child,.contribution-table td:first-child { min-width:98px; max-width:110px; }
  .contribution-chart-heading select { width:100%; }
}
.analytics-note { font-size:12px; line-height:1.8; color:var(--muted); margin:12px 0 20px; }
.chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.chart-card { min-width:0; }
.chart-plot { position:relative; height:260px; width:100%; }
.chart-spark { position:relative; height:68px; width:100%; margin-top:16px; }
.chart-data { margin-top:12px; color:var(--muted); font-size:12px; }
.chart-data summary, details.card>summary { cursor:pointer; padding:5px 0; }
.funnel-strip { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border:1px solid var(--line); border-radius:10px; background:white; overflow:hidden; }
.funnel-step { display:flex; flex-direction:column; padding:18px 20px; gap:8px; border-right:1px solid var(--line); }
.funnel-step:last-child { border:0; background:#eff8f5; }
.funnel-step strong { font-size:29px; color:var(--num-ink); line-height:1.2; }
.funnel-step span { font-size:11px; }
.funnel-row { margin:12px 0; }
.funnel-row strong { font-size:21px; color:var(--num-ink); }
.funnel-track { height:16px; border-radius:4px; background:#edf1f5; margin-top:7px; }
.funnel-track>div { height:100%; border-radius:4px; background:#2474a6; }
.funnel-rate { font-size:12px; color:#079789; margin:12px 0; }
.order-note-cell { min-width:140px; max-width:360px; }
.order-note-text { white-space:pre-wrap; overflow-wrap:anywhere; text-align:left; }
.order-note-cell .btn-link { line-height:1.6; padding:3px 0; height:auto; }
.order-note-cell .order-note-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.order-note-cell .faint { font-size:11px; }
.order-note-section { margin-top:20px; }
.order-note-entry { padding:12px 0; border-bottom:1px solid var(--line); }
.order-note-old { white-space:pre-wrap; margin:6px 0; }
.source-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(285px,1fr)); gap:16px; }
.source-card { min-width:0; margin-bottom:0; }
.source-card .faint { font-size:11px; }
.source-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:20px 0 14px; }
.source-metrics strong { display:block; font-size:23px; line-height:1.3; color:var(--num-ink); }
.source-metrics span { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.source-identity-heading { flex-wrap:wrap; gap:12px; }
.source-identity h3 { margin:0 0 6px; font-size:17px; }
.source-audit-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.source-audit-metric { min-width:0; background:var(--bg); padding:14px; border-radius:8px; }
.source-audit-metric>span,.source-audit-metric>small { display:block; color:var(--muted); font-size:12px; }
.source-audit-metric strong { display:block; font-size:26px; line-height:1.4; margin:4px 0; }
.source-identity-note { padding:10px 12px; background:#f3f6fa; border-radius:6px; font-size:13px; }
.source-refresh-policy { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 8px; }
.source-refresh-policy span,.source-refresh-policy b { display:block; font-size:12px; }
.source-refresh-policy span { color:var(--muted); margin-bottom:4px; }
.source-policy-note { margin:8px 0; overflow-wrap:anywhere; }
.coverage-track { height:5px; background:#edf1f5; border-radius:3px; margin-bottom:12px; overflow:hidden; }
.coverage-track>div { height:100%; background:#079789; border-radius:3px; }
.match-coverage-panel { margin:18px 0 24px; min-width:0; }
.coverage-title,.coverage-detail-title { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.coverage-title h2,.coverage-detail-title h3 { margin:0; }
.coverage-summary { padding:0 16px; }
.coverage-summary-table { min-width:1000px; width:100%; }
.coverage-summary-table th,.coverage-summary-table td { padding:11px 10px; white-space:nowrap; vertical-align:middle; }
.coverage-summary-table tbody th { font-weight:600; }
.coverage-summary-table td small { display:block; margin-top:3px; }
.coverage-summary-table .coverage-rate { font-size:19px; }
.coverage-rate.good { color:var(--ok,#16846b); }
.coverage-rate.watch { color:var(--warn,#9b691e); }
.coverage-rate.action { color:var(--bad,#ba4251); }
.coverage-rate.unknown { color:var(--muted); }
.coverage-mini { width:126px; }
.coverage-mini .chart-spark { height:30px; margin:0; }
.coverage-mini small { font-size:10px; }
.coverage-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr)); gap:16px; align-items:start; }
.coverage-site { padding:20px; margin:0; min-width:0; }
.coverage-site>summary { display:block; cursor:pointer; list-style:none; }
.coverage-site>summary::-webkit-details-marker { display:none; }
.coverage-site-heading { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; min-height:40px; }
.coverage-site-heading h3 { margin:0; font-size:15px; }
.coverage-expand { color:var(--muted); font-size:11px; flex-shrink:0; }
.coverage-primary { display:flex; align-items:baseline; gap:10px; margin:12px 0 6px; }
.coverage-primary strong { font-size:36px; line-height:1.2; font-variant-numeric:tabular-nums; }
.coverage-primary span { font-size:12px; color:var(--muted); }
.coverage-secondary { font-size:11px; line-height:1.7; min-height:36px; }
.coverage-gap-line { margin:9px 0; font-size:13px; }
.coverage-site-note { min-height:48px; box-sizing:border-box; margin:8px 0; padding:8px 10px; font-size:12px; }
.coverage-maker { margin:8px 0; padding:8px 10px; border-radius:5px; font-size:12px; color:#925f19; background:#fbf3df; }
.coverage-bars { display:grid; gap:10px; margin:16px 0; }
.coverage-bar-label { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:12px; }
.coverage-bar-label b { font-weight:600; font-variant-numeric:tabular-nums; }
.coverage-bar-track { background:#edf1f5; height:7px; border-radius:4px; overflow:hidden; margin-top:4px; }
.coverage-bar-track>div { background:#93a6b5; height:100%; border-radius:4px; }
.coverage-bars-empty { padding:30px 0; font-size:13px; }
.coverage-detail-hint { display:block; margin-top:14px; font-size:11px; }
.coverage-site-details { border-top:1px solid var(--line); margin-top:16px; padding-top:12px; font-size:12px; }
.coverage-site-details p { line-height:1.8; }
.coverage-reason-details { padding:0; list-style:none; }
.coverage-reason-details li { display:flex; gap:12px; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line); }
.coverage-reason-details b { font-size:11px; font-weight:500; white-space:nowrap; }
.coverage-explanation { font-size:12px; line-height:1.8; }
.coverage-explanation[open] { flex-basis:100%; min-width:0; max-width:100%; padding:16px; border:1px solid var(--line); border-radius:8px; background:var(--card,#fff); overflow-wrap:anywhere; }
.coverage-explanation>summary { font-size:13px; cursor:pointer; }
@media(max-width:600px) {
  .coverage-title { gap:6px; }
  .coverage-title h2 { font-size:22px; }
  .coverage-summary { padding:0; }
  .coverage-summary-table th,.coverage-summary-table td { padding:10px 12px; }
  .coverage-cards { grid-template-columns:minmax(0,1fr); gap:12px; }
  .coverage-site { padding:16px; }
  .coverage-site-heading { min-height:0; }
  .coverage-site:not([open]) .coverage-bar-preview,.coverage-site:not([open]) .coverage-detail-hint { display:none; }
  .coverage-secondary { min-height:0; }
  .coverage-primary strong { font-size:32px; }
  .coverage-detail-title { align-items:flex-start; gap:4px; }
  .coverage-detail-title span { font-size:11px; }
}
@media(max-width:700px) {
  .chart-grid { grid-template-columns:minmax(0,1fr); gap:0; }
  .chart-plot { height:235px; }
  .funnel-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .funnel-step { padding:14px; border-bottom:1px solid var(--line); }
  .funnel-step:last-child { grid-column:1 / -1; }
  .funnel-step strong { font-size:25px; }
  .source-cards { grid-template-columns:minmax(0,1fr); }
  .source-audit-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .source-refresh-policy { grid-template-columns:minmax(0,1fr); }
  .analytics-heading h2 { font-size:23px; }
}
/* 窄屏：可横向滚动的表格把第一列（订单号/日期）钉在左边，右边缘给出“还有内容”的阴影 */
@media (max-width: 900px) {
  .surface-admin table.table { font-size: 14px; }
  .surface-admin .table-wrap[tabindex] .table th:first-child, .surface-admin .table-wrap[tabindex] .table td:first-child {
    position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: inset -1px 0 0 var(--line), 6px 0 8px -6px rgba(11,46,74,.18); }
  .surface-admin .table-wrap[tabindex] .table th:first-child { background: #f6f8fa; z-index: 3; }
  .surface-admin .table-wrap[tabindex] .table tbody tr:nth-child(even):not(.hl):not(.group-row):not(.sum-row) td:first-child { background: var(--zebra); }
  .surface-admin .table-wrap[tabindex] .table tr.hl td:first-child { background: #fff8e1; }
  .surface-admin .table-wrap[tabindex] .table td[colspan]:first-child { position: static; box-shadow: none; }
  .surface-admin .table-wrap[tabindex] .table tr.hl td[colspan]:first-child { background: #fff8e1; }
  .surface-admin .table-wrap[tabindex] .table tr.group-row td:first-child { position: static; box-shadow: inset 3px 0 0 var(--primary); background: #eef2f6; }
}

/* Task V: shared information hierarchy; page modules use these tokens/classes. */
body.surface-admin { --chart-1:var(--primary); --chart-2:var(--ok); --chart-3:var(--warn); --chart-4:var(--bad); --chart-5:var(--muted); --chart-grid:var(--line2); }
.surface-admin .main, .surface-admin .content, #page-root, .card, .table-wrap, .analytics-section { min-width:0; }
.surface-admin .content { max-width:100%; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:0 0 18px; }
.page-heading h1 { font-size:22px; line-height:1.3; margin:0 0 6px; }
.page-conclusion { margin:0; color:var(--muted); font-size:14px; }
.page-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px; max-width:65%; }
.cell-clip { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:100%; }
.cell-sub { font-size:12px; color:var(--muted); }
.text-bad { color:var(--bad) !important; } .text-warn { color:var(--warn) !important; } .text-ok { color:var(--ok) !important; }
.surface-admin .stat-value { font-size:24px; line-height:1.3; font-variant-numeric:tabular-nums; }
.surface-admin .stat-main .stat-value { font-size:32px; }
.surface-admin .stat.is-zero { background:var(--line2); color:var(--muted); }
.surface-admin .stat.is-zero .stat-value { color:var(--muted); font-size:20px; }
.surface-admin .stats { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.surface-admin .stats > .stat { display:grid; grid-template-rows:subgrid; grid-row:span 3; row-gap:2px; align-items:start; min-width:0; }
.surface-admin .stat .stat-value { margin-top:0; padding-top:0; overflow-wrap:anywhere; }
.finance-line-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.finance-zero-toggle { font-size:12px; white-space:nowrap; }
.workbench-order-meta { display:flex; align-items:baseline; gap:4px; min-width:0; }
.workbench-order-meta time { flex:none; white-space:nowrap; }
.workbench-order-meta .cell-clip { flex:1; min-width:0; }
.card-only { display:none; }
.more-metrics { margin:-4px 0 14px; color:var(--muted); }
.more-metrics>summary,.method-note>summary { cursor:pointer; padding:8px 0; font-size:13px; }
.method-note { border-top:1px solid var(--line); margin-top:16px; color:var(--muted); font-size:13px; }
.method-note .analytics-note { margin:0; }
.todo-chips { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.todo-chips .chip { border-radius:7px; }
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; text-align:center; min-height:160px; padding:24px; color:var(--muted); background:var(--panel); border:1px dashed var(--line); border-radius:var(--radius); }
.empty-state p { margin:0; max-width:38em; white-space:normal; font-weight:400; }
.empty-host { width:100%; text-align:center; }
.surface-admin td.empty-host { padding:16px; }
.row-actions { display:flex; gap:4px; align-items:center; flex-wrap:nowrap; }
.row-actions .btn { margin:0 !important; }
.surface-admin .table td.compact-actions { min-width:200px; }
.surface-admin .table .cell-content { max-width:240px; min-width:5em; }
.surface-admin .table .cell-content:not(:has(.tag,.badge,.chip)),
.surface-admin .table .cell-content>div:not(:has(.tag,.badge,.chip)) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.surface-admin .table .cell-content .tag { vertical-align:middle; }
.surface-admin .table .cell-content:empty { min-width:0; }
.surface-admin .table td { min-width:72px; }
.surface-admin .table td.num { min-width:68px; }
.surface-admin .table .thumb { width:44px; height:44px; }
.surface-admin .table th, .surface-admin .table td { padding:7px 8px; }
.surface-admin .table td.actions-wrap { min-width:200px; }
.surface-admin .table-wrap { max-width:100%; overflow:auto; }
.filter-bar { display:flex; align-items:center; gap:8px; margin:10px 0; min-width:0; flex-wrap:nowrap; }
.filter-bar>input:first-child { flex:1; min-width:180px; }
.filter-bar>select { max-width:180px; }
.more-filters { position:relative; flex:none; }
.more-filters>summary { list-style:none; cursor:pointer; }
.more-filters>summary::-webkit-details-marker { display:none; }
.filter-drawer,.date-custom { position:absolute; z-index:5; top:calc(100% + 6px); right:0; min-width:260px; max-width:calc(100vw - 40px); background:var(--panel); border:1px solid var(--line); box-shadow:var(--shadow); border-radius:var(--radius); padding:16px; display:grid; gap:12px; }
.date-custom label { display:grid; gap:4px; color:var(--muted); }
.date-chips { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.date-chips input { width:100%; }
.surface-admin .table-workbench { table-layout:fixed; min-width:1120px; }
.table-workbench .col-check { width:36px; min-width:36px !important; text-align:center; }
.table-workbench .col-order { width:194px; } .table-workbench .col-product { width:245px; }
.table-workbench .col-price { width:121px; } .table-workbench .col-profit { width:96px; }
.table-workbench .col-verify { width:113px; } .table-workbench .col-deadline { width:86px; }
.table-workbench .col-note { width:86px; } .table-workbench .col-actions { width:169px; }
.surface-admin .table-workbench td { min-width:0; height:62px; }
.table-workbench .cell-content { min-width:0 !important; }
.workbench-product-line { display:flex; align-items:center; gap:4px; }
.workbench-product-line .cell-clip { min-width:0; }
.workbench-product-line .tag { flex:none; }
.workbench-flags { display:flex; flex-wrap:wrap; gap:2px 3px; }
.workbench-flags .tag { padding:1px 3px; font-size:11px; }
.table-workbench .row-actions { flex-wrap:wrap; }
.table-workbench tbody .workbench-stockout-row td { background:var(--bad-l); }
.table-workbench .workbench-stockout-row td:first-child { box-shadow:inset 3px 0 var(--bad); }
.surface-admin .btn-primary.workbench-stockout-action { background:var(--bad); border-color:var(--bad); color:#fff; }
.surface-admin .btn-primary.workbench-stockout-action:hover { filter:brightness(.92); }
.surface-admin .workbench-stockout-chip { color:var(--bad); }
.surface-admin .workbench-stockout-chip.active { color:var(--bad); border-color:var(--bad); background:var(--bad-l); }
.verify-cell { cursor:pointer; } .verify-cell:focus-visible { outline:2px solid var(--primary); }
.inv-mobile-summary { display:none; }
.photo-layout:has(.empty-state) { align-items:stretch; }
.photo-layout .empty-state { min-height:320px; }
.table .tag { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.zero-finance-row[hidden] { display:none; }
@media (max-width:900px) {
 .page-heading { flex-direction:column; gap:12px; }
 .page-actions { justify-content:flex-start; max-width:100%; }
 .filter-bar { flex-wrap:wrap; }
 .filter-bar>input:first-child { flex:1 1 100%; min-width:0; }
 .filter-bar>select { flex:1; min-width:100px; max-width:100%; }
 .filter-drawer { right:auto; left:0; }
 .surface-admin .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .surface-admin .stat-value { font-size:22px; }
 .surface-admin .table td { white-space:nowrap; }
 .inv-mobile-summary { display:block; font-size:11px; }
}
@media (max-width:420px) { .page-actions { gap:4px; } .page-actions .btn { padding:0 8px; font-size:12px; } }

.chart-empty { display:flex; align-items:center; justify-content:center; min-height:70px; font-size:12px; }
.metric-unknown { color:var(--muted); font-size:20px !important; font-weight:400 !important; }
.coverage-summary-table tbody th:first-child { min-width:110px; width:110px; max-width:120px; white-space:normal; }
@media(max-width:600px){
 .coverage-summary-table { min-width:850px; }
 .coverage-summary-table th:first-child,.coverage-summary-table td:first-child { min-width:110px !important; width:110px !important; max-width:120px !important; white-space:normal !important; }
 .coverage-summary-table th,.coverage-summary-table td { padding:8px; }
 .coverage-summary-table th:nth-child(2),.coverage-summary-table td:nth-child(2) { min-width:115px; }
 .coverage-summary-table th:nth-child(3),.coverage-summary-table td:nth-child(3) { min-width:85px; }
}

/* Presentation utilities extracted from page-local styles (task V). */
.u-margin-8px-0{margin:8px 0}
.u-margin-top-10px{margin-top:10px}
.u-margin-top-8px{margin-top:8px}
.u-white-space-nowrap{white-space:nowrap}
.u-font-size-12px{font-size:12px}
.u-margin-right-6px{margin-right:6px}
.u-margin-top-6px{margin-top:6px}
.u-white-space-normal{white-space:normal}
.u-min-width-220px{min-width:220px}
.u-max-width-520px{max-width:520px}
.u-min-width-140px{min-width:140px}
.u-max-width-180px{max-width:180px}
.u-overflow-wrap-anywhere{overflow-wrap:anywhere}
.u-display-block{display:block}
.u-max-width-240px{max-width:240px}
.u-font-size-11px{font-size:11px}
.u-min-width-170px{min-width:170px}
.u-max-width-200px{max-width:200px}
.u-max-width-170px{max-width:170px}
.u-width-100px{width:100px}
.u-width-60px{width:60px}
.u-width-200px{width:200px}
.u-min-width-160px{min-width:160px}
.u-gap-6px{gap:6px}
.u-margin-bottom-8px{margin-bottom:8px}
.u-gap-10px{gap:10px}
.u-flex-wrap-wrap{flex-wrap:wrap}
.u-color-bad{color:var(--bad)}
.u-gap-8px{gap:8px}
.u-display-none{display:none}
.u-margin-bottom-10px{margin-bottom:10px}
.u-max-width-360px{max-width:360px}
.u-margin-left-4px{margin-left:4px}
.u-margin-bottom-12px{margin-bottom:12px}
.u-font-size-13px{font-size:13px}
.u-white-space-pre-wrap{white-space:pre-wrap}
.u-margin-left-10px{margin-left:10px}
.u-margin-top-12px{margin-top:12px}
.u-min-width-240px{min-width:240px}
.u-color-danger{color:var(--danger)}
.u-font-weight-bold{font-weight:bold}
.u-gap-4px{gap:4px}
.u-margin-left-6px{margin-left:6px}
.u-margin-left-8px{margin-left:8px}
.u-font-size-14px{font-size:14px}
.u-border-color-bad{border-color:var(--bad)}
.u-gap-12px{gap:12px}
.u-justify-content-space-between{justify-content:space-between}
.u-flex-1{flex:1}
.u-min-width-0{min-width:0}
.u-min-width-280px{min-width:280px}
.u-padding-8px{padding:8px}
.u-cursor-pointer{cursor:pointer}
.u-margin-top-4px{margin-top:4px}
.u-max-height-240px{max-height:240px}
.u-overflow-auto{overflow:auto}
.u-margin-bottom-6px{margin-bottom:6px}
.u-width-100{width:100%}
.u-flex-wrap-nowrap{flex-wrap:nowrap}
.u-width-64px{width:64px}
.u-min-width-210px{min-width:210px}
.u-max-width-300px{max-width:300px}
.u-margin-6px-0{margin:6px 0}
.u-font-size-16px{font-size:16px}
.u-margin-bottom-0{margin-bottom:0}
.u-min-width-180px{min-width:180px}
.u-width-80px{width:80px}
.u-margin-bottom-4px{margin-bottom:4px}
.u-width-90px{width:90px}
.u-background-line2{background:var(--line2)}
.u-height-12px{height:12px}
.u-border-radius-6px{border-radius:6px}
.u-text-align-right{text-align:right}
.u-align-items-flex-start{align-items:flex-start}
.u-text-align-center{text-align:center}
.u-align-items-flex-end{align-items:flex-end}
.u-justify-content-center{justify-content:center}
.u-height-90px{height:90px}
.u-gap-3px{gap:3px}
.u-width-12px{width:12px}
.u-font-size-10px{font-size:10px}
.u-width-75px{width:75px}
.u-color-warn{color:var(--warn)}
.u-font-weight-600{font-weight:600}
.u-font-size-18px{font-size:18px}
.u-padding-10px{padding:10px}
.u-height-auto{height:auto}
.u-padding-12px{padding:12px}

/* Semantic bars: native value/max attributes replace page-local inline width. */
.progress-meter { --meter-color:var(--primary); appearance:none; display:block; width:100%; height:100%; min-height:6px; border:0; border-radius:inherit; background:var(--line2); }
.progress-meter::-webkit-progress-bar { background:var(--line2); border-radius:inherit; }
.progress-meter::-webkit-progress-value { background:var(--meter-color); border-radius:inherit; }
.progress-meter::-moz-progress-bar { background:var(--meter-color); border-radius:inherit; }
.bar-live { --meter-color:var(--ok); } .bar-normal,.bar-unclassified { --meter-color:var(--muted); }
.bar-recovering { --meter-color:var(--warn); } .bar-abnormal { --meter-color:var(--bad); }
.bar-primary,.bar-processing { --meter-color:var(--primary); }
.vertical-bar { position:relative; display:inline-block; width:12px; height:90px; }
.vertical-bar .progress-meter { position:absolute; width:90px; height:12px; left:-39px; top:39px; transform:rotate(-90deg); }
.funnel-track>.progress-meter,.coverage-bar-track>.progress-meter { width:100%; }
body.surface-admin { --info:var(--primary); --info-l:var(--primary-l); }

.action-menu-list { display:grid; gap:4px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:600px){
 .coverage-summary-table { table-layout:fixed; width:900px; min-width:900px; }
 .coverage-summary-table th:first-child { width:110px !important; overflow-wrap:anywhere; }
 .coverage-summary-table th:nth-child(2) { width:130px; }
 .coverage-summary-table th:nth-child(3) { width:90px; }
 .coverage-summary-table th:nth-child(4),.coverage-summary-table th:nth-child(5) { width:100px; }
 .coverage-summary-table th:nth-child(6) { width:200px; }
 .coverage-summary-table th:nth-child(7) { width:170px; }
}

.surface-admin .purchase-order-table td { padding-top:4px; padding-bottom:4px; }
.purchase-order-table .settlement-result { margin-top:2px; line-height:16px; white-space:nowrap; }
.purchase-order-table .settlement-result:empty { display:none; }

.surface-admin .order-note-cell { min-width:0; max-width:240px; }
.surface-admin .order-note-cell .order-note-text { display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; max-width:100%; }
.surface-admin .order-note-cell .faint { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Shared utilities for integrated finance view. */

.photo-layout .photo-batches:has(>div:empty) { display:none; }

.confirm-message { white-space:pre-wrap; }
.form-help { font-size:12px; margin-top:2px; }
.clipboard-copy { position:fixed; opacity:0; }

.coverage-mini .chart-empty { min-height:30px; height:30px; }

body.surface-admin { --danger:var(--bad); --warning:var(--warn); --success:var(--ok); --card:var(--panel); }

.coverage-primary strong { font-size:32px; }
.filter-bar>.date-chips { flex-shrink:0; }

@media (max-width:700px) {
  .surface-admin .table-wrap.daily-list { overflow:visible; border:0; background:transparent; max-height:none; }
  .surface-admin .daily-list .table,
  .surface-admin .daily-list .table tbody { display:block; width:100%; min-width:0; }
  .surface-admin .daily-list .table thead { display:none; }
  .surface-admin .daily-list .table tr:not([hidden]) {
    display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px 8px;
    padding:12px; margin-bottom:8px; border:1px solid var(--line); border-radius:8px; background:var(--panel);
  }
  .surface-admin .daily-list .table tr.hl { background:var(--warn-l); }
  .surface-admin .daily-list .table td {
    display:block; grid-column:1/-1; order:5; min-width:0 !important; width:auto; height:auto;
    padding:0; border:0; position:static; box-shadow:none; background:transparent !important;
    overflow:visible; text-align:left; white-space:normal; overflow-wrap:anywhere;
  }
  .surface-admin .daily-list .table td .cell-content { min-width:0; max-width:none; max-height:none; overflow:visible; }
  .surface-admin .daily-list .table td .cell-content > div,
  .surface-admin .daily-list .table .cell-clip,
  .surface-admin .daily-list .table .nowrap,
  .surface-admin .daily-list .table .nowrap-code,
  .surface-admin .daily-list .table .tag { white-space:normal; overflow-wrap:anywhere; }
  .surface-admin .daily-list .table [data-card-label]::before {
    content:attr(data-card-label); display:block; font-size:11px; color:var(--muted); margin-bottom:1px;
  }
  .surface-admin .daily-list .table [data-card-slot='id'] { grid-column:span 4; order:0; font-weight:600; }
  .surface-admin .daily-list .table [data-card-slot='select'] { grid-column:span 1; order:-1; }
  .surface-admin .daily-list .table tr:has([data-card-slot='select']) [data-card-slot='id'] { grid-column:span 3; }
  .surface-admin .daily-list .table [data-card-slot='status'] { grid-column:span 2; order:1; text-align:right; }
  .surface-admin .daily-list .table [data-card-slot='product'],
  .surface-admin .daily-list .table [data-card-slot='product-part'] { order:2; }
  .surface-admin .daily-list .table [data-card-slot='product-part'],
  .surface-admin .daily-list .table [data-card-slot='half'] { grid-column:span 3; }
  .surface-admin .daily-list .table [data-card-slot='price'],
  .surface-admin .daily-list .table [data-card-slot='profit'],
  .surface-admin .daily-list .table [data-card-slot='time'] { grid-column:span 2; order:3; }
  .surface-admin .daily-list .table [data-card-slot='money'] { grid-column:span 4; order:3; }
  .surface-admin .daily-list .table [data-card-slot='field'] { grid-column:span 2; order:4; }
  .surface-admin .daily-list .table [data-card-slot='field'] input,
  .surface-admin .daily-list .table [data-card-slot='half'] input { min-width:0; max-width:100%; }
  .surface-admin .daily-list .table [data-card-slot='action'],
  .surface-admin .daily-list .table [data-card-slot='footer'] { order:8; text-align:right; }
  .surface-admin .daily-list .table [data-card-slot='footer'] .card-only,
  .surface-admin .daily-list .table [data-card-slot='action'] .card-only { margin-left:6px; }
  .surface-admin .daily-list .row-actions { justify-content:flex-end; flex-wrap:wrap; }
  .surface-admin .daily-list .card-only { display:inline-flex; }
  .surface-admin .daily-list td.card-only { display:block; }
  .surface-admin .daily-list .purchase-order-table .settlement-result { min-width:0; white-space:normal; }
  .surface-admin .daily-list .purchase-order-table .settlement-number { scroll-margin-inline-start:0; }
  .surface-admin .daily-list .table-only,
  .surface-admin .daily-list .inv-mobile-summary { display:none; }
  .surface-admin .daily-list .workbench-order-meta { flex-wrap:wrap; }
  .surface-admin .daily-list .workbench-order-meta .cell-clip { flex-basis:100%; }
  .surface-admin .daily-list .workbench-order-meta time { white-space:nowrap; }
  .surface-admin .daily-list .workbench-order-meta .cell-clip,
  .surface-admin .daily-list .verify-cell .cell-clip,
  .surface-admin .daily-list [data-card-slot='product'] .cell-sub.cell-clip { white-space:nowrap; }
  .surface-admin .daily-list .table .cell-clip { white-space:nowrap; }
  .surface-admin .daily-list .table-workbench .workbench-order-meta { flex-wrap:nowrap; }
  .surface-admin .daily-list .table-workbench .workbench-order-meta .cell-clip { flex-basis:0; }
  .surface-admin .daily-list .table-workbench tr.workbench-stockout-row:not([hidden]) { background:var(--bad-l); border-left:3px solid var(--bad); }
  .surface-admin .daily-list .table-workbench .workbench-stockout-row td:first-child { box-shadow:none; }
}
.bid-conclusion { margin-bottom: 12px; }
.bid-health-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.bid-breakdown { display: grid; gap: 6px; }
.bid-breakdown-row { display: grid; grid-template-columns: 8.5em minmax(2rem,1fr) 3.5em; gap: 8px; align-items: center; }
.bid-breakdown-row progress { width: 100%; }
.bid-breakdown-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.bid-write-table { width: 100%; }
.bid-gap-table th { white-space: nowrap; }
.bid-health-note { margin-top: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .bid-health-grid { grid-template-columns: minmax(0,1fr); }
}
.inventory-review-entry { margin: 12px 0; }
.inventory-review-modal.wide { max-width: 1100px; }
.inventory-review { display: grid; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.inventory-review-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.inventory-review-toolbar > .field { flex: 1 1 200px; min-width: 0; margin: 0; }
.inventory-review small { display: block; }
.inventory-review-table td { white-space: normal; }
.inventory-review-table .inventory-review-check { min-width: 0; width: 34px; }
.inventory-review-table .inventory-review-notes { min-width: 130px; }
.inventory-review-errors { margin: 8px 0 0; padding-inline-start: 22px; color: var(--bad); }
.inventory-review-pick { font-weight: 600; }
.inventory-photo-upload input[type=file] { width: 100%; }
.surface-admin .inventory-photo-review.card { display: grid; gap: 8px; margin: 0; }
.inventory-photo-review-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.inventory-photo-thumb { display: block; width: 68px; height: 68px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--line2); cursor: zoom-in; }
.inventory-photo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.inventory-photo-large { display: block; max-width: 100%; max-height: 65vh; margin: auto; }
.inventory-photo-fields, .inventory-review-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.inventory-photo-fields .field { min-width: 0; margin: 0; }
.inventory-photo-fields, .inventory-photo-fields + .btn { margin-top: 8px; }
.inventory-review-fields { margin: 8px 0 0; }
.inventory-review-fields dt { color: var(--muted); font-size: 12px; }
.inventory-review-fields dd { margin: 0; }
.inventory-review-more > summary { color: var(--primary); cursor: pointer; }
.inventory-review-more ul { padding-inline-start: 22px; }
.inventory-review-row-list { display: grid; gap: 8px; }
.inventory-review-row-list > .btn { display: grid; justify-items: start; height: auto; padding: 8px; text-align: left; white-space: normal; }
@media (max-width: 700px) {
  .surface-admin .inventory-review-modal.wide { max-width: none; }
  .inventory-review-table { border: 0; background: transparent; }
  .inventory-review-table .table, .inventory-review-table tbody { display: block; }
  .inventory-review-table thead { display: none; }
  .inventory-review-table tr { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; }
  .surface-admin .inventory-review-table td { display: block; min-width: 0; border: 0; padding: 0; white-space: normal; background: transparent; }
  .inventory-review-table td:nth-child(2) { grid-column: 2 / -1; }
  .inventory-review-table td:nth-child(3), .inventory-review-table td:last-child { grid-column: 1 / -1; }
  .inventory-review-table td:nth-child(4) { grid-column: 2; }
  .inventory-review-table td[data-review-label]::before { content: attr(data-review-label); display: block; font-size: 12px; color: var(--muted); }
  .inventory-photo-fields, .inventory-review-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
