/* ============================================================
   厦门科盈 仓储管理 · 移动优先样式
   设计目标：手机仓库现场可用，大号点按区域，桌面端同样可读
   ============================================================ */

:root {
  --c-bg: #f4f6f8;
  --c-card: #ffffff;
  --c-ink: #1b2733;
  --c-ink-soft: #5b6b7b;
  --c-line: #e2e8f0;
  --c-primary: #1f6feb;
  --c-primary-dk: #1857c0;
  --c-danger: #d23a3a;
  --c-warn-bg: #fff6e6;
  --c-warn-ink: #9a6b00;
  --c-low-bg: #fdecec;
  --c-low-line: #f1a9a9;
  --c-ok: #1f9d57;
  --tap: 48px;            /* 最小点按高度 */
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 30, 54, .08), 0 1px 2px rgba(16, 30, 54, .06);
}

* { box-sizing: border-box; }

/* hidden 属性必须强制隐藏：弹层/卡片用 .modal-mask{display:flex} 等类会
   覆盖 UA 的 [hidden]{display:none}（同特异性、作者样式靠后胜出），导致
   带 hidden 的弹层在加载时误显示。这里统一兜底，保证 hidden 一定不显示。 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--c-primary); text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-primary);
  color: #fff;
  /* 上下都留内边距，让 logo/品牌垂直居中、不顶栏边（手机端 top 取安全区与 10px 的较大值）。 */
  padding: max(env(safe-area-inset-top), 10px) 14px 10px 14px;
  min-height: 52px;
  box-shadow: var(--shadow);
  /* 手机端也用 flex，使品牌与操作人芯片同行（nav 在手机端隐藏）。 */
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;   /* logo 与文字垂直居中 */
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  height: 100%;
}
.brand-logo {
  /* 缩到接近文字高度，吉祥物视觉重心偏上时不至于把文字"压低"；与文字基线更协调。 */
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  flex: 0 0 auto;
  align-self: center;
}
.brand-text { white-space: nowrap; line-height: 1; align-self: center; }
.top-nav { display: none; }   /* 桌面端显示，手机端用底部标签栏 */

/* 工作台分页控件 */
.wb-pager {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; padding: 12px 0; flex-wrap: wrap;
}
.wb-pager .pg-btn {
  padding: 8px 14px; border: 1px solid #c9d2e0; border-radius: 8px;
  background: #fff; color: #1f6feb; font-size: 15px; cursor: pointer;
}
.wb-pager .pg-btn[disabled] { color: #b8c0cc; border-color: #e5e6eb; cursor: default; }
.wb-pager .pg-sel {
  padding: 8px 10px; border: 1px solid #c9d2e0; border-radius: 8px;
  font-size: 15px; background: #fff; min-width: 96px;
}

/* 操作人芯片：常驻顶栏右侧，手机端也可见可改（底部 footer 在手机端隐藏）。 */
.op-chip {
  margin-left: auto;
  align-self: center;
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  min-height: 32px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.op-chip:active { background: rgba(255, 255, 255, .3); }
.top-nav a {
  color: #eaf1ff;
  padding: 0 12px;
  line-height: var(--tap);
  display: inline-block;
}
.top-nav a.active { color: #fff; font-weight: 700; border-bottom: 3px solid #fff; }

/* ---------- 主体 ---------- */
.app-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 12px 96px 12px;   /* 底部留出标签栏空间 */
}
.page-title { font-size: 20px; margin: 8px 2px 14px; }
.section-title { font-size: 16px; color: var(--c-ink-soft); margin: 20px 2px 10px; }
.back-link { display: inline-block; margin: 4px 0 8px; color: var(--c-ink-soft); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 14px;
}
.card-head { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.card-head.warn { color: var(--c-warn-ink); }
.hint { color: var(--c-ink-soft); font-size: 13px; margin: 6px 0; }
.warn-text { color: var(--c-warn-ink); }
.ok-text { color: var(--c-ok); font-weight: 600; }
.sep { border: none; border-top: 1px solid var(--c-line); margin: 14px 0; }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.kpi-card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  text-align: center;
}
.kpi-card.kpi-warn { background: var(--c-warn-bg); }
.kpi-num { font-size: 28px; font-weight: 800; color: var(--c-primary); }
.kpi-card.kpi-warn .kpi-num { color: var(--c-warn-ink); }
.kpi-label { font-size: 13px; color: var(--c-ink-soft); margin-top: 4px; }
/* 货值 KPI 下的分币种提示（外币货值未并入主数值时显示） */
.kpi-subnote { font-size: 11px; color: var(--c-warn-ink); margin-top: 3px; line-height: 1.3; }

/* ---------- 导航磁贴 ---------- */
.nav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nav-tile {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 96px;
  color: var(--c-ink);
}
.nav-ico { font-size: 26px; }
.nav-name { font-weight: 700; }
.nav-desc { font-size: 12px; color: var(--c-ink-soft); }

/* ---------- 表单与输入 ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
/* 两个 .field 并排一行；窄屏(手机)自动换行回堆叠，避免过挤 */
.field-row { display: flex; gap: 12px; align-items: flex-start; }
.field-row > .field { flex: 1 1 0; min-width: 0; }
@media (max-width: 460px) { .field-row { flex-wrap: wrap; } .field-row > .field { flex-basis: 100%; } }
.field-label { font-size: 13px; color: var(--c-ink-soft); font-weight: 600; }
.big-input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  font-size: 16px;            /* >=16px 避免 iOS 自动放大 */
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  color: var(--c-ink);
}
.big-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }
select.big-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--c-ink-soft) 50%), linear-gradient(135deg, var(--c-ink-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.file-input { font-size: 14px; }
.subform { border: 1px dashed var(--c-line); border-radius: 10px; padding: 10px; }
.subform summary { cursor: pointer; font-weight: 600; color: var(--c-primary); }
.subform .field { margin-top: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  min-height: var(--tap);
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #e9eef5;
  color: var(--c-ink);
  -webkit-tap-highlight-color: transparent;
  /* inline-flex 居中：让 <a class="btn"> 与 <button class="btn"> 文字垂直对齐一致
     （否则 <a> 不像 button 自动居中，同一行两个按钮文字会错位）。 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:active { background: var(--c-primary-dk); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--c-line); color: var(--c-ink); }
.btn-block { width: 100%; display: flex; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* ---------- 扫码区 ---------- */
.scan-row { display: flex; gap: 8px; }
.scan-row .big-input { flex: 1; }
.scan-row .btn { flex: 0 0 auto; }
.scan-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.camera-wrap { margin-top: 12px; border: 1px solid var(--c-line); border-radius: 10px; overflow: hidden; }
#cameraReader { width: 100%; }
.camera-tip { text-align: center; font-size: 12px; color: var(--c-ink-soft); padding: 6px; }

/* ---------- 商品横幅 ---------- */
.product-banner {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}
.product-banner b { font-size: 16px; }
.product-banner .qty-big { color: var(--c-primary); font-weight: 800; }

/* ---------- 照片预览 ---------- */
.photo-preview { max-width: 100%; max-height: 240px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--c-line); }

/* ---------- 本次入库列表 ---------- */
.badge {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  background: var(--c-primary);
  color: #fff;
  border-radius: 11px;
  font-size: 13px;
  padding: 1px 7px;
}
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li { padding: 10px 4px; border-bottom: 1px solid var(--c-line); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.session-list li:last-child { border-bottom: none; }
.session-list li.empty { color: var(--c-ink-soft); justify-content: center; }
.session-list .si-qty { font-weight: 700; color: var(--c-ok); }

/* ---------- 搜索 / 列表元信息 ---------- */
.search-row { display: flex; gap: 8px; }
.search-row .big-input { flex: 1; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: var(--tap); font-size: 15px; }
.check-row input { width: 22px; height: 22px; }
.list-meta { display: flex; justify-content: space-between; align-items: center; color: var(--c-ink-soft); font-size: 13px; margin: 4px 2px 10px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-low { background: var(--c-low-line); }

/* ---------- 库存 / 商品卡片列表 ---------- */
.inv-list { display: flex; flex-direction: column; gap: 10px; }
.inv-card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: block;
  color: var(--c-ink);
  border-left: 4px solid transparent;
}
.inv-card.low { background: var(--c-low-bg); border-left-color: var(--c-low-line); }
.inv-card .ic-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
/* 型号 + 复制货号按钮 作为一组紧挨着，避免按钮被 space-between 甩到中间 */
.inv-card .ic-name-wrap { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.inv-card .ic-name { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.inv-card .ic-qty { font-size: 22px; font-weight: 800; color: var(--c-primary); white-space: nowrap; }
.inv-card.low .ic-qty { color: var(--c-danger); }
.inv-card .ic-sub { color: var(--c-ink-soft); font-size: 13px; margin-top: 4px; }
.inv-card .ic-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #eef2f7; border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--c-ink-soft); word-break: break-all; }
.tag.offer { background: #eef4ff; color: var(--c-primary-dk); }
/* 库龄徽标：默认中性；>30天 橙、>90天 红，提示老库存。 */
.tag.age { background: #eef2f7; color: var(--c-ink-soft); }
.tag.age.age-mid { background: #fff3e0; color: #b25e00; }
.tag.age.age-old { background: #fdecea; color: #c0271c; }

/* ---------- 数据表 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.data-table th, .data-table td { padding: 8px 8px; border-bottom: 1px solid var(--c-line); text-align: left; white-space: nowrap; }
.data-table th { color: var(--c-ink-soft); font-weight: 600; background: #fafbfc; position: sticky; top: 0; }
.data-table td.empty, .empty { color: var(--c-ink-soft); text-align: center; padding: 20px; }
.row-neg { background: var(--c-low-bg); }
.row-neg td { color: var(--c-danger); }
.data-table td.cell-soft { color: var(--c-ink-soft); font-size: 12px; }

/* ---------- 出库映射 / 预览 ---------- */
.map-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.preview-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.sum-box { background: #f7f9fc; border-radius: 10px; padding: 10px; text-align: center; }
.sum-box .sb-num { font-size: 22px; font-weight: 800; }
.sum-box .sb-label { font-size: 12px; color: var(--c-ink-soft); }
.sum-box.bad .sb-num { color: var(--c-danger); }
.sum-box.ok .sb-num { color: var(--c-ok); }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab-btn { flex: 1; min-height: var(--tap); border: 1px solid var(--c-line); background: #fff; border-radius: 10px; font-weight: 600; cursor: pointer; }
.tab-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ---------- 出库：运单号索引新鲜度横幅 ---------- */
.index-banner {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}
.index-banner.ok { background: #eaf7ef; border-color: #bfe6cd; }
.index-banner.warn { background: var(--c-low-bg); border-color: var(--c-low-line); }
.index-banner .ib-title { font-weight: 700; font-size: 14px; }
.index-banner.ok .ib-title { color: var(--c-ok); }
.index-banner.warn .ib-title { color: var(--c-danger); }
.index-banner .ib-meta { font-size: 13px; color: var(--c-ink-soft); margin-top: 4px; word-break: break-all; }

/* ---------- 出库：可折叠的异常清单 ---------- */
.collapse { border: 1px solid var(--c-line); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.collapse > summary {
  list-style: none; cursor: pointer; padding: 12px 14px; min-height: var(--tap);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 600; background: #fafbfc;
}
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary::after { content: "▸"; color: var(--c-ink-soft); transition: transform .15s; }
.collapse[open] > summary::after { transform: rotate(90deg); }
.collapse .cl-count {
  min-width: 24px; text-align: center; background: #e7edf5; color: var(--c-ink-soft);
  border-radius: 12px; padding: 1px 8px; font-size: 13px; font-weight: 700; margin-left: auto;
}
.collapse.has-items > summary { background: var(--c-low-bg); }
.collapse.has-items .cl-count { background: var(--c-low-line); color: #fff; }

/* ---------- 详情页 键值 / chips ---------- */
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; }
.kv-grid .k { color: var(--c-ink-soft); }
.kv-grid .v { font-weight: 600; word-break: break-all; }
.chip-list, .psku-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li, .psku-list li {
  background: #eef2f7; border-radius: 8px; padding: 6px 10px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px; word-break: break-all;
}
.psku-list li { background: #eef4ff; flex-direction: column; align-items: flex-start; gap: 2px; }
.psku-list .pk-main { font-weight: 700; }
.psku-list .pk-sub { color: var(--c-ink-soft); font-size: 12px; }
.add-row, .adjust-row { display: flex; gap: 8px; flex-wrap: wrap; }
.add-row .big-input { flex: 1; min-width: 0; }
.adjust-row .big-input { flex: 1; min-width: 0; }
.psku-add { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 底部标签栏 ---------- */
.tab-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--c-line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -1px 4px rgba(16,30,54,.06);
}
.tab-bar a {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  color: var(--c-ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 56px;
  justify-content: center;
}
.tab-bar a.active { color: var(--c-primary); }
.tab-bar .ti { font-size: 20px; line-height: 1; }
.tab-bar .tl { font-size: 11px; }

/* ---------- 底部信息条 ---------- */
.app-footer {
  position: fixed;
  bottom: 56px;
  left: 0; right: 0;
  z-index: 40;
  display: none;   /* 默认不占位，仅桌面端展示 */
}
.op-badge { cursor: pointer; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(27,39,51,.95);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 14px;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow);
}
.toast.err { background: rgba(210,58,58,.96); }
.toast.ok { background: rgba(31,157,87,.96); }

/* ============================================================
   v2 · 库存货值 / KPI 货值卡
   ============================================================ */
.kpi-card.kpi-value { background: #eef7f0; }
.kpi-card.kpi-value .kpi-num { color: var(--c-ok); font-size: 22px; }
.value-sum { font-weight: 700; color: var(--c-ok); }
.inv-card .ic-value { color: var(--c-ok); }
/* 滞销页的货值=滞压资金，红色高亮（库存页仍为绿色） */
#dsList .inv-card .ic-value { color: #c9302c; font-weight: 700; }

/* ============================================================
   v2 · 商品页 区块切换（仓库SKU / 链接绑定）
   ============================================================ */
#page-products .tabs { margin-top: 4px; }

/* ============================================================
   v2 · 链接卡片 + 绑定行
   ============================================================ */
.link-card .badge-unbound {
  background: var(--c-low-line); color: #fff; border-radius: 11px;
  font-size: 12px; font-weight: 700; padding: 2px 10px; white-space: nowrap;
}
.link-card .badge-bound {
  background: #eef4ff; color: var(--c-primary-dk); border-radius: 11px;
  font-size: 12px; font-weight: 700; padding: 2px 10px; white-space: nowrap;
}
.bind-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.bind-list.empty-bind { color: var(--c-danger); font-size: 13px; }
.bind-line {
  display: flex; align-items: baseline; gap: 8px; font-size: 13px;
  padding: 4px 8px; background: #f7f9fc; border-radius: 8px;
}
.bind-line .bl-model { font-weight: 600; flex: 1; }
.bind-line .bl-sku { color: var(--c-ink-soft); font-size: 12px; }
.bind-line .bl-qty { color: var(--c-primary-dk); font-weight: 700; white-space: nowrap; }
.bind-btn { margin-top: 10px; }

/* ============================================================
   v2 · 绑定弹层（modal）+ picker
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(16, 30, 54, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-card {
  background: var(--c-card); width: 100%; max-width: 560px;
  border-radius: 16px 16px 0 0; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -4px 20px rgba(16, 30, 54, .25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--c-line);
  font-weight: 700; font-size: 16px;
}
.modal-x {
  border: none; background: transparent; font-size: 20px; cursor: pointer;
  color: var(--c-ink-soft); padding: 4px 8px; min-height: 36px;
}
.modal-body { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--c-line); }
.bind-link-info .bind-link-offer { font-weight: 700; font-size: 15px; word-break: break-all; }

.bind-rows { display: flex; flex-direction: column; gap: 8px; }
.bind-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: #f7f9fc; border-radius: 10px;
}
.bind-row .br-info { flex: 1; min-width: 0; }
.bind-row .br-model { font-weight: 600; font-size: 14px; word-break: break-all; }
.bind-row .br-sku { font-size: 12px; color: var(--c-ink-soft); }
.bind-row .br-qty { display: flex; flex-direction: column; font-size: 11px; color: var(--c-ink-soft); width: 72px; }
.bind-row .br-qty .big-input { width: 64px; min-height: 38px; padding: 6px 8px; text-align: center; }
.bind-row .br-del { min-height: 38px; padding: 0 10px; font-size: 13px; }

.bind-picker { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.picker-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 10px;
}
.picker-item .pi-info { flex: 1; min-width: 0; }
.picker-item .pi-model { font-weight: 600; font-size: 14px; word-break: break-all; }
.picker-item .pi-sku { font-size: 12px; color: var(--c-ink-soft); }
.picker-item .pi-add { min-height: 38px; padding: 0 14px; font-size: 14px; flex: 0 0 auto; }

/* 出库未绑定桶里的小按钮 */
.btn-mini { min-height: 32px; padding: 0 10px; font-size: 12px; }

/* ============================================================
   桌面端 / 平板适配
   ============================================================ */
@media (min-width: 760px) {
  .top-nav { display: block; }
  /* inline-flex(非 inline-block):桌面端仍内联与导航同行,但保留 flex 的垂直居中,
     否则 logo 与「厦门科盈」文字退回内联 baseline 对齐 → 文字偏下、与 logo 不在一条中线。 */
  .brand { display: inline-flex; align-items: center; margin-right: 16px; }
  .app-header { display: flex; align-items: center; }
  .tab-bar { display: none; }
  .app-main { padding-bottom: 40px; }
  /* v2 首页 8 张 KPI 卡：桌面端 4 列（2×4），手机端默认 2 列。 */
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .nav-grid { grid-template-columns: repeat(4, 1fr); }
  .map-grid { grid-template-columns: repeat(3, 1fr); }
  /* 绑定弹层在桌面端居中显示（手机端为底部抽屉）。 */
  .modal-mask { align-items: center; }
  .modal-card { border-radius: 16px; max-height: 82vh; }
  .app-footer {
    position: static;
    display: flex;
    justify-content: space-between;
    color: var(--c-ink-soft);
    font-size: 12px;
    max-width: 920px;
    margin: 8px auto 24px;
    padding: 0 12px;
  }
}

/* ============================================================
   商品图（链接缩略图 / 仓库SKU 封面 / 实拍图相册）
   ============================================================ */
/* 通用缩略图盒子：固定尺寸、圆角、object-fit 裁切；占位态居中灰字。 */
.pimg {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #eef2f7; overflow: hidden;
  object-fit: cover; flex: 0 0 auto; color: var(--c-ink-soft);
  font-size: 11px; text-align: center;
}
.pimg-ph { border: 1px dashed var(--c-line); }
.thumb-sku { width: 56px; height: 56px; }
.thumb-link { width: 52px; height: 52px; }
.obu-thumb { width: 44px; height: 44px; font-size: 9px; }

/* 在线状态：有货没在线高亮 + 货号在线/下架徽标 */
.tag.off-stock { background: #fdeceb; color: #c0392b; font-weight: 700; }
.off-stock-card { box-shadow: inset 3px 0 0 #c0392b; }
.tag.lk-online { background: #e6f6ec; color: #1a8f3c; }
.tag.lk-offline { background: #fdeceb; color: #c0392b; }
.tag.lk-unknown { background: #eef1f5; color: #8a94a3; }

/* 带缩略图的卡片：缩略图在左，正文在右（覆盖 inv-card 的 block 布局）。 */
.inv-card.has-thumb { display: flex; gap: 12px; align-items: flex-start; }
.inv-card.has-thumb .ic-body { flex: 1; min-width: 0; }

/* 推送到运营群·勾选模式 */
.inv-card.inv-pushable { cursor: pointer; }
.inv-card.inv-pushable.picked { box-shadow: inset 0 0 0 2px var(--c-primary, #1f6feb); background: #f5f9ff; }
.inv-push-cb { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px; border: 2px solid #c9d2e0;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  font-size: 15px; align-self: center; }
.inv-push-cb.on { background: var(--c-primary, #1f6feb); border-color: var(--c-primary, #1f6feb); }
.push-bar { position: sticky; bottom: 0; z-index: 30; display: flex; gap: 8px; align-items: center;
  background: #fff; border-top: 1px solid var(--c-line); padding: 10px 12px; margin: 12px -12px 0;
  box-shadow: 0 -2px 10px rgba(16,30,54,.08); }
.push-bar select { flex: 1; min-width: 0; }
.push-bar .btn { flex: 0 0 auto; }

/* 库存流水「引用」点开明细 */
.mv-detail-link { color: var(--c-primary, #1f6feb); cursor: pointer; text-decoration: none; }
.mv-detail-link:hover { text-decoration: underline; }
.move-detail { margin-top: 12px; padding: 12px; background: #f7f9fc; border: 1px solid #e5e6eb; border-radius: 8px; }
.move-detail .md-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 8px; }
.move-detail .md-close { cursor: pointer; color: #86909c; padding: 0 6px; }

/* 备货建议卡片 */
a.ic-name { color: inherit; text-decoration: none; }
a.ic-name:hover { text-decoration: underline; }
.rs-suggest { font-size: 13px; font-weight: 600; color: #b25e00; white-space: nowrap; }
.rs-suggest b { font-size: 17px; color: #c0392b; }
.rs-suggest.rs-ok { color: #8a94a3; font-weight: 500; }
.tag.rs-transit-tag { background: #e8f0ff; color: #1a5fd0; font-weight: 700; }
.tag.rs-risk { background: #fdeceb; color: #c0271c; font-weight: 700; }
.rs-transit { margin-top: 6px; font-size: 12px; }
.rs-transit summary { cursor: pointer; color: #1a5fd0; user-select: none; }
.rs-trow { padding: 3px 0 3px 12px; color: var(--c-ink-soft); border-left: 2px solid #e8f0ff; margin: 3px 0; word-break: break-all; }

/* 详情页封面图 */
.pd-cover { margin: 4px 0 12px; }
.pd-cover .cover-img { width: 140px; height: 140px; border-radius: 10px; }

/* 绑定弹层顶部：缩略图 + 货号文字 */
.bind-link-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.bind-link-head .bind-link-text { flex: 1; min-width: 0; }

/* 详情页“绑定的链接”列表带小图：强制行布局（覆盖 psku-list 的列布局） */
.psku-list li.pk-row { flex-direction: row; align-items: center; gap: 10px; }
.psku-list li.pk-row .pk-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* 卡片主体：可点跳转平台在售页；带 URL 的鼠标手型+悬停下划线，无 URL 的普通展示 */
.pk-row .pk-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  text-decoration: none; color: inherit; border-radius: 8px; }
.pk-row a.pk-open { cursor: pointer; }
.pk-row a.pk-open:hover { background: #f6f9ff; }
.pk-row a.pk-open:hover .pk-main { text-decoration: underline; }
.pk-row .pk-open.pk-open-off { cursor: default; }
.pk-go { color: var(--c-primary); font-weight: 600; white-space: nowrap; }

/* 实拍图相册：自适应网格，方形缩略图，点击放大 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.gallery-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px;
  background: #eef2f7; cursor: zoom-in; border: 1px solid var(--c-line);
}

/* 全屏图片放大层（lightbox） */
.img-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .82); padding: 20px; cursor: zoom-out;
}
.img-lightbox.open { display: flex; }
.img-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ============================================================
   入库重设计：模式选择 / 面单候选 / 会话条 / 明细列表
   ============================================================ */
/* 模式选择磁贴 */
.mode-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mode-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; background: #f7f9fc; border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; color: var(--c-ink);
}
.mode-tile:active { transform: translateY(1px); }
.mode-tile .mode-ico { font-size: 26px; }
.mode-tile .mode-name { font-weight: 700; font-size: 16px; }
.mode-tile .mode-desc { font-size: 12px; color: var(--c-ink-soft); }

/* 面单解码候选单号 chip */
.wb-decode-row { margin: 4px 0 8px; }
.wb-candidates { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.cand-chip {
  background: #eef4ff; color: var(--c-primary-dk); border: 1px solid #cfe0ff;
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; word-break: break-all;
}
.cand-chip:active { background: #dbe8ff; }

/* 到货照预览删除角标（复用 gallery-img） */
.ga-wrap { position: relative; }
.ga-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* 会话信息条 */
.session-info-card .si-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.session-info-card .si-mode { font-weight: 700; font-size: 16px; color: var(--c-primary); }
.session-info-card .si-courier { font-size: 13px; color: var(--c-ink-soft); word-break: break-all; }

/* 本单明细列表 */
.line-list { list-style: none; margin: 0; padding: 0; }
.line-list li { padding: 10px 4px; border-bottom: 1px solid var(--c-line); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.line-list li:last-child { border-bottom: none; }
.line-list li.empty { color: var(--c-ink-soft); justify-content: center; }
.line-list .li-main { min-width: 0; word-break: break-all; }
.line-list .li-tag { font-weight: 700; white-space: nowrap; }
.line-list .li-tag.applied { color: var(--c-ok); }
.line-list .li-tag.pending { color: var(--c-warn-ink); }
.line-list li.line-pending { background: var(--c-warn-bg); border-radius: 8px; }

/* ============================================================
   首页：工作台磁贴角标
   ============================================================ */
.nav-badge {
  display: inline-block; min-width: 20px; text-align: center;
  background: var(--c-danger); color: #fff; border-radius: 10px;
  font-size: 12px; font-weight: 700; padding: 0 7px; margin-left: 4px;
  vertical-align: middle;
}

/* ============================================================
   运营绑定工作台 Workbench
   ============================================================ */
.wb-list { display: flex; flex-direction: column; gap: 12px; }
.wb-card {
  background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; gap: 14px; align-items: flex-start;
  border-left: 4px solid var(--c-warn-ink);
}
.wb-photo {
  width: 96px; height: 96px; border-radius: 10px; object-fit: cover;
  background: #eef2f7; border: 1px solid var(--c-line); cursor: zoom-in; flex: 0 0 auto;
}
.wb-photo-ph {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-ink-soft); font-size: 12px; cursor: default;
}
.wb-card .wb-body { flex: 1; min-width: 0; }
.wb-bc { font-size: 14px; word-break: break-all; }
.wb-bc b { font-size: 15px; }
.wb-meta { color: var(--c-ink-soft); font-size: 12px; margin-top: 4px; word-break: break-all; }
.wb-note { color: var(--c-warn-ink); font-size: 13px; margin-top: 4px; }
.wb-resolve-btn { margin-top: 10px; min-height: 40px; padding: 0 16px; font-size: 14px; }

/* 工作台弹层：待绑定件信息头（实拍图 + 条码） */
.wb-item-head { display: flex; gap: 12px; align-items: flex-start; }
.wb-item-head .wb-photo { width: 110px; height: 110px; }
.wb-chosen { margin-top: 8px; padding: 8px 10px; background: #eef7f0; border-radius: 8px; font-size: 13px; word-break: break-all; }

@media (min-width: 760px) {
  .mode-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 最近入库记录（入库页，可删除/反扣） ---------- */
.ri-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.ri-row:last-child { border-bottom: none; }
.ri-photo { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #f0f3f7; flex: 0 0 auto; cursor: pointer; }
.ri-photo-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--c-ink-soft); cursor: default; }
.ri-body { flex: 1; min-width: 0; }
.ri-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ri-top b { word-break: break-all; }
.ri-qty { color: var(--c-primary); font-weight: 700; }
.ri-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 3px; word-break: break-all; }
.ri-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; flex: 0 0 auto; }
.ri-ok { background: #e6f6ec; color: var(--c-ok); }
.ri-pend { background: var(--c-warn-bg); color: var(--c-warn-ink); }
.ri-auto { background: #eef4ff; color: var(--c-primary, #1f6feb); }
.ri-acts { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.ri-edit { min-height: 34px; padding: 0 12px; font-size: 13px; }
.ri-del { min-height: 34px; padding: 0 12px; font-size: 13px; flex: 0 0 auto; }

/* ---------- 快捷补成本价（/price-entry） ---------- */
.pc-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.pc-row:last-child { border-bottom: none; }
.pc-body { flex: 1; min-width: 0; }
.pc-name { font-weight: 600; word-break: break-all; }
.pc-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 3px; }
.pc-act { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pc-input { width: 110px; min-height: 40px; }
.pc-save { min-height: 40px; padding: 0 14px; }
@media (max-width: 480px) {
  .pc-row { flex-wrap: wrap; }
  .pc-act { width: 100%; }
  .pc-input { flex: 1; width: auto; }
}

/* ---------- 快递到货（/arrivals） ---------- */
.arv-card { padding: 0; overflow: hidden; }
.arv-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer; }
.arv-head:active { background: #f6f8fb; }
/* 到货商品图放大到 96px，点击可看大图（data-full → lightbox）。 */
.arv-thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: #f0f3f7; flex: 0 0 auto; cursor: zoom-in; }
.arv-thumb-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--c-ink-soft); cursor: default; }
.arv-info { flex: 1; min-width: 0; }
.arv-title { font-weight: 700; word-break: break-all; }
.arv-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 3px; }
.arv-caret { color: var(--c-ink-soft); flex: 0 0 auto; }
.arv-detail { padding: 0 14px 12px 14px; border-top: 1px solid var(--c-line); }
.arv-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.arv-gimg { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; cursor: pointer; }
.arv-lines { list-style: none; margin: 0; padding: 0; }
.arv-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.arv-line:last-child { border-bottom: none; }
.arv-limg { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #f0f3f7; flex: 0 0 auto; cursor: pointer; }
.arv-linfo { flex: 1; min-width: 0; word-break: break-all; }
.arv-line { align-items: flex-start; }

/* 待绑定明细内联「绑定入库」模块 */
.arv-bindbtn { margin-top: 6px; }
.arv-bind { margin-top: 8px; padding: 10px; background: #f7f9fc; border: 1px solid var(--c-line); border-radius: 8px; }
.arv-bind-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.arv-bind-tab { flex: 1; padding: 6px 8px; font-size: 13px; border: 1px solid var(--c-line); background: #fff; border-radius: 6px; color: var(--c-ink-soft); cursor: pointer; }
.arv-bind-tab.active { border-color: var(--c-primary, #1f6feb); color: var(--c-primary, #1f6feb); font-weight: 700; background: #eef4ff; }
.arv-bind-row { display: flex; gap: 8px; align-items: center; }
.arv-bind-row .big-input { flex: 1; min-width: 0; }
.arv-bind #arvBindNew, .arv-bind [id^="arvBindNew-"] { display: flex; flex-direction: column; gap: 8px; }
.arv-bind-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.arv-sku-opt { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 8px; background: #fff; border: 1px solid var(--c-line); border-radius: 6px; }
.arv-sku-opt .ellipsis { flex: 1; min-width: 0; font-size: 13px; }
.arv-po-link { color: var(--c-primary, #1f6feb); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.arv-po-link:hover { text-decoration: underline; }
.arv-sku-opt .ellipsis-inline { word-break: break-all; }
.arv-unbound { color: #c0392b; font-weight: 600; }

/* 采购单「国内快递单号」内联快速填写 */
.po-qf { display: inline-flex; gap: 6px; align-items: center; }
.po-qf-input { flex: 1; min-width: 120px; padding: 4px 8px; font-size: 13px; border: 1px solid var(--c-line); border-radius: 6px; }
/* 采购单「绑到现有SKU」内联搜索区 */
.po-be-btn { margin-left: 6px; }
.po-be-row { margin-top: 8px; padding: 10px; background: #f7f9fc; border: 1px solid var(--c-line); border-radius: 8px; }
/* 采购单卡：仓库SKU 可点标签 + 条形码标签 */
.tag.tag-sku { background: #eef4ff; color: var(--c-primary, #1f6feb); font-weight: 700; text-decoration: none; }
.tag.tag-sku:hover { text-decoration: underline; }
.tag.tag-bc { background: #f2f3f5; color: #4e5969; font-family: monospace; }
/* 库存卡·复制名称小按钮（在<a>卡片内，点击不跳转） */
.sku-copy-btn { flex: 0 0 auto; padding: 2px 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--c-line); border-radius: 6px; background: #eef4ff; color: var(--c-primary, #1f6feb); cursor: pointer; }
.sku-copy-btn:active { background: #dbe8ff; }
/* 货号标签可点复制 */
.tag.tag-copy { cursor: copy; }
.tag.tag-copy:active { background: #dbe8ff; }
/* 扫描记录·货号/SKU 交互芯片:绿=已扣(点看SKU) 描边绿=已绑(点看SKU) 橙=未绑(点去绑定) */
.scan-chip-wrap { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.scan-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 999px; background: #eef0f3; color: #5b616b; }
.scan-chip.ok { background: #e6f6ec; color: #1a8f3c; }
.scan-chip.ok2 { background: #e6f6ec; color: #1a8f3c; box-shadow: inset 0 0 0 1px rgba(26,143,60,.35); }
.scan-chip.warn { background: #fff3e0; color: #b25e00; }
.scan-chip.clickable { cursor: pointer; }
.scan-chip.clickable:active { filter: brightness(.9); }
.scan-chip.dim { color: #8a8f98; font-weight: 400; }
/* 工作台深链定位高亮(/workbench?offer=) */
.obu-focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
/* 库存卡·单SKU推送到类目群按钮 + 弹出类目菜单 */
.sku-push-btn { flex: 0 0 auto; padding: 2px 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--c-line); border-radius: 6px; background: #fff7e6; color: #9a6b00; cursor: pointer; }
.sku-push-btn:active { background: #ffedc7; }
.sku-push-menu { position: absolute; z-index: 999; background: #fff; border: 1px solid var(--c-line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.16); padding: 8px; width: 230px; }
.spm-title { font-size: 12px; color: var(--c-ink-soft); padding: 2px 6px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0;
  background: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.spm-item:hover { background: #eef4ff; }
.spm-item.last { font-weight: 700; color: var(--c-primary, #1f6feb); }
.spm-item:disabled { color: #b0b4bb; cursor: not-allowed; }

/* ---------- 品牌货值看板（/brands） ---------- */
.br-row { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 14px; }
.br-row:active { background: #f6f8fb; }
.br-info { flex: 1; min-width: 0; }
.br-name { font-weight: 700; font-size: 16px; word-break: break-all; }
.br-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 4px; }
.br-nocost { color: var(--c-warn-ink); background: var(--c-warn-bg); border-radius: 8px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.br-value { font-weight: 800; font-size: 18px; color: var(--c-ok); flex: 0 0 auto; }

/* ---------- SKU详情：更改主图 ---------- */
.pd-cover-edit { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pd-cover-edit .btn { min-height: 38px; font-size: 13px; padding: 0 12px; }
.pd-cover-btn { display: inline-flex; align-items: center; }
.pd-cover-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.pd-cover-picker .hint { width: 100%; margin: 0; }
.pd-cover-opt { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid var(--c-line); cursor: pointer; }
.pd-cover-opt:active { border-color: var(--c-primary); }

/* ============================================================
   登录页（独立页，不含顶栏/标签栏，居中卡片）
   ============================================================ */
.login-body { background: var(--c-bg); }
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 14px;
}
.login-card {
  background: var(--c-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px 22px 20px;
  width: 100%;
  max-width: 360px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  box-shadow: var(--shadow);
}
.login-brand-text { font-size: 18px; font-weight: 700; color: var(--c-ink); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-error {
  background: var(--c-low-bg);
  border: 1px solid var(--c-low-line);
  color: var(--c-danger);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 14px;
  text-align: center;
}
.login-foot { font-size: 12px; color: var(--c-ink-soft); margin: 14px 0 0; text-align: center; line-height: 1.5; }
.login-site { font-size: 12px; color: var(--c-ink-soft); }

/* ============================================================
   顶栏会话芯片：头像 + 姓名 + 退出
   ============================================================ */
.op-chip.has-session { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.op-chip .op-avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  background: rgba(255, 255, 255, .25); flex: 0 0 auto;
}
.op-chip .op-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-logout {
  margin-left: 6px; align-self: center; flex: 0 0 auto;
  color: #fff; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 16px; padding: 6px 12px; min-height: 32px;
  display: inline-flex; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.op-logout:active { background: rgba(255, 255, 255, .3); }

/* ============================================================
   采购（/purchase）+ 采购配置（/purchase/config）
   ============================================================ */
/* 采购历史一行 */
.pu-row { padding: 12px 14px; }
.pu-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pu-src { font-weight: 700; font-size: 15px; word-break: break-all; }
.pu-total { font-weight: 800; font-size: 16px; color: var(--c-ok); flex: 0 0 auto; }
.pu-kv { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; }
.pu-kv .k { color: var(--c-ink-soft); flex: 0 0 60px; }
.pu-kv .v { font-weight: 600; word-break: break-all; min-width: 0; }
.pu-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 6px; }

/* 配置页：供应商 / 支付方式 一行 */
.cfg-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.cfg-row.cfg-off { opacity: .6; }
.cfg-info { flex: 1; min-width: 0; }
.cfg-name { font-weight: 700; font-size: 15px; word-break: break-all; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cfg-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 3px; }
.cfg-actions { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

/* 来源标签 */
.pu-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #eef2f7; color: var(--c-ink-soft); flex: 0 0 auto; }
.pu-tag-fixed { background: #e7f0ff; color: var(--c-primary); }

/* 总付款金额框：各行 单价×数量 自动汇总，醒目绿色合计 */
.pu-total-box { display: flex; align-items: center; gap: 10px; background: #f0fbf3; border: 1px solid #cdeed7; border-radius: 10px; padding: 12px 14px; flex-wrap: wrap; }
.pu-total-label { color: var(--c-ink-soft); font-size: 14px; }
#pu_total { font-size: 24px; font-weight: 800; color: #1a8f3c; }

/* 采购录入·订单明细行：带列标签，桌面一行、窄屏(≤560)自动堆叠(订单号/货号各一行 + 数量·单价·佣金一排) */
.pu-line-grid { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.puf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.puf > .big-input { width: 100%; }
.puf-l { font-size: 12px; color: var(--c-ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.puf-hint-inline { color: #98a2b3; font-weight: 400; }
.puf-order { flex: 2.4 1 210px; }
.puf-order-row { display: flex; gap: 6px; align-items: center; }
.puf-order-row .pu-line-order { flex: 1 1 0; min-width: 0; }
.puf-offer { flex: 2.6 1 210px; }   /* 加宽:货号名(如 SIMGOT EA500LM-grey)完整显示不截断 */
.puf-qty  { flex: 0 1 62px; }
.puf-price { flex: 1 1 88px; }
.puf-comm  { flex: 1 1 88px; }
.pu-line-grid .pu-line-del { align-self: flex-end; flex: 0 0 auto; white-space: nowrap; }
.pu-line-urlrow { margin-top: 8px; }
@media (max-width: 560px) {
  .puf-order, .puf-offer { flex: 1 1 100%; }
  .puf-qty, .puf-price, .puf-comm { flex: 1 1 0; }
}
/* 该货号绑定的仓库SKU(有绑定才显示) */
.pu-line-sku { display: block; margin-top: 6px; font-size: 13px; color: var(--c-ink); }
.pu-line-sku.unbound { color: #98a2b3; }
.pu-line-sku b { color: var(--c-primary, #1f6feb); }
.pu-line-sku .pls-model { color: var(--c-ink-soft); font-weight: 400; margin-left: 4px; }
/* 主图缩略图:鼠标悬停放大预览(不占位、浮层显示;用原图 URL 放大到 200px,清晰) */
.pu-line-thumb { position: relative; }
.pu-line-thumb .pu-thumb-sm { cursor: zoom-in; transition: box-shadow .1s; }
.pu-line-thumb:hover { z-index: 60; }
.pu-line-thumb:hover .pu-thumb-sm {
  position: absolute; top: -4px; left: -4px; width: 200px; height: 200px;
  z-index: 60; box-shadow: 0 10px 34px rgba(16,24,40,.28); border-color: var(--c-primary, #1f6feb);
}

/* 采购录入每行前的商品主图缩略图 */
.pu-line-thumb { flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.pu-thumb-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #f2f4f7; border: 1px solid var(--c-line, #eceff3); }
.pu-thumb-ph { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #b0b4bb; background: #f2f4f7; border-radius: 6px; }
/* 采购录入·历史采购参考面板(按货号:最近价/平台/链接/用此价) */
.pu-line-hist { margin-top: 6px; padding: 8px 10px; background: #f6f8fa; border-radius: 8px; font-size: 12px; }
.pu-hist-head { font-weight: 700; color: var(--c-ink-soft); margin-bottom: 4px; }
.pu-hist-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; border-top: 1px dashed var(--c-line); }
.pu-hist-row:first-of-type { border-top: none; }
.pu-hist-row .ph-d { color: var(--c-ink-soft); white-space: nowrap; }
.pu-hist-row .ph-p { font-weight: 600; white-space: nowrap; }
.pu-hist-row .ph-v { white-space: nowrap; }
.pu-hist-rel { color: #b25e00; background: #fff3e0; border-radius: 6px; padding: 0 6px; word-break: break-all; }
.pu-hist-use { margin-left: auto; }
/* 采购单卡片·利润预估块(卢布/人民币双币) */
.po-profit { margin: 6px 0; padding: 8px 10px; background: #f6f8fa; border-radius: 8px; font-size: 12px; }
.po-profit-h { font-weight: 700; color: var(--c-ink-soft); }
.po-profit-b { margin: 3px 0; line-height: 1.5; }
.po-profit-r { font-size: 13px; font-weight: 600; }
.po-usd-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #1a8f3c; background: #e6f6ec; border-radius: 6px; padding: 0 6px; margin-left: 4px; }
/* 商品详情·供货商管理 */
.ps-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 2px; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.ps-row:last-child { border-bottom: none; }
.ps-name { font-weight: 700; }
.ps-ops { margin-left: auto; display: inline-flex; gap: 4px; }
/* 采购录入·利润预估块(有出单=实际扣费自动算;无出单=手填 售价/佣金%/运费) */
.pu-line-profit { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--c-line); }
.pu-prof-head { font-weight: 700; color: var(--c-ink-soft); }
.pu-prof-body { margin: 2px 0; }
.pu-prof-inputs { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.pu-prof-inputs label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--c-ink-soft); }
.pu-prof-inputs input { width: 86px; min-height: 34px; padding: 4px 8px; font-size: 14px; border: 1px solid var(--c-line); border-radius: 8px; }
.pu-prof-res { margin-top: 3px; font-size: 13px; }

/* 出库记录·物流核对表：按月分组(月行总计,展开看逐天) + 运单号明细 */
.or-month-head { display: flex; align-items: center; gap: 12px; padding: 14px 10px; cursor: pointer; background: #f6f8fa; border-radius: 8px; margin-top: 8px; }
.or-month-head:hover { background: #eef4ff; }
.or-month-name { font-weight: 800; font-size: 17px; }
.or-month-cnt { margin-left: auto; color: var(--c-primary); font-weight: 700; }
.or-month-head .or-day-arrow { margin-left: 8px; }   /* cnt 已占 auto,箭头贴右侧即可 */
.or-month-days { padding-left: 8px; }
.or-day { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--c-line, #eceff3); cursor: pointer; }
.or-day:hover { background: #f6f9ff; }
.or-day-date { font-weight: 700; font-size: 16px; }
.or-day-cnt { color: var(--c-primary); font-weight: 700; }
.or-day-arrow { margin-left: auto; color: #b0b4bb; font-size: 20px; }
.or-trk { display: flex; align-items: baseline; gap: 10px; padding: 6px 4px; border-bottom: 1px solid #f2f4f7; font-size: 14px; }
.or-trk-i { color: #b0b4bb; font-size: 12px; flex: 0 0 42px; text-align: right; }
.or-trk-t { word-break: break-all; }
/* 出库SKU统计行：件数贴右侧,负库存警示色;整行可点进SKU详情 */
.or-sku-row { cursor: pointer; }
.or-sku-row:hover { background: #f6f9ff; }
.or-sku-qty { margin-left: auto; color: var(--c-primary); font-weight: 700; white-space: nowrap; }
.or-sku-qty.or-sku-neg { color: #b25e00; }
/* 共享表格富信息标签：袋号/店铺/核对状态/照片/物流动态 */
.or-sheet-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin-left: 4px; }
.or-sheet-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 999px; background: #eef0f3; color: #5b616b; white-space: nowrap; }
.or-sheet-tag.or-sheet-shop { background: #e8f0fe; color: #1f6feb; }
.or-sheet-tag.or-sheet-ok { background: #e6f6ec; color: #1a8f3c; }
.or-sheet-tag.or-sheet-warn { background: #fff3e0; color: #b25e00; }
.or-sheet-tag.or-sheet-dim { font-weight: 400; }
/* 出库页·线下出库(其他项目拿货) SKU 搜索结果 */
.off-results { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.off-hit { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 14px; }
.off-hit:hover { background: #eef4ff; border-color: var(--c-primary, #1f6feb); }
.off-hit b { flex: 0 1 auto; }
.off-hit .hint { margin: 0; }

/* 出库记录·分平台徽标(Ozon/Yandex/其他) */
.or-plats { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.or-plat { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.or-plat-ozon { background: #e8f0fe; color: #1f6feb; }
.or-plat-yandex { background: #fff3d6; color: #9a6b00; }
.or-plat-other { background: #eef0f3; color: #5b616b; }
.or-trk .or-plat { margin-left: auto; }   /* 明细行:徽标贴右侧 */
/* —— 扫码出库并入出库记录页（记录互通）：扫码平台徽标 + 明细分组/标签 —— */
.or-plat-shopee { background: #ffe9d6; color: #c2540a; }
.or-plat-ml { background: #e6f6ec; color: #1a8f3c; }
.or-plat-ae { background: #fde8f0; color: #b0246f; }
.or-plat-scanozon { background: #e8f0fe; color: #1f6feb; box-shadow: inset 0 0 0 1px rgba(31,111,235,.35); }
.or-plat-scanyandex { background: #fff3d6; color: #9a6b00; box-shadow: inset 0 0 0 1px rgba(154,107,0,.35); }
.or-plat-wb { background: #f7e6f5; color: #cb11ab; }
.or-plat-scan { background: #eef0f3; color: #5b616b; }
.or-scan-sec { margin: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--c-ink-soft); }
.or-scan-tag { font-size: 11px; font-weight: 700; margin-left: 8px; }   /* 多SKU套装标签可换行,手机不横向溢出 */
.or-scan-tag.ok { color: var(--c-ok); }
.or-scan-tag.warn { color: var(--c-warn-ink); }
.or-scan-tag.dim { color: var(--c-ink-soft); font-weight: 400; }
.or-scan-meta { font-size: 11px; color: var(--c-ink-soft); font-weight: 400; }
/* 扫码页「今日扫描记录」：服务端回显行的时间·操作人 + 标签配色（session-list 作用域） */
.scan-log-meta { font-size: 11px; color: var(--c-ink-soft); font-weight: 400; }
.session-list .li-tag { font-weight: 700; }   /* 不 nowrap:多SKU扣减串在手机上要能换行 */
.session-list .li-tag.applied { color: var(--c-ok); }
.session-list .li-tag.pending { color: var(--c-warn-ink); }
.session-list li.line-pending { background: var(--c-warn-bg); border-radius: 8px; }
.session-list .li-main { min-width: 0; word-break: break-all; }   /* 长运单号可收缩换行 */

/* 扫码出库 · 出库袋数登记行（日期默认当天可改 + 袋数 + 保存） */
.ob-bag-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ob-bag-label { font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.ob-bag-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-ink-soft); white-space: nowrap; }
.ob-bag-field input { border: 1px solid #d9dee6; border-radius: 8px; padding: 8px 10px; font-size: 15px; background: #fff; }
.ob-bag-field input[type=number] { width: 84px; }

/* 扫码出库 · 批量粘贴运单号 */
.batch-textarea { width: 100%; border: 1px solid #d9dee6; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.6; resize: vertical; background: #fff; box-sizing: border-box; }
.batch-textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }

/* ========== 采购单管理（/purchase/orders）—— 到货核对卡片 ========== */
.po-card { padding: 16px; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); }
/* 采购单·合并卡(同采购单号多订单):外层组卡 + 组头(共用信息) + 内嵌子订单(扁平无双层卡样式) */
.po-group { padding: 12px 12px 14px; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); }
.po-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 4px 12px; border-bottom: 1px dashed var(--c-line, #e3e8ef); margin-bottom: 6px; }
.po-group-title { font-size: 15px; font-weight: 800; }
.po-group-badge { display: inline-block; margin-left: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: #1a6dd0; background: #e8f0fe; border-radius: 999px; }
.po-group-sub { margin-left: auto; font-size: 13px; color: var(--c-ink-soft); }
.po-group-body > .po-suborder { box-shadow: none; border: 1px solid var(--c-line, #eceff3); border-radius: 10px; padding: 12px; margin-top: 10px; }
.po-order-date { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: #5b6b7b; background: #eef2f6; border-radius: 999px; }
.po-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.po-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f1f4f8; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.po-thumb[data-full] { cursor: zoom-in; }
.po-thumb-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--c-ink-soft); border: 1px dashed #d4dae3; box-shadow: none; }
.po-info { flex: 1; min-width: 0; }
.po-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.po-offer { font-weight: 800; font-size: 16px; line-height: 1.35; word-break: break-all; min-width: 0; }
.po-sub { margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.po-src { font-size: 12px; color: var(--c-ink-soft); background: #f3f5f8; border-radius: 6px; padding: 2px 8px; }

/* 对货数字：采购 N / 到货 M，足量绿、不足红（胶囊底色更醒目） */
.po-match-ok, .po-match-bad { font-weight: 800; font-size: 12.5px; flex: 0 0 auto; white-space: nowrap; padding: 3px 9px; border-radius: 8px; }
.po-match-ok { color: var(--c-ok); background: #e6f6ec; }
.po-match-bad { color: #d23a3a; background: #fdecea; }

/* 到货状态徽章（圆角胶囊，配色区分状态：绿=到货/确认，橙=部分/待绑定，蓝=待到货/待填） */
.po-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: 0 0 auto; }
.po-badge.po-ok { background: #e6f6ec; color: var(--c-ok); }
.po-badge.po-warn { background: #fff3e0; color: #b25e00; }
.po-badge.po-wait { background: #eaf1ff; color: #3b6fb0; }
.po-badge.po-refunded { background: #f3e8ff; color: #7c3aed; }
.po-badge.po-returned { background: #e0f2fe; color: #0369a1; }

/* ===== 滞销看板 ===== */
.ds-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.ds-tile { border-radius: 12px; padding: 10px 8px; text-align: center; background: #f6f8fa; border: 1px solid #eceff3; }
.ds-tile-n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.ds-tile-l { font-size: 12px; font-weight: 600; margin-top: 2px; }
.ds-tile-v { font-size: 11px; color: var(--c-ink-soft); margin-top: 2px; }
.ds-tile.ds-normal { background: #e6f6ec; border-color: #cdeed7; }
.ds-tile.ds-normal .ds-tile-n { color: #1a8f3c; }
.ds-tile.ds-mild { background: #fff7e6; border-color: #ffe6bf; }
.ds-tile.ds-mild .ds-tile-n { color: #b25e00; }
.ds-tile.ds-medium { background: #fff0e6; border-color: #ffd6bf; }
.ds-tile.ds-medium .ds-tile-n { color: #d2600f; }
.ds-tile.ds-severe { background: #fdeceb; border-color: #f8cfcb; }
.ds-tile.ds-severe .ds-tile-n { color: #c0392b; }
@media (max-width: 480px) { .ds-tile-n { font-size: 19px; } .ds-tile-l { font-size: 11px; } }
.ds-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: 0 0 auto; }
.ds-badge.ds-normal { background: #e6f6ec; color: #1a8f3c; }
.ds-badge.ds-mild { background: #fff7e6; color: #b25e00; }
.ds-badge.ds-medium { background: #fff0e6; color: #d2600f; }
.ds-badge.ds-severe { background: #fdeceb; color: #c0392b; }
/* 上架闲鱼 切换按钮（卡片内，绿=已上架） */
.xy-btn { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  border: 1px solid #ffd9a8; background: #fff7ed; color: #b25e00; cursor: pointer; }
.xy-btn.xy-on { border-color: #cdeed7; background: #e6f6ec; color: #1a8f3c; }
/* 退货售后·退款子状态小 chip */
.po-rchip { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.po-rchip-info { background: #e0f2fe; color: #0369a1; }
.po-rchip-warn { background: #fff3e0; color: #b25e00; }
.po-rchip-ok { background: #e6f6ec; color: var(--c-ok); }
.po-rchip-bad { background: #fdeceb; color: #c0392b; }

.po-skus { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 2px 0 12px; }
/* 扫码建SKU并绑货号:展开的条码输入行 */
.po-qsku-row { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.po-qsku-row .po-qsku-input { flex: 1; min-width: 0; }
.po-qsku-msg { white-space: nowrap; font-size: 12px; }
/* 货号未绑定仓库SKU：标红提示需绑定，而非灰色不起眼 */
.tag-muted { background: #fdeceb; color: #c0392b; font-style: normal; font-weight: 600; }

/* 信息行：浅色标签 + 深色值，行距更松、列对齐；价格金额强调。
   标签【分散对齐】(text-align-last:justify)：3字「采购价」撑成与4字标签等宽，值列严格对齐。 */
.po-kv { display: flex; gap: 10px; font-size: 13px; line-height: 1.75; align-items: baseline; }
.po-kv .k { color: #98a1ad; flex: 0 0 4em; font-weight: 500; text-align: justify; text-align-last: justify; }
.po-kv .v { flex: 1 1 0; font-weight: 600; word-break: break-all; min-width: 0; color: var(--c-ink); }
.po-kv .v .money { color: #1a8f3c; font-weight: 800; font-size: 14px; }
.po-muted { color: var(--c-ink-soft); font-weight: 400; }
.po-sess { color: var(--c-primary); text-decoration: none; word-break: break-all; }
.po-sess:hover { text-decoration: underline; }

.po-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 10px; }
.po-confirmed { font-size: 12px; color: var(--c-ok); font-weight: 600; flex: 1 1 auto; min-width: 0; word-break: break-all; }
/* 系统已核对到货（区别于人工确认）——同绿色，占整行 */
.po-sysok { flex-basis: 100%; }
/* 订单编号置顶：醒目、可点击跳转采购单详情 */
.po-orderno { display: inline-block; margin: 2px 0 10px; font-size: 14px; font-weight: 800;
  color: var(--c-primary); text-decoration: none; word-break: break-all; }
.po-orderno:hover { text-decoration: underline; }
/* 订单编号(平台单号)改为纯展示：不再蓝色链接、不高亮 */
.po-orderno-plain { color: var(--c-ink-soft); font-weight: 700; }
.po-orderno-plain:hover { text-decoration: none; }
/* 采购单号 → 采购详情 跳转链接 */
.po-jump { color: var(--c-primary); text-decoration: none; font-weight: 700; word-break: break-all; }
.po-jump:hover { text-decoration: underline; }
/* 订单归属店铺徽标（订单编号旁自动显示哪家店） */
.po-store { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700;
  background: #eef4ff; color: var(--c-primary, #1f6feb); border-radius: 10px; white-space: nowrap; }

/* ---------- 用户管理(/users) ---------- */
.u-card.u-off { opacity: .55; }
.u-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.u-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #f0f3f7; flex: 0 0 auto; }
.u-av-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.u-info { flex: 1; min-width: 140px; }
.u-name { font-weight: 700; font-size: 16px; }
.u-meta { font-size: 12px; color: var(--c-ink-soft); margin-top: 2px; }
.u-role-sel { max-width: 190px; flex: 0 0 auto; }
.u-mod-grp { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--c-line);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.u-mod-grp-t { font-size: 12px; font-weight: 700; color: var(--c-ink-soft); flex: 0 0 100%; }
.u-mod { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.u-mod input { width: 16px; height: 16px; }
.u-actions { margin-top: 10px; display: flex; gap: 8px; }
/* 权限批量保存：默认不显示保存行；本卡有未保存改动(.u-dirty)才亮出💾保存/撤销 + 高亮边框 */
.u-save-row { display: none; margin-top: 10px; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-card.u-dirty .u-save-row { display: flex; }
.u-card.u-dirty { box-shadow: 0 0 0 2px #f59e0b inset; }
.u-dirty-hint { font-size: 12px; color: #b25e00; font-weight: 600; margin-right: auto; }
/* 发不出·已退款：紫色信息条 + 整卡淡化（终态，视觉弱化但仍可读/可撤销） */
.po-refunded-info { font-size: 12px; color: #7c3aed; font-weight: 600; flex: 1 1 auto; min-width: 0; word-break: break-all; }
.po-card-refunded { opacity: .72; }
.po-card-refunded .po-offer { text-decoration: line-through; text-decoration-color: #c4b5e8; }
/* 退货售后信息条：蓝色，含退货单号/退款状态/已扣库存（退货是进行中的核对，不淡化整卡） */
.po-returned-info { font-size: 12px; color: #0369a1; font-weight: 600; flex: 1 1 auto; min-width: 0; word-break: break-all; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.po-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line, #eceff3); }
