/* 批发宝 · 样式 */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #182230;
  background: #eef2f6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  font-size: 14px;
  line-height: 1.45;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

:root {
  --bg: #f2f5f8;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #667085;
  --ink-3: #98a2b3;
  --line: #edf0f4;
  --line-2: #e2e8f0;
  --primary: #0b9e6f;
  --primary-d: #07855d;
  --primary-soft: #e6f7f0;
  --mint: #2ec4a0;
  --orange: #ff7a45;
  --orange-soft: #fff2ec;
  --warn: #f79009;
  --warn-soft: #fff7e6;
  --danger: #e5484d;
  --danger-soft: #feeceb;
  --blue: #2f80ed;
  --blue-soft: #eaf2fe;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --tab-h: 56px;
}

#root { position: relative; width: 100%; height: 100%; height: 100dvh; }

.app {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  z-index: 5;
}
.topbar .tb-title { font-size: 16px; font-weight: 650; letter-spacing: .2px; }
.topbar .tb-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.topbar .tb-main { flex: 1; min-width: 0; }
.topbar .tb-action { font-size: 13px; color: var(--primary); font-weight: 600; }
.icon-btn {
  width: 32px; height: 32px; margin-left: -6px;
  display: grid; place-items: center; border-radius: 10px; color: var(--ink);
}
.icon-btn:active { background: #f2f4f7; }
.topbar.hero-bar {
  background: transparent;
  border: 0;
  position: absolute; left: 0; right: 0; top: 0;
  padding-top: calc(env(safe-area-inset-top) + 12px);
  color: #fff;
  min-height: 0;
}
.hero-bar .tb-sub, .hero-bar .tb-action { color: rgba(255, 255, 255, .78); }

/* ---------------- 主视图 ---------------- */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px);
  overscroll-behavior: contain;
}
.view::-webkit-scrollbar { width: 0; height: 0; }
.page-view {
  position: absolute; inset: 0; z-index: 20;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.page-view.anim { animation: slideIn .22s cubic-bezier(.32, .72, .28, 1); }
@keyframes slideIn { from { transform: translateX(16%); opacity: .6; } to { transform: none; opacity: 1; } }
.page-view .view { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }

/* ---------------- 底部 tab ---------------- */
.tabbar {
  flex: none;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 10;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 500;
  padding-top: 4px;
  transition: color .15s;
}
.tab svg { width: 22px; height: 22px; stroke-width: 1.8; }
.tab.active { color: var(--primary); font-weight: 650; }
.tab:active { background: #fafbfc; }

/* ---------------- 卡片 / 通用 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.card-title h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.card-title .more { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 2px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 11px; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row.tap:active { background: #f8fafb; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.row-sub { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-side { text-align: right; flex: none; }
.row-side .big { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-side .small { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.chev { color: #c3cad4; flex: none; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 2px 8px;
}
.section-head h3 { font-size: 14px; font-weight: 650; }
.section-head .more { font-size: 12px; color: var(--ink-2); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mb0 { margin-bottom: 0; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  height: 18px; padding: 0 6px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
  background: #f2f4f7; color: var(--ink-2);
  white-space: nowrap;
}
.tag.green { background: var(--primary-soft); color: var(--primary-d); }
.tag.orange { background: var(--orange-soft); color: #d1500f; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.amber { background: var(--warn-soft); color: #b54708; }
.tag.plain { background: transparent; padding: 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 16px;
  border-radius: 12px;
  background: #f2f4f7; color: var(--ink);
  font-size: 14px; font-weight: 600;
  transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.985); opacity: .9; }
.btn-primary { background: linear-gradient(135deg, #12b886, #0b9e6f); color: #fff; box-shadow: 0 6px 16px -6px rgba(11, 158, 111, .55); }
.btn-outline { background: #fff; border: 1px solid var(--line-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

/* 表单 */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.input, .textarea, .select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: #fff; outline: none; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 158, 111, .1); }
.textarea { height: auto; min-height: 64px; padding: 10px 12px; resize: none; line-height: 1.5; }
.input-group { display: flex; align-items: center; gap: 8px; }
.input-group .unit { font-size: 12px; color: var(--ink-2); flex: none; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: 13px; }
.input-affix .input { padding-left: 28px; }
.input-affix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 12px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip.sm { height: 26px; padding: 0 10px; font-size: 12px; }

.segmented { display: flex; background: #eef1f5; border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button {
  flex: 1; height: 32px; border-radius: 9px; font-size: 13px; color: var(--ink-2); font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.segmented button svg { width: 15px; height: 15px; flex: none; }
.segmented button.active { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }

/* 搜索 */
.search {
  position: relative; margin-bottom: 10px;
}
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search .search-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
  background: #e9eef2; color: #667085; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.search input {
  width: 100%; height: 38px; border-radius: 11px; border: 1px solid transparent;
  background: #fff; padding: 0 12px 0 34px; outline: none; font-size: 13.5px;
  box-shadow: var(--shadow);
}
.search input:focus { border-color: var(--primary); }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative;
  margin: -12px -14px 0;
  padding: calc(env(safe-area-inset-top) + 54px) 18px 54px;
  background:
    radial-gradient(120% 90% at 90% -10%, rgba(255, 255, 255, .28), transparent 55%),
    linear-gradient(150deg, #10a97a 0%, #0b9e6f 48%, #07855d 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -46px; top: -40px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .05);
}
.hero-greet { font-size: 12px; color: rgba(255, 255, 255, .8); display: flex; align-items: center; gap: 6px; }
.hero-amount { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 2px; }
.hero-amount .cny { font-size: 16px; opacity: .9; }
.hero-amount .v { font-size: 34px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hero-amount .unit { font-size: 12px; opacity: .75; margin-left: 2px; }
.hero-stats { display: flex; gap: 22px; margin-top: 14px; position: relative; z-index: 1; }
.hero-stats .hs-v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hero-stats .hs-l { font-size: 11px; color: rgba(255, 255, 255, .72); margin-top: 1px; }

.hero-card {
  margin-top: -38px;
  position: relative; z-index: 2;
  background: #fff; border-radius: 18px; box-shadow: 0 12px 30px -14px rgba(16, 24, 40, .3);
  padding: 16px 6px;
  display: flex;
}
.hero-card .hc {
  flex: 1; text-align: center; position: relative;
}
.hero-card .hc + .hc::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--line);
}
.hero-card .hc-v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.hero-card .hc-l { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.hero-card .hc-v.warn { color: var(--orange); }
.hero-card .hc-v.danger { color: var(--danger); }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 2px 8px; border-radius: 14px;
}
.quick:active { background: #f8fafb; }
.quick .qi {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
}
.quick .qi svg { width: 21px; height: 21px; }
.quick .ql { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.qi.green { background: var(--primary-soft); color: var(--primary-d); }
.qi.blue { background: var(--blue-soft); color: var(--blue); }
.qi.orange { background: var(--orange-soft); color: #d1500f; }
.qi.red { background: var(--danger-soft); color: var(--danger); }
.qi.amber { background: var(--warn-soft); color: #b54708; }
.qi.gray { background: #f2f4f7; color: #475467; }

.alert-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: 0; }
.ai-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-red { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot-amber { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ---------------- 开单 ---------------- */
.sell-head {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 11px 12px; box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.sell-head .sh-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-d); display: grid; place-items: center; flex: none; }
.sell-head .sh-name { font-weight: 650; font-size: 14px; }
.sell-head .sh-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.sell-head .sh-empty { color: var(--ink-3); font-weight: 500; }

.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 8px; }
.prod-card {
  background: #fff; border-radius: 14px; padding: 11px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; min-height: 108px;
  position: relative; text-align: left; color: var(--ink);
}
.prod-card:active { transform: scale(.985); }
.prod-card .pc-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.prod-card .pc-spec { font-size: 10.5px; color: var(--ink-3); }
.prod-card .pc-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 6px; }
.prod-card .pc-price { font-size: 15px; font-weight: 700; color: var(--primary-d); font-variant-numeric: tabular-nums; }
.prod-card .pc-price small { font-size: 10px; font-weight: 500; color: var(--ink-3); margin-left: 1px; }
.prod-card .pc-stock { font-size: 10.5px; color: var(--ink-3); }
.prod-card .pc-add {
  position: absolute; right: 9px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 9px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 10px -4px rgba(11, 158, 111, .8);
}
.prod-card .pc-badge { position: absolute; right: 9px; top: 9px; }

.cartbar {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px);
  height: 56px; border-radius: 16px;
  background: #16202b; color: #fff;
  display: flex; align-items: center; padding: 0 8px 0 16px; gap: 10px;
  box-shadow: 0 14px 30px -10px rgba(16, 24, 40, .55);
  z-index: 6;
}
.cartbar .cb-left { flex: 1; min-width: 0; }
.cartbar .cb-amount { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cartbar .cb-count { font-size: 10.5px; color: rgba(255, 255, 255, .65); }
.cartbar .cb-btn { flex: none; height: 40px; padding: 0 18px; border-radius: 12px; background: linear-gradient(135deg, #2ec4a0, #12b886); font-weight: 650; font-size: 14px; }
.cartbar .cb-btn[disabled] { opacity: .45; }

/* 结算页 */
.ck-line { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ck-line:last-child { border-bottom: 0; }
.ck-top { display: flex; align-items: flex-start; gap: 8px; }
.ck-top .ck-name { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.ck-top .ck-name .tiny { display: block; font-weight: 400; margin-top: 1px; }
.ck-del { color: var(--ink-3); width: 26px; height: 26px; display: grid; place-items: center; margin: -4px -4px 0 0; }
.ck-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper { display: flex; align-items: center; flex: none; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; height: 32px; background: #fff; }
.stepper button { width: 30px; height: 100%; display: grid; place-items: center; color: var(--ink-2); font-size: 16px; }
.stepper button:active { background: #f2f4f7; }
.stepper input {
  width: 46px; height: 100%; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center; font-size: 13px; font-weight: 600; outline: none; background: transparent;
  font-variant-numeric: tabular-nums;
}
.unit-toggle { display: flex; flex: none; background: #f2f4f7; border-radius: 8px; padding: 2px; }
.unit-toggle button { height: 26px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; color: var(--ink-2); }
.unit-toggle button.active { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.ck-amt { margin-left: auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-meta { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.ck-meta .ck-price {
  width: 58px; height: 28px; text-align: right; border: 1px solid var(--line-2); border-radius: 7px;
  padding: 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); outline: none;
  font-variant-numeric: tabular-nums; background: #fff;
}
.ck-meta .ck-price:disabled { background: #f8fafb; color: var(--ink-3); }
.ck-meta .gift-toggle { margin-left: auto; }
.ck-pieces { white-space: nowrap; }
.gift-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.gift-toggle input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; }
.ck-line.is-gift { background: #fbfefc; }

.summary-line { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--ink-2); }
.summary-line .v { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-line.total { padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--line-2); font-size: 14px; color: var(--ink); font-weight: 600; }
.summary-line.total .v { font-size: 22px; font-weight: 700; color: var(--danger); letter-spacing: -.3px; }
.summary-line .input { width: 110px; height: 36px; text-align: right; }

.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-method {
  height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff;
  font-size: 12.5px; color: var(--ink-2); display: grid; place-items: center; font-weight: 500;
}
.pay-method.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-d); font-weight: 650; }

/* 小票 */
.receipt-paper {
  background: #fff; border-radius: 14px; padding: 18px 16px;
  box-shadow: var(--shadow);
  font-size: 12.5px;
  margin-bottom: 12px;
}
.receipt-paper .rp-head { text-align: center; padding-bottom: 12px; border-bottom: 1px dashed #d8dee7; }
.receipt-paper .rp-shop { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.receipt-paper .rp-meta { color: var(--ink-3); font-size: 11px; margin-top: 4px; }
.receipt-paper .rp-row { display: flex; justify-content: space-between; padding: 6px 0; gap: 10px; }
.receipt-paper .rp-items { padding: 10px 0; border-bottom: 1px dashed #d8dee7; }
.receipt-paper .rp-item { display: flex; justify-content: space-between; padding: 5px 0; gap: 8px; }
.receipt-paper .rp-item .n { flex: 1; }
.receipt-paper .rp-item .q { color: var(--ink-2); font-size: 11.5px; }
.receipt-paper .rp-foot { padding-top: 10px; }
.receipt-paper .rp-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.receipt-paper .rp-total .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.receipt-paper .rp-note { text-align: center; color: var(--ink-3); font-size: 11px; margin-top: 14px; line-height: 1.6; }

/* ---------------- 列表 / 详情 ---------------- */
.list-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-box { background: #fff; border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow); }
.stat-box .sb-l { font-size: 11.5px; color: var(--ink-2); }
.stat-box .sb-v { font-size: 20px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.stat-box .sb-v.green { color: var(--primary-d); }
.stat-box .sb-v.orange { color: #d1500f; }
.stat-box .sb-v.red { color: var(--danger); }

.detail-hero {
  background: linear-gradient(140deg, #12b886, #0b9e6f);
  border-radius: 18px; padding: 16px; color: #fff; margin-bottom: 12px;
  box-shadow: 0 12px 26px -14px rgba(11, 158, 111, .8);
}
.detail-hero.blue { background: linear-gradient(140deg, #4d9bff, #2f80ed); box-shadow: 0 12px 26px -14px rgba(47, 128, 237, .8); }
.detail-hero .dh-l { font-size: 11.5px; opacity: .8; }
.detail-hero .dh-v { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.detail-hero .dh-row { display: flex; gap: 24px; margin-top: 12px; }
.detail-hero .dh-row .k { font-size: 10.5px; opacity: .72; }
.detail-hero .dh-row .v { font-size: 13px; font-weight: 600; margin-top: 1px; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar-col .bar {
  width: 100%; max-width: 26px; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #4fd1a5, #12b886);
  min-height: 3px; transition: height .4s ease;
}
.bar-col .bar.zero { background: #eef1f5; }
.bar-col .bl { font-size: 9.5px; color: var(--ink-3); }
.bar-col .bv { font-size: 9px; color: var(--ink-3); white-space: nowrap; }

.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: 0; }
.rank-no { width: 18px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; flex: none; }
.rank-no.top { color: var(--orange); }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { height: 4px; border-radius: 2px; background: #f0f2f5; margin-top: 5px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #4fd1a5, #12b886); }
.rank-val { flex: none; text-align: right; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rank-val small { display: block; font-size: 10px; color: var(--ink-3); font-weight: 400; }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .e-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: #fff; display: grid; place-items: center; color: #c3cad4; box-shadow: var(--shadow); }
.empty p { font-size: 13px; }
.empty .btn { margin-top: 14px; }

.fab {
  position: absolute; right: 16px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
  width: 50px; height: 50px; border-radius: 17px;
  background: linear-gradient(135deg, #12b886, #0b9e6f); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(11, 158, 111, .75);
  z-index: 6;
}
.fab:active { transform: scale(.96); }

.bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; z-index: 7;
}
.bottom-bar .btn { flex: 1; }

/* ---------------- 弹层 ---------------- */
.mask {
  position: absolute; inset: 0; background: rgba(16, 24, 40, .45);
  z-index: 40;
  display: flex; align-items: flex-end;
}
.mask.anim { animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-height: 82%; background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.modal.anim { animation: sheetUp .24s cubic-bezier(.32, .72, .28, 1); }
@keyframes sheetUp { from { transform: translateY(40%); } to { transform: none; } }
.modal-head { display: flex; align-items: center; padding: 14px 16px 10px; gap: 8px; flex: none; }
.modal-head h3 { flex: 1; font-size: 15px; font-weight: 650; }
.modal-head .close { color: var(--ink-3); font-size: 20px; line-height: 1; width: 30px; height: 30px; display: grid; place-items: center; }
.modal-body { overflow-y: auto; padding: 0 16px 12px; flex: 1; }
.modal-foot { padding: 10px 16px 14px; flex: none; }
.modal.center { border-radius: 18px; max-width: 320px; margin: auto; animation: pop .18s ease; padding-bottom: 0; }
.modal.center:not(.anim) { animation: none; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.mask.center-mask { align-items: center; padding: 24px; }
.confirm-text { padding: 4px 4px 12px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.toast-wrap { position: fixed; left: 0; right: 0; top: 42%; z-index: 9999; display: flex; justify-content: center; pointer-events: none; }
.toast {
  max-width: 78%; background: rgba(16, 24, 40, .9); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  text-align: center; animation: toastIn .2s ease; backdrop-filter: blur(6px);
}
.toast.err { background: rgba(190, 40, 45, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

/* 商品选择行 */
.pick-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.pick-row:last-child { border-bottom: 0; }
.pick-row .pr-main { flex: 1; min-width: 0; }
.pick-row .pr-name { font-size: 13.5px; font-weight: 600; }
.pick-row .pr-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.pick-row .pr-add { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-d); display: grid; place-items: center; flex: none; }

.guide { font-size: 13px; line-height: 1.75; color: #344054; }
.guide h3 { font-size: 14px; margin: 16px 0 6px; color: var(--ink); }
.guide h3:first-child { margin-top: 0; }
.guide p { margin: 6px 0; }
.guide li { margin: 4px 0 4px 18px; list-style: disc; }
.guide code { background: #f2f4f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 打印（具体排版写在 app.js 的 PRINT_CSS 里，安卓打印和网页打印共用一份） */
#print-root { display: none; }
@media print {
  body { background: #fff; }
  #root, .toast-wrap { display: none !important; }
  #print-root { display: block !important; }
}

/* ---------------- 桌面端外框 ---------------- */
@media (min-width: 900px) {
  body { background: #eef2f6; display: block; padding: 0; }

  #root {
    width: 100%; height: 100vh;
    border-radius: 0; box-shadow: none; overflow: hidden;
  }
  .desk-hint { display: none; }

  /* ---------- 外框：左导航 + 右内容 ---------- */
  .app.desk { flex-direction: row; background: #fff; }
  .main {
    flex: 1; min-width: 0; position: relative;
    display: flex; flex-direction: column;
    background: var(--bg); overflow: hidden;
  }

  .side {
    width: 218px; flex: none;
    display: flex; flex-direction: column;
    background: #fff; border-right: 1px solid var(--line);
    padding: 18px 12px 12px;
  }
  .side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
  .sb-logo {
    width: 38px; height: 38px; border-radius: 12px; flex: none;
    background: linear-gradient(135deg, #12b886, #0b9e6f); color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 6px 14px -6px rgba(11, 158, 111, .7);
  }
  .sb-logo svg { width: 20px; height: 20px; }
  .sb-txt { min-width: 0; }
  .sb-name { font-weight: 700; font-size: 15px; }
  .sb-shop {
    font-size: 11px; color: var(--ink-3); margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
  }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .sn-item {
    display: flex; align-items: center; gap: 10px;
    height: 40px; padding: 0 10px; border-radius: 10px;
    color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-align: left;
  }
  .sn-item svg { width: 18px; height: 18px; }
  .sn-item:hover { background: #f6f8fa; color: var(--ink); }
  .sn-item.active { background: var(--primary-soft); color: var(--primary-d); font-weight: 650; }
  .side-sep { font-size: 11px; color: var(--ink-3); margin: 18px 10px 8px; letter-spacing: 1px; }
  .side-nav-sm .sn-item { height: 34px; font-size: 12.5px; color: var(--ink-3); }
  .side-nav-sm .sn-item svg { width: 16px; height: 16px; }
  .side-foot {
    margin-top: auto; display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--ink-2); padding: 10px; border-radius: 10px; cursor: pointer;
  }
  .side-foot:hover { background: #f6f8fa; }

  .desk-top {
    position: sticky; top: 0; z-index: 6; flex: none;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 26px; min-height: 64px;
    display: flex; align-items: center; gap: 10px;
  }
  .desk-top .tb-title { font-size: 18px; }
  .desk-top .tb-sub { margin-top: 2px; }

  .desk .view {
    width: 100%; max-width: 1180px; margin: 0 auto;
    padding: 22px 26px 40px;
  }
  .desk .form-page .view { padding-left: 26px; padding-right: 26px; }
  .desk .page-view { position: absolute; inset: 0; }
  .desk .page-view .topbar { padding: 14px 26px; }
  .desk .page-view .view { max-width: 980px; }
  .desk .form-page .view { max-width: 720px; }

  /* ---------- 首页 ---------- */
  .desk .hero {
    margin: 0 0 12px; padding: 26px 28px;
    border-radius: 20px; box-shadow: 0 14px 30px -18px rgba(11, 158, 111, .9);
  }
  .desk .hero-head { display: none; }
  .desk .hero-amount .v { font-size: 40px; }
  .desk .hero-card {
    margin: 0 0 14px; border: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 18px 6px;
  }
  .desk .hero-card .hc-v { font-size: 20px; }
  .desk .quick-grid { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .desk .quick { padding: 14px 4px 10px; }
  .desk .quick .qi { width: 46px; height: 46px; border-radius: 15px; }
  .desk .quick .ql { font-size: 12px; }
  .desk .dash-cols {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
    gap: 18px; align-items: start;
  }

  /* ---------- 开单 ---------- */
  .desk .sell-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px; align-items: start;
  }
  .desk .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .desk .fab { display: none; }
  .desk .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .desk .cartbar { display: none; }
  .desk .sell-cart {
    position: sticky; top: 0;
    background: #fff; border-radius: 16px; box-shadow: var(--shadow);
    padding: 14px; min-height: 220px;
  }

  /* ---------- 列表 / 页面 ---------- */
  .desk .list-card .row { padding: 14px 18px; }
  .desk .card { padding: 16px; }
  .desk .section-head { padding-bottom: 10px; }

  .sc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; }
  .sc-list { max-height: calc(100vh - 380px); overflow: auto; margin: 0 -4px 6px; padding: 0 4px; }
  .sc-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
  .sc-item:last-child { border-bottom: 0; }
  .sc-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; }
  .sc-amt { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }
  .sc-total {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line);
    font-size: 13px; color: var(--ink-2);
  }
  .sc-total b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .sc-empty {
    text-align: center; color: var(--ink-3); padding: 44px 0;
    font-size: 13px; display: flex; flex-direction: column; gap: 6px; align-items: center;
  }
  .sc-empty svg { width: 34px; height: 34px; opacity: .45; }
  .btn-ghost { background: transparent; color: var(--ink-2); }
  .dash-cols { display: block; }
}
.desk-hint { display: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; font-size: 11px; color: #98a2b3; }

/* ---------------- 补充组件 ---------------- */
.hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.hero-shop { font-size: 15px; font-weight: 600; margin-top: 3px; letter-spacing: .2px; }
.hero-help {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .18); color: #fff;
  display: grid; place-items: center;
}
.hero-help svg { width: 17px; height: 17px; }

.success-head { text-align: center; padding: 22px 0 18px; }
.suc-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, #2ec4a0, #0b9e6f); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px -8px rgba(11, 158, 111, .85);
}
.suc-icon svg { width: 28px; height: 28px; stroke-width: 2.6; }
.suc-t { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.suc-s { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

.notice-warn, .notice-info {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: 11px;
  font-size: 12px; line-height: 1.55;
}
.notice-warn { background: var(--warn-soft); color: #b54708; }
.notice-info { background: var(--blue-soft); color: #1d4ed8; }
.notice-warn svg, .notice-info svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.kv-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .row-sub { padding: 0; }
.group-head {
  display: flex; justify-content: space-between;
  padding: 8px 14px; background: #fafbfc;
  font-size: 11px; color: var(--ink-3); border-bottom: 1px solid var(--line);
}
.field .chips { padding-bottom: 0; }
.card-title .more { cursor: pointer; }

.icon-btn svg { width: 20px; height: 20px; }
.chev svg { width: 15px; height: 15px; }
.btn svg { width: 17px; height: 17px; }
.pc-add svg { width: 15px; height: 15px; }
.sh-icon svg { width: 18px; height: 18px; }
.qi svg { width: 20px; height: 20px; }
.ck-del svg { width: 15px; height: 15px; }
.empty .e-icon svg { width: 26px; height: 26px; }
.btn-sm svg { width: 15px; height: 15px; }
.modal .modal-head h3 { padding-left: 2px; }

.ico-sm { display: inline-flex; width: 14px; height: 14px; flex: none; }
.ico-sm svg { width: 14px; height: 14px; }
.addr-line { margin-top: 10px; display: flex; gap: 5px; align-items: center; }

/* iOS 上输入框小于 16px 会自动放大页面，这里单独兜一下 */
@supports (-webkit-touch-callout: none) {
  .input, .textarea, .search input, .stepper input, .ck-price { font-size: 16px; }
}

/* ---------------- 云端同步 ---------------- */
.sync-strip {
  display: flex; align-items: center; gap: 8px;
  margin: 0 2px 12px; padding: 9px 12px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  font-size: 12px; color: var(--ink-2);
}
.ss-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ss-dot.ok { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ss-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.ss-dot.off { background: #c3cad4; }
.ss-text { flex: 1; min-width: 0; }
.ss-time { color: var(--ink-3); font-size: 11px; flex: none; }
.sync-intro { display: flex; gap: 12px; align-items: flex-start; }
.si-icon {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--primary-soft); color: var(--primary-d);
  display: grid; place-items: center;
}
.si-icon svg { width: 22px; height: 22px; }
.si-t { font-weight: 650; font-size: 15px; margin-bottom: 3px; }

.ios-tip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 2px 12px; padding: 11px 12px;
  background: #eaf2fe; border-radius: 13px; color: #1d4ed8;
}
.ios-tip .it-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.ios-tip .it-icon svg { width: 20px; height: 20px; }
.ios-tip .it-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; }
.ios-tip .it-body .tiny { color: #3b6ccc; margin-top: 1px; }
.ios-tip .it-close { flex: none; font-size: 11.5px; color: #1d4ed8; font-weight: 600; padding: 4px 6px; }

.steps .step { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps .step:last-child { border-bottom: 0; }
.steps .n {
  width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.steps .t { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.steps .t b { font-weight: 650; }
.url-box {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px 10px;
  background: #f8fafb; border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 12px; color: var(--ink-2); word-break: break-all;
}
.share-hint {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; background: #eef1f5; border-radius: 6px;
  font-size: 11.5px; color: var(--ink);
}
.share-hint svg { width: 13px; height: 13px; }

/* ---------------- 桌面：结账两栏 / 底部按钮 ---------------- */
.ck-cols { display: block; }
.ck-submit-inline { display: none; height: 48px; font-size: 15px; margin-top: 12px; }
@media (min-width: 900px) {
  .desk .ck-cols {
    display: grid; grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px; align-items: start;
  }
  .desk .ck-col-side { position: sticky; top: 0; }
  .desk .ck-submit-inline { display: flex; }
  .desk .bottom-bar { padding: 12px 26px; }
  .desk .bottom-bar .btn { max-width: 420px; margin: 0 auto; }
}

.hs-link { cursor: pointer; }
.hs-link:active { opacity: .82; }

.debt-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.debt-amt { font-size: 16px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.debt-btn { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 8px; }

.hero-note { font-size: 11.5px; color: rgba(255, 255, 255, .78); margin-top: 3px; position: relative; z-index: 1; }

/* ---------------- 蒙牛标识 / 小票二维码 ---------------- */
.mn-tag {
  display: inline-block;
  background: linear-gradient(135deg, #e2231a, #c1121f);
  color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 1px 5px; border-radius: 5px; vertical-align: 2px; margin-right: 5px;
}
.hero .mn-tag { background: #fff; color: #d81e06; }
.receipt-paper .rp-brand { font-size: 10.5px; color: var(--ink-3); letter-spacing: .5px; margin-bottom: 4px; }
.receipt-paper .rp-brand .mn-tag { font-size: 9px; padding: 0 4px; margin-right: 4px; }
.receipt-paper .rp-qr {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 10px; border-top: 1px dashed #d8dee7;
}
.receipt-paper .rp-qr img { width: 64px; height: 64px; display: block; border-radius: 4px; }
.receipt-paper .rp-qr-t { font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.receipt-paper .rp-qr-t b { display: block; font-size: 12.5px; color: var(--ink); }
.stat-box.tap, .hero-note[data-act], .card-title .tiny[data-act] { cursor: pointer; }
.sb-logo.mn { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; background: linear-gradient(135deg, #e2231a, #b60f1a); box-shadow: 0 6px 14px -6px rgba(182, 15, 26, .7); }

/* ---------------- 开单：按支加货 / 侧栏购物车可改可删 ---------------- */
.prod-card .pc-btns { display: flex; align-items: center; gap: 6px; flex: none; }
.prod-card .pc-unit {
  height: 26px; padding: 0 8px; border-radius: 9px;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line-2);
  font-size: 11px; font-weight: 600; line-height: 1;
}
.prod-card .pc-unit:active { background: var(--primary-soft); color: var(--primary-d); border-color: var(--primary-soft); }
.prod-card .pc-add { position: static; flex: none; }
.sc-ctrl { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; }
.sc-ctrl button { width: 24px; height: 24px; border-radius: 7px; background: #f2f4f7; color: var(--ink-2); display: grid; place-items: center; font-size: 15px; line-height: 1; }
.sc-ctrl button:active { background: var(--primary-soft); color: var(--primary-d); }
.sc-ctrl b { min-width: 26px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.sc-del { width: 24px; height: 24px; border-radius: 7px; color: var(--ink-3); display: grid; place-items: center; }
.sc-del svg { width: 14px; height: 14px; }
.sc-del:active { background: #fdecec; color: var(--danger); }
.ck-del { width: 32px; height: 32px; border-radius: 9px; margin: -5px -5px 0 0; }
.ck-del:active { background: #fdecec; color: var(--danger); }
.prod-card .pc-name.has-badge { padding-right: 42px; }
.prod-card .pc-spec { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-card .pc-stock { white-space: nowrap; }
.prod-card .pc-unit { padding: 0 7px; }
.receipt-paper .rp-cap { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; text-align: right; }
/* 打印设置页 */
.pp-check {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-2); color: #fff; display: grid; place-items: center;
}
.pp-check.on { background: var(--primary); border-color: var(--primary); }
.pp-check svg { width: 14px; height: 14px; }
.row-on { background: var(--primary-soft); }

/* ---------------- 识别开单 ---------------- */
.sell-search { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sell-search .search { flex: 1; margin-bottom: 0; }
.scan-btn { flex: none; height: 38px; padding: 0 12px; gap: 4px; white-space: nowrap; }
.scan-btn svg { width: 15px; height: 15px; }
.imp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-tools .btn { display: inline-flex; align-items: center; gap: 5px; }
.imp-tools .btn svg { width: 14px; height: 14px; }
.imp-img { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.imp-img img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------------- 全部链接 ---------------- */
.links-foot { text-align: center; margin: 2px 0 18px; }
.links-foot .lf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; color: var(--ink-3);
  font-size: 12px; font-family: inherit; padding: 9px 14px; border-radius: 10px;
}
.links-foot .lf-btn svg { width: 14px; height: 14px; }
.links-foot .lf-btn:active { background: #e9eef2; }
.links-base { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.links-base b { font-size: 13px; word-break: break-all; }
.link-copy {
  flex: none; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 11.5px; font-family: inherit; padding: 5px 10px; border-radius: 8px;
}
.link-copy:active { background: #f2f5f8; }

/* ---------------- 开单：加货浮层 / 购物车浮层 ---------------- */
.prod-card .pc-add { border: 0; padding: 0; cursor: pointer; }
.prod-card .pc-add:active { transform: scale(.94); }
.cb-bag { width: 28px; height: 28px; display: grid; place-items: center; color: #7ef0c4; flex: none; }
.cb-bag svg { width: 19px; height: 19px; }

.cs-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cs-item:last-child { border-bottom: 0; }
.cs-top { display: flex; align-items: flex-start; gap: 8px; }
.cs-name { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.cs-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.cs-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cs-amt { margin-left: auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.add-qty {
  display: flex; align-items: center; margin-top: 16px;
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff;
}
.add-qty button { width: 46px; height: 46px; display: grid; place-items: center; font-size: 20px; color: var(--ink-2); }
.add-qty button:active { background: #f2f4f7; }
.add-qty input {
  flex: 1; min-width: 0; height: 46px; border: 0; text-align: center; outline: none;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent;
}
.add-qty .tiny { padding-right: 12px; }
.modal-body .unit-toggle button { flex: 1; height: 32px; font-size: 13px; }
.cs-ctrl .unit-toggle { flex: none; }
.cs-ctrl .unit-toggle button { flex: none; padding: 0 12px; min-width: 42px; }

/* 更新提示 */
.upd-notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.upd-notes li { margin-bottom: 2px; }

/* 电脑端：把滚动条露出来，否则长列表看不出能滚 */
@media (min-width: 900px) {
  .desk .view::-webkit-scrollbar { width: 10px; height: 10px; }
  .desk .view::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 3px solid var(--bg); }
  .desk .view::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
  .desk .view::-webkit-scrollbar-track { background: transparent; }
  .desk .view { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
}

/* ---------------- 客户扫码下单 / 店铺二维码 ---------------- */
.web-alert {
  display: flex; align-items: center; gap: 11px;
  margin: 0 0 12px; padding: 12px 14px;
  background: linear-gradient(135deg, #fff8e8, #fffdf6);
  border: 1px solid #ffe3a3; border-radius: var(--radius);
  box-shadow: 0 8px 20px -16px rgba(181, 71, 8, .55);
  cursor: pointer;
}
.web-alert:active { transform: scale(.995); }
.wa-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: #fff1cf; color: #b54708;
}
.wa-ico svg { width: 20px; height: 20px; }
.wa-main { flex: 1; min-width: 0; }
.wa-main b { display: block; font-size: 14px; line-height: 1.35; }
.wa-sub { font-size: 11.5px; color: #8a6d00; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-go { flex: none; font-size: 12.5px; font-weight: 700; color: #b54708; }
.wa-go em { font-style: normal; }

.web-head { display: flex; align-items: center; gap: 12px; }
.wh-main { flex: 1; min-width: 0; }
.wh-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }

.wo-card { padding: 13px 14px; cursor: pointer; }
.wo-top { display: flex; align-items: flex-start; gap: 8px; }
.wo-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.wo-time { flex: none; font-size: 11.5px; color: var(--ink-3); }
.wo-sub { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-items {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
  margin-top: 8px; padding: 8px 10px; background: #f8fafb; border-radius: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wo-bot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.wo-amt { flex: 1; font-size: 17px; font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; }
.wo-amt span { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.wo-acts { display: flex; gap: 8px; flex: none; }

.wo-dhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wo-dno { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wo-dstate { font-size: 15px; font-weight: 700; margin-top: 8px; }
.wo-dcust { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.wo-tel { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-d); font-weight: 650; font-size: 14px; }
.wo-tel svg { width: 15px; height: 15px; }

.wo-line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wo-lname { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.wo-lqty { flex: none; text-align: right; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.wo-lamt { flex: none; width: 78px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.wo-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 14px; font-size: 13px; }
.wo-total b { font-size: 19px; color: var(--danger); font-variant-numeric: tabular-nums; }

.qr-switch-row { display: flex; align-items: center; gap: 14px; }
.qr-switch-row > div { flex: 1; min-width: 0; }
.switch {
  flex: none; width: 48px; height: 28px; border-radius: 999px;
  background: #e4e7ec; position: relative; transition: background .18s;
}
.switch span {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(16, 24, 40, .25);
  transition: transform .18s;
}
.switch.on { background: var(--primary); }
.switch.on span { transform: translateX(20px); }

.qr-poster {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px 18px 18px; margin-bottom: 12px; text-align: center;
  border: 1px solid #eef1f4;
}
.qp-shop { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.qp-sub { font-size: 12px; color: var(--ink-2); letter-spacing: 2px; margin-top: 3px; }
.qp-qr { width: min(64vw, 250px); aspect-ratio: 1; margin: 16px auto 10px; }
.qp-qr svg { width: 100%; height: 100%; display: block; }
.qp-code { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.qp-foot {
  font-size: 12px; color: var(--ink-2); margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line-2);
}
@media (min-width: 900px) {
  .qr-poster { max-width: 420px; margin-left: auto; margin-right: auto; }
}


/* ---------------- 语音开单：悬浮球 + 动效 ---------------- */
.voice-fab {
  position: absolute; left: 50%; right: auto; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 86px);
  margin-left: -28px;
  width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; z-index: 7;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, #12b886, #0b9e6f 55%, #067a54);
  box-shadow: 0 10px 24px -10px rgba(11, 158, 111, .95), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .18s cubic-bezier(.3,.7,.3,1);
}
.voice-fab svg { width: 26px; height: 26px; position: relative; z-index: 2; }
.voice-fab.vf-dim { opacity: 0; transform: translateY(14px) scale(.8); pointer-events: none; }
.voice-fab { transition: opacity .22s ease, transform .28s cubic-bezier(.3,.7,.3,1); }
.voice-fab:active { transform: scale(.93); }
.voice-fab .vf-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(11, 158, 111, .55);
  animation: vfPulse 2.6s cubic-bezier(.2,.6,.3,1) infinite;
}
.voice-fab .vf-ring.r2 { animation-delay: 1.3s; }
@keyframes vfPulse {
  0%   { transform: scale(1);   opacity: .75; }
  70%  { transform: scale(1.75); opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}
.voice-fab.on {
  background: linear-gradient(150deg, #ff6b6b, #e5484d 60%, #c2312f);
  box-shadow: 0 10px 26px -10px rgba(229, 72, 77, .95), inset 0 1px 0 rgba(255,255,255,.3);
  animation: vfBeat .9s ease-in-out infinite;
}
.voice-fab.on .vf-ring { border-color: rgba(229, 72, 77, .6); animation-duration: 1s; }
@keyframes vfBeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* 弹层里的大麦克风 */
.voice-core {
  width: 78px; height: 78px; border-radius: 50%; border: 0; color: #fff; display: inline-grid; place-items: center;
  background: linear-gradient(150deg, #12b886, #0b9e6f 55%, #067a54);
  box-shadow: 0 10px 26px -10px rgba(11, 158, 111, .95), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .18s;
}
.voice-core svg { width: 34px; height: 34px; }
.voice-core.on { background: linear-gradient(150deg, #ff6b6b, #e5484d 60%, #c2312f); animation: vfBeat .9s ease-in-out infinite; }

/* 结算页：客户 / 收款 两块加色块，一眼看到 */
.hl-cust {
  background: linear-gradient(135deg, #fff7e6, #fffdf7) !important;
  border: 1px solid #ffe0a3 !important;
  box-shadow: 0 6px 18px -12px rgba(250, 173, 20, .55) !important;
}
.hl-cust .row-title { color: #8a5a00; }
.hl-pay {
  background: linear-gradient(135deg, #eafaf3, #f6fffb) !important;
  border: 1px solid #b9ecd6 !important;
  box-shadow: 0 8px 22px -16px rgba(11, 158, 111, .7) !important;
}
.hl-pay .card-title h3 { color: var(--primary-d); }
.credit-tag { background: #fff; }

/* 票据底部收款状态水印 */
.rp-stamp {
  margin: 10px auto 0; padding: 5px 0; text-align: center;
  font-size: 12px; letter-spacing: 3px; border-radius: 6px;
  border-top: 1px dashed var(--line-2);
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.018) 0 6px, transparent 6px 12px);
}
.rp-stamp.stamp-ok { color: var(--primary-d); }
.rp-stamp.stamp-part { color: #c2410c; }
.rp-stamp.stamp-void { color: var(--ink-3); }

/* 全部订单：搜索框 + 筛选入口 */
.ord-bar { display: flex; gap: 8px; align-items: center; padding: 0 0 8px; }
.ord-bar .search { flex: 1; }
.ord-filter {
  flex: none; height: 42px; min-width: 46px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600;
}
.ord-filter svg { width: 17px; height: 17px; }
.ord-filter.on { border-color: var(--primary); color: var(--primary-d); background: var(--primary-soft); }
.ord-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 0 0 8px; }
.ord-tag { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-d); }
.ord-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* 全部订单：搜索框 + 筛选入口 */
.ord-bar { display: flex; gap: 8px; align-items: center; padding: 0 0 8px; }
.ord-bar .search { flex: 1; }
.ord-filter {
  flex: none; height: 42px; min-width: 46px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px; font-weight: 600;
}
.ord-filter svg { width: 17px; height: 17px; }
.ord-filter.on { border-color: var(--primary); color: var(--primary-d); background: var(--primary-soft); }
.ord-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 0 0 8px; }
.ord-tag { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-d); }
.ord-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* 送货单：客户/欠款放大、商品分层、共计突出 */
.rp-cust { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 10px 0 8px; padding-bottom: 8px; border-bottom: 2px solid #111; }
.rp-cust .c-name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.rp-cust .c-debt { font-size: 12px; color: var(--danger); text-align: right; }
.rp-cust .c-debt b { font-size: 18px; font-family: Georgia, serif; margin-left: 2px; }
.rp-cust .c-debt.ok { color: var(--ink-3); }
.rp-items .rp-item { padding: 7px 0; }
.rp-items .rp-item.alt { background: #fafbfc; }
.rp-items .rp-item .n { font-weight: 600; }
.rp-qty { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 2px; padding: 6px 10px; border-radius: 8px; background: #f1f5f9; }
.rp-qty span { font-size: 12px; color: var(--ink-2); }
.rp-qty b { font-size: 16px; letter-spacing: .5px; }

/* 送货单底部：二维码 + 收款方式并排 */
.rp-foot2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.rp-paybox { flex: none; min-width: 132px; text-align: right; padding: 8px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid #eef1f4; }
.rp-paybox .pb-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); line-height: 1.9; }
.rp-paybox .pb-row b { color: var(--ink); font-weight: 700; }
.rp-paybox .pb-stamp { margin-top: 4px; font-size: 15px; font-weight: 800; letter-spacing: 2px; }
.rp-paybox .pb-stamp.ok { color: var(--primary-d); }
.rp-paybox .pb-stamp.part { color: #c2410c; }

/* ===== 送货单（开单结果页）新样式 ===== */
.rc { display: flex; flex-direction: column; gap: 10px; }
.rc-card { background: #fff; border-radius: 14px; padding: 14px 16px; }
.rc-custrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rc-cust { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.rc-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex: none; }
.rc-badge.ok { background: var(--primary-soft); color: var(--primary-d); }
.rc-badge.warn { background: var(--warn-soft); color: #b45309; }
.rc-badge.void { background: #f2f4f7; color: var(--ink-3); }
.rc-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.rc-label { font-size: 12.5px; color: var(--ink-2); margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.rc-chip { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--warn-soft); color: #b45309; }
.rc-amount { font-size: 34px; font-weight: 800; letter-spacing: -1px; font-family: Georgia, "Songti SC", serif; margin-top: 2px; }
.rc-sub { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rc-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.rc-h b { font-size: 15px; }
.rc-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rc-item:last-child { border-bottom: 0; }
.rc-item-main { min-width: 0; }
.rc-item-n { font-size: 14.5px; font-weight: 650; }
.rc-item-q { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.rc-item-a { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.rc-sum { border-top: 1px solid var(--line-2); border-bottom: 0; margin-top: 2px; }
.rc-sum .rc-item-n { font-weight: 700; }
.rc-mini { padding: 12px 16px; }
.rc-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.rc-row b { color: var(--ink); }
.rc-row b.ok { color: var(--primary-d); }
.rc-tiny { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.rc-qr { display: flex; align-items: center; gap: 12px; }
.rc-qr img { width: 64px; height: 64px; border-radius: 8px; }
.rc-qr-t { font-size: 14px; font-weight: 700; }
.rc-note { font-size: 12px; color: var(--ink-2); padding: 0 4px; }
