/* 在线点餐系统 /tools/order —— 样式（复用站点主题变量，暗/亮色自适应） */
body.page-order-full .app { max-width: 100%; }
body.page-order-full .main-content { max-width: 100%; width: 100%; border-right: 0; }

.od-page {
  --od-bg: var(--bg-primary, #fff);
  --od-panel: var(--bg-secondary, #f4f6fa);
  --od-line: var(--border-color, #e6e9f0);
  --od-text: var(--text-primary, #1c2330);
  --od-sub: var(--text-secondary, #6b7385);
  --od-accent: #e8590c;          /* 餐饮暖色主色 */
  --od-accent-soft: rgba(232, 89, 12, .12);
  --od-ok: #2f9e44;
  --od-warn: #f08c00;
  --od-danger: #e03131;
  --od-radius: 12px;
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-h, 56px));
  min-height: 560px;
  background: var(--od-bg);
  color: var(--od-text);
  font-size: 14px;
}
.od-page *, .od-page *::before, .od-page *::after { box-sizing: border-box; }
.od-page [hidden] { display: none !important; }

/* ---------- 通用控件 ---------- */
.od-btn {
  border: 1px solid var(--od-line); background: var(--od-bg); color: var(--od-text);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.od-btn:hover { border-color: var(--od-accent); }
.od-btn:active { transform: translateY(1px); }
.od-btn:disabled { opacity: .45; cursor: not-allowed; }
.od-btn-primary { background: var(--od-accent); border-color: var(--od-accent); color: #fff; }
.od-btn-primary:hover { filter: brightness(1.06); }
.od-btn-ghost { background: transparent; }
.od-btn-danger { background: transparent; border-color: var(--od-danger); color: var(--od-danger); }
.od-btn-danger:hover { background: rgba(224, 49, 49, .08); }
.od-btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.od-btn-block { width: 100%; padding: 11px 14px; font-size: 15px; font-weight: 600; }
.od-input {
  border: 1px solid var(--od-line); background: var(--od-bg); color: var(--od-text);
  border-radius: 9px; padding: 7px 10px; font-size: 13px; width: 100%; min-width: 0;
}
.od-input:focus { outline: none; border-color: var(--od-accent); }
.od-select { width: auto; min-width: 108px; }
.od-textarea { resize: vertical; font-family: inherit; line-height: 1.6; }
.od-linkbtn { border: 0; background: transparent; color: var(--od-sub); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.od-linkbtn:hover { color: var(--od-danger); }
.od-tip { font-size: 11.5px; color: var(--od-sub); }
.od-tip-block { margin-top: 10px; line-height: 1.6; }
.od-count { font-size: 12px; color: var(--od-sub); margin-left: auto; }
.od-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--od-accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* ---------- 顶部店铺条 ---------- */
.od-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--od-panel); border-bottom: 1px solid var(--od-line);
}
.od-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.od-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--od-accent-soft);
}
.od-brand-txt { min-width: 0; }
.od-shop { font-weight: 700; font-size: 15px; line-height: 1.2; }
.od-notice { font-size: 11.5px; color: var(--od-sub); margin-top: 2px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-open {
  border: 1px solid var(--od-ok); color: var(--od-ok); background: transparent;
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.od-open.is-closed { border-color: var(--od-sub); color: var(--od-sub); }
.od-roles { display: flex; gap: 4px; background: var(--od-bg); border: 1px solid var(--od-line); border-radius: 11px; padding: 3px; }
.od-role { border: 0; background: transparent; color: var(--od-sub); padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.od-role.is-active { background: var(--od-accent); color: #fff; font-weight: 600; }

/* ---------- 主体 / 视图 ---------- */
.od-body { flex: 1; min-height: 0; display: flex; }
.od-view { display: none; flex: 1; min-width: 0; flex-direction: column; }
.od-view.is-active { display: flex; }

/* 顾客 tabs */
.od-ctabs { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--od-line); }
.od-ctab { border: 0; background: transparent; color: var(--od-sub); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.od-ctab.is-active { background: var(--od-panel); color: var(--od-text); font-weight: 600; }
.od-ctab-spacer { flex: 1; }
.od-cpane { display: none; flex: 1; min-height: 0; }
.od-cpane.is-active { display: flex; flex-direction: column; }

/* ---------- 点餐三栏 ---------- */
.od-menu-wrap { flex: 1; min-height: 0; display: flex; }
.od-cats {
  width: 124px; flex: 0 0 124px; border-right: 1px solid var(--od-line);
  background: var(--od-panel); overflow-y: auto; padding: 10px 8px;
}
.od-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; border: 0; background: transparent; color: var(--od-sub);
  padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; text-align: left;
}
.od-cat:hover { background: var(--od-bg); }
.od-cat.is-active { background: var(--od-bg); color: var(--od-accent); font-weight: 700; box-shadow: inset 0 0 0 1px var(--od-accent-soft); }
.od-cat-n { font-size: 11px; opacity: .7; }

.od-dish-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-searchbar { display: flex; gap: 8px; padding: 12px 14px; }
.od-dish-grid {
  flex: 1; overflow-y: auto; padding: 0 14px 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; align-content: start;
}
.od-empty { padding: 40px 0; text-align: center; color: var(--od-sub); font-size: 13px; }

/* 菜品卡片 */
.od-dish {
  border: 1px solid var(--od-line); border-radius: var(--od-radius); background: var(--od-bg);
  padding: 12px; display: flex; gap: 11px; position: relative; overflow: hidden;
}
.od-dish.is-out { opacity: .55; }
.od-dish-pic {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 10px; font-size: 30px;
  display: flex; align-items: center; justify-content: center; background: var(--od-accent-soft);
}
.od-dish-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.od-dish-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-dish-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.od-star { color: var(--od-warn); font-size: 12px; }
.od-dish-desc { font-size: 11.5px; color: var(--od-sub); margin-top: 3px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.od-dish-tags { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }
.od-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--od-line); color: var(--od-sub); }
.od-tag.hot { border-color: var(--od-danger); color: var(--od-danger); }
.od-tag.new { border-color: var(--od-ok); color: var(--od-ok); }
.od-dish-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; }
.od-price { color: var(--od-accent); font-weight: 700; font-size: 15px; }
.od-price small { font-size: 11px; font-weight: 400; color: var(--od-sub); }
.od-add {
  margin-left: auto; border: 0; background: var(--od-accent); color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1;
}
.od-add:disabled { background: var(--od-sub); cursor: not-allowed; }
.od-out-tag { position: absolute; right: 10px; top: 10px; font-size: 11px; color: var(--od-sub); border: 1px solid var(--od-line); border-radius: 6px; padding: 1px 6px; }

/* 菜品卡片：自定义标题图片（顶部 banner） */
.od-dish.has-photo { flex-direction: column; padding: 0; gap: 0; }
.od-dish-banner { position: relative; width: 100%; height: 118px; overflow: hidden; background: var(--od-accent-soft); border-radius: var(--od-radius) var(--od-radius) 0 0; }
.od-dish-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-dish-emoji { position: absolute; left: 10px; bottom: -18px; width: 42px; height: 42px; border-radius: 11px; background: var(--od-bg); border: 1px solid var(--od-line); box-shadow: 0 2px 8px rgba(0,0,0,.16); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.od-dish.has-photo .od-dish-main { padding: 24px 12px 12px; }
.od-dish.has-photo .od-out-tag { background: var(--od-bg); }

/* 菜品编辑：标题图片控件 */
.od-photo-edit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.od-photo-edit .od-tip { margin: 0; }
.od-photo-prev { position: relative; width: 120px; }
.od-photo-prev img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--od-line); display: block; }
.od-photo-rm { position: absolute; right: 4px; top: 4px; }
.od-btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 999px; }

/* ---------- 购物车 ---------- */
.od-cart {
  width: 300px; flex: 0 0 300px; border-left: 1px solid var(--od-line);
  display: flex; flex-direction: column; background: var(--od-panel); min-height: 0;
}
.od-cart-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px 9px; }
.od-cart-title { font-weight: 700; font-size: 14px; }
.od-cart-cnt { font-size: 12px; color: var(--od-sub); }
.od-cart-head .od-linkbtn { margin-left: auto; }
.od-cart-items { flex: 1; overflow-y: auto; padding: 0 10px; }
.od-cart-empty { padding: 30px 14px; text-align: center; color: var(--od-sub); font-size: 12.5px; }
.od-ci { background: var(--od-bg); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; }
.od-ci-top { display: flex; align-items: baseline; gap: 6px; }
.od-ci-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-ci-price { color: var(--od-accent); font-weight: 700; font-size: 13px; }
.od-ci-opts { font-size: 11px; color: var(--od-sub); margin-top: 3px; line-height: 1.5; }
.od-ci-note { font-size: 11px; color: var(--od-warn); margin-top: 2px; }
.od-ci-ops { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.od-qty { display: inline-flex; align-items: center; gap: 2px; }
.od-qbtn {
  width: 26px; height: 26px; border: 1px solid var(--od-line); background: var(--od-bg);
  color: var(--od-text); border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
}
.od-qbtn:hover { border-color: var(--od-accent); }
.od-qty b { min-width: 26px; text-align: center; font-size: 13px; }
.od-ci-del { margin-left: auto; }
.od-cart-foot { border-top: 1px solid var(--od-line); padding: 11px 14px 14px; }
.od-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--od-sub); margin-bottom: 5px; }
.od-row b { color: var(--od-text); font-weight: 600; }
.od-row-dis b { color: var(--od-danger); }
.od-sum { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 10px; }
.od-sum span { font-size: 13px; }
.od-sum b { color: var(--od-accent); font-size: 20px; font-weight: 700; }

/* 移动端悬浮购物车条（≥1024px 由右侧固定购物车栏承担，故默认隐藏） */
.od-cartbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--od-panel); border-top: 1px solid var(--od-line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
}
.od-cartbar-main {
  flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: transparent;
  color: var(--od-text); cursor: pointer; text-align: left; padding: 4px 0; min-width: 0;
}
.od-cartbar-ico {
  width: 38px; height: 38px; border-radius: 50%; background: var(--od-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 38px;
}
.od-cartbar-txt { display: flex; flex-direction: column; line-height: 1.3; }
.od-cartbar-txt b { font-size: 13px; }
.od-cartbar-txt i { font-style: normal; color: var(--od-accent); font-weight: 700; font-size: 14px; }

/* ---------- 我的订单 ---------- */
.od-mine-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px 6px; }
.od-mine-title { font-weight: 700; font-size: 15px; }
.od-mine-ops { margin-left: auto; }
.od-mine { flex: 1; overflow-y: auto; padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.od-mcard { border: 1px solid var(--od-line); border-radius: var(--od-radius); background: var(--od-bg); padding: 12px 14px; }
.od-mcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-mcard-no { font-weight: 700; font-size: 13px; }
.od-mcard-time { font-size: 11.5px; color: var(--od-sub); }
.od-status { margin-left: auto; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--od-line); color: var(--od-sub); }
.od-status.pending { border-color: var(--od-warn); color: var(--od-warn); }
.od-status.cooking { border-color: var(--od-accent); color: var(--od-accent); }
.od-status.ready, .od-status.delivering { border-color: #1971c2; color: #1971c2; }
.od-status.done { border-color: var(--od-ok); color: var(--od-ok); }
.od-status.canceled { border-color: var(--od-sub); color: var(--od-sub); text-decoration: line-through; }
.od-mcard-items { margin-top: 8px; font-size: 12.5px; color: var(--od-sub); line-height: 1.7; }
.od-mcard-foot { margin-top: 9px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-mcard-total { font-weight: 700; color: var(--od-accent); font-size: 15px; }
.od-mcard-foot .od-btn { margin-left: auto; }

/* ---------- 商家端 ---------- */
.od-atabs { display: flex; gap: 4px; padding: 9px 16px; border-bottom: 1px solid var(--od-line); flex-wrap: wrap; }
.od-atab { border: 0; background: transparent; color: var(--od-sub); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.od-atab.is-active { background: var(--od-accent); color: #fff; font-weight: 600; }
.od-apane { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 24px; flex-direction: column; gap: 14px; }
.od-apane.is-active { display: flex; }

.od-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.od-stat { border: 1px solid var(--od-line); border-radius: var(--od-radius); background: var(--od-bg); padding: 13px 15px; }
.od-stat-k { font-size: 12px; color: var(--od-sub); }
.od-stat-v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.od-stat-v.accent { color: var(--od-accent); }
.od-stat-s { font-size: 11px; color: var(--od-sub); margin-top: 2px; }

.od-panel { border: 1px solid var(--od-line); border-radius: var(--od-radius); background: var(--od-bg); padding: 13px 15px; }
.od-panel-head { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.od-hot { display: flex; flex-direction: column; gap: 7px; }
.od-hot-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.od-hot-i { width: 20px; height: 20px; border-radius: 6px; background: var(--od-accent-soft); color: var(--od-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 20px; }
.od-hot-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-hot-bar { height: 6px; border-radius: 3px; background: var(--od-accent); min-width: 3px; }
.od-hot-q { font-size: 12px; color: var(--od-sub); width: 52px; text-align: right; }

.od-filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-filterbar .od-input { width: auto; flex: 0 1 200px; }
.od-orders, .od-adish, .od-promos { display: flex; flex-direction: column; gap: 10px; }
.od-ocard, .od-aitem, .od-pitem { border: 1px solid var(--od-line); border-radius: var(--od-radius); background: var(--od-bg); padding: 12px 14px; }
.od-ocard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-ocard-no { font-weight: 700; font-size: 13px; }
.od-ocard-meta { font-size: 11.5px; color: var(--od-sub); }
.od-ocard-items { margin-top: 7px; font-size: 12.5px; color: var(--od-sub); line-height: 1.7; }
.od-ocard-foot { margin-top: 9px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.od-ocard-total { font-weight: 700; color: var(--od-accent); }
.od-ocard-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.od-aitem { display: flex; gap: 11px; align-items: center; }
.od-aitem-pic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; background: var(--od-accent-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.od-aitem-main { flex: 1; min-width: 0; }
.od-aitem-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.od-aitem-sub { font-size: 11.5px; color: var(--od-sub); margin-top: 3px; }
.od-aitem-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.od-pitem { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.od-pitem-main { flex: 1; min-width: 0; }
.od-pitem-name { font-weight: 600; font-size: 13.5px; }
.od-pitem-sub { font-size: 11.5px; color: var(--od-sub); margin-top: 2px; }

.od-form { display: flex; flex-wrap: wrap; gap: 10px; }
.od-field { display: flex; align-items: center; gap: 8px; }
.od-field > span:first-child { font-size: 12px; color: var(--od-sub); width: 62px; flex: 0 0 62px; }
.od-field .od-input { width: 180px; }
.od-field-wide { flex: 1 1 100%; }
.od-field-wide .od-input { width: 100%; }
.od-form-check { margin-top: 12px; }
.od-coupon { display: flex; gap: 6px; flex: 1; }
.od-coupon .od-input { flex: 1; width: auto; }
.od-coupon-msg { margin-top: 8px; font-size: 12px; }
.od-coupon-msg.ok { color: var(--od-ok); }
.od-coupon-msg.err { color: var(--od-danger); }
.od-seg { display: flex; gap: 4px; background: var(--od-panel); border: 1px solid var(--od-line); border-radius: 11px; padding: 3px; }
.od-segbtn { flex: 1; border: 0; background: transparent; color: var(--od-sub); padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.od-segbtn.is-active { background: var(--od-bg); color: var(--od-accent); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.od-check-items { margin-top: 10px; border-top: 1px dashed var(--od-line); padding-top: 10px; max-height: 210px; overflow-y: auto; }
.od-check-sum { margin-top: 10px; border-top: 1px solid var(--od-line); padding-top: 10px; }
.od-databtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 弹窗 ---------- */
.od-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .42);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.od-modal {
  width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--od-bg); color: var(--od-text); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.od-modal-sm { max-width: 400px; }
.od-modal-head { display: flex; align-items: center; padding: 14px 16px 10px; font-weight: 700; font-size: 15px; }
.od-x { margin-left: auto; border: 0; background: transparent; color: var(--od-sub); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.od-modal-body { padding: 0 16px; overflow-y: auto; }
.od-modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px 16px; }
.od-modal-foot .od-btn-danger { margin-right: auto; }
.od-opt-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--od-line); margin-top: 4px; }
.od-opt-foot .od-field > span:first-child { width: auto; flex: 0 0 auto; }
.od-opt-price { margin-left: auto; font-size: 13px; }
.od-opt-price b { color: var(--od-accent); font-size: 17px; }
.od-optgroup { padding: 8px 0; border-bottom: 1px dashed var(--od-line); }
.od-optgroup:last-child { border-bottom: 0; }
.od-optgroup-t { font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.od-optgroup-t em { font-style: normal; font-size: 11px; color: var(--od-sub); font-weight: 400; margin-left: 5px; }
.od-opt-note { display: flex; align-items: center; gap: 8px; padding: 10px 0 4px; border-top: 1px dashed var(--od-line); margin-top: 6px; }
.od-opt-note > span { font-size: 12px; color: var(--od-sub); flex: 0 0 auto; }
.od-opt-note .od-input { flex: 1; }
.od-optchips { display: flex; gap: 7px; flex-wrap: wrap; }
.od-optchip {
  border: 1px solid var(--od-line); background: var(--od-bg); color: var(--od-text);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.od-optchip.is-on { background: var(--od-accent); border-color: var(--od-accent); color: #fff; }
.od-optchip i { font-style: normal; opacity: .75; font-size: 11px; margin-left: 3px; }
.od-catlist { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.od-catrow { display: flex; align-items: center; gap: 8px; }
.od-catrow .od-input { flex: 1; }
.od-catadd { display: flex; gap: 8px; }
.od-catadd .od-input { flex: 1; }

/* ---------- 扫码支付弹窗 ---------- */
.od-modal-pay { max-width: 380px; text-align: center; }
.od-pay-amount { font-size: 14px; color: var(--od-sub); margin-bottom: 14px; }
.od-pay-amount b { color: var(--od-accent); font-size: 24px; font-weight: 700; margin-left: 4px; }
.od-pay-channels { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.od-pay-ch {
  flex: 1 1 0; min-width: 96px; border: 1px solid var(--od-line); background: var(--od-bg); color: var(--od-text);
  border-radius: 12px; padding: 14px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: border-color .15s, background .15s, transform .05s;
}
.od-pay-ch:hover { border-color: var(--od-accent); }
.od-pay-ch:active { transform: translateY(1px); }
.od-pay-ch.is-active { border-color: var(--od-accent); background: var(--od-accent-soft); }
.od-pay-ch-ico { font-size: 26px; line-height: 1; }
.od-pay-ch-name { font-size: 13px; font-weight: 600; }
.od-pay-qr { margin: 6px auto 0; padding: 14px; background: #fff; border-radius: 12px; display: inline-block; }
.od-pay-qr canvas, .od-pay-qr img { display: block; width: 220px; height: 220px; }
.od-pay-tip { margin-top: 12px; font-size: 13px; color: var(--od-sub); }
.od-pay-tip b { color: var(--od-text); }
.od-pay-switch { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--od-accent); cursor: pointer; text-decoration: none; }
.od-pay-switch:hover { text-decoration: underline; }
.od-pay-status { margin-top: 12px; font-size: 13px; padding: 8px 12px; border-radius: 9px; }
.od-pay-status.ok { color: var(--od-ok); background: rgba(47, 158, 68, .1); }
.od-pay-status.wait { color: var(--od-warn); background: rgba(240, 140, 0, .1); }
.od-pay-status.err { color: var(--od-danger); background: rgba(224, 49, 49, .1); }

@media (max-width: 680px) {
  .od-pay-qr canvas, .od-pay-qr img { width: 196px; height: 196px; }
  .od-pay-channels { gap: 8px; }
  .od-pay-ch { min-width: 84px; padding: 12px 6px; }
}

/* ---------- Toast ---------- */
.od-toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%);
  background: #1c2330; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 9999; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); max-width: 82vw; text-align: center;
}

/* ---------- 打印小票 ---------- */
.od-print { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
  .od-cats { width: 106px; flex-basis: 106px; }
  .od-cart { width: 268px; flex-basis: 268px; }
}
@media (max-width: 1023px) {
  .od-cats {
    width: auto; flex-basis: auto; border-right: 0; border-bottom: 1px solid var(--od-line);
    overflow-x: auto; overflow-y: hidden; display: flex; gap: 6px; padding: 10px 14px;
  }
  .od-cat { width: auto; flex: 0 0 auto; padding: 7px 13px; white-space: nowrap; border: 1px solid var(--od-line); }
  .od-cat.is-active { border-color: var(--od-accent); }
  .od-menu-wrap { flex-direction: column; }
  .od-dish-col { min-height: 0; }
  .od-cart {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; width: auto; flex-basis: auto;
    max-height: 74vh; border-left: 0; border-top: 1px solid var(--od-line);
    transform: translateY(102%); transition: transform .22s ease;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .12);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .od-cart.is-open { transform: translateY(0); }
  .od-cartbar { display: flex; }
  .od-cpane.is-active { padding-bottom: 66px; }
}
@media (max-width: 680px) {
  .od-page { height: auto; min-height: 100vh; }
  .od-notice { max-width: 100%; }
  .od-top { gap: 8px; padding: 8px 12px; }
  .od-role { padding: 6px 10px; font-size: 12px; }
  .od-dish-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 12px 14px; }
  .od-dish { padding: 10px; gap: 9px; }
  .od-dish-pic { width: 52px; height: 52px; flex-basis: 52px; font-size: 25px; }
  .od-dish.has-photo { padding: 0; gap: 0; }
  .od-dish-banner { height: 100px; }
  .od-dish.has-photo .od-dish-main { padding: 22px 10px 10px; }
  .od-searchbar { padding: 10px 12px; }
  .od-apane { padding: 12px 12px 22px; }
  .od-atabs, .od-ctabs { padding: 8px 12px; }
  .od-atab, .od-ctab { padding: 6px 11px; font-size: 12.5px; }
  .od-field > span:first-child { width: 54px; flex-basis: 54px; }
  .od-field .od-input { width: 100%; }
  .od-field { flex: 1 1 100%; }
  .od-modal { max-height: 92vh; }
  .od-input, .od-select { font-size: 16px; } /* 防 iOS 聚焦缩放 */
  .od-btn { font-size: 13px; }
  .od-stats { grid-template-columns: repeat(2, 1fr); }
  .od-aitem { flex-wrap: wrap; }
  .od-aitem-acts { flex: 1 1 100%; }
}
@media (max-width: 400px) {
  .od-stats { grid-template-columns: 1fr; }
  .od-dish-grid { grid-template-columns: 1fr; }
}

/* ---------- 打印 ---------- */
@media print {
  body * { visibility: hidden !important; }
  .od-print, .od-print * { visibility: visible !important; }
  .od-print {
    display: block !important; position: absolute; left: 0; top: 0; width: 80mm;
    font-family: "Courier New", monospace; color: #000; font-size: 12px; line-height: 1.5;
  }
  .od-print h3 { font-size: 15px; margin: 0 0 6px; text-align: center; }
  .od-print .p-line { border-top: 1px dashed #000; margin: 6px 0; }
  .od-print .p-row { display: flex; justify-content: space-between; }
  .od-print .p-item { margin: 2px 0; }
  .od-print .p-opts { font-size: 11px; color: #333; padding-left: 8px; }
}
