/* ============================================================
   食光 SaaS · 高保真交互原型
   设计基准：1440 × 900 桌面端，兼容 1280 与移动端预览
   ============================================================ */

:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #eef2f6;
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --blue-soft: #eff6ff;
  --teal: #0d9488;
  --teal-soft: #f0fdfa;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --navy: #0b1220;
  --navy-2: #111c31;
  --navy-3: #1c2b45;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .05);
  --shadow: 0 12px 34px rgba(15, 23, 42, .08);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, .18);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow: hidden; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.between { display: flex; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: .16s ease;
  white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .24);
}
.btn-primary:hover { background: linear-gradient(135deg, #3b82f6, #2563eb); border-color: #3b82f6; }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-soft { background: var(--blue-soft); border-color: #dbeafe; color: var(--blue); }
.btn-soft:hover { background: #dbeafe; }
.btn-danger { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }

.input, .select {
  height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: .16s ease;
}
.input:focus, .select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.input::placeholder { color: var(--muted-2); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-orange { background: var(--orange-soft); color: #c2410c; }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-live { box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.card-body { padding: 20px; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-orange { background: var(--orange-soft); color: #c2410c; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: #f1f5f9; color: var(--muted); }
.badge-red { background: var(--red-soft); color: var(--red); }

/* ---------- 品牌 ---------- */
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #fbbf24, #f97316 55%, #ef4444);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(249, 115, 22, .28);
  flex: none;
}
.brand-mark.lg { width: 46px; height: 46px; border-radius: 14px; font-size: 23px; }
.brand-name { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .01em; line-height: 1.1; }
.brand-name small { display: block; color: #94a3b8; font-size: 9px; font-weight: 600; letter-spacing: .16em; margin-top: 3px; }
.brand-name.dark { color: var(--ink); }
.brand-name.dark small { color: var(--muted-2); }

/* ---------- 演示切换器 ---------- */
.switcher {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(11, 18, 32, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(11, 18, 32, .35);
  border: 1px solid rgba(255, 255, 255, .10);
}
.switcher button {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: .16s ease;
}
.switcher button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.switcher button.active { color: #fff; background: rgba(255, 255, 255, .13); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.switcher .sw-dot { width: 5px; height: 5px; border-radius: 50%; background: #64748b; }
.switcher button.active .sw-dot { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }

/* ============================================================
   POS 收银
   ============================================================ */
.pos {
  height: 100vh;
  display: flex;
  background: var(--bg);
  padding-bottom: 58px;
}
.pos-rail {
  width: 76px;
  flex: none;
  background: linear-gradient(180deg, #0b1220 0%, #111c31 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  gap: 8px;
  color: #94a3b8;
}
.pos-rail .brand-mark { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; margin-bottom: 16px; }
.rail-btn {
  width: 50px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #7c8ca6;
  font-size: 10px;
  transition: .15s ease;
}
.rail-btn .ico { width: 21px; height: 21px; }
.rail-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.rail-btn.active { background: rgba(37, 99, 235, .22); color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .18); }
.pos-rail .rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #334155, #1e293b);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12);
}

.pos-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-top {
  height: 64px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
}
.pos-store { display: flex; align-items: center; gap: 10px; }
.pos-store-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center;
}
.pos-store-name { font-size: 14px; font-weight: 800; }
.pos-store-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pos-top-divider { width: 1px; height: 26px; background: var(--line); }
.pos-shift { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.pos-shift b { color: var(--ink); font-weight: 700; }
.pos-top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.net-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px; border-radius: 20px;
  background: var(--green-soft); color: var(--green);
  font-size: 11px; font-weight: 700;
}
.net-pill.offline { background: var(--orange-soft); color: #c2410c; }
.pos-clock { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pos-user { display: flex; align-items: center; gap: 8px; }
.pos-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1d4ed8; display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.pos-user-name { font-size: 12px; font-weight: 700; }
.pos-user-role { font-size: 10px; color: var(--muted); }

.table-bar {
  height: 68px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  overflow: hidden;
}
.table-filter { display: flex; gap: 4px; flex: none; }
.table-filter button {
  height: 30px; padding: 0 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.table-filter button.active { background: var(--navy); color: #fff; }
.table-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.table-scroll::-webkit-scrollbar { display: none; }
.table-chip {
  min-width: 96px;
  height: 52px;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: left;
  transition: .15s ease;
  flex: none;
}
.table-chip:hover { border-color: #bfdbfe; transform: translateY(-1px); }
.table-chip .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.table-chip .tc-code { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.table-chip .tc-meta { font-size: 10px; color: var(--muted); }
.table-chip .tc-dot { width: 7px; height: 7px; border-radius: 50%; }
.table-chip.free .tc-dot { background: #22c55e; }
.table-chip.occupied .tc-dot { background: #f97316; }
.table-chip.checkout .tc-dot { background: #3b82f6; }
.table-chip.cleaning .tc-dot { background: #94a3b8; }
.table-chip.active { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10); }
.table-chip.occupied { background: #fffaf5; }
.table-chip.checkout { background: #f5f9ff; }

.pos-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 372px;
}
.cat-panel {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 12px 8px;
  overflow-y: auto;
}
.cat-btn {
  width: 100%;
  padding: 11px 6px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  transition: .15s ease;
}
.cat-btn .cat-emoji { font-size: 21px; line-height: 1; filter: saturate(.9); }
.cat-btn:hover { background: #f8fafc; color: var(--ink); }
.cat-btn.active { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px #dbeafe; }

.dish-panel { min-width: 0; display: flex; flex-direction: column; padding: 14px 16px 0; }
.dish-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.search-box { position: relative; width: 260px; }
.search-box .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 16px; height: 16px; }
.search-box input { height: 36px; padding-left: 34px; border-radius: 10px; background: #fff; }
.dish-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.dish-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  padding-bottom: 14px;
}
.dish-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  gap: 10px;
  text-align: left;
  transition: .16s ease;
  position: relative;
  min-height: 96px;
}
.dish-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.dish-card:active { transform: translateY(0); }
.dish-thumb {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 31px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.thumb-a { background: linear-gradient(145deg, #fff1e6, #fed7aa); }
.thumb-b { background: linear-gradient(145deg, #ecfdf5, #bbf7d0); }
.thumb-c { background: linear-gradient(145deg, #eff6ff, #bfdbfe); }
.thumb-d { background: linear-gradient(145deg, #f5f3ff, #ddd6fe); }
.thumb-e { background: linear-gradient(145deg, #fff7ed, #fde68a); }
.dish-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dish-name { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.dish-desc { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dish-bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 5px; }
.dish-price { font-size: 15px; font-weight: 800; color: var(--ink); font-family: var(--mono); letter-spacing: -.04em; }
.dish-price small { font-size: 10px; font-weight: 600; color: var(--muted); margin-right: 1px; }
.dish-sold { font-size: 10px; color: var(--muted-2); }
.add-btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .28);
  transition: .15s ease;
  flex: none;
}
.add-btn:hover { background: #1d4ed8; transform: scale(1.08); }
.add-btn .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.dish-card.sold-out { opacity: .6; }
.dish-card.sold-out .add-btn { background: #cbd5e1; box-shadow: none; }
.soldout-flag { position: absolute; top: 8px; right: 8px; }

.cart-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cart-head { padding: 15px 18px 12px; border-bottom: 1px solid var(--line-2); }
.cart-title-row { display: flex; align-items: center; justify-content: space-between; }
.cart-title { font-size: 15px; font-weight: 800; }
.cart-table { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.cart-table-badge {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05;
}
.cart-table-badge b { font-size: 13px; }
.cart-table-badge span { font-size: 8px; color: #94a3b8; }
.cart-table-info { font-size: 12px; }
.cart-table-info b { font-size: 13px; }
.cart-table-info span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted-2); gap: 10px; padding: 30px; text-align: center; }
.cart-empty .empty-emoji { font-size: 40px; filter: grayscale(.2); opacity: .7; }
.cart-empty b { color: var(--muted); font-size: 13px; }
.cart-empty span { font-size: 11px; line-height: 1.6; }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.ci-thumb { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; }
.ci-name { font-size: 12px; font-weight: 700; line-height: 1.3; }
.ci-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.ci-price { font-size: 12px; font-weight: 800; font-family: var(--mono); margin-top: 3px; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: #f8fafc; border-radius: 8px; padding: 2px; }
.qty button { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.qty button:hover { background: #fff; color: var(--ink); }
.qty span { min-width: 20px; text-align: center; font-size: 12px; font-weight: 800; }
.cart-summary { border-top: 1px solid var(--line); padding: 12px 18px 8px; background: #fff; }
.sum-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.sum-row b { color: var(--ink-2); font-weight: 600; }
.sum-row.total { margin-top: 8px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink); }
.sum-row.total b { font-size: 23px; font-weight: 800; color: var(--red); font-family: var(--mono); letter-spacing: -.05em; }
.sum-row.total b small { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 1px; }
.cart-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 10px 18px 16px; }
.cart-actions .btn { height: 44px; font-size: 14px; }
.pos-quickbar {
  height: 54px;
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
}
.quick-btn {
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.quick-btn:hover { background: #f1f5f9; color: var(--ink); }
.quick-btn .ico { width: 15px; height: 15px; }
.quick-spacer { flex: 1; }

/* ---------- 弹层 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(11, 18, 32, .48);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  padding: 24px;
  animation: fadeIn .18s ease;
}
.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn .22s cubic-bezier(.2, .8, .2, 1);
}
.modal.wide { width: min(760px, 100%); }
.modal.xwide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; }
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.modal-close:hover { background: #f1f5f9; color: var(--ink); }
.modal-body { padding: 8px 22px 18px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; border-top: 1px solid var(--line-2); }
.modal-foot .grow { flex: 1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- 结账 ---------- */
.pay-total {
  text-align: center;
  padding: 8px 0 18px;
}
.pay-total .label { font-size: 12px; color: var(--muted); }
.pay-total .amount { font-family: var(--mono); font-size: 44px; font-weight: 800; letter-spacing: -.06em; margin-top: 4px; }
.pay-total .amount small { font-size: 18px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-method {
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: .15s ease;
}
.pay-method .pm-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; }
.pay-method[data-channel="WECHAT"] .pm-ico { background: #16a34a; }
.pay-method[data-channel="ALIPAY"] .pm-ico { background: #1677ff; }
.pay-method[data-channel="CASH"] .pm-ico { background: #f59e0b; }
.pay-method[data-channel="MEMBER"] .pm-ico { background: #7c3aed; }
.pay-method:hover { border-color: #cbd5e1; background: #f8fafc; }
.pay-method.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, .10); }
.cash-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.cash-pad button { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-family: var(--mono); font-weight: 700; }
.cash-pad button:hover { background: #f8fafc; }
.pay-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 11px; line-height: 1.6; }

.success {
  padding: 18px 8px 8px;
  text-align: center;
}
.success-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  animation: popIn .35s cubic-bezier(.2, .8, .2, 1);
}
.success-ring .ico { width: 34px; height: 34px; stroke-width: 2.4; }
.success h3 { font-size: 20px; font-weight: 800; }
.success p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.receipt {
  margin: 18px auto 0;
  width: 300px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
}
.receipt .r-title { text-align: center; font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: .08em; }
.receipt .r-sub { text-align: center; font-size: 10px; color: var(--muted-2); margin-top: 3px; }
.receipt .r-line { display: flex; justify-content: space-between; margin-top: 6px; }
.receipt .r-total { display: flex; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 13px; color: var(--ink); font-weight: 800; }
.receipt .r-code { text-align: center; font-family: var(--mono); font-size: 10px; margin-top: 10px; color: var(--muted-2); }

/* ============================================================
   商家后台 / 服务商控制台 通用壳
   ============================================================ */
.shell { height: 100vh; display: flex; background: #f6f8fb; padding-bottom: 58px; }
.sidebar {
  width: 230px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
}
.sidebar.dark { background: linear-gradient(180deg, #0b1220, #111c31); border-right: none; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.side-brand .brand-name { font-size: 16px; }
.side-brand .brand-name small { font-size: 8px; }
.side-section { padding: 12px 10px 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.sidebar.dark .side-section { color: #64748b; }
.nav-item {
  height: 42px;
  border-radius: 10px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: .15s ease;
}
.nav-item .ico { width: 18px; height: 18px; color: var(--muted-2); }
.nav-item:hover { background: #f8fafc; color: var(--ink); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); }
.nav-item.active .ico { color: var(--blue); }
.nav-item .nav-badge { margin-left: auto; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 6px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; }
.sidebar.dark .nav-item { color: #94a3b8; }
.sidebar.dark .nav-item .ico { color: #64748b; }
.sidebar.dark .nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar.dark .nav-item.active { background: rgba(37, 99, 235, .20); color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .12); }
.sidebar.dark .nav-item.active .ico { color: #93c5fd; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line-2); }
.sidebar.dark .side-foot { border-top-color: rgba(255, 255, 255, .08); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; }
.side-user:hover { background: #f8fafc; }
.sidebar.dark .side-user:hover { background: rgba(255, 255, 255, .06); }
.side-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(145deg, #dbeafe, #bfdbfe); color: #1d4ed8; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.side-user-name { font-size: 12px; font-weight: 700; }
.side-user-role { font-size: 10px; color: var(--muted); }
.sidebar.dark .side-user-name { color: #e2e8f0; }
.sidebar.dark .side-user-role { color: #64748b; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  flex: none;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.page-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.page-crumb { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-search { position: relative; width: 220px; }
.top-search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.top-search input { height: 34px; padding-left: 32px; background: #f8fafc; border-color: transparent; font-size: 12px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; color: var(--muted);
  position: relative;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.icon-btn .noti-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }
.page { flex: 1; overflow-y: auto; padding: 22px 24px 30px; }
.page-inner { max-width: 1500px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 8px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 17px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.kpi::after { content: ""; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px; border-radius: 50%; background: var(--kpi-tint, #eff6ff); opacity: .7; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.kpi-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--kpi-tint, #eff6ff); color: var(--kpi-color, var(--blue)); }
.kpi-ico .ico { width: 16px; height: 16px; }
.kpi-value { font-family: var(--mono); font-size: 28px; font-weight: 800; letter-spacing: -.06em; margin-top: 10px; line-height: 1; }
.kpi-value small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.kpi-trend { display: flex; align-items: center; gap: 4px; margin-top: 9px; font-size: 11px; font-weight: 700; color: var(--green); }
.kpi-trend.down { color: var(--red); }
.kpi-trend .ico { width: 12px; height: 12px; }
.kpi-trend span { color: var(--muted-2); font-weight: 500; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 14px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.chart-wrap { position: relative; height: 238px; padding: 6px 4px 0; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 14px; align-items: center; font-size: 11px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }
.chart-tip {
  position: absolute;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 10px;
  pointer-events: none;
  opacity: 0;
  transition: .12s ease;
  white-space: nowrap;
  transform: translate(-50%, -120%);
}
.chart-hover:hover .chart-tip { opacity: 1; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted-2);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table .num { font-family: var(--mono); font-weight: 700; }
.data-table .right { text-align: right; }
.table-wrap { overflow-x: auto; }
.cell-main { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; }
.avatar-sm.blue { background: var(--blue-soft); color: var(--blue); }
.avatar-sm.green { background: var(--green-soft); color: var(--green); }
.avatar-sm.orange { background: var(--orange-soft); color: #c2410c; }
.cell-user { display: flex; align-items: center; gap: 8px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--muted-2);
  text-align: center;
}
.empty-state .es-emoji { font-size: 36px; opacity: .8; }
.empty-state b { color: var(--muted); font-size: 13px; }
.empty-state p { font-size: 11px; max-width: 280px; line-height: 1.6; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 10px; }
.tabs button { height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

.ai-card {
  background: linear-gradient(145deg, #0b1220, #15294a);
  border-radius: var(--radius);
  padding: 18px;
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}
.ai-card::after { content: ""; position: absolute; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .35), transparent 70%); }
.ai-card .ai-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #93c5fd; }
.ai-card .ai-title { font-size: 17px; font-weight: 800; color: #fff; margin-top: 12px; line-height: 1.35; letter-spacing: -.02em; }
.ai-card .ai-text { font-size: 11px; color: #94a3b8; line-height: 1.7; margin-top: 8px; }
.ai-card .ai-action { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .10); color: #dbeafe; font-size: 11px; font-weight: 700; }
.ai-card .ai-action:hover { background: rgba(255, 255, 255, .16); }

/* ---------- 商家后台：菜单 ---------- */
.menu-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.cat-list { padding: 8px; }
.cat-item { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 600; }
.cat-item:hover { background: #f8fafc; color: var(--ink); }
.cat-item.active { background: var(--blue-soft); color: var(--blue); }
.cat-item .cat-count { margin-left: auto; font-size: 10px; color: var(--muted-2); }
.cat-item.active .cat-count { color: var(--blue); }
.menu-table-row { display: flex; align-items: center; gap: 11px; }
.menu-thumb { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; flex: none; }
.menu-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ---------- 服务商控制台 ---------- */
.sp-hero {
  background: linear-gradient(135deg, #0b1220 0%, #14284a 55%, #0d3b66 100%);
  border-radius: 18px;
  padding: 22px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.sp-hero::after { content: ""; position: absolute; right: -60px; bottom: -100px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, .22), transparent 65%); }
.sp-hero .sp-kicker { font-size: 10px; letter-spacing: .16em; color: #7dd3fc; font-weight: 700; }
.sp-hero h2 { font-size: 24px; font-weight: 800; margin-top: 8px; letter-spacing: -.03em; }
.sp-hero p { color: #94a3b8; font-size: 12px; margin-top: 5px; }
.sp-hero .sp-stats { display: flex; gap: 32px; margin-top: 18px; }
.sp-hero .sp-stat b { font-family: var(--mono); font-size: 24px; font-weight: 800; }
.sp-hero .sp-stat span { display: block; font-size: 10px; color: #94a3b8; margin-top: 2px; }

.wizard-steps { display: flex; align-items: center; gap: 8px; padding: 4px 0 20px; }
.wizard-step { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 12px; font-weight: 600; }
.wizard-step .num { width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.wizard-step.active { color: var(--blue); }
.wizard-step.active .num { background: var(--blue); color: #fff; }
.wizard-step.done .num { background: var(--green); color: #fff; }
.wizard-line { flex: 1; height: 1px; background: var(--line); }
.wizard-panel { min-height: 220px; }
.wizard-summary { background: #f8fafc; border: 1px dashed var(--line); border-radius: 12px; padding: 14px; }
.wizard-summary .ws-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12px; }
.wizard-summary .ws-row span { color: var(--muted); }
.wizard-summary .ws-row b { text-align: right; }

.ticket-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ticket-row:last-child { border-bottom: none; }
.ticket-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--orange-soft); color: #c2410c; }
.ticket-main { flex: 1; min-width: 0; }
.ticket-title { font-size: 12px; font-weight: 700; }
.ticket-meta { font-size: 10px; color: var(--muted); margin-top: 3px; }
.ticket-status { flex: none; }

/* ---------- 扫码点餐 ---------- */
.qr-stage {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, #1e3a8a 0%, #0b1220 45%, #07101f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  padding: 30px 30px 80px;
  position: relative;
  overflow: hidden;
}
.qr-stage::before { content: ""; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, .16), transparent 65%); left: 8%; top: 5%; }
.qr-stage::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(249, 115, 22, .12), transparent 65%); right: 10%; bottom: 0; }
.qr-copy { color: #fff; max-width: 420px; position: relative; z-index: 1; }
.qr-copy .qr-kicker { color: #7dd3fc; font-size: 11px; letter-spacing: .16em; font-weight: 700; }
.qr-copy h1 { font-size: 42px; line-height: 1.15; letter-spacing: -.04em; margin-top: 12px; font-weight: 800; }
.qr-copy h1 span { background: linear-gradient(135deg, #fbbf24, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qr-copy p { color: #94a3b8; font-size: 13px; line-height: 1.8; margin-top: 14px; }
.qr-features { display: flex; gap: 18px; margin-top: 24px; }
.qr-feature { font-size: 11px; color: #cbd5e1; display: flex; align-items: center; gap: 6px; }
.qr-feature .ico { color: #34d399; width: 15px; height: 15px; }
.qr-phone {
  width: 390px;
  height: 780px;
  background: #fff;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
  position: relative;
  z-index: 1;
  flex: none;
}
.qr-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #f6f8fb; display: flex; flex-direction: column; position: relative; }
.qr-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; border-radius: 0 0 16px 16px; background: #0b1220; z-index: 5; }
.qr-statusbar { height: 42px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 10px; color: #fff; background: #0f172a; }
.qr-head { background: linear-gradient(145deg, #0f172a, #1e3a8a); color: #fff; padding: 8px 18px 18px; }
.qr-head .qr-store { font-size: 17px; font-weight: 800; }
.qr-head .qr-sub { font-size: 10px; color: #bfdbfe; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.qr-head .qr-table { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 20px; background: rgba(255, 255, 255, .12); font-size: 11px; font-weight: 700; }
.qr-cats { display: flex; gap: 6px; padding: 10px 14px; background: #fff; overflow-x: auto; border-bottom: 1px solid var(--line); flex: none; }
.qr-cats::-webkit-scrollbar { display: none; }
.qr-cat { height: 30px; padding: 0 11px; border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.qr-cat.active { background: var(--navy); color: #fff; }
.qr-list { flex: 1; overflow-y: auto; padding: 10px 14px 90px; }
.qr-dish { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.qr-thumb { width: 68px; height: 68px; border-radius: 12px; display: grid; place-items: center; font-size: 31px; flex: none; }
.qr-dish-info { flex: 1; min-width: 0; }
.qr-dish-name { font-size: 13px; font-weight: 800; }
.qr-dish-desc { font-size: 10px; color: var(--muted); margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.qr-dish-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.qr-price { font-family: var(--mono); font-size: 14px; font-weight: 800; }
.qr-price small { font-size: 10px; color: var(--muted); }
.qr-add { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.qr-add .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.qr-cartbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 58px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px 0 14px;
  box-shadow: 0 16px 30px rgba(11, 18, 32, .30);
}
.qr-cart-ico { position: relative; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .10); display: grid; place-items: center; }
.qr-cart-count { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.qr-cart-total { font-family: var(--mono); font-size: 18px; font-weight: 800; }
.qr-cart-total small { font-size: 10px; color: #94a3b8; }
.qr-cart-btn { margin-left: auto; height: 38px; padding: 0 16px; border-radius: 11px; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-size: 12px; font-weight: 800; }
.qr-cart-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0; padding: 14px 16px 90px; box-shadow: 0 -20px 40px rgba(15, 23, 42, .16); max-height: 70%; overflow-y: auto; animation: slideUp .2s ease; }
.qr-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qr-sheet-head b { font-size: 14px; }
.qr-sheet-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.qr-sheet-item .grow b { font-size: 12px; }
.qr-sheet-item .grow span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.qr-sheet-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; font-size: 12px; }
.qr-sheet-total b { font-family: var(--mono); font-size: 20px; }
.qr-sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 10px; }
.qr-pay-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; z-index: 10; }
.qr-pay-sheet { width: 100%; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 16px 26px; animation: slideUp .22s ease; }
.qr-pay-sheet h3 { font-size: 16px; font-weight: 800; text-align: center; }
.qr-pay-sheet .qr-pay-total { font-family: var(--mono); font-size: 36px; font-weight: 800; text-align: center; margin: 8px 0 16px; letter-spacing: -.05em; }
.qr-pay-option { display: flex; align-items: center; gap: 10px; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.qr-pay-option .pm-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.qr-pay-option.active { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  background: rgba(11, 18, 32, .94);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn .22s cubic-bezier(.2, .8, .2, 1);
  pointer-events: auto;
  max-width: 90vw;
}
.toast.success .toast-ico { color: #34d399; }
.toast.warn .toast-ico { color: #fbbf24; }
.toast.error .toast-ico { color: #f87171; }
.toast .toast-ico { display: grid; place-items: center; }
.toast .toast-ico .ico { width: 17px; height: 17px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1320px) {
  .pos-workspace { grid-template-columns: 96px minmax(0, 1fr) 340px; }
  .dish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .pos-workspace { grid-template-columns: 88px minmax(0, 1fr) 310px; }
  .pos-store-meta, .pos-shift { display: none; }
  .sidebar { width: 200px; }
  .qr-copy { display: none; }
  .qr-stage { gap: 0; }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .pos-workspace { grid-template-columns: 78px minmax(0, 1fr); }
  .cart-panel { position: fixed; right: 0; top: 132px; bottom: 112px; width: min(340px, 86vw); box-shadow: var(--shadow-lg); z-index: 120; border-radius: 14px 0 0 14px; }
  .pos-top { padding: 0 12px; gap: 10px; }
  .pos-user-name, .pos-user-role { display: none; }
  .table-bar { padding: 0 12px; }
  .page { padding: 16px; }
  .topbar { padding: 0 16px; }
  .top-search { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .menu-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .qr-phone { width: 340px; height: 700px; }
  .switcher { bottom: 10px; width: calc(100vw - 24px); justify-content: center; overflow-x: auto; }
  .switcher button { padding: 0 10px; font-size: 11px; }
}
