/* ==========================================================================
   酒水销售系统 · 全局样式
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --card: #171b24;
  --card-2: #1e2330;
  --card-3: #262c3b;
  --line: #2a3040;
  --line-soft: #222735;
  --text: #f4f1ea;
  --muted: #8b93a6;
  --muted-2: #646c7e;
  --gold: #d9b26f;
  --gold-soft: #f0d8a8;
  --gold-dim: rgba(217, 178, 111, 0.14);
  --wine: #a52a44;
  --wine-2: #d14063;
  --wine-dim: rgba(165, 42, 68, 0.18);
  --green: #42cf95;
  --green-dim: rgba(66, 207, 149, 0.13);
  --red: #ff6274;
  --red-dim: rgba(255, 98, 116, 0.13);
  --amber: #f0b94f;
  --amber-dim: rgba(240, 185, 79, 0.13);
  --blue: #74a7ff;
  --blue-dim: rgba(116, 167, 255, 0.13);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1000px 460px at 80% -8%, rgba(165, 42, 68, 0.20), transparent 62%),
    radial-gradient(760px 380px at 6% 4%, rgba(217, 178, 111, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.gold { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }
.warn { color: var(--amber); }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; }
.grow { flex: 1; min-width: 0; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------- 登录 ---------------------------------- */

.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + var(--safe-b));
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 34px 26px 28px;
  border-radius: 26px;
  background: linear-gradient(168deg, rgba(38, 44, 58, 0.92), rgba(19, 22, 30, 0.96));
  border: 1px solid rgba(217, 178, 111, 0.18);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-brand {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(145deg, #3a2a22, #221825);
  border: 1px solid rgba(217, 178, 111, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}

.login-sub {
  margin-top: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-form { margin-top: 26px; display: grid; gap: 14px; }

.login-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

.login-foot a { color: var(--muted); }
.login-foot a:hover { color: var(--gold); }

/* ---------------------------------- 应用壳 ---------------------------------- */

.shell {
  min-height: 100dvh;
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: calc(86px + var(--safe-b));
  position: relative;
}

@media (min-width: 900px) {
  body { background-attachment: fixed; }
  .shell {
    border-left: 1px solid rgba(255, 255, 255, 0.045);
    border-right: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(10, 12, 17, 0.55);
    min-height: 100dvh;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 12px;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.topbar-title { font-size: 19px; font-weight: 700; letter-spacing: 0.02em; }
.topbar-sub { margin-top: 1px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.05em; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }

.view { padding: 16px 16px 8px; animation: fade 0.28s ease; }

/* ---------------------------------- 底部导航 ---------------------------------- */

.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 780px;
  padding: 6px 10px calc(6px + var(--safe-b));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(14, 16, 23, 0.88);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 0 6px;
  border-radius: 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}

.tab svg { width: 22px; height: 22px; stroke-width: 1.8; }
.tab.active { color: var(--gold); background: linear-gradient(180deg, rgba(217, 178, 111, 0.10), rgba(217, 178, 111, 0.02)); }
.tab:active { transform: scale(0.96); }

/* ---------------------------------- 通用组件 ---------------------------------- */

.card {
  background: linear-gradient(165deg, rgba(30, 35, 48, 0.86), rgba(21, 25, 34, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.card-pad { padding: 16px; }
.card + .card { margin-top: 12px; }

.section { margin-top: 20px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 10px;
}
.section-title { font-size: 15px; font-weight: 650; letter-spacing: 0.02em; }
.section-more { margin-left: auto; font-size: 12px; color: var(--muted); }
.section-more:active { color: var(--gold); }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}
.row:last-child { border-bottom: 0; }
.row:active { background: rgba(255, 255, 255, 0.03); }

.field { display: grid; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; }
.field-hint { font-size: 11.5px; color: var(--muted-2); }

.input, .select, .textarea {
  width: 100%;
  background: rgba(10, 12, 18, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  font-size: 15px;
  color: var(--text);
}

.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(217, 178, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 178, 111, 0.10);
  background: rgba(10, 12, 18, 0.9);
}
.textarea { min-height: 78px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.input-group { display: flex; align-items: stretch; gap: 0; }
.input-group .input { border-radius: 12px 0 0 12px; }
.input-group .unit {
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 46px;
  background: rgba(18, 22, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.searchbar svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.searchbar input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 14.5px;
  color: var(--text);
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar .scan-btn { color: var(--gold); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--gold-dim); }
.searchbar .scan-btn svg { width: 17px; height: 17px; color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.12s, filter 0.18s, background 0.18s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, #b98f4b);
  color: #241a0d;
  box-shadow: 0 8px 22px rgba(217, 178, 111, 0.22);
}
.btn-wine { background: linear-gradient(135deg, #c33c5b, var(--wine)); color: #fff; box-shadow: 0 8px 22px rgba(165, 42, 68, 0.28); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255, 98, 116, 0.3); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { min-height: 50px; font-size: 16px; border-radius: 15px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--text);
  flex: none;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active { background: rgba(255, 255, 255, 0.1); }
.icon-btn.gold { color: var(--gold); border-color: rgba(217, 178, 111, 0.28); background: var(--gold-dim); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.green { background: var(--green-dim); color: var(--green); }
.badge.red { background: var(--red-dim); color: var(--red); }
.badge.amber { background: var(--amber-dim); color: var(--amber); }
.badge.gold { background: var(--gold-dim); color: var(--gold); }
.badge.blue { background: var(--blue-dim); color: var(--blue); }
.badge.gray { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.badge.wine { background: var(--wine-dim); color: #ff8fa5; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 4px; scrollbar-width: none; -ms-overflow-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.18s;
}
.chip.active {
  background: linear-gradient(135deg, rgba(217, 178, 111, 0.2), rgba(165, 42, 68, 0.22));
  border-color: rgba(217, 178, 111, 0.5);
  color: var(--gold-soft);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(217, 178, 111, 0.22), rgba(165, 42, 68, 0.25));
  border: 1px solid rgba(217, 178, 111, 0.22);
  color: var(--gold-soft);
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 20px; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }

.divider { height: 1px; background: var(--line-soft); margin: 14px 0; }
.divider.dashed { background: none; border-top: 1px dashed var(--line); }

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}
.empty .empty-icon { font-size: 30px; margin-bottom: 10px; opacity: 0.6; }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 34px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(217, 178, 111, 0.22);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

.skeleton {
  height: 74px;
  border-radius: 16px;
  background: linear-gradient(100deg, var(--card) 20%, var(--card-3) 40%, var(--card) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  margin-bottom: 10px;
}

/* ---------------------------------- 首页 ---------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(217, 178, 111, 0.16), transparent 55%),
    linear-gradient(150deg, #3a1a26 0%, #251826 42%, #171a23 100%);
  border: 1px solid rgba(217, 178, 111, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}
.hero::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -64px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(217, 178, 111, 0.14);
  box-shadow: 0 0 0 26px rgba(217, 178, 111, 0.045), 0 0 0 54px rgba(217, 178, 111, 0.025);
}
.hero-top { display: flex; align-items: flex-start; gap: 12px; position: relative; z-index: 1; }
.hero-eyebrow { font-size: 11.5px; letter-spacing: 0.16em; color: rgba(240, 216, 168, 0.75); text-transform: uppercase; }
.hero-name { margin-top: 3px; font-size: 19px; font-weight: 700; letter-spacing: 0.03em; }
.hero-date { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.hero-amount { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; position: relative; z-index: 1; }
.hero-amount .cur { font-size: 17px; color: var(--gold-soft); font-weight: 600; }
.hero-amount .num { font-size: 36px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hero-meta { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }

.stat-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.stat-pill {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.055);
}
.stat-pill .k { font-size: 10.5px; color: var(--muted); letter-spacing: 0.05em; }
.stat-pill .v { margin-top: 3px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 4px 12px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(34, 40, 54, 0.8), rgba(22, 26, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 11.5px;
  text-align: center;
}
.quick:active { transform: scale(0.97); background: rgba(255, 255, 255, 0.05); }
.quick .qi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gold-dim);
  color: var(--gold);
}
.quick .qi svg { width: 19px; height: 19px; }
.quick.wine .qi { background: var(--wine-dim); color: #ff8fa5; }
.quick.green .qi { background: var(--green-dim); color: var(--green); }
.quick.blue .qi { background: var(--blue-dim); color: var(--blue); }

.recent-item { display: flex; align-items: center; gap: 12px; }
.recent-item .r-main { flex: 1; min-width: 0; }
.recent-item .r-title { font-size: 13.5px; font-weight: 600; }
.recent-item .r-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item .r-amt { text-align: right; font-variant-numeric: tabular-nums; }
.recent-item .r-amt b { font-size: 15px; }

.low-item .li-name { font-size: 13.5px; font-weight: 600; }
.low-item .li-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.low-item .li-stock { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------------------------------- 商品卡片 ---------------------------------- */

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: linear-gradient(168deg, rgba(30, 35, 48, 0.9), rgba(20, 24, 33, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.12s, border-color 0.18s;
}
.pcard:active { transform: scale(0.985); border-color: rgba(217, 178, 111, 0.35); }
.pcard.out { opacity: 0.52; }

.p-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(217, 178, 111, 0.12), transparent 55%),
    linear-gradient(150deg, #232838, #171a23);
  display: grid;
  place-items: center;
  color: rgba(217, 178, 111, 0.5);
  font-size: 26px;
  overflow: hidden;
}
.p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-thumb .p-badge { position: absolute; left: 8px; top: 8px; }
.p-thumb .p-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #2a1d0c;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.p-thumb .p-add svg { width: 17px; height: 17px; }
.p-body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
.p-name { font-size: 13.5px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-foot { margin-top: 5px; display: flex; align-items: flex-end; gap: 6px; }
.p-price { font-size: 16px; font-weight: 750; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.p-price .u { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.p-stock { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.p-stock.low { color: var(--amber); }
.p-stock.out { color: var(--red); }

/* 商品列表（管理用） */
.plist-item { display: flex; align-items: center; gap: 12px; }
.plist-thumb {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #262c3b, #191d27);
  color: rgba(217, 178, 111, 0.55);
  font-size: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.plist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plist-main { flex: 1; min-width: 0; }
.plist-name { font-size: 14px; font-weight: 650; }
.plist-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plist-right { text-align: right; flex: none; display: grid; gap: 4px; justify-items: end; }
.plist-price { font-size: 15px; font-weight: 700; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.code-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: 0.06em;
}

/* ---------------------------------- 开单 ---------------------------------- */

.sell-tools { position: sticky; top: 65px; z-index: 20; padding: 8px 0 10px; background: linear-gradient(180deg, var(--bg) 68%, transparent); }
.sell-list { display: grid; gap: 8px; }
.sell-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 15px;
  background: linear-gradient(165deg, rgba(29, 34, 46, 0.84), rgba(20, 24, 32, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.055);
  width: 100%;
  text-align: left;
}
.sell-item:active { border-color: rgba(217, 178, 111, 0.3); }
.sell-item.out { opacity: 0.45; }
.sell-thumb {
  width: 48px; height: 48px; border-radius: 12px; flex: none; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #262c3b, #191d27);
  color: rgba(217, 178, 111, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.sell-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sell-main { flex: 1; min-width: 0; }
.sell-name { font-size: 14px; font-weight: 650; }
.sell-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.sell-right { text-align: right; }
.sell-price { font-size: 15px; font-weight: 700; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.sell-stock { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.sell-stock.low { color: var(--amber); }
.sell-stock.out { color: var(--red); }

.cartbar {
  position: fixed;
  z-index: 45;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  bottom: calc(66px + var(--safe-b));
  width: calc(100% - 24px);
  max-width: 740px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(43, 34, 30, 0.97), rgba(30, 23, 32, 0.97));
  border: 1px solid rgba(217, 178, 111, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: rise 0.25s ease;
}
.cartbar .cb-icon { position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold); flex: none; }
.cartbar .cb-icon svg { width: 21px; height: 21px; }
.cartbar .cb-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--wine-2); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.cartbar .cb-main { flex: 1; min-width: 0; }
.cartbar .cb-total { font-size: 19px; font-weight: 750; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.cartbar .cb-sub { font-size: 10.5px; color: var(--muted); }

.cart-line { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .cl-main { flex: 1; min-width: 0; }
.cart-line .cl-name { font-size: 13.5px; font-weight: 600; }
.cart-line .cl-price { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stepper { display: flex; align-items: center; gap: 2px; background: rgba(255, 255, 255, 0.045); border-radius: 10px; padding: 2px; border: 1px solid var(--line-soft); }
.stepper button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--gold); font-size: 18px; font-weight: 500; }
.stepper button:active { background: rgba(255, 255, 255, 0.08); }
.stepper .q { min-width: 28px; text-align: center; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-line .cl-amt { min-width: 62px; text-align: right; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-opt {
  padding: 11px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.pay-opt.active { border-color: rgba(217, 178, 111, 0.55); background: var(--gold-dim); color: var(--gold-soft); font-weight: 600; }

.total-line { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0; font-size: 13px; color: var(--muted); }
.total-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.total-line.grand { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--text); }
.total-line.grand b { font-size: 24px; color: var(--gold-soft); }

.member-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  width: 100%;
  text-align: left;
}
.member-pick:active { border-color: rgba(217, 178, 111, 0.35); }

/* ---------------------------------- 订单 ---------------------------------- */

.order-card { padding: 14px 15px; }
.order-top { display: flex; align-items: center; gap: 8px; }
.order-no { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.order-time { font-size: 11px; color: var(--muted-2); margin-left: auto; }
.order-items { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-bottom { margin-top: 10px; display: flex; align-items: flex-end; gap: 8px; }
.order-amount { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.order-meta { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.order-card.void .order-amount { text-decoration: line-through; color: var(--muted); }
.order-card.void { opacity: 0.7; }

.summary-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(217, 178, 111, 0.1), rgba(165, 42, 68, 0.1));
  border: 1px solid rgba(217, 178, 111, 0.16);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.summary-bar b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }

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

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 14px 15px; border-radius: 16px; background: linear-gradient(165deg, rgba(32, 37, 50, 0.9), rgba(20, 24, 33, 0.95)); border: 1px solid rgba(255, 255, 255, 0.06); }
.kpi .k { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.kpi .v { margin-top: 6px; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi .v.gold { color: var(--gold-soft); }
.kpi .v.green { color: var(--green); }
.kpi .s { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); }

.chart-card { padding: 16px 14px 10px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 128px; padding-top: 8px; }
.bar-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar {
  width: 100%;
  max-width: 26px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--gold-soft), rgba(217, 178, 111, 0.42));
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar.zero { background: rgba(255, 255, 255, 0.07); }
.bar-lbl { font-size: 9px; color: var(--muted-2); white-space: nowrap; transform: scale(0.92); }
.chart-note { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 8px; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.055); color: var(--muted); flex: none; }
.rank-row:nth-child(1) .rank-no { background: var(--gold); color: #2a1d0c; }
.rank-row:nth-child(2) .rank-no { background: rgba(217, 178, 111, 0.55); color: #2a1d0c; }
.rank-row:nth-child(3) .rank-no { background: rgba(217, 178, 111, 0.3); color: var(--gold-soft); }
.rank-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-size: 12.5px; color: var(--gold-soft); font-variant-numeric: tabular-nums; }

.pay-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.pay-row .pay-name { width: 64px; font-size: 12.5px; }
.pay-track { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.055); overflow: hidden; }
.pay-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--wine-2), var(--gold)); }
.pay-amt { width: 76px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------- 会员 ---------------------------------- */

.member-card { display: flex; align-items: center; gap: 12px; }
.member-main { flex: 1; min-width: 0; }
.member-name { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.member-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.member-right { text-align: right; }

.credit-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--amber-dim);
  border: 1px solid rgba(240, 185, 79, 0.22);
  color: var(--amber);
}

/* ---------------------------------- 设置/员工 ---------------------------------- */

.perm-grid { display: grid; gap: 8px; }
.perm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.perm input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  flex: none;
  margin: 0;
  transition: all 0.15s;
}
.perm input:checked { background: var(--gold); border-color: var(--gold); }
.perm input:checked::after { content: ""; width: 5px; height: 9px; border: solid #241a0d; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.perm .p-label { font-size: 13px; }
.perm .p-key { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted-2); }

.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); transition: background 0.2s; }
.switch .track::after { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); }
.switch input:checked + .track { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); }
.switch input:checked + .track::after { transform: translateX(19px); }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; }
.toggle-row .t-main { flex: 1; }
.toggle-row .t-title { font-size: 13.5px; }
.toggle-row .t-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.log-row { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.log-row:last-child { border-bottom: 0; }
.log-row .log-action { color: var(--text); font-size: 12.5px; }
.log-row .log-time { float: right; font-size: 10.5px; color: var(--muted-2); }

.menu-list .row { padding: 15px 16px; }
.menu-list .row .row-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold); flex: none; }
.menu-list .row .row-icon svg { width: 17px; height: 17px; }
.menu-list .row .row-arrow { color: var(--muted-2); }
.menu-list .row .row-title { font-size: 14px; }
.menu-list .row .row-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.profile-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(217, 178, 111, 0.14), transparent 60%),
    linear-gradient(150deg, #2b1a26, #1a1d27);
  border: 1px solid rgba(217, 178, 111, 0.16);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.perm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* ---------------------------------- 弹层 ---------------------------------- */

.layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.layer.on { pointer-events: auto; }
.mask {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.24s;
}
.layer.on .mask { opacity: 1; }
.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 780px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1c212d, #12151d 60%);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: var(--safe-b);
}
.layer.on .sheet { transform: translate(-50%, 0); }
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  flex: none;
}
.sheet-title { font-size: 16.5px; font-weight: 700; }
.sheet-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.sheet-x {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  flex: none;
}
.sheet-body { padding: 4px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot {
  flex: none;
  padding: 12px 18px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line-soft);
  background: rgba(16, 19, 26, 0.9);
  display: flex;
  gap: 10px;
}
.sheet-foot .btn { flex: 1; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  max-width: min(88vw, 420px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(30, 35, 47, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  color: var(--text);
  animation: toastIn 0.25s ease;
  text-align: center;
}
.toast.ok { border-color: rgba(66, 207, 149, 0.35); }
.toast.err { border-color: rgba(255, 98, 116, 0.4); }
.toast.out { animation: toastOut 0.2s ease forwards; }

/* 扫码 */
.scan-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: 52dvh;
  display: grid;
  place-items: center;
}
.scan-stage video { width: 100%; height: 100%; object-fit: cover; }

.scanner-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.scanner-tabs::-webkit-scrollbar { display: none; }
.scanner-tabs .chip { flex: none; }
.sc-pane.hidden { display: none !important; }

.sc-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(217, 178, 111, 0.3);
  background: linear-gradient(165deg, rgba(34, 40, 54, 0.55), rgba(20, 24, 33, 0.75));
}
.sc-drop-icon { font-size: 34px; margin-bottom: 10px; }
.sc-status { margin-top: 14px; font-size: 12.5px; color: var(--muted); min-height: 18px; line-height: 1.6; }
.sc-status.err { color: var(--red); }
.sc-gun { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.sc-torch { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(0, 0, 0, 0.45); }

.scan-frame {
  position: absolute;
  inset: 16%;
  border-radius: 16px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}
.scan-frame::before, .scan-frame::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
}
.scan-frame::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.scan-frame::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.scan-hint { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 4px #000; padding: 0 20px; }
.scan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* 二维码 */
.qr-box {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  place-items: center;
  width: min(72vw, 280px);
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.qr-box img { width: 100%; image-rendering: crisp-edges; }
.qr-cap { text-align: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.qr-code-big { font-family: var(--mono); font-size: 22px; letter-spacing: 0.24em; text-align: center; color: var(--gold-soft); margin-top: 14px; }

.qr-label {
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: 12px;
  width: 250px;
  margin: 0 auto;
}
.qr-label img { width: 150px; height: 150px; margin: 0 auto; }
.qr-label .ql-name { font-size: 13px; font-weight: 700; text-align: center; margin-top: 6px; color: #111; line-height: 1.35; }
.qr-label .ql-meta { font-size: 10.5px; text-align: center; color: #555; margin-top: 2px; }
.qr-label .ql-price { font-size: 16px; font-weight: 800; text-align: center; color: #8a1c33; margin-top: 4px; }
.qr-label .ql-code { font-family: var(--mono); font-size: 10px; text-align: center; color: #777; margin-top: 3px; letter-spacing: 0.08em; }

/* 小票 */
.receipt {
  background: #f7f4ec;
  color: #1c1c1c;
  border-radius: 16px;
  padding: 20px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}
.receipt .r-shop { text-align: center; font-size: 17px; font-weight: 800; letter-spacing: 0.08em; font-family: var(--font); }
.receipt .r-sub { text-align: center; font-size: 10.5px; color: #666; margin-top: 2px; font-family: var(--font); }
.receipt .r-hr { border-top: 1px dashed #b9b3a6; margin: 10px 0; }
.receipt .r-line { display: flex; gap: 8px; }
.receipt .r-line .rl-name { flex: 1; min-width: 0; }
.receipt .r-line .rl-qty { width: 46px; text-align: right; }
.receipt .r-line .rl-amt { width: 64px; text-align: right; }
.receipt .r-total { display: flex; justify-content: space-between; font-size: 15px; font-weight: 800; }
.receipt .r-meta { display: flex; justify-content: space-between; color: #555; font-size: 10.5px; }
.receipt .r-foot { text-align: center; font-size: 10px; color: #777; margin-top: 8px; font-family: var(--font); }

.print-only { display: none; }

/* 图片上传 */
.img-picker { display: flex; align-items: center; gap: 14px; }
.img-preview {
  width: 78px; height: 78px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #262c3b, #191d27);
  border: 1px dashed var(--line);
  color: var(--muted-2);
  overflow: hidden;
  font-size: 22px;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------- 公开页 ---------------------------------- */

.pub-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px calc(28px + var(--safe-b));
  min-height: 100dvh;
}
.pub-head { display: flex; align-items: center; gap: 12px; padding: 8px 0 18px; }
.pub-brand { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(145deg, #3a2a22, #221825); border: 1px solid rgba(217, 178, 111, 0.3); }
.pub-shop { font-size: 17px; font-weight: 700; }
.pub-slogan { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.pub-head .pub-link { margin-left: auto; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px; }

.pub-product {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(33, 38, 52, 0.94), rgba(19, 23, 31, 0.97));
  border: 1px solid rgba(217, 178, 111, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: rise 0.4s ease;
}
.pub-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #232838, #171a23);
  display: grid;
  place-items: center;
  color: rgba(217, 178, 111, 0.4);
  font-size: 46px;
  overflow: hidden;
}
.pub-img img { width: 100%; height: 100%; object-fit: cover; }
.pub-body { padding: 18px 20px 20px; }
.pub-name { font-size: 21px; font-weight: 750; line-height: 1.35; }
.pub-sub { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.pub-price-row { margin-top: 14px; display: flex; align-items: flex-end; gap: 10px; }
.pub-price { font-size: 32px; font-weight: 800; color: var(--gold-soft); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pub-price .cur { font-size: 17px; font-weight: 600; margin-right: 2px; }
.pub-price .u { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.pub-note { margin-top: 14px; padding: 12px 14px; border-radius: 13px; background: rgba(255, 255, 255, 0.04); font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.pub-facts { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pub-fact { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.05); }
.pub-fact .k { font-size: 10.5px; color: var(--muted-2); }
.pub-fact .v { margin-top: 2px; font-size: 13px; font-weight: 600; }

.pub-actions { display: flex; gap: 10px; margin-top: 16px; }
.pub-actions .btn { flex: 1; }
.pub-foot { text-align: center; color: var(--muted-2); font-size: 11px; margin-top: 24px; line-height: 1.9; }
.pub-foot .foot-brand { color: var(--muted); letter-spacing: 0.12em; font-size: 10.5px; text-transform: uppercase; }

.pub-search { margin: 0 0 14px; }
.pub-empty { text-align: center; padding: 40px 20px; color: var(--muted); }

.pub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .pub-grid { grid-template-columns: repeat(3, 1fr); } }

.notice {
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--red-dim);
  border: 1px solid rgba(255, 98, 116, 0.22);
  color: #ff9dab;
  font-size: 12.5px;
}

/* ---------------------------------- 动效 ---------------------------------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

@media print {
  body { background: #fff !important; color: #000; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; padding: 0; }
  .receipt { background: #fff; border-radius: 0; font-size: 12px; width: 72mm; }
  .receipt .r-hr { border-top: 1px dashed #999; }
  @page { size: 80mm auto; margin: 4mm; }
}
