/* =========================================================
   企业微信 (WeCom) 设计规范 · 统一样式体系
   主色 #2E7BE4 · 扁平化 · iOS 设置风分组列表
   ========================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 品牌色 */
  --primary: #2E7BE4;
  --primary-active: #1E5FB4;
  --primary-light: #EAF2FC;
  /* 语义色 */
  --success: #07C160;
  --warning: #FA9D3B;
  --danger: #FA5151;
  --danger-active: #E04040;
  /* 中性色 */
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #555555;
  --text-3: #888888;
  --text-4: #B2B2B2;
  --border: #EBEBEB;
  --border-strong: #E0E0E0;
  --mask: rgba(0, 0, 0, .5);
  /* 尺寸 */
  --nav-h: 44px;
  --tab-h: 50px;
  --radius: 8px;
  --radius-lg: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 4px rgba(0, 0, 0, .04);
  --font: "PingFang SC", "Helvetica Neue", Helvetica, "Microsoft YaHei", Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-family: inherit; font-size: 17px; }
a { color: inherit; text-decoration: none; }

/* ============ 顶部导航栏 (原生风格) ============ */
.wx-nav {
  position: sticky; top: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: #F7F7F7;
  border-bottom: 0.5px solid #C9C9C9;
  display: flex; align-items: center;
  font-size: 17px; font-weight: 600; color: #1A1A1A;
}
.wx-nav-inner {
  width: 100%; max-width: 640px; margin: 0 auto;
  height: var(--nav-h); display: flex; align-items: center;
  position: relative; padding: 0 8px;
}
.wx-nav-back {
  width: 40px; height: 100%; display: flex; align-items: center; gap: 2px;
  color: var(--primary); font-size: 16px; flex-shrink: 0;
}
.wx-nav-back svg { width: 12px; height: 20px; }
.wx-nav-title {
  position: absolute; left: 0; right: 0; text-align: center;
  pointer-events: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 0 56px; font-weight: 600;
}
.wx-nav-right {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
  color: var(--primary); font-size: 16px; flex-shrink: 0; padding-right: 8px;
}
.wx-nav-right:empty { display: none; }

/* ============ 页面容器 ============ */
.wx-page {
  max-width: 640px; margin: 0 auto;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  min-height: 100vh; min-height: 100dvh;
}
.wx-page.no-tab { padding-bottom: calc(20px + var(--safe-bottom)); }
.wx-scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wx-scroll-x::-webkit-scrollbar { display: none; }

/* ============ 分组 / 卡片 ============ */
.wx-group {
  background: var(--card);
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}
.wx-group-title {
  padding: 18px 16px 8px;
  font-size: 14px; color: var(--text-3); font-weight: 400;
}
.wx-group-title:first-child { margin-top: 0; }

/* 单元格 */
.wx-cell {
  display: flex; align-items: center;
  min-height: 56px; padding: 12px 16px;
  background: var(--card); position: relative;
  font-size: 17px;
}
.wx-cell + .wx-cell::before,
.wx-group .wx-cell + .wx-cell::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0;
  border-top: 0.5px solid var(--border);
}
.wx-cell.tap:active { background: #ECECEC; }
.wx-cell .ic {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-right: 12px; color: #fff;
}
.wx-cell .ic.blue { background: #2E7BE4; }
.wx-cell .ic.green { background: #07C160; }
.wx-cell .ic.orange { background: #FA9D3B; }
.wx-cell .ic.purple { background: #7C5CFC; }
.wx-cell .ic.red { background: #FA5151; }
.wx-cell .ic.cyan { background: #14C4C4; }
.wx-cell .label { flex: 1; min-width: 0; }
.wx-cell .label .sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.wx-cell .value { color: var(--text-3); font-size: 16px; max-width: 55%; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-cell .arrow { color: #C8C8C8; font-size: 20px; margin-left: 6px; flex-shrink: 0; }
.wx-cell .badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  margin-left: 8px; flex-shrink: 0;
}

/* ============ 按钮 ============ */
.wx-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; border: none; border-radius: var(--radius);
  font-size: 17px; font-weight: 600; transition: background .15s, transform .1s;
  width: 100%;
}
.wx-btn:active { transform: scale(.985); }
.wx-btn-primary { background: var(--primary); color: #fff; }
.wx-btn-primary:active { background: var(--primary-active); }
.wx-btn-primary[disabled] { background: #A9C7EE; color: #fff; pointer-events: none; }
.wx-btn-default { background: #F2F2F2; color: var(--text); }
.wx-btn-default:active { background: #E5E5E5; }
.wx-btn-ghost { background: var(--card); color: var(--primary); border: 0.5px solid var(--primary); }
.wx-btn-ghost:active { background: var(--primary-light); }
.wx-btn-danger { background: var(--card); color: var(--danger); border: 0.5px solid var(--danger); }
.wx-btn-danger:active { background: #FDEBEB; }
.wx-btn-row { display: flex; gap: 12px; padding: 16px; }
.wx-btn-sm { height: 34px; font-size: 14px; padding: 0 14px; width: auto; border-radius: 6px; }

/* ============ 宫格入口 ============ */
.wx-grid {
  background: var(--card); border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 0; margin-top: 12px;
}
.wx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wx-grid-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 6px; transition: background .15s; border-radius: 8px;
}
.wx-grid-item:active { background: #F0F0F0; }
.wx-grid-item .g-ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin-bottom: 8px;
}
.wx-grid-item .g-name { font-size: 13px; color: var(--text-2); text-align: center; }

/* ============ 横幅 / Banner ============ */
.wx-banner {
  margin: 12px; border-radius: var(--radius-lg);
  padding: 18px 18px; color: #fff; position: relative; overflow: hidden;
}
.wx-banner.blue { background: linear-gradient(135deg, #3A86EE, #2E7BE4); }
.wx-banner.green { background: linear-gradient(135deg, #1EBF6E, #07C160); }
.wx-banner.gray { background: #9A9A9A; }
.wx-banner .b-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.wx-banner .b-sub { font-size: 13px; opacity: .92; }
.wx-banner .b-stat { display: flex; gap: 20px; margin-top: 14px; }
.wx-banner .b-stat .s-num { font-size: 24px; font-weight: 700; }
.wx-banner .b-stat .s-label { font-size: 12px; opacity: .85; }
.wx-banner .b-btn {
  position: absolute; right: 16px; top: 16px;
  background: rgba(255,255,255,.22); color: #fff; border: none;
  padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 600;
}

/* ============ 分段控件 ============ */
.wx-segment {
  display: flex; background: #EDEDED; border-radius: 9px;
  padding: 3px; margin: 12px 12px 0; gap: 3px;
}
.wx-segment-item {
  flex: 1; text-align: center; padding: 8px 4px; font-size: 14px;
  border-radius: 7px; color: var(--text-2); font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.wx-segment-item.active { background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.wx-segment.scroll { overflow-x: auto; display: flex; }

/* ============ 进度条 ============ */
.wx-progress { height: 6px; background: #E5E5E5; border-radius: 6px; overflow: hidden; }
.wx-progress > i { display: block; height: 100%; background: var(--primary); border-radius: 6px;
  transition: width .4s ease; }

/* ============ 头像 ============ */
.wx-avatar {
  width: 48px; height: 48px; border-radius: 8px; background: #C9D6E8; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  flex-shrink: 0; overflow: hidden;
}
.wx-avatar.round { border-radius: 50%; }
.wx-avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.wx-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============ 标签 / 角标 ============ */
.wx-tag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 4px;
  font-size: 12px; font-weight: 500; line-height: 18px;
}
.wx-tag.blue { background: var(--primary-light); color: var(--primary); }
.wx-tag.green { background: #E6F8EE; color: #07A353; }
.wx-tag.orange { background: #FEF2E2; color: #D9821A; }
.wx-tag.red { background: #FDEBEB; color: #E04040; }
.wx-tag.gray { background: #F0F0F0; color: #888; }
.wx-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============ 底部标签栏 ============ */
.wx-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #F7F7F7; border-top: 0.5px solid #C9C9C9;
  display: flex; max-width: 640px; margin: 0 auto;
}
.wx-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: #888; font-size: 11px;
  transition: color .15s;
}
.wx-tab svg { width: 24px; height: 24px; }
.wx-tab.active { color: var(--primary); }
.wx-tab .t-dot {
  position: absolute; top: 4px; right: 50%; margin-right: -16px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  border: 1.5px solid #F7F7F7;
}

/* ============ 卡片内区块 ============ */
.wx-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-top: 12px; box-shadow: var(--shadow);
}
.wx-card-title { font-size: 16px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; }
.wx-row { display: flex; align-items: center; }
.wx-between { display: flex; align-items: center; justify-content: space-between; }
.wx-muted { color: var(--text-3); font-size: 14px; }
.wx-strong { font-weight: 600; }

/* 用户资料卡 */
.wx-profile {
  background: linear-gradient(135deg, #3A86EE, #2E7BE4);
  margin: 12px; border-radius: var(--radius-lg); padding: 20px;
  display: flex; align-items: center; gap: 14px; color: #fff;
}
.wx-profile .p-name { font-size: 19px; font-weight: 700; }
.wx-profile .p-sub { font-size: 13px; opacity: .9; margin-top: 4px; }
.wx-profile .p-right { margin-left: auto; text-align: right; }
.wx-profile .p-weight { font-size: 26px; font-weight: 700; }
.wx-profile .p-weight-label { font-size: 12px; opacity: .85; }

/* ============ 横向食谱预览卡 ============ */
.day-card {
  width: 132px; flex-shrink: 0; background: var(--card);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
}
.day-card .d-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.day-card .d-meal { font-size: 12px; color: var(--text-3); display: flex; gap: 4px;
  align-items: center; margin: 3px 0; }
.day-card .d-meal .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }

/* ============ 星级评分 ============ */
.stars { display: inline-flex; align-items: center; gap: 4px; }
.star {
  font-size: 32px; color: #DCDCDC; line-height: 1; padding: 4px;
  transition: transform .12s, color .12s; -webkit-tap-highlight-color: transparent;
  min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
}
.star:active { transform: scale(.82); }
.star.on { color: #FF9A00; }
.star-num { font-size: 14px; color: var(--text-3); margin-left: 6px; }
.star-num b { color: #FF9A00; font-size: 16px; }

/* ============ 空状态 ============ */
.wx-empty { text-align: center; padding: 70px 24px; color: var(--text-3); }
.wx-empty .e-ic { font-size: 54px; margin-bottom: 14px; }
.wx-empty .e-title { font-size: 16px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.wx-empty .e-desc { font-size: 14px; margin-bottom: 18px; }

/* ============ Toast ============ */
.wx-toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%,-50%);
  z-index: 999; padding: 14px 22px; border-radius: 10px;
  background: rgba(0,0,0,.8); color: #fff; font-size: 15px; font-weight: 500;
  max-width: 80%; text-align: center; animation: toastIn .25s ease;
  pointer-events: none; line-height: 1.4;
}
.wx-toast .t-ic { font-size: 34px; margin-bottom: 8px; display: block; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,-50%) scale(.9); } }

/* ============ 加载中 ============ */
.wx-loading {
  position: fixed; inset: 0; z-index: 998; background: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
}
.wx-spinner {
  width: 30px; height: 30px; border: 3px solid #E0E0E0; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 弹窗 ============ */
.wx-mask {
  position: fixed; inset: 0; background: var(--mask); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.wx-dialog {
  background: #fff; border-radius: 14px; width: 100%; max-width: 300px;
  padding: 24px 20px 16px; text-align: center; animation: popIn .25s ease;
}
@keyframes popIn { from { transform: scale(.9); opacity: 0; } }
.wx-dialog .d-ic { font-size: 40px; margin-bottom: 10px; }
.wx-dialog .d-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.wx-dialog .d-msg { font-size: 14px; color: var(--text-3); margin-bottom: 20px; line-height: 1.4; }
.wx-dialog .d-btns { display: flex; gap: 12px; }
.wx-dialog .d-btns .wx-btn { height: 44px; }

/* ============ 底部动作面板 ============ */
.wx-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 210;
  background: #F2F2F2; border-radius: 14px 14px 0 0;
  padding-bottom: var(--safe-bottom);
  animation: sheetUp .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.wx-sheet-title { text-align: center; font-size: 13px; color: var(--text-3);
  padding: 14px; background: #fff; }
.wx-sheet-item {
  background: #fff; text-align: center; padding: 16px; font-size: 17px;
  color: var(--text); border-top: 0.5px solid var(--border);
}
.wx-sheet-item:active { background: #ECECEC; }
.wx-sheet-item.danger { color: var(--danger); }
.wx-sheet-cancel { background: #fff; text-align: center; padding: 16px;
  font-size: 17px; font-weight: 600; color: var(--text); margin-top: 8px; }
.wx-sheet-cancel:active { background: #ECECEC; }

/* ============ 表单 ============ */
.wx-form { background: var(--card); margin-top: 12px; border-radius: var(--radius); }
.wx-field { display: flex; align-items: center; min-height: 54px; padding: 8px 16px;
  position: relative; }
.wx-field + .wx-field::before { content: ''; position: absolute; top: 0; left: 16px; right: 0;
  border-top: 0.5px solid var(--border); }
.wx-field label { width: 92px; flex-shrink: 0; font-size: 16px; color: var(--text); }
.wx-field input, .wx-field select, .wx-field textarea {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; color: var(--text); text-align: right; resize: none;
}
.wx-field textarea { text-align: left; padding: 8px 0; }
.wx-field .unit { color: var(--text-3); margin-left: 6px; font-size: 14px; }

/* 开关 */
.wx-switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.wx-switch input { display: none; }
.wx-switch .track { position: absolute; inset: 0; background: #E5E5E5; border-radius: 15px;
  transition: background .2s; }
.wx-switch .track::after { content: ''; position: absolute; top: 2px; left: 2px;
  width: 26px; height: 26px; background: #fff; border-radius: 50%; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.wx-switch input:checked + .track { background: var(--success); }
.wx-switch input:checked + .track::after { transform: translateX(20px); }

/* 图片预览 */
.wx-imgprev { position: fixed; inset: 0; background: #000; z-index: 300;
  display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px;
  animation: fadeIn .2s; }
.wx-imgprev img { max-width: 100%; max-height: 72vh; border-radius: 8px; }
.wx-imgprev .p-name { color: #fff; font-size: 16px; margin-top: 16px; }
.wx-imgprev .p-close { margin-top: 20px; background: rgba(255,255,255,.2); color: #fff;
  border: none; padding: 10px 32px; border-radius: 22px; font-size: 15px; }

/* ============ 结果可视化 ============ */
.rank-row { margin-bottom: 16px; }
.rank-row:last-child { margin-bottom: 0; }
.rank-head { display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; margin-bottom: 6px; }
.rank-head .r-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1; min-width: 0; }
.rank-head .r-score { color: var(--primary); font-weight: 700; margin-left: 10px; }
.rank-bar { height: 8px; background: #EEF1F6; border-radius: 8px; overflow: hidden; }
.rank-bar > i { display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #5A9BF0, #2E7BE4); transition: width .5s; }
.rank-bar > i.top { background: linear-gradient(90deg, #FFC15A, #FF9A00); }

/* 排行榜奖牌 */
.medal { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
  margin-right: 8px; color: #fff; flex-shrink: 0; }
.medal.g1 { background: #FF9A00; } .medal.g2 { background: #9AA7B5; } .medal.g3 { background: #CD7F3A; }

/* ============ 骨架屏 (首屏/列表加载占位，避免 CLS) ============ */
.wx-skeleton { padding: 12px; }
.sk-block { background: var(--card); border-radius: var(--radius); margin-bottom: 12px;
  padding: 16px; overflow: hidden; }
.sk-line { height: 14px; border-radius: 7px; margin: 8px 0;
  background: linear-gradient(90deg, #EEE 25%, #F5F5F5 37%, #EEE 63%);
  background-size: 400% 100%; animation: skShine 1.3s ease infinite; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-avatar { width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(90deg, #EEE 25%, #F5F5F5 37%, #EEE 63%);
  background-size: 400% 100%; animation: skShine 1.3s ease infinite; }
@keyframes skShine { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ============ 懒加载图片 (loading=lazy + 占位底色，防抖动) ============ */
.lazy-img { background: #F0F0F0; min-height: 80px; }
.lazy-img.loaded { background: transparent; }
img.lazy { opacity: 0; transition: opacity .3s; }
img.lazy.loaded { opacity: 1; }

/* ============ 下拉刷新 ============ */
.wx-ptr { height: 0; overflow: hidden; text-align: center; color: var(--text-3);
  font-size: 13px; transition: height .2s; }
.wx-ptr.show { height: 44px; line-height: 44px; }
.wx-ptr .ptr-ic { display: inline-block; }
.wx-ptr.loading .ptr-ic { animation: spin .8s linear infinite; }

/* ============ 全局错误提示条 ============ */
.wx-errorbar { background: #FDEBEB; color: #E04040; font-size: 13px;
  padding: 10px 16px; text-align: center; }
.wx-errorbar button { background: transparent; border: none; color: #E04040;
  text-decoration: underline; font-size: 13px; margin-left: 8px; }

/* ============ 操作结果页 (流程终结反馈) ============ */
.wx-result { text-align: center; padding: 64px 32px 32px; }
.wx-result .r-ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff;
  background: var(--success); animation: popIn .3s ease; }
.wx-result.fail .r-ic { background: var(--danger); }
.wx-result .r-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.wx-result .r-desc { font-size: 14px; color: var(--text-3); margin-bottom: 28px; line-height: 1.5; }

/* ============ 离线/降级提示 ============ */
.wx-offline-tip { position: fixed; top: calc(var(--nav-h) + var(--safe-top)); left: 0; right: 0;
  z-index: 150; background: #FFF7E6; color: #D9821A; font-size: 13px;
  text-align: center; padding: 8px; }

/* ============ 触控热区保障 (≥48px) ============ */
.wx-tab, .wx-grid-item, .star, .wx-nav-back, .wx-sheet-item, .wx-btn-sm { min-height: 48px; }

/* ============ 辅助 ============ */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.px12 { padding-left: 12px; padding-right: 12px; }
.hidden { display: none !important; }
.txt-center { text-align: center; }
.divider { height: 0.5px; background: var(--border); margin: 0 16px; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ PC 端适配（企业微信 PC 内嵌浏览器 / 系统浏览器） ============ */
@media (min-width: 720px) {
  body { background: #EDEDED; }
  .wx-nav, .wx-tabbar, .wx-page { max-width: 480px; }
  .wx-page {
    background: #F5F5F5; margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(0,0,0,.04);
    min-height: 100vh; min-height: 100dvh;
  }
  /* 管理后台在 PC 上放宽，利用横向空间 */
  .admin-wide .wx-page { max-width: 960px; }
  .admin-wide .wx-nav { max-width: 960px; }
  .admin-wide .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (min-width: 720px) {
    .admin-wide .grid-2 > * { margin-top: 0; }
  }
}


/* 菜品目录与多选投票 V2 */
.catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.catalog-card{min-height:158px;border:1px solid var(--border);border-radius:12px;background:#fff;padding:8px;display:flex;flex-direction:column;align-items:stretch;gap:6px;text-align:left;color:var(--text);position:relative;overflow:hidden}
.catalog-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:9px}
.catalog-card.inactive{opacity:.58}
.catalog-upload{align-items:center;justify-content:center;text-align:center;border:1.5px dashed var(--primary);color:var(--primary);background:#f3f8ff}
.catalog-plus{font-size:36px;line-height:1}
.catalog-name{font-size:15px;font-weight:650}
.catalog-desc{font-size:12px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.catalog-placeholder{aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#f2f3f5;font-size:34px}
.candidate-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.candidate-mini{display:grid;grid-template-columns:22px 42px minmax(0,1fr);align-items:center;gap:6px;min-height:52px;padding:5px;border-radius:9px;background:#f6f7f9;font-size:13px}
.candidate-mini img,.candidate-mini-placeholder{width:42px;height:42px;object-fit:cover;border-radius:7px;display:flex;align-items:center;justify-content:center}
.candidate-order{width:21px;height:21px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px}
.candidate-sheet{max-height:92vh;overflow:auto}
.candidate-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
.candidate-pick{border:2px solid transparent;border-radius:11px;background:#f5f6f8;padding:7px;display:flex;flex-direction:column;gap:5px;text-align:left}
.candidate-pick.selected{border-color:var(--primary);background:#eef6ff}
.candidate-pick img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.candidate-order-list{padding:0 12px 8px}
.candidate-order-row{display:grid;grid-template-columns:24px minmax(0,1fr) 34px 34px;gap:6px;align-items:center;padding:6px 0;border-bottom:.5px solid var(--border)}
.candidate-order-row button{border:0;border-radius:7px;background:#edf0f4;height:30px}
.vote-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.vote-choice-card{border:2px solid transparent;border-radius:12px;background:#fff;padding:7px;text-align:left;position:relative;overflow:hidden}
.vote-choice-card.selected{border-color:var(--primary);background:#eef6ff}
.vote-choice-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.vote-choice-card .choice-check{position:absolute;right:12px;top:12px;width:25px;height:25px;border-radius:50%;background:var(--primary);color:#fff;display:none;align-items:center;justify-content:center}
.vote-choice-card.selected .choice-check{display:flex}
.result-rank-item{display:grid;grid-template-columns:30px 48px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 0;border-bottom:.5px solid var(--border)}
.result-rank-item img{width:48px;height:48px;border-radius:8px;object-fit:cover}
.result-rank-item.winner{background:#fff9e8;border-radius:9px;padding-left:6px;padding-right:6px}


/* ============ Formal business theme overrides ============ */
:root {
  --primary: #1F5FAE;
  --primary-active: #174982;
  --primary-light: #EAF1FA;
  --success: #237A4B;
  --warning: #A96816;
  --danger: #B42318;
  --danger-active: #911D15;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --text: #182230;
  --text-2: #344054;
  --text-3: #667085;
  --text-4: #98A2B3;
  --border: #E4E7EC;
  --border-strong: #D0D5DD;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
.wx-nav,
.wx-tabbar {
  background: rgba(255,255,255,.96) !important;
  border-color: var(--border-strong) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.wx-nav { color: var(--text); }
.wx-nav-title { font-weight: 650; }
.wx-page { background: var(--bg); }
.wx-group,
.wx-card,
.wx-grid,
.wx-form,
.day-card,
.catalog-card,
.vote-choice-card,
.sk-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.wx-group { overflow: hidden; }
.wx-group-title {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  padding-top: 18px;
}
.wx-cell {
  min-height: 58px;
  font-size: 16px;
}
.wx-cell.tap:active,
.wx-grid-item:active,
.wx-sheet-item:active {
  background: #F2F4F7;
}
.wx-cell .ic,
.wx-grid-item .g-ic {
  border-radius: 6px !important;
  box-shadow: none !important;
}
.wx-cell .ic.blue,
.wx-grid-item .g-ic[style*="#2E7BE4"] { background: #1F5FAE !important; }
.wx-cell .ic.green,
.wx-grid-item .g-ic[style*="#07C160"] { background: #237A4B !important; }
.wx-cell .ic.orange,
.wx-grid-item .g-ic[style*="#FA9D3B"] { background: #A96816 !important; }
.wx-cell .ic.purple,
.wx-grid-item .g-ic[style*="#7C5CFC"] { background: #475467 !important; }
.wx-cell .ic.red,
.wx-grid-item .g-ic[style*="#FA5151"] { background: #B42318 !important; }
.wx-cell .ic.cyan { background: #0E7090 !important; }
.wx-grid {
  padding: 6px 0;
}
.wx-grid-item .g-name {
  color: var(--text-2);
  font-weight: 500;
}
.wx-banner {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 2px 8px rgba(16,24,40,.08);
}
.wx-banner.blue,
.wx-profile {
  background: #1F5FAE !important;
}
.wx-banner.green { background: #237A4B !important; }
.wx-banner.gray { background: #667085 !important; }
.wx-banner .b-btn {
  border-radius: 6px;
  background: rgba(255,255,255,.18);
}
.wx-btn {
  border-radius: 6px;
  font-weight: 650;
  box-shadow: none !important;
}
.wx-btn-primary {
  background: var(--primary) !important;
}
.wx-btn-primary:active { background: var(--primary-active) !important; }
.wx-btn-default {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}
.wx-btn-ghost {
  background: #FFFFFF;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.wx-btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}
.wx-tag {
  border-radius: 4px;
  font-weight: 650;
}
.wx-tag.blue { background: #EAF1FA; color: #1F5FAE; }
.wx-tag.green { background: #ECFDF3; color: #237A4B; }
.wx-tag.orange { background: #FFF6E5; color: #A96816; }
.wx-tag.red { background: #FEF3F2; color: #B42318; }
.wx-tag.gray { background: #F2F4F7; color: #667085; }
.wx-dialog,
.wx-sheet {
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(16,24,40,.18);
}
.wx-avatar {
  background: #667085;
}
.rank-bar > i,
.rank-bar > i.top {
  background: #1F5FAE;
}
.medal.g1,
.medal.g2,
.medal.g3 {
  background: #475467;
}
.catalog-upload {
  border-color: var(--border-strong);
  color: var(--primary);
  background: #F8FAFC;
}
.candidate-mini,
.candidate-pick,
.candidate-order-row button {
  background: #F8FAFC;
}
.candidate-order,
.vote-choice-card .choice-check {
  background: var(--primary);
}
.candidate-pick.selected,
.vote-choice-card.selected {
  border-color: var(--primary);
  background: #F0F5FB;
}
.result-rank-item.winner {
  background: #F8FAFC;
  border: 1px solid var(--border);
}
.tab-pill {
  border-radius: 6px !important;
  font-weight: 650 !important;
}
.tab-pill.active {
  background: var(--primary) !important;
  color: #FFFFFF !important;
}
.vote-meal-tabs-shell,
.vote-day-tabs-shell {
  background: rgba(255,255,255,.96) !important;
  border-color: var(--border) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.05) !important;
}
.vote-meal-tab,
.vote-day-pill,
.me-public-results .me-result-section-pill,
.me-public-results .me-result-day-pill {
  border-radius: 6px !important;
  background: #FFFFFF !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-2) !important;
  box-shadow: none !important;
}
.vote-meal-tab.active,
.vote-day-pill.active,
.me-public-results .me-result-section-pill.active,
.me-public-results .me-result-day-pill.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
  transform: none !important;
}
.vote-meal-tab .meal-tab-icon,
.vote-meal-tab.active .meal-tab-icon {
  background: #F2F4F7 !important;
}
.vote-meal-tab.active .meal-tab-icon {
  color: var(--primary);
}
.vote-meal-tab .meal-tab-done {
  background: #237A4B;
}
.vote-choice-card,
.catalog-card {
  border-width: 1px;
}
.vote-choice-card img,
.catalog-card img,
.result-rank-item img,
.candidate-mini img,
.candidate-mini-placeholder,
.catalog-placeholder {
  border-radius: 6px;
}
@media (min-width: 720px) {
  body { background: #E9EDF3; }
  .wx-page { background: #F3F5F8; }
}

/* ============ Civic service portal theme overrides ============ */
:root {
  --primary: #2F80ED;
  --primary-active: #1F66C8;
  --primary-light: #EAF4FF;
  --bg: #F1F8FF;
  --card: #FFFFFF;
  --text: #172033;
  --text-2: #39465E;
  --text-3: #738098;
  --border: #E6EEF7;
  --border-strong: #D7E4F2;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 28px rgba(47, 128, 237, .10);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(94, 178, 255, .26), transparent 32%),
    linear-gradient(180deg, #E9F6FF 0%, #F7FBFF 42%, #F5F8FC 100%);
  color: var(--text);
}

.wx-page {
  background: transparent;
  padding-left: 14px;
  padding-right: 14px;
}

.wx-nav {
  background: rgba(239, 248, 255, .88) !important;
  border-bottom-color: rgba(215, 228, 242, .66) !important;
  box-shadow: 0 6px 18px rgba(43, 98, 157, .08);
}

.wx-nav-title {
  color: #14233B;
  font-weight: 750;
  letter-spacing: .01em;
}

.wx-tabbar {
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  width: auto;
  height: 62px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border: 1px solid rgba(218, 230, 244, .9) !important;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 12px 30px rgba(33, 82, 134, .16);
}

.wx-tab {
  border-radius: 16px;
  color: #66758D;
}

.wx-tab.active {
  background: #ECF5FF;
  color: var(--primary);
  font-weight: 700;
}

.wx-profile {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 24px 22px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 26px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(229,245,255,.82) 42%, rgba(116,185,255,.72) 100%),
    linear-gradient(135deg, #2F80ED, #80C7FF) !important;
  color: #14233B;
  box-shadow: 0 18px 38px rgba(47, 128, 237, .18);
}

.wx-profile::before {
  content: "";
  position: absolute;
  inset: auto -18% -42% 28%;
  height: 132px;
  border-radius: 999px;
  background: rgba(47, 128, 237, .16);
  transform: rotate(-8deg);
}

.wx-profile::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 14px;
  width: 110px;
  height: 72px;
  opacity: .28;
  background:
    linear-gradient(180deg, transparent 18%, rgba(47,128,237,.88) 18% 100%) 4px 26px / 14px 46px no-repeat,
    linear-gradient(180deg, transparent 0, rgba(47,128,237,.64) 0 100%) 26px 12px / 18px 60px no-repeat,
    linear-gradient(180deg, transparent 28%, rgba(47,128,237,.78) 28% 100%) 52px 0 / 22px 72px no-repeat,
    linear-gradient(180deg, transparent 42%, rgba(47,128,237,.54) 42% 100%) 82px 20px / 18px 52px no-repeat;
}

.wx-profile > * {
  position: relative;
  z-index: 1;
}

.wx-profile .p-name {
  font-size: 22px;
  font-weight: 800;
}

.wx-profile .p-sub,
.wx-profile .p-weight-label {
  color: rgba(20, 35, 59, .68);
  opacity: 1;
}

.wx-profile .p-weight {
  color: var(--primary);
  font-weight: 850;
}

.wx-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(233,246,255,.95)) !important;
  color: var(--text) !important;
  box-shadow: 0 14px 34px rgba(43, 98, 157, .12);
}

.wx-banner.blue,
.wx-banner.green,
.wx-banner.gray {
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(233,246,255,.95)) !important;
  color: var(--text) !important;
}

.wx-banner::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -28px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(47, 128, 237, .12);
}

.wx-banner .b-title,
.wx-banner .b-desc,
.wx-banner .b-btn {
  position: relative;
  z-index: 1;
}

.wx-banner .b-title {
  color: #14233B;
  font-weight: 800;
}

.wx-banner .b-desc {
  color: var(--text-3);
  opacity: 1;
}

.wx-banner .b-btn {
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 999px;
}

.wx-group-title {
  position: relative;
  margin: 22px 2px 10px;
  padding: 0 0 8px;
  color: #14233B;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

.wx-group-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 18px 0 0 rgba(47, 128, 237, .22);
}

.wx-group,
.wx-card,
.wx-grid,
.wx-form,
.day-card,
.catalog-card,
.vote-choice-card,
.sk-block {
  border: 1px solid rgba(224, 235, 247, .92);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}

.wx-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 2px;
  padding: 18px 8px;
}

.wx-grid.wx-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wx-grid-item {
  min-height: 92px;
  padding: 10px 4px;
  border-radius: 18px;
}

.wx-grid-item:active {
  background: #EEF7FF;
}

.wx-grid-item .g-ic,
.wx-cell .ic {
  width: 46px;
  height: 46px;
  border-radius: 18px !important;
  box-shadow: 0 10px 22px rgba(47, 128, 237, .12) !important;
}

.wx-grid-item .g-ic[style],
.wx-cell .ic {
  background: linear-gradient(135deg, #F3FAFF, #FFFFFF) !important;
  color: var(--primary);
}

.wx-grid-item .g-name {
  margin-top: 8px;
  color: #31415B;
  font-size: 14px;
  font-weight: 650;
}

.wx-cell {
  min-height: 66px;
  border-bottom-color: rgba(230, 238, 247, .9);
}

.wx-cell.tap:active,
.wx-sheet-item:active {
  background: #EEF7FF;
}

.wx-btn {
  border-radius: 14px;
  min-height: 44px;
  font-weight: 750;
}

.wx-btn-primary {
  background: linear-gradient(135deg, #2F80ED, #56A8FF) !important;
}

.wx-btn-default,
.wx-btn-ghost {
  background: #FFFFFF;
  border-color: #D8E6F5;
}

.wx-tag {
  border-radius: 999px;
  padding-left: 9px;
  padding-right: 9px;
}

.tab-pill {
  border-radius: 999px !important;
  background: #FFFFFF !important;
  border-color: #D8E6F5 !important;
}

.tab-pill.active {
  background: linear-gradient(135deg, #2F80ED, #56A8FF) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 18px rgba(47, 128, 237, .18);
}

.vote-meal-tabs-shell,
.vote-day-tabs-shell,
.me-public-results .me-result-section-tabs,
.me-public-results .me-result-day-tabs {
  background: rgba(241, 248, 255, .94) !important;
  border-color: rgba(215, 228, 242, .85) !important;
  box-shadow: 0 8px 20px rgba(43, 98, 157, .08) !important;
}

.vote-meal-tab,
.vote-day-pill,
.me-public-results .me-result-section-pill,
.me-public-results .me-result-day-pill {
  border-radius: 999px !important;
  background: #FFFFFF !important;
  border: 1px solid #D8E6F5 !important;
  color: #41506A !important;
  box-shadow: 0 6px 16px rgba(43, 98, 157, .07) !important;
}

.vote-meal-tab.active,
.vote-day-pill.active,
.me-public-results .me-result-section-pill.active,
.me-public-results .me-result-day-pill.active {
  background: linear-gradient(135deg, #2F80ED, #56A8FF) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  box-shadow: 0 10px 22px rgba(47, 128, 237, .22) !important;
}

.vote-meal-tab.active .meal-tab-icon,
.vote-meal-tab .meal-tab-icon {
  background: rgba(255, 255, 255, .82) !important;
  color: var(--primary);
}

.vote-choice-card.selected,
.candidate-pick.selected {
  background: #EEF7FF;
  border-color: var(--primary);
}

.result-rank-item.winner {
  background: #FFF9E9;
  border-color: #FFE6A3;
}

@media (max-width: 380px) {
  .wx-page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .wx-grid-item .g-name {
    font-size: 13px;
  }
}

/* ============ Shortcut service icons ============ */
.wx-grid-item .g-ic.shortcut-icon {
  background: linear-gradient(135deg, #2F80ED, #62B4FF) !important;
  color: #FFFFFF !important;
  box-shadow: 0 12px 24px rgba(47, 128, 237, .20) !important;
}
.wx-grid-item .g-ic.shortcut-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}
.wx-grid-item .g-ic.shortcut-vote {
  background: linear-gradient(135deg, #2F80ED, #61B7FF) !important;
}
.wx-grid-item .g-ic.shortcut-record {
  background: linear-gradient(135deg, #22B573, #65DDA7) !important;
}
.wx-grid-item .g-ic.shortcut-menu {
  background: linear-gradient(135deg, #FF9F38, #FFD166) !important;
}
.wx-grid-item .g-ic.shortcut-result {
  background: linear-gradient(135deg, #16A3D8, #5BD4E8) !important;
}
.wx-grid-item:active .shortcut-icon {
  transform: scale(.96);
}

/* ============ Admin service icons ============ */
.wx-cell .ic.admin-service-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px !important;
  color: #FFFFFF !important;
  flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(47, 128, 237, .16) !important;
}
.wx-cell .ic.admin-service-icon svg {
  width: 27px;
  height: 27px;
  display: block;
}
.wx-cell .ic.admin-users {
  background: linear-gradient(135deg, #2F80ED, #65B8FF) !important;
}
.wx-cell .ic.admin-catalog {
  background: linear-gradient(135deg, #7C5CFC, #B59BFF) !important;
}
.wx-cell .ic.admin-meals {
  background: linear-gradient(135deg, #22B573, #68DCA8) !important;
}
.wx-cell .ic.admin-schedule {
  background: linear-gradient(135deg, #FF9F38, #FFD166) !important;
}
.wx-cell .ic.admin-chef {
  background: linear-gradient(135deg, #E66A33, #F6A85C) !important;
}
.wx-cell .ic.admin-results {
  background: linear-gradient(135deg, #F45B69, #FF9A76) !important;
}
.wx-cell .ic.admin-sync {
  background: linear-gradient(135deg, #16A3D8, #5BD4E8) !important;
}
.wx-cell.tap:active .admin-service-icon {
  transform: scale(.96);
}

/* ============ Admin internal svg icons ============ */
.service-svg,
.dialog-svg-icon,
.admin-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.service-svg svg,
.dialog-svg-icon svg,
.admin-tab-icon svg,
.inline-svg-icon svg {
  display: block;
}
.wx-cell .ic.service-svg {
  width: 46px;
  height: 46px;
  border-radius: 18px !important;
  flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(47, 128, 237, .16) !important;
}
.wx-cell .ic.service-svg svg {
  width: 27px;
  height: 27px;
}
.service-schedule,
.service-calendar,
.service-clock,
.service-duration,
.service-bell,
.service-waiting {
  background: linear-gradient(135deg, #FF9F38, #FFD166) !important;
}
.service-results,
.service-vote,
.service-export,
.service-push {
  background: linear-gradient(135deg, #F45B69, #FF9A76) !important;
}
.service-sync,
.service-corp,
.service-box,
.service-link {
  background: linear-gradient(135deg, #16A3D8, #5BD4E8) !important;
}
.service-settings,
.service-key,
.service-user,
.service-webhook {
  background: linear-gradient(135deg, #7C5CFC, #B59BFF) !important;
}
.service-ok,
.service-users,
.service-meals {
  background: linear-gradient(135deg, #22B573, #68DCA8) !important;
}
.service-warn,
.service-fail,
.service-trash,
.service-stop,
.service-rocket {
  background: linear-gradient(135deg, #F45B69, #FF9A76) !important;
}
.admin-tab-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.admin-tab-icon {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  color: var(--primary);
  background: #ECF5FF;
}
.admin-tab-icon svg {
  width: 16px;
  height: 16px;
}
.admin-tab-pill.active .admin-tab-icon {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.inline-svg-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -4px;
  margin-right: 4px;
  color: currentColor;
}
.inline-svg-icon svg {
  width: 18px;
  height: 18px;
}
.dialog-svg-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, #2F80ED, #62B4FF);
  box-shadow: 0 12px 24px rgba(47, 128, 237, .18);
}
.dialog-svg-icon svg {
  width: 30px;
  height: 30px;
}
.dialog-trash,
.dialog-stop {
  background: linear-gradient(135deg, #F45B69, #FF9A76);
}
.dialog-calendar,
.dialog-waiting,
.dialog-rocket {
  background: linear-gradient(135deg, #FF9F38, #FFD166);
}
.dialog-sync,
.dialog-push {
  background: linear-gradient(135deg, #16A3D8, #5BD4E8);
}

/* ============ Me page svg icons ============ */
.me-data-grid { padding: 12px 8px; }
.me-data-card { min-height: 112px; padding: 12px 6px; text-align: center; border-radius: 18px; }
.me-data-num { margin-top: 8px; font-size: 22px; font-weight: 800; color: var(--primary); }
.me-stat-icon,
.wx-cell .ic.me-svg-icon { display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 12px 24px rgba(47, 128, 237, .16) !important; }
.me-stat-icon { width: 42px; height: 42px; border-radius: 16px; }
.me-stat-icon svg { width: 25px; height: 25px; display: block; }
.wx-cell .ic.me-svg-icon { width: 46px; height: 46px; border-radius: 18px !important; flex-shrink: 0; }
.wx-cell .ic.me-svg-icon svg { width: 27px; height: 27px; display: block; }
.me-weight,
.me-vote { background: linear-gradient(135deg, #2F80ED, #65B8FF) !important; }
.me-choices { background: linear-gradient(135deg, #22B573, #68DCA8) !important; }
.me-sessions,
.me-result { background: linear-gradient(135deg, #16A3D8, #5BD4E8) !important; }
.me-logout { background: linear-gradient(135deg, #F45B69, #FF9A76) !important; }
.wx-cell.tap:active .me-svg-icon,
.me-data-card:active .me-stat-icon { transform: scale(.96); }

/* ============ Me page icon color priority fix ============ */
.wx-cell .ic.me-svg-icon.me-vote,
.wx-cell .ic.me-svg-icon.me-weight {
  background: linear-gradient(135deg, #2F80ED, #65B8FF) !important;
  color: #FFFFFF !important;
}
.wx-cell .ic.me-svg-icon.me-result {
  background: linear-gradient(135deg, #16A3D8, #5BD4E8) !important;
  color: #FFFFFF !important;
}
.wx-cell .ic.me-svg-icon.me-logout {
  background: linear-gradient(135deg, #F45B69, #FF9A76) !important;
  color: #FFFFFF !important;
}
.wx-cell .ic.me-svg-icon svg {
  stroke: currentColor;
}

/* ============ Accessibility and admin interaction refinements ============ */
button, .wx-btn, .tab-pill, .wx-cell.tap, .candidate-pick { min-height: 44px; }
.wx-cell.tap,
.wx-cell.tap * { cursor: pointer; }
.tab-pill,
.wx-nav-back,
.wx-grid-item,
a[href] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(31, 95, 174, .42);
  outline-offset: 2px;
}
.admin-tab-pill { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; border:1px solid var(--border); background:#fff; color:var(--text-2); }
.admin-tab-pill.active { border-color:var(--primary); }
.admin-tab-pill:not(.active):hover { background:#F8FAFC; border-color:var(--border-strong); }
.chef-editor .meal-day-sidebar { position:sticky; top:calc(var(--nav-h) + var(--safe-top) + 12px); align-self:flex-start; }
.chef-item { padding:12px; }
.chef-item .wx-input { min-height:44px; }
.wx-btn-danger { background:#FFF7F6; }
.wx-btn-danger:hover { background:#FEECEB; }
@media (max-width: 560px) {
  .chef-editor { gap:8px; padding-left:0; padding-right:0; }
  .chef-editor .meal-day-sidebar { width:66px; flex-basis:66px; }
}

/* ============ Admin top tab all icons fix ============ */
.admin-tab-icon.tab-users {
  background: #EAF4FF;
  color: #2F80ED;
}
.admin-tab-icon.tab-catalog {
  background: #F2EDFF;
  color: #7C5CFC;
}
.admin-tab-icon.tab-meals {
  background: #EAFBF2;
  color: #22B573;
}
.admin-tab-icon.tab-schedule {
  background: #FFF4E2;
  color: #FF9F38;
}
.admin-tab-icon.tab-results {
  background: #FFF0F1;
  color: #F45B69;
}
.admin-tab-icon.tab-sync {
  background: #E8FAFF;
  color: #16A3D8;
}
.admin-tab-icon.tab-settings {
  background: #F2EDFF;
  color: #7C5CFC;
}
.admin-tab-pill.active .admin-tab-icon {
  background: rgba(255,255,255,.24) !important;
  color: #FFFFFF !important;
}

/* ============ Final UI consistency: responsive hierarchy without changing flows ============ */
.admin-tab-pill { font: inherit; text-align: left; }
.admin-tab-pill[role="tab"]:focus-visible { outline: 3px solid #1F5FAE; outline-offset: 3px; }
.vote-choice-card[aria-pressed="true"] { border-color: var(--primary); background: #EEF6FF; }
.vote-choice-card:focus-visible { outline: 3px solid rgba(31,95,174,.52); outline-offset: 2px; }
@media (min-width: 720px) {
  .wx-page { max-width: 720px; }
  .admin-wide .wx-page, body:has(#adminTabStrip) .wx-page { max-width: 1080px; }
  body:has(#adminTabStrip) #adminTabStrip { max-width: 1080px; margin: 0 auto; padding-left: 18px !important; padding-right: 18px !important; }
  body:has(#adminTabStrip) .wx-nav { max-width: 1080px; }
  .wx-profile, .wx-banner { max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* ============ Usability pass: stable scale, focus and dense work areas ============ */
html { zoom: 1; }
button, [role="button"], [role="tab"], a[href], summary, label[for] { cursor: pointer; }
input, textarea, [contenteditable="true"] { cursor: text; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #1F5FAE; outline-offset: 3px; }
.admin-workbench-tip { max-width:1080px; margin:10px auto 0; padding:0 18px; color:var(--text-2); font-size:13px; line-height:1.55; }
.admin-workbench-tip b { color:var(--text); margin-right:8px; }
.vote-submit-progress { flex:1 0 100%; color:var(--text-2); font-size:12px; font-weight:600; text-align:center; }
.vote-submit-bar { display:flex; flex-wrap:wrap; gap:7px; }
.vote-submit-bar .wx-btn { flex:1 0 100%; }
.vote-rules-title { min-height:44px; display:flex; align-items:center; padding:0 14px; color:var(--text); font-weight:650; }
.vote-rules .vote-rules-body { display:block; }
@media (min-width: 720px) {
  .vote-control-zone { border-radius:0 0 14px 14px; }
}
