/* ============================================================
   今日点菜 · 网页版样式
   设计理念：简约、高端、低调
   配色：暖灰底 + 墨黑字 + 古铜色点缀
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --bg:          #F5F3EF;
  --surface:     #FFFFFF;
  --text-primary:#1C1C1C;
  --text-secondary:#6B6B6B;
  --text-tertiary:#A0A0A0;
  --accent:      #8B7355;
  --accent-dark: #6B5B4E;
  --accent-light:#C4B49A;
  --border:      #EAE6DF;
  --border-light:#F0EDE7;
  --success:     #5C7A6B;
  --error:       #A05656;
  --shadow:      0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md:   0 4px 16px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.04);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --serif:      'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --sans:       'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width:  640px;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; outline: none; }
svg { color: inherit; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,243,239,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.brand-mark {
  width: 6px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
}
.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-primary);
}
.nav-tabs {
  display: flex;
  gap: 4px;
}
.nav-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all .25s;
}
.nav-tab:hover { color: var(--text-primary); }
.nav-tab.active {
  color: var(--accent-dark);
  background: rgba(139,115,85,.08);
}
.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.btn-text {
  font-size: 13px;
  color: var(--accent);
  padding: 4px 8px;
  transition: color .2s;
}
.btn-text:hover { color: var(--accent-dark); }

/* ---------- 主内容 ---------- */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}
.view { display: none; animation: fadeIn .4s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

/* ---------- Hero 卡片 ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2C2C2C 0%, #1C1C1C 100%);
  color: #E8E4DD;
  text-align: center;
}
.hero-deco {
  position: absolute;
  border-radius: 50%;
  opacity: .06;
  pointer-events: none;
}
.deco-1 {
  width: 180px; height: 180px;
  background: var(--accent-light);
  top: -60px; right: -40px;
}
.deco-2 {
  width: 120px; height: 120px;
  background: var(--accent-light);
  bottom: -50px; left: -30px;
}
.hero-content { position: relative; z-index: 1; }
.hero-date {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.hero-sub {
  font-size: 14px;
  color: rgba(232,228,221,.6);
}

/* ---------- 统计 Hero ---------- */
.stats-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2C2C2C 0%, #1C1C1C 100%);
  color: #E8E4DD;
  text-align: center;
}
.stats-hero .hero-deco { opacity: .05; }
.stats-content { position: relative; z-index: 1; }
.stats-date {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  color: rgba(232,228,221,.85);
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  color: #E8E4DD;
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: rgba(232,228,221,.5);
  letter-spacing: .05em;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(232,228,221,.12);
}

/* ---------- 骨架屏 ---------- */
.skeleton {
  background: linear-gradient(90deg, #EFEDE8 25%, #E8E5DE 50%, #EFEDE8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card { text-align: center; padding: 32px; }
.skel-circle { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; }
.skel-line { height: 14px; border-radius: 4px; margin: 8px auto; }
.skel-line.w60 { width: 60%; }
.skel-line.w70 { width: 70%; }
.skel-line.w80 { width: 80%; }
.skel-line.w50 { width: 50%; }
.skeleton-dish { display: flex; gap: 16px; padding: 16px; }
.skel-img { width: 80px; height: 80px; border-radius: var(--radius-sm); flex-shrink: 0; }
.skel-body { flex: 1; padding-top: 8px; }
.skel-stat-row { display: flex; justify-content: center; gap: 40px; }
.skel-circle-sm { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-grid { padding: 12px; }
.skel-grid-img { width: 100%; height: 120px; border-radius: var(--radius-sm); margin-bottom: 8px; }

/* ---------- 状态卡片 ---------- */
.status-card { text-align: center; }
.status-icon-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139,115,85,.08);
  color: var(--accent);
}
.ring-done {
  background: rgba(92,122,107,.1);
  color: var(--success);
}
.status-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}
.status-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.num-accent {
  color: var(--accent-dark);
  font-weight: 600;
}
.ordered-list {
  text-align: left;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.ordered-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.ordered-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
}
.ordered-name { flex: 1; color: var(--text-primary); }
.ordered-qty { color: var(--text-secondary); }

/* ---------- 功能入口 ---------- */
.feature-list { margin-top: 4px; }
.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  cursor: pointer;
  transition: all .2s;
}
.feature-row:hover {
  box-shadow: var(--shadow-md);
}
.feature-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-admin { background: rgba(139,115,85,.1); color: var(--accent); }
.icon-summary { background: rgba(92,122,107,.1); color: var(--success); }
.feature-text { flex: 1; }
.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.feature-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.chevron {
  font-size: 18px;
  color: var(--text-tertiary);
}

/* ---------- 点菜页 ---------- */
.edit-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(139,115,85,.06);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--accent-dark);
}
.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.dish-list {}
.dish-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow .2s;
}
.dish-card:hover { box-shadow: var(--shadow-md); }
.dish-img-box {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  cursor: pointer;
}
.dish-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-tertiary);
}
.dish-img-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(28,28,28,.7);
  color: #E8E4DD;
  font-size: 12px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dish-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.dish-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all .2s;
}
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.ctrl-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.ctrl-count {
  font-size: 14px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}
.ctrl-count.has-value { color: var(--accent-dark); }
.ctrl-count.placeholder { color: var(--text-tertiary); font-weight: 400; font-size: 13px; }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-text {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 16px;
  margin-bottom: 4px;
}
.empty-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- 汇总列表 ---------- */
.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 16px;
}
.title-bar {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}
.title-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}
.summary-list {}
.summary-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  transition: box-shadow .2s;
}
.summary-item:hover { box-shadow: var(--shadow-md); }
.summary-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #D4B06A 0%, #B8945A 100%); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #C0B8AE 0%, #A8A096 100%); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #C9A88A 0%, #B08868 100%); color: #fff; }
.rank-normal { background: var(--border-light); color: var(--text-tertiary); }
.summary-img-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.summary-img-box img { width: 100%; height: 100%; object-fit: cover; }
.summary-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-tertiary);
}
.summary-info { flex: 1; min-width: 0; }
.summary-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-orderers {
  font-size: 12px;
  color: var(--text-tertiary);
}
.summary-count {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ---------- 管理页 ---------- */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.header-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}
.header-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
}
.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.dish-grid-item {
  padding: 12px;
  overflow: hidden;
}
.grid-img-box {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 10px;
}
.grid-img-box img { width: 100%; height: 100%; object-fit: cover; }
.grid-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--text-tertiary);
}
.grid-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid-item-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid-item-del {
  font-size: 12px;
  color: var(--error);
  margin-top: 8px;
  cursor: pointer;
  transition: opacity .2s;
}
.grid-item-del:hover { opacity: .7; }

/* ---------- 底部栏 ---------- */
.bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(var(--max-width) - 40px);
  width: calc(100% - 40px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}
.bar-cart-count {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.bar-info { font-size: 13px; color: var(--text-secondary); }
.bar-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}
.bar-submit {
  flex: 1.5;
  padding: 12px;
  font-size: 15px;
}

/* ---------- 按钮 ---------- */
.btn-primary {
  background: var(--accent-dark);
  color: #E8E4DD;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.btn-primary:hover {
  background: #4A3D33;
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.btn-full { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,28,28,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%;
  max-width: var(--max-width);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: slideUp .3s cubic-bezier(.32,.72,0,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-sm {
  max-width: 360px;
  border-radius: var(--radius-lg);
  align-self: center;
  margin-bottom: 40px;
}
.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 10px auto 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  font-size: 24px;
  color: var(--text-tertiary);
  line-height: 1;
  padding: 0 4px;
  transition: color .2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px 32px; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.req { color: var(--error); }
.opt { color: var(--text-tertiary); font-weight: 400; }
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color .2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-tertiary); }
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 72px;
  transition: border-color .2s;
}
.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-tertiary); }

/* ---------- 图片选择器 ---------- */
.image-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 140px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  color: var(--text-tertiary);
}
.image-picker:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.picker-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.picker-text { font-size: 13px; }
.image-preview {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(28,28,28,.6);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(28,28,28,.88);
  color: #E8E4DD;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* ---------- 点菜页：定制提示与变体标签 ---------- */
.custom-hint {
  display: inline-block;
  font-size: 10px;
  color: var(--accent);
  background: rgba(139,115,85,.08);
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 4px;
  letter-spacing: .03em;
}
.variant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.variant-tag {
  font-size: 11px;
  color: var(--accent-dark);
  background: rgba(139,115,85,.06);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.ordered-sel {
  font-size: 12px;
  color: var(--text-tertiary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 汇总页：选项分布标签 ---------- */
.summary-sel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.sel-tag {
  font-size: 10px;
  color: var(--accent-dark);
  background: rgba(139,115,85,.06);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---------- 管理页：选项徽章 ---------- */
.grid-item-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.opt-badge {
  font-size: 10px;
  color: var(--accent);
  background: rgba(139,115,85,.08);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---------- 管理端：选项表单 ---------- */
.btn-add-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all .2s;
  width: 100%;
  justify-content: center;
}
.btn-add-option:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.option-group {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg);
}
.opt-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.opt-name-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}
.form-select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .2s;
}
.form-select:focus { border-color: var(--accent); }
.opt-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 18px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.opt-remove-btn:hover { color: var(--error); background: rgba(160,86,86,.08); }
.opt-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.opt-choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.opt-choice-input {
  flex: 1;
  padding: 6px 12px;
  font-size: 13px;
}
.opt-choice-remove {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 16px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.opt-choice-remove:hover { color: var(--error); }
.btn-add-choice {
  font-size: 12px;
  color: var(--accent);
  padding: 4px 8px;
  text-align: left;
  transition: opacity .2s;
}
.btn-add-choice:hover { opacity: .7; }

/* ---------- 定制面板（点菜端） ---------- */
.custom-dish-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.custom-dish-preview img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.custom-dish-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.custom-dish-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}
.custom-option-group {
  margin-bottom: 20px;
}
.custom-opt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.custom-opt-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.custom-opt-type {
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--border-light);
  padding: 1px 6px;
  border-radius: 3px;
}
.custom-opt-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-chip {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all .2s;
  cursor: pointer;
}
.choice-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.choice-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #E8E4DD;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  .topbar-inner { padding: 12px 16px; }
  .brand-name { font-size: 16px; }
  .nav-tab { padding: 5px 10px; font-size: 12px; }
  .main { padding: 16px; }
  .card { padding: 20px; }
  .dish-card { padding: 14px; gap: 12px; }
  .dish-img-box { width: 72px; height: 72px; }
  .dish-grid { grid-template-columns: 1fr; }
  .stat-num { font-size: 24px; }
  .user-name { display: none; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ---------- 日期 / 餐次选择 ---------- */
.day-meal-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dm-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dm-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 0 0 56px;
}
.dm-date {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
}
.meal-seg {
  flex: 1;
  display: flex;
  gap: 8px;
}
.meal-seg-btn {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.meal-seg-btn:hover { border-color: var(--accent); color: var(--accent); }
.meal-seg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #E8E4DD;
}
.summary-day { margin-bottom: 16px; }

/* ---------- 首页：餐段标签 ---------- */
.meal-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-dark);
  background: rgba(139,115,85,.1);
  padding: 2px 10px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ---------- 点菜页：分类分区 ---------- */
.cat-section { margin-bottom: 24px; }
.cat-header {
  position: relative;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 8px 0 14px;
  padding-left: 12px;
}
.cat-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 管理页：分类管理 ---------- */
.category-manage {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 24px;
  margin-bottom: 20px;
}
.cat-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cat-manage-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(139,115,85,.08);
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent-dark);
}
.cat-chip-del {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.cat-chip-del:hover { background: rgba(139,115,85,.18); }
.cat-empty {
  font-size: 13px;
  color: var(--text-tertiary);
}
.category-input-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}
.category-input-row .form-input { flex: 1; }
.cat-confirm { padding: 10px 18px; flex: 0 0 auto; }
.cat-cancel { padding: 10px 18px; flex: 0 0 auto; }

/* ---------- 表单：整宽下拉 ---------- */
.form-select.full {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
}

/* ---------- 汇总页：餐段分组 ---------- */
.meal-section { margin-bottom: 24px; }
.meal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
}
.meal-icon { font-size: 20px; }
.meal-label {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.meal-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
}
