/* 衣仓 · 界面样式
 * 方向：温和消费级 App —— 暖纸底、白卡片、一个只给动作用的蓝。
 */

:root {
  --paper: #F6F1E9;
  --paper-2: #FBF8F2;
  --card: #FFFFFF;

  --ink: #221E19;
  --ink-2: #4A423A;
  --muted: #7A6F60;
  --faint: #A99C8B;

  --accent: #2F6BFF;
  --accent-ink: #2257DA;
  --accent-soft: #EDF2FF;

  --red: #C0392B;
  --red-soft: #FCEDEA;
  --green: #2F8F5B;
  --green-soft: #EAF6EF;

  --line: #EFE8DD;
  --line-2: #E3DACB;

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-card: 0 1px 2px rgba(34, 30, 25, .05), 0 10px 26px rgba(34, 30, 25, .05);
  --shadow-pop: 0 12px 40px rgba(34, 30, 25, .18);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
          "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- 壳 ---------- */

.app { min-height: 100dvh; }

main {
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.page { padding: 0 16px; }
.page-tight { padding: 0 16px; }

/* ---------- 底部 / 侧边导航 ---------- */

.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: .02em;
  transition: color .15s ease;
}

.nav-item svg { width: 21px; height: 21px; }
.nav-item[aria-current="page"] { color: var(--accent); font-weight: 500; }
.nav-item:active { transform: translateY(1px); }

/* ---------- 顶部 ---------- */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 10px;
}

.greet-h {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
}

.greet-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}

.greet-sub b { color: var(--ink-2); font-weight: 600; }
.greet-sub .warn { color: var(--red); font-weight: 600; }

.avatar {
  width: 36px; height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

.bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
}

.bar-title h1 { font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.bar-title .back {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
  color: var(--ink-2);
}
.bar-title .back svg { width: 17px; height: 17px; }
.bar-title.in-page { padding: 14px 0 10px; }

/* ---------- 扫码卡 ---------- */

.scan-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 0 0;
  padding: 15px 16px;
  border-radius: var(--r-lg);
  background: var(--accent);
  color: #fff;
  text-align: left;
  box-shadow: 0 2px 4px rgba(34, 30, 25, .10), 0 10px 22px rgba(34, 30, 25, .14);
  transition: transform .12s ease, box-shadow .12s ease;
}

.scan-card:active { transform: scale(.985); box-shadow: 0 1px 2px rgba(34, 30, 25, .12), 0 4px 10px rgba(34, 30, 25, .12); }

.scan-card .ic {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  display: grid; place-items: center;
}
.scan-card .ic svg { width: 22px; height: 22px; }

.scan-card .tx { flex: 1; min-width: 0; }
.scan-card .tx b { display: block; font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.scan-card .tx span { display: block; margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, .84); }
.scan-card .go { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .95); white-space: nowrap; }

/* ---------- 池卡 ---------- */

.pool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.pool {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 11px 12px 12px;
  border: 1px solid transparent;
  text-align: left;
  transition: border-color .15s ease;
}
.pool[aria-pressed="true"] { border-color: var(--accent); }

.pool span { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.pool b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.pool.warn b { color: var(--red); }

/* ---------- 卡片 ---------- */

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-top: 12px;
  overflow: hidden;
}

.card-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px 0;
}

.card-h h2 { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.card-h h2 small { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; }
.card-h .link { font-size: 11.5px; color: var(--accent); font-weight: 500; }

.card-body { padding: 10px 15px 14px; }
.card-pad { padding: 14px 15px; }

/* ---------- 矩阵表 ---------- */

.matrix { width: 100%; border-collapse: collapse; margin-top: 8px; }

.matrix th, .matrix td {
  padding: 8px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
}

.matrix th { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.matrix th:first-child, .matrix td:first-child {
  text-align: left;
  width: 38px;
  color: var(--muted);
  font-size: 11.5px;
}
.matrix td { font-size: 13.5px; font-weight: 500; }
.matrix tr:last-child td, .matrix tr:last-child th { border-bottom: 0; }
.matrix td.zero { color: var(--faint); }
.matrix td.low { color: var(--red); }
.matrix td.sum { font-weight: 700; }

.matrix .swatch {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: 1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

/* ---------- 流水 ---------- */

.feed-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 16px;
  margin-top: 20px;
  margin-bottom: 8px;
}
.feed-h h2 { font-size: 13.5px; font-weight: 700; }
.feed-h .link { font-size: 11.5px; color: var(--accent); font-weight: 500; }

.feed { display: flex; flex-direction: column; gap: 7px; }

.feed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 11px 13px;
  box-shadow: 0 1px 2px rgba(34, 30, 25, .04);
  text-align: left;
  width: 100%;
}

.feed-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.feed-row .dot.in { background: var(--green); }
.feed-row .dot.ret { background: #E08A2E; }
.feed-row .dot.bad { background: var(--red); }

.feed-row .tx { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.feed-row .tx b { color: var(--ink); font-weight: 600; }
.feed-row .tm { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------- 列表行 ---------- */

.list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(34, 30, 25, .04);
  transition: transform .12s ease;
}
.list-row:active { transform: scale(.99); }

.swatch-lg {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .10);
}

.list-row .tx { flex: 1; min-width: 0; }
.list-row .tx b { display: block; font-size: 13px; font-weight: 600; }
.list-row .tx span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.list-row .qty { text-align: right; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-row .qty small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.list-row .qty svg { width: 16px; height: 16px; color: var(--faint); display: inline-block; vertical-align: middle; }

/* ---------- 分段控件 ---------- */

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #EDE6DA;
  border-radius: 12px;
  margin: 4px 0 0;
}

.seg button {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .15s ease, box-shadow .15s ease;
}

.seg button[aria-pressed="true"] {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(34, 30, 25, .12);
  color: var(--ink);
  font-weight: 600;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 4px rgba(34, 30, 25, .10), 0 8px 16px rgba(34, 30, 25, .12); }
.btn-primary:disabled { background: #C9D3E8; box-shadow: none; color: #fff; }

.btn-ghost { background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; }

.btn-sm { height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }

.action-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(246, 241, 233, 0), var(--paper) 28%);
  margin-top: 16px;
}
.action-bar .btn { flex: 1; }

/* ---------- 扫码屏 ---------- */

.cam {
  position: relative;
  margin-top: 4px;
  height: 208px;
  border-radius: var(--r-lg);
  background: #17140F;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cam .frame {
  width: 168px; height: 108px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
  position: relative;
}

.cam .frame::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; height: 2px;
  background: linear-gradient(90deg, transparent, #6FA0FF, transparent);
  animation: scanline 2.4s ease-in-out infinite;
}

@keyframes scanline {
  0%, 100% { top: 10px; opacity: .2; }
  50% { top: 92px; opacity: 1; }
}

.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #17140F; display: block; }
.cam:has(video[srcobject]) .frame { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }

.cam .hint {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .68);
  letter-spacing: .04em;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 14px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.field input::placeholder { color: var(--faint); letter-spacing: 0; }
.field input:focus { outline: none; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 11.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.chip:active { background: var(--accent-soft); }

/* ---------- 数量步进 ---------- */

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-2);
  overflow: hidden;
}
.stepper button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--ink-2); font-size: 17px; }
.stepper button:active { background: var(--line); }
.stepper .v {
  min-width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sub-h { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 8px; }
.sub-h h2 { font-size: 13.5px; font-weight: 700; }
.sub-h .link { font-size: 11.5px; color: var(--muted); }

/* ---------- 空状态 ---------- */

.empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 8px);
  background: rgba(28, 24, 18, .94);
  color: #FBF8F2;
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 80;
  max-width: 82vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 统计 ---------- */

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.stat {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 13px 13px;
}
.stat span { font-size: 11px; color: var(--muted); }
.stat b { display: block; margin-top: 3px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.stat b.red { color: var(--red); }
.stat b.green { color: var(--green); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 92px; margin-top: 14px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bars .bar i {
  display: block; width: 100%;
  background: var(--ink);
  border-radius: 4px 4px 2px 2px;
  min-height: 3px;
}
.bars .bar.on i { background: var(--accent); }
.bars .bar span { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }

.rank { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .i { width: 14px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rank-row .n { flex: 1; font-size: 12.5px; }
.rank-row .bar-mini { height: 6px; background: var(--ink); border-radius: 3px; }
.rank-row .q { width: 30px; text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 详情表 ---------- */

.kv { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); }
.kv-row b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 桌面 ---------- */

@media (min-width: 920px) {
  .nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 236px;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 76px 14px 24px;
    background: transparent;
    backdrop-filter: none;
    border-top: 0;
    border-right: 1px solid var(--line-2);
  }

  .nav::before {
    content: "衣 仓";
    position: absolute;
    top: 28px; left: 26px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .28em;
    color: var(--ink);
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
  }
  .nav-item[aria-current="page"] { background: var(--accent-soft); }
  .nav-item svg { width: 18px; height: 18px; }

  main { margin-left: 236px; padding-bottom: 64px; }

  .page, .feed-h, .topbar, .bar-title, .action-bar { max-width: 760px; margin-left: auto; margin-right: auto; }
  .page, .page-tight { padding: 0 28px; }
  .feed-h { padding: 0 28px; }

  .topbar { padding-top: 36px; }

  .pool-grid { gap: 10px; }
  .pool b { font-size: 26px; }

  .action-bar { position: sticky; bottom: 0; padding-left: 28px; padding-right: 28px; }
  .toast { bottom: 32px; }

  .page-tight { max-width: 620px; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}





/* ============================================================
   审查修正：对比度、可达性、缺失的入口
   ============================================================ */

:root {
  /* 文字用的第二级灰（≥4.5:1），--faint 只留给发丝线和禁用数字 */
  --meta: #6B6155;
  --zero: #8A7F70;
}

.nav-item { color: var(--meta); }
.nav-item svg { opacity: .9; }

.feed-row .tm,
.list-row .qty small,
.bars .bar span,
.card-h h2 small,
.matrix th,
.sub-h .link { color: var(--meta); }

.matrix td.zero { color: var(--zero); }
.field input::placeholder { color: var(--meta); opacity: 1; }

.scan-card .tx span { color: rgba(255, 255, 255, .92); }
.scan-card .go { color: #fff; }

/* 可点的地方要看得出来能点 */
.list-row, .feed-row { transition: transform .12s ease, background .15s ease, box-shadow .15s ease; }
@media (hover: hover) {
  .list-row:hover, .feed-row:hover { background: #FFFDF9; box-shadow: 0 2px 4px rgba(34,30,25,.06), 0 10px 24px rgba(34,30,25,.07); }
  .list-row:hover .qty { color: var(--accent); }
  .nav-item:hover { color: var(--ink-2); background: rgba(34,30,25,.04); }
  .btn-ghost:hover { background: #FBF8F2; }
  .chip:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
  .card-h .link:hover, .sub-h .link:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* 作业行：把三个任务做成能按的门 */
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.job {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--card); border-radius: var(--r-md);
  padding: 11px 11px; min-height: 52px;
  box-shadow: 0 1px 2px rgba(34, 30, 25, .04);
  text-align: left;
  min-width: 0;
}
.job b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.job svg { width: 13px; height: 13px; color: var(--meta); flex: 0 0 auto; }
.job:active { transform: scale(.99); }

/* 商品图 */
.thumb {
  width: 52px; height: 52px; flex: 0 0 auto;
  border-radius: 12px; background: #F2ECE1; object-fit: cover;
  display: block;
}
.list-row .swatch-lg { display: none; }
.hero-art {
  width: 100%; height: 132px; display: block; object-fit: cover;
  border-radius: var(--r-md); background: #F2ECE1;
}

/* 待检 / 次品 卡片的触控尺寸 */
.pending-actions { display: flex; gap: 8px; margin-top: 12px; }
.pending-actions .btn { height: 44px; flex: 1; font-size: 13px; border-radius: 11px; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(34,30,25,.10); }
.btn-outline-red { background: var(--card); color: var(--red); box-shadow: inset 0 0 0 1px #E7C4BD; }.btn-outline-green { background: var(--card); color: var(--green); box-shadow: inset 0 0 0 1px #C6DFD2; }

/* 报表周期切换 */
.period { display: flex; gap: 4px; padding: 4px; background: #EDE6DA; border-radius: 12px; margin-top: 12px; }
.period button { flex: 1; height: 32px; border-radius: 9px; font-size: 12px; color: var(--ink-2); }
.period button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(34,30,25,.12); font-weight: 600; color: var(--ink); }
.bars .bar { cursor: pointer; padding: 0; font: inherit; color: inherit; border-radius: 8px; transition: background .15s ease; }
.bars .bar:active { background: rgba(34,30,25,.06); }
@media (hover: hover) { .bars .bar:hover { background: rgba(34,30,25,.05); } }
.bars .bar b { font-size: 11px; color: var(--meta); font-variant-numeric: tabular-nums; }.bars.dense { gap: 2px; }.bars.dense .bar i { border-radius: 2px; }.bars.dense .bar b { display: none; }.bars.dense .bar span { font-size: 10px; }

/* 扫码页在桌面上的内容宽度 */
.scan-body { width: 100%; }
@media (min-width: 920px) {
  .page-tight { max-width: 760px; }
  .scan-body { max-width: 560px; }
}

/* 危险行 */
.row-danger .tx b { color: var(--red); }
.row-danger { box-shadow: inset 0 0 0 1px #F0D8D3, 0 1px 2px rgba(34,30,25,.04); }






/* ---------- 登录 ---------- */
.login {
  max-width: 360px;
  margin: 0 auto;
  padding: 16vh 24px 0;
}
.login-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .34em;
  color: var(--ink);
}
.login-sub {
  margin: 6px 0 22px;
  font-size: 12px;
  color: var(--meta);
  letter-spacing: .06em;
}
.login-hint {
  margin-top: 16px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--meta);
}
.login-hint b { color: var(--ink-2); font-weight: 600; }


/* ---------- 新建商品 / 底部表单 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(24, 20, 14, .42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fade .16s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(34, 30, 25, .22);
  animation: rise .22s cubic-bezier(.2, .9, .3, 1);
}

@keyframes rise { from { transform: translateY(24px); } to { transform: translateY(0); } }

@media (min-width: 700px) {
  .sheet-mask { align-items: center; }
  .sheet { border-radius: 20px; max-width: 460px; }
}

.sheet-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}

.sheet-x {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 15px;
  background: var(--paper);
}

.sheet-sub {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--meta);
}

.sheet-sub code {
  font-family: var(--mono);
  background: var(--paper);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12.5px;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.sheet-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--meta);
  letter-spacing: .04em;
}

.sheet-grid input {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sheet-grid input:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.sheet-foot {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.sheet-err {
  margin-top: 8px;
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
}

/* ---------- 批量导入 ---------- */
.imp-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}
.imp-step.last { border-bottom: 0; padding-bottom: 2px; }
.imp-step > b {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper);
  color: var(--meta);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.imp-step > div { flex: 1; min-width: 0; }
.imp-step > div > b { display: block; font-size: 13.5px; font-weight: 600; }
.imp-step > div > span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.55; color: var(--meta); }
.imp-step .btn { flex: 0 0 auto; }

.imp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 4px;
}
.imp-stats > div { background: var(--paper); border-radius: 10px; padding: 8px 9px; }
.imp-stats span { display: block; font-size: 10.5px; color: var(--meta); }
.imp-stats b { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.imp-errors {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11.5px;
  line-height: 1.7;
}
.imp-errors b { display: block; margin-bottom: 2px; }

.imp-ok {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
}

.imp-err { color: var(--red); font-size: 12.5px; line-height: 1.6; }

.note-line {
  margin-top: 16px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--meta);
}
.note-line b { color: var(--ink-2); }
