/* ============================================================
   打车券聚合领取系统 · UI 复刻自 mtq.8ju.cn 设计语言
   设计令牌 / 圆角 / 阴影 / 背景 均取自参考站实测值
   —— 同一份 CSS 同时服务前台 (index.html) 与后台 (admin.html)
   ============================================================ */
:root {
  /* —— 表面与文字 —— */
  --bg: #f3f6ff;
  --bg-soft: #edf3ff;
  --surface: rgba(255, 255, 255, .9);
  --surface-strong: rgba(255, 255, 255, .96);
  --surface-muted: rgba(246, 249, 255, .92);
  --line: rgba(147, 162, 201, .22);
  --line-strong: rgba(117, 139, 193, .34);
  --text: #162033;
  --text-soft: #56647e;
  --text-faint: #64748b;

  /* —— 品牌三色 —— */
  --brand: #555cf4;
  --brand-2: #20c5d7;
  --brand-3: #ff7a6b;
  --brand-deep: #5056f2;
  --brand-ink: #4c53e0;
  --brand-rgb: 85, 92, 244;
  --brand-2-rgb: 32, 197, 215;
  --brand-3-rgb: 255, 122, 107;

  /* —— 语义色 —— */
  --ok: #1493a4;
  --ok-rgb: 32, 197, 215;
  --ok-ink: #0f766e;
  --warn: #d65246;
  --bad: #dc2626;
  --amber: #b45309;
  --amber-rgb: 217, 119, 6;

  /* —— 渐变 —— */
  --grad-brand-cool: linear-gradient(135deg, var(--brand), var(--brand-2));
  --grad-brand-warm: linear-gradient(135deg, var(--brand), var(--brand-3));
  --grad-brand-soft: linear-gradient(135deg, var(--brand-deep), var(--brand-2));

  /* —— 阴影 —— */
  --shadow: 0 18px 48px -28px rgba(36, 49, 95, .32);
  --shadow-strong: 0 28px 64px -32px rgba(32, 45, 88, .4);
  --elev-card: 0 1px 2px rgba(23, 32, 68, .05), 0 14px 34px -18px rgba(66, 80, 158, .28);
  --elev-btn: 0 10px 22px -10px rgba(var(--brand-rgb), .55), 0 3px 8px -4px rgba(var(--brand-rgb), .35);
  --elev-btn-hover: 0 16px 32px -12px rgba(var(--brand-rgb), .65), 0 5px 12px -6px rgba(var(--brand-rgb), .4);
  --btn-sheen: inset 0 1px 0 rgba(255, 255, 255, .28);

  /* —— 圆角 —— */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-card: 1.15rem;
  --r-pill: 999px;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
}

*, *:before, *:after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  background:
    radial-gradient(circle at top left, rgba(var(--brand-rgb), .16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(var(--brand-2-rgb), .12), transparent 22%),
    radial-gradient(circle at 76% 78%, rgba(var(--brand-3-rgb), .1), transparent 20%),
    linear-gradient(180deg, var(--bg), var(--bg-soft) 46%, #f9fbff 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { display: block; max-width: 100%; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
code {
  padding: .08rem .4rem; border-radius: var(--r-sm);
  background: rgba(var(--brand-rgb), .08); color: #4550d8; font-size: .92em;
}
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.site-root { position: relative; min-height: 100vh; overflow-x: hidden; }

/* ---------------- 背景装饰层 ---------------- */
.landing-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.landing-bg-blob { position: absolute; border-radius: var(--r-pill); filter: blur(92px); opacity: .74; }
.landing-bg-blob--brand {
  top: -8%; left: -12%; width: min(72vw, 520px); height: min(72vw, 520px);
  background: radial-gradient(circle at 30% 30%, rgba(var(--brand-rgb), .44), transparent 62%);
}
.landing-bg-blob--cyan {
  right: -10%; bottom: 4%; width: min(62vw, 430px); height: min(62vw, 430px);
  background: radial-gradient(circle at 50% 50%, rgba(var(--brand-2-rgb), .34), transparent 64%);
}
.landing-bg-blob--coral {
  top: 38%; right: 16%; width: min(44vw, 300px); height: min(44vw, 300px);
  background: radial-gradient(circle at 50% 50%, rgba(var(--brand-3-rgb), .28), transparent 62%);
}
.landing-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(var(--brand-rgb), .05) 1px, transparent 0),
    linear-gradient(90deg, rgba(var(--brand-rgb), .05) 1px, transparent 0);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 82% 66% at 50% 34%, #000, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 66% at 50% 34%, #000, transparent 100%);
}

/* ---------------- 顶部导航 ---------------- */
.nav-root {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 251, 255, .82);
  border-bottom: 1px solid rgba(154, 169, 210, .22);
  box-shadow: inset 0 1px rgba(255, 255, 255, .7), 0 14px 34px -22px rgba(32, 45, 88, .35);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
}
.nav-inner {
  min-height: 4.25rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.nav-brand {
  display: flex; align-items: center; gap: .65rem; min-width: 0;
  padding: 4px 8px 4px 0; border-radius: var(--r-pill);
}
.nav-brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: var(--r-md);
  background: var(--grad-brand-cool); color: #fff;
  font-size: 17px; font-weight: 900; line-height: 1;
  outline: 1px solid rgba(162, 174, 227, .34);
  box-shadow: 0 10px 24px -18px rgba(var(--brand-rgb), .55);
}
.nav-brand-text { display: flex; flex-direction: column; min-width: 0; }
.nav-brand-name { font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.nav-brand-host { font-size: 12px; color: var(--text-faint); }
.nav-list { display: none; align-items: center; gap: .3rem; margin-left: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: var(--r-pill);
  color: #4b5874; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) {
  .nav-link:hover { background: rgba(var(--brand-rgb), .08); color: var(--brand); }
}
.nav-link.is-active {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .14), rgba(var(--brand-2-rgb), .1));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .12);
  color: #4449d5;
}
.nav-mobile-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px; border: 1px solid rgba(162, 174, 227, .32);
  border-radius: var(--r-md); background: rgba(255, 255, 255, .9);
  color: #42506d; box-shadow: 0 12px 22px -18px rgba(42, 55, 102, .42);
}
.nav-mobile-btn svg { width: 20px; height: 20px; }
.nav-drawer {
  display: none; background: rgba(250, 251, 255, .96);
  border-top: 1px solid rgba(162, 174, 227, .22); padding: 12px 16px;
}
.nav-drawer.is-open { display: grid; gap: .4rem; }

/* ---------------- 页面容器 & Hero ---------------- */
.page { position: relative; z-index: 1; padding: 2.1rem 0 5rem; }
.page-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .28em;
  text-transform: uppercase; color: var(--brand-deep);
}
.page-title {
  margin-top: .45rem; font-size: 1.9rem; font-weight: 800;
  line-height: 1.12; letter-spacing: -.03em; color: var(--text);
}
.page-lead { margin-top: .75rem; color: var(--text-soft); line-height: 1.7; font-size: .95rem; }

.wm-page { position: relative; z-index: 1; width: 100%; max-width: 430px; margin: 0 auto; padding: 0 .2rem 1rem; }
.wm-hero { text-align: center; margin-bottom: 1.1rem; }
.wm-hero .page-title { font-size: 1.7rem; }
.wm-hero .page-lead { margin-top: .55rem; font-size: .92rem; }
.wm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: .85rem; }
.wm-chips span {
  display: inline-flex; align-items: center;
  padding: .28rem .7rem; border-radius: var(--r-pill);
  background: rgba(var(--brand-rgb), .1); border: 1px solid rgba(var(--brand-rgb), .18);
  color: var(--brand-ink); font-size: 12px; font-weight: 800;
}

/* ---------------- 卡片 ---------------- */
.wm-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .91), rgba(248, 250, 255, .92));
  border: 1px solid rgba(162, 174, 227, .2);
  border-radius: var(--r-card);
  padding: .95rem 1rem; margin-bottom: .8rem;
  box-shadow: var(--elev-card);
  transition: box-shadow .25s, transform .25s;
}
.wm-head { display: flex; align-items: flex-start; gap: .7rem; text-align: left; color: inherit; }
.wm-num {
  flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand-cool); color: #fff;
  font-size: 14px; font-weight: 800; box-shadow: var(--elev-btn);
}
.wm-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.wm-head-text strong { font-size: .98rem; font-weight: 800; color: var(--text); line-height: 1.35; }
.wm-head-text em { font-style: normal; font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.wm-panel { margin-top: .85rem; }

/* 暖色说明块（对应参考站「为什么先做这步」） */
.wm-why {
  margin: 0 0 .9rem; padding: .7rem .8rem; border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(var(--brand-3-rgb), .12), rgba(255, 255, 255, .7));
  border: 1px dashed rgba(var(--brand-3-rgb), .35);
  color: #7a4b00; font-size: 13px; line-height: 1.65;
}
.wm-why b { color: var(--brand-ink); }
.wm-notice {
  margin: 0 0 .85rem; padding: .8rem .85rem; border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 244, 230, .92), rgba(255, 255, 255, .78));
  border: 1px solid rgba(226, 150, 60, .3);
  scroll-margin-top: 5rem;
}
.wm-notice strong { display: block; font-size: 12.5px; color: #7a4b00; margin-bottom: .4rem; }
/* 免责声明正文（用户提供的文案，逐段呈现） */
.wm-notice p { margin: 0 0 .5rem; font-size: 12px; line-height: 1.72; color: #7c6a4f; }
.wm-notice p b { color: var(--amber); font-weight: 800; }
.wm-notice p:last-child { margin-bottom: 0; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; min-width: 0; }
.field label, label.tiny {
  font-size: 12px; color: var(--text-faint); letter-spacing: .04em;
  margin-bottom: 6px; display: block; font-weight: 600;
}
input[type=text], input[type=tel], input[type=number], input[type=password], select, textarea {
  font: inherit; font-size: 14px; width: 100%;
  padding: 10px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--r-md); outline: none;
  background: rgba(255, 255, 255, .92); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-2); background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--brand-2-rgb), .18);
}
textarea {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  resize: vertical; min-height: 96px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, #8b97b0 50%),
                    linear-gradient(135deg, #8b97b0 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1 1 180px; }

/* 手机号输入（大号） */
#phone {
  height: 52px; font-size: 19px; font-weight: 800;
  letter-spacing: .12em; text-align: center;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .95);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: .68rem 1.2rem; border: 1px solid transparent;
  border-radius: var(--r-md); font-size: .95rem; font-weight: 800;
  background: #fff; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary, .btn-primary {
  background: var(--grad-brand-cool); color: #fff;
  box-shadow: var(--btn-sheen), var(--elev-btn); letter-spacing: .02em;
}
@media (hover: hover) {
  .btn.primary:hover:not(:disabled), .btn-primary:hover:not(:disabled) {
    box-shadow: var(--btn-sheen), var(--elev-btn-hover); transform: translateY(-1px);
  }
}
.btn.ghost {
  background: rgba(255, 255, 255, .85); color: #42506b;
  border-color: rgba(162, 174, 227, .34);
}
@media (hover: hover) {
  .btn.ghost:hover:not(:disabled) { background: rgba(var(--brand-rgb), .06); border-color: rgba(var(--brand-rgb), .3); color: var(--brand-ink); }
}
.btn.small { padding: 0 12px; min-height: 34px; font-size: 13px; border-radius: var(--r-sm); }
.btn.danger {
  background: rgba(var(--brand-3-rgb), .1); color: var(--warn);
  border-color: rgba(var(--brand-3-rgb), .3);
}
@media (hover: hover) {
  .btn.danger:hover:not(:disabled) { background: rgba(var(--brand-3-rgb), .18); }
}
.btn-block { width: 100%; }

/* ---------------- 状态文案（hint） ---------------- */
.hint {
  display: block; margin: .7rem 0 0; min-height: 20px;
  font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  text-align: center;
}
.hint:empty { display: none; }
.hint.bad { color: var(--bad); }
.hint.ok { color: var(--ok-ink); }

/* ---------------- 汇总 / 进度 ---------------- */
.summary { display: block; margin-bottom: .8rem; }
/* 进行中：白卡 + 计数 + 进度条 */
.sum-run {
  padding: 1rem 1.05rem .9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .91), rgba(248, 250, 255, .92));
  border: 1px solid rgba(162, 174, 227, .2);
  border-radius: var(--r-card); box-shadow: var(--elev-card);
}
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.sum-item {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .5rem .3rem; border-radius: var(--r-md); background: rgba(246, 249, 255, .8);
}
.sum-item .k { font-size: 11px; color: var(--text-faint); font-weight: 700; }
.sum-item b { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.sum-item b.ok { color: var(--ok-ink); }
.sum-item b.bad { color: var(--bad); }
.sum-item b.run { color: var(--amber); }
.progress { height: .42rem; border-radius: var(--r-pill); background: rgba(162, 174, 227, .22); margin: .85rem 0 .5rem; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-brand-cool); transition: width .45s ease; }
.sum-text { margin: 0; font-size: 12.5px; color: var(--text-soft); text-align: center; }

/* ---------------- 领取成功：结果卡 ----------------
   版式取自 tk.xllo.cn/txdc：深绿渐变底 + 绿色粗体总张数 + 「· 券名 ×N」列表。
   标题的 N 是券总张数（Σ 各渠道券包张数），列表的 ×N 是命中该券名的渠道数。
   ------------------------------------------------ */
/* 成功结果卡 —— 版式取自参考站 tk.xllo.cn/txdc 的 .summary（内边距 16px / 圆角 14px
   / 标题 22px + 字重 700 + 下间距 8px / 列表 14px + padding 3px 0 / 失败区 13px + 上间距 10px），
   配色改成**本站 UI 色系**（2026-10-15 用户要求「黑色背景渲染成网页页面的 ui 颜色」）：
   白→淡蓝紫卡面 + 品牌描边 + 青绿成功色标题 + 深色正文，与浅色蓝紫主题统一。
   参考站那套深绿黑底（#16251a）与本站主题冲突，已弃用；键名/尺寸保持不变。 */
.sum-ok {
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
  border: 1px solid rgba(var(--brand-rgb), .18);
  border-radius: 14px;
  box-shadow: 0 12px 26px -20px rgba(var(--brand-rgb), .55);
}
.so-head {
  display: flex; align-items: center; gap: .45rem;
  font-size: 22px; font-weight: 700; line-height: 1.3;
  color: var(--ok); margin-bottom: 8px;
}
/* 勾选图标不额外缩放：参考站里它就在 .big 文本内，与标题同字号 */
.so-head .so-ico { line-height: 1; flex: 0 0 auto; }
.so-list { margin: 0; padding-left: 2px; list-style: none; }
.so-list li { font-size: 14px; padding: 3px 0; color: var(--text-soft); line-height: 1.45; }
.so-list li b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.so-fails {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px; color: #b45309;
}
.so-fails div { padding: 2px 0; }
.so-fails b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- 结果：票券式行 ---------------- */
.grid { display: grid; gap: .55rem; }
.grid:empty { display: none; }
.card {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .75rem; border-radius: var(--r-md);
  background: #fff; border: 1px solid rgba(15, 23, 42, .07);
  box-shadow: 0 3px 10px rgba(36, 49, 95, .06);
  transition: border-color .2s, box-shadow .2s, opacity .2s;
  animation: card-in .32s ease both;
}
@keyframes card-in { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
.card-idx {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #8f94f8, var(--brand));
  box-shadow: 0 3px 8px -3px rgba(var(--brand-rgb), .5);
}
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.card-top { display: flex; align-items: center; gap: .4rem; }
.card .code {
  font-size: 13.5px; font-weight: 800; color: #1e293b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-body { display: flex; align-items: flex-start; gap: .35rem; }
.card-body .msg { font-size: 12px; color: var(--text-soft); word-break: break-all; line-height: 1.5; }
.card-foot { display: flex; }
.card-foot .meta { font-size: 11px; color: var(--text-faint); }
.card-foot .meta:empty { display: none; }
.dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); margin-top: 6px; }
.badge {
  flex: 0 0 auto; padding: .18rem .5rem; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: rgba(147, 162, 201, .16); color: var(--text-faint);
}
.card.idle { opacity: .92; }
.card.ok { border-color: rgba(var(--ok-rgb), .34); background: linear-gradient(180deg, #f2fdfb, #fff); }
.card.ok .card-idx { background: linear-gradient(135deg, #34d399, var(--ok)); box-shadow: 0 3px 8px -3px rgba(20, 147, 164, .5); }
.card.ok .badge { background: rgba(var(--ok-rgb), .16); color: var(--ok-ink); }
.card.ok .dot { background: var(--ok); }
.card.bad { border-color: rgba(var(--brand-3-rgb), .38); background: linear-gradient(180deg, #fff5f3, #fff); }
.card.bad .card-idx { background: linear-gradient(135deg, #f87171, var(--bad)); box-shadow: 0 3px 8px -3px rgba(220, 38, 38, .45); }
.card.bad .badge { background: rgba(var(--brand-3-rgb), .18); color: var(--warn); }
.card.bad .dot { background: var(--bad); }
.card.run { border-color: rgba(var(--amber-rgb), .38); background: linear-gradient(180deg, #fffbeb, #fff); }
.card.run .card-idx { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 3px 8px -3px rgba(217, 119, 6, .45); }
.card.run .badge { background: rgba(var(--amber-rgb), .16); color: var(--amber); }
.card.run .dot { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }

/* ---------------- 页脚 ---------------- */
.foot {
  position: relative; z-index: 1;
  margin: 1.4rem auto 0; max-width: 430px;
  padding: 0 1rem 1.5rem; text-align: center;
  font-size: 12px; line-height: 1.7; color: var(--text-faint);
}
.foot a { color: var(--brand-ink); font-weight: 700; }

/* ============================================================
   后台
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 251, 255, .82);
  border-bottom: 1px solid rgba(154, 169, 210, .22);
  box-shadow: inset 0 1px rgba(255, 255, 255, .7), 0 14px 34px -22px rgba(32, 45, 88, .35);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px; min-height: 4.25rem;
  display: flex; align-items: center; gap: 18px;
}
.topbar .logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 15px; color: var(--text); white-space: nowrap;
}
.topbar .logo:before {
  content: "券"; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--grad-brand-cool); color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: 0 8px 18px -12px rgba(var(--brand-rgb), .6);
}
.tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
  color: #4b5874; cursor: pointer; border: 0; background: transparent;
  white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s;
}
@media (hover: hover) { .tab:hover { background: rgba(var(--brand-rgb), .08); color: var(--brand); } }
.tab.active {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-2-rgb), .12));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .14);
  color: #4449d5;
}

body.page-admin .container { max-width: 1180px; margin: 0 auto; padding: 1.5rem 20px 5rem; }
.view { display: none; }
.view.active { display: block; }

.advice {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px;
  padding: 13px 16px; border-radius: var(--r-lg); font-size: 13.5px; line-height: 1.65;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); box-shadow: var(--elev-card);
}
.advice .ic {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 800;
}
.advice.info { border-color: rgba(var(--brand-rgb), .22); background: linear-gradient(180deg, rgba(var(--brand-rgb), .07), rgba(255, 255, 255, .85)); }
.advice.info .ic { background: var(--brand); }
.advice.ok { border-color: rgba(var(--brand-2-rgb), .3); background: linear-gradient(180deg, rgba(var(--brand-2-rgb), .1), rgba(255, 255, 255, .85)); }
.advice.ok .ic { background: var(--ok); }
.advice.warn { border-color: rgba(226, 150, 60, .38); background: linear-gradient(180deg, rgba(255, 244, 230, .92), rgba(255, 255, 255, .8)); }
.advice.warn .ic { background: #d97706; }
.advice b { font-weight: 800; color: var(--text); }

.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  background: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(248, 250, 255, .92));
  border: 1px solid rgba(162, 174, 227, .2);
  border-radius: var(--r-lg); padding: 15px 17px; box-shadow: var(--elev-card);
}
.stat .k { font-size: 12px; color: var(--text-faint); font-weight: 700; }
.stat .v { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; color: var(--text); }
.stat .v.ok { color: var(--ok-ink); }
.stat .v.bad { color: var(--bad); }

.block {
  background: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(248, 250, 255, .92));
  border: 1px solid rgba(162, 174, 227, .2);
  border-radius: var(--r-card); box-shadow: var(--elev-card);
  margin-top: 16px; overflow: hidden;
}
.block > h3 {
  margin: 0; padding: 14px 18px; font-size: 14.5px; font-weight: 800; color: var(--text);
  border-bottom: 1px solid rgba(162, 174, 227, .18);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.block > h3 .sp { flex: 1; }
.block .body { padding: 16px 18px; }
.block .body.tight { padding: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 18px; text-align: left; border-bottom: 1px solid rgba(162, 174, 227, .16); white-space: nowrap; }
th {
  font-weight: 800; color: var(--text-faint); font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(246, 249, 255, .8);
}
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(var(--brand-rgb), .035); }
td.wrap-cell { white-space: normal; max-width: 320px; word-break: break-all; }

/* 链接表内联编辑（券名 / 券包张数） */
.cell-in {
  width: 100%; min-width: 7rem; padding: .32rem .5rem;
  font-size: 12.5px; font-family: inherit; color: var(--text);
  border-radius: var(--r-sm); border: 1px solid rgba(147, 162, 201, .32);
  background: rgba(255, 255, 255, .88);
}
.cell-in:focus { outline: none; border-color: var(--brand); background: #fff; }
.cell-in.is-dirty { border-color: var(--brand); background: rgba(var(--brand-rgb), .07); }
.cell-in.is-saved { border-color: rgba(var(--ok-rgb), .55); background: rgba(var(--ok-rgb), .08); }
.cell-num { min-width: 0; width: 3.6rem; text-align: center; font-variant-numeric: tabular-nums; }
th.th-narrow, td.th-narrow { padding-left: 8px; padding-right: 8px; }

.pill {
  display: inline-block; padding: .2rem .55rem; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800;
  background: rgba(147, 162, 201, .16); color: var(--text-soft);
}
.pill.ok { background: rgba(var(--ok-rgb), .16); color: var(--ok-ink); }
.pill.bad { background: rgba(var(--brand-3-rgb), .18); color: var(--warn); }
.pill.run { background: rgba(var(--amber-rgb), .16); color: var(--amber); }

.muted { color: var(--text-faint); font-size: 12px; }
.empty { padding: 34px; text-align: center; color: var(--text-faint); font-size: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pager {
  display: flex; gap: 8px; align-items: center; padding: 12px 18px;
  border-top: 1px solid rgba(162, 174, 227, .18); font-size: 13px; color: var(--text-soft);
}

.bars { display: flex; align-items: flex-end; gap: 8px; height: 148px; padding: 8px 0 0; overflow-x: auto; }
.bars .col { flex: 0 0 auto; width: 26px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars .bar {
  width: 100%; background: rgba(162, 174, 227, .2);
  border-radius: 5px 5px 0 0; display: flex; flex-direction: column-reverse;
  overflow: hidden; min-height: 3px;
}
.bars .bar i { display: block; width: 100%; }
.bars .bar i.s { background: var(--grad-brand-cool); }
.bars .bar i.f { background: linear-gradient(180deg, #fca5a5, #f87171); }
.bars .lbl { font-size: 10px; color: var(--text-faint); margin-top: 6px; white-space: nowrap; }
.bars-empty { padding: 40px 0; text-align: center; color: var(--text-faint); font-size: 13px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-soft); padding-top: 4px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 1.1rem;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.modal {
  position: relative; width: 100%; max-width: 400px; max-height: 86vh; overflow: auto;
  padding: 1.25rem 1.15rem 1.05rem; border-radius: var(--r-card);
  background: linear-gradient(180deg, #fff, #f7faff);
  border: 1px solid rgba(162, 174, 227, .4);
  box-shadow: 0 28px 64px -28px rgba(32, 45, 88, .55);
}
.modal h2 { margin: 0 0 14px; font-size: 1.12rem; font-weight: 800; color: var(--brand-ink); }

/* 弹窗内的免责声明（可滚动正文 + 勾选同意） */
.modal-doc { display: flex; flex-direction: column; max-width: 420px; max-height: 86vh; overflow: hidden; }
.modal-badge {
  display: inline-block; align-self: flex-start; margin-bottom: .55rem;
  padding: .2rem .55rem; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
  color: var(--amber); background: rgba(var(--amber-rgb), .14);
  border: 1px solid rgba(var(--amber-rgb), .3);
}
.modal-doc h2 { margin: 0 0 .55rem; }
.modal-body { overflow: auto; padding-right: .2rem; }
.modal-body p {
  margin: 0 0 .55rem; font-size: 12.5px; line-height: 1.75; color: var(--text-soft);
}
.modal-body p:last-child { margin-bottom: 0; }
.modal-body b { color: var(--text); font-weight: 800; }
.consent {
  display: flex; align-items: flex-start; gap: .5rem;
  margin-top: .85rem; padding: .7rem .75rem; border-radius: var(--r-md);
  background: rgba(255, 244, 230, .75); border: 1px solid rgba(226, 150, 60, .3);
  cursor: pointer;
}
.consent input {
  flex: 0 0 auto; width: 16px; height: 16px; margin: .12rem 0 0;
  accent-color: var(--brand); cursor: pointer;
}
.consent span { font-size: 12px; line-height: 1.6; color: #7c6a4f; }
.consent b { color: var(--amber); font-weight: 800; }
.modal-actions { display: flex; gap: .6rem; margin-top: .9rem; flex: 0 0 auto; }
.modal-actions .btn { flex: 1; min-height: 44px; border-radius: var(--r-pill); }
body.modal-open { overflow: hidden; }

/* ============================================================
   后台登录页 · 版式复刻自参考源码 deploy-fixed-20260825
   （public/admin-login.html + styles.css 1288-1507 行实测值）
   注：参考站 .login-hero 为 display:none，故此处也不渲染标题与描述
   ============================================================ */
.login-page {
  --lg-primary: #4f46e5;
  --lg-primary-soft: #eef2ff;
  --lg-ink: #334155;
  --lg-text: #0f172a;
  --lg-muted: #64748b;
  --lg-line: #e2e8f0;

  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    linear-gradient(150deg,
      rgba(79, 70, 229, .96) 0%,
      rgba(99, 102, 241, .94) 34%,
      rgba(139, 92, 246, .9) 64%,
      rgba(241, 245, 249, .96) 100%);
  background-attachment: fixed;
}

.login-card {
  width: min(100%, 380px);
  margin: 0;
  padding: 34px 34px 24px;
  background: #fff;
  color: var(--lg-text);
  border: 1px solid rgba(226, 232, 240, .88);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(20, 26, 45, .18);
}

.login-brand {
  display: grid; justify-items: center; gap: 6px;
  margin-bottom: 22px; text-align: center;
}
.login-logo {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--lg-primary), #6366f1);
  color: #fff; font-size: 26px; font-weight: 900;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .32);
}
.login-name { color: var(--lg-text); font-size: 19px; font-weight: 800; line-height: 1.5; }

/* 字段：显式覆盖全局 .field / .field label 与 input[...] 的基础样式 */
.login-page .field { display: block; margin-bottom: 14px; }
.login-page .field-label {
  display: block; margin-bottom: 7px;
  color: var(--lg-ink); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0; line-height: 1.5;
}
.login-page .input,
.login-page input[type=text],
.login-page input[type=password] {
  width: 100%; min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--lg-line); border-radius: 10px;
  background: #fff; color: var(--lg-text);
  font: inherit; font-size: 14px;
}
.login-page .input:focus,
.login-page input[type=text]:focus,
.login-page input[type=password]:focus {
  border-color: var(--lg-primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .16), 0 1px 2px rgba(15, 23, 42, .06);
}

/* 密码显隐：眼睛图标用 SVG mask，与参考站一致（睁眼 / 划线眼两态） */
.password-wrap { position: relative; }
/* 右侧给眼睛图标留位。必须带 .login-page 前缀压过上面的
   `.login-page input[type=password]`（属性选择器权重 0,2,1 > 0,2,0），
   否则长密码文字会被图标盖住。参考站实测：padding 9px 46px 9px 12px */
.login-page .password-wrap .input,
.login-page .password-wrap input[type=password] { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--lg-muted); cursor: pointer;
}
.pw-toggle::before {
  content: ""; display: block; width: 18px; height: 18px; margin: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pw-toggle.is-visible::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c6.5 0 10 7 10 7a13.16 13.16 0 0 1-2.12 3.08'/%3E%3Cpath d='M6.61 6.61C3.65 8.54 2 12 2 12s3.5 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/%3E%3Cpath d='M14.12 14.12A3 3 0 0 1 9.88 9.88'/%3E%3Cpath d='M2 2l20 20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c6.5 0 10 7 10 7a13.16 13.16 0 0 1-2.12 3.08'/%3E%3Cpath d='M6.61 6.61C3.65 8.54 2 12 2 12s3.5 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/%3E%3Cpath d='M14.12 14.12A3 3 0 0 1 9.88 9.88'/%3E%3Cpath d='M2 2l20 20'/%3E%3C/svg%3E");
}
@media (hover: hover) {
  .pw-toggle:hover { background: var(--lg-primary-soft); color: var(--lg-primary); }
}

/* 错误条 */
.login-err {
  margin: 0 0 14px; padding: 9px 12px;
  border: 1px solid #fecaca; border-radius: 9px;
  background: #fef2f2; color: #dc2626;
  font-size: 12.5px; font-weight: 400;
}

/* 提交按钮 */
.login-submit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 43px; margin-top: 4px; padding: 11px 16px;
  border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--lg-primary), #6366f1);
  color: #fff; font-family: inherit; font-size: 14px; font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(79, 70, 229, .24);
  transition: filter .15s ease, transform .15s ease;
}
@media (hover: hover) { .login-submit:hover:not(:disabled) { filter: brightness(1.06); } }
.login-submit:active:not(:disabled) { transform: translateY(1px); }
.login-submit:disabled { opacity: .72; cursor: not-allowed; }

@media (max-width: 480px) {
  .login-page { padding: 18px; }
  .login-card { padding: 30px 24px 22px; }
}

/* ---------------- 响应式 ---------------- */
@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
  .page { padding: 2.75rem 0 6rem; }
  .page-title { font-size: 2.3rem; }
  .wm-page { padding-top: .2rem; }
  .wm-hero .page-title { font-size: 1.9rem; }
  .block > h3 { padding: 15px 20px; }
}
@media (min-width: 960px) {
  .nav-list { display: inline-flex; }
  .nav-mobile-btn { display: none; }
}
@media (max-width: 768px) {
  /* 后台顶栏在窄屏固定成两行：第一行品牌 + 前台入口，第二行标签 */
  .topbar-inner { flex-wrap: wrap; padding: 8px 12px; gap: 6px; min-height: 0; }
  .topbar .logo { font-size: 14px; }
  .topbar .logo:before { width: 28px; height: 28px; font-size: 13px; }
  .topbar-inner > .muted { margin-left: auto; }
  .tabs { order: 3; flex: 1 1 100%; margin-left: 0; }
  .tab { padding: 6px 10px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  .page { padding: 1.5rem 0 4rem; }
  th, td { padding: 9px 12px; }
  .block .body { padding: 14px 14px; }
  .bars .col { width: 22px; }
  body.page-admin .container { padding: 1.1rem 12px 4rem; }
  .cards-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 420px) {
  .wm-head-text strong { font-size: .92rem; }
  .sum-grid { gap: .35rem; }
  .sum-item b { font-size: 1.15rem; }
  #phone { font-size: 17px; }
  .page-title { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
