/* ============================================================
   餐厅网络运营 · 平台管理系统   样式（美团风格）
   ------------------------------------------------------------
   设计取向：老板和运营小白都在用，所以走「外卖 App」那套熟悉的语言——
   明黄主色 + 大圆角 + 白卡片 + 轻阴影，字大、层级少、按钮一眼看出哪个是主操作。

   三条硬规矩，改样式时别破：
   1) 主色是「黄底黑字」，不是「黄底白字」。美团黄 #FFD100 上放白字对比度只有 1.4，
      根本看不清；放深色字才是它的本体，也是整个风格的地基。
   2) 涨=红、跌=绿（中国口径）。tag.bad 是红、tag.ok 是绿，deltaBadge 就是这么用的，
      别按欧美习惯换过来。
   3) 只认 class，不认标签位置。所有类名都被 pages.js / pages2.js 拼字符串用到，
      删任何一个类都会让对应位置掉样式，改完必须跑 tools/check_assets.js。
   ============================================================ */
:root {
  /* ---- 品牌色 ---- */
  --brand: #FFD100;          /* 美团黄：主按钮、选中态 */
  --brand-deep: #FFC400;     /* 按下 / 悬停 */
  --brand-ink: #1A1A1A;      /* 黄底上的字色，只有深色才看得清 */
  --brand-soft: #FFF7D6;     /* 极浅黄：选中底、悬停底 */
  --brand-soft2: #FFFBEA;
  --brand-line: #FFE9A8;

  /* ---- 中性色 ---- */
  --bg: #F4F5F7;
  --panel: #FFFFFF;
  --ink: #1A1A1A;
  --ink2: #3D3D3D;
  --muted: #8C8C8C;
  --muted2: #A6A6A6;
  --line: #EDEDED;
  --line2: #F6F6F6;

  /* ---- 语义色 ---- */
  --ok: #00B578;   --ok-soft: #E6F9F2;   --ok-line: #C7F0E2;
  --warn: #B07D00; --warn-soft: #FFF8E1; --warn-line: #FFE9A8;
  --bad: #E02020;  --bad-soft: #FFECEC;  --bad-line: #FFD1D1;
  --blue: #1677FF; --blue-soft: #EAF3FF; --blue-line: #D6E6FF;
  --purple: #722ED1; --purple-soft: #F3EAFF;
  --gold: #D4A017; --gold-soft: #FFF8E1;
  --link: #B45309;   /* 暖琥珀，白底对比 4.99:1，够 AA */

  /* ---- 形状 ---- */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* ---- 阴影：越靠上越轻，别一上来就重投影 ---- */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .05);
  --sh: 0 4px 16px rgba(0, 0, 0, .06);
  --sh-lg: 0 12px 40px rgba(0, 0, 0, .12);
  --sh-brand: 0 4px 14px rgba(255, 201, 0, .38);

  --sidebar-w: 232px;
  --top-h: 60px;

  /* 旧变量名保留映射，防止遗漏引用 */
  --sidebar: #FFFFFF;
  --sidebar-ink: var(--ink2);
  --radius: var(--r);
  --shadow: var(--sh);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 700; }
em { font-style: normal; }
code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  background: var(--line2); padding: 1px 6px; border-radius: 5px; font-size: .92em;
  color: var(--ink2);
}
::selection { background: #FFE9A8; color: var(--ink); }

/* 滚动条：细一点，别抢视觉 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #DCDCDC; border-radius: var(--r-pill); border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #C4C4C4; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   一、登录 / 注册页
   ============================================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 12% 8%, #FFE873 0%, rgba(255, 232, 115, 0) 62%),
    radial-gradient(800px 600px at 92% 96%, #FFD100 0%, rgba(255, 209, 0, 0) 58%),
    linear-gradient(160deg, #FFF7D6 0%, #FFFDF6 45%, #FFF2C9 100%);
}
.auth-card {
  width: 100%; max-width: 980px; background: var(--panel);
  border-radius: var(--r-xl); overflow: hidden; display: flex; flex-wrap: wrap;
  box-shadow: 0 24px 70px rgba(120, 92, 0, .18), 0 2px 6px rgba(0, 0, 0, .04);
}
/* 左半：黄底黑字。这是整个风格的招牌，别改成深色。 */
.auth-left {
  flex: 1 1 400px; padding: 42px 38px; color: #3A2E00;
  background: linear-gradient(150deg, #FFDE3D 0%, #FFD100 52%, #FFC400 100%);
  position: relative; overflow: hidden;
}
.auth-left::after {
  content: ''; position: absolute; right: -70px; bottom: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .28);
}
.auth-left h1 { font-size: 25px; margin: 0 0 8px; letter-spacing: .3px; position: relative; }
.auth-left .sub { color: #6B5400; font-size: 13.5px; margin-bottom: 24px; position: relative; }
.auth-left ul { list-style: none; padding: 0; margin: 0; position: relative; }
.auth-left li {
  padding: 8px 0 8px 28px; position: relative; color: #4A3B00;
  font-size: 13px; line-height: 1.65;
}
.auth-left li:before {
  content: "✓"; position: absolute; left: 0; top: 9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; color: #A97C00; font-weight: 700;
  font-size: 11px; line-height: 18px; text-align: center;
}
.auth-left .kpi {
  display: flex; gap: 10px; margin-top: 26px; padding-top: 0;
  border-top: 0; position: relative;
}
.auth-left .kpi div {
  flex: 1; background: rgba(255, 255, 255, .55); border-radius: var(--r);
  padding: 12px 8px; text-align: center;
}
.auth-left .kpi b { display: block; font-size: 22px; color: #2E2500; letter-spacing: -.5px; }
.auth-left .kpi span { font-size: 11.5px; color: #6B5400; }

.auth-right { flex: 1 1 430px; padding: 38px 38px 34px; }
.tabs {
  display: flex; gap: 4px; margin-bottom: 22px; background: #F5F5F5;
  padding: 4px; border-radius: var(--r-pill);
}
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 10px 0; border-radius: var(--r-pill);
  font-size: 14px; cursor: pointer; color: var(--muted); font-family: inherit;
  font-weight: 600; transition: all .18s;
}
.tabs button.on {
  background: var(--brand); color: var(--brand-ink); font-weight: 700;
  box-shadow: var(--sh-brand);
}
.auth-note { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.75; }
.invite-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft);
  color: #8A6A00; border: 1px solid var(--brand-line);
  border-radius: var(--r-pill); padding: 5px 14px; font-size: 12px; margin-bottom: 16px;
}
/* 登录页 hero 的品牌行 / 白底标识块 */
.abrand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; position: relative; }
.abrand b { font-size: 15px; color: #3A2E00; letter-spacing: .2px; }
.alogo {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(120, 92, 0, .16);
}
.alogo svg { width: 22px; height: 22px; display: block; }
/* 通栏主按钮：登录 / 注册这种「一屏只有一个主操作」的场景用 */
.btn.block { width: 100%; padding: 13px 16px; font-size: 14.5px; margin-top: 4px; }

/* 手机上的登录页：把 hero 收成一条品牌横幅。
   窄屏下左右两栏会堆叠，hero 那 6 条卖点 + 3 个数字块会把登录框推到屏幕外，
   已经注册的人（尤其是扫码回来的）得滑半天才能输密码 —— 这是最不该有的摩擦。 */
@media (max-width: 860px) {
  .auth-page { padding: 0; align-items: stretch; }
  .auth-card { border-radius: 0; max-width: none; min-height: 100vh; box-shadow: none; }
  .auth-left { flex: 0 0 auto; padding: 28px 22px 24px; }
  .auth-left::after { display: none; }
  .auth-left h1 { font-size: 20px; margin-bottom: 6px; }
  .auth-left .sub { margin-bottom: 0; font-size: 12.5px; }
  .auth-left ul, .auth-left .kpi { display: none; }
  .abrand { margin-bottom: 16px; }
  .auth-right { flex: 1 1 auto; padding: 24px 22px 32px; }
}

/* ============================================================
   二、应用外壳
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.side {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--panel); color: var(--ink2);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); z-index: 40;
}
.brand {
  padding: 16px; border-bottom: 1px solid var(--line2);
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
}
.brand b { color: var(--ink); font-size: 15px; display: block; letter-spacing: .2px; line-height: 1.3; }
.brand span { font-size: 11.5px; color: var(--muted); display: block; line-height: 1.4; }
.brand .logo {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(140deg, #FFE066, #FFC400);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 193, 7, .4);
}
.brand .logo svg { width: 22px; height: 22px; display: block; }
.brand .btxt { min-width: 0; }

.nav { padding: 8px 0 20px; flex: 1; }
.nav .grp {
  padding: 16px 18px 6px; font-size: 11px; color: var(--muted2);
  letter-spacing: 1.2px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 10px; padding: 10px 12px; border-radius: var(--r);
  color: var(--ink2); font-size: 13.5px; text-decoration: none; border: 0;
  transition: background .16s, color .16s;
}
.nav a:hover { background: var(--brand-soft2); color: var(--ink); text-decoration: none; }
/* 选中态＝黄底黑字胶囊，整套配色的落脚点 */
.nav a.on {
  background: linear-gradient(100deg, #FFE066, var(--brand));
  color: var(--brand-ink); font-weight: 700; box-shadow: var(--sh-brand);
}
.nav a.on:hover { background: linear-gradient(100deg, #FFD84D, var(--brand-deep)); }
.nav a i {
  width: 18px; height: 18px; flex: 0 0 18px; text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; opacity: .82;
}
.nav a i svg { width: 18px; height: 18px; display: block; }
.nav a.on i { opacity: 1; }
.nav .badge {
  margin-left: auto; background: #F5222D; color: #fff; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; padding: 0 6px; min-width: 18px; height: 18px;
  line-height: 18px; text-align: center;
}
.nav .badge.blue { background: var(--blue); }

/* 侧栏底部：改密码 / 退出。窄屏顶栏塞不下这两个，必须有个固定去处。 */
.side-foot {
  flex: 0 0 auto; padding: 10px; border-top: 1px solid var(--line2);
  display: flex; gap: 8px; background: #FCFCFC;
}
.sf-btn {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--ink2);
  border-radius: var(--r-sm); padding: 9px 6px; font: inherit; font-size: 12.5px;
  cursor: pointer; transition: all .16s;
}
.sf-btn:hover { background: var(--brand-soft2); border-color: var(--brand-line); color: var(--ink); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: var(--top-h); background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.top h2 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .2px; }
.top .sp { flex: 1; }
.top .who { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.top .who b { color: var(--ink); }
.top .who .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: linear-gradient(140deg, #FFE066, #FFC400); color: #4A3B00;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.top .who .wtx { line-height: 1.25; }
.top .who .wtx em { display: block; font-size: 11.5px; color: var(--muted); }
/* 汉堡按钮：只有窄屏才出现 */
.burger {
  display: none; width: 36px; height: 36px; flex: 0 0 36px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm);
  cursor: pointer; color: var(--ink2);
}
.burger svg { width: 20px; height: 20px; }
.burger:hover { background: var(--brand-soft2); border-color: var(--brand-line); }

.pill {
  border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px;
  background: #F5F5F5; color: var(--muted); white-space: nowrap; font-weight: 600;
}
.pill.ok { background: var(--ok-soft); color: #00735A; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.brand { background: var(--brand-soft); color: #8A6A00; }

.body { padding: 20px 22px 72px; max-width: 1480px; width: 100%; }

.lic-bar {
  background: var(--bad-soft); color: #8F1717; padding: 11px 22px; font-size: 13px;
  border-bottom: 1px solid var(--bad-line); display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; font-weight: 500;
}
.lic-bar::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); flex: 0 0 6px; }
.lic-bar.warn { background: var(--warn-soft); color: var(--warn); border-bottom-color: var(--warn-line); }
.lic-bar.warn::before { background: var(--warn); }
.lic-bar a { color: inherit; font-weight: 700; text-decoration: underline; }

/* 移动端抽屉遮罩 */
.side-mask { display: none; }
/* 底部标签栏：窄屏专用 */
.tabbar { display: none; }

/* ============================================================
   三、卡片与栅格
   ============================================================ */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 16px; box-shadow: var(--sh-xs);
  overflow: hidden;
}
.card > h3 {
  margin: 0; padding: 15px 18px; font-size: 15px; font-weight: 700;
  border-bottom: 1px solid var(--line2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card > h3 .muted { font-weight: 400; font-size: 12.5px; }
.card > .in { padding: 18px; }
.card > .in.tight { padding: 12px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------- 指标卡 */
.kpi-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; position: relative;
  overflow: hidden; box-shadow: var(--sh-xs);
  --tone: var(--brand-deep); --tone-soft: var(--brand-soft);
}
.kpi-card::after {
  content: ''; position: absolute; right: -34px; top: -34px;
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--tone-soft); pointer-events: none;
}
.kpi-card .t {
  font-size: 12.5px; color: var(--muted); display: flex; align-items: center;
  gap: 8px; position: relative; z-index: 1;
}
.kpi-card .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--tone);
  flex: 0 0 8px; box-shadow: 0 0 0 3px var(--tone-soft);
}
.kpi-card .v {
  font-size: 27px; font-weight: 800; margin: 10px 0 4px;
  letter-spacing: -.8px; color: var(--ink);
  font-variant-numeric: tabular-nums; position: relative; z-index: 1;
}
.kpi-card .s {
  font-size: 12px; color: var(--muted); position: relative; z-index: 1;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.kpi-card.orange { --tone: #FF8000; --tone-soft: #FFF1E0; }
.kpi-card.red { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.kpi-card.blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.kpi-card.green { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.kpi-card.gold { --tone: var(--gold); --tone-soft: var(--gold-soft); }
.kpi-card.gray { --tone: var(--muted); --tone-soft: #F2F2F2; }

/* ============================================================
   四、表格
   ============================================================ */
.tw { overflow-x: auto; border-radius: var(--r); }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tb th, table.tb td {
  padding: 11px 12px; border-bottom: 1px solid var(--line2);
  text-align: left; white-space: nowrap;
}
table.tb th {
  background: #FAFAFA; color: var(--muted); font-weight: 600; font-size: 12px;
  position: sticky; top: 0; z-index: 2; border-bottom-color: var(--line);
}
table.tb tbody tr { transition: background .14s; }
table.tb tbody tr:hover td { background: var(--brand-soft2); }
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb td.r, table.tb th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.tb td.c, table.tb th.c { text-align: center; }
table.tb .sub { color: var(--muted); font-size: 12px; }
table.tb tr.warn-row td { background: #FFFBF0; }
table.tb tr.bad-row td { background: #FFF7F7; }
table.tb tr.warn-row:hover td { background: #FFF6E4; }
table.tb tr.bad-row:hover td { background: #FFF0F0; }
.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12.5px; }

/* ============================================================
   五、标签 / 徽标
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
  background: #F5F5F5; color: var(--muted); white-space: nowrap;
}
.tag.ok { background: var(--ok-soft); color: #00735A; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.brand { background: var(--brand); color: var(--brand-ink); }
.tag.gold { background: var(--gold-soft); color: #8A6A00; }

/* ============================================================
   六、表单
   ============================================================ */
.f { display: block; margin-bottom: 14px; }
.f-l { display: block; font-size: 12.5px; color: #595959; margin-bottom: 6px; font-weight: 500; }
.f-h { display: block; font-size: 11.5px; color: var(--muted2); margin-top: 5px; line-height: 1.6; }
.ip {
  width: 100%; padding: 10px 12px; border: 1px solid #E5E5E5; border-radius: var(--r);
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
  transition: border-color .16s, box-shadow .16s;
}
.ip::placeholder { color: #C0C0C0; }
.ip:hover { border-color: #D9D9D9; }
.ip:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 209, 0, .18);
}
textarea.ip { resize: vertical; line-height: 1.55; }
select.ip {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238C8C8C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .row2, .row3 { grid-template-columns: 1fr; } }

/* ============================================================
   七、按钮与工具条
   ============================================================ */
.btn {
  border: 1px solid #E5E5E5; background: #fff; color: var(--ink2);
  border-radius: var(--r); padding: 9px 16px; font: inherit; font-size: 13px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .16s, border-color .16s, color .16s, transform .1s, box-shadow .16s;
}
.btn:hover { border-color: var(--brand); color: var(--ink); background: var(--brand-soft2); }
.btn:active { transform: translateY(1px); }
/* 主按钮＝黄底黑字。这是整套 UI 里最该被一眼看到的元素。 */
.btn.primary {
  background: linear-gradient(180deg, #FFDE3D, var(--brand));
  border-color: var(--brand); color: var(--brand-ink); font-weight: 700;
  box-shadow: var(--sh-brand);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #FFD83A, var(--brand-deep));
  border-color: var(--brand-deep);
}
.btn.danger { background: #fff; border-color: var(--bad-line); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: #F5AFAF; color: var(--bad); }
.btn.ghost {
  border-color: transparent; background: transparent; color: var(--link); padding: 5px 8px;
}
.btn.ghost:hover { background: var(--brand-soft); color: #92400E; border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tools .sp { flex: 1; }
.seg {
  display: inline-flex; border: 0; border-radius: var(--r-pill); overflow: hidden;
  background: #F5F5F5; padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: var(--r-pill);
  font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted);
  font-weight: 500; transition: all .16s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; box-shadow: var(--sh-brand); }

/* ============================================================
   八、提示与空态
   ============================================================ */
.notice {
  border-radius: var(--r); padding: 12px 15px; font-size: 13px; margin-bottom: 14px;
  background: var(--blue-soft); color: #1D4ED8; border: 1px solid var(--blue-line);
  line-height: 1.7;
}
.notice.ok { background: var(--ok-soft); color: #00735A; border-color: var(--ok-line); }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.notice.bad { background: var(--bad-soft); color: #B31616; border-color: var(--bad-line); }
.notice b { font-weight: 700; }

.empty-s { color: var(--muted2); font-size: 13px; padding: 30px 16px; text-align: center; }
.empty-s::before {
  content: ''; display: block; width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 20px; background-color: #F7F7F7;
  background-image: radial-gradient(circle, #DCDCDC 1.7px, transparent 1.8px);
  background-size: 11px 11px; box-shadow: inset 0 0 0 1px #EFEFEF;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ============================================================
   九、弹层
   ============================================================ */
.modal-wrap {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 16px; z-index: 100; opacity: 0; transition: opacity .18s;
  overflow-y: auto; backdrop-filter: blur(2px);
}
.modal-wrap.in { opacity: 1; }
.modal {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 620px;
  margin: auto; box-shadow: var(--sh-lg); overflow: hidden;
}
.modal.wide { max-width: 940px; }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line2);
  display: flex; align-items: center;
}
.modal-head b { font-size: 15.5px; font-weight: 700; }
.modal-head .x {
  margin-left: auto; border: 0; background: transparent; font-size: 24px; line-height: 1;
  cursor: pointer; color: var(--muted2); width: 30px; height: 30px; border-radius: 50%;
  transition: all .16s;
}
.modal-head .x:hover { background: #F5F5F5; color: var(--ink); }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line2); display: flex;
  gap: 10px; justify-content: flex-end; background: #FCFCFC;
}
.cf-text { font-size: 14px; line-height: 1.75; color: var(--ink2); }

#toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: #fff; color: var(--ink); padding: 12px 18px 12px 16px;
  border-radius: var(--r); font-size: 13.5px; max-width: 380px; line-height: 1.55;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .16); border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  opacity: 0; transform: translateY(12px) scale(.98); transition: all .26s;
}
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--bad); }

/* ============================================================
   十、看板图表
   ============================================================ */
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { font-size: 10.5px; fill: #BFBFBF; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--ink2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .lg em { color: var(--muted2); font-size: 11.5px; }
.chart-note { font-size: 11.5px; color: var(--muted2); margin-top: 8px; line-height: 1.65; }
.spark { display: block; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 96px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .bl { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bt { background: #F5F5F5; border-radius: var(--r-pill); height: 10px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); min-width: 4px; }
.bar-row .bt i.orange { background: #FF8000; }
.bar-row .bt i.red { background: var(--bad); }
.bar-row .bt i.blue { background: var(--blue); }
.bar-row .bt i.green { background: var(--ok); }
.bar-row .bt i.gray { background: #C4C4C4; }
.bar-row .bt i.gold { background: var(--gold); }
.bar-row .bt i.purple { background: var(--purple); }
.bar-row .bv { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 700px) { .bar-row { grid-template-columns: 84px 1fr 76px; } }

/* --------------------------------------------------- 待办预警 */
.warns { display: flex; flex-direction: column; gap: 10px; }
.warn-item {
  display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--blue); align-items: flex-start;
  transition: box-shadow .16s, border-color .16s;
  --tone: var(--blue);
}
.warn-item:hover { box-shadow: var(--sh-sm); }
.warn-item.warn { border-left-color: #F5A623; }
.warn-item.bad { border-left-color: var(--bad); }
.warn-item .wt { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.warn-item .wd { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.65; }
.warn-item .wtg { flex: 0 0 auto; padding-top: 1px; }
.warn-item a { font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* ============================================================
   十一、平台账号台账
   ============================================================ */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pf-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px;
  background: var(--panel); box-shadow: var(--sh-xs);
  transition: box-shadow .16s, border-color .16s, transform .16s;
}
.pf-card:hover { box-shadow: var(--sh); border-color: var(--brand-line); transform: translateY(-1px); }
.pf-card .h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pf-card .h b { font-size: 14.5px; }
.pf-card .st { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pf-card .meta { font-size: 12.5px; color: var(--muted); line-height: 2; }
.pf-card .meta span { color: var(--ink2); font-weight: 500; }
.pf-card.ready { border-color: var(--ok-line); background: #FBFFFD; }

.acc-row-actions { display: flex; gap: 6px; }
.secret-box {
  background: linear-gradient(180deg, var(--brand-soft2), var(--brand-soft));
  border: 1.5px dashed var(--brand);
  color: var(--ink); border-radius: var(--r); padding: 16px 18px;
  font-family: ui-monospace, Consolas, monospace; font-weight: 700;
  font-size: 19px; letter-spacing: 2px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.secret-box .sp { flex: 1; }
.countdown { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.mask-dots { letter-spacing: 4px; color: var(--muted2); font-size: 19px; }

/* ============================================================
   十二、证件库
   ============================================================ */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.doc-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px;
  background: var(--panel); box-shadow: var(--sh-xs);
  transition: box-shadow .16s, border-color .16s, transform .16s;
}
.doc-card:hover { box-shadow: var(--sh); border-color: var(--brand-line); transform: translateY(-1px); }
.doc-card.warn { border-color: var(--warn-line); background: #FFFDF6; }
.doc-card.bad { border-color: var(--bad-line); background: #FFFBFB; }
.doc-card h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 700; }
.doc-card .no { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.doc-card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.drop {
  border: 2px dashed #E5E5E5; border-radius: var(--r-lg); padding: 26px;
  text-align: center; color: var(--muted); background: #FAFAFA; cursor: pointer;
  transition: all .18s; font-size: 13px;
}
.drop:hover { border-color: var(--brand); background: var(--brand-soft2); color: var(--ink2); }
.drop.hot { border-color: var(--brand); background: var(--brand-soft); color: #8A6A00; font-weight: 600; }

/* ============================================================
   十三、学习地图 / 二维码
   ============================================================ */
.map-frame {
  width: 100%; height: calc(100vh - 168px); border: 1px solid var(--line);
  border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-xs);
}
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.qr-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px;
  text-align: center; background: var(--panel); box-shadow: var(--sh-xs);
  transition: box-shadow .16s, border-color .16s;
}
.qr-card:hover { box-shadow: var(--sh); border-color: var(--brand-line); }
.qr-card .qr {
  width: 184px; height: 184px; margin: 10px auto;
  padding: 8px; background: #fff; border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line);
}
.qr-card .qr svg { width: 100%; height: 100%; display: block; }
.qr-card .u { font-size: 11.5px; color: var(--muted); word-break: break-all; margin: 8px 0 10px; line-height: 1.6; }
.qr-card h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 700; }

/* ============================================================
   十四、工具类
   ============================================================ */
.pos-rel { position: relative; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.lbl-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.instructions {
  font-size: 12.5px; color: var(--muted); line-height: 2;
}
.instructions code { background: var(--line2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ============================================================
   十五、窄屏适配：侧栏变抽屉 + 底部标签栏
   ------------------------------------------------------------
   原来 760px 以下是把 .side 直接 display:none，手机上就完全没有导航了。
   现在改成抽屉 + 底部四个主入口，老板在饭店里拿手机也能直接点。
   ============================================================ */
@media (max-width: 980px) {
  .side {
    position: fixed; top: 0; left: 0; height: 100vh;
    transform: translateX(-104%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 0 44px rgba(0, 0, 0, .18); z-index: 60;
  }
  .side.open { transform: none; }
  .side-mask {
    display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .42);
    z-index: 55; opacity: 0; pointer-events: none; transition: opacity .24s;
  }
  .side-mask.in { opacity: 1; pointer-events: auto; }
  .burger { display: inline-flex; }
  .top { padding: 0 14px; gap: 10px; }
  .top h2 { font-size: 16px; }
  .top .who .wtx { display: none; }
  .top .who { gap: 0; }
  .topsm-hide { display: none !important; }
  .body { padding: 14px 14px 84px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar .tbi {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 0; border: 0; background: transparent; cursor: pointer;
    font: inherit; font-size: 10.5px; color: var(--muted);
    text-decoration: none; border-radius: var(--r-sm); position: relative;
  }
  .tabbar .tbi svg { width: 22px; height: 22px; display: block; }
  .tabbar .tbi.on { color: #A97C00; font-weight: 700; }
  .tabbar .tbi.on::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: var(--r-pill); background: var(--brand);
  }
  .tabbar .tbi .bdg {
    position: absolute; top: 2px; left: 50%; margin-left: 6px;
    background: #F5222D; color: #fff; border-radius: var(--r-pill);
    font-size: 10px; font-weight: 700; padding: 0 5px; min-width: 16px; height: 16px;
    line-height: 16px; text-align: center;
  }
  .lic-bar { padding: 10px 14px; font-size: 12.5px; }
  .map-frame { height: calc(100vh - 208px); }
  #toast { right: 12px; left: 12px; bottom: 76px; align-items: stretch; }
  .toast { max-width: none; }
  .modal-wrap { padding: 20px 12px; align-items: flex-start; }
  .modal { max-width: none; }
}

@media print {
  .side, .top, .tools, .lic-bar, #toast, .tabbar, .side-mask, .burger { display: none !important; }
  .body { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; border-color: #ddd; }
  body { background: #fff; }
}
