:root {
  --ink: #1f1b16;
  --ink-2: #5c554d;
  --ink-3: #8b837a;
  --line: #e6e1d8;
  --bg: #f7f5f1;
  --card: #ffffff;
  --brand: #2f5d50;
  --brand-2: #eaf2ee;
  --warn: #b54708;
  --danger: #b42318;
  --ok: #0f8a5f;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 登录 ---------- */
.auth {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 20% 0%, #e8f0ec 0%, var(--bg) 55%);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(31,27,22,.04), 0 12px 32px rgba(31,27,22,.08);
}
.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.auth-brand b { font-size: 15px; letter-spacing: .2px; }
.auth h1 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.auth p.sub { margin: 0 0 22px; color: var(--ink-3); font-size: 13px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,93,80,.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: #faf8f5; }
.btn.danger { background: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }

.err {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fef3f2;
  color: var(--danger);
  font-size: 13px;
  display: none;
}
.err.show { display: block; }

/* ---------- 外壳 ---------- */
.shell { display: none; height: 100%; }
.shell.show { display: flex; }

.side {
  width: 208px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.side-brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 18px; }
.side-brand b { font-size: 14px; }
.nav {
  flex: 1;
  overflow-y: auto;
  /* 菜单再多也只在侧栏内部滚动，不会把「退出登录」顶出屏幕 */
  padding-right: 2px;
}

/* ---------- 一级分组 ---------- */
.nav-g { margin-bottom: 2px; }

.nav-gh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .3px;
  cursor: pointer;
  user-select: none;
}
.nav-gh:hover { background: #f8f6f2; color: var(--ink-2); }
.nav-gh b {
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .18s ease;
}
.nav-g.open .nav-gh b { transform: rotate(90deg); }
/* 当前页在这一组里时，标题稍微强调，收起也能看出人在哪 */
.nav-g.open .nav-gh { color: var(--ink-2); }

.nav-gl {
  display: none;
  padding: 2px 0 4px 6px;
  margin-left: 9px;
  border-left: 1px solid var(--line);
}
.nav-g.open .nav-gl { display: block; }

.nav-sep {
  height: 1px;
  background: var(--line);
  margin: 10px 6px;
}

.nav a,
.nav .nav-alone {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav a:hover,
.nav .nav-alone:hover { background: #f6f4f0; color: var(--ink); }
.nav a.on,
.nav .nav-alone.on { background: var(--brand-2); color: var(--brand); font-weight: 500; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--ink-3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top h2 { margin: 0; font-size: 16px; font-weight: 600; }
.top .who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.body { flex: 1; overflow: auto; padding: 22px 24px 40px; }

/* ---------- 卡片 / 表格 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(31,27,22,.04);
}
.card .k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.card .v { font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.card .v small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.card.hl .v { color: var(--brand); }

.panel {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(31,27,22,.04);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panel-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-b { padding: 16px 18px; }
.panel-b.flush { padding: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 12px;
  padding: 10px 14px;
  background: #fbfaf8;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid #f4f1ec; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fcfbf9; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  background: #f2efea;
  color: var(--ink-2);
}
.tag.ok { background: #e8f6ef; color: var(--ok); }
.tag.warn { background: #fff4e5; color: var(--warn); }
.tag.bad { background: #fef3f2; color: var(--danger); }
.tag.info { background: var(--brand-2); color: var(--brand); }

/* 环境标识：一眼看出后台连的是哪个后端，避免新旧环境切错 */
.tag.env {
  background: #eef2ff;
  color: #3b4cca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.2px;
  cursor: default;
}

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* 趋势条 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 10px 2px 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { width: 100%; max-width: 34px; background: linear-gradient(180deg, #4a8b78, var(--brand)); border-radius: 5px 5px 2px 2px; display: block; min-height: 3px; }
.bar span { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.bar b { font-size: 11px; color: var(--ink-2); font-weight: 500; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(31,27,22,.36);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.mask.show { display: flex; }
.modal {
  width: 100%; max-width: 460px; background: #fff; border-radius: 14px;
  padding: 22px; max-height: 86vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(31,27,22,.24);
}
.modal h3 { margin: 0 0 16px; font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(10px);
  background: #2b2620; color: #fff; padding: 10px 18px; border-radius: 9px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .22s; z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 760px) {
  .side { display: none; }
  .body { padding: 14px; }
  .top { padding: 0 14px; }
}

/* ---------- 房态图 ---------- */
.floor-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fs-item {
  background: #fff; border-radius: 10px; padding: 10px 16px; min-width: 96px;
  box-shadow: 0 1px 2px rgba(31,27,22,.04);
}
.fs-item .k { font-size: 12px; color: var(--ink-3); }
.fs-item .v { font-size: 20px; font-weight: 600; margin-top: 2px; }

.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }

.tcard {
  border-radius: 12px; padding: 14px; background: #fff;
  border: 1px solid var(--line); cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.tcard:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,27,22,.08); }
.tcard .tn { font-weight: 500; font-size: 14px; }
.tcard .tmeta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tcard .tamt { font-size: 19px; font-weight: 600; margin-top: 9px; letter-spacing: -.4px; }
.tcard .tst { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 20px; margin-top: 6px; }

.tcard.idle { background: #faf9f7; }
.tcard.idle .tst { background: #eeece7; color: var(--ink-3); }
.tcard.unpaid { background: #fff8ea; border-color: #efd9a9; }
.tcard.unpaid .tst { background: #fdf0d3; color: var(--warn); }
.tcard.paid { background: #eef7f1; border-color: #b9dfc9; }
.tcard.paid .tst { background: #d9efe2; color: var(--ok); }
.tcard.dirty { background: #eef3fb; border-color: #c3d6ef; }
.tcard.dirty .tst { background: #dce8f8; color: #185fa5; }

/* ---------- 出品看板 ---------- */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.kb-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.kb-card .kb-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kb-card .kb-n { font-size: 16px; font-weight: 500; }
.kb-card .kb-q { font-size: 22px; font-weight: 600; color: var(--brand); letter-spacing: -.5px; }
.kb-card .kb-from { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.7; }
.kb-card .kb-acts { display: flex; gap: 6px; margin-top: 12px; }
.kb-card .kb-acts .btn { flex: 1; }

/* 新增状态色：待结账 / 已开场 / 待清场 */
.tcard.billing { background: #fdeee9; border-color: #f2c4b3; }
.tcard.billing .tst { background: #fadfd5; color: #993c1d; }
.tcard.locked { background: #eef3fb; border-color: #c3d6ef; }
.tcard.locked .tst { background: #dce8f8; color: #185fa5; }
.tcard.playing { background: #f1effc; border-color: #cecbf6; }
.tcard.playing .tst { background: #e4e1fb; color: #534ab7; }
.tcard.clearing { background: #eef3fb; border-color: #c3d6ef; }
.tcard.clearing .tst { background: #dce8f8; color: #185fa5; }
.tcard.opened { background: #fff8ea; border-color: #efd9a9; }
.tcard.opened .tst { background: #fdf0d3; color: var(--warn); }

/* 筛选条 */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; cursor: pointer; color: var(--ink-2);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 队列卡片 */
.q-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
}
.q-no { font-size: 26px; font-weight: 600; letter-spacing: -1px; color: var(--brand); min-width: 74px; }
.q-meta { flex: 1; font-size: 13px; color: var(--ink-2); }
.q-meta .qw { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ================= 排版对齐修正 ================= */

/* 标签在表格和卡片里都要和文字基线对齐，否则一行里高一块低一块 */
.tag {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.45;
  white-space: nowrap;
}

.btn.sm { vertical-align: middle; }

/* 桌台卡片：等高、状态行贴底，长文本省略而不是换行把卡片撑高 */
.tcard {
  display: flex;
  flex-direction: column;
  min-height: 122px;
}
.tcard .tn { display: flex; align-items: baseline; gap: 6px; }
.tcard .tn span { flex: none; }
.tcard .tst {
  margin-top: auto;
  align-self: flex-start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 汇总卡：数字和中文混排时高度一致，底部对齐 */
.floor-sum { align-items: stretch; }
.fs-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 62px;
}
.fs-item .v {
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* 表格里数字列用等宽数字，直观上"对齐"很多 */
table td, table th { font-variant-numeric: tabular-nums; }
table td .btn + .btn { margin-left: 4px; }

/* 队列卡片：号码固定宽，长菜名换行不挤压右侧按钮 */
.q-card { align-items: flex-start; }
.q-no {
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.q-meta { min-width: 0; }
.q-meta > div { overflow-wrap: anywhere; }

/* 出品卡片：菜名长的时候数量和按钮不被挤走 */
.kb-card .kb-h { gap: 10px; }
.kb-card .kb-n { min-width: 0; overflow-wrap: anywhere; }
.kb-card .kb-q { flex: none; }
.kb-card .kb-acts { flex-wrap: wrap; }

/* 筛选条：小屏时按钮不换行挤在一起 */
.filter-bar { align-items: center; }
.filter-bar .chip { flex: none; }

/* 弹窗按钮组：多个按钮时右对齐且间距统一 */
.modal-foot { flex-wrap: wrap; }
.modal-foot .btn + .btn { margin-left: 8px; }

/* 顶部角标之间留点空 */
.top .who { gap: 10px; }

/* ---------- 开关（线上支付这类「一键生效」的二元设置） ---------- */
.sw {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: #dcd7cf;
  transition: background 0.18s ease;
  cursor: pointer;
  flex: none;
}
.sw::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}
.sw.on {
  background: var(--ok);
}
.sw.on::after {
  transform: translateX(22px);
}
.sw.busy {
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- 入驻审核 ---------- */

/* 分段筛选（待审核 / 需补充 / 已通过 …） */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  padding: 6px 13px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s;
}
.tab:hover { border-color: #c9b8a8; }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 申请列表：主体名与信用代码两行，避免长名字把表格撑破 */
.tb td { vertical-align: top; }
.tb td:first-child { max-width: 260px; }

/* 审核详情里的字段表 */
.kv { margin-bottom: 4px; }
.kv th {
  width: 118px; background: transparent; border-bottom: 1px solid #f4f1ec;
  color: var(--ink-3); font-weight: 400; padding: 8px 12px 8px 0; vertical-align: top;
}
.kv td { padding: 8px 0; border-bottom: 1px solid #f4f1ec; overflow-wrap: anywhere; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }

/* 资质卡片：一张证一格，照片和「已核验」并排 */
.quals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .quals { grid-template-columns: 1fr; } }
.qual {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fcfcfa;
}
.qual-h {
  display: flex; gap: 8px; align-items: baseline; justify-content: space-between;
  font-size: 12.5px; margin-bottom: 3px;
}
.qual-h b { font-weight: 600; }
.qual-h span { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }

/* 风险提示条 */
.risk {
  font-size: 12.5px; line-height: 1.6; color: var(--warn);
  padding: 6px 0 6px 12px; border-left: 2px solid var(--warn); margin-bottom: 6px;
  background: #fffdf8;
}
.risk.bad { color: var(--danger); border-left-color: var(--danger); background: #fffafa; }

/* 审核详情要放下主体信息表 + 多张资质，默认 460px 太窄 */
.modal.wide { max-width: 760px; }

/* ---------- 首页推广位 ---------- */

.bn-card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f4f1ec;
}

.bn-thumb {
  width: 178px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f5f1;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.bn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bn-ph {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 12px;
}

.bn-meta {
  flex: 1;
  min-width: 0;
}

.bn-title {
  font-weight: 500;
}

.bn-sub {
  margin: 5px 0 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bn-ops {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bn-pick {
  height: 152px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fbfaf8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.bn-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bn-ph-xl {
  color: var(--ink-3);
  font-size: 13px;
}

/* 推广位弹窗的小标题 */
.bn-form-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}
