/* ============ 沙洲人家 · 电子菜单 样式 ============ */
:root {
  --c1: #1B2A6B;        /* 主色 深蓝 */
  --c2: #C9A227;        /* 金色 */
  --c3: #F7F4EE;        /* 米白底 */
  --ink: #3A3630;
  --muted: #8A8478;
  --line: #E7E1D6;
  --card: #FFFFFF;
  /* 嫩草绿：菜品详情弹窗的条目修饰色，喻意绿色健康 */
  --grass: #7BAE5A;        /* 嫩草绿 主色（强调条） */
  --grass-deep: #47702F;   /* 嫩草绿 深色（标签/小标题，保证可读） */
  --grass-mute: #5F6E57;   /* 嫩草绿 灰调（辅助说明文字） */
  --grass-line: #CBE3BC;   /* 嫩草绿 边框（柔和细边） */
  --grass-bg: #F5FAF1;     /* 嫩草绿 底色（极浅，不夺正文） */
  --radius: 14px;
  --shadow: 0 6px 24px rgba(27, 42, 107, .10);
  --shadow-hover: 0 14px 40px rgba(27, 42, 107, .18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--c3);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: .18s; white-space: nowrap;
}
.btn-primary { background: var(--c1); color: #fff; }
.btn-primary:hover { background: #24368a; box-shadow: 0 6px 18px rgba(27,42,107,.3); }
.btn-gold { background: var(--c2); color: #40350a; }
.btn-gold:hover { background: #d9b23a; }
.btn-ghost { background: #fff; color: var(--c1); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--c1); }
.btn-danger { background: #fff; color: #c0392b; border: 1px solid #f0d4cf; }
.btn-danger:hover { background: #fdf2f0; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ================= 后台 ================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 42px; }
.brand h1 { font-size: 18px; color: var(--c1); font-weight: 700; }
.brand p { font-size: 12px; color: var(--muted); }
.topnav { display: flex; gap: 8px; }
.topnav a {
  padding: 8px 16px; border-radius: 9px; font-size: 14px; color: var(--muted);
  transition: .18s;
}
.topnav a:hover { background: var(--c3); color: var(--c1); }
.topnav a.active { background: var(--c1); color: #fff; }

.admin-wrap { display: flex; min-height: calc(100vh - 71px); gap: 0; }
.side {
  width: 210px; flex: 0 0 210px; background: #fff; border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 6px;
}
.tab-btn {
  text-align: left; padding: 11px 16px; border-radius: 10px; font-size: 14.5px;
  color: var(--muted); transition: .16s;
}
.tab-btn:hover { background: var(--c3); color: var(--c1); }
.tab-btn.active { background: linear-gradient(90deg, var(--c1), #2c3f96); color: #fff; font-weight: 500; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

.content { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-head h2 { font-size: 21px; color: var(--c1); }

.filters { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filters input[type=text] {
  flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none;
}
.filters input:focus { border-color: var(--c1); }
.filters select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }

/* 菜品网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dish-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .2s; position: relative;
}
.dish-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.dish-card .thumb {
  width: 100%; aspect-ratio: 1; background: #f0ede6 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: #c4bfb5; font-size: 13px;
}
.dish-card .info { padding: 12px 14px; }
.dish-card .name { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dish-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dish-card .cat { font-size: 12px; color: var(--muted); background: var(--c3); padding: 2px 9px; border-radius: 20px; }
.dish-card .price { font-size: 15px; color: #b93a2b; font-weight: 700; }
.badge-main {
  font-size: 11px; background: var(--c2); color: #40350a; padding: 1px 7px;
  border-radius: 20px; font-weight: 600;
}
.dish-card .ops {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 6px;
  opacity: 0; transition: .18s;
}
.dish-card:hover .ops { opacity: 1; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.94);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: .15s;
}
.icon-btn:hover { background: var(--c1); color: #fff; }

/* 套餐列表 */
.combo-list { display: flex; flex-direction: column; gap: 18px; }
.combo-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; gap: 22px; align-items: flex-start;
}
.combo-thumb {
  width: 168px; flex: 0 0 168px; border-radius: 12px; overflow: hidden;
  background: #f0ede6 center/cover no-repeat; aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
}
.combo-thumb.empty { color: #c4bfb5; font-size: 13px; text-align: center; padding: 10px; }
.combo-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.combo-body { flex: 1; min-width: 0; }
.combo-body h3 { font-size: 18px; color: var(--c1); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.combo-body .cprice { color: #b93a2b; font-size: 19px; font-weight: 700; }
.combo-body .cnote { color: var(--muted); font-size: 13px; margin-top: 5px; }
.combo-dishes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tag { font-size: 12.5px; padding: 4px 11px; border-radius: 20px; background: var(--c3); color: #6c6659; }
.tag.main { background: rgba(201,162,39,.18); color: #8a6d0a; font-weight: 600; }
.tag.more { background: transparent; border: 1px dashed var(--line); color: var(--muted); cursor: default; }
.combo-ops { display: flex; flex-direction: column; gap: 8px; flex: 0 0 132px; }

/* 设置表单 */
.settings-form {
  background: #fff; border-radius: var(--radius); padding: 26px 28px;
  box-shadow: var(--shadow); max-width: 680px;
}
.settings-form .form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13.5px; color: #5d5850; margin-bottom: 7px; }
.form-row input[type=text], .form-row input[type=number], .form-row select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: .16s; background: #fff;
}
.form-row input:focus, .form-row select:focus { border-color: var(--c1); box-shadow: 0 0 0 3px rgba(27,42,107,.08); }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type=color] { width: 46px; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; background: rgba(24, 28, 42, .5); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; padding: 26px 28px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(0,0,0,.3);
}
.modal-box.wide { max-width: 720px; }
.modal-box h3 { font-size: 19px; color: var(--c1); margin-bottom: 20px; }
.modal-box .form-row { margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.uploader { display: flex; align-items: center; gap: 14px; }
.uploader img {
  width: 84px; height: 84px; border-radius: 11px; object-fit: cover; background: var(--c3);
  border: 1px dashed var(--line);
}
.switch-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin-bottom: 0; }
.switch-row small { color: var(--muted); font-weight: 400; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--c1); cursor: pointer; }

/* 套餐选菜 */
.combo-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px;
  max-height: 340px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px;
  background: #fbfaf7;
}
.pick-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px;
  background: #fff; border: 1.5px solid transparent; cursor: pointer; transition: .15s;
}
.pick-item:hover { border-color: #d5cdbe; }
.pick-item.on { border-color: var(--c1); background: #f4f6ff; }
.pick-item .pimg { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--c3); flex: 0 0 38px; }
.pick-item .pname { font-size: 13.5px; line-height: 1.35; }
.pick-item .pprice { font-size: 12px; color: var(--muted); }
.pick-item .main-flag {
  margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 20px;
  background: #eee9dd; color: #99917f; font-weight: 600; white-space: nowrap;
}
.pick-item .main-flag.on { background: var(--c2); color: #40350a; }
.combo-summary {
  margin-top: 14px; padding: 14px 16px; background: var(--c3); border-radius: 12px;
  font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
}
.combo-summary .hl { color: #b93a2b; font-weight: 700; font-size: 16px; }
.combo-summary .bad { color: #c0392b; }

/* ================= 前台 ================= */
.site-body { background: var(--c3); }
.hero {
  text-align: center; padding: 44px 20px 30px;
  background: linear-gradient(180deg, #fff 0%, var(--c3) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-logo { height: 88px; }
.hero-slogan { color: var(--muted); margin-top: 14px; font-size: 15px; letter-spacing: 3px; }
.hero-meta { display: flex; gap: 22px; justify-content: center; margin-top: 14px; color: var(--c1); font-size: 13.5px; flex-wrap: wrap; }

.site-nav { display: flex; justify-content: center; gap: 10px; padding: 20px; flex-wrap: wrap; }
.nav-btn {
  padding: 10px 24px; border-radius: 30px; font-size: 15px; color: var(--muted);
  background: #fff; border: 1px solid var(--line); transition: .18s;
}
.nav-btn:hover { color: var(--c1); border-color: var(--c1); }
.nav-btn.active { background: var(--c1); color: #fff; border-color: var(--c1); font-weight: 500; }
.nav-btn.link { color: var(--c2); border-color: #eadfc0; }

.site-main { max-width: 1180px; margin: 0 auto; padding: 10px 22px 70px; }
.view { display: none; }
.view.active { display: block; }

.combo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.combo-card {
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  transition: .22s; display: flex; flex-direction: column;
}
.combo-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.combo-card .ccimg {
  width: 100%; aspect-ratio: 3/4; background: #f0ede6 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: #c4bfb5;
  font-size: 13px; text-align: center; cursor: zoom-in; padding: 20px;
}
.combo-card .ccimg img { width: 100%; height: 100%; object-fit: cover; }
.combo-card .ccbody { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.combo-card .ccname { font-size: 19px; color: var(--c1); font-weight: 700; }
.combo-card .ccnote { font-size: 13px; color: var(--muted); margin-top: 6px; }
.combo-card .ccdishes { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.combo-card .ccfoot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line);
}
.combo-card .ccfoot .old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.combo-card .ccfoot .new { font-size: 24px; color: #b93a2b; font-weight: 700; }
.combo-card .ccfoot .new small { font-size: 14px; }

.cat-nav { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 22px; justify-content: center; }
.dish-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.sdish {
  background: #fff; border-radius: 15px; overflow: hidden; box-shadow: var(--shadow);
  transition: .2s;
}
.sdish:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.sdish .simg { width: 100%; aspect-ratio: 1; background: #f0ede6 center/cover no-repeat; }
.sdish .sbody { padding: 13px 15px 15px; }
.sdish .sname { font-size: 15.5px; font-weight: 600; }
.sdish .srow { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.sdish .scat { font-size: 12px; color: var(--muted); }
.sdish .sprice { color: #b93a2b; font-weight: 700; font-size: 16px; }

.site-foot {
  text-align: center; padding: 34px 20px; color: var(--muted); font-size: 13.5px;
  border-top: 1px solid var(--line); background: #fff;
}

/* 图片查看器 */
.lightbox {
  position: fixed; inset: 0; background: rgba(18, 22, 34, .88); display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 20px; z-index: 300; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 78vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.lightbox-bar { display: flex; gap: 12px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 44px; transform: translate(-50%, 24px);
  background: #23293f; color: #fff; padding: 12px 24px; border-radius: 12px;
  font-size: 14px; opacity: 0; transition: .26s; z-index: 500; pointer-events: none;
  box-shadow: 0 12px 34px rgba(0,0,0,.3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty-tip { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 14.5px; }

@media (max-width: 780px) {
  .admin-wrap { flex-direction: column; }
  .side { width: 100%; flex: none; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .tab-btn { white-space: nowrap; }
  .side-foot { flex-direction: row; margin-top: 0; padding-top: 0; border: none; }
  .combo-item { flex-direction: column; }
  .combo-thumb { width: 100%; flex: none; aspect-ratio: 4/3; }
  .combo-ops { flex-direction: row; flex: none; width: 100%; }
  .combo-ops .btn { flex: 1; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 50px; }
}

/* ================= 登录页 ================= */
.login-body {
  background: linear-gradient(160deg, var(--c3) 0%, #ffffff 60%, var(--c3) 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 38px 40px 30px; width: 100%; max-width: 400px;
  box-shadow: 0 18px 50px rgba(27,42,107,.14); text-align: center;
}
.login-logo { height: 62px; margin-bottom: 14px; }
.login-card h2 { font-size: 22px; color: var(--c1); margin-bottom: 4px; }
.login-tip { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.login-card .form-row { margin-bottom: 14px; }
.login-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; outline: none; font-size: 14px; text-align: center;
}
.login-card input:focus { border-color: var(--c1); box-shadow: 0 0 0 3px rgba(27,42,107,.08); }
.login-demo { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.login-back { display: block; margin-top: 18px; font-size: 13px; color: var(--muted); }
.login-back:hover { color: var(--c1); }
.admin-body .topnav a { cursor: pointer; }

/* ================= 工作台 ================= */
.wb-wrap { display: flex; min-height: calc(100vh - 71px); }
.wb-side {
  width: 236px; flex: 0 0 236px; background: #fff; border-right: 1px solid var(--line);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
}
.wb-role {
  padding: 14px 16px; background: linear-gradient(135deg, var(--c1), #2c3f96);
  border-radius: 12px; color: #fff; margin-bottom: 8px;
}
.wb-role-name { font-size: 16px; font-weight: 600; }
.wb-role-perms { font-size: 12px; opacity: .8; margin-top: 3px; }
.wb-side .tab-btn { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; }
.wb-side .tab-btn b { font-weight: 500; font-size: 14.5px; }
.wb-side .tab-btn small { font-size: 11.5px; opacity: .75; }
.wb-side .tab-btn.active small { opacity: .85; }
.wb-permlist { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.wb-permlist-t { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.wb-permlist code {
  display: block; font-size: 11px; color: #6c6659; background: var(--c3);
  padding: 2px 7px; border-radius: 5px; margin-bottom: 4px; word-break: break-all;
}
.wb-main { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.wb-hint { font-size: 13px; color: var(--muted); margin-left: 10px; }

.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.wb-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); transition: .2s;
}
.wb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.wb-card-img { width: 100%; aspect-ratio: 4/3; background: #f0ede6 center/cover no-repeat; }
.wb-card-body { padding: 13px 15px 15px; }
.wb-card-name { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.wb-card-price { color: #b93a2b; font-size: 15px; }
.wb-card-meta { font-size: 12.5px; color: var(--muted); margin: 5px 0 11px; }

.wb-list { display: flex; flex-direction: column; gap: 16px; }
.wb-block {
  background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow);
}
.wb-block-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.wb-block-h b { font-size: 17px; color: var(--c1); }
.wb-block-cat { font-size: 12px; color: var(--muted); }
.wb-note {
  background: var(--c3); border-radius: 10px; padding: 11px 14px; margin-bottom: 13px; font-size: 13.5px;
}
.wb-note b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

.wb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wb-table th {
  text-align: left; padding: 9px 12px; background: var(--c3); color: #6c6659;
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line);
}
.wb-table td { padding: 9px 12px; border-bottom: 1px solid #f2eee7; }
.wb-table tbody tr:hover { background: #fbfaf7; }
.wb-table.wide { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.wb-table-wrap { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow-x: auto; }
.wb-muted { color: var(--muted); font-size: 13px; }

/* 标准卡弹窗 */
.card-print { max-height: 66vh; overflow-y: auto; padding-right: 6px; }
.card-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.card-head img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; }
.card-head h3 { font-size: 20px; color: var(--c1); }
.card-sec { margin-bottom: 20px; }
.card-sec h4 {
  font-size: 14px; color: var(--c1); padding-bottom: 7px; margin-bottom: 12px;
  border-bottom: 2px solid var(--c2); display: inline-block;
}
.card-row { display: flex; gap: 12px; margin-bottom: 11px; font-size: 14px; line-height: 1.6; }
.card-row label { flex: 0 0 76px; color: var(--muted); font-size: 13px; }
.card-row div { flex: 1; }
.card-judge { background: #fffdf6; border-left: 3px solid var(--c2); padding: 10px 13px; border-radius: 0 8px 8px 0; }
.card-key { background: #fff6f5; border-left: 3px solid #c0392b; padding: 10px 13px; border-radius: 0 8px 8px 0; }
.card-steps { padding-left: 20px; font-size: 14px; line-height: 1.85; }
.card-steps li { margin-bottom: 6px; }

/* ================= 经营看板 ================= */
.board-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 30px 70px; }
.board-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.bc { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); }
.bc-warn { background: #fff6f5; border: 1px solid #f5d5d0; }
.bc-label { font-size: 13px; color: var(--muted); }
.bc-val { font-size: 30px; font-weight: 700; color: var(--c1); margin-top: 6px; }
.bc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.board-sec { margin-bottom: 30px; }
.bc-bar {
  display: inline-block; width: 130px; height: 8px; background: #eee9dd;
  border-radius: 6px; overflow: hidden; vertical-align: middle; margin-right: 9px;
}
.bc-bar i { display: block; height: 100%; border-radius: 6px; }
.bc-pct { font-size: 13px; color: var(--muted); }

.combo-cost { display: flex; flex-direction: column; gap: 14px; }
.cc-block { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.cc-head { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.cc-head b { font-size: 17px; color: var(--c1); }
.cc-price { color: #b93a2b; font-weight: 700; font-size: 16px; }
.cc-cost { color: var(--ink); font-weight: 600; }
.cc-ok { color: #2e7d32; font-weight: 700; }
.cc-warn { color: #c0392b; font-weight: 700; }
.cc-detail { margin-top: 12px; }
.cc-detail summary { cursor: pointer; font-size: 13px; color: var(--c1); padding: 6px 0; }
.cc-detail table { margin-top: 10px; }

/* ================= 菜品表单分标签 ================= */
.dtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.dtab {
  padding: 9px 16px; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .16s;
}
.dtab:hover { color: var(--c1); }
.dtab.active { color: var(--c1); border-bottom-color: var(--c1); font-weight: 600; }
.dpanel { display: none; }
.dpanel.active { display: block; }
.dpanel textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; line-height: 1.6; outline: none; resize: vertical;
}
.dpanel textarea:focus { border-color: var(--c1); box-shadow: 0 0 0 3px rgba(27,42,107,.08); }

.ing-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ing-row { display: grid; grid-template-columns: 1.3fr .8fr .8fr auto 1.4fr 32px; gap: 7px; align-items: center; }
.ing-row select, .ing-row input {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none;
}
.ing-row select:focus, .ing-row input:focus { border-color: var(--c1); }
.ir-unit { font-size: 12.5px; color: var(--muted); }
.form-row.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; }
.cost-box { min-height: 40px; }
.cost-line { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ================= 角色权限 ================= */
.role-list { display: flex; flex-direction: column; gap: 14px; }
.role-item { background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); }
.role-item.builtin { background: #fcfcfa; }
.role-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.role-head b { font-size: 16px; color: var(--c1); }
.role-head code {
  font-size: 12px; background: var(--c3); padding: 2px 8px; border-radius: 6px; color: #6c6659;
}
.role-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag { font-size: 12px; background: #eef2ff; color: var(--c1); padding: 3px 10px; border-radius: 20px; }

.perm-tree { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fbfaf7; }
.perm-group { margin-bottom: 8px; }
.perm-group-h { font-size: 12.5px; font-weight: 600; color: var(--c1); padding: 6px 10px; }
.perm-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.perm-item:hover { background: #f2f5ff; }
.perm-item input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--c1); cursor: pointer; }
.perm-item b { font-size: 13.5px; font-weight: 500; }
.perm-item small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ================= 顾客端菜品详情 ================= */
.site-tip { text-align: center; font-size: 13px; color: var(--muted); margin: -6px 0 10px; }
.sdish { cursor: pointer; }
.sdish-more { font-size: 12px; color: var(--c1); margin-top: 9px; opacity: .75; }
.sdish:hover .sdish-more { opacity: 1; }
/* 菜名 / 价格 / 分类：独立卡片 */
.dd-head {
  display: flex; gap: 18px; align-items: center; margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--grass-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #FBFEFA 0%, var(--grass-bg) 100%);
}
.dd-head img {
  width: 96px; height: 96px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--grass-line);
}
.dd-head h3 { font-size: 21px; color: var(--c1); margin-bottom: 0; }
.dd-meta { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.dd-price { color: #b93a2b; font-size: 17px; font-weight: 700; }
.dd-body { max-height: 58vh; overflow-y: auto; padding-right: 6px; }
/* 每一条信息：独立修饰边框 */
.dd-row {
  display: flex; gap: 14px; margin-bottom: 10px; line-height: 1.7; font-size: 14.5px;
  padding: 11px 14px;
  border: 1px solid var(--grass-line);
  border-radius: 11px;
  background: var(--grass-bg);
}
.dd-row label { flex: 0 0 68px; color: var(--grass-deep); font-size: 13px; font-weight: 600; padding-top: 1px; }
.dd-row div { flex: 1; }
/* 我们的承诺：同色系加重，作为收尾强调 */
.dd-judge {
  background: #F1F8EC; border: 1px solid var(--grass-line); border-left: 3px solid var(--grass);
  border-radius: 12px; padding: 14px 16px; margin-top: 8px;
}
.dd-judge-h { font-size: 14px; font-weight: 700; color: var(--grass-deep); margin-bottom: 6px; }
.dd-judge-tip { font-size: 12.5px; color: var(--grass-mute); margin-bottom: 10px; line-height: 1.6; }
.dd-judge-body { font-size: 14px; line-height: 1.75; white-space: pre-wrap; }

/* ================= 打印 ================= */
@media print {
  .topbar, .wb-side, .site-nav, .admin-wrap .side, .modal-foot,
  .panel-head button, .lightbox-bar, .site-tip { display: none !important; }
  body { background: #fff; }
  .wb-main, .board-wrap { padding: 0; }
  .wb-block, .card-sec, .cc-block { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .modal { position: static; display: block; background: none; padding: 0; }
  .modal-box { max-width: 100%; box-shadow: none; padding: 0; max-height: none; }
  .card-print { max-height: none; overflow: visible; }
  .wb-card { break-inside: avoid; }
  /* 打印时去掉嫩草绿底，只留淡灰细框，省墨且不影响阅读 */
  .dd-head, .dd-row, .dd-judge { background: #fff !important; border-color: #ccc !important; }
}

@media (max-width: 780px) {
  .wb-wrap { flex-direction: column; }
  .wb-side { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--line); }
  .wb-permlist { display: none; }
  .ing-row { grid-template-columns: 1fr 1fr; }
  .board-cards { grid-template-columns: 1fr 1fr; }
}

/* ================= 套餐详情页 ================= */
.hero.slim { padding: 18px 20px 12px; }
.hero.slim .hero-logo { height: 52px; }
.hero.slim .hero-slogan { font-size: 14px; margin-top: 6px; }

.cd-head { padding: 4px 0 14px; text-align: center; }
.cd-title {
  font-size: 27px; font-weight: 700; color: var(--c1); letter-spacing: 1px;
  font-family: "Songti SC", "SimSun", serif;
}
.cd-note { margin-top: 6px; font-size: 14px; color: var(--muted); }
.cd-price-card {
  margin: 14px auto 0; max-width: 420px; background: var(--c1); color: #fff;
  border-radius: var(--radius); padding: 14px 22px; box-shadow: var(--shadow);
}
.cd-price { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.cd-price .old { font-size: 15px; color: #cdc7ba; text-decoration: line-through; }
.cd-price .new { font-size: 40px; font-weight: 700; color: var(--c2); line-height: 1; }
.cd-price .new small { font-size: 18px; margin-right: 2px; }
.cd-price .unit { font-size: 13px; color: #cdc7ba; }
.cd-save { margin-top: 8px; font-size: 13px; color: #ffe9b8; }

.cd-block { margin-top: 26px; }
.cd-h3 {
  font-size: 16px; color: var(--c1); margin-bottom: 12px; padding-left: 10px;
  border-left: 4px solid var(--c2); line-height: 1.2;
}

/* 主菜大图 */
.cd-hero {
  margin-top: 18px; background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: .2s;
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.cd-hero:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.cd-hero-img {
  position: relative; aspect-ratio: 3 / 2; background-size: cover; background-position: center;
  background-color: #efe9df;
}
.cd-badge {
  position: absolute; left: 16px; top: 16px; background: rgba(27, 42, 107, .88);
  color: var(--c2); font-size: 13px; padding: 5px 12px; border-radius: 20px;
  letter-spacing: 1px;
}
.cd-hero-info { padding: 14px 18px 16px; }
.cd-hero-name {
  font-size: 21px; font-weight: 700; color: var(--c1);
  font-family: "Songti SC", "SimSun", serif;
}
.cd-hero-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.cd-hero-more { margin-top: 8px; font-size: 13px; color: var(--c2); font-weight: 500; }

/* 其余主菜 */
.cd-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cd-sub-item {
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: .2s;
}
.cd-sub-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cd-sub-img {
  position: relative; aspect-ratio: 3 / 2; background-size: cover; background-position: center;
  background-color: #efe9df;
}
.cd-tag-main {
  position: absolute; right: 8px; top: 8px; background: rgba(201, 162, 39, .92);
  color: #40350a; font-size: 11px; padding: 3px 8px; border-radius: 12px;
}
.cd-sub-name { padding: 10px 10px 2px; font-size: 17px; font-weight: 600; text-align: center; }
.cd-sub-price { padding: 0 10px 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* 其它菜品小图 */
.cd-others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cd-other {
  background: var(--card); border-radius: 12px; padding: 10px 8px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer; transition: .2s;
}
.cd-other:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cd-other-img {
  width: 74px; height: 74px; margin: 0 auto 8px; border-radius: 50%;
  background-size: cover; background-position: center; background-color: #efe9df;
  box-shadow: 0 3px 10px rgba(27, 42, 107, .16);
}
.cd-other-name { font-size: 16px; font-weight: 600; }
.cd-other-price { margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* 操作区 */
.cd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-actions-tip { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 底部二维码 */
.cd-qrblock {
  margin-top: 26px; display: flex; align-items: center; gap: 18px;
  background: var(--card); border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow);
}
.cd-qr { width: 130px; height: auto; border-radius: 10px; }
.cd-qr-text { display: flex; flex-direction: column; gap: 6px; }
.cd-qr-text b { font-size: 16px; color: var(--c1); }
.cd-qr-text span { font-size: 13px; color: var(--muted); line-height: 1.6; }

.ccgo { margin-top: 8px; font-size: 12px; color: var(--c2); font-weight: 500; }

/* ================= 二维码管理 ================= */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.qr-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); text-align: center; border: 1px solid var(--line);
}
.qr-card.primary { border: 2px solid var(--c2); box-shadow: var(--shadow-hover); }
.qr-card img { width: 100%; max-width: 220px; border-radius: 10px; display: block; margin: 0 auto; }
.qr-title { margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--c1); }
.qr-desc { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.6; min-height: 34px; }
.qr-url {
  margin-top: 6px; font-size: 11px; color: #a49c8c; word-break: break-all;
  background: #faf7f1; border-radius: 6px; padding: 5px 8px;
}
.qr-btns { margin-top: 10px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qr-hero { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.qr-hero-img { width: 300px; flex: none; }
.qr-hero-img img { width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.qr-hero-info { flex: 1; min-width: 260px; font-size: 14px; line-height: 1.9; color: var(--ink); }
.qr-hero-info b { color: var(--c1); }
.site-url-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.site-url-row input { flex: 1; min-width: 240px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 720px) {
  .cd-sub { grid-template-columns: repeat(2, 1fr); }
  .cd-others { grid-template-columns: repeat(3, 1fr); }
  /* 主图比例由 aspect-ratio 统一控制 */
  .cd-qrblock { flex-direction: column; text-align: center; }
}

@media print {
  .site-nav, .cd-actions, .site-tip, .site-foot { display: none !important; }
  .cd-hero, .cd-sub-item, .cd-other { break-inside: avoid; }
}

/* ================= 响应式：平板 / 手机（扫码场景为主） ================= */
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }

/* ---------- 平板（≤1024px） ---------- */
@media (max-width: 1024px) {
  .site-main { max-width: 100%; padding: 10px 18px 60px; }
  .combo-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
  .dish-cards { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
  .side { width: 176px; padding: 14px 10px; }
  .content { padding: 22px 20px 60px; }
  /* 主图比例由 aspect-ratio 统一控制 */
  .qr-hero-img { width: 250px; }
}

/* ---------- 手机 / 平板竖屏（≤768px） ---------- */
@media (max-width: 768px) {
  .hero { padding: 26px 16px 18px; }
  .hero-logo { height: 62px; }
  .hero-slogan { font-size: 14px; letter-spacing: 2px; margin-top: 10px; }
  .hero-meta { gap: 14px; font-size: 12.5px; margin-top: 10px; }

  /* 导航吸顶，套餐/单点切换更顺手 */
  .site-nav {
    position: sticky; top: 0; z-index: 60; gap: 8px; padding: 10px 12px;
    background: var(--c3); border-bottom: 1px solid var(--line);
  }
  .nav-btn { padding: 11px 16px; font-size: 14px; min-height: 44px; border-radius: 24px; }
  .site-tip { font-size: 12px; padding: 0 14px; margin: 10px 0 12px; }

  .site-main { padding: 6px 12px 56px; }
  .combo-cards { grid-template-columns: 1fr; gap: 16px; }
  .combo-card .ccimg { height: 200px; }
  .dish-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sdish .sname { font-size: 14.5px; }
  .sdish .sbody { padding: 11px 12px 13px; }
  .sdish-more { font-size: 11.5px; }

  /* 分类横滑，避免换行占屏 */
  .cat-nav {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    padding-bottom: 4px; margin-bottom: 16px; -webkit-overflow-scrolling: touch;
  }
  .cat-nav::-webkit-scrollbar { height: 0; }

  /* 套餐详情 */
  .cd-title { font-size: 23px; }
  .cd-price-card { padding: 12px 16px; }
  .cd-price { gap: 9px; }
  .cd-price .old { font-size: 14px; }
  .cd-price .new { font-size: 34px; }
  .cd-price .new small { font-size: 16px; }
  .cd-save { font-size: 12.5px; }
  /* 主图比例由 aspect-ratio 统一控制 */
  .cd-hero-name { font-size: 19px; }
  .cd-sub { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* 小图比例由 aspect-ratio 统一控制 */
  .cd-others { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cd-other-img { width: 62px; height: 62px; }
  .cd-other-name { font-size: 15px; }
  .cd-actions .btn { flex: 1; min-width: 130px; min-height: 44px; }
  .cd-qrblock { flex-direction: column; text-align: center; gap: 12px; }
  .cd-qr { width: 150px; }

  /* 菜品标准弹窗：接近全屏，拇指可达 */
  .modal-box { max-width: 94vw; padding: 18px 16px; max-height: 88vh; }
  .modal-box.wide { max-width: 94vw; }
  .dd-head { gap: 12px; padding: 10px 12px; margin-bottom: 10px; }
  .dd-head img { width: 74px; height: 74px; }
  .dd-head h3 { font-size: 18px; }
  .dd-body { max-height: 54vh; }
  .dd-row { font-size: 14px; gap: 10px; padding: 10px 12px; margin-bottom: 8px; }
  .dd-row label { flex: 0 0 60px; font-size: 12px; }
  .dd-judge { padding: 12px 13px; }
  .modal-foot { justify-content: stretch; }
  .modal-foot .btn { flex: 1; min-height: 44px; }

  /* 图片查看 */
  .lightbox img { max-width: 94vw; max-height: 70vh; }
  .lightbox-bar { gap: 10px; }
  .lightbox-bar .btn { min-height: 44px; }

  /* 后台 / 工作台（平板、手机可用） */
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .content { padding: 18px 14px 50px; }
  .qr-hero { gap: 16px; }
  .qr-hero-img { width: 100%; max-width: 320px; margin: 0 auto; }
  .qr-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
  .site-url-row input { min-width: 100%; }
  .board-cards { grid-template-columns: repeat(2, 1fr); }
  .login-card { padding: 28px 22px 24px; max-width: 92vw; }
}

/* ---------- 小屏手机（≤420px） ---------- */
@media (max-width: 420px) {
  .hero-logo { height: 52px; }
  .hero-slogan { font-size: 13px; letter-spacing: 1px; }
  .nav-btn { padding: 10px 13px; font-size: 13px; }
  .site-nav { gap: 6px; padding: 8px 8px; }
  .dish-cards { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .combo-card .ccimg { height: 172px; }
  .cd-title { font-size: 21px; }
  .cd-price .new { font-size: 30px; }
  /* 主图比例由 aspect-ratio 统一控制 */
  .cd-others { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cd-other-img { width: 54px; height: 54px; }
  .cd-other-name { font-size: 15px; }
  .cd-other-price { font-size: 12.5px; }
  .qr-grid { grid-template-columns: 1fr; }
  .board-cards { grid-template-columns: 1fr; }
}

/* ---------- iPhone 安全区 ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .site-nav { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}

/* ---------- 触屏设备：取消 hover 位移，改为点击反馈 ---------- */
@media (hover: none) {
  .combo-card:hover, .sdish:hover, .cd-hero:hover, .cd-sub-item:hover, .cd-other:hover {
    transform: none;
  }
  .combo-card:active { transform: scale(.985); }
  .sdish:active { transform: scale(.985); }
}

/* ================= 身份绑定页 ================= */
.bind-note {
  margin: 16px 0 20px; padding: 14px 16px; background: #fffdf6;
  border: 1px solid #f0e6c8; border-radius: 12px;
  font-size: 14px; line-height: 1.8; color: var(--ink); text-align: left;
}
.bind-note b { color: var(--c1); }
.bind-note.fail { background: #fdf2f0; border-color: #f0d4cf; color: #8a3a2e; }
