/* ==========================================================
   拼邮账本 · 样式
   移动优先：先按手机宽度设计，再向上加宽
   ========================================================== */

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #101319;
  --ink-2: #3b4250;
  --muted: #6b7385;
  --line: #e6e9f0;
  --line-strong: #d2d8e3;
  --accent: #1a56c4;
  --accent-soft: #eaf0fb;
  --ok: #0a6b57;
  --ok-soft: #e3f4ee;
  --warn: #8f5206;
  --warn-soft: #fdf3e3;
  --danger: #a8231c;
  --danger-soft: #fdeceb;
  --radius: 16px;
  --gap: 18px;
  --pad: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* 作者样式里的 display 会盖掉浏览器对 [hidden] 的默认隐藏，必须显式声明 */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -.015em;
  line-height: 1.35;
}

a { color: var(--accent); }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.02em;
  min-width: 0;
  flex: 0 0 auto;
}

/* 韩兵国际物流 的 HB 金色标志 */
.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand .logo { font-size: 18px; }

/* 顶栏的品牌可以点，回门户首页 */
.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover .brand-name { color: var(--accent); }

.brand .ver {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.role-switch {
  display: flex;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.role-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: .16s;
}

.role-switch button.on {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

/* ---------------- 主区域 ---------------- */

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 20px 72px;
}

/* 四个标签页：放在顶栏里，跟标志同一行 */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}

.tabs button:hover { color: var(--ink-2); }

.tabs button.on {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.topbar > .btn { flex: 0 0 auto; }

/* 顶栏最左边的取件点开关：两个区的账分开，做得显眼 */
.point-switch {
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
  background: #e8ecf3;
  border: 1.5px solid #b9c2d2;
  border-radius: 13px;
}

.point-switch button {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 9px 18px;
  border-radius: 10px;
  color: var(--ink-2);
}

.point-switch button:hover {
  background: #fff;
  color: var(--ink);
}

.point-switch button.on {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .28);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
  margin-bottom: var(--gap);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-head h2 { font-size: 16.5px; }

.card-head .sub {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.6;
}

.hint.warn { color: var(--warn); }

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 14px; }

.field > label,
.lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}

textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 196, .14);
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.grid { display: grid; gap: 14px; }

.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding-top: 4px;
}

/* 输入框后面的单位 */
.unit-wrap { position: relative; }

.unit-wrap input { padding-right: 40px; }

.unit-wrap .unit {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  color: var(--muted);
  pointer-events: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}

.btn:hover { background: #f6f8fc; }

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: #1a52b6; }

.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #2b2f38; }

.btn-sm { font-size: 12.5px; padding: 8px 12px; border-radius: 9px; }

.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }

.btn-danger { color: var(--danger); border-color: #f2c9c6; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.btn-block { width: 100%; }

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

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: var(--gap);
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat .k {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .01em;
}

.stat .v {
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -.025em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.stat .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }

.stat.accent .v { color: var(--accent); }
.stat.danger .v { color: var(--danger); }
.stat.ok .v { color: var(--ok); }

/* ---------------- 表格 ---------------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  background: #f8fafc;
  position: sticky;
  top: 0;
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover { background: #f8fafc; }

td.num, th.num { text-align: right; }

td.wrap { white-space: normal; min-width: 120px; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: .01em;
}

.tiny { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.strike { text-decoration: line-through; color: var(--muted); }

/* ---------------- 徽标 ---------------- */

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}

.badge.neutral { background: var(--bg); color: var(--ink-2); border-color: var(--line-strong); }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: #c9d9f7; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe6da; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f2dcb8; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #f2c9c6; }

/* 可点击的徽标（用于切换状态） */
button.badge { cursor: pointer; font-family: inherit; transition: .15s; }
button.badge:hover { filter: brightness(.97); }

/* ---------------- 折叠区 / 成员标签 ---------------- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; }

details > summary { cursor: pointer; font-weight: 650; font-size: 14px; }

details.card > summary { list-style: none; outline: none; }

details.card > summary::-webkit-details-marker { display: none; }

details.card > summary::before {
  content: "▸ ";
  color: var(--muted);
  font-weight: 400;
}

details.card[open] > summary::before { content: "▾ "; }

details.card[open] > summary { margin-bottom: 14px; }

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

.empty {
  text-align: center;
  padding: 26px 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.empty .big { font-size: 26px; display: block; margin-bottom: 6px; }

/* ---------------- 批次头 ---------------- */

.batch-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}

.batch-bar select { flex: 1 1 220px; width: auto; }

.code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: .04em;
}

/* ---------------- 成员账单卡 ---------------- */

.member-card { padding: 0; overflow: hidden; }

.member-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  background: linear-gradient(180deg, #fbfcfe, #f6f8fc);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.member-card .who { display: flex; align-items: center; gap: 9px; }

.avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
}

.member-card .who .nm { font-weight: 650; font-size: 14.5px; }

.member-card .body { padding: 12px 15px 14px; }

.totals-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px dashed var(--line-strong);
  flex-wrap: wrap;
}

.totals-line .big {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.paid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.paid-row .field { margin: 0; flex: 1 1 130px; }

.due-ok { color: var(--ok); font-weight: 700; }
.due-bad { color: var(--danger); font-weight: 700; }

/* 提货码 */
.pickup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.pickup b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--ink);
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 1px 7px;
}

/* ---------------- 成员端 ---------------- */

.member-hero {
  background: linear-gradient(160deg, #1a56c4, #12356f);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: var(--gap);
  box-shadow: 0 12px 32px -14px rgba(18, 53, 111, .55);
}

.member-hero .k { font-size: 13px; opacity: .82; }

.member-hero .v {
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 6px;
}

.member-hero .meta { font-size: 13px; opacity: .88; }

.timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 6px 0 2px;
  overflow-x: auto;
}

.timeline .step {
  flex: 1 0 auto;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  position: relative;
  padding: 14px 2px 0;
}

.timeline .step::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.timeline .step.done { color: var(--accent); font-weight: 650; }
.timeline .step.done::before { background: var(--accent); }

.timeline .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(50% + 7px);
  right: calc(-50% + 7px);
  height: 2px;
  background: var(--line-strong);
}

.timeline .step.done:not(:last-child)::after { background: var(--accent); }

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

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  background: var(--accent-soft);
  border: 1px solid #cfdcf6;
  color: #1c3f7d;
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.notice.warn { background: var(--warn-soft); border-color: #f0dcbb; color: #6f4405; }

.notice .ico { flex: 0 0 auto; }

/* ---------------- 打印 ---------------- */

@media print {
  body { background: #fff; }
  .topbar, .tabs, .no-print, .btn, .notice, footer { display: none !important; }
  .shell { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; margin-bottom: 10px; }
  .member-card { break-inside: avoid; }
  /* 页边距交给 .print-doc 的内边距，@page 设 0 才不会打出网址/日期页眉 */
  @page { margin: 0; }
}

/* ---------------- 宽屏 ---------------- */

@media (min-width: 720px) {
  body { font-size: 15.5px; }
  .shell { padding: 24px 24px 84px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid.c4 { grid-template-columns: repeat(4, 1fr); }
}

/* 窄一点时：先收起公司名，给四个标签让位置 */
@media (max-width: 860px) {
  .brand-name { display: none; }
}

@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 8px 12px; }
  .brand { gap: 8px; }
  .brand .ver { display: none; }
  .brand-logo { width: 34px; height: 34px; }
  .hide-sm { display: none; }
  .tabs button { padding: 7px 12px; font-size: 13px; }
  .point-switch { padding: 3px; border-radius: 11px; }
  .point-switch button { font-size: 13.5px; padding: 7px 12px; border-radius: 8px; }
}

@media (max-width: 420px) {
  :root { --pad: 16px; --gap: 14px; }
  .grid.c3 { grid-template-columns: 1fr 1fr; }
  .grid.c4 { grid-template-columns: 1fr 1fr; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 19px; }
  .topbar { padding: 8px 10px; }
  .shell { padding: 14px 14px 64px; }
  .brand-logo { width: 30px; height: 30px; }
  .topbar .btn-sm { padding: 7px 9px; }
}

/* ==========================================================
   v2：以「箱」为中心的界面
   ========================================================== */

/* 分段控件（选线路、选收款方式） */
.seg {
  display: flex;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.seg button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}

.seg button:hover { color: var(--ink-2); }

.seg button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

/* 箱子属性行 */
.kv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.kv .k { color: var(--muted); margin-right: 6px; }

/* 箱子列表行 */
.box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
  transition: .16s;
}

.box-row:hover {
  border-color: var(--line-strong);
  background: #fbfcfe;
  box-shadow: 0 4px 14px -8px rgba(16, 24, 40, .18);
}

.box-title {
  font-weight: 640;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.5;
}

.box-row-side { color: var(--muted); font-size: 20px; line-height: 1; }

/* 客户分组（箱内明细） */
.group-box {
  border: 1px solid var(--line);
  border-left: 5px solid var(--ga, var(--line-strong));
  border-radius: 13px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

/* 头部才带颜色：浅底 + 重色左边条，底下一律白色 */
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gc, #f7f9fc);
  border-bottom: 1px solid rgba(16, 24, 40, .08);
}

.group-head > div:first-of-type { margin-right: auto; }

.group-head .gc-bar {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--ga, #999);
  flex: 0 0 auto;
  margin-right: -2px;
}

.group-head > div:first-of-type b { color: var(--ga, inherit); }

.group-box table tbody tr { background: #fff; }

.group-box table tbody tr + tr { border-top: 1px solid #f1f4f8; }

.group-box table tbody tr:hover { background: #fbfcfe; }

.group-box table td,
.group-box table th { padding: 9px 14px; }

.fee-line {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fcfdfe;
  font-size: 13px;
}

.fee-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fee-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

/* 代号的运费要显眼 */
.fee-amount {
  font-size: 21px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}

.fee-calc { font-size: 12px; color: var(--muted); }

/* 标记已取货：绿色实心，一眼能找到 */
.btn-collect {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px -3px rgba(10, 107, 87, .5);
}

.btn-collect:hover { background: #085647; border-color: #085647; }

/* 逐箱记取货 / 收款 的工具条 */
.box-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: #fcfdfe;
}

.box-tools-spacer { flex: 1 1 0; min-width: 0; }

/* 可点击的表格行（概览·最近的箱子） */
.row-link { cursor: pointer; }

.row-link:hover td { background: #f8fafc; }

/* 箱子列表：自己滚动，页面不用往下拉 */
.scroll-area {
  max-height: 56vh;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 4px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cfd6e2 transparent;
}

.scroll-area::-webkit-scrollbar { width: 8px; }

.scroll-area::-webkit-scrollbar-thumb {
  background: #cfd6e2;
  border-radius: 4px;
}

.scroll-area::-webkit-scrollbar-track { background: transparent; }

/* 单号输入 + 去查询 排一行 */
.row-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row-inline input { flex: 1 1 auto; min-width: 0; }
.row-inline .btn { flex: 0 0 auto; }

/* 锁定的输入框（箱子物流单号） */
input[readonly] {
  background: #f4f6fa;
  color: var(--ink-2);
  cursor: default;
}

/* 箱子收款汇总 */.money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 6px 0 0;
}

.money-grid .cell {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.money-grid .cell .k { font-size: 12px; color: var(--muted); }

.money-grid .cell .v {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  letter-spacing: -.02em;
}

.money-line { margin-top: 4px; }

.box-row .money-line b { font-weight: 700; }

@media (max-width: 420px) {
  .money-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .money-grid .cell { padding: 9px 10px; }
  .money-grid .cell .v { font-size: 15px; }
}

/* 出库重量输入 */
.out-box { display: flex; align-items: center; gap: 6px; }

/* 出库 × 系数 = 计费重量：黑底白字，一眼看到最后按多少公斤收钱 */
.billed-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  margin-left: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .24);
  letter-spacing: -.01em;
}

.billed-tag b {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* 费用那一行的计费重量也加重 */
.fee-calc .fee-weight,
.totals-line .fee-weight {
  color: var(--ink);
  font-weight: 800;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.out-box input {
  width: 82px;
  padding: 7px 8px;
  font-size: 13px;
  text-align: right;
  border-radius: 8px;
}

/* 收款码槽位（系统设置里微信 / 支付宝各一个） */
.qr-slot {
  padding: 14px 0;
  border-top: 1px dashed var(--line);
}

.qr-slot:first-of-type { border-top: 0; padding-top: 0; }

.qr-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

/* 顾客页「马上付款」 */
.pay-now {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.pay-now > summary {
  list-style: none;
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(26, 86, 196, .55);
  user-select: none;
  transition: .15s;
}

.pay-now > summary::-webkit-details-marker { display: none; }
.pay-now > summary:hover { background: #174aa8; }

.pay-now[open] > summary {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.pay-now-body { padding-top: 16px; }

.pay-now-body .seg { margin: 0 auto 14px; }

.pay-qr { text-align: center; }

.pay-qr .qr-box img {
  width: min(260px, 72vw);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
}

/* 收款区 */
.pay-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.qr-box { text-align: center; margin-top: 12px; }

.qr-box img {
  width: 190px;
  max-width: 72vw;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px;
}

.big {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* 表格里的输入框（改重量、改单价） */
.table-wrap input {
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

/* ---------------- 打印 ---------------- */

#printArea { display: none; }

@media print {
  /* 后台打印只出 #printArea 里的箱单；顾客页整页照打 */
  body:not(.public) > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  body { background: #fff; }

  body.public .card { box-shadow: none; }
  body.public .group-box { break-inside: avoid; }
  body.public .shell { padding: 12mm 11mm; }

  .print-doc {
    color: #000;
    font-size: 12px;
    font-family: var(--font);
    padding: 12mm 11mm;
  }
  .print-doc h1 { font-size: 18px; margin: 0 0 4px; }
  .print-meta { font-size: 11px; color: #333; margin-bottom: 8px; }

  .print-table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .print-table th,
  .print-table td { border: 1px solid #999; padding: 3px 6px; }
  .print-table th { background: #eee; text-align: left; }
  .print-table .num { text-align: right; }
  .print-table tfoot td { background: #f5f5f5; font-weight: 700; }

  /* 箱单：照他们表格的版式，全部细边框 */
  .sheet-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border: 1px solid #333;
    border-bottom: 0;
    padding: 7px 10px;
  }

  .sheet-title .b {
    font-size: 21px;
    font-weight: 800;
    color: #c00000;
    letter-spacing: .02em;
  }

  /* 后面的物流单号：普通黑色，不跟着变红 */
  .sheet-title .t {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
  }

  .sheet-sub {
    font-size: 10.5px;
    color: #333;
    border: 1px solid #333;
    border-bottom: 0;
    padding: 3px 8px;
  }

  .sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    table-layout: fixed;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet-table th,
  .sheet-table td {
    border: 1px solid #333;
    padding: 2px 4px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet-table th { background: #e9edf3; font-weight: 700; text-align: center; }

  /* 入库 / 出库 / 运费 都居中，看着齐整 */
  .sheet-table .num { text-align: center; }
  .sheet-table .c { text-align: center; }
  .sheet-table td.code { font-weight: 700; }

  /* 单号在格子里居中，跟他们的表一致 */
  .sheet-table td.c { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

  /* 运费金额加粗放大，一眼看到 */
  .sheet-table td.money {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: -.01em;
  }

  .sheet-table tfoot td.num { text-align: center; }
  .sheet-table tfoot td.money-total { font-weight: 800; }

  .sheet-table tr.alt td { background: #f2f6fc; }
  .sheet-table tfoot td { background: #e9edf3; font-weight: 700; }

  .sheet-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    border: 1px solid #333;
    border-top: 0;
    padding: 5px 8px;
    font-size: 11px;
  }

  .print-sign { margin-top: 26px; font-size: 12px; }

  @page { size: A4; margin: 0; }
}

/* ==========================================================
   顾客查询页（query.html，body.public）
   ========================================================== */

.public .topbar { justify-content: flex-start; }

.public-foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  padding: 8px 24px 48px;
  max-width: 560px;
  margin: 0 auto;
}

.q-box .group-head {
  align-items: flex-start;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}

.q-box-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
}

.q-box .fee-line {
  justify-content: flex-start;
  background: #fcfdfe;
}

.q-box table td,
.q-box table th { padding: 9px 14px; }

.public .btn-row { justify-content: center; }

/* 取货结算：按取件点分组的小标题 */
.pickup-point {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.pickup-point .pt {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* 箱子里那一折：单号明细，平时收起省地方 */
.parcel-details {
  border-top: 1px solid var(--line);
  background: #fcfdfe;
}

.parcel-details > summary {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.parcel-details > summary::-webkit-details-marker { display: none; }

.parcel-details > summary::before {
  content: "▸ ";
  font-weight: 400;
}

.parcel-details[open] > summary::before { content: "▾ "; }

.parcel-details > summary:hover { color: var(--ink); background: #f7f9fc; }

.parcel-details[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.parcel-details table td,
.parcel-details table th { padding: 9px 16px; }

/* ==========================================================
   后台登录门
   ========================================================== */

body.locked .tabs,
body.locked #pointSwitch,
body.locked .topbar-link,
body.locked #logoutBtn,
body.locked #view,
body.locked #printArea,
body.locked footer { display: none !important; }

.login-gate {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
}

.login-card {
  width: min(380px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 48px -26px rgba(16, 24, 40, .4);
  padding: 30px 26px 26px;
  text-align: center;
}

.login-logo {
  width: 56px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

.login-card h2 { font-size: 20px; margin-bottom: 4px; }

.login-card .sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.login-card .field { margin-bottom: 12px; text-align: left; }

.login-card input[type="password"] { text-align: center; letter-spacing: .18em; }

.login-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}

.login-back:hover { color: var(--ink); }

/* ==========================================================
   商城后台 · 通知铃
   ========================================================== */

.bell {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: .15s;
}

.bell:hover { background: var(--bg); }

.bell.has {
  border-color: #f0b429;
  background: #fff8e6;
  animation: bell-shake .6s ease;
}

@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-10deg); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(3deg); }
}

.bell-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e0453a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(224, 69, 58, .5);
}

/* 屏幕右上角滑出来的通知条 */
.notify-pop {
  position: fixed;
  right: 18px;
  top: 74px;
  width: min(340px, calc(100vw - 36px));
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px -18px rgba(16, 24, 40, .8);
  z-index: 60;
  animation: pop-in .22s ease;
}

@keyframes pop-in {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.notify-pop .np-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffd85e;
}

.notify-pop .np-item {
  font-size: 13px;
  line-height: 1.6;
  opacity: .95;
}

.notify-pop .np-close {
  margin-top: 10px;
  font-size: 12px;
  color: #9fb0c8;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* 短信状态小标签（试运行 / 已开启） */
.sms-chip {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  box-shadow: 0 6px 18px -10px rgba(16, 24, 40, .5);
  text-decoration: none;
}

.sms-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0453a;
  flex: 0 0 auto;
}

.sms-chip.live { border-color: #a9d7b7; color: #1c6b38; }
.sms-chip.live .dot { background: #1c9b4b; }

.sms-chip.dry { border-color: #f0d59a; background: #fffaf0; color: #8a6100; }
.sms-chip.dry .dot { background: #e0a415; }

.code-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--accent);
}

/* 顾客代号搜索 */
.code-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  margin: 2px 0 16px;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: .15s;
}

.code-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 196, .12);
}

.code-search .ico { font-size: 13px; opacity: .55; }

.code-search input {
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  width: 100%;
  outline: none;
  box-shadow: none;
}

.code-search input:focus { box-shadow: none; }

/* 后台：客服联系方式编辑 */
.ct-edit {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ct-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ct-qr img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px;
}

.ct-fields { flex: 1; min-width: 240px; }
.ct-fields .field:last-child { margin-bottom: 0; }

/* ==========================================================
   方角模式：把所有圆角压成直角
   （想改回去，把下面这段的 0 改回原值，或者整段删掉）
   ========================================================== */

:root { --radius: 0px; }

/* 顶栏 / 标签 / 按钮 / 输入框 / 卡片 / 表格 / 徽标，全直边 */
.topbar,
.tabs button,
.tabs button.on,
.point-switch,
.point-switch button,
.btn,
.btn-primary,
.btn-ghost,
.btn-sm,
.field input,
.field select,
.field textarea,
.card,
.card-head,
.badge,
.empty .big,
.login-card,
.login-card input,
.login-gate,
.peer,
.pick-row,
.pay-row,
.pay-seg button,
.seg,
.seg button,
.parcel-details summary,
.qr-box,
.qr-box img,
.flow-table,
.print-doc,
.tip,
.warn-box,
.tab,
.chip,
.code-search,
.code-search input,
.sms-chip,
.bell,
.bell-count,
.notify-pop,
.portal-search,
.portal-search input,
.gg-mark,
.gg-name,
.admin-link,
.site-nav,
.site-links a,
.lang-switch,
.lang-switch button,
.q-card,
.q-ico,
.biz-card,
.biz-band,
.biz-link,
.why-item::before,
.foot-brand .gg-mark,
.hero-notice,
.notice-tag,
.price-card,
.price-input,
.price-input input,
.price-result,
.wg-fab,
.wg-panel,
.wg-head,
.wg-body,
.wg-qr,
.wg-call,
.wg-line,
.wg-x,
.hb-card,
.hb-ico,
.code-chip,
.code-big,
.addr-box,
.addr-row,
.contact-qr img,
.qr-empty,
.ct-qr img,
.mini-bar,
.mini-bar .back,
.cart-bar,
.cart-bar-go,
.prod-card,
.prod-ico,
.prod-ctrl .btn,
.slot-card,
.done-no,
.checkout-block .seg button,
.checkout-sum,
.toast,
.test-chip {
  border-radius: 0 !important;
}

/* 圆形的（头像点、圆形按钮）也改成方块 */
.prod-ico,
.hb-ico,
.q-ico,
.gg-mark,
.foot-brand .gg-mark,
.wg-fab,
.bell-count,
.contact-qr img,
.ct-qr img {
  border-radius: 0 !important;
}

/* 状态小圆点保持圆形，不然看不清 */
.sms-chip .dot { border-radius: 50% !important; }

/* ==========================================================
   手机上的补丁（≤520px）
   ========================================================== */

@media (max-width: 520px) {
  /* 两列的表单在手机上挤成一列，方便拇指点 */
  .grid.c2 { grid-template-columns: 1fr; }

  /* 卡片内边距收一点，屏幕小别浪费 */
  .card { padding: 16px 14px; }
  .shell { padding: 16px 14px 72px; }

  /* 顶栏按钮小一号，别把标签挤没 */
  .topbar .btn-sm { padding: 7px 10px; font-size: 12px; }
}

/* 麻将后台：数字 + 筛选 */
.mj-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.mj-stat {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mj-stat b {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.mj-stat span { font-size: 12.5px; color: var(--muted); }

.mj-filter { margin-bottom: 14px; }

.mj-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  color: var(--accent);
}

@media (max-width: 520px) {
  .mj-stat b { font-size: 20px; }
  .mj-filter button { font-size: 12.5px; padding: 7px 9px; }
}

/* ==========================================================
   重建后补的几块（沿用原有设计语言）
   ========================================================== */

.mini-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
  margin: 20px 0 10px;
}

.line-form {
  margin-top: 6px;
  padding: 16px;
  border-top: 1px dashed var(--line-strong);
}

.line-form h3 { font-size: 14px; margin: 0 0 12px; }

.row-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row-inline input,
.line-form input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  min-width: 0;
}

#nb-number, #nb-tracking, #ln-code, #ln-track, #ln-date, #ln-in {
  flex: 1 1 120px;
}

.member-card .body .seg { margin-bottom: 2px; }

.pickup-card { margin-top: var(--gap); }
.settle-history { margin-top: var(--gap); }

/* ==========================================================
   拼邮后台 · 入库系统
   ========================================================== */

.ib-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.ib-table th {
  text-align: left;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 650;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.ib-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }

.ib-table td.num, .ib-table th.num { text-align: right; white-space: nowrap; }

.ib-table .ib-ops { white-space: nowrap; text-align: right; }
.ib-table .ib-ops .btn { padding: 3px 8px; font-size: 12px; margin-left: 4px; }

.ib-box { cursor: pointer; border: 0; font: inherit; }

/* 箱子里挑货 */
.pick-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: #f7f9fc; }

.pick-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-main b { font-size: 13px; }
.pick-main .tiny { font-size: 11.5px; color: var(--muted); }


/* ==========================================================
   箱子里「往箱子里放货」：代码 → 可点清单
   ========================================================== */

.pick-scroll {
  max-height: 200px;
  overflow-y: auto;
  margin-top: -6px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: 0 12px 24px -16px rgba(16, 24, 40, .35);
}

.pick-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}

.pick-line:last-child { border-bottom: 0; }
.pick-line:hover { background: #f2f7ff; }

.pick-line .pl-track {
  font-size: 12.5px;
  font-weight: 650;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-line .pl-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.pick-line .pl-go {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
  padding: 5px 12px;
  text-align: center;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px -3px rgba(37, 99, 235, .55);
  transition: filter .12s, transform .12s;
}

.pick-line:hover .pl-go {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.pick-line:hover .pl-track { color: var(--accent); }

.pick-line.done {
  background: #fbfcfd;
  color: #9aa3b2;
  cursor: default;
}

.pick-line.done .pl-go {
  background: #e9edf3;
  color: #8b93a3;
  font-weight: 600;
  box-shadow: none;
  transform: none;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0 2px;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}


/* 顾客查包裹：只显示还差多少钱 */
.packet-total {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -.02em;
  padding: 6px 2px 14px;
  font-variant-numeric: tabular-nums;
}

.packet-total.due-bad { color: #c0392b; }
.packet-total.due-ok { color: #1f7a4d; }

@media (max-width: 520px) {
  .packet-total { font-size: 28px; }
}


/* 顶部横幅：还差多少 / 已全部付清 */
.member-hero.clear {
  background: linear-gradient(160deg, #1f9d63, #14663f);
  box-shadow: 0 12px 32px -14px rgba(20, 102, 63, .5);
}

.member-hero.clear .k {
  font-size: 20px;
  font-weight: 720;
  opacity: 1;
  letter-spacing: -.01em;
}

.member-hero.clear .meta { margin-top: 12px; }

.member-hero.owes .k { font-size: 14px; }

.member-hero .meta { opacity: .85; font-size: 12.5px; margin-top: 8px; }


/* 顾客合计：一箱一箱列出来再合计 */
.sum-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.sum-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  background: #fff;
}

.sum-line:last-child { border-bottom: 0; }

.sum-name { color: #34405a; }

.sum-amt { font-variant-numeric: tabular-nums; font-weight: 650; }

.sum-total {
  background: #f7f9fc;
  font-weight: 700;
}

.sum-total .sum-name { color: var(--ink); }

.sum-total .sum-amt { font-size: 18px; color: #c0392b; }


/* 入库筛选：代号先、单号后，两个小框 */
.in-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 0;
}

.in-f {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.in-f > span { flex: 0 0 auto; }

.in-f input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.in-f input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (max-width: 560px) {
  .in-search { flex-direction: column; align-items: stretch; gap: 6px; }
}


/* 已收款旁边的「撤销付款」小按钮 */
.unpay-btn {
  padding: 2px 8px;
  font-size: 11.5px;
  color: #8b93a3;
  border-color: transparent;
  background: transparent;
}

.unpay-btn:hover {
  color: #c0392b;
  border-color: #e6b8b1;
  background: #fdf3f1;
}


/* 顾客代号：删除按钮小一点，别太扎眼 */
.code-table .code-del {
  padding: 2px 8px;
  font-size: 11.5px;
  color: #8b93a3;
  border-color: transparent;
  background: transparent;
}

.code-table .code-del:hover {
  color: #c0392b;
  border-color: #e6b8b1;
  background: #fdf3f1;
}


/* 顾客代号：发号规则 */
.code-rule {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fbfcfe;
}

.code-rule .rule-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.code-rule .field { margin-bottom: 0; }

.code-rule #codeStart {
  width: 120px;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.code-rule .rule-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #34405a;
  padding-bottom: 6px;
  cursor: pointer;
}

.code-rule .next-code {
  font-size: 15px;
  color: var(--accent);
}


/* 操作日志表 */
.audit-table { max-height: 420px; overflow-y: auto; }

.audit-table table { font-size: 12.5px; }

.audit-table td { vertical-align: top; }

.audit-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }



