/* ================= 智享餐饮管理系统 · 全量样式（浅色主题） ================= */
:root {
  --primary: #e8590c; --primary-d: #d9480f; --primary-l: #fff4ec;
  --bg: #f4f6f9; --card: #ffffff; --text: #1a2233; --muted: #64748b;
  --border: #e6eaf0; --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --red: #e03131; --red-l: #fff0f0; --green: #2f9e44; --green-l: #ebfbee;
  --orange: #f08c00; --orange-l: #fff9db; --blue: #1971c2; --blue-l: #e7f5ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
#app { min-height: 100vh; }
#view { min-height: 100vh; }
.boot-tip { padding: 60px; text-align: center; color: var(--muted); }
code { background: #f1f3f5; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px; padding: 8px 16px;
  font-size: 14px; cursor: pointer; background: #fff; color: var(--text);
  transition: all .15s; white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-d); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c92a2a; }
.btn-warn { background: var(--orange); color: #fff; }
.btn-warn:hover:not(:disabled) { background: #e67700; }
.btn-ok { background: var(--green); color: #fff; }
.btn-ok:hover:not(:disabled) { background: #2b8a3e; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: #cbd5e1; background: #f8fafc; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 10px; font-weight: 600; }
.btn-block { width: 100%; }

/* ---------------- 表单 ---------------- */
.pf-label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.pf-input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-size: 14px; background: #fff; color: var(--text); outline: none; transition: border .15s;
}
.pf-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 89, 12, .12); }
.pf-input.sm { padding: 6px 10px; font-size: 13px; width: auto; min-width: 90px; }
.pf-input[readonly] { background: #f8fafc; color: var(--muted); }
.pf-check { display: flex; align-items: center; gap: 7px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.pf-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }

/* ---------------- 弹窗 / Toast ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .18s;
}
.modal-mask.show { opacity: 1; }
.modal {
  background: #fff; border-radius: 14px; width: 480px; max-width: 100%; max-height: 92vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(2, 8, 20, .25);
  transform: translateY(8px); transition: transform .18s;
}
.modal-mask.show .modal { transform: translateY(0); }
.modal-wide { width: 720px; }
.modal-title { font-size: 16px; font-weight: 700; padding: 16px 20px 0; }
.modal-body { padding: 12px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; align-items: center; }
.flex-sp { flex: 1; }
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px;
  padding: 10px 18px; box-shadow: 0 8px 24px rgba(2, 8, 20, .16); font-size: 14px;
  opacity: 0; transform: translateY(-8px); transition: all .25s; border: 1px solid var(--border);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { border-color: #b2f2bb; background: var(--green-l); }
.toast-err { border-color: #ffc9c9; background: var(--red-l); }
.toast-warn { border-color: #ffec99; background: var(--orange-l); }

/* ---------------- 登录页 ---------------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, #fff7ed 0%, #f4f6f9 45%, #e7f5ff 100%); }
.login-card { width: 420px; max-width: 100%; background: #fff; border-radius: 18px; box-shadow: 0 16px 48px rgba(2, 8, 20, .12); overflow: hidden; }
.login-brand { text-align: center; padding: 34px 24px 20px; background: linear-gradient(135deg, #fff4ec, #fff); }
.login-brand h1 { font-size: 22px; margin: 10px 0 6px; }
.login-brand p { color: var(--muted); font-size: 13px; }
.brand-ico { font-size: 30px; }
.brand-ico.lg { font-size: 46px; display: inline-block; }
.login-body { padding: 10px 30px 30px; }
.login-body .btn { margin-top: 20px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-tip a { color: var(--primary); font-weight: 600; }
.login-tip2 { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ---------------- 后台布局 ---------------- */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 216px; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.brand-name { font-weight: 800; font-size: 16px; }
.brand-sub { font-size: 11px; color: var(--muted); }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; color: #475569; font-size: 14px; margin-bottom: 2px; }
.side-item:hover { background: #f8fafc; }
.side-item.active { background: var(--primary-l); color: var(--primary-d); font-weight: 600; }
.side-ico { font-size: 16px; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 14px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.un { font-size: 13px; font-weight: 600; }
.ur { font-size: 11px; color: var(--muted); }
.side-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; }
.side-links a { color: var(--muted); }
.side-links a:hover { color: var(--primary); }
.admin-main { flex: 1; margin-left: 216px; padding: 22px 26px; min-width: 0; }
@media (max-width: 900px) { .sidebar { position: static; width: 100%; } .admin-wrap { flex-direction: column; } .admin-main { margin-left: 0; } .side-nav { display: flex; flex-wrap: wrap; } }

.page { max-width: 1280px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 卡片 / 统计 ---------------- */
.card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; border: 1px solid #eef1f5; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { font-size: 15px; }
.card-link { font-size: 12px; color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); border: 1px solid #eef1f5; }
.stat-ico { font-size: 24px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 19px; font-weight: 800; margin-top: 1px; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-card.c-red .stat-value { color: var(--red); }
.stat-card.c-green .stat-value { color: var(--green); }
.stat-card.c-orange .stat-value { color: var(--orange); }

/* ---------------- 表格 ---------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f1f4f7; vertical-align: middle; }
.tbl tr:hover td { background: #fafbfc; }
.tbl .tr { text-align: right; }
.tbl .tc { text-align: center; }
.td-sub { font-size: 12px; color: var(--muted); }
.t-sub { color: var(--muted); font-size: 12px; }
.row-warn td { background: var(--orange-l); }

/* ---------------- 标签 / 状态 ---------------- */
.chip { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; background: #f1f5f9; color: #475569; }
.chip.abc-a { background: var(--red-l); color: var(--red); }
.chip.abc-b { background: var(--orange-l); color: #b45309; }
.chip.abc-c { background: var(--blue-l); color: var(--blue); }
.st, .ist { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; margin-left: 6px; }
.st-open, .ip-pending { background: #f1f5f9; color: #475569; }
.st-ordered, .ip-cooking { background: var(--blue-l); color: var(--blue); }
.st-checkout, .ip-ready { background: var(--orange-l); color: #b45309; }
.st-closed, .ip-served { background: var(--green-l); color: var(--green); }
.st-cancelled, .ip-refunded { background: var(--red-l); color: var(--red); }
.t-green { color: var(--green); }
.t-red { color: var(--red); }
.t-orange { color: var(--orange); }

/* ---------------- 其他 ---------------- */
.empty-box { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-ico { font-size: 40px; margin-bottom: 8px; }
.empty-page { text-align: center; padding: 80px 20px; }
.empty-page h3 { margin: 12px 0 6px; }
.pos-empty, .ct-empty { text-align: center; color: var(--muted); padding: 36px 16px; font-size: 13px; }
.skeleton { height: 200px; border-radius: 12px; background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 50%, #f1f3f5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 8px 14px; font-size: 14px; color: var(--muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.mt { margin-top: 16px; }
.sep { width: 1px; height: 18px; background: var(--border); display: inline-block; vertical-align: middle; }
.chart-legend { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--muted); padding: 6px 0 2px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.chart-svg { width: 100%; height: auto; display: block; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap .chart-svg { max-width: 220px; }

/* ---------------- 保本核算 ---------------- */
.be-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 12px; }
.be-rows > div { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 10px; background: #fafbfc; border-radius: 8px; }
.be-rows b { font-weight: 700; }
.be-formula { margin-top: 12px; font-size: 12px; color: var(--muted); background: var(--primary-l); border-radius: 8px; padding: 8px 12px; }
.result-card { background: linear-gradient(135deg, #fff4ec, #fff); border: 1px solid #ffd8bf; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }

/* ---------------- 台桌卡片 ---------------- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.table-card { background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; border: 2px solid var(--border); transition: all .15s; user-select: none; }
.table-card:hover { border-color: #cbd5e1; transform: translateY(-1px); }
.table-card.sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 89, 12, .15); }
.table-card.tf { border-color: #b2f2bb; background: #f4fdf6; }
.table-card.to { border-color: #ffc9c9; background: #fff5f5; }
.table-card.tr { border-color: #a5d8ff; background: #f3f9ff; }
.table-card.tc { border-color: #e9ecef; background: #f8fafc; }
.tc-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.tc-head b { font-size: 16px; }
.tc-cap { font-size: 11px; color: var(--muted); }
.tc-name { font-size: 12px; color: var(--muted); }
.tc-order { font-size: 12px; color: var(--blue); margin-top: 3px; }
.tc-order.res { color: #b45309; }
.tc-amount { font-size: 13px; font-weight: 700; color: var(--red); }
.tc-foot { font-size: 11px; color: var(--muted); margin-top: 4px; }
.tc-ops { margin-top: 6px; display: flex; gap: 6px; }
.area-block { margin-bottom: 14px; }
.area-title { font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.area-count { font-size: 11px; color: var(--muted); background: #f1f5f9; padding: 0 8px; border-radius: 10px; }

/* ---------------- 菜品 / BOM ---------------- */
.dish-cell { display: flex; align-items: center; gap: 10px; }
.dish-ico { font-size: 22px; }
.dish-name-cell b { font-size: 14px; }
.dish-sub-cell { font-size: 12px; color: var(--muted); }
.qty-i, .price-i, .rec-i, .sub-i { width: 74px; text-align: center; }
.qty-i input, .price-i input, .rec-i input, .sub-i input { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font-size: 13px; text-align: center; }
.bom-row input { border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.taste-tag { font-style: normal; font-size: 11px; background: #f1f5f9; color: #64748b; border-radius: 4px; padding: 0 6px; margin-right: 4px; }

/* ---------------- 会员 / 套餐 / 采购 ---------------- */
.mem-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mem-info b { font-size: 14px; }
.mem-info div { font-size: 12px; color: var(--muted); }
.mem-amounts { display: flex; gap: 14px; font-size: 12px; }
.mem-amounts b { display: block; font-size: 14px; }
.mem-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #fafbfc; border-radius: 8px; font-size: 13px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pkg-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.pkg-head { display: flex; justify-content: space-between; align-items: center; }
.pkg-price { font-size: 18px; font-weight: 800; color: var(--red); }
.pkg-desc { font-size: 12px; color: var(--muted); margin: 6px 0; }
.pkg-dishes { font-size: 12px; color: #475569; line-height: 1.8; max-height: 120px; overflow-y: auto; }
.pkg-ops { margin-top: 10px; display: flex; gap: 8px; }
.pkg-picker { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.pkg-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed #f1f4f7; }
.po-sel { width: 70px; text-align: center; border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; }
.po-total { margin-top: 10px; text-align: right; font-size: 14px; }
.po-total b { color: var(--red); font-size: 16px; }
.suggest { color: var(--orange); font-size: 12px; }

/* ---------------- 日志 / 角色 / 预警 ---------------- */
.log-list { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; }
.log-row { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; background: #fafbfc; border-radius: 7px; font-size: 13px; }
.log-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.log-user { color: var(--blue); font-size: 12px; white-space: nowrap; }
.role-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-list a, .alert-ok { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fafbfc; border-radius: 9px; font-size: 13px; }
.alert-ico { font-size: 18px; }
.alert-ok { color: var(--green); }

/* ---------------- 顶栏（收银/点菜/后厨） ---------------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--border); padding: 10px 18px; box-shadow: var(--shadow); }
.tb-title { font-size: 17px; font-weight: 800; }
.tb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-user { font-size: 13px; color: var(--muted); }
.tb-link { font-size: 13px; color: var(--primary); font-weight: 600; }
.tb-chip { font-size: 12px; background: #f1f5f9; border-radius: 20px; padding: 4px 12px; color: #475569; }
.tb-chip.on { background: var(--green-l); color: var(--green); }
.tb-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; position: relative; }
.tb-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.pq-n { display: none; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 6px; margin-left: 4px; }

/* ---------------- 收银台三栏 ---------------- */
.pos-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr) 400px; gap: 14px; padding: 14px 16px; align-items: start; }
@media (max-width: 1280px) { .pos-wrap { grid-template-columns: 260px minmax(0, 1fr) 360px; } }
@media (max-width: 1024px) { .pos-wrap { grid-template-columns: 1fr; } }
.pos-col { background: #fff; border-radius: 12px; border: 1px solid #eef1f5; box-shadow: var(--shadow); min-height: 72vh; display: flex; flex-direction: column; overflow: hidden; }
.pos-panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; background: #fafbfc; }
.pos-subhead { font-size: 12px; color: var(--muted); font-weight: 400; }
.pos-legend { margin-left: auto; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.pos-legend .lg { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.pos-legend .lg.free { background: #b2f2bb; } .pos-legend .lg.occ { background: #ffc9c9; }
.pos-legend .lg.res { background: #a5d8ff; } .pos-legend .lg.cln { background: #e9ecef; }
.pos-search { margin-left: auto; }
.pos-tables-scroll { padding: 12px; overflow-y: auto; max-height: calc(100vh - 130px); }
.menu-tabs { display: flex; gap: 6px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid #f1f4f7; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 12px; overflow-y: auto; max-height: calc(100vh - 190px); align-content: start; }
.dish-card { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all .12s; user-select: none; }
.dish-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(232, 89, 12, .12); }
.dish-card.soldout { opacity: .5; cursor: not-allowed; }
.dish-card .dish-ico { font-size: 20px; }
.dish-card .dish-info { margin-top: 4px; }
.dish-card .dish-name { font-weight: 700; font-size: 14px; }
.dish-card .dish-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dish-desc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-card .dish-price { color: var(--red); font-weight: 800; margin-top: 4px; }
.dish-unit { font-size: 11px; color: var(--muted); font-weight: 400; }
.dish-flag { position: absolute; top: 8px; right: 8px; font-size: 11px; border-radius: 6px; padding: 1px 7px; }
.dish-flag.off { background: var(--red-l); color: var(--red); }
.dish-flag.low { background: var(--orange-l); color: #b45309; }

/* ---- 订单面板 ---- */
.oi-scroll { flex: 1; overflow-y: auto; padding: 10px 12px; max-height: calc(100vh - 430px); min-height: 160px; }
.oi-row { display: flex; align-items: flex-start; gap: 6px; padding: 9px 8px; border-radius: 9px; border: 1px solid transparent; }
.oi-row:hover { background: #fafbfc; }
.oi-new { background: #fffbf5; border-color: #ffe8cc; }
.oi-main { flex: 1; min-width: 0; }
.oi-name { font-weight: 600; font-size: 14px; }
.oi-refund { font-size: 11px; background: var(--red-l); color: var(--red); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.oi-opts { font-size: 12px; color: var(--blue); }
.oi-remark { font-size: 12px; color: #b45309; }
.oi-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.oi-meta b { color: var(--text); }
.oi-qty { display: flex; align-items: center; gap: 5px; }
.oi-qty span { min-width: 20px; text-align: center; font-size: 13px; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.qty-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-input { width: 56px; text-align: center; border: 1px solid var(--border); border-radius: 6px; padding: 4px; font-size: 13px; }
.oi-del { border: none; background: none; color: #cbd5e1; font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.oi-del:hover { color: var(--red); background: var(--red-l); }
.oi-remark-row { display: flex; gap: 8px; align-items: center; margin: 0 12px 8px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.oi-remark-row.has { color: #b45309; border-color: #ffd8a8; background: #fffbf5; }
.oi-totals { border-top: 1px solid var(--border); padding: 10px 14px; }
.oi-total-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.oi-total-row.big { font-size: 15px; font-weight: 800; padding-top: 7px; }
.oi-total-row.big b { font-size: 19px; }
.oi-total-row.sub { color: var(--muted); font-size: 12px; }
.oi-actions { display: flex; gap: 8px; padding: 0 14px 12px; }
.oi-actions .btn { flex: 1; }
.oi-more { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.open-box { padding: 34px 22px; text-align: center; }
.open-ico { font-size: 44px; }
.open-box p { color: var(--muted); margin: 8px 0 14px; }
.open-form { max-width: 240px; margin: 0 auto; text-align: left; }
.closed-box { padding: 30px 22px; text-align: center; }
.closed-amt { font-size: 34px; font-weight: 800; color: var(--red); }
.closed-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.closed-pays { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pay-chip { background: #f1f5f9; border-radius: 6px; padding: 2px 10px; font-size: 12px; }
.closed-ops { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ---- 规格口味弹窗 ---- */
.dp-price { font-size: 14px; color: var(--red); font-weight: 700; }
.dp-none { color: var(--muted); font-size: 13px; padding: 6px 0; }
.dp-group { margin-bottom: 14px; }
.dp-group-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.dp-req { font-size: 11px; background: var(--red-l); color: var(--red); border-radius: 4px; padding: 0 6px; margin-left: 6px; font-weight: 400; }
.dp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-opt { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.dp-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-l); }
.dp-delta { font-style: normal; font-size: 11px; color: var(--red); }
.dp-foot { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 4px; }
.dp-qty { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.dp-total { font-size: 15px; font-weight: 800; color: var(--red); margin-right: auto; }

/* ---- 结账弹窗 ---- */
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .co-grid { grid-template-columns: 1fr; } }
.co-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; }
.co-row b { font-weight: 700; }
.co-total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; font-size: 15px; }
.co-total b { font-size: 22px; }
.co-quick { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.co-hr { border-top: 1px solid var(--border); margin: 10px 0; }
.co-member-tip { font-size: 12px; padding: 6px 10px; border-radius: 7px; background: #f8fafc; }
.co-member-tip.warn { background: var(--orange-l); color: #b45309; }
.co-member-ok { font-size: 13px; background: var(--green-l); color: var(--green); border-radius: 8px; padding: 7px 11px; margin-top: 6px; }
.co-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.co-pay-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.co-pay-row .pf-input { flex: 1; min-width: 0; }
.co-pay-empty { font-size: 12px; color: var(--muted); padding: 8px 0; }
.co-paid { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; font-weight: 700; }
.co-hint { font-size: 12px; color: var(--orange); margin-right: auto; }
.shift-tip { font-size: 12px; color: var(--muted); margin-top: 12px; background: #fafbfc; border-radius: 8px; padding: 8px 11px; }
.pq-row { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 10px; overflow: hidden; }
.pq-meta { display: flex; justify-content: space-between; padding: 7px 11px; background: #fafbfc; font-size: 13px; }
.pq-meta span { color: var(--muted); font-size: 12px; }
.pq-content { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 12px; padding: 10px 12px; white-space: pre-wrap; line-height: 1.7; max-height: 220px; overflow-y: auto; }
.ticket-pre { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: 13px; background: #fffdf8; border: 1px dashed #ffd8a8; border-radius: 9px; padding: 14px; white-space: pre-wrap; line-height: 1.8; }
.split-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; margin-bottom: 12px; }
.split-item { border-bottom: 1px dashed #f1f4f7; }
.ready-tip { font-size: 13px; color: #b45309; background: var(--orange-l); border-radius: 8px; padding: 8px 12px; align-self: center; }
.wt-scope { display: flex; gap: 6px; padding: 10px 12px 0; }

/* ---------------- 后厨 KDS ---------------- */
.kds-wrap { padding: 16px; min-height: calc(100vh - 60px); }
.kds-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kds-col { background: #fff; border-radius: 12px; border: 1px solid #eef1f5; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.kds-col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; font-weight: 800; font-size: 15px; border-bottom: 2px solid var(--border); background: #fafbfc; border-radius: 12px 12px 0 0; }
.kds-col-head.kds-warn { border-bottom-color: var(--orange); color: #b45309; }
.kds-col-head.kds-urgent { border-bottom-color: var(--red); color: var(--red); }
.kds-count { background: #f1f5f9; border-radius: 12px; font-size: 12px; padding: 1px 10px; }
.kds-col-body { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.kds-card { border: 2px solid var(--border); border-radius: 11px; overflow: hidden; background: #fff; }
.kds-card.kds-warn { border-color: #ffd8a8; }
.kds-card.kds-urgent { border-color: #ffa8a8; background: #fff8f8; }
.kds-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; background: #fafbfc; font-size: 14px; border-bottom: 1px solid #f1f4f7; }
.kds-card-head b { font-size: 16px; }
.kds-no { font-size: 11px; color: var(--muted); }
.kds-wait { margin-left: auto; font-size: 12px; color: #b45309; font-weight: 700; }
.kds-urgent .kds-wait { color: var(--red); }
.kds-table { font-size: 12px; color: var(--muted); padding: 4px 11px 0; }
.kds-items { padding: 6px 11px 10px; display: flex; flex-direction: column; gap: 7px; }
.kds-item { border-top: 1px dashed #f1f4f7; padding-top: 7px; }
.kds-item:first-child { border-top: none; padding-top: 0; }
.kds-item-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kds-item-name { font-weight: 700; font-size: 14px; }
.kds-qty { color: var(--red); font-weight: 800; font-size: 13px; }
.kds-opts { font-size: 12px; color: var(--blue); margin-top: 1px; }
.kds-remark { font-size: 12px; color: #b45309; background: var(--orange-l); border-radius: 5px; padding: 1px 7px; margin-top: 3px; display: inline-block; }
.kds-item-ops { margin-top: 5px; display: flex; gap: 6px; }
.kds-empty { text-align: center; padding: 90px 20px; color: var(--muted); }
.kds-empty h3 { margin: 10px 0 4px; }
.sold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sold-card { border: 2px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; transition: all .12s; }
.sold-card:hover { border-color: #cbd5e1; }
.sold-card.is-sold { border-color: var(--red); background: var(--red-l); }
.sold-card.is-off { border-color: #adb5bd; background: #f1f3f5; opacity: .7; }
.sold-name { font-weight: 700; font-size: 14px; }
.sold-st { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sold-card.is-sold .sold-st { color: var(--red); }
.sold-mk { font-size: 11px; color: var(--orange); margin-top: 2px; }

/* ---------------- 二维码弹窗 ---------------- */
.modal-qr { width: 320px; }
.qr-box { display: flex; align-items: center; justify-content: center; min-height: 210px; background: #fff; border-radius: 10px; }
.qr-box img, .qr-box canvas { display: block; }
.qr-url { font-size: 11px; color: var(--muted); word-break: break-all; text-align: center; margin-top: 10px; }
.qr-tip { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------------- 客户端（移动端优先） ---------------- */
.ct-page { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 76px; position: relative; }
.ct-head { background: linear-gradient(135deg, var(--primary), #f08c00); color: #fff; padding: 20px 18px 16px; }
.ct-shop { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.ct-table-badge { font-size: 12px; background: rgba(255, 255, 255, .25); border-radius: 20px; padding: 2px 11px; }
.ct-table-badge.none { background: rgba(255, 255, 255, .14); }
.ct-shop-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.ct-body { padding: 14px; }
.ct-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.ct-chip { border: 1px solid var(--border); background: #fff; border-radius: 20px; padding: 5px 14px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.ct-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ct-dish-list { display: flex; flex-direction: column; gap: 10px; }
.ct-dish { display: flex; gap: 11px; background: #fff; border-radius: 12px; padding: 12px; border: 1px solid #eef1f5; cursor: pointer; }
.ct-dish.sold { opacity: .55; }
.ct-dish-img { width: 58px; height: 58px; border-radius: 10px; background: #fff7ed; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.ct-dish-info { flex: 1; min-width: 0; }
.ct-dish-name { font-weight: 700; font-size: 15px; }
.ct-rec { font-size: 10px; background: var(--red-l); color: var(--red); border-radius: 4px; padding: 0 5px; margin-left: 6px; font-weight: 400; vertical-align: 1px; }
.ct-dish-desc { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-dish-meta { font-size: 11px; color: #94a3b8; margin-top: 3px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.ct-dish-meta i { font-style: normal; background: #f1f5f9; border-radius: 4px; padding: 0 5px; }
.ct-sold { color: var(--red); }
.ct-low { color: var(--orange); }
.ct-dish-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ct-dish-price { color: var(--red); font-weight: 800; font-size: 15px; }
.ct-unit { font-size: 11px; color: var(--muted); font-weight: 400; }
.ct-add { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ct-cart-n { font-size: 12px; color: var(--primary); font-weight: 700; }
.ct-cart-bar { position: fixed; bottom: 58px; left: 50%; transform: translateX(-50%); width: min(640px, 100%); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; background: #fff; border-top: 1px solid var(--border); padding: 10px 16px; }
.ct-cart-info b { color: var(--red); margin-right: 8px; }
.ct-cart-info span { font-size: 13px; color: var(--muted); }
.ct-cart-btn { background: var(--primary); color: #fff; border: none; border-radius: 20px; padding: 9px 26px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ct-cart-btn.disabled { background: #cbd5e1; }
.ct-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(640px, 100%); z-index: 31;
  display: flex; background: #fff; border-top: 1px solid var(--border); }
.ct-tab { flex: 1; border: none; background: none; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); cursor: pointer; }
.ct-tab.active { color: var(--primary); font-weight: 700; }
.ct-card { background: #fff; border-radius: 12px; padding: 15px 16px; margin-bottom: 14px; border: 1px solid #eef1f5; }
.ct-card h3 { font-size: 16px; margin-bottom: 8px; }
.ct-form-grid { display: flex; flex-direction: column; }
.ct-form-grid .pf-label { margin: 10px 0 4px; }
.ct-submit { margin-top: 16px; border: none; background: var(--primary); color: #fff; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; }
.ct-submit.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.ct-tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.ct-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0; }
.ct-slot { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 7px 0; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.ct-slot b { font-size: 13px; }
.ct-slot span { font-size: 10px; color: var(--muted); }
.ct-slot.active { border-color: var(--primary); background: var(--primary-l); }
.ct-slot.active span { color: var(--primary); }
.ct-slot.none { opacity: .4; cursor: not-allowed; }
.ct-mem-row { display: flex; gap: 10px; }
.ct-mem-item { flex: 1; background: linear-gradient(135deg, #fff4ec, #fff); border-radius: 10px; padding: 12px; text-align: center; }
.ct-mem-item b { font-size: 18px; color: var(--red); display: block; }
.ct-mem-item span { font-size: 11px; color: var(--muted); }
.ct-mem-phone { font-size: 13px; color: var(--muted); margin-top: 10px; }
.ct-coupons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ct-coupon { border: 1px dashed #ffc9c9; background: #fff8f8; border-radius: 8px; padding: 7px 12px; font-size: 12px; }
.ct-coupon b { display: block; font-size: 13px; }
.ct-coupon span { color: var(--red); }
.ct-sheet-list { border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; }
.ct-sheet-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #f1f4f7; font-size: 13px; }
.ct-sheet-row:last-child { border-bottom: none; }
.ct-sheet-name { flex: 1; min-width: 0; }
.ct-sheet-opts { display: block; font-size: 11px; color: var(--blue); }
.ct-sheet-qty { color: var(--muted); }
.ct-sheet-amt { font-weight: 700; min-width: 60px; text-align: right; }
.ct-sheet-total { text-align: right; font-size: 14px; margin-bottom: 8px; }
.ct-sheet-total b { color: var(--red); font-size: 18px; }
.ct-ok { text-align: center; padding: 70px 26px; }
.ct-ok-ico { font-size: 56px; }
.ct-ok h3 { margin: 12px 0 8px; }
.ct-ok p { color: var(--muted); font-size: 14px; }
.ct-ok-tip { font-size: 12px; margin-top: 6px; }
.ct-ok .ct-submit { max-width: 220px; margin: 22px auto 0; }
.ct-res-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #f1f4f7; }
.ct-res-row:last-child { border-bottom: none; }
.ct-res-main { flex: 1; min-width: 0; }
.ct-res-main b { font-size: 14px; display: block; }
.ct-res-main span { font-size: 12px; color: var(--muted); }
.ct-res-cancel { border: 1px solid #ffc9c9; color: var(--red); background: #fff; border-radius: 6px; font-size: 12px; padding: 3px 10px; cursor: pointer; }
.ct-error { text-align: center; padding: 90px 26px; color: var(--muted); }
.ct-error h3 { margin: 12px 0 6px; color: var(--text); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d4dae2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b9c2cd; }
::-webkit-scrollbar-track { background: transparent; }
