:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #111318;
  --text-2: #454a54;
  --muted: #7a828f;
  --line: #e8eaef;
  --primary: #2f6bff;
  --primary-2: #1f56e0;
  --primary-soft: #eaf0ff;
  --income: #0e9f6e;
  --income-soft: #e7f7f0;
  --expense: #e02424;
  --expense-soft: #fdecec;
  --warn: #f59e0b;
  --warn-soft: #fff6e5;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 -8px 40px rgba(16, 24, 40, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 10px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(242, 244, 247, .92));
  backdrop-filter: saturate(180%) blur(12px);
}
.topbar .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; overflow: hidden;
  background: #0b0b0f; box-shadow: 0 4px 12px rgba(16, 24, 40, .22);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar .date-pill {
  font-size: 12px; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}

.content { flex: 1; padding: 4px 16px calc(84px + var(--safe-b)); max-width: 720px; width: 100%; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 14px; font-weight: 700; letter-spacing: -.1px; }
.card-sub { font-size: 12px; color: var(--muted); }
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 4px 8px; }

/* ---------- 今日概览 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2f6bff 0%, #1f4fd8 55%, #1b3fb0 100%);
  color: #fff; border-radius: 20px; padding: 18px; margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(31, 79, 216, .28);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -50px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 70%);
}
.hero .hero-label { font-size: 12px; opacity: .8; letter-spacing: .3px; }
.hero .hero-main { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.hero .hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero .hero-item { background: rgba(255,255,255,.14); border-radius: 12px; padding: 8px 10px; }
.hero .hero-item .k { font-size: 11px; opacity: .82; }
.hero .hero-item .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- 快捷入口 ---------- */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.action {
  background: var(--surface); border-radius: var(--radius-sm); padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.action:active { transform: scale(.97); }
.action .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.action .ico svg { width: 19px; height: 19px; }
.action .t { font-size: 13px; font-weight: 600; }
.action .d { font-size: 11px; color: var(--muted); margin-top: -4px; }
.ico.sale { background: var(--income-soft); color: var(--income); }
.ico.purchase { background: var(--primary-soft); color: var(--primary); }
.ico.gift { background: #f3ecff; color: #7c4dff; }
.ico.fee { background: var(--warn-soft); color: #d97706; }
.ico.expense { background: var(--expense-soft); color: var(--expense); }
.ico.stocktake { background: #e8f6ff; color: #0b83c9; }

/* ---------- 常卖品 ---------- */
.grid-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pchip {
  background: var(--surface); border-radius: 12px; padding: 10px; text-align: left;
  box-shadow: var(--shadow); border: 1px solid transparent; transition: transform .12s;
  min-height: 66px; display: flex; flex-direction: column; justify-content: space-between;
}
.pchip:active { transform: scale(.97); }
.pchip .n { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pchip .p { font-size: 13px; color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.pchip .s { font-size: 11px; color: var(--muted); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.row-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: none; }
.row-item .avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-amount { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row-amount.in { color: var(--income); }
.row-amount.out { color: var(--expense); }
.row-amount.zero { color: var(--muted); }
.voided { opacity: .45; text-decoration: line-through; }

.day-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 4px 6px; font-size: 12px; color: var(--muted);
}
.day-head .d { font-weight: 600; color: var(--text-2); font-size: 13px; }
.day-head .sum { font-variant-numeric: tabular-nums; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 18px; border-radius: 13px; font-size: 15px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(47, 107, 255, .28); }
.btn.primary:active { background: var(--primary-2); }
.btn.danger { background: var(--expense-soft); color: var(--expense); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: block; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 0 14px; font-size: 15px; outline: none;
  transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 70px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); background: #fff; }
.input.amount { font-size: 24px; font-weight: 700; height: 58px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 13px; color: var(--text-2); font-weight: 500;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.mini { padding: 5px 10px; font-size: 12px; }

.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented button {
  flex: 1; height: 36px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.segmented button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- 统计块 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.kpi .k { font-size: 11px; color: var(--muted); }
.kpi .v { font-size: 18px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.kpi .v.in { color: var(--income); }
.kpi .v.out { color: var(--expense); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 74px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--primary); }
.bar-fill.in { background: var(--income); }
.bar-fill.out { background: var(--expense); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.trend { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding-top: 8px; }
.trend .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; height: 100%; }
.trend .b i { display: block; border-radius: 3px 3px 0 0; background: var(--income); min-height: 2px; }
.trend .b i.e { background: var(--expense); opacity: .75; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + var(--safe-b));
  max-width: 720px; margin: 0 auto;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  height: 50px; justify-content: center; color: var(--muted); font-size: 10.5px; font-weight: 500;
  border-radius: 12px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { filter: drop-shadow(0 2px 6px rgba(47,107,255,.35)); }

/* ---------- 弹出层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .42); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .16s ease;
}
.sheet {
  width: 100%; max-width: 720px; max-height: 92vh; background: var(--surface);
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideUp .22s cubic-bezier(.22,.9,.3,1);
  padding-bottom: var(--safe-b);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px; flex: none;
}
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-close { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.sheet-body { overflow-y: auto; padding: 4px 18px 12px; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 18px 16px; display: flex; gap: 10px; flex: none; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.grabber { width: 36px; height: 4px; border-radius: 99px; background: var(--line); margin: 8px auto 0; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(30px); opacity: .6 } to { transform: translateY(0); opacity: 1 } }

/* ---------- 选择商品 ---------- */
.picker-search { position: sticky; top: 0; background: var(--surface); padding: 8px 0; z-index: 2; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 600; }
.cart-item .ci-price { font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; font-size: 18px; color: var(--text-2); display: grid; place-items: center; }
.stepper input { width: 44px; height: 34px; border: none; background: transparent; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-input { width: 84px; height: 34px; border: 1px solid var(--line); border-radius: 9px; text-align: right; padding: 0 8px; background: var(--surface-2); font-variant-numeric: tabular-nums; }

/* ---------- 空白 / 加载 ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: .35; }
.skeleton { background: linear-gradient(90deg, #eef0f4 25%, #f6f7f9 37%, #eef0f4 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; height: 14px; margin: 8px 0; }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  justify-content: center; padding: 28px; width: 100%; max-width: 420px; margin: 0 auto;
}
.login-logo { width: 84px; height: 84px; border-radius: 24px; object-fit: cover; background: #0b0b0f; box-shadow: 0 14px 30px rgba(16,24,40,.28); margin: 0 auto 18px; display: block; }
.login-title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; text-align: center; }
.login-sub { color: var(--muted); font-size: 13px; margin: 4px 0 26px; text-align: center; }
.login-card { background: var(--surface); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.login-foot { text-align: center; color: var(--muted); font-size: 11px; margin-top: 22px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%) translateY(12px);
  background: #1d2433; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 100; max-width: 86vw; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b42318; }

/* ---------- 杂项 ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--surface-2); color: var(--text-2); }
.tag.green { background: var(--income-soft); color: var(--income); }
.tag.red { background: var(--expense-soft); color: var(--expense); }
.tag.amber { background: var(--warn-soft); color: #b45309; }
.tag.blue { background: var(--primary-soft); color: var(--primary); }
.warn-box { background: var(--warn-soft); border: 1px solid #fde3b3; color: #8a5300; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; }
.info-box { background: var(--primary-soft); border: 1px solid #d6e2ff; color: #1b3fb0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; }
.right { text-align: right; }
.sticky-filters { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 8px 0; }

@media (min-width: 560px) {
  .actions { grid-template-columns: repeat(6, 1fr); }
  .grid-products { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 日期导航 ---------- */
.datenav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; position: relative; }
.datenav-btn {
  width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); color: var(--text-2); font-size: 18px; display: grid; place-items: center;
}
.datenav-title {
  flex: 1; font-size: 15px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; gap: 6px; color: var(--text); height: 38px;
}
.datenav-cal { color: var(--muted); display: inline-flex; }
.datenav-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 50%; }
.badge-low { display: inline-block; margin-left: 6px; }
.star-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.star-btn.on { color: #f59e0b; background: #fff6e5; }

/* ---------- 比赛 / 开关 ---------- */
.switch-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  background: var(--surface-2); border-radius: 12px; font-size: 13px; color: var(--text-2);
}
.switch-row input[type="checkbox"] {
  width: 20px; height: 20px; margin: 0; accent-color: var(--primary); flex: none;
}
.ico.event { background: #fff4e5; color: #b45309; }

/* ==================== 2026-10-31 界面重构：更简洁的收银台风格 ==================== */
.content.home { padding-top: 10px; }

.home-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; }
.home-greet { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.home-date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.avatar-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 16px; display: grid; place-items: center;
}

.statbar {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 13px 6px; margin-bottom: 12px;
}
.statbar .stat { text-align: center; padding: 0 8px; border-right: 1px solid var(--line); }
.statbar .stat:last-child { border-right: none; }
.statbar .k { font-size: 11px; color: var(--muted); }
.statbar .v { font-size: 17px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.statbar .v.in { color: var(--income); }
.statbar .v.out { color: var(--expense); }

.sell-cta {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: linear-gradient(135deg, #2f6bff 0%, #1f4fd8 100%);
  color: #fff; border-radius: 16px; padding: 13px 16px; margin-bottom: 10px;
  box-shadow: 0 8px 22px rgba(47, 107, 255, .28);
  transition: transform .12s ease;
}
.sell-cta:active { transform: scale(.985); }
.sell-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
.sell-text { flex: 1; text-align: left; }
.sell-text b { font-size: 17px; font-weight: 700; }
.sell-text small { display: block; font-size: 11px; opacity: .82; margin-top: 2px; }
.sell-arrow { opacity: .75; display: flex; }

.mini-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.mini {
  background: var(--surface); border-radius: 13px; padding: 9px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  box-shadow: var(--shadow); font-size: 11.5px; font-weight: 600; color: var(--text-2);
}
.mini .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }

.grid-4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard {
  background: var(--surface); border-radius: 12px; padding: 10px;
  text-align: left; box-shadow: var(--shadow); min-height: 64px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.pcard .n {
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pcard .p { color: var(--primary); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.pcard .s { font-size: 10.5px; color: var(--muted); }

.notice-bar {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: var(--warn-soft); color: #8a5300; border-radius: 12px;
  padding: 9px 12px; font-size: 12.5px; margin-bottom: 8px; text-align: left;
}
.notice-bar span { flex: 1; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; }
.link { color: var(--primary); font-size: 12px; font-weight: 600; }

/* 收银台弹层 */
.pos-search { height: 42px; margin-bottom: 8px; }
.pos-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  max-height: 33vh; overflow-y: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch;
}
.pcell {
  background: var(--surface-2); border-radius: 11px; padding: 9px 10px;
  text-align: left; display: flex; flex-direction: column; gap: 3px;
}
.pcell:active { background: var(--primary-soft); }
.pcell .n {
  font-size: 12.5px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcell .d { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.pcell .d b { color: var(--primary); font-weight: 700; }

.pos-cart { margin-top: 4px; }
.pos-meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.cartbar { display: flex; align-items: center; gap: 12px; width: 100%; }
.cartbar-sum { flex: 1; min-width: 0; }
.cartbar-total { font-size: 22px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.sheet-foot .cartbar .btn { flex: 0 0 auto; min-width: 112px; }

/* 商品弹层：继续入库快捷入口 */
.quick-in {
  background: var(--primary-soft); border: 1px solid #d6e2ff; border-radius: 13px;
  padding: 10px 12px 9px; margin-bottom: 14px;
}
.quick-in .qi-title { font-size: 12.5px; font-weight: 700; color: #1b3fb0; margin-bottom: 9px; }
.quick-in .btn { flex: 1; }
.quick-in .btn.ghost { background: var(--surface); }

@media (min-width: 560px) {
  .mini-actions { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .pos-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 空状态更紧凑 + 列表更密 */
.empty { padding: 26px 16px; }
.empty .big { font-size: 26px; margin-bottom: 4px; }
.row-item { padding: 10px 4px; }
.row-item .avatar, .avatar { width: 33px; height: 33px; border-radius: 9px; font-size: 13px; }
.pcell.out { opacity: .42; }
.pcell.out:active { background: var(--surface-2); }

.home-id { display: flex; align-items: center; gap: 11px; }
.home-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: #0b0b0f; box-shadow: 0 4px 12px rgba(16,24,40,.18); }
