/* ============================================================
   家庭点餐 · 管理后台样式
   设计系统与小程序端（miniprogram/app.wxss · 青灶绿点餐风）同源：
   主色灶绿 #7fa477 + 暖杏 #e8a33d + 暖米白底 + 纯白卡片，
   圆角适中偏大，阴影带暖绿灰调。无框架、无构建。
   ============================================================ */

:root {
  /* ---------- 主色：灶绿（与小程序 --brand 一致） ---------- */
  --brand: #7fa477;
  --brand-light: #94b789;
  --brand-dark: #5d7f56;
  --brand-soft: #eef3e4;
  --brand-soft2: #dfe9d2;
  --gold: #e8a33d;
  --gold-soft: #fbf2e2;
  --brand-cta: #5d7f56; /* 实心按钮/可点击文字专用，4.53:1 */
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 18px;

  /* ---------- 文字：暖黑 ---------- */
  --text: #2b2a26;
  --text-2: #767068;
  --text-3: #766f67; /* AA 达标：白卡 4.95 米白 4.54 */

  /* ---------- 面 ---------- */
  --bg: #f7f5ee;          /* 页面底色（暖米白，同小程序 --cream） */
  --bg-2: #efede3;
  --card: #ffffff;
  --sidebar: #f7f5ee;

  --border: #e9e6da;
  --border-2: #dcd8ca;

  /* ---------- 语义色（同小程序） ---------- */
  --success: #6f9865;
  --success-soft: #eaf3e2;
  --warn: #d9832b;
  --warn-soft: #fbf1e1;
  --info: #4a7fb5;
  --info-soft: #eaf1f8;
  --danger: #bc5a45;
  --danger-soft: #f9ece8;

  /* ---------- 圆角 ---------- */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --radius-pill: 999px;

  /* ---------- 阴影（奶绿灰，极淡） ---------- */
  --shadow-1: 0 2px 8px rgba(126, 138, 112, 0.05);
  --shadow-2: 0 6px 22px rgba(126, 138, 112, 0.08);
  --shadow-brand: 0 5px 14px rgba(127, 164, 119, 0.18);
  --shadow: var(--shadow-1);
  --shadow-lg: 0 12px 36px rgba(126, 138, 112, 0.14);
}

* { box-sizing: border-box; }

/* 后台锁壳布局（admin.html body.shell）：外壳恒为一屏，杜绝任何文档级滚动，
   侧边栏/顶栏物理固定，只有 .main 内部滚动。login.html 不带 .shell 不受影响。 */
body.shell { overflow: hidden; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--brand-dark); text-decoration: none; }

/* ==================== 登录页 ==================== */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(600px 320px at 85% -10%, var(--brand-soft) 0%, transparent 70%),
    radial-gradient(520px 300px at -10% 110%, var(--gold-soft) 0%, transparent 70%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 780px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  display: flex;
  overflow: hidden;
  min-height: 420px;
}

/* 左侧品牌区：灶绿渐变 + 插画 */
.login-side {
  flex: 0 0 46%;
  background: linear-gradient(160deg, var(--brand-light) 0%, var(--brand) 55%, var(--brand-dark) 100%);
  color: #fff;
  padding: 34px 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-side::before,
.login-side::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.login-side::before { width: 180px; height: 180px; right: -60px; top: -50px; }
.login-side::after { width: 120px; height: 120px; left: -40px; bottom: -30px; }

.side-mark { position: relative; z-index: 1; }
.side-art {
  width: 112px; height: 112px;
  object-fit: contain;
  margin-bottom: 18px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18));
  animation: breathe-float 4s ease-in-out infinite;
}
.side-title { font-size: 21px; font-weight: 700; line-height: 1.5; letter-spacing: .5px; }
.side-sub {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .82);
}
.side-dots { display: flex; gap: 6px; position: relative; z-index: 1; }
.side-dots i {
  width: 18px; height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .35);
}
.side-dots i:first-child { background: var(--gold); width: 30px; }

.login-main { flex: 1; padding: 40px 34px 34px; display: flex; flex-direction: column; }

.login-logo {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-brand);
  overflow: hidden;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; }

.login-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.login-sub { color: var(--text-3); font-size: 13px; margin: 0 0 28px; }

.login-tip {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .login-card { max-width: 420px; flex-direction: column; }
  .login-side { flex: none; padding: 24px 26px; }
  .side-art { width: 76px; height: 76px; margin-bottom: 10px; }
  .side-title { font-size: 18px; }
  .side-dots { display: none; }
}

/* ==================== 表单控件 ==================== */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}

.field .hint { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 6px; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(127, 164, 119, 0.14);
}

.textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
select.select { cursor: pointer; }

/* ==================== 按钮 ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}

.btn:hover { border-color: var(--border-2); background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-cta);
  border-color: var(--brand-cta);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  background: #526e4c;
  border-color: #526e4c;
}

.btn-danger { color: var(--danger); border-color: #ecd2c9; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.94); }

.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 16px; border-radius: var(--radius-pill); }

/* ==================== 布局 ==================== */

.layout { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.sidebar {
  width: 216px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  color: #6d675e; /* AA 5.13:1 */
  padding: 20px 0;
  height: 100%;
  overflow-y: auto;
}

.sidebar-brand { padding: 0 14px 16px; }

/* 品牌卡片：白底圆角 + 插画 + 双行文字 */
.brand-card {
  display: flex; align-items: center; gap: 11px;
  background: #fff;
  border-radius: var(--radius);
  padding: 11px 12px;
  box-shadow: var(--shadow-1);
}

.sidebar-brand .dot,
.brand-card img.brand-ico {
  width: 38px; height: 38px; border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  animation: breathe-float 3.6s ease-in-out infinite;
}

.brand-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-txt b { font-size: 14px; font-weight: 700; color: var(--text); }
.brand-txt span { font-size: 12px; color: var(--text-3); }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 17px;
  margin: 2px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background .18s, color .18s, transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  font-size: 14px;
  color: var(--text-2);
}

/* 「端菜」竖条：选中时从中心弹性生长 */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 56%;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  transform: translate(-50%, -50%) scaleY(0);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}

.nav-item:hover { background: rgba(255,255,255,.7); color: var(--text); transform: translateX(3px); }

.nav-item.active {
  background: #fff;
  color: var(--brand-dark);
  font-weight: 600;
  box-shadow: var(--shadow-1);
  transform: none;
}

.nav-item.active::before { transform: translate(-50%, -50%) scaleY(1); }

/* 选中项右侧的「上菜铃」小金点（有角标时让位） */
.nav-item.active:not(:has(.badge:not(.hide)))::after {
  content: '';
  position: absolute;
  right: 13px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
  animation: dot-pop .45s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes dot-pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 图标：hover 时像被端起，轻轻一晃 */
.nav-item .ico {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), background .15s;
}
.nav-item:hover .ico { transform: translateY(-2px) rotate(-8deg) scale(1.1); }
.nav-item.active .ico { transform: scale(1.08); }

@keyframes ico-pop {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.22) rotate(-10deg); }
  75% { transform: scale(.94) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.nav-item:hover .ico img,
.nav-item.active .ico img { animation: ico-pop .5s cubic-bezier(.34,1.56,.64,1); }

.nav-item .label-text { transition: transform .18s; }
.nav-item:hover .label-text { transform: translateX(1px); }

.nav-item .ico { width: 26px; height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .75);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-item .ico img { width: 19px; height: 19px; object-fit: contain; display: block; }
.nav-item:hover .ico { background: #fff; }
.nav-item.active .ico { background: var(--brand-soft); }

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  font-weight: 700;
}

/* 待处理角标：轻轻呼吸提醒 */
.nav-item .badge:not(.hide) { animation: badge-pulse 2.2s ease-in-out infinite; }
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; overflow-y: auto; }

.topbar {
  height: 60px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky; top: 0; z-index: 20;
}

.topbar h1 {
  font-size: 18px; margin: 0; font-weight: 700; flex: 1;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: .3px;
}
/* 标题左侧绿色小竖条（同小程序卡片标题） */
.topbar h1::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  flex-shrink: 0;
}
.topbar .date { color: var(--text-3); font-size: 13px; }

.topbar .who {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 13px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}
.topbar .who::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
}

.content { padding: 22px 24px 60px; }

/* ============================================================
   页面切换动效：内容淡入上移，卡片像上菜一样依次浮现
   ============================================================ */

.content > section:not(.hide) { animation: page-in .3s ease both; }

.content > section:not(.hide) > * { animation: rise-in .5s cubic-bezier(.22, 1, .36, 1) both; }
.content > section:not(.hide) > *:nth-child(1) { animation-delay: .05s; }
.content > section:not(.hide) > *:nth-child(2) { animation-delay: .11s; }
.content > section:not(.hide) > *:nth-child(3) { animation-delay: .17s; }
.content > section:not(.hide) > *:nth-child(4) { animation-delay: .23s; }
.content > section:not(.hide) > *:nth-child(5) { animation-delay: .29s; }
.content > section:not(.hide) > *:nth-child(6) { animation-delay: .35s; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* 呼吸浮动：插画像热菜冒气一样轻轻起伏 */
@keyframes breathe-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2.5px) rotate(-2deg); }
}

/* ==================== 卡片 ==================== */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 20px;
  margin-bottom: 18px;
}

.card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 16px; margin: 0; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.card-head h2::before {
  content: '';
  width: 4px; height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  flex-shrink: 0;
}
.card-head .sub { color: var(--text-3); font-size: 12px; }
.card-head .spacer { flex: 1; }

/* ==================== 概览问候横幅 ==================== */

.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 55%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.dash-hero::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero-txt { position: relative; z-index: 1; min-width: 0; }
.dash-hero .hello { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.dash-hero .hello .wave { margin-right: 6px; }
.dash-hero .hero-sub { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.hero-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-chip {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  white-space: nowrap;
}
.hero-art {
  width: 96px; height: 96px;
  object-fit: contain;
  margin-left: auto;
  position: relative; z-index: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .16));
  animation: breathe-float 4.2s ease-in-out infinite;
}
@media (max-width: 640px) {
  .dash-hero { padding: 18px; }
  .hero-art { display: none; }
}

/* 装修/设置页：字段卡片化 */
.fields-card .field {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 0;
  transition: border-color .15s;
}
.fields-card .field:hover { border-color: var(--border-2); }

/* ==================== 统计卡片 ==================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.stat:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

.stat::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--brand-soft);
}

/* 统计卡右上角插画 */
.stat .stat-ico {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 46px;
  height: 46px;
  object-fit: contain;
  opacity: .30;
  z-index: 1;
  pointer-events: none;
  transition: opacity .18s;
}
.stat:hover .stat-ico { opacity: .45; }
.stat.accent .stat-ico {
  opacity: .55;
  filter: brightness(0) invert(1);
}

.stat .label { color: var(--text-3); font-size: 13px; position: relative; z-index: 1; }
.stat .value {
  font-size: 26px; font-weight: 700; margin-top: 8px;
  position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.stat .value .unit { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.stat .foot { font-size: 12px; color: var(--text-3); margin-top: 6px; position: relative; z-index: 1; }

.stat.accent {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* 主指标卡占两格，压住「一堆小卡平铺」的粗糙感 */
.stat.wide { grid-column: span 2; }
.stat.wide .value { font-size: 30px; }
.stat.wide .foot { font-size: 12px; line-height: 1.6; }
@media (max-width: 1080px) { .stat.wide { grid-column: span 1; } }
.stat.accent::after { background: rgba(255,255,255,.12); }
.stat.accent .label, .stat.accent .foot, .stat.accent .value .unit { color: rgba(255,255,255,.85); }

/* ==================== 表格 ==================== */

.table-wrap { overflow-x: auto; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }

table.tbl th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-3);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
  background: transparent;
}

table.tbl td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* 行 hover：浅底 + 左侧绿色小竖条 */
table.tbl tbody tr { transition: background .15s; }
table.tbl tbody tr:hover { background: #fbfaf7; }
table.tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.tbl tbody tr:last-child td { border-bottom: none; }

.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .strong { font-weight: 600; }
.tbl .muted { color: var(--text-3); font-size: 13px; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ==================== 标签 ==================== */

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.tag-pending  { background: var(--warn-soft);    color: #a35a12; }
.tag-cooking  { background: var(--info-soft);    color: #2c5e8f; }
.tag-completed{ background: var(--success-soft); color: #2c6b48; }
.tag-cancelled{ background: var(--bg-2);         color: var(--text-2); }
.tag-on       { background: var(--success-soft); color: #2c6b48; }
.tag-off      { background: var(--bg-2);         color: var(--text-2); }
.tag-plain    { background: var(--brand-soft);   color: var(--brand-dark); }

/* ==================== 筛选栏 ==================== */

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 16px;
}

.filters .input, .filters .select { width: auto; min-width: 140px; }
.filters .grow { flex: 1; min-width: 160px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.tab {
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: all .15s;
  background: #fff;
}

.tab:hover { background: var(--bg); border-color: var(--border); }

.tab.active {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  font-weight: 600;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

.tab .cnt {
  margin-left: 5px;
  opacity: .7;
  font-variant-numeric: tabular-nums;
}

/* ==================== 菜品卡片 ==================== */

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.dish-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}

.dish-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.dish-card.is-off { opacity: .62; }

.dish-thumb {
  height: 140px;
  background: linear-gradient(135deg, var(--brand-soft), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.dish-thumb .ph-ico { font-size: 34px; color: var(--brand-light); }

.dish-thumb img { width: 100%; height: 100%; object-fit: cover; }

.dish-thumb .off-flag {
  position: absolute; left: 0; top: 12px;
  background: rgba(43,42,38,.66);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.dish-body { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.dish-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.dish-desc {
  color: var(--text-3); font-size: 13px; margin-top: 5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 37px;
}
.dish-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dish-price {
  color: var(--brand-dark); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums;
}
.dish-price .cur { font-size: 12px; margin-right: 1px; }
.dish-sales { margin-left: auto; color: var(--text-3); font-size: 12px; }
.dish-actions {
  display: flex; gap: 8px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border-2);
}
.dish-actions .btn { flex: 1; }

/* ==================== 图表 ==================== */

.chart-row { display: grid; grid-template-columns: 1fr; gap: 18px; }

.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { display: block; width: 100%; height: auto; }

/* ---------- 趋势图交互层 ---------- */

.chart-box .pt .hit { fill: transparent; cursor: crosshair; }

.chart-box .pt .guide {
  stroke: var(--brand);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  transition: opacity .16s;
}

.chart-box .pt .dot {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 2.5;
  opacity: 0;
  transition: opacity .16s, r .16s;
}

.chart-box .pt .halo {
  fill: var(--brand);
  opacity: 0;
  transition: opacity .16s;
}

.chart-box .pt .tip { opacity: 0; transition: opacity .16s; }
.chart-box .pt .tip rect { fill: var(--text); }
.chart-box .pt .tip text {
  fill: #fff;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}

/* 最后一个点常亮：像「今天」被标出来 */
.chart-box .pt.last .dot { opacity: 1; }
.chart-box .pt.last .halo { opacity: .16; }

.chart-box .pt:hover .guide { opacity: .5; }
.chart-box .pt:hover .dot { opacity: 1; }
.chart-box .pt:hover .halo { opacity: .18; }
.chart-box .pt:hover .tip { opacity: 1; }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-item .bar-top {
  display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px;
}
.bar-item .bar-top .r { color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; background: var(--bg-2); border-radius: var(--radius-pill); overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
  transition: width .5s ease;
}

/* ============================================================
   概览：图表结论条 / 热销榜 / 最新订单
   ============================================================ */

.chart-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  line-height: 1.6;
}
.chart-note .cn-ico { margin-right: 6px; }
.chart-note b { font-weight: 700; }

/* 概览底部双栏 */
.dash-bottom {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1024px) { .dash-bottom { grid-template-columns: 1fr; } }

/* 热销榜：双列紧凑网格 */
.top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
@media (max-width: 620px) { .top-grid { grid-template-columns: 1fr; } }

.top-item { display: flex; align-items: flex-start; gap: 10px; }
.top-item .rank {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.top-item .rank.hot {
  background: linear-gradient(135deg, var(--gold), #d9832b);
  color: #fff;
  box-shadow: 0 2px 6px rgba(232, 163, 61, .4);
}
.ti-body { flex: 1; min-width: 0; }
.ti-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.ti-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ti-qty {
  font-size: 12px; color: var(--text-3); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ti-amt {
  margin-top: 4px; font-size: 12px; color: var(--brand-dark);
  font-weight: 700; font-variant-numeric: tabular-nums;
}

/* 最新订单列表 */
.ro-list { display: flex; flex-direction: column; }
.ro-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background .15s, transform .15s;
}
.ro-item:last-child { border-bottom: none; }
.ro-item:hover { background: var(--bg); transform: translateX(2px); }

.ro-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-3); flex-shrink: 0;
}
.ro-dot.st-pending { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.ro-dot.st-cooking { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.ro-dot.st-completed { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.ro-dot.st-cancelled { background: var(--border-2); }

.ro-main { flex: 1; min-width: 0; }
.ro-top { display: flex; align-items: baseline; gap: 8px; }
.ro-top b { font-size: 13px; font-weight: 600; }
.ro-no {
  font-size: 12px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ro-sub {
  margin-top: 3px; font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ro-right { text-align: right; flex-shrink: 0; }
.ro-amt {
  font-size: 14px; font-weight: 700; color: var(--brand-dark);
  font-variant-numeric: tabular-nums; margin-bottom: 4px;
}

/* ==================== 弹窗 ==================== */

.modal-mask {
  position: fixed; inset: 0;
  background: rgba(43, 42, 38, .44);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
  animation: fadeIn .16s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  animation: popIn .18s ease;
  margin: auto 0;
}

.modal.wide { max-width: 720px; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; flex: 1; }
.modal-head .close {
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 0 4px;
}
.modal-head .close:hover { color: var(--text); }

.modal-body { padding: 20px 22px; max-height: 64vh; overflow-y: auto; }
.modal-foot {
  padding: 15px 22px;
  border-top: 1px solid var(--border-2);
  display: flex; justify-content: flex-end; gap: 10px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ==================== 图片上传 ==================== */

.uploader {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius);
  height: 148px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  gap: 6px;
  background: var(--bg);
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.uploader:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.uploader img { width: 100%; height: 100%; object-fit: cover; }
.uploader .ph-icon { font-size: 26px; }
.uploader .ph-text { font-size: 13px; }
.uploader .ph-sub { font-size: 12px; color: var(--text-3); }
.uploader.has-image { border-style: solid; border-color: var(--border); background: #fff; }
.uploader .overlay {
  position: absolute; inset: 0;
  background: rgba(43,42,38,.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; opacity: 0; transition: opacity .15s;
}
.uploader:hover .overlay { opacity: 1; }

/* ==================== 空状态 / 加载 ==================== */

/* ===== 空态双规格规范 =====
   圆底级 .empty-state（72px 圆底）：表格/列表类次级空态（订单、成员、分类）
   hero  级 .empty-hero（150px 无边框插画）：板块级首屏空态（公告板、首次引导）
   判定：这个空态是不是用户第一眼看到的？是 → hero，否 → 圆底
   ===== */
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-3); }
.empty-state .ico { font-size: 42px; margin-bottom: 12px; opacity: .55; line-height: 1; }

/* 插画空状态：套一个浅色圆底（同小程序 empty-state 组件） */
.empty-state img.ico {
  width: 72px; height: 72px; object-fit: contain;
  margin: 0 auto 12px;
  padding: 12px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: block;
}
.empty-state .txt { font-size: 14px; }

.loading-bar {
  height: 3px; background: var(--brand-soft);
  overflow: hidden; border-radius: var(--radius-pill); margin-bottom: 14px;
}
.loading-bar::after {
  content: ''; display: block; height: 100%; width: 36%;
  background: var(--brand);
  animation: slide 1s infinite ease-in-out;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.skeleton-row {
  height: 44px; background: var(--bg-2);
  border-radius: var(--radius-xs); margin-bottom: 8px;
  animation: pulse 1.3s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ==================== 提示条 ==================== */

.banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.banner-warn { background: var(--warn-soft); color: #8a4d0e; }
.banner-info { background: var(--info-soft); color: #2c5680; }
.banner-danger { background: var(--danger-soft); color: #8f3c2d; }
.banner .ico { font-size: 15px; line-height: 1.4; }

/* ==================== Toast ==================== */

#toast-host {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease;
  max-width: 90vw;
}

.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==================== 开关 ==================== */

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }

/* ⚠️ 兜底：.field label { display:block } 特异性更高，会把 label.switch 打回
   block 布局，导致 track（span）宽高失效塌陷、白色圆点浮到文字上（线上踩过的坑）。
   这里用更高特异性把开关布局抢回来。 */
.field label.switch,
.field-switch label.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
  font-weight: 400;
}

.switch .track {
  display: inline-block;
  width: 42px; height: 24px; border-radius: var(--radius-pill);
  background: var(--border-2); position: relative; transition: background .18s;
  flex-shrink: 0;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* 开关型字段：描述在左、开关靠右，互不遮挡 */
.field-switch {
  display: flex;
  align-items: center;
  gap: 14px;
}
.field-switch .fs-txt { flex: 1; min-width: 0; }
.field-switch .fs-txt b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.4;
}
.field-switch .fs-txt .hint {
  display: block;
  margin-left: 0;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-3);
}
.field-switch .switch { flex-shrink: 0; margin-top: 0 !important; }

.switch .switch-text {
  min-width: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.switch input:checked ~ .switch-text { color: var(--brand-dark); }

/* ==================== 订单详情 ==================== */

.order-lines { border: 1px solid var(--border-2); border-radius: var(--radius-sm); overflow: hidden; }
.order-line {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-2);
}
.order-line:last-child { border-bottom: none; }
.order-line img, .order-line .thumb-ph {
  width: 40px; height: 40px; border-radius: var(--radius-xs); object-fit: cover; flex-shrink: 0;
  background: var(--brand-soft);
}
.order-line .thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 17px; }
.order-line .nm { flex: 1; min-width: 0; }
.order-line .nm .t { font-weight: 500; }
.order-line .qty { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.order-line .amt { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 9px 12px; font-size: 13px; }
.kv .k { color: var(--text-3); }
.kv .v { word-break: break-word; }

.timeline { border-left: 2px solid var(--border); padding-left: 16px; margin-left: 5px; }
.timeline-item { position: relative; padding-bottom: 14px; font-size: 13px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -22px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff;
}
.timeline-item .t { color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* ==================== 响应式 ==================== */

@media (max-width: 1024px) {
  .chart-row.two { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
  .chart-row.two { grid-template-columns: 1.5fr 1fr; }
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; flex-shrink: 0; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 4px;
    padding: 10px 12px; overflow-x: auto;
  }
  .main { flex: 1; height: auto; min-height: 0; overflow-y: auto; }
  .sidebar-brand { padding: 0 12px 0 4px; font-size: 14px; white-space: nowrap; }
  .sidebar-brand .dot, .sidebar-brand img.brand-ico { width: 26px; height: 26px; }
  .nav-item {
    border-bottom: 3px solid transparent;
    padding: 8px 12px; white-space: nowrap; border-radius: var(--radius-xs);
    margin: 0;
    transform: none;
  }
  .nav-item::before, .nav-item.active::after { display: none; }
  .nav-item.active { border-bottom-color: var(--brand); }
  .nav-item .label-text { display: none; }
  .nav-item .ico { font-size: 17px; }
  .nav-item .ico img { width: 22px; height: 22px; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; height: 54px; position: static; }
  .topbar h1 { font-size: 15px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 21px; }
  .modal-mask { padding: 12px; }
  .modal-body { max-height: 70vh; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .dish-grid { grid-template-columns: 1fr; }
}

.hide { display: none !important; }

/* 尊重系统「减弱动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   店铺装修
   ============================================================ */
.banner-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.banner-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.banner-row.is-off { opacity: 0.6; }

.bn-sort {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.bn-sort .btn { width: 34px; padding: 2px 0; line-height: 1.2; }

.bn-thumb {
  width: 132px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--brand-dark);
}
.bn-thumb img { width: 100%; height: 100%; object-fit: cover; }

.bn-info { flex: 1; min-width: 0; }
.bn-title { font-weight: 600; font-size: 14px; color: var(--text); }
.bn-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.bn-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

.bn-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* 招牌推荐菜品网格 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.fd-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.fd-card:hover { border-color: var(--brand); }
.fd-card:active { transform: scale(0.98); }
.fd-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft2); }

.fd-thumb {
  height: 84px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--brand-dark);
}
.fd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.fd-name {
  font-size: 13px;
  color: var(--text);
  padding: 8px 8px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-price { font-size: 13px; color: var(--brand-dark); font-weight: 700; padding: 0 8px; }
.fd-check {
  margin: 8px;
  border-radius: var(--radius-pill);
  text-align: center;
  font-size: 12px;
  padding: 5px 0;
  background: var(--bg);
  color: var(--text-2);
}
.fd-card.on .fd-check { background: var(--brand-cta); color: #fff; }

/* ==================== 食材绑定 / 家庭中心（文档 V1.0） ==================== */
.ing-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ing-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.ing-check:hover { background: var(--brand-soft); }

.ing-check.on {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand);
  font-weight: 600;
}

.today-check {
  justify-content: flex-start;
  align-items: center;
}

.today-check.on { border-color: var(--brand); background: var(--brand-soft); }

.today-check .rank { min-width: 22px; color: var(--brand-dark); font-weight: 700; }

/* ---------- 统一图标（inline SVG / 图片占位） ---------- */
.nav-item .ico svg { width: 19px; height: 19px; display: block; }
.empty-state .ico img { width: 64px; height: 64px; object-fit: contain; }
.ph-icon svg { width: 34px; height: 34px; display: block; margin: 0 auto 6px; }
.ph-dish { width: 42px; height: 42px; object-fit: contain; opacity: 0.85; }
.cat-ico-img { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.cn-ico-img { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px; }



/* ---------- 家庭管理（总后台） ---------- */
.fam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.fam-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fam-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fam-name {
  font-size: 16px;
  color: var(--text);
}

.fam-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-2);
}

.fam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--text-2);
}

.fam-meta b {
  color: var(--text);
}

.fam-meta .muted {
  color: var(--text-3);
}

.fam-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.fam-detail-meta {
  font-size: 13px;
  line-height: 2;
  color: var(--text-2);
}

.fam-detail-meta b {
  color: var(--text);
}

/* 成员角色下拉：给箭头留位，防止文字溢出 */
.select[data-role-for] {
  min-width: 168px;
  padding-left: 16px;
  padding-right: 40px;
}

/* 空态插画 div.ico 模式：与 img.ico 同款浅绿圆底，图片收紧不出圈 */
.empty-state div.ico {
  width: 72px; height: 72px; box-sizing: border-box;
  margin: 0 auto 12px; padding: 12px;
  border-radius: 50%; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
}
.empty-state div.ico img { width: 48px; height: 48px; object-fit: contain; opacity: 1; }

/* 角色胶囊：设计系统同款浅绿软胶囊（替代原生 select 观感） */
.select[data-role-for] {
  appearance: none; -webkit-appearance: none;
  width: auto; min-width: 128px;
  padding: 7px 34px 7px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  background-color: var(--brand-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235d7f56' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}
.select[data-role-for]:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(127,164,119,.12); }

/* 公告空态：大插画（无边框圆底，白卡上直接悬浮） */
.empty-state img.illo { width: 150px; height: auto; display: block; margin: 0 auto 6px; }

/* 菜品管理：总后台按家庭分组的小节标题 */
.fam-section { margin-bottom: 26px; }
.fam-sec-title {
  font-size: 15px; font-weight: 700; color: var(--brand-dark);
  padding: 10px 4px 12px; display: flex; align-items: center; gap: 6px;
  border-bottom: 2px solid var(--brand-soft2); margin-bottom: 14px;
}

/* 危险/禁用状态标签 */
.tag-danger { background: var(--danger-soft, #f9ece8); color: var(--danger, #bc5a45); }

/* 家庭卡片操作按钮：允许换行（5 个按钮一行放不下会溢出卡片） */
.fam-actions { flex-wrap: wrap; row-gap: 8px; }

/* 招牌推荐等网格容器内的空态：占满整行并居中 */
.featured-grid .empty-state { grid-column: 1 / -1; }

/* ============ 密码框小眼睛（明文/密文切换） ============ */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input[type="password"],
.pw-wrap > input[type="text"] { width: 100%; padding-right: 44px; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: #93a0ad; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pw-eye:hover { background: #eef2f7; color: #3d7a5e; }
.pw-eye.on { color: #3d7a5e; }
.pw-eye svg { width: 20px; height: 20px; display: block; }
