/* ==========================================================================
   鹿窝音游窝 · 计费中心
   深色霓虹 / 音游质感。除系统字体外不依赖任何外部资源。
   ========================================================================== */

:root {
  --bg: #06060c;
  --bg-soft: #0b0b16;
  --panel: rgba(23, 22, 38, 0.72);
  --panel-solid: #14131f;
  --line: rgba(140, 150, 255, 0.14);
  --line-strong: rgba(140, 150, 255, 0.32);
  --ink: #eceaff;
  --muted: #8d8ca8;
  --cyan: #45f0ff;
  --violet: #9b6bff;
  --pink: #ff5fa2;
  --gold: #ffd257;
  --green: #4ee39b;
  --red: #ff6b7d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --font: -apple-system, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(155, 107, 255, 0.22), transparent 65%),
    radial-gradient(900px 600px at 92% 8%, rgba(69, 240, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #06060c, #0a0a14 40%, #06060c);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: 0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- 背景舞台 */
.stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(140, 150, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 150, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(58deg) translateY(14%);
  mask-image: linear-gradient(to bottom, transparent 24%, #000 72%, transparent 100%);
}

.glow {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.glow-a { left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(155, 107, 255, 0.7), transparent 70%); }
.glow-b { right: -14vw; bottom: -18vw; background: radial-gradient(circle, rgba(69, 240, 255, 0.5), transparent 70%); }

.eq {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26vh;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 2vw;
  opacity: 0.5;
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
}
.eq span {
  flex: 1;
  min-width: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, rgba(69, 240, 255, 0.05), var(--violet) 55%, var(--cyan));
  animation: bounce 1.6s ease-in-out infinite alternate;
  transform-origin: bottom;
}
@keyframes bounce {
  from { height: 6%; opacity: 0.35; }
  to   { height: 78%; opacity: 0.95; }
}

.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------------------------------------------------------------- 布局 */
.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.screen-auth {
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

/* ---------------------------------------------------------------- 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
  background: linear-gradient(140deg, rgba(155, 107, 255, 0.35), rgba(69, 240, 255, 0.22));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px -6px rgba(155, 107, 255, 0.8);
}
.brand h1 { font-size: 16px; }
.brand p {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.brand-lg { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.brand-lg .brand-mark { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; }
.brand-lg h1 { font-size: 26px; }
.brand-lg p { font-size: 11px; }

/* ---------------------------------------------------------------- 登录卡 */
.auth-card {
  width: min(430px, 100%);
  padding: 34px 32px 26px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(30, 28, 50, 0.92), rgba(12, 12, 22, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.18s;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-tab.is-active {
  color: #0a0a14;
  font-weight: 700;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  box-shadow: 0 6px 20px -8px var(--violet);
}

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(8, 8, 16, 0.7);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: 0.18s;
}
.field input::placeholder { color: #5c5b72; }
.field input:focus {
  border-color: rgba(69, 240, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(69, 240, 255, 0.12);
}

.form-error {
  margin: -4px 0 14px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #ffb3bd;
  background: rgba(255, 107, 125, 0.12);
  border: 1px solid rgba(255, 107, 125, 0.35);
  border-radius: 10px;
}

.auth-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.auth-hint code {
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  background: rgba(69, 240, 255, 0.1);
  border-radius: 6px;
}
.auth-mail-note {
  margin-top: 10px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
  color: #b9b7d4;
  background: rgba(155, 107, 255, 0.09);
  border: 1px dashed rgba(155, 107, 255, 0.35);
  border-radius: 10px;
}

/* 邮箱验证码行 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; letter-spacing: 0.28em; font-variant-numeric: tabular-nums; }
.btn-code {
  flex: none;
  min-width: 118px;
  font-size: 12.5px;
  border-radius: 11px;
}
.btn-code:disabled { opacity: 0.6; }
.field-hint {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}
.field-hint.is-ok { color: var(--green); }
.field-hint.is-bad { color: #ffb3bd; }
.link {
  padding: 0;
  margin-left: 6px;
  font: inherit;
  font-size: 12px;
  color: var(--cyan);
  background: none;
  border: 0;
  border-bottom: 1px dashed rgba(69, 240, 255, 0.5);
  cursor: pointer;
}
.link:hover { color: #fff; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.18s, background 0.18s, opacity 0.18s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #07070d;
  border-color: transparent;
  background: linear-gradient(120deg, var(--cyan), #7ee7ff 35%, var(--violet));
  box-shadow: 0 10px 30px -14px rgba(69, 240, 255, 0.9);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }

.btn-block { width: 100%; padding: 13px 18px; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(8, 8, 15, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topnav { display: flex; gap: 4px; margin-right: auto; }
.topnav a {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 9px;
  transition: 0.16s;
}
.topnav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.topnav a.is-active {
  color: var(--cyan);
  background: rgba(69, 240, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(69, 240, 255, 0.25);
}

.userbox { display: flex; align-items: center; gap: 10px; }
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #07070d;
  background: linear-gradient(140deg, var(--gold), var(--pink));
}
.userbox-text { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.userbox-text strong { font-size: 13px; }

.tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 210, 87, 0.12);
  border: 1px solid rgba(255, 210, 87, 0.32);
  white-space: nowrap;
}
.tag-dim { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.tag-cyan { color: var(--cyan); background: rgba(69, 240, 255, 0.1); border-color: rgba(69, 240, 255, 0.3); }
.tag-green { color: var(--green); background: rgba(78, 227, 155, 0.12); border-color: rgba(78, 227, 155, 0.3); }
.tag-red { color: var(--red); background: rgba(255, 107, 125, 0.12); border-color: rgba(255, 107, 125, 0.3); }

/* ---------------------------------------------------------------- 主体 */
.main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 44px) 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 概览 */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  position: relative;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(28, 26, 48, 0.85), rgba(12, 12, 21, 0.9));
  border: 1px solid var(--line);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.7;
}
.stat-vip::after { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.stat-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-value small { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-value.is-sm { font-size: 21px; }
.stat-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* 两栏 */
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.panel {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 15px; letter-spacing: 0.06em; }

/* 分段控件 */
.seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.seg-btn {
  padding: 7px 13px;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active {
  color: #07070d;
  font-weight: 700;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
}
.seg-sm .seg-btn { padding: 6px 11px; font-size: 12px; }

/* 套餐卡 */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 16px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.18s;
  overflow: hidden;
}
.plan:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}
.plan.is-selected {
  border-color: rgba(69, 240, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(69, 240, 255, 0.4), 0 18px 40px -22px rgba(69, 240, 255, 0.9);
  background: linear-gradient(165deg, rgba(69, 240, 255, 0.12), rgba(155, 107, 255, 0.07));
}
.plan.is-selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  color: var(--cyan);
}

.plan-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0a0a14;
  background: linear-gradient(100deg, var(--gold), #ffb257);
  border-bottom-right-radius: 10px;
}
.plan-name { margin-top: 6px; font-size: 14px; font-weight: 700; }
.plan-badge + .plan-name { margin-top: 12px; }
.plan-price {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan-coins { font-size: 12px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.plan-coins em { font-style: normal; color: var(--gold); }
.plan-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* 结算栏 */
.panel-checkout { position: sticky; top: 84px; }
.checkout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty-icon { font-size: 26px; opacity: 0.8; }

.checkout-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 15px;
}

.kv { margin: 0 0 14px; display: flex; flex-direction: column; gap: 9px; }
.kv > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.kv-lg dd { font-size: 13.5px; }
.kv .price { color: var(--gold); font-size: 18px; }
.mono { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.checkout-note {
  margin-bottom: 14px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #b9b7d4;
  background: rgba(155, 107, 255, 0.08);
  border-left: 2px solid var(--violet);
  border-radius: 0 8px 8px 0;
}

.order-recent { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.order-recent-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.order-recent-head h3 { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.order-item small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.order-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }

/* 账单 */
.ledger-tools { display: flex; align-items: center; gap: 10px; }
.table-wrap { overflow-x: auto; }

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.ledger th {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ledger td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(140, 150, 255, 0.07);
  white-space: nowrap;
}
.ledger tbody tr { transition: background 0.16s; }
.ledger tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.ledger .num { text-align: right; }
.ledger .pos { color: var(--green); }
.ledger .neg { color: var(--pink); }
.ledger .dim { color: var(--muted); }
.ledger-empty { padding: 26px 0; text-align: center; font-size: 12.5px; color: var(--muted); }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.foot { padding: 18px 4px 0; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.foot-dim { opacity: 0.65; }

/* ---------------------------------------------------------------- 弹窗 */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 8, 0.72);
  backdrop-filter: blur(6px);
  animation: fade 0.2s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: min(440px, 100%);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(30, 28, 52, 0.98), rgba(10, 10, 18, 0.99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(69, 240, 255, 0.12);
  animation: pop 0.26s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  overflow: hidden;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 15px; }
.btn-close {
  width: 30px;
  height: 30px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.btn-close:hover { color: var(--ink); }

.modal-body { padding: 18px 20px 6px; }
.pay-channel-label { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.channel {
  padding: 11px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.16s;
}
.channel:hover { color: var(--ink); border-color: var(--line-strong); }
.channel.is-selected {
  color: var(--cyan);
  border-color: rgba(69, 240, 255, 0.55);
  background: rgba(69, 240, 255, 0.1);
}

.pay-timer {
  margin: 14px 0 4px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.pay-timer span { color: var(--gold); font-family: var(--mono); font-size: 12.5px; }

.modal-foot {
  display: flex;
  gap: 10px;
  padding: 16px 20px 20px;
}
.modal-foot .btn { flex: 1; }
.btn-pay { flex: 1.4 !important; }

/* ---------------------------------------------------------------- 吐司 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 80;
  transform: translateX(-50%);
  padding: 12px 20px;
  font-size: 13px;
  border-radius: 12px;
  color: #07070d;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  box-shadow: 0 18px 40px -18px rgba(69, 240, 255, 0.9);
  animation: toastIn 0.24s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  max-width: min(420px, calc(100vw - 32px));
  text-align: center;
}
.toast.is-error { color: #2a0710; background: linear-gradient(120deg, #ff8ea0, #ff5f7d); }
.toast.is-success { color: #04220f; background: linear-gradient(120deg, #7dffb8, #34e08b); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .columns { grid-template-columns: 1fr; }
  .panel-checkout { position: static; }
}

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .topbar { gap: 14px; }
  .userbox-text { display: none; }
  .stat-value { font-size: 26px; }
  .plan-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ledger th:nth-child(5), .ledger td:nth-child(5) { display: none; }
  .channel-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   登录方式切换 / 忘记密码 / 账户设置
   ========================================================================== */

.auth-methods {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.method {
  flex: 1;
  padding: 7px 0;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.16s;
}
.method:hover { color: var(--ink); }
.method.is-active {
  color: var(--cyan);
  background: rgba(69, 240, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(69, 240, 255, 0.24);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: -6px 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.auth-links .link { margin-left: 0; }

.modal-card.is-wide { width: min(560px, 100%); }
.modal-note {
  margin: 0 0 14px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #b9b7d4;
  background: rgba(155, 107, 255, 0.08);
  border-left: 2px solid var(--violet);
  border-radius: 0 8px 8px 0;
}

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.acc-row dt { color: var(--muted); }
.acc-row dd { margin: 0; font-weight: 600; }

/* 表单补充：select / textarea / 数字 */
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(8, 8, 16, 0.7);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: 0.18s;
}
.field select:focus,
.field textarea:focus {
  border-color: rgba(69, 240, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(69, 240, 255, 0.12);
}
.field input[type="number"] { font-variant-numeric: tabular-nums; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==========================================================================
   管理后台
   ========================================================================== */

.admin-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.side {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.side-title {
  margin: 2px 4px 8px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.side-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.16s;
}
.side-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.side-btn.is-active {
  color: #07070d;
  font-weight: 700;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  box-shadow: 0 10px 26px -14px var(--violet);
}
.side-foot {
  margin-top: 8px;
  padding-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.admin-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.admin-view { display: flex; flex-direction: column; gap: 16px; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}
.mini-stat {
  padding: 15px 16px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(28, 26, 48, 0.8), rgba(12, 12, 21, 0.86));
  border: 1px solid var(--line);
}
.mini-stat p:first-child { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.mini-stat strong small { margin-left: 3px; font-size: 11.5px; font-weight: 500; color: var(--muted); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar .search {
  flex: 1;
  min-width: 180px;
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: rgba(8, 8, 16, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.toolbar .search:focus { border-color: rgba(69, 240, 255, 0.55); }
.toolbar-tip { font-size: 11.5px; color: var(--muted); }

.row-actions { display: flex; gap: 6px; }
.btn-xs {
  padding: 5px 9px;
  font: inherit;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
}
.btn-xs:hover { color: var(--ink); border-color: var(--line-strong); }
.btn-xs.is-danger { color: #ffb3bd; }
.btn-xs.is-danger:hover { color: #fff; background: rgba(255, 107, 125, 0.18); }
.btn-xs.is-good { color: var(--green); }

.logs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.log-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.log-item strong { font-weight: 600; }
.log-item span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.log-empty { padding: 16px 0; text-align: center; font-size: 12px; color: var(--muted); }

/* 开关 */
.switch { display: flex; align-items: center; gap: 10px; font-size: 12.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: 0.18s;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8d8ca8;
  transition: 0.18s;
}
.switch input:checked + .track {
  background: linear-gradient(120deg, rgba(69, 240, 255, 0.55), rgba(155, 107, 255, 0.55));
  border-color: rgba(69, 240, 255, 0.5);
}
.switch input:checked + .track::after { left: 20px; background: #07070d; }
.switch span.label { color: var(--ink); }
.switch small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

/* 设置分区 */
.settings-block {
  padding: 16px 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
}
.settings-block > h3 {
  margin-bottom: 4px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
}
.settings-block > p.hint { margin-bottom: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.65; }

.toggle-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.plan-tag-off { color: var(--muted); }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-title, .side-foot { display: none; }
  .side-btn { flex: 1; justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   支付返回页 / 后台支付设置
   ========================================================================== */
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
.receipt {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 12, 24, 0.6);
}
.receipt > div { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.receipt span { color: var(--muted); }
.receipt b { font-weight: 600; text-align: right; word-break: break-all; }
.foot-note { margin-top: 16px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.pay-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--line-strong);
}
.pay-state.is-ok { color: var(--green); border-color: rgba(78, 227, 155, 0.4); }
.pay-state.is-off { color: var(--muted); }
.check-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 12, 24, 0.5);
  font-size: 13px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ 开门计费 */
.panel-door { position: relative; overflow: hidden; }
.panel-door::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(69, 240, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.door-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  gap: 20px;
  align-items: start;
}

.door-main { min-width: 0; }

.door-clock {
  margin: 0;
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--cyan);
  text-shadow: 0 0 26px rgba(69, 240, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.door-sub {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.door-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.door-actions .btn { flex: 0 0 auto; }
.door-station { margin: 0; min-width: 140px; }
.door-station select { font-size: 13px; }

.door-rules {
  margin: 0;
  padding: 14px 16px 14px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 12, 24, 0.55);
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.door-rules b { color: var(--ink); font-weight: 600; }
.door-rules li::marker { color: var(--violet); }

.door-list {
  position: relative;
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.door-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 12, 24, 0.45);
  font-size: 12.5px;
}
.door-item-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; min-width: 0; }
.door-item-main strong { font-weight: 600; font-size: 13px; }
.door-item-main .dim { font-size: 11.5px; color: var(--muted); }
.door-item-side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.door-item-side .neg { color: var(--pink); }
.door-item-side .dim { color: var(--muted); }

.door-admin-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}

@media (max-width: 860px) {
  .door-body { grid-template-columns: minmax(0, 1fr); }
  .door-clock { font-size: 30px; }
}
