/* SuruCubby 设计系统 v2 —— 后台、仓库、团员三端共用一份。
   视觉照 shadcn：中性灰底、1px 细边、克制的阴影、紧凑间距；
   布局照 Tabler：左侧分组导航、页头、KPI 卡、带圆点的状态徽章、竖向时间线、步骤条。
   不引任何框架：所有类名沿用老的，变量名也沿用老的（JS 里有 var(--warn) 这种内联用法），
   改这一份就够。方案见 docs/ui-redesign.md。 */
:root {
  /* 色板照 printgridpaper.com：冷灰蓝的底 + 淡蓝方格，白纸卡片、直角、细灰边，墨黑字，
     等宽小标签。--navy / --wind 这些老名字 JS 和下面的规则在用，保留名字只换值。 */
  --ink: #12171b;
  --rule: #4a7fb5;
  --pad: #5f8a6e;
  --lead: #c4452f;
  --navy: #12171b;
  --navy-2: #1e262c;
  --wind: #4a7fb5;
  --bg: #e3e8ea;
  --grid-minor: rgba(74, 127, 181, 0.09);
  --grid-major: rgba(74, 127, 181, 0.16);
  --sky-wash: transparent;
  --card: #ffffff;
  --card-2: #f1f4f5;
  --text: #12171b;
  --muted: #5a666e;
  --line: #d3dade;
  --line-strong: #c3cdd2;
  --brand: #12171b;
  --brand-strong: #2b343b;
  --brand-ink: #2f619a;
  --brand-line: #c3cdd2;
  --brand-ring: rgba(74, 127, 181, 0.28);
  --on-brand: #ffffff;
  /* 状态色：都压到白底 4.5:1 以上 */
  --danger: #b23a26;
  --danger-bg: #f8e6e2;
  --ok: #3e6f50;
  --ok-bg: #e2eee6;
  --warn: #855600;
  --warn-bg: #f7eed8;
  --info: #2f619a;
  --info-bg: #e3edf7;
  --violet: #634aa8;
  --violet-bg: #ece8f6;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 18px 40px -20px rgba(18, 23, 27, 0.35);
  /* 单号、货号、金额、小标签用等宽：有 IBM Plex Mono 就用，没有退回系统等宽，不下载字体 */
  --num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --mono: var(--num);
  --sidebar-w: 232px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6eaec;
    --navy: #0d1113;
    --navy-2: #161c20;
    --wind: #7fa9d6;
    --bg: #15191c;
    --grid-minor: rgba(127, 169, 214, 0.07);
    --grid-major: rgba(127, 169, 214, 0.12);
    --card: #1c2226;
    --card-2: #232a2f;
    --text: #e6eaec;
    --muted: #98a4ab;
    --line: #2c353b;
    --line-strong: #3a454c;
    --brand: #e6eaec;
    --brand-strong: #ffffff;
    --brand-ink: #8fb6e0;
    --brand-line: #3a454c;
    --brand-ring: rgba(127, 169, 214, 0.3);
    --on-brand: #12171b;
    --danger: #f0907f;
    --danger-bg: rgba(240, 144, 127, 0.15);
    --ok: #8cc5a0;
    --ok-bg: rgba(140, 197, 160, 0.15);
    --warn: #e6c072;
    --warn-bg: rgba(230, 192, 114, 0.14);
    --info: #8fb6e0;
    --info-bg: rgba(143, 182, 224, 0.15);
    --violet: #b8a5ec;
    --violet-bg: rgba(184, 165, 236, 0.15);
    --shadow-lg: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  }
  button.danger {
    color: #2a0f0d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 0 48px;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.6 "HarmonyOS Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(140, 200, 255, 0.45);
}

a {
  color: var(--brand-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
h1 {
  font-size: 21px;
  font-weight: 700;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
h4 {
  font-size: 14px;
  font-weight: 600;
}
code {
  font-family: ui-monospace, Consolas, Menlo, monospace;
  font-size: 0.9em;
  background: var(--card-2);
  border-radius: 4px;
  padding: 0 4px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* ───────── 顶栏（客户页、仓库端；后台宽屏换成侧栏，见下面 .app） ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  padding: 0 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 14px -10px rgba(14, 42, 71, 0.6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
  display: block;
}
.topbar nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  flex: 1;
  align-self: stretch;
  scrollbar-width: none;
}
.topbar nav a {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
}
.topbar nav a:hover {
  text-decoration: none;
}
.topbar nav a:not(.active):hover {
  color: #fff;
}
.topbar nav a.active {
  color: #fff;
  font-weight: 600;
  border-bottom-color: var(--wind);
}
.topbar nav a:focus-visible {
  outline: 2px solid var(--wind);
  outline-offset: -4px;
}
.topbar button.plain,
.sidebar button.plain {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.topbar button.plain:hover:not(:disabled),
.sidebar button.plain:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  color: #fff;
}
.topbar #who {
  color: var(--wind);
}

/* ───────── 后台外壳：宽屏左侧分组导航（Tabler vertical layout） ───────── */
.app {
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #fff;
}
.sidebar .nav-group {
  display: none;
}
@media (min-width: 1024px) {
  body.admin {
    padding-bottom: 0;
  }
  .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    gap: 6px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  }
  .sidebar .brand {
    padding: 4px 8px 14px;
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
  }
  .sidebar .nav-group {
    display: block;
    padding: 14px 10px 4px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
  }
  .sidebar .nav-group.legacy {
    margin-top: auto;
  }
  .sidebar nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.78);
    position: relative;
  }
  .sidebar nav a:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
  .sidebar nav a.active {
    background: rgba(140, 200, 255, 0.14);
    color: #fff;
    font-weight: 600;
  }
  .sidebar nav a.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--wind);
  }
  .sidebar nav a.legacy {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
  }
  .sidebar nav a:focus-visible {
    outline: 2px solid var(--wind);
    outline-offset: -2px;
  }
  .sidebar #logout {
    margin-top: 8px;
    width: 100%;
  }
  .app .shell {
    padding: 20px 24px;
    max-width: 1320px;
    margin: 0;
  }
  .app .rail {
    top: 20px;
    max-height: calc(100vh - 40px);
  }
}
/* 窄屏：侧栏退回成老的顶栏 + 横滑导航，手机上的操作习惯不变 */
@media (max-width: 1023.98px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0 16px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }
  .sidebar nav {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
    align-self: stretch;
    scrollbar-width: none;
  }
  .sidebar nav a {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    border-top: 3px solid transparent;
  }
  .sidebar nav a:hover {
    text-decoration: none;
    color: #fff;
  }
  .sidebar nav a.active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: var(--wind);
  }
}

/* ───────── 页头：标题 + 一句说明 + 右边主操作 ───────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 16px;
}
.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}
.page-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ───────── 卡片 ───────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-head h2,
.card-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.card-head .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.card-head .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.card.tone-warn {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
  background: var(--warn-bg);
}
.card.flush {
  padding: 0;
  overflow: hidden;
}
.card.flush > .card-head {
  padding: 14px 16px 0;
}
/* 一块卡片里的分节标题：小号、加粗、带件数 */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 650;
}
.section-title .count {
  font-family: var(--num);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* ───────── KPI 卡 ───────── */
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: block;
  color: inherit;
  position: relative;
}
a.stat:hover {
  text-decoration: none;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.stat .label {
  color: var(--muted);
  font-size: 13px;
}
.stat .value {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.25;
}
.stat .value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}
.stat .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.stat.big {
  border-color: var(--brand-line);
  background: var(--card-2);
}
.stat.big .value {
  font-size: 28px;
  color: var(--danger);
}
/* 有事要做的 KPI：左边一道色条 */
.stat.tone-danger,
.stat.tone-warn,
.stat.tone-info,
.stat.tone-ok {
  border-left-width: 3px;
}
.stat.tone-danger {
  border-left-color: var(--danger);
}
.stat.tone-danger .value {
  color: var(--danger);
}
.stat.tone-warn {
  border-left-color: var(--warn);
}
.stat.tone-info {
  border-left-color: var(--info);
}
.stat.tone-ok {
  border-left-color: var(--ok);
}
.stat.tone-ok .value {
  color: var(--ok);
}

/* ───────── 按钮 ───────── */
button,
.btn {
  font: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  transition:
    background-color 0.12s,
    border-color 0.12s,
    box-shadow 0.12s,
    transform 0.06s;
}
.btn:hover {
  text-decoration: none;
}
button:hover:not(:disabled),
.btn:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
button:active:not(:disabled),
.btn:active {
  transform: translateY(1px);
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
button.ghost,
.btn.ghost {
  background: var(--card);
  color: var(--brand-ink);
  border-color: var(--brand-line);
}
button.ghost:hover:not(:disabled),
.btn.ghost:hover {
  background: var(--card-2);
  border-color: var(--brand);
}
button.plain,
.btn.plain {
  background: var(--card);
  color: var(--text);
  border-color: var(--line-strong);
}
button.plain:hover:not(:disabled),
.btn.plain:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--line-strong);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
button.danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  filter: brightness(0.92);
}
button.small,
.btn.small {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 13px;
  border-radius: 7px;
}

/* ───────── 表单 ───────── */
input,
select,
textarea {
  font: inherit;
  font-size: 15px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
input[type='checkbox'],
input[type='radio'] {
  min-height: 0;
  box-shadow: none;
  accent-color: var(--brand);
}
input[type='checkbox'] {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  cursor: pointer;
  flex: none;
}
/* 收款勾选：比普通勾选框再大一号 */
.pay-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pay-check input {
  width: 30px;
  height: 30px;
}
/* 表格里的勾选框：单独一列放在图片左边，大一号；点图片也能勾 */
.cell-pick {
  width: 48px;
  vertical-align: middle;
}
.cell-pick input[type='checkbox'] {
  width: 30px;
  height: 30px;
}
input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
label {
  display: block;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ───────── 表格 ───────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: var(--card-2);
  white-space: nowrap;
}
thead th:first-child {
  border-top-left-radius: 6px;
}
thead th:last-child {
  border-top-right-radius: 6px;
}
tbody tr:hover > td {
  background: color-mix(in srgb, var(--card-2) 55%, transparent);
}
tbody tr:last-child > td {
  border-bottom: none;
}
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* 手机上宁可横向滚动，也不要把列挤成一个字一行 */
.scroll-x table {
  min-width: 540px;
}

/* ───────── 徽章：dot 版在字前加一颗状态圆点（Tabler status-dot） ───────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge.info {
  background: var(--info-bg);
  color: var(--info);
}
.badge.violet {
  background: var(--violet-bg);
  color: var(--violet);
}
.badge.outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}
.badge.dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge:not(.ok):not(.warn):not(.danger):not(.info):not(.violet).dot::before {
  background: var(--muted);
}

/* 单号和店铺是拿去群里对货的短串，排在货号底下，点一下就复制 */
button.copy-chip {
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  min-height: 0;
  padding: 1px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  font-weight: 500;
}
button.copy-chip:hover:not(:disabled) {
  border-color: var(--brand);
  border-style: solid;
  color: var(--brand-ink);
  background: var(--card-2);
}
/* 单号胶囊做成一小张面单：左边一道海军蓝的边，窄体数字。虚线框 = 点了能复制 */
button.copy-chip.mono {
  font-family: var(--num);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text);
  border-radius: 4px;
  border-left: 3px solid var(--navy);
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.right {
  text-align: right;
}
.money {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.unpaid {
  color: var(--danger);
  font-weight: 600;
}
.paid {
  color: var(--ok);
}
.highlight-row {
  background: var(--warn-bg);
}

/* ───────── 商品行（客户页） ───────── */
.item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}
.item img,
.item .noimg {
  /* 骏河屋封面本来就是竖的（约 1:1.42），照后台列表那条规矩来：
     竖框 + contain，整张都在框里，裁掉一头就没法对货了 */
  width: 64px;
  height: 92px;
  object-fit: contain;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: none;
}
.item .noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}
.item .body {
  flex: 1;
  min-width: 0;
}
/* 客户页的发货勾选：竖着一列，别把商品名挤成一格一个字 */
.item .pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.item .pick input {
  width: 20px;
  height: 20px;
  margin: 0;
}
.item .title {
  font-weight: 600;
  word-break: break-word;
}
.item .title a {
  color: var(--text);
}

/* 清单行：手机上比表格好读，左边说明右边金额 + 按钮 */
.list-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
a.list-row:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--card-2) 60%, transparent);
}
.list-row:last-child {
  border-bottom: none;
}
.list-row .main {
  flex: 1 1 55%;
  min-width: 0;
}
.list-row .side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* ───────── 称重台 / 仓库：大图网格，方便在手机上点 ───────── */
.claim-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.claim {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--card);
  color: var(--text);
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.claim-photo {
  cursor: pointer;
}
.claim img,
.claim .noimg {
  width: 100%;
  aspect-ratio: 1 / 1.42;
  object-fit: contain;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  display: block;
}
.claim .noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.claim-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.claim .code {
  font-size: 16px;
  font-weight: 600;
  padding: 3px 8px;
}
.claim .name {
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-ctrl {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.claim-ctrl input {
  flex: 1;
  min-width: 0;
}
.claim-missing {
  width: 100%;
  margin-top: 6px;
}
.claim.found {
  border-color: var(--ok);
  background: #eaf8f0;
}
.claim.missing {
  border-color: var(--warn);
  background: var(--warn-bg);
}

/* 对货用的货号：一张小面单——白底、细框、左边海军蓝粗边、窄体数字，和箱子上贴的号一个样子 */
.code {
  display: inline-block;
  font-family: var(--num);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--navy);
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}
a.code:hover {
  text-decoration: underline;
}
td .code {
  font-size: 14px;
}

/* 表格里的封面：骏河屋的图是竖的（约 1:1.42），框照这个比例开，
   再用 contain 保证整张都在框里 —— 裁掉一头就看不准货了 */
.cell-thumb {
  width: 124px;
  vertical-align: middle;
}
.cell-thumb img,
.cell-thumb .noimg {
  width: 116px;
  height: 164px;
  object-fit: contain;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}
.cell-thumb .noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}
/* 核账用的页面（订单详情）不对货，封面收小一档，一单三十个人也不用滚半天 */
.cell-thumb.sm {
  width: 64px;
}
.cell-thumb.sm img,
.cell-thumb.sm .noimg {
  width: 52px;
  height: 74px;
}
@media (prefers-color-scheme: dark) {
  .claim.found {
    background: #10331f;
  }
}

/* 搜完货号跳过来的那一件，圈一下 */
.hit {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}
tr.hit > td {
  background: var(--warn-bg);
}

/* ───────── 右边常驻侧栏：搜货号 ───────── */
.shell {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}
.shell .wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 980px;
  margin: 0;
  padding: 0;
}
.rail {
  flex: 0 0 274px;
  position: sticky;
  top: 56px;
  align-self: flex-start;
  max-height: calc(100vh - 72px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.rail label {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 600;
}
.rail input {
  width: 100%;
}
.rail-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}
.rail-item:hover {
  background: var(--card-2);
  text-decoration: none;
}
.rail-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rail-code {
  font-family: var(--num);
  font-size: 15px;
  font-weight: 600;
}
.rail-thumb {
  flex: 0 0 auto;
}
.rail-thumb img,
.rail-thumb .noimg {
  width: 40px;
  height: 56px;
  object-fit: contain;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
}
.rail-thumb .noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .shell {
    flex-direction: column;
  }
  .rail {
    order: -1;
    position: static;
    flex-basis: auto;
    width: 100%;
    max-height: none;
  }
}

/* 手机首屏：数字卡固定两列，字号收一档。
   28px 的「¥12,345.67」要 154px，一列卡只剩 149px，钱多一点就折成两行 */
@media (max-width: 480px) {
  .wrap {
    padding: 12px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat {
    padding: 10px;
  }
  .stat .value {
    font-size: 19px;
  }
  .stat.big .value {
    font-size: 24px;
  }
  .page-title {
    font-size: 19px;
  }
}

/* 底部常驻结算条：手机上要一直滚着翻几十件商品，勾选时合计不能藏在面板里看不见 */
.shipbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  background: var(--card);
  border-top: 2px solid var(--brand);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.shipbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.shipbar .total {
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
}
.shipbar .total b {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
}
.shipbar .total small {
  display: block;
  font-size: 12px;
}
body.has-shipbar {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

/* 左标题右数字：钱是怎么出来的，一行一项能对着算 */
.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 2px 0;
}
.kv span {
  color: var(--muted);
}
.kv b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.progress-bar {
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* 细进度条（ShipBob 拣货进度）：<div class="meter"><span style="width:40%"></span></div> */
.meter {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 6px;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.3s;
}
.meter.ok > span {
  background: var(--ok);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  border-left: 4px solid var(--wind);
  max-width: 90vw;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}
.toast.err {
  background: var(--danger);
  border-left-color: rgba(255, 255, 255, 0.6);
}
@media (prefers-color-scheme: dark) {
  .toast {
    background: #1b2b46;
  }
  .toast.err {
    color: #2a0f0d;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: toast-in 0.18s ease-out;
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translate(-50%, 8px);
    }
  }
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(11, 27, 46, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

details summary {
  cursor: pointer;
  color: var(--muted);
}
details summary:hover {
  color: var(--text);
}
.empty {
  color: var(--muted);
  padding: 14px 0;
  font-size: 14px;
}
.empty.box {
  text-align: center;
  padding: 22px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-2) 50%, transparent);
}

/* ───────── 分段切换（shadcn Tabs / 筛选胶囊） ───────── */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.segmented > button,
.segmented > a {
  min-height: 30px;
  padding: 3px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.segmented > button:hover:not(:disabled),
.segmented > a:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text);
  text-decoration: none;
}
.segmented > .on,
.segmented > .on:hover:not(:disabled),
.segmented > [aria-pressed='true'],
.segmented > [aria-pressed='true']:hover:not(:disabled) {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}
.segmented .n {
  font-family: var(--num);
  font-size: 12px;
  color: var(--muted);
}
.segmented.block {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
}

/* ───────── 订单总览 ───────── */
.order-filters {
  margin: 12px 0 4px;
}
.order-row {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  display: grid;
  gap: 4px;
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.order-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.order-title a {
  color: var(--text);
}
.order-money {
  text-align: right;
  white-space: nowrap;
}
.order-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  margin: 6px 0 4px;
  gap: 2px;
}
.order-bar .seg {
  background: var(--muted);
  opacity: 0.45;
}
.order-bar .seg.ok {
  background: var(--ok);
  opacity: 1;
}
.order-bar .seg.warn {
  background: var(--warn);
  opacity: 1;
}
.order-bar .seg.info {
  background: var(--info);
  opacity: 1;
}
.order-bar .seg.violet {
  background: var(--violet);
  opacity: 1;
}
.order-bar .seg.danger {
  background: var(--danger);
  opacity: 1;
}
.order-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  overflow-wrap: anywhere;
}

/* ───────── 后台首页：待办清单 ───────── */
.todo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
}
.todo-grid > .card {
  margin-bottom: 0;
}
.kpis {
  margin-bottom: 16px;
}
.legacy-zone {
  margin-top: 16px;
}
.legacy-zone > summary {
  font-size: 14px;
  padding: 6px 0 12px;
}

/* ───────── 团员页：进度管线（AfterShip） ───────── */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-top h1 {
  margin: 0;
}
.hero-where {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.hero-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  margin: 18px 0 6px;
  padding: 0;
  list-style: none;
}
.pipe-step {
  position: relative;
  text-align: center;
  padding-top: 26px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}
/* 线：每一步左半段和右半段，首尾各少一段 */
.pipe-step::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
}
.pipe-step:first-child::before {
  left: 50%;
}
.pipe-step:last-child::before {
  right: 50%;
}
.pipe-step.lit::before {
  background: var(--brand);
}
.pipe-step.lit-left::before {
  background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%);
}
/* 第一站的线只有右半段：走到这一站为止，右边那段还没走 */
.pipe-step:first-child.lit-left::before {
  background: var(--line);
}
.pipe-step .dot {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 17px;
  height: 17px;
  margin-left: -8.5px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--line-strong);
}
.pipe-step.lit .dot,
.pipe-step.lit-left .dot {
  border-color: var(--brand);
  background: var(--brand);
}
.pipe-step.now .dot {
  background: var(--card);
  box-shadow: 0 0 0 4px var(--brand-ring);
}
.pipe-step .name {
  display: block;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipe-step.now .name {
  font-weight: 700;
  color: var(--brand-ink);
}
.pipe-step .n {
  font-family: var(--num);
  font-size: 13px;
}
.pipe-step.zero .n {
  opacity: 0.6;
}

/* ───────── 运单卡 + 步骤条（17TRACK） ───────── */
.parcel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  background: var(--card);
}
.parcel:first-of-type {
  margin-top: 0;
}
.parcel.waiting {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
  background: color-mix(in srgb, var(--warn-bg) 55%, var(--card));
}
.parcel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.tracking {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tracking .no {
  font-family: var(--num);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.tracking .lbl {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.steps {
  display: flex;
  margin: 14px 0 10px;
  padding: 0;
  list-style: none;
}
.step {
  flex: 1;
  position: relative;
  font-size: 12px;
  color: var(--muted);
  padding-top: 20px;
  text-align: center;
}
.step::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
}
.step:first-child::before {
  left: 50%;
}
.step:last-child::before {
  right: 50%;
}
.step::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line-strong);
}
.step.done {
  color: var(--text);
}
.step.done::before {
  background: var(--ok);
}
.step.done::after {
  background: var(--ok);
  border-color: var(--ok);
}
.step.now {
  color: var(--text);
  font-weight: 600;
}
.step.now::after {
  border-color: var(--warn);
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-bg);
}
.step.now::before {
  background: linear-gradient(90deg, var(--ok) 50%, var(--line-strong) 50%);
}
.step.now:first-child::before {
  background: var(--line-strong);
}
.thumb-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.thumb-strip img,
.thumb-strip .noimg {
  width: 40px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
}
.parcel-items {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.parcel-items li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.parcel-items li:last-child {
  border-bottom: none;
}
.parcel-items .thumb img,
.parcel-items .thumb .noimg {
  width: 36px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
}
.parcel-items .t {
  flex: 1;
  min-width: 0;
}
.parcel-items .t > div:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ───────── 竖向时间线（最近动态） ───────── */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tl-item {
  position: relative;
  padding: 0 0 14px 22px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-item:last-child::before {
  display: none;
}
.tl-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line-strong);
}
.tl-item:first-child::after {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.tl-time {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--num);
}
.tl-body {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

/* ───────── 仓库工作台：手机上拿着对货，图大、货号大 ───────── */
.wh-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
@media (max-width: 480px) {
  .wh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
.wh-card[data-pick] {
  cursor: pointer;
}
.wh-card[data-pick]:hover {
  border-color: var(--line-strong);
}
/* 选中：右上角绿色打勾 + 卡片淡绿底，一眼看得出哪些勾上了 */
.wh-card.found,
.wh-card.found:hover {
  border-color: var(--ok);
  background: var(--ok-bg);
}
.wh-card.wh-off {
  opacity: 0.55;
}
.claim-photo {
  position: relative;
}
/* 方形勾选框：压在图片右上角，白底灰边，在什么颜色的封面上都看得见 */
.pick-box {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #94a3b8;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.pick-box.on {
  background: #16a34a;
  border-color: #16a34a;
}
.pick-box.on::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 3px;
  width: 8px;
  height: 16px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}
.wh-code {
  font-family: var(--num);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 6px 0 2px;
  word-break: break-all;
}
.wh-count {
  display: inline-block;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 18px;
}
.wh-title {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.wh-people {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 12px;
}
.wh-person {
  display: block;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.wh-person:hover {
  text-decoration: none;
  border-color: var(--line-strong);
}
.wh-person.on,
.wh-person.on:hover {
  border-color: var(--brand);
  background: var(--card-2);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
/* 整理完了：绿色实边 + 绿条。以前用虚线，看着反而像「没弄完」 */
.wh-person.done {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line));
}
.wh-person.done .small {
  color: var(--ok);
}
.wh-person .meter {
  margin-top: 8px;
}
.btn.wh-big,
button.wh-big {
  font-size: 18px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 10px;
}
.wh-photo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wh-photo img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
/* 仓库首页：一进门就是输单号的大框 */
.scan-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border: none;
  padding: 20px;
}
.scan-card h2 {
  color: #fff;
}
.scan-card p {
  color: rgba(255, 255, 255, 0.72);
}
.scan-card input {
  font-size: 20px;
  min-height: 52px;
  border: none;
  font-family: var(--num);
  letter-spacing: 0.02em;
}
.scan-card .btn,
.scan-card button {
  min-height: 52px;
  font-size: 17px;
  padding: 0 22px;
}
.scan-card #hits {
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  margin-top: 12px;
}
.scan-card #hits:empty {
  display: none;
}
.scan-card #hits > * {
  padding-left: 12px;
  padding-right: 12px;
}
/* 手机上的主操作贴底：一边翻大图一边能按「整理完成」「提交包裹」 */
@media (max-width: 640px) {
  .actionbar {
    position: sticky;
    bottom: 0;
    z-index: 7;
    margin: 12px -16px 0 !important;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--line);
  }
  .actionbar:last-child {
    margin-bottom: -16px !important;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .actionbar .btn,
  .actionbar button {
    width: 100%;
  }
}
/* 客户页：直邮包裹的平铺图点开看大图 */
.parcel-photos {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-top: 10px;
}
.parcel-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}
.wh-card .copy-chip,
.wh-card .badge {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .code,
  button.copy-chip.mono {
    border-left-color: var(--wind);
  }
}

/* ───────── 首页：一辆车一阵风 ───────── */
.entry-hero {
  background:
    radial-gradient(1200px 300px at 50% -80px, rgba(140, 200, 255, 0.22), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 44px 16px 76px;
  text-align: center;
}
.entry-hero img {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 14px;
}
.entry-hero h1 {
  font-size: 23px;
  margin: 0;
  letter-spacing: 0.04em;
}
.entry-hero p {
  margin: 8px 0 0;
  color: var(--wind);
  font-size: 14px;
}
.entry-card {
  max-width: 440px;
  margin: -48px auto 0;
}
.entry-card > .card {
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.entry-roles {
  margin-bottom: 8px;
}
.entry-card input {
  width: 100%;
  min-height: 42px;
}
.entry-card button[type='submit'] {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}
/* 打开首页时车从左边开进来——全站只有这一处动画 */
@media (prefers-reduced-motion: no-preference) {
  .entry-hero img {
    animation: drive-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes drive-in {
    from {
      transform: translateX(-60px);
      opacity: 0;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
}

/* 手机上顶栏放不下：品牌和退出留第一行，导航自己占第二行，横着能滑 */
@media (max-width: 640px) {
  .topbar,
  .sidebar {
    padding: 0 12px;
    gap: 0 10px;
  }
  .topbar .brand,
  .sidebar .brand {
    min-height: 48px;
    flex: 1;
  }
  .topbar nav,
  .sidebar nav {
    order: 3;
    flex: 1 0 100%;
    min-height: 40px;
    margin: 0 -12px;
    padding: 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .topbar #who {
    font-size: 12px;
  }
}

/* 订单页：收款进度 */
.pay-progress {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
}
.pay-progress .meter {
  margin-top: 8px;
}
/* 换图弹窗里的粘贴区 */
.paste-zone {
  margin: 10px 0;
  padding: 22px 12px;
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  outline: none;
}
.paste-zone:focus {
  border-color: var(--brand);
}

/* ═════════ 方格纸风格（照 printgridpaper.com）═════════
   放在最后统一盖掉：浅色顶栏 / 侧栏、直角、等宽小标签、淡蓝方格底。
   颜色都走上面的变量，深色模式自动跟着变。 */
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px);
  background-size:
    120px 120px,
    120px 120px,
    24px 24px,
    24px 24px;
  background-attachment: fixed;
  font-family:
    "IBM Plex Sans",
    "HarmonyOS Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
}
::selection {
  background: rgba(74, 127, 181, 0.28);
}
h1,
h2,
.page-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}
code {
  font-family: var(--mono);
  border-radius: 0;
  border: 1px solid var(--line);
}

/* 小标签：等宽、小号、大写字距——方格纸站上「SQUARE SIZE」那种 */
label,
th,
.stat .label,
.sidebar .nav-group,
.tracking .lbl,
.tl-time,
.section-title .count {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
label,
.stat .label {
  font-size: 12px;
}
th {
  font-size: 11px;
  font-weight: 500;
}

/* 顶栏：和底一个颜色、半透明，下面一道细线 */
.topbar,
.sidebar {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  color: var(--text);
  box-shadow: none;
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}
.brand,
.sidebar .brand {
  color: var(--text);
}
.topbar nav a,
.sidebar nav a {
  color: var(--muted);
}
.topbar nav a:not(.active):hover,
.sidebar nav a:hover {
  color: var(--text);
}
.topbar nav a.active,
.sidebar nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.topbar #who {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}
.topbar button.plain,
.sidebar button.plain {
  background: var(--card);
  color: var(--text);
  border-color: var(--line-strong);
}
.topbar button.plain:hover:not(:disabled),
.sidebar button.plain:hover:not(:disabled) {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--text);
}
@media (min-width: 1024px) {
  .sidebar {
    background: var(--card);
    border-bottom: none;
    border-right: 1px solid var(--line-strong);
    backdrop-filter: none;
  }
  .sidebar .nav-group {
    color: var(--muted);
    font-size: 10px;
  }
  .sidebar nav a {
    border-radius: 0;
    color: var(--muted);
  }
  .sidebar nav a:hover {
    background: var(--card-2);
    color: var(--text);
  }
  .sidebar nav a.active {
    background: var(--text);
    color: var(--card);
  }
  .sidebar nav a.active::before {
    display: none;
  }
  .sidebar nav a.legacy {
    color: var(--muted);
  }
}
@media (max-width: 640px) {
  .topbar nav,
  .sidebar nav {
    border-top: 1px solid var(--line);
  }
}

/* 卡片：白纸、细灰边、直角，不要阴影 */
.card,
.rail,
.modal {
  border-color: var(--line-strong);
}
.stat,
.parcel,
.claim,
.claim img,
.claim .noimg,
.item img,
.item .noimg,
.cell-thumb img,
.cell-thumb .noimg,
.rail-thumb img,
.rail-thumb .noimg,
.rail-item,
.thumb-strip img,
.thumb-strip .noimg,
.parcel-items .thumb img,
.parcel-items .thumb .noimg,
.parcel-photos img,
.wh-photo img,
.wh-person,
.empty.box,
.pay-progress,
.paste-zone,
.toast,
.code,
button.copy-chip,
button.copy-chip.mono,
.wh-count,
thead th:first-child,
thead th:last-child {
  border-radius: 0;
}
.stat {
  border-color: var(--line-strong);
}
a.stat:hover {
  border-color: var(--text);
  box-shadow: none;
}

/* 按钮：墨黑实心 / 白底细边，等宽字 */
button,
.btn {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 0;
}
button.small,
.btn.small {
  font-size: 12px;
  border-radius: 0;
}
button.ghost,
.btn.ghost {
  color: var(--text);
  border-color: var(--line-strong);
}
button.ghost:hover:not(:disabled),
.btn.ghost:hover {
  border-color: var(--text);
}
button.plain:hover:not(:disabled),
.btn.plain:hover {
  border-color: var(--text);
}
/* 一页里最主要的那一下（登录、仓库进门）用方格纸站的绿 */
.entry-card button[type='submit'],
.scan-card .btn,
.scan-card button {
  background: var(--pad);
  border-color: var(--pad);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.entry-card button[type='submit']:hover:not(:disabled),
.scan-card .btn:hover,
.scan-card button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--pad) 85%, #000);
  border-color: color-mix(in srgb, var(--pad) 85%, #000);
}
input,
select,
textarea {
  border-radius: 0;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--text);
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--text);
}

/* 分段切换：选中那格墨黑反白 */
.segmented {
  padding: 0;
  gap: 0;
  border-radius: 0;
  background: var(--card);
  border-color: var(--line-strong);
}
.segmented > button,
.segmented > a {
  border-radius: 0;
  font-family: var(--mono);
  font-size: 13px;
}
.segmented > .on,
.segmented > .on:hover:not(:disabled),
.segmented > [aria-pressed='true'],
.segmented > [aria-pressed='true']:hover:not(:disabled) {
  background: var(--text);
  border-color: var(--text);
  color: var(--card);
  box-shadow: none;
}
.segmented > .on .n,
.segmented > [aria-pressed='true'] .n {
  color: inherit;
  opacity: 0.75;
}

/* 徽章：小方块，不要胶囊 */
.badge {
  border-radius: 2px;
}
.badge.dot::before {
  border-radius: 0;
}

/* 货号 / 单号：左边一道墨线 */
.code,
button.copy-chip.mono {
  border-left-color: var(--text);
}
.meter,
.meter > span,
.order-bar {
  border-radius: 0;
}

/* 进度管线：亮起来的线和点用方格线的蓝 */
.pipe-step::before {
  height: 2px;
}
.pipe-step.lit::before {
  background: var(--rule);
}
.pipe-step.lit-left::before {
  background: linear-gradient(90deg, var(--rule) 50%, var(--line) 50%);
}
.pipe-step:first-child.lit-left::before {
  background: var(--line);
}
.pipe-step .dot {
  border-radius: 0;
  border-width: 2px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  top: 3px;
}
.pipe-step.lit .dot,
.pipe-step.lit-left .dot {
  border-color: var(--rule);
  background: var(--rule);
}
.pipe-step.now .dot {
  background: var(--card);
}
.pipe-step.now .name {
  color: var(--text);
}
.pipe-step .name,
.step {
  font-family: var(--mono);
}

/* 时间线：方点、蓝线 */
.tl-item::after {
  border-radius: 0;
  width: 11px;
  height: 11px;
}
.tl-item:first-child::after {
  border-color: var(--rule);
  background: var(--rule);
  box-shadow: none;
}
.tl-item::before {
  width: 1px;
  left: 5px;
  background: var(--line-strong);
}
.tl-time {
  font-size: 11px;
}
/* 一个订单一个点：点下面是这一单现在的状态，展开看每一步 */
.tl-order .tl-body {
  font-size: 15px;
}
.tl-now {
  margin-top: 4px;
}
.tl-more {
  margin-top: 6px;
}
.tl-more > summary {
  font-family: var(--mono);
  font-size: 12px;
}
.tl-steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-left: 1px dashed var(--line-strong);
}
.tl-step {
  padding: 6px 0 6px 12px;
  border-bottom: 1px dashed var(--line);
}
.tl-step:last-child {
  border-bottom: none;
}
.tl-step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-titles {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

/* 运单步骤条：方点 */
.step::after {
  border-radius: 0;
}

/* 仓库：对上货的卡 */
.claim.found {
  background: var(--ok-bg);
}
.pick-box {
  border-radius: 0;
  border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.pick-box.on {
  background: var(--pad);
  border-color: var(--pad);
}
.wh-person.on,
.wh-person.on:hover {
  border-color: var(--text);
  box-shadow: none;
}
/* 仓库进门那块：墨黑底，跟方格纸站的大黑按钮一个分量 */
.scan-card {
  background: var(--navy);
  border: none;
}
.scan-card #hits {
  border-radius: 0;
}

.toast {
  background: var(--ink);
  color: var(--card);
  border-left-color: var(--rule);
  font-family: var(--mono);
  font-size: 13px;
}
.toast.err {
  background: var(--danger);
  color: #fff;
}
.modal-back {
  background: rgba(18, 23, 27, 0.45);
}
@media (prefers-color-scheme: dark) {
  .toast {
    background: var(--card-2);
    color: var(--text);
    border: 1px solid var(--line-strong);
  }
  .scan-card {
    background: var(--card-2);
    border: 1px solid var(--line-strong);
  }
}

/* 首页：不再是深蓝大头图，直接画在方格纸上 */
.entry-hero {
  background: none;
  color: var(--text);
  padding: 48px 16px 20px;
}
.entry-hero img {
  width: 72px;
  height: 72px;
}
.entry-hero h1 {
  font-size: 24px;
  letter-spacing: 0.02em;
}
.entry-card {
  margin: 0 auto;
}
.entry-card > .card {
  box-shadow: none;
}

/* ───────── 点图看大图 ───────── */
/* 图片能点开：鼠标变放大镜 */
.claim-photo img,
.item > img,
.parcel-items .thumb img,
.parcel-photos img,
.wh-photo img {
  cursor: zoom-in;
}
/* 勾选框自己就是一个按钮（点图是看大图了），手指好按：实际可点范围比看到的方框大一圈 */
.pick-box {
  pointer-events: auto;
  cursor: pointer;
  width: 36px;
  height: 36px;
  top: 6px;
  right: 6px;
}
.pick-box::before {
  content: '';
  position: absolute;
  inset: -10px;
}
.pick-box.on::after {
  left: 11px;
  top: 4px;
}
html.lb-open,
html.lb-open body {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 13, 15, 0.94);
  display: flex;
  flex-direction: column;
  color: #fff;
  touch-action: pan-x pan-y pinch-zoom;
}
.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  min-height: 52px;
}
.lightbox button {
  font-family: var(--mono);
  box-shadow: none;
}
.lb-close {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 22px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
.lb-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}
.lb-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
/* 放大：图撑到 2.5 倍，舞台变成能拖的滚动区 */
.lightbox.zoomed .lb-stage {
  display: block;
}
.lightbox.zoomed .lb-img {
  max-width: none;
  max-height: none;
  width: 250%;
  height: auto;
  cursor: zoom-out;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  font-size: 34px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}
.lb-arrow:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.6);
  border-color: #fff;
}
.lb-prev {
  left: 6px;
}
.lb-next {
  right: 6px;
}
.lightbox.zoomed .lb-arrow {
  display: none;
}
.lb-info {
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.lb-code {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.lb-code:empty {
  display: none;
}
.lb-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lb-pick {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  font-size: 17px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #fff;
  color: var(--ink, #12171b);
}
.lb-pick:hover:not(:disabled) {
  background: #e9eef0;
  border-color: #e9eef0;
}
.lb-pick.on,
.lb-pick.on:hover:not(:disabled) {
  background: var(--pad);
  border-color: var(--pad);
  color: #fff;
}
/* 手机上箭头不挡图：靠滑动翻页，箭头缩小贴边 */
@media (max-width: 640px) {
  .lb-arrow {
    width: 32px;
    height: 56px;
    min-height: 56px;
    font-size: 26px;
    background: rgba(0, 0, 0, 0.25);
  }
  .lb-prev {
    left: 0;
  }
  .lb-next {
    right: 0;
  }
}

/* 等宽字比原来的窄体数字宽：仓库卡片上的货号收一档，11 位的骏河屋番号在手机两列里也不折行 */
.wh-code {
  font-size: 20px;
  letter-spacing: 0;
}
@media (max-width: 480px) {
  .wh-code {
    font-size: 16px;
  }
  .wh-count {
    font-size: 15px;
  }
}

/* ───────── 团员页：商品卡右边的单号栏 ───────── */
.item {
  flex-wrap: wrap;
}
.ship-slot {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-left: 14px;
  border-left: 1px dashed var(--line-strong);
  min-width: 0;
}
.ship-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ship-wait {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
/* 有单号：一张面单，粗墨边、大号等宽字，整块点一下就复制 */
button.ship-no {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 34px;
  padding: 4px 10px;
  max-width: 100%;
  word-break: break-all;
  white-space: normal;
  text-align: left;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--rule);
}
button.ship-no:hover:not(:disabled) {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--text);
  border-left-color: var(--rule);
}
button.ship-no::after {
  content: '复制';
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
}
.ship-sub {
  font-size: 12px;
  color: var(--muted);
}
/* 手机上右边放不下：单号栏挪到商品下面，和图片右边对齐 */
@media (max-width: 600px) {
  .ship-slot {
    flex: 1 0 100%;
    margin-left: 76px;
    padding: 8px 0 0;
    border-left: none;
    border-top: 1px dashed var(--line);
  }
}

/* ───────── 订单页：每个人一张卡，头部分三格写清楚 ───────── */
.cu-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cu-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cu-head .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.cu-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  margin: 12px 0;
}
.cu-fact {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.cu-fact + .cu-fact {
  border-left: 1px solid var(--line-strong);
}
.cu-fact .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.cu-fact b {
  font-size: 17px;
  margin-right: 6px;
}
.cu-fact .meter {
  width: 100%;
  max-width: 200px;
  margin-top: 2px;
}
.cu-fact button {
  margin-top: 2px;
  white-space: normal;
  text-align: left;
}
@media (max-width: 640px) {
  .cu-facts {
    grid-template-columns: 1fr;
  }
  .cu-fact + .cu-fact {
    border-left: none;
    border-top: 1px solid var(--line-strong);
  }
}

/* 货号现在是「点一下复制」的按钮，长得还是原来那张小面单 */
button.code {
  min-height: 0;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding: 0 7px;
  cursor: copy;
  white-space: nowrap;
}
button.code:hover:not(:disabled) {
  background: var(--card-2);
  border-color: var(--text);
  color: var(--text);
}
td button.code {
  font-size: 14px;
}
button.copy-chip,
button.ship-no {
  cursor: copy;
}

/* 团员页：勾选下载清单 */
.item .pick {
  align-self: center;
  padding: 4px 0;
  cursor: pointer;
}
.item .pick input {
  width: 22px;
  height: 22px;
}
.sel-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}
.shipbar {
  border-top-color: var(--text);
}
@media (max-width: 600px) {
  .ship-slot {
    margin-left: 108px;
  }
}
body.has-shipbar .toast {
  bottom: calc(84px + env(safe-area-inset-bottom));
}

/* 首页不用墨黑：选中那格、标题都换成方格纸的蓝 */
.entry-hero h1 {
  color: var(--brand-ink);
}
.entry-roles.segmented > .on,
.entry-roles.segmented > .on:hover:not(:disabled),
.entry-roles.segmented > [aria-pressed='true'],
.entry-roles.segmented > [aria-pressed='true']:hover:not(:disabled) {
  background: var(--info-bg);
  border-color: var(--rule);
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--rule);
}

/* ───────── 团员页：按单号筛选 ───────── */
.order-filter .of-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.of-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
button.of-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 0;
  padding: 6px 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--line-strong);
  text-align: left;
  font-weight: 500;
}
button.of-chip:hover:not(:disabled) {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--rule);
}
button.of-chip.on,
button.of-chip.on:hover:not(:disabled) {
  background: var(--info-bg);
  color: var(--brand-ink);
  border-color: var(--rule);
  border-left-color: var(--rule);
}
.of-chip .of-no {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.of-chip .of-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ───────── 团员页：单号栏 + 右边的勾选框 ───────── */
.ship-col {
  flex: 0 0 310px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ship-col .ship-slot {
  flex: 1 1 auto;
  align-self: stretch;
  justify-content: center;
}
.ship-col .pick {
  margin-left: auto;
  padding: 4px 2px;
}
.ship-col .pick span {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .ship-col {
    flex: 1 0 calc(100% - 76px);
    max-width: calc(100% - 76px);
    margin-left: 76px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
  }
  .ship-col .ship-slot {
    flex: 1 1 auto;
    margin-left: 0;
    padding: 0;
    border: none;
  }
}

/* ───────── 最近动态：一件一行，点一下复制 ───────── */
ul.tl-titles {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
button.tl-line {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 3px 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-left: 2px solid var(--line-strong);
  text-align: left;
  font-family: inherit;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: copy;
}
button.tl-line:hover:not(:disabled) {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--line-strong);
  border-left-color: var(--rule);
}

/* ───────── 仓库进门那块：改成浅色（白纸 + 蓝色粗边），不再是黑底 ───────── */
.scan-card,
.scan-card:hover {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--rule);
}
.scan-card h2 {
  color: var(--text);
}
.scan-card p {
  color: var(--muted);
}
.scan-card input {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
}
.scan-card input:focus-visible {
  border-color: var(--rule);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.scan-card #hits {
  border: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) {
  .scan-card {
    background: var(--card);
    border-color: var(--line-strong);
    border-top-color: var(--rule);
  }
}

/* ───────── 最近动态：订单那一行就是展开开关 ───────── */
.tl-order .tl-more {
  margin-top: 0;
}
.tl-sum {
  list-style: none;
  cursor: pointer;
}
.tl-sum::-webkit-details-marker {
  display: none;
}
.tl-sum:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tl-toggle::before {
  content: '展开 ▸';
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
details[open] > .tl-sum .tl-toggle::before {
  content: '收起 ▾';
}

/* 订单页底部：删订单 */
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line-strong));
}
