/* ============================================================
   积分点餐网 全套样式（前台 + 后台）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #ff6b35;
  --primary-dark: #e24f16;
  --primary-light: #fff1ea;
  --accent: #ffb03a;
  --bg: #f7f5f1;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #8a857e;
  --border: #eee7df;
  --green: #2e9e5b;
  --green-bg: #e8f7ef;
  --red: #e04f4f;
  --red-bg: #fdecec;
  --blue: #3a7afe;
  --blue-bg: #eaf1ff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(60, 40, 20, .08);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.text-primary { color: var(--primary); font-weight: 700; }
.text-up { color: var(--green); font-weight: 700; }
.text-down { color: var(--red); font-weight: 700; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 19px; font-weight: 800; color: var(--text); }
.logo:hover { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: #555; font-size: 14px; }
.nav a.on { color: var(--primary); font-weight: 700; }
.nav a:hover { color: var(--primary-dark); }
.points-badge {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 4px 12px; border-radius: 20px; font-size: 13px;
}
.points-badge b { font-size: 15px; }
.hello { color: #555; }
.hello .hello-id {
  font-style: normal; font-size: 15px; font-weight: 800;
  color: var(--primary-dark); background: var(--primary-light);
  border: 1px solid #ffd6c2;
  padding: 1px 10px; border-radius: 10px; margin-left: 4px;
}
.nav-links { display: inline-flex; align-items: center; gap: 18px; }
.nav-user { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; cursor: pointer;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; line-height: 1.4;
  background: #e8e4de; color: #444; transition: all .15s; text-align: center;
}
.btn:hover { filter: brightness(.95); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: #555; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c93a3a; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-add {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 20px; line-height: 1;
  box-shadow: 0 2px 6px rgba(255, 107, 53, .4); transition: transform .15s;
}
.btn-add:hover { transform: scale(1.12); background: var(--primary-dark); }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 600; }
.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item select,
.form-item input[type="file"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; outline: none;
}
.form-item input:focus, .form-item select:focus { border-color: var(--primary); }
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500 !important; }
.checkbox-line input { width: 16px; height: 16px; accent-color: var(--primary); }
.radio-line { display: flex; gap: 20px; }
.radio-line label { display: flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; margin: 0; }
.radio-line input { accent-color: var(--primary); width: 15px; height: 15px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.form-row .form-item { flex: 1; min-width: 140px; margin-bottom: 0; }

/* ---------- 提示 ---------- */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: var(--green-bg); color: #1c7a45; }
.alert-danger { background: var(--red-bg); color: #c0392b; }
.alert-info { background: var(--blue-bg); color: #2456b8; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--green-bg); color: var(--green); }
.badge-wait { background: var(--blue-bg); color: var(--blue); }
.badge-off { background: #f0eef0; color: #999; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-snack { background: #fdf3e0; color: #c07a00; }
.badge-dish { background: var(--primary-light); color: var(--primary-dark); }

/* ---------- 页面标题 ---------- */
.page-main { padding: 24px 0 90px; }
.page-title { font-size: 22px; margin-bottom: 6px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }

/* ---------- 表格 ---------- */
.table-card { padding: 8px 16px 16px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 12px 10px; border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 10px; border-bottom: 1px solid #f4f1ec; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.th-points { min-width: 110px; }
.points-cell { background: var(--primary-light); color: var(--primary-dark); padding: 3px 12px; border-radius: 20px; font-weight: 700; }
.wx-tag { background: #e6f9ef; color: #07a853; padding: 2px 10px; border-radius: 12px; font-size: 12px; white-space: nowrap; }

/* 表格多选复选框 */
.row-check, #checkAll {
  width: 16px; height: 16px; accent-color: var(--primary);
  cursor: pointer; vertical-align: middle;
}
.ops { white-space: nowrap; }
.ops form { margin: 0; }
.link { color: var(--blue); font-size: 13px; margin-right: 10px; }
.link:hover { text-decoration: underline; }
.link-btn {
  border: none; background: none; cursor: pointer; color: var(--blue);
  font-size: 13px; padding: 0; margin-right: 10px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.empty-tip { text-align: center; color: var(--muted); padding: 28px 0; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 20px 0; }
.pager-btn {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border); display: inline-flex;
  align-items: center; justify-content: center; color: #555;
}
.pager-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 首页 hero 与步骤 ---------- */
.menu-hero {
  background: linear-gradient(135deg, #ff8a50 0%, var(--primary) 55%, var(--accent) 100%);
  color: #fff; padding: 30px 0 26px; text-align: center;
}
.menu-hero h1 { font-size:38px; margin-bottom: 6px; }
.menu-hero p { opacity: .92; }
.steps { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.step {
  background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 20px;
  font-size: 13px; border: 1px solid rgba(255,255,255,.35);
}
.step.on { background: #fff; color: var(--primary-dark); font-weight: 700; }
.step-tip { font-size: 11px; opacity: .75; }

/* ---------- 店铺列表页 ---------- */
.shops-hero {
  background: linear-gradient(135deg, #ff8a50 0%, var(--primary) 55%, var(--accent) 100%);
  color: #fff; padding: 36px 0 30px; text-align: center;
}
.shops-hero h1 { font-size: 32px; margin-bottom: 6px; }
.shops-hero p { opacity: .92; font-size: 15px; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 8px;
}
.shop-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(60,40,20,.14); }
.shop-card-img { aspect-ratio: 16 / 9; background: #f3efe9; overflow: hidden; }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 48px; background: linear-gradient(135deg, #fff1ea, #ffd6c2);
}
.shop-card-info { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.shop-card-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.shop-card-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card-btn { margin-top: auto; }
.empty-shops { text-align: center; padding: 60px 20px; }
.empty-shops-icon { font-size: 56px; margin-bottom: 12px; }
.empty-shops p { font-size: 16px; margin-bottom: 4px; }
.step-arrow { opacity: .7; }

/* ---------- 菜单分区 ---------- */
.menu-section { margin-top: 28px; }
.section-title { font-size: 19px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; }
.section-title small { font-size: 12px; color: var(--muted); font-weight: 400; }
.cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-tab {
  border: 1px solid var(--border); background: #fff; color: #555; cursor: pointer;
  padding: 7px 18px; border-radius: 20px; font-size: 13px; transition: all .15s;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------- 菜品卡片 ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dish-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s;
}
.dish-card:hover { transform: translateY(-3px); }
.dish-img { aspect-ratio: 4 / 3; background: #f3efe9; }
.dish-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-info { padding: 12px 14px 14px; }
.dish-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.dish-cat { font-size: 12px; color: var(--muted); }
.snack-tag { color: #c07a00; background: #fdf3e0; padding: 1px 8px; border-radius: 10px; }
.dish-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dish-points { color: var(--primary-dark); font-weight: 800; font-size: 15px; }

/* ---------- 桌号 ---------- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.table-btn {
  border: 2px solid var(--border); background: #fff; color: #555; cursor: pointer;
  padding: 14px 0; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all .15s;
}
.table-btn:hover { border-color: var(--primary); color: var(--primary); }
.table-btn.on { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ---------- 购物车抽屉 & 底部栏 ---------- */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60;
  background: #2b2b2b; color: #fff; border-radius: 40px; padding: 10px 14px 10px 18px;
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; max-width: 90%;
}
.cart-bar b { color: var(--accent); }
.cart-bar .btn { margin: 0; }
.cart-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.cart-mask.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 92%;
  background: #fff; z-index: 80; box-shadow: -8px 0 30px rgba(0,0,0,.15);
  transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
  padding: 16px 18px; font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-close { border: none; background: none; font-size: 18px; cursor: pointer; color: #777; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 18px; }
.cart-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.cart-item-img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-meta { font-size: 12px; color: var(--muted); }
.cart-item-type { font-size: 11px; color: #c07a00; background: #fdf3e0; padding: 0 6px; border-radius: 8px; margin-left: 6px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; line-height: 1; color: #555;
}
.qty-ctrl button:hover { border-color: var(--primary); color: var(--primary); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }

/* ---------- 购物车侧边栏内：桌号选择 ---------- */
.cart-table {
  border-top: 1px solid var(--border);
  padding: 12px 18px 14px;
  background: #fdfbf8;
  max-height: 208px;
  overflow-y: auto;
}
.cart-table-title { font-size: 13px; font-weight: 700; color: #555; margin-bottom: 10px; }
.cart-table-title small { font-weight: 400; color: var(--muted); }
.table-grid-mini { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.table-btn-mini { padding: 9px 0; font-size: 13px; border-width: 1px; border-radius: 8px; }
.table-chosen {
  font-size: 13px; color: var(--muted); margin-bottom: 8px; text-align: center;
  padding: 5px 10px; border-radius: 8px; background: var(--bg);
}
.table-chosen.on { color: var(--green); background: var(--green-bg); font-weight: 600; }

.cart-foot { border-top: 1px solid var(--border); padding: 14px 18px 18px; }
.cart-sum { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.cart-total { color: var(--primary-dark); font-size: 20px; }
.cart-balance { color: var(--muted); font-size: 13px; }
.cart-tip { font-size: 12px; color: var(--red); margin-top: 8px; text-align: center; min-height: 16px; }

/* ---------- 登录/注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 56px 16px; }
.auth-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 34px; width: 380px; max-width: 100%;
}
.auth-title { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }

/* 登录方式 Tab（默认微信登录） */
.auth-tabs {
  display: flex; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 9px 0; border: none; background: transparent;
  border-radius: 8px; font-size: 14px; color: var(--muted);
  cursor: pointer; transition: all .15s; font-weight: 600;
}
.auth-tab:hover { color: var(--primary); }
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-panel { min-height: 120px; }

/* 微信登录 */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: #bbb; font-size: 12px; margin: 20px 0 16px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-wechat {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #07c160; border-color: #07c160; color: #fff;
  font-weight: 600; text-decoration: none;
}
.btn-wechat:hover { background: #06ad56; border-color: #06ad56; color: #fff; }
.wx-login-box { text-align: center; }
.wx-login-tip { color: #999; font-size: 12px; margin: 8px 0; text-align: center; }
.wx-login-tip.muted { color: #bbb; }
.wx-qr {
  width: 200px; height: 200px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff;
}
.admin-login-body { background: #23262d; min-height: 100vh; }

/* ---------- 兑换成功页 ---------- */
.success-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 40px 34px; max-width: 560px; margin: 30px auto; text-align: center;
}
.success-icon { font-size: 52px; margin-bottom: 10px; }
.success-card h1 { font-size: 24px; margin-bottom: 8px; }
.success-order-no { color: var(--muted); margin-bottom: 20px; }
.success-info { text-align: left; background: var(--bg); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; }
.success-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.success-items-title { text-align: left; font-size: 15px; margin-bottom: 8px; }
.success-items { text-align: left; margin-bottom: 20px; }
.success-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.success-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- 详情页 ---------- */
.detail-card { max-width: 820px; }
.detail-title { font-size: 18px; margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 24px; margin-bottom: 18px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.detail-row span { color: var(--muted); }
.detail-sub { font-size: 15px; margin: 14px 0 8px; }
.detail-actions { margin-top: 18px; display: flex; gap: 10px; }
.img-preview { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.img-preview img { width: 90px; height: 66px; object-fit: cover; border-radius: 8px; }

/* ============================================================
   后台布局
   ============================================================ */
.admin-body { background: #f2f1ee; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
  width: 210px; flex: none; background: #23262d; color: #fff;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo { padding: 22px 18px 16px; font-size: 17px; font-weight: 800; display: flex; flex-direction: column; }
.admin-logo small { font-size: 12px; font-weight: 400; opacity: .6; margin-top: 2px; }
.admin-nav { padding: 6px 12px; }
.admin-nav a {
  display: block; padding: 11px 14px; border-radius: 8px; color: #c9ccd4;
  margin-bottom: 4px; font-size: 14px;
}
.admin-nav a:hover { background: #2e323b; color: #fff; }
.admin-nav a.on { background: var(--primary); color: #fff; font-weight: 600; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.admin-topbar-title { font-size: 17px; font-weight: 700; }
.admin-topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #666; }
.admin-content { padding: 22px 24px 40px; }

/* 店铺上下文横幅（进入某店铺后显示快捷入口） */
.admin-ctxbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  background: #fff7ec; border-bottom: 1px solid #f0dcc0; padding: 9px 24px;
  font-size: 13px; color: #8a6d3b; position: sticky; top: 60px; z-index: 39;
}
.admin-ctxbar > span { margin-right: 8px; font-weight: 600; }
.admin-ctxbar a {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  background: #fff; border: 1px solid #e8d5b5; color: #7c5e2e;
  text-decoration: none; line-height: 1.4;
}
.admin-ctxbar a:hover { background: #fdeed6; border-color: #d9bc8f; }
.admin-ctxbar .ctxbar-back {
  margin-left: auto; background: #fff3e0; border-color: #e3b678; color: #9a6b1f; font-weight: 600;
}
.admin-ctxbar .ctxbar-back:hover { background: #ffe9c4; }

/* 后台统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-grid-2 { grid-template-columns: 1fr 1fr; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
}
.stat-icon { font-size: 34px; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--muted); }

/* 后台工具栏 */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-form { display: flex; gap: 8px; align-items: center; }
.toolbar-info { display: flex; align-items: center; gap: 12px; }
.toolbar-form input[type="text"] {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; width: 200px; outline: none; background: #fff;
}
.toolbar-form input:focus { border-color: var(--primary); }
.toolbar-form select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none; background: #fff;
}
.form-card { max-width: 640px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav a { margin: 0; }
  .stat-grid-2 { grid-template-columns: 1fr; }
  .nav { gap: 10px; }
}

/* ============================================================
   移动端（手机）：菜品卡片为横向布局
   图片在左（4:3 比例），菜名 + 积分在右，不显示分类
   顶部导航左侧显示用户名/ID/积分，右侧显示菜单，隐藏店铺名
   ============================================================ */
@media (max-width: 640px) {
  .dish-grid { grid-template-columns: 1fr; gap: 12px; }
  .dish-card { display: flex; align-items: stretch; }
  .dish-card:hover { transform: none; }

  /* 图片：固定宽度、4:3 比例、不被右侧内容拉伸 */
  .dish-img {
    width: 118px; flex-shrink: 0;
    aspect-ratio: 4 / 3;
    position: relative; background: #f3efe9;
    align-self: flex-start;
  }
  .dish-img img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover; display: block;
  }

  /* 右侧信息：菜名在上，积分 + 加号按钮在下 */
  .dish-info {
    flex: 1; min-width: 0;
    padding: 10px 12px;
    display: flex; flex-direction: column; justify-content: space-between;
  }
  .dish-name { font-size: 15px; margin-bottom: 6px; }

  .dish-foot { margin-top: auto; }
  .dish-points { font-size: 15px; }

  /* 顶部导航：隐藏店铺名，用户信息放左，菜单链接放右 */
  .header-inner { padding: 0 12px; }
  .logo { display: none; }
  .nav { width: 100%; gap: 8px; justify-content: space-between; }
  .nav-user {
    order: -1;
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 55%; overflow: hidden;
  }
  .nav-user .hello {
    display: inline-flex; align-items: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav-user .points-badge { flex-shrink: 0; padding: 3px 8px; font-size: 12px; }
  .nav-user .points-badge b { font-size: 13px; }
  .nav-user .hello .hello-id { font-size: 13px; padding: 1px 8px; }
  .nav-links { display: inline-flex; align-items: center; gap: 10px; }
  .nav-links a { font-size: 14px; padding: 4px 2px; white-space: nowrap; }
  .nav-links .btn-sm { padding: 4px 8px; font-size: 12px; }
}

/* ============================================================
   后台订单提醒弹窗（老板待处理订单提醒）
   ============================================================ */
.oa-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 12, 6, .58);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.oa-box {
  width: 420px; max-width: 94vw;
  background: var(--card); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  padding: 20px 22px 16px;
  animation: oaPop .35s ease;
}
@keyframes oaPop {
  0% { transform: scale(.85); opacity: 0; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.oa-head { display: flex; align-items: center; gap: 10px; }
.oa-icon {
  font-size: 20px; line-height: 1;
  animation: oaShake 1.2s ease-in-out infinite;
}
@keyframes oaShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(6deg); }
}
.oa-title { font-size: 17px; font-weight: 700; }
.oa-sub { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.oa-list {
  max-height: 220px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 14px; background: var(--bg);
}
.oa-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.oa-item:last-child { border-bottom: none; }
.oa-no { font-weight: 700; color: var(--primary); white-space: nowrap; }
.oa-info { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-wait { flex-shrink: 0; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--primary-light); color: var(--primary-dark); white-space: nowrap; }
.oa-btns { display: flex; gap: 10px; }
.oa-btns .btn { flex: 1; justify-content: center; text-align: center; }
.oa-note { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

/* 后台订单列表：菜品缩略图 + 名称 */
.order-dish-list { display: flex; flex-direction: column; gap: 6px; }
.order-dish {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 1.2;
}
.order-dish-img {
  width: 38px; height: 38px;
  border-radius: 6px; object-fit: cover;
  border: 1px solid var(--border); background: #f7f5f2; flex-shrink: 0;
}
.order-dish-name {
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}

/* 后台订单卡片列表：左图片 右信息 */
.order-card-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  display: flex; align-items: stretch; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.order-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.oc-imgs {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; align-self: center;
  max-width: 220px; overflow-x: auto; padding: 2px;
}
.oc-img {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: #f7f5f2; flex-shrink: 0;
}
.oc-img-empty {
  width: 64px; height: 64px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f3efe9; font-size: 26px;
}
.oc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.oc-line { font-size: 14px; line-height: 1.45; }
.oc-line-dish {
  font-weight: 700; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oc-line-pts { font-size: 14px; }
.oc-line-user { display: flex; align-items: center; gap: 8px; }
.oc-line-meta { font-size: 12.5px; }
.oc-ops {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  gap: 8px; flex-shrink: 0;
}
.oc-ops form { margin: 0; }
