/* 月饼统计 H5 —— 移动端优先，中秋暖色主题 */
:root {
  --primary: #D96422;
  --primary-dark: #B84E14;
  --primary-light: #FBE9DC;
  --bg: #F7F4EF;
  --card: #FFFFFF;
  --text: #2B2118;
  --text-2: #8A7A6A;
  --border: #EAE2D6;
  --red: #C0392B;
  --green: #2E8B57;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .06);
  --tabbar-h: 53px; /* tabbar 实际渲染高度 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* 消除点击/双击缩放延迟（不放在 * 上，避免破坏滚动容器） */
button, input, select, label, .chip, .side-item, .pick-item, .tabbar a { touch-action: manipulation; }

html, body { height: 100%; overscroll-behavior: none; } /* 禁下拉刷新/边缘回弹链 */

/* 内部滚动容器回弹不传导到页面 */
.order-content, .side-nav, .manage-content, .side-items, .pick-list { overscroll-behavior-y: contain; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- 新手引导（common.renderGuide） ---------- */
/* z-index 45：盖住页面与 tabbar(30)，低于弹层(50)，引导中打开购物车等弹层不被遮挡 */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(43, 33, 24, .42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none; /* 只遮不挡：滑动手势可穿透蒙层，卡片自身可点击 */
}
.guide-card {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  margin: 0 auto calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 -8px 40px rgba(43, 33, 24, .25);
  padding: 14px 16px 16px;
  animation: guide-in .25s ease;
}
.guide-card h3 { font-size: 17px; margin-bottom: 6px; }
.guide-card ul { list-style: none; font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }
.guide-card ul li::before { content: '·'; color: var(--primary); font-weight: 700; margin-right: 6px; }
.guide-steps { text-align: center; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.guide-nav-hint { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.guide-arrow { display: inline-block; animation: guide-bob 1.2s ease-in-out infinite; }
@keyframes guide-bob {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}
@keyframes guide-in {
  from { opacity: 0; transform: translateY(16px); }
}
/* 步骤收起后的滑动提醒浮条：点它可重开引导卡 */
.guide-pill {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  z-index: 45;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: guide-in .25s ease;
}

/* ---------- 顶部 ---------- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.page-header h1 { font-size: 17px; font-weight: 600; }
.page-header .sub { font-size: 13px; color: var(--text-2); }

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  text-align: center;
  padding: 8px 0 6px;
  font-size: 11px;
  color: var(--text-2);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabbar a .ico { font-size: 20px; line-height: 1; }
.tabbar a.active { color: var(--primary); font-weight: 600; }

/* ---------- 通用组件 ---------- */
main { padding: 12px 14px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }

.btn {
  border: none;
  border-radius: 10px;
  font-size: 15px;
  padding: 10px 16px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:active { opacity: .7; }
.btn-primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:disabled { background: #d8c9bd; }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.btn-danger { background: var(--red); color: #fff; } /* 删除类操作：实色深红 */
.btn-danger:active { background: #A93226; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; min-height: 36px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
/* iOS 聚焦防缩放兜底：所有可输入控件字号 ≥16px */
input, select, textarea { font-size: 16px; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }

.tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 8px;
}
.tag-muted { background: #F0ECE5; color: var(--text-2); }
.tag-group { background: #E5F0FB; color: #1D6FD1; } /* 客户分类：浅蓝 */
/* 订单状态徽标 */
.tag-pending { background: var(--primary-light); color: var(--primary-dark); }
.tag-claimed { background: #E8F5EE; color: var(--green); }
.btn-claim { background: var(--green); color: #fff; }
.btn-claim:active { background: #257A4B; }
.order-card.claimed .lines { opacity: .6; } /* 已领取视觉降噪 */
.order-card.claimed .foot { color: var(--text-2); }

.empty {
  text-align: center;
  color: var(--text-2);
  padding: 36px 0;
  font-size: 14px;
}
.empty .big { font-size: 34px; margin-bottom: 8px; }

/* ---------- 点单页 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px; /* 移动端紧凑，触摸目标仍 ≥36px */
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 点单卡片：单列横排（名字左、步进器右），避免两列时长名/步进器被挤 */
/* minmax(0,1fr)：列宽锁定容器宽度，防止长名把列撑出容器 */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.flavor-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.flavor-card .name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  /* 文字区域更大：一行放不下换行，最多两行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.flavor-card .qty-show { font-size: 13px; color: var(--text-2); }
.flavor-card .card-left { flex: 1; min-width: 0; }
/* 品牌小字：tag 样式（带小阴影），位于步进器上方，品名区不再被占 */
.brand-sub {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--primary-dark);
  background: var(--primary-light);
  border-radius: 6px;
  padding: 2px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 右侧列：品牌（上）+ 步进器（下），整体靠右、紧凑 */
.flavor-card .card-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
/* 待领取：0 个时不渲染不占空间；>0 时点击可展开各客户明细 */
.flavor-card .pend { font-size: 12px; color: var(--green); margin-top: 4px; }
.pend-toggle {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--green);
  padding: 2px 0;
  cursor: pointer;
}
.pend-toggle .arrow { display: inline-block; transition: transform .2s; }
.pend-toggle.open .arrow { transform: rotate(180deg); }
.pend-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.stepper button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0;
}
.stepper button.minus:disabled { opacity: .35; }
.stepper .qty { font-size: 16px; font-weight: 700; min-width: 22px; text-align: center; cursor: pointer; border-bottom: 1px dashed var(--text-2); padding: 0 2px; } /* 点击可手动输入数量 */

/* 提交栏：固定在 Tab 上方 */
.submit-bar {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 25;
}
.submit-bar .total { flex: 1; font-size: 13px; color: var(--text-2); min-width: 0; }
.submit-bar .total b { font-size: 18px; color: var(--primary); }
/* 多客户时：各客户选了几个（一行，超长省略） */
.submit-bar .per-cust {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.submit-bar .btn { flex-shrink: 0; }

/* ---------- 点单页：下拉刷新 ---------- */
.ptr-indicator {
  position: absolute;
  top: -46px; /* 平时藏在上方，下拉时随内容位移露出 */
  left: 0;
  right: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  pointer-events: none;
  z-index: 1;
}
.ptr-indicator .ptr-ico { display: inline-block; transition: transform .2s; }
.ptr-indicator.over .ptr-ico { transform: rotate(180deg); }
.ptr-indicator.loading .ptr-ico { animation: ptr-spin .8s linear infinite; }
.ptr-indicator.done .ptr-ico { color: var(--green); }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ---------- 统计页 ---------- */
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.seg {
  display: flex;
  background: #F0ECE5;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  cursor: pointer;
}
.seg button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

.rank-row { padding: 8px 0; }
.rank-row .rank-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.rank-row .rank-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rank-meta { display: flex; align-items: center; gap: 10px; }
.rank-row .track { flex: 1; height: 8px; background: #F3EEE6; border-radius: 4px; overflow: hidden; }
.rank-row .fill { height: 100%; background: linear-gradient(90deg, #F2B879, var(--primary)); border-radius: 4px; min-width: 2px; transition: width .3s; }
.rank-row .val { font-size: 14px; font-weight: 600; flex-shrink: 0; }

/* 每日趋势折线图（SVG） */
.daily-chart { position: relative; }
.daily-chart svg { width: 100%; display: block; }
.lc-area { fill: var(--primary); opacity: .12; }
.lc-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lc-dot-s { fill: #fff; stroke: var(--primary); stroke-width: 1.5; }
.lc-cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-dot { fill: var(--primary); stroke: #fff; stroke-width: 2; }
.lc-day { font-size: 10px; fill: var(--text-2); }
.lc-tooltip {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  background: rgba(43, 33, 24, .92);
  color: #fff;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* ---------- 订单记录页 ---------- */
/* 行 1：客户名（左）｜状态（右）；行 2：分组（左）｜时间（右） */
.order-card .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.order-card .head .who { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .head .tag { flex-shrink: 0; }
.order-card .head-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.order-card .head-sub .time { font-size: 12px; color: var(--text-2); flex-shrink: 0; margin-left: auto; }
.order-card .lines { font-size: 13px; color: var(--text-2); }
.order-card .lines .line { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.order-card .lines .line > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .lines .line > span:last-child { flex-shrink: 0; }
/* 明细行已领标注（部分签收） */
.order-card .line .claim-part { font-style: normal; font-size: 11px; color: var(--text-2); margin-left: 4px; }
.order-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.order-card .foot .sum { font-size: 13px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card .foot .sum b { color: var(--primary); }
.claimed-note { font-size: 12px; color: var(--text-2); margin-left: 4px; }
/* 底部操作按钮紧凑排列 */
.order-card .foot-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* 部分领取状态徽标（橙） */
.tag-partial { background: #FFF3E0; color: #B45309; }

/* ---------- 管理页 ---------- */
.mini-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  flex-shrink: 0;
}

/* 添加按钮：输入框聚焦时显示（点输入框弹键盘即出现）
   小圆 + 加号（无文字），白底 + 主色描边 */
#mg-add {
  display: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: 0; /* 隐藏文字，仅留 ＋ 图标 */
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  flex-shrink: 0;
  align-self: center;
  cursor: pointer;
  font-family: inherit;
}
#mg-add::before { content: '＋'; font-size: 16px; line-height: 1; }
#mg-input:focus ~ #mg-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 左滑行：行主内容盖在右侧操作区上，左滑 translateX 露出 */
.swipe-row {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid #F5F0E8;
}
.swipe-row:last-child { border-bottom: none; }
.swipe-row .row-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
}
.act-btn {
  border: none;
  color: #fff;
  font-size: 13px;
  padding: 0 15px;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.act-cat { background: #3B82F6; } /* 蓝：修改分类 */
.act-rename { background: #A8A29A; } /* iOS 灰 */
.act-pwd { background: #10B981; } /* 绿：改密码 */
.act-role { background: #8B5CF6; } /* 紫：改角色 */
.act-toggle { background: #F59E0B; } /* 橙 */
.act-del { background: var(--red); }
.swipe-row .row-main {
  position: relative;
  background: var(--card); /* 必须不透明，遮住操作区 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 10px;
  touch-action: pan-y; /* 垂直滚动交给浏览器，水平交给左滑 JS */
  transform: translateX(0);
  transition: transform .2s ease;
}
.swipe-row .row-main .name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swipe-row .row-main .name.inactive { color: var(--text-2); text-decoration: line-through; }
/* 行右侧分类：纯文本（小字），改分类需左滑 → 分类 */
.cat-sub {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-2);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swipe-row input.name-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 16px;
  font-family: inherit;
}

/* 通讯录式分节标题（全部视图）：
   滚动容器无 padding（padding 已移到各内容区块），吸顶遮罩天然与滚动列表同宽，
   滑动时不会在两侧出现镂空 */
.sec-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-2);
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
}
.sec-head .sec-cnt { color: #B9AC9B; margin-left: 6px; }

/* 分组选择器：当前归属高亮 */
.pick-item.picked { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

/* 窄屏（320/360px 级）：压缩左栏，避免横向溢出 */
@media (max-width: 380px) {
  .manage-main .side-nav { width: 76px; }
  .side-item { padding: 13px 4px; font-size: 12px; }
}

/* ---------- 引导弹层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 33, 24, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.overlay .sheet {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  width: 100%;
  max-width: 360px;
}
.overlay .sheet h3 { font-size: 17px; margin-bottom: 4px; }
.overlay .sheet p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.overlay .sheet .btn { width: 100%; }

/* ---------- 弹层：底部弹出（confirm / prompt，替代 iOS/X5 不可靠的原生弹窗） ---------- */
.dialog-overlay { align-items: flex-end; padding: 0; }
/* .overlay .sheet（0-2-0）会压过 .dialog-sheet（0-1-0），须提升特异性使底部平角 */
.overlay .sheet.dialog-sheet {
  width: 100%;
  max-width: 480px;
  border-radius: 18px 18px 0 0;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  animation: dialogUp .22s ease-out;
}
@keyframes dialogUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.dialog-sheet p { white-space: pre-line; max-height: 30vh; overflow-y: auto; margin-bottom: 16px; }
.dialog-sheet .btn-row { display: flex; gap: 10px; }
.dialog-sheet .btn-row .btn { flex: 1; width: auto; }
/* 弹窗取消按钮：浅灰弱化，突出主操作 */
.dialog-sheet .btn-row .btn-ghost { background: #F0ECE5; color: var(--text-2); }
.dialog-sheet .btn-row .btn-ghost:active { background: #E5DFD4; }
.dialog-sheet input[type="text"], .dialog-sheet input[type="password"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 14px;
}
.dialog-sheet input[type="text"]:focus, .dialog-sheet input[type="password"]:focus { outline: none; border-color: var(--primary); }
/* 人均数量输入弹窗：月饼名 + 总数实时显示 */
.dialog-sheet .eq-mooncake {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.dialog-sheet .eq-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: -4px 0 14px;
}

/* ---------- 点单页：顶部横向分类条 + 全宽列表 ---------- */
:root {
  --header-h: 61px; /* 页头实际高度（含 btn-sm 36px 最小高度） */
  --submitbar-h: 86px; /* 提交栏实际高度（含两行内容与内边距） */
}

.order-main {
  position: fixed;
  top: var(--header-h);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--submitbar-h));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
}
/* 无购物车数量时提交栏隐藏，列表填满到 tabbar */
body:not(.has-cart) .order-main {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

/* 顶部分类条：方正无圆角，分类间竖线分隔 */
.brand-bar {
  flex-shrink: 0;
  display: flex;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.brand-bar::-webkit-scrollbar { display: none; }
.brand-bar .chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  border: none;
  border-radius: 0; /* 方正 */
  border-left: 1px solid var(--border); /* 分类间竖线 */
  background: transparent;
  color: var(--text-2);
  padding: 9px 14px;
}
.brand-bar .chip:first-child { border-left: none; }
.brand-bar .chip .cnt { font-size: 10px; color: #B9AC9B; font-weight: 400; }
.brand-bar .chip.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.brand-bar .chip.active .cnt { color: var(--primary); }

/* 左侧竖栏（管理页使用） */
.side-nav {
  width: 88px;
  flex-shrink: 0;
  background: #F2EEE7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid var(--border);
}
.side-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  padding: 15px 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  line-height: 1.3;
}
.side-item .cnt { font-size: 10px; color: #B9AC9B; }
.side-item.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
}
.side-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.side-item.active .cnt { color: var(--primary); }

.order-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: var(--bg);
  padding: 10px 10px 12px; /* 底部留白收紧，贴近提交栏 */
}

/* ---------- 管理页：Tab + 搜索 + 两栏（按分类展示客户/月饼） ---------- */
/* 页头只含标题（比点单页矮），悬浮区上移覆盖页头下沿，滚动时顶部不留缝隙 */
.manage-tab {
  position: fixed;
  top: calc(var(--header-h) - 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  padding: 12px 12px 10px;
}
.manage-tab .mg-search-wrap { position: relative; margin-top: 8px; }
.manage-tab #mg-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 34px 9px 12px;
  font-size: 16px;
  font-family: inherit;
}
.manage-tab #mg-search:focus { outline: none; border-color: var(--primary); }
/* 隐藏浏览器原生清空按钮，用自绘 ✕ 替代 */
.manage-tab #mg-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.manage-tab .mg-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #F0ECE5;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.manage-tab .mg-search-clear:active { background: #E5DED3; }
.manage-main {
  position: fixed;
  top: calc(var(--header-h) + 98px); /* tab(48) + 搜索框(42) + 间距(8) */
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
}
.manage-main .side-nav { display: flex; flex-direction: column; }
.manage-main .side-items { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.side-add {
  flex-shrink: 0;
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px;
  font-family: inherit;
  padding: 13px 4px;
  cursor: pointer;
}
/* 左侧「管理分组/品牌」：进入分类管理视图 */
.side-manage, .side-guide {
  flex-shrink: 0;
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  font-family: inherit;
  padding: 13px 4px;
  cursor: pointer;
}
.side-manage.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.side-item.off { color: #B9AC9B; }
.side-item.off .cnt { color: #D5CDBE; }

.manage-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: var(--bg);
  padding: 0; /* 无 padding：吸顶遮罩全宽；各内容区块自行留边 */
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.manage-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 品牌分组区块 ---------- */
.brand-section { margin-bottom: 14px; }
.brand-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 8px 2px;
}
.brand-title .brand-count { font-size: 11px; font-weight: 400; color: #B9AC9B; }

/* ---------- 客户选择器（左分组右客户，可多选） ---------- */
.picker-sheet { max-height: 82vh; display: flex; flex-direction: column; }
.picker-sheet input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.picker-sheet input[type="search"]:focus { outline: none; border-color: var(--primary); }
.picker-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.picker-head h3 { margin-bottom: 0; }
.picker-hint { flex: 1; font-size: 12px; color: var(--text-2); }
.picker-close {
  flex-shrink: 0;
  border: none;
  background: #F0ECE5;
  color: var(--text-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.picker-main { flex: 1; min-height: 0; display: flex; gap: 8px; }
/* 左侧分组栏：沿用管理页分组栏的效果 */
.picker-groups {
  width: 92px;
  flex-shrink: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pick-group-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.3;
}
.pick-group-item .cnt { display: block; font-size: 10px; color: #B9AC9B; }
.pick-group-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.pick-group-item.active .cnt { color: var(--primary); }
/* 底部：全选/清空 + 已选人数 + 确定（允许换行防小屏溢出） */
.picker-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.picker-foot .picker-select-actions { display: flex; gap: 6px; flex-shrink: 0; }
.picker-act {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 10px;
  cursor: pointer;
}
.picker-act:active { background: var(--primary-light); }
.picker-foot span { flex: 1 1 40%; min-width: 0; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-foot .btn { flex-shrink: 0; }


.pick-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
}
.pick-group {
  font-size: 12px;
  color: var(--text-2);
  padding: 8px 4px 4px;
  border-top: 1px dashed var(--border);
}
.pick-group:first-child { border-top: none; }
.pick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.pick-item:active { background: var(--primary-light); }
.pick-item .pick-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid #D8CDBE;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
}
.pick-item.picked .pick-check { background: var(--primary); border-color: var(--primary); }
.pick-item .pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 购物车 sheet（多客户，按客户分组） ---------- */
.cart-sheet { max-height: 80vh; display: flex; flex-direction: column; }
.cart-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.cart-head-row h3 { margin-bottom: 0; }
/* 右上角 X：关闭购物车 */
.cart-close {
  flex-shrink: 0;
  border: none;
  background: #F0ECE5;
  color: var(--text-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.cart-sheet p { margin-bottom: 12px; }
.cart-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.cart-group { border-top: 1px dashed var(--border); padding: 8px 0 2px; }
.cart-group:first-child { border-top: none; }
.cart-head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.cart-head .tag { margin-left: 0; }
.cart-gtotal { margin-left: auto; color: var(--primary); font-weight: 700; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0 7px 10px; font-size: 14px; }
.cart-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-ctrl { display: flex; align-items: center; gap: 6px; }
.cart-ctrl b { min-width: 16px; text-align: center; font-size: 14px; }
/* 购物车加减：按钮紧凑、符号大 */
.cart-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-btn:active { opacity: .7; }
.cart-empty { text-align: center; color: var(--text-2); padding: 30px 0; font-size: 14px; }
/* 覆盖 .overlay .sheet .btn 的 width:100%（特异性提升），清空/提交并排 */
.cart-sheet .btn-row .btn { flex: 1; width: auto; }
/* 顶栏购物车徽标 */
#cart-count { color: var(--primary); font-size: 12px; min-width: 18px; }

/* 右上角客户按钮：多选长名不换行撑爆页头 */
#identity-btn { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 已领取：灰色弱化，与待领取(绿)区分（特异性需压过 .flavor-card .pend） */
.flavor-card .pend-toggle.pend-claimed { color: var(--text-2); }

/* ---------- 记录页：筛选区（标签 + 长条分段 + 自定义日期） ---------- */
.filter-card .filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 行间距统一：客户行前面是隐藏的日期区间（非 .filter-row 相邻），也要同样间距 */
.filter-card .filter-row:not(:first-child) { margin-top: 16px; }
.filter-card .filter-row .chips {
  flex: 1;
  min-width: 0;
  display: flex;
  background: #F0ECE5;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-card .filter-row .chips::-webkit-scrollbar { display: none; }
/* 状态/时间按钮：长条分段样式（同一排等宽长条，不再是一颗颗胶囊） */
.filter-card .filter-row .chips .chip {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.filter-card .filter-row .chips .chip.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.filter-label {
  flex-shrink: 0;
  width: 36px;
  font-size: 13px;
  color: var(--text-2);
}
/* 客户筛选按钮：内容自适应宽度的胶囊，窄而精致 */
.filter-card #filter-customer-btn {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  border: none;
  background: #F0ECE5;
  color: var(--text-2);
  border-radius: 18px;
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-card #filter-customer-btn.sel { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
/* 自定义日期：精简（紧凑输入框 + 放大镜查询按钮） */
.custom-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-2);
}
.custom-range input[type="date"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.custom-range .btn { flex-shrink: 0; font-size: 14px; padding: 8px 12px; }

/* ---------- 领取页：部分签收 + 签收单 ---------- */
.claim-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}
.claim-line .claim-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-line .claim-name .tag { margin-left: 4px; }
.claim-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.claim-qty { min-width: 20px; text-align: center; font-size: 15px; cursor: pointer; border-bottom: 1px dashed var(--text-2); padding: 0 2px; } /* 点击可手动输入数量 */
.cart-qty { cursor: pointer; border-bottom: 1px dashed var(--text-2); } /* 购物车数量可点击输入 */
.claim-rem { font-size: 11px; color: var(--text-2); }
.claim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 14px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text-2);
}
.claim-bar b { color: var(--primary); font-size: 16px; }
.slips-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin: 4px 0 8px 2px;
}
.slip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: none;
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 11px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.slip-item .slip-meta { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.slip-lines {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 12px;
  font-size: 14px;
}
.slip-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed var(--border);
}
.slip-line:first-child { border-top: none; }
.slip-line .tag { margin-left: 4px; }

/* 领取页底部操作栏：一键签收 + 部分签收并排 */
.claim-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 领取视图底部留白：确保 claim-bar 与今日签收单不被固定 tabbar 遮挡
   注意：body 的 padding-bottom 在 main 之外，内容高过内容区时会溢出占满该 padding，
   因此需在 #view-claim 内部补足可滚动空间 */
#view-claim { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }

/* ---------- 提交中遮罩（点单页） ---------- */
.submit-mask { z-index: 70; } /* 盖过购物车弹层（z-index 50） */
.submit-mask-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}
.submit-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: load-spin 0.6s linear infinite;
}
.submit-mask-box p { font-size: 14px; font-weight: 600; color: var(--text); }
.submit-mask-sub { font-size: 12px; color: var(--text-2); font-weight: 400 !important; }

/* ---------- 记录页：上滑加载指示器 ---------- */
#load-more-wrap { font-size: 13px; color: var(--text-2); }
#load-more-wrap .load-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: load-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes load-spin {
  to { transform: rotate(360deg); }
}
#load-end { color: var(--text-2); font-size: 12px; letter-spacing: 1px; opacity: 0.6; }

/* ---------- 回到顶部按钮 ---------- */
.back-top {
  position: fixed;
  right: calc(50% - 240px + 14px); /* 480px 容器内右侧 14px */
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(43, 33, 24, .85);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, opacity .2s;
}
.back-top:active { transform: scale(.92); }
@media (max-width: 480px) {
  .back-top { right: 14px; }
}

/* ---------- 小屏（≤360px）：整体收紧，避免文字换行 ---------- */
@media (max-width: 360px) {
  .chip { padding: 7px 10px; font-size: 12px; }
  .btn-sm { padding: 7px 10px; font-size: 12px; }
  .filter-label { width: 30px; font-size: 12px; }
  .order-card .who { font-size: 13px; }
  .order-card .lines { font-size: 12px; }
  .brand-sub { font-size: 10px; padding: 1px 6px; }
}

/* ---------- 编辑订单弹层 ---------- */
.edit-sheet { max-height: 80vh; display: flex; flex-direction: column; }
.edit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.edit-head h3 { margin-bottom: 0; }
.edit-list { flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; margin-bottom: 12px; }
.edit-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.edit-line.deleting { opacity: .5; }
.edit-line.deleting .claim-name { text-decoration: line-through; }
.deleting-tag { color: var(--red); }
.edit-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.edit-foot .btn-row { display: flex; gap: 10px; margin-left: auto; }
.edit-foot .btn-row .btn { flex: 1; width: auto; }
.edit-hint { font-size: 11px; color: var(--red); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 80px);
  transform: translateX(-50%);
  background: rgba(43, 33, 24, .92);
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; }

/* ---------- 登录页 ---------- */
body[data-page="login"], body[data-page="landing"] {
  background: linear-gradient(135deg, #FBE9DC 0%, #F7F4EF 100%);
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: 100%;
  max-width: 360px;
  padding: 20px;
}
.login-box {
  background: #fff;
  border-radius: 18px;
  padding: 36px 28px 28px;
  box-shadow: 0 4px 24px rgba(217, 100, 34, .12);
  text-align: center;
}
.login-logo { font-size: 48px; margin-bottom: 8px; }
.login-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.login-box .field { text-align: left; }
.login-box .field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #F7F4EF;
}
.login-box .field input:focus { outline: none; border-color: var(--primary); background: #fff; }
.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 8px;
}
.login-btn:disabled { opacity: .6; }
.login-beian {
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 16px;
}
.login-beian a {
  color: var(--text-2);
  text-decoration: none;
}

/* ---------- 退出按钮 ---------- */
.tabbar .logout-btn {
  flex: 0 0 auto;
  padding: 8px 10px 6px;
  font-size: 16px;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
}
.tabbar .logout-btn:active { opacity: .6; }

/* ---------- 用户徽标 ---------- */
.user-badge {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto; /* 徽标与退出按钮靠右排列（标题在左） */
}
.logout-btn {
  border: none;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1;
  font-family: inherit;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.logout-btn:active { opacity: .7; }
/* 点单页：客户选择按钮占页头中部主位（可截断，不挤压两侧） */
.page-header #identity-btn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 微信安卓内置浏览器提示条（common.showWechatHint，只显示一次） */
/* z-index 40：高于 tabbar(30)，低于引导(45)/弹层(50)，不遮挡任何弹层 */
.wx-hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(43, 33, 24, .92);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
}
.wx-hint-close {
  flex: none;
  margin-left: auto;
  border: none;
  background: none;
  color: #fff;
  font-size: 16px;
  padding: 2px 8px;
  cursor: pointer;
}
.wx-hint-close:active { opacity: .7; }
