/* =========================================================================
   青云中转站 · 全站样式（无构建、无外部依赖）
   ========================================================================= */
:root {
  --bg: #060b14;
  --bg-soft: #0a1220;
  --panel: rgba(17, 27, 45, 0.72);
  --panel-solid: #111b2d;
  --panel-2: rgba(23, 35, 56, 0.62);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(45, 212, 191, 0.35);
  --text: #e8eefb;
  --muted: #94a6bf;
  --dim: #6b7d96;
  --accent: #2dd4bf;
  --accent-2: #34d399;
  --accent-3: #38bdf8;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(800px 500px at 88% 4%, rgba(56, 189, 248, 0.12), transparent 62%),
    radial-gradient(700px 600px at 50% 100%, rgba(52, 211, 153, 0.08), transparent 65%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, #000 30%, transparent 78%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex: none; cursor: pointer;
  border-radius: 4px; border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(7, 13, 24, 0.7);
  display: inline-grid; place-content: center;
  transition: background 0.15s, border-color 0.15s;
}
input[type="checkbox"]::before {
  content: ""; width: 9px; height: 9px; transform: scale(0);
  background: #04120f;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transition: transform 0.12s ease;
}
input[type="checkbox"]:checked { background: linear-gradient(135deg, #2dd4bf, #22c55e); border-color: transparent; }
input[type="checkbox"]:checked::before { transform: scale(1); }
.hero h1 { max-width: 620px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: rgba(45, 212, 191, 0.3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 通用组件 ─────────────────────────────────────────────────────────── */
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(6, 11, 20, 0.66);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.nav { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: #04120f;
  background: linear-gradient(135deg, #5eead4, #22c55e);
  box-shadow: 0 8px 22px -8px rgba(45, 212, 191, 0.75);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--dim); font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 8px 14px; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  background: rgba(148, 163, 184, 0.1); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { background: rgba(148, 163, 184, 0.18); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #22c55e);
  color: #04120f; border-color: transparent;
  box-shadow: 0 12px 30px -14px rgba(45, 212, 191, 0.9);
}
.btn-primary:hover { background: linear-gradient(135deg, #5eead4, #34d399); box-shadow: 0 16px 36px -14px rgba(45, 212, 191, 1); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.06); }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.badge {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500;
  background: rgba(45, 212, 191, 0.1); color: #7dd3c8; border: 1px solid rgba(45, 212, 191, 0.2);
}
.badge-gray { background: rgba(148, 163, 184, 0.1); color: var(--muted); border-color: var(--line); }
.badge-green { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.22); }
.badge-red { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.22); }
.badge-yellow { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.22); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12); }

.input, .select, .textarea {
  width: 100%; padding: 11px 13px;
  background: rgba(7, 13, 24, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder, .textarea::placeholder { color: #5b6b82; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}
.textarea { resize: vertical; min-height: 86px; font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fa3bd' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span.label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field-hint { font-size: 12px; color: var(--dim); margin-top: 5px; line-height: 1.5; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.gradient-text {
  background: linear-gradient(100deg, #e8eefb 10%, #5eead4 55%, #38bdf8 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── 表格 ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; font-weight: 500; color: var(--dim); font-size: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: 0.02em;
}
table.table td { padding: 13px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); color: var(--text); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr { transition: background 0.15s; }
table.table tbody tr:hover { background: rgba(148, 163, 184, 0.04); }
.table-empty { padding: 40px 20px; text-align: center; color: var(--dim); font-size: 13.5px; }
.table-scroll { max-height: 460px; overflow: auto; }

code.inline { background: rgba(148, 163, 184, 0.12); padding: 1px 7px; border-radius: 6px; font-family: var(--mono); font-size: 12.5px; color: #a5f3eb; }
pre.code {
  margin: 0; padding: 16px 18px; overflow: auto;
  background: rgba(3, 8, 16, 0.72); border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: #c7d6ea;
}
pre.code .c { color: #5f7288; }
pre.code .k { color: #7dd3fc; }
pre.code .s { color: #86efac; }

/* ── 首页 ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 74px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-badge { margin-bottom: 20px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .line2 { display: block; }
.hero p.lead { margin-top: 20px; color: var(--muted); font-size: clamp(14.5px, 1.6vw, 17px); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: var(--dim); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }

.terminal {
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.92), rgba(8, 14, 25, 0.95));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(45, 212, 191, 0.06);
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(148, 163, 184, 0.04); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; display: block; }
.terminal-bar i:nth-child(1) { background: #f87171; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #34d399; }
.terminal-bar span { margin-left: 8px; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.terminal-body { padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.85; color: #b9c9de; }
.terminal-body .prompt { color: #5eead4; }
.terminal-body .string { color: #86efac; }
.terminal-body .key { color: #7dd3fc; }
.terminal-body .comment { color: #52647c; }
.terminal-footer { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); background: rgba(45, 212, 191, 0.03); }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 54px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stats-band > div { background: rgba(8, 14, 25, 0.85); padding: 20px 22px; }
.stats-band b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stats-band span { font-size: 12px; color: var(--dim); }

.section { padding: 72px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 560px; }
.eyebrow { font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: #5eead4; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: #2dd4bf; display: block; }

.group-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.group-tab {
  padding: 7px 14px; border-radius: 99px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  transition: all 0.2s;
}
.group-tab:hover { color: var(--text); border-color: rgba(148, 163, 184, 0.3); }
.group-tab.active { background: rgba(45, 212, 191, 0.12); border-color: rgba(45, 212, 191, 0.45); color: #7dd3c8; }
.group-tab small { opacity: 0.6; margin-left: 5px; }

.price-table th, .price-table td { padding-left: 18px; padding-right: 18px; }
.price-main { display: flex; align-items: center; gap: 12px; }
.model-orb { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #05221d; background: linear-gradient(135deg, #5eead4, #38bdf8); flex: none; }
.model-name { font-weight: 600; font-size: 14px; }
.model-desc { font-size: 11.5px; color: var(--dim); max-width: 340px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  padding: 24px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(23, 35, 56, 0.5), rgba(9, 15, 26, 0.55));
  transition: transform 0.25s, border-color 0.25s;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(45, 212, 191, 0.28); }
.feature-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(45, 212, 191, 0.1); border: 1px solid rgba(45, 212, 191, 0.18);
  color: #5eead4; font-size: 17px; margin-bottom: 16px;
}
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 13px; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: rgba(13, 21, 36, 0.55); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: #5eead4;
  display: inline-block; margin-bottom: 12px; padding: 3px 9px;
  border: 1px solid rgba(45, 212, 191, 0.25); border-radius: 99px;
}
.step h3 { font-size: 15px; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 13px; }

.cta-band {
  margin-top: 64px; padding: 34px 36px; border-radius: 20px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  background:
    radial-gradient(600px 200px at 15% 20%, rgba(45, 212, 191, 0.16), transparent 70%),
    linear-gradient(120deg, rgba(14, 34, 40, 0.9), rgba(10, 18, 32, 0.9));
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { font-size: 24px; }
.cta-band p { color: var(--muted); font-size: 13.5px; margin-top: 7px; }

.docs-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.docs-side { padding: 20px; }
.docs-side dl { margin: 0; display: grid; gap: 14px; }
.docs-side dt { font-size: 11.5px; color: var(--dim); margin-bottom: 3px; }
.docs-side dd { margin: 0; font-size: 13px; word-break: break-all; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; border: 1px solid transparent; background: transparent; }
.tab.active { background: rgba(45, 212, 191, 0.1); border-color: rgba(45, 212, 191, 0.25); color: #7dd3c8; }

.footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--dim); font-size: 12.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ── 登录 / 控制台 ─────────────────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 48px 20px 80px; }
.auth-card { width: min(430px, 100%); padding: 32px; }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; margin-bottom: 24px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 11px; background: rgba(7, 13, 24, 0.7); border: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button { padding: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13.5px; font-weight: 500; }
.auth-tabs button.active { background: rgba(45, 212, 191, 0.14); color: #a7f3d0; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.2); }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--dim); }
.form-error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.25); color: #fca5a5; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }

.dash { padding: 34px 0 70px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 26px; }
.dash-head p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.balance-card {
  padding: 26px; border-radius: 18px; position: relative; overflow: hidden;
  background:
    radial-gradient(500px 220px at 90% 0%, rgba(45, 212, 191, 0.22), transparent 70%),
    linear-gradient(135deg, rgba(17, 35, 48, 0.95), rgba(10, 18, 30, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.22);
}
.balance-card .label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.balance-card .amount { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.balance-card .amount small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat-card { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(13, 21, 36, 0.6); }
.stat-card .label { font-size: 11.5px; color: var(--dim); }
.stat-card .value { font-size: 21px; font-weight: 650; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .value.small-value { font-size: 15px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15.5px; font-weight: 600; }
.panel-head .hint { font-size: 12px; color: var(--dim); }
.panel-body { padding: 20px 22px; }

.key-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.07); }
.key-row:last-child { border-bottom: 0; }
.key-code { flex: 1; font-family: var(--mono); font-size: 12.5px; background: rgba(7, 13, 24, 0.7); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-meta { font-size: 11.5px; color: var(--dim); }

.redeem-box { display: flex; gap: 10px; }
.redeem-box .input { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── 后台 ─────────────────────────────────────────────────────────────── */
.admin-shell { display: grid; grid-template-columns: 238px 1fr; min-height: 100vh; }
.admin-side {
  border-right: 1px solid var(--line);
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { padding: 4px 8px 18px; }
.admin-nav { display: grid; gap: 3px; }
.admin-nav button {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-nav button:hover { background: rgba(148, 163, 184, 0.07); color: var(--text); }
.admin-nav button.active { background: rgba(45, 212, 191, 0.1); color: #a7f3d0; box-shadow: inset 2px 0 0 #2dd4bf; }
.admin-nav button .ico { width: 18px; text-align: center; opacity: 0.9; }
.admin-side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); display: grid; gap: 7px; }
.admin-main { min-width: 0; padding: 26px 30px 60px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-top h1 { font-size: 21px; }
.admin-top .sub { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.admin-section { display: none; }
.admin-section.active { display: block; animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: rgba(13, 21, 36, 0.62); }
.kpi .k { font-size: 11.5px; color: var(--dim); }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 8px 2px 0; }
.chart .bar { flex: 1; background: linear-gradient(180deg, #2dd4bf, rgba(45, 212, 191, 0.14)); border-radius: 5px 5px 2px 2px; min-height: 3px; position: relative; }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0b1220; border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; z-index: 2; }
.chart-labels { display: flex; gap: 8px; margin-top: 8px; font-size: 10.5px; color: var(--dim); }
.chart-labels span { flex: 1; text-align: center; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: 12.5px; border: 1px solid rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.08); color: #fcd34d; margin-bottom: 16px; line-height: 1.6; }
.alert a { text-decoration: underline; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 8px 11px; font-size: 13px; }
.search-input { min-width: 220px !important; }

.toggle { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: rgba(148, 163, 184, 0.25); transition: 0.2s; cursor: pointer; }
.toggle span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #cbd5e1; transition: 0.2s; }
.toggle input:checked + span { background: rgba(45, 212, 191, 0.75); }
.toggle input:checked + span::before { transform: translateX(16px); background: #04211c; }

/* ── 弹窗 / 提示 ──────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(3, 7, 14, 0.72); backdrop-filter: blur(6px);
  padding: 24px; overflow-y: auto;
}
.modal-backdrop.show { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: min(520px, 100%); margin: auto; border-radius: 18px;
  border: 1px solid var(--line); background: #0d1626;
  box-shadow: 0 40px 100px -30px #000;
  animation: modalIn 0.2s ease;
}
.modal.wide { width: min(720px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-close { border: 0; background: transparent; color: var(--dim); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  padding: 11px 15px; border-radius: 10px; font-size: 13px;
  background: rgba(13, 22, 38, 0.96); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px #000; animation: toastIn 0.18s ease;
  display: flex; gap: 9px; align-items: flex-start;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.4); }
.toast.err { border-color: rgba(248, 113, 113, 0.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.skeleton { background: linear-gradient(90deg, rgba(148, 163, 184, 0.07), rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.07)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 8px; min-height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── 响应式 ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .terminal { max-width: 620px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: sticky; top: 0; z-index: 40; height: auto;
    flex-direction: row; align-items: center; padding: 10px 14px;
    overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .admin-side .brand { padding: 0 14px 0 4px; flex: none; }
  .admin-side .brand-text small { display: none; }
  .admin-nav { display: flex; gap: 4px; }
  .admin-nav button { white-space: nowrap; padding: 7px 11px; font-size: 12.5px; }
  .admin-nav button .ico { display: none; }
  .admin-side-foot { display: none; }
  .admin-main { padding: 20px 18px 50px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 32px); }
  .nav { gap: 12px; height: 60px; }
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .hero { padding-top: 48px; }
  .hero p.lead { font-size: 14.5px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .section { padding-top: 56px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 26px 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .key-row { flex-wrap: wrap; }
  .key-code { min-width: 100%; order: 3; }
  .redeem-box { flex-direction: column; }
  .modal-backdrop { padding: 12px; }
  .table-scroll { max-height: none; }
  table.table th, table.table td { padding: 10px 11px; }
}

/* 复选组 */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: #2dd4bf; flex: none; }
.check-item span { line-height: 1.4; }
.field > .label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* 页面内网格（响应式收窄） */
.dash-top { grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; }
.overview-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
.codes-grid { grid-template-columns: 1fr 1.6fr; align-items: start; }
@media (max-width: 900px) {
  .overview-grid, .codes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dash-top { grid-template-columns: 1fr; }
  .balance-card .amount { font-size: 34px; }
}
