/* ===== 烧烤摊点菜系统 · 响应式样式 ===== */
:root {
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --brand-light: #ffedd5;
  --accent: #f59e0b;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --blue: #2563eb;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #a8a29e;
  --line: #e7e5e4;
  --bg: #faf7f4;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(28, 25, 23, .07), 0 6px 20px rgba(28, 25, 23, .05);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
small { font-size: 12px; }

/* ---------- 框架 ---------- */
.app { min-height: 100vh; }
.topbar {
  height: 60px;
  background: linear-gradient(100deg, #9a3412, #c2410c 55%, #ea580c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(154, 52, 18, .25);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; letter-spacing: .5px; }
.brand-text small { opacity: .82; font-size: 11px; }
.topbar-status { display: flex; align-items: center; gap: 12px; }
.net-badge {
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
}
.icon-btn {
  background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 9px;
  width: 34px; height: 34px; font-size: 16px; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255,255,255,.25); }

.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 196px; flex: 0 0 196px; background: #fff; border-right: 1px solid var(--line);
  padding: 14px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; margin-bottom: 4px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font-size: 14px; text-align: left;
}
.nav-item .nav-icon { font-size: 17px; width: 20px; text-align: center; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; }
.nav-item .nav-count {
  margin-left: auto; background: var(--brand); color: #fff; border-radius: 10px;
  font-size: 11px; min-width: 20px; text-align: center; padding: 0 5px;
}
.main { flex: 1; min-width: 0; padding: 20px 24px 40px; }
.bottom-nav { display: none; }

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 22px; }
.page-sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 600;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #15803d; color: #fff; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: var(--red-light); border-color: var(--red); color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.muted { color: var(--ink-3); }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; line-height: 1.6; }
.badge-qr { background: #dbeafe; color: #1d4ed8; }
.badge-pos { background: #fef3c7; color: #92400e; }
.badge-new { background: var(--brand-light); color: var(--brand-dark); }
.badge-done { background: var(--green-light); color: #15803d; }
.badge-warn { background: var(--red-light); color: var(--red); }
.badge-gray { background: #f5f5f4; color: var(--ink-2); }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty .empty-icon { font-size: 36px; display: block; margin-bottom: 8px; }

/* ---------- 首页 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 16px 18px; position: relative; overflow: hidden; }
.stat-card::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px;
  border-radius: 50%; background: var(--brand-light); opacity: .7;
}
.stat-label { font-size: 12px; color: var(--ink-2); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.25; margin-top: 4px; }
.stat-value.warn { color: var(--brand); }
.stat-foot { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.entry-card {
  padding: 18px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); transition: .15s;
}
.entry-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 22px rgba(194,65,12,.12); }
.entry-icon { font-size: 26px; display: block; margin-bottom: 8px; }
.entry-name { font-weight: 700; font-size: 15px; }
.entry-desc { color: var(--ink-3); font-size: 12px; margin-top: 2px; }

.home-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-light); color: var(--brand-dark); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.rank-name { flex: 1; }
.rank-bar { height: 7px; background: var(--bg); border-radius: 5px; overflow: hidden; margin-top: 4px; }
.rank-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.rank-num { font-weight: 700; color: var(--brand-dark); }

/* ---------- 桌台 ---------- */
.table-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.table-card { padding: 14px; position: relative; border-left: 4px solid var(--green); }
.table-card.busy { border-left-color: var(--brand); }
.table-card.qr { border-left-color: var(--blue); }
.table-head { display: flex; justify-content: space-between; align-items: center; }
.table-no { font-size: 17px; font-weight: 800; }
.table-meta { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.table-amount { font-size: 20px; font-weight: 800; color: var(--brand-dark); }
.table-card .btn { margin-top: 10px; }

/* ---------- 点菜 ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.round-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.round-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px;
  font-size: 13px; color: var(--ink-2); font-weight: 600;
}
.round-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.round-tab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.round-tab .dot.new { background: var(--accent); }
.round-tab .dot.done { background: var(--green); }

.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: thin; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 20px;
  padding: 5px 14px; font-size: 13px; white-space: nowrap;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.dish-card {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; transition: .15s;
}
.dish-card:hover { border-color: var(--brand); }
.dish-emoji { font-size: 30px; height: 42px; display: grid; place-items: center; background: var(--bg); border-radius: 9px; }
.dish-name { font-weight: 700; font-size: 14px; }
.dish-desc { font-size: 11px; color: var(--ink-3); min-height: 16px; }
.dish-bottom { display: flex; align-items: center; justify-content: space-between; }
.dish-price { color: var(--brand-dark); font-weight: 800; }
.dish-price small { font-weight: 400; color: var(--ink-3); }

.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button {
  width: 26px; height: 28px; border: 0; background: var(--bg); color: var(--brand-dark);
  font-size: 16px; font-weight: 700; line-height: 1;
}
.stepper button:hover { background: var(--brand-light); }
.stepper input {
  width: 34px; height: 28px; border: 0; text-align: center; font-weight: 700;
  color: var(--ink); background: #fff; padding: 0; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cart-panel { position: sticky; top: 78px; display: flex; flex-direction: column; max-height: calc(100vh - 100px); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cart-list { flex: 1; overflow-y: auto; min-height: 80px; }
.cart-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.cart-row .cart-name { flex: 1; min-width: 0; }
.cart-row .cart-name strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-row .cart-note { font-size: 11px; color: var(--ink-3); }
.cart-row .cart-sum { font-weight: 700; font-size: 13px; min-width: 46px; text-align: right; }
.cart-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.cart-total span:last-child { color: var(--brand-dark); }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- 出菜看板 ---------- */
.board-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board-table { overflow: hidden; }
.board-table-head {
  padding: 12px 16px; background: linear-gradient(90deg, #fff7ed, #fff);
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.board-round { border-bottom: 1px solid var(--line); }
.board-round:last-child { border-bottom: 0; }
.board-round-head {
  padding: 8px 16px; background: #fafaf9; display: flex; justify-content: space-between;
  align-items: center; font-size: 12px; color: var(--ink-2);
}
.kitchen-row { padding: 12px 16px; border-top: 1px dashed var(--line); }
.kitchen-row:first-child { border-top: 0; }
.kitchen-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kitchen-name { font-weight: 700; font-size: 14px; }
.qty-triple { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); margin-left: auto; }
.qty-triple b { color: var(--ink); }
.qty-triple .p { color: var(--brand); }
.kitchen-note { font-size: 12px; color: #b45309; background: #fffbeb; display: inline-block; padding: 1px 7px; border-radius: 6px; margin-top: 5px; }
.progress { height: 7px; background: var(--bg); border-radius: 5px; overflow: hidden; margin: 8px 0; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 5px; transition: width .25s; }
.kitchen-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kitchen-actions .spacer { flex: 1; }
.urgent { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.35); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }

/* ---------- 顾客扫码端 ---------- */
.customer-wrap { max-width: 780px; margin: 0 auto; }
.customer-hero {
  background: linear-gradient(120deg, #7c2d12, #c2410c); color: #fff; border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px;
}
.customer-hero h2 { font-size: 20px; }
.customer-hero p { margin: 4px 0 0; opacity: .85; font-size: 13px; }
.customer-progress { margin-top: 12px; background: rgba(255,255,255,.15); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.customer-cart { position: sticky; bottom: 12px; margin-top: 14px; }

/* ---------- 结账 / 报表 ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th, .detail-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.detail-table th { background: #fafaf9; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.detail-table td.num, .detail-table th.num { text-align: right; }
.round-divider { background: var(--brand-light); font-weight: 700; color: var(--brand-dark); }
.sum-line { display: flex; justify-content: space-between; padding: 7px 0; }
.sum-line.total { font-size: 19px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.sum-line.total span:last-child { color: var(--brand-dark); }
.recv-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); margin-top: 4px; }
.recv-line label { font-weight: 700; white-space: nowrap; }
.recv-input-wrap { display: flex; align-items: center; gap: 6px; }
.recv-cur { font-weight: 800; color: var(--brand-dark); }
.recv-input-wrap input { width: 110px; text-align: right; font-size: 17px; font-weight: 800; padding: 6px 8px; border: 1px solid var(--brand); border-radius: 8px; background: #fff; color: var(--brand-dark); }
.recv-more { color: var(--green) !important; font-weight: 700; }
.recv-less { color: var(--red) !important; font-weight: 700; }
.paycode-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.paycode-row:last-child { border-bottom: none; }
.paycode-label { font-weight: 700; margin-right: auto; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0 16px; }
.pay-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 6px; text-align: center; background: #fff; }
.pay-opt.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); font-weight: 700; }
.pay-opt .pay-icon { font-size: 20px; display: block; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 设置 ---------- */
.settings-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.form-row { display: flex; gap: 8px; margin-bottom: 10px; }
.form-row input, .form-row select {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; flex: 1; min-width: 0; background: #fff;
}
.form-row input:focus, .form-row select:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.mini-table th { color: var(--ink-2); font-size: 12px; }

/* 菜品添加表单：带标签的网格，避免窄屏挤压 */
.dish-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; margin-bottom: 14px; }
.df-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.df-field > span { font-size: 11px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.df-field input, .df-field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 14px; min-width: 0; }
.df-field input:focus, .df-field select:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
.df-name { grid-column: span 2; }
.df-add { height: 38px; white-space: nowrap; }

/* 菜品表格：桌面保持表格，窄屏转卡片 */
.dish-table .dc-emoji { font-size: 18px; width: 34px; }
.dish-table .dc-ops { white-space: nowrap; }
.dish-table .dc-ops .btn { margin: 2px; }

/* 分类管理行 */
.cat-manage-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-manage-row:last-of-type { border-bottom: none; }
.cat-manage-name { font-weight: 600; margin-right: auto; }

/* ---------- 二维码 ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; background: #fff; }
.qr-card canvas { width: 120px; height: 120px; image-rendering: pixelated; }
.qr-card .qr-no { font-weight: 800; margin-top: 6px; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(28,25,23,.45); pointer-events: auto;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 16px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.22); padding: 20px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close { border: 0; background: var(--bg); width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast-root { position: fixed; top: 72px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: slideIn .2s ease;
}
.toast.ok { background: #15803d; }
.toast.err { background: var(--red); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.scan-box {
  height: 160px; border-radius: 12px; background: linear-gradient(135deg, #292524, #57534e);
  display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; margin-bottom: 14px;
}
.scan-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.scan-line {
  position: absolute; left: 10%; right: 10%; height: 3px; background: #f87171;
  box-shadow: 0 0 12px 3px rgba(248,113,113,.7); animation: scan 1.4s ease-in-out infinite alternate;
}
@keyframes scan { from { top: 12%; } to { top: 86%; } }
.recognize-result { display: flex; align-items: center; gap: 14px; background: var(--bg); border-radius: 12px; padding: 14px; }
.recognize-result .r-emoji { font-size: 36px; }
.recognize-result .r-info { flex: 1; }
.recognize-result .r-conf { font-size: 12px; color: var(--green); }

/* ---------- 手机端点菜悬浮栏 / 清单抽屉 ---------- */
.mobile-cart-bar { display: none; }
@keyframes sheetUp { from { transform: translateY(24%); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- 响应式断点 ---------- */
/* 平板(768-1099)：保留侧边栏 + 紧凑布局，仅调整内容列数 */
@media (max-width: 1099px) {
  .main { padding: 16px 16px 40px; }
  .stats-grid, .entry-grid, .report-grid { grid-template-columns: repeat(2, 1fr); }
  .table-grid { grid-template-columns: repeat(4, 1fr); }
  .order-layout, .checkout-grid, .settings-cols { grid-template-columns: minmax(0, 1fr); }
  .cart-panel { position: static; max-height: none; }
  .board-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  /* 手机：隐藏侧栏，启用底部导航（5 项高频操作） */
  .sidebar { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    overflow-x: auto; scrollbar-width: none;
  }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bottom-nav .nav-item {
    flex: 0 0 auto; width: auto; flex-direction: column; gap: 2px; font-size: 11px;
    padding: 5px 11px; min-width: 60px; text-align: center; border-radius: 9px;
  }
  .bottom-nav .nav-item .nav-icon { font-size: 18px; }
  .bottom-nav .nav-item .nav-count { display: none; }
  .topbar { padding: 0 12px; height: 54px; }
  .brand-text strong { font-size: 14px; }
  .brand-text small { display: none; }
  .net-badge { display: none; }
  .main { padding: 14px 12px 92px; }
  .page-title { font-size: 19px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 21px; }
  .entry-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .entry-card { padding: 13px; }
  .home-cols, .report-cols { grid-template-columns: 1fr; }
  .table-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .table-card .table-actions { flex-wrap: wrap; }
  .table-card .table-actions .btn { flex: 1 1 auto; min-width: 0; }
  .dish-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pay-grid { grid-template-columns: 1fr 1fr 1fr; }
  .detail-table { font-size: 12px; }
  .detail-table th, .detail-table td { padding: 6px 5px; }

  /* 设置页：添加菜品表单两列，菜品列表改卡片式 */
  .dish-form { grid-template-columns: 1fr 1fr; gap: 10px 8px; }
  .df-name { grid-column: span 2; }
  .df-add { grid-column: span 2; }
  .dish-table thead { display: none; }
  .dish-table, .dish-table tbody, .dish-table tr, .dish-table td { display: block; width: 100%; }
  .dish-table tr { position: relative; padding: 10px 10px 10px 44px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
  .dish-table td { border: none; padding: 2px 0; text-align: left !important; }
  .dish-table td[data-label]:not(.dc-emoji):not(.dc-ops)::before { content: attr(data-label) '：'; color: var(--ink-3); font-size: 11px; }
  .dish-table .dc-emoji { position: absolute; left: 10px; top: 12px; width: auto; font-size: 20px; }
  .dish-table .dc-ops { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
  .dish-table .dc-ops .btn { margin: 0; }

  .toast-root { left: 12px; right: 12px; top: 62px; }
  .toast { text-align: center; }
  .board-table-head, .board-round-head, .kitchen-row { padding-left: 12px; padding-right: 12px; }
  .qty-triple { margin-left: 0; width: 100%; }

  /* 点菜页：底部悬浮购物车取代页尾清单 */
  .page-order { padding-bottom: 150px !important; }
  .page-order .cart-panel { display: none; }
  .mobile-cart-bar {
    display: flex; position: fixed; left: 8px; right: 8px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 8px 28px rgba(28, 25, 23, .18); padding: 9px 12px;
    align-items: center; gap: 8px; z-index: 55;
  }
  .mcb-info { flex: 1; min-width: 0; }
  .mcb-label { font-size: 11px; color: var(--ink-3); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mcb-total { font-size: 19px; font-weight: 800; color: var(--brand-dark); line-height: 1.3; }
  .modal-mask.sheet-mask { align-items: flex-end; padding: 0; }
  .modal-card.sheet {
    width: 100%; max-width: none; max-height: 82vh; border-radius: 18px 18px 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease;
  }
  .modal-card.sheet .modal-foot { flex-wrap: wrap; }
  .modal-card.sheet .modal-foot .btn { flex: 1; padding-left: 6px; padding-right: 6px; }
  .modal-card.sheet .cart-list { max-height: 48vh; }

  /* 菜品卡片：步进器加大并独占一行，方便手指点击 */
  .dish-card .dish-bottom { flex-direction: column; align-items: stretch; gap: 7px; }
  .dish-card .stepper { justify-content: space-between; }
  .dish-card .stepper button { width: 38px; height: 34px; font-size: 18px; }
  .dish-card .stepper input { flex: 1; width: auto; height: 34px; font-size: 15px; }
  .round-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .round-tabs::-webkit-scrollbar { display: none; }
  .round-tab { flex: 0 0 auto; }
}

@media print {
  .topbar, .sidebar, .bottom-nav, .page-actions, .modal-root, .toast-root { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; }
}

/* ---------- 现场点菜：每道菜独占一行 ---------- */
.dish-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dish-list .dish-card { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; min-width: 0; }
.dish-list .dish-card > div:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; }
.dish-list .dish-emoji { flex: 0 0 44px; width: 44px; height: 44px; font-size: 24px; }
.dish-list .dish-name, .dish-list .dish-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-list .dish-card .dish-bottom { flex-direction: row; align-items: center; gap: 14px; flex: 0 0 auto; }
.dish-list .dish-price { min-width: 64px; text-align: right; }
.dish-list .dish-card .stepper { justify-content: flex-start; }
.dish-list .dish-card .stepper button { width: 30px; height: 30px; font-size: 16px; }
.dish-list .dish-card .stepper input { width: 36px; height: 30px; }
@media (max-width: 767px) {
  .dish-list .dish-card { gap: 8px; padding: 9px 10px; }
  .dish-list .dish-emoji { flex-basis: 38px; width: 38px; height: 38px; font-size: 21px; }
  .dish-list .dish-card .dish-bottom { gap: 8px; }
  .dish-list .dish-price { min-width: 56px; font-size: 13px; }
  .dish-list .dish-card .stepper button { width: 34px; height: 32px; font-size: 18px; }
  .dish-list .dish-card .stepper input { width: 34px; height: 32px; }
}

/* ---------- 多店：店铺名 + 绑定页 ---------- */
#shop-name-line { display: none; color: var(--brand-dark); font-weight: 700; opacity: 1 !important; }
@media (max-width: 767px) {
  #shop-name-line { display: block !important; font-size: 11px; }
  #shop-badge { display: none !important; }
  .brand-sub { display: none; }
}
.bind-screen { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 20px; }
.bind-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px 28px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.bind-card h2 { margin: 12px 0 8px; font-size: 20px; }
.bind-card p { font-size: 13px; line-height: 1.7; margin: 0 0 20px; }
.bind-form { display: flex; gap: 8px; }
.bind-form input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 16px; letter-spacing: 2px; text-align: center; text-transform: uppercase; }
.bind-form .btn { flex: 0 0 auto; }
