/* 集运系统客户端 · 设计系统
   色板与原型保持一致，移动优先，宽屏自动切工作台布局 */

:root {
  --ink: #0f172a;
  --ink2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e4e9f2;
  --line2: #eef1f6;
  --bg: #eef2f8;
  --card: #fff;
  --brand: #1552d8;
  --brand-2: #4b7bf5;
  --brand-soft: #e9f0fe;
  --ok: #0e9f6e;
  --ok-soft: #e6f6f0;
  --warn: #d97706;
  --warn-soft: #fef4e6;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── 通用 ───────────────────────────── */
.hide { display: none !important; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink2);
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s;
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn:hover { background: #f8fafc; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(21, 82, 216, .3);
}
.btn-primary:hover { background: #1246bd; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 13px;
  color: var(--ink2);
  font-weight: 500;
  margin-bottom: 6px;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%;
  min-width: 0;   /* 输入框内在宽度约 170px，不禁掉会把网格列撑宽、卡片溢出屏幕 */
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 76px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(75, 123, 245, .14);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.hint.err { color: var(--danger); }

/* 1fr 的轨道最小宽度是 auto（= 内容最小宽度），输入框会把它顶大 → 移动端卡片被裁。
   子项统一 min-width:0，让轨道按可用宽度等分。 */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row2 > *, .row3 > * { min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font-size: 12px; font-weight: 500;
  background: var(--line2); color: var(--muted);
  white-space: nowrap;
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-brand { background: var(--brand-soft); color: var(--brand); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2px; }
.num { font-variant-numeric: tabular-nums; }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty .big { font-size: 30px; opacity: .35; margin-bottom: 8px; }

.loading {
  padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px;
}
.spinner {
  width: 20px; height: 20px; margin: 0 auto 10px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 登录页 ─────────────────────────── */
.login-wrap {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, #dbe6fb 0%, var(--bg) 60%);
}
.login-card {
  width: 100%; max-width: 400px;
  min-width: 0;   /* flex 子项默认 min-width:auto，会被内容顶破容器 */
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
}
.login-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #4b7bf5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 19px;
  margin-bottom: 14px;
}
.login-card h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.3px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

.seg {
  display: flex; gap: 4px; padding: 3px;
  background: var(--line2); border-radius: 10px;
  margin-bottom: 20px;
}
.seg button {
  flex: 1; height: 34px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

.demo-tip {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.7;
}
.demo-tip b { color: var(--ink2); font-weight: 600; }
.demo-tip code {
  background: var(--line2); padding: 1px 5px; border-radius: 4px;
  font-size: 11.5px; color: var(--ink2);
}

/* ── 会员端布局 ─────────────────────── */
.mobile-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  display: flex; flex-direction: column;
  position: relative;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .tb-title { font-weight: 600; font-size: 15.5px; }
.topbar .tb-back {
  width: 32px; height: 32px; margin-left: -8px;
  border: 0; background: transparent; border-radius: 8px;
  font-size: 18px; color: var(--ink2); cursor: pointer;
}
.topbar .tb-back:hover { background: var(--line2); }
.topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.page { padding: 16px; padding-bottom: 84px; flex: 1; }

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: transparent;
  color: var(--muted); font-size: 11px; cursor: pointer;
  padding: 4px 0;
}
.tabbar button .ico { font-size: 19px; line-height: 1; filter: grayscale(1); opacity: .55; }
.tabbar button.on { color: var(--brand); font-weight: 600; }
.tabbar button.on .ico { filter: none; opacity: 1; }

/* 概览卡 */
.hero {
  background: linear-gradient(135deg, #1552d8, #3f6ef0 55%, #5b86f7);
  border-radius: 16px;
  padding: 18px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(21, 82, 216, .22);
}
.hero .who { font-size: 13px; opacity: .85; }
.hero .name { font-size: 18px; font-weight: 600; margin: 2px 0 14px; letter-spacing: -.2px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-stats div { text-align: center; }
.hero-stats .n { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-stats .l { font-size: 11.5px; opacity: .8; margin-top: 1px; }

/* 列表条目 */
.pkg {
  display: flex; gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line2);
  cursor: pointer;
  transition: background .12s;
}
.pkg:last-child { border-bottom: 0; }
.pkg:hover { background: #fafbfe; }
.pkg-check {
  padding-top: 2px;
  display: flex; align-items: flex-start;
}
.pkg-check input {
  width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer;
}
.pkg-main { flex: 1; min-width: 0; }
.pkg-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.pkg-name {
  font-weight: 600; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.pkg-no {
  font-size: 12px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.pkg-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 12px; color: var(--muted);
  margin-top: 5px;
}
.pkg-meta b { color: var(--ink2); font-weight: 500; }

/* 底部操作条 */
.action-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 31;
}
.action-bar .sum { flex: 1; font-size: 12.5px; color: var(--muted); }
.action-bar .sum b { display: block; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 费用明细 */
.fee-box {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13px;
}
.fee-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 0;
  color: var(--ink2);
}
.fee-line .k { color: var(--muted); }
.fee-line .v { font-variant-numeric: tabular-nums; }
.fee-line.total {
  border-top: 1px solid var(--line);
  margin-top: 6px; padding-top: 10px;
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.fee-line.total .v { color: var(--brand); font-size: 18px; }
.fee-line.minus .v { color: var(--ok); }
.fee-line.plus .v { color: var(--warn); }

/* 快照表 */
.kv { font-size: 13px; }
.kv .kv-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line2);
}
.kv .kv-row:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex: none; }
.kv .v { text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink2);
  margin: 18px 0 10px;
}
.section-title:first-child { margin-top: 0; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* ── 仓库端（宽屏工作台）───────────── */
.workbench {
  display: grid;
  grid-template-columns: 208px 1fr;
  min-height: 100vh;
}
.side {
  background: #101a2e;
  color: #cbd5e1;
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.side .brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 18px;
  color: #fff; font-weight: 600; font-size: 15px;
}
.side .brand .dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #4b7bf5);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.side button {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  border: 0; border-radius: 9px;
  background: transparent; color: #cbd5e1;
  font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.side button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side button.on { background: var(--brand); color: #fff; font-weight: 500; }
.side .fill { flex: 1; }
.side .who {
  font-size: 12px; color: #8fa0b8;
  padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.side .who b { color: #e2e8f0; display: block; font-size: 13px; font-weight: 500; }

.wb-main { padding: 24px 28px 48px; min-width: 0; }
.wb-head { margin-bottom: 20px; }
.wb-head h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.3px; }
.wb-head p { margin: 0; color: var(--muted); font-size: 13px; }

.wb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line2);
  font-weight: 600; font-size: 14px;
}
.panel-head .right { margin-left: auto; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }

.scan-box {
  border: 2px dashed var(--line);
  border-radius: var(--r);
  padding: 18px;
  background: #fbfcfe;
  transition: border-color .18s, background .18s;
}
.scan-box:focus-within { border-color: var(--brand-2); background: #f7faff; }
.scan-input {
  width: 100%; height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 17px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .5px;
  outline: none;
}
.scan-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(75, 123, 245, .14); }

.weight-display {
  display: flex; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.weight-display .v { font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.weight-display .u { font-size: 14px; color: var(--muted); }

.result-card {
  border-radius: var(--r);
  padding: 16px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.result-card.ok { border-color: #b7e4d0; background: #f4fcf8; }
.result-card.warn { border-color: #f6ddb0; background: #fffcf5; }
.result-card.err { border-color: #f6c6c6; background: #fff7f7; }
.result-card h4 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }

.label-preview {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}
.label-preview .qr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
  text-align: center; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
}
.label-preview .l2 { text-align: center; font-size: 13px; color: var(--muted); }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted);
  font-size: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe; white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fafbfe; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 弹窗 ───────────────────────────── */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 420px;
  max-height: 84vh; overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-head {
  display: flex; align-items: center;
  padding: 16px 18px 12px;
  font-weight: 600; font-size: 15.5px;
}
.modal-head .x {
  margin-left: auto; width: 30px; height: 30px;
  border: 0; background: transparent; border-radius: 8px;
  font-size: 18px; color: var(--muted); cursor: pointer;
}
.modal-head .x:hover { background: var(--line2); }
.modal-body { padding: 0 18px 18px; }
.modal-foot {
  display: flex; gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line2);
  background: #fcfdfe;
}
.modal-foot .btn { flex: 1; }

/* ── Toast ──────────────────────────── */
.toast-host {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200; pointer-events: none;
  width: calc(100% - 32px); max-width: 400px;
}
.toast {
  padding: 11px 15px;
  border-radius: 10px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: slideDown .2s cubic-bezier(.2, .9, .3, 1.1);
  pointer-events: auto;
}
.toast.ok { background: #0e9f6e; }
.toast.err { background: #dc2626; }
@keyframes slideDown { from { transform: translateY(-12px); opacity: 0; } }

/* ── 响应式 ─────────────────────────── */
@media (max-width: 860px) {
  .workbench { grid-template-columns: 1fr; }
  .side {
    flex-direction: row; align-items: center;
    padding: 8px 12px; gap: 6px;
    overflow-x: auto;
  }
  .side .brand { padding: 0 8px 0 0; }
  .side .brand span:last-child { display: none; }
  .side button { white-space: nowrap; height: 36px; }
  .side .fill, .side .who { display: none; }
  .wb-main { padding: 16px; }
  .wb-grid { grid-template-columns: 1fr; }
}

/* ── 会员钱包 ───────────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, #1552d8, #3f6ff0);
  border-radius: var(--r); padding: 20px; color: #fff;
  box-shadow: var(--shadow-lg);
}
.wallet-label { font-size: 12.5px; opacity: .82; }
.wallet-amount { font-size: 32px; font-weight: 700; letter-spacing: -.6px; margin: 4px 0 2px; }
.wallet-meta { font-size: 12px; opacity: .8; }
.wallet-btn {
  margin-top: 16px; width: 100%;
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .35); color: #fff;
}
.wallet-btn:hover { background: rgba(255, 255, 255, .28); }

/* ── 后台：侧栏导航与统计卡 ─────────── */
#s-nav { display: flex; flex-direction: column; gap: 4px; }
#s-nav button { width: 100%; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; }
.stat-sub { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.stat.warn .stat-value { color: var(--warn); }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #s-nav { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  #s-nav button { width: auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 19px; }
}

/* ── 入库台：电子秤 + 摄像头 ─────────────────────────── */
.scale-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: var(--surface, #fafafa);
}
.scale-bar .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--muted);
  flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.scale-bar .dot.on { background: #16a34a; }
.scale-bar .dot.stable { background: #16a34a; animation: scale-pulse 1.6s ease-in-out infinite; }
.scale-bar .dot.err { background: var(--danger); }
@keyframes scale-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.scale-bar .rd {
  font-size: 26px; font-weight: 800; font-family: Consolas, monospace;
  letter-spacing: 1px; line-height: 1; min-width: 96px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.scale-bar .rd.stable { color: #16a34a; }
.scale-bar .u { font-size: 12px; color: var(--muted); margin-left: -6px; }
.scale-bar .st { font-size: 12px; color: var(--muted); flex: 1; min-width: 80px; }
.scale-bar select { height: 30px; font-size: 12px; }

.cam-box {
  position: relative; width: 100%; aspect-ratio: 4 / 3; background: #111;
  border-radius: 10px; overflow: hidden; display: flex;
  align-items: center; justify-content: center;
}
.cam-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-box .cam-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 0 20px; line-height: 1.7; }

/* 取景框：提示三样东西要同框，拍歪了等于没证据 */
.cam-box .cam-frame {
  position: absolute; inset: 8% 6% 14%; border: 2px dashed rgba(255,255,255,.75);
  border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.18);
}
.cam-box .cam-frame .fr-tip {
  position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  font-size: 11.5px; color: #fff; background: rgba(0,0,0,.62);
  border-radius: 20px; padding: 2px 10px; white-space: nowrap;
}

/* 重量来源切换 */
.wsrc { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wsrc .lbl { font-size: 12.5px; color: var(--muted); }
.wsrc .seg {
  height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer;
}
.wsrc .seg.on {
  border-color: var(--brand); color: var(--brand); font-weight: 600;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.wsrc-warn {
  margin-top: 8px; font-size: 12px; line-height: 1.6; padding: 8px 10px;
  border-radius: 8px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a;
}
.input.ro { background: var(--bg2); color: var(--ink2); cursor: default; }

/* 入库条件清单 */
.cond { display: flex; flex-direction: column; gap: 8px; }
.cond-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
}
.cond-row .mk {
  width: 20px; height: 20px; flex: none; border-radius: 50%; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); color: var(--muted); font-weight: 700;
}
.cond-row.ok { border-color: #86efac; background: #f0fdf4; }
.cond-row.ok .mk { background: #16a34a; color: #fff; }
.cond-row .tx { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.cond-row .tx b { font-size: 13px; font-weight: 600; color: var(--ink); }
.cond-row .tx em { font-size: 11.5px; font-style: normal; color: var(--muted); }
.btn.ready { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.btn.pulse { animation: btn-pulse .5s ease-in-out 2; }
@keyframes btn-pulse { 50% { transform: scale(1.06); } }

.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-strip .ph {
  position: relative; width: 88px; height: 66px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--line); background: #111; flex: none;
}
.photo-strip .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-strip .ph .del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; border: none;
  font-size: 12px; line-height: 18px; cursor: pointer; padding: 0;
}
.photo-strip .ph .cap {
  position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px;
  color: #fff; background: rgba(0,0,0,.55); padding: 1px 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 出库单打印：100×100mm 热敏标签 ─────────────────────── */
#print-host { display: none; }
.ship-label {
  width: 100mm; height: 100mm; padding: 4mm 4.5mm;
  font-family: "Microsoft YaHei", Arial, sans-serif; color: #000;
  border: 1.5px dashed #000; box-sizing: border-box; background: #fff;
  display: flex; flex-direction: column; overflow: hidden;
}
.ship-label .lg-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid #000; padding-bottom: 1.2mm;
}
.ship-label .lg-brand { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.ship-label .lg-channel { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.ship-label .lg-barcode { text-align: center; padding: 1.5mm 0 .5mm; line-height: 0; }
.ship-label .lg-barcode svg { max-width: 100%; height: auto; }
.ship-label .lg-no {
  text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 1.6px;
  font-family: Consolas, monospace; padding-bottom: .8mm;
}
.ship-label .lg-recv {
  border: 1.2px solid #000; padding: 1.2mm 1.8mm; margin: .8mm 0 1.2mm;
  font-size: 10.5px; line-height: 1.35; flex: none;
}
.ship-label .lg-recv .nm { font-size: 13px; font-weight: 800; line-height: 1.25; }
.ship-label .lg-recv .ad { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ship-label .lg-rows { flex: 1; min-height: 0; }
.ship-label .lg-row { display: flex; font-size: 10px; line-height: 1.55; }
.ship-label .lg-row b { width: 17mm; flex: none; font-weight: 700; }
.ship-label .lg-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-label .lg-cj { font-family: Consolas, monospace; font-weight: 800; letter-spacing: .6px; }
.ship-label .lg-meta {
  display: flex; justify-content: space-between; gap: 2mm;
  border-top: 1px dashed #000; margin-top: 1mm; padding-top: .8mm;
  font-size: 8.5px; color: #000; white-space: nowrap;
}
@media print {
  body > *:not(#print-host) { display: none !important; }
  #print-host { display: block !important; }
  #print-host .ship-label { border: none; }
  @page { size: 100mm 100mm; margin: 0; }
}
