/* ChatGPT Pay — 共享样式（从零设计） */
:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --panel: #151c28;
  --panel-2: #1b2431;
  --line: #26303f;
  --line-soft: #1e2733;
  --text: #e6edf6;
  --muted: #8b9bb0;
  --brand: #10a37f;
  --brand-2: #14b892;
  --danger: #f0616d;
  --warn: #e8a33d;
  --ok: #2fbf71;
  --info: #4a9eff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 通用 ─────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.center-wrap { max-width: 560px; margin: 0 auto; padding: 48px 20px 72px; }

.brand-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.brand small { color: var(--muted); font-weight: 500; margin-left: 6px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

h1 { font-size: 22px; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 650; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }

/* ── 表单 ─────────────────────────────────────────────── */
label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16, 163, 127, .16);
}
textarea { resize: vertical; min-height: 96px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.hint.ok { color: var(--brand); font-weight: 600; }
.hint.ok:empty { display: none; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ── 按钮 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: filter .15s, opacity .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #04120d; }
.btn-danger { background: transparent; border-color: #5a2b33; color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── 步骤指示 ─────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.steps .s {
  flex: 1; text-align: center; font-size: 12px; color: var(--muted);
  padding: 8px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); background: var(--bg-soft);
}
.steps .s.on { color: var(--text); border-color: var(--brand); background: rgba(16,163,127,.10); }
.steps .s.done { color: var(--brand-2); border-color: #1d4b3e; }

/* ── 状态提示 ─────────────────────────────────────────── */
.msg { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(240,97,109,.10); border: 1px solid #5a2b33; color: #ffb3ba; }
.msg.ok { background: rgba(47,191,113,.10); border: 1px solid #1d4b3e; color: #9ff0c4; }
.msg.info { background: rgba(74,158,255,.10); border: 1px solid #24405f; color: #bcdcff; }
/* ★ M6：2FA 降级告警（琥珀色，持久显示；点击关闭） */
.msg.warn { background: rgba(255,183,77,.12); border: 1px solid #5c4520; color: #ffd89b; cursor: pointer; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; border: 1px solid transparent;
}
.badge.ok { background: rgba(47,191,113,.14); color: #6fe0a4; border-color: #1d4b3e; }
.badge.err { background: rgba(240,97,109,.14); color: #ff9aa4; border-color: #5a2b33; }
.badge.warn { background: rgba(232,163,61,.14); color: #f0c078; border-color: #574023; }
.badge.muted { background: rgba(139,155,176,.12); color: var(--muted); border-color: var(--line); }
.badge.info { background: rgba(74,158,255,.14); color: #9ccbff; border-color: #24405f; }

/* ── 进度条 ───────────────────────────────────────────── */
.bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft); }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }

/* ── 轨迹 ─────────────────────────────────────────────── */
.trace { max-height: 320px; overflow: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.trace .t { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); color: #b9c7d8; }
.trace .t:last-child { border-bottom: 0; }

/* ── 后台布局 ─────────────────────────────────────────── */
.admin { display: flex; min-height: 100vh; }
.side {
  width: 208px; flex: 0 0 208px; border-right: 1px solid var(--line-soft);
  background: var(--bg-soft); padding: 16px 12px; position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 6px 8px 16px; }
.nav-item {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13.5px;
  margin-bottom: 2px; user-select: none;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.on { background: rgba(16,163,127,.12); color: var(--brand-2); }
.main { flex: 1; min-width: 0; padding: 22px 26px 60px; }
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }

/* ── 统计卡 ───────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }

/* ── 表格 ─────────────────────────────────────────────── */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--panel-2); position: sticky; top: 0; }
tbody tr:hover { background: rgba(255,255,255,.02); }
td.wrap-cell { white-space: normal; max-width: 360px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.empty { padding: 28px; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }

/* ── 弹层 ─────────────────────────────────────────────── */
.mask {
  position: fixed; inset: 0; background: rgba(4, 8, 14, .72);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.mask.show { display: flex; }
.modal { width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; }
.modal.wide { max-width: 720px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .admin { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; display: flex; gap: 6px; overflow-x: auto; }
  .side .brand { display: none; }
  .nav-item { white-space: nowrap; }
}

/* ── 后台：暖白极简主题 + 深浅色切换 ───────────────────────── */
body.admin-page {
  --bg: #f7f8f6;
  --bg-soft: #fbfcfb;
  --panel: #ffffff;
  --panel-2: #f1f5f3;
  --line: #dfe6e2;
  --line-soft: #e9eeeb;
  --text: #182620;
  --muted: #6d7d75;
  --brand: #078b76;
  --brand-2: #087963;
  --danger: #dc4051;
  --warn: #c88820;
  --ok: #13875e;
  --info: #2779c6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 26px rgba(36, 55, 47, .055);
  background:
    radial-gradient(circle at 96% 4%, rgba(11, 151, 124, .055), transparent 25%),
    #f7f8f6;
}

html[data-admin-theme="dark"] body.admin-page {
  --bg: #08090b;
  --bg-soft: #101216;
  --panel: #15171b;
  --panel-2: #1d2025;
  --line: #30343b;
  --line-soft: #262a30;
  --text: #f2f4f7;
  --muted: #9aa2ad;
  --brand: #4c8ff7;
  --brand-2: #81b2ff;
  --danger: #ff7785;
  --warn: #e8b661;
  --ok: #54d59a;
  --info: #76b8f7;
  --shadow: 0 12px 34px rgba(0, 0, 0, .22);
  color-scheme: dark;
  background:
    radial-gradient(circle at 96% 4%, rgba(76, 143, 247, .065), transparent 25%),
    #08090b;
}

html[data-admin-theme="dark"] .admin-page .nav-item.on {
  color: var(--brand-2);
  background: rgba(76, 143, 247, .12);
  border-color: rgba(76, 143, 247, .11);
}
html[data-admin-theme="dark"] .admin-page .brand .dot {
  background: linear-gradient(145deg, #6aa5ff, #376fca);
  box-shadow: 0 7px 16px rgba(76, 143, 247, .2);
}
html[data-admin-theme="dark"] .admin-page .side { box-shadow: 7px 0 28px rgba(0, 0, 0, .18); }
html[data-admin-theme="dark"] .admin-page input:focus,
html[data-admin-theme="dark"] .admin-page select:focus,
html[data-admin-theme="dark"] .admin-page textarea:focus {
  box-shadow: 0 0 0 3px rgba(76, 143, 247, .14);
}
html[data-admin-theme="dark"] .admin-page tbody tr:hover { background: rgba(76, 143, 247, .055); }

.admin-page .center-wrap { padding-top: 110px; }
.admin-page .center-wrap > .card { max-width: 460px; margin: 0 auto; }
.admin-page .card { box-shadow: var(--shadow); }
.admin-page h1,
.admin-page h2 { letter-spacing: -.2px; }
.admin-page .admin { background: transparent; }
.admin-page .side {
  width: 232px;
  flex-basis: 232px;
  padding: 22px 14px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border-right-color: var(--line);
  box-shadow: 7px 0 28px rgba(36, 55, 47, .035);
}
.admin-page .side .brand {
  padding: 4px 12px 24px;
  color: var(--text);
  font-size: 16px;
}
.admin-brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 7px 10px rgba(9, 120, 100, .18));
}
.admin-brand-mark img { display: block; width: 100%; height: 100%; }
.admin-page .nav-item {
  position: relative;
  margin-bottom: 5px;
  padding: 10px 12px 10px 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13.5px;
}
.admin-page .nav-item::before {
  content: "•";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: currentColor;
  font-size: 18px;
  line-height: 1;
}
.admin-page .nav-item:hover {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line-soft);
}
.admin-page .nav-item.on {
  color: var(--brand-2);
  background: rgba(9, 146, 121, .105);
  border-color: rgba(9, 146, 121, .08);
}
.admin-page .nav-item.on::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand);
}
.admin-page .side > div:last-child {
  padding-top: 18px !important;
  border-top: 1px solid var(--line-soft);
}
.admin-page .main {
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px 34px 70px;
}
.admin-page .head { min-height: 42px; margin-bottom: 22px; padding-right: 112px; }
.admin-page .head h2 { margin: 0; font-size: 22px; color: var(--text); }
.admin-page .toolbar {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.admin-page input,
.admin-page select,
.admin-page textarea {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--text);
}
.admin-page input:focus,
.admin-page select:focus,
.admin-page textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(9, 146, 121, .12);
}
.admin-page .btn {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
  box-shadow: none;
}
.admin-page .btn:hover { filter: none; border-color: color-mix(in srgb, var(--brand) 44%, var(--line)); }
.admin-page .btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.admin-page .btn-danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.admin-page .btn-ghost { background: transparent; }
.admin-page .stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.admin-page .stat { min-height: 112px; padding: 18px 20px; box-shadow: var(--shadow); }
.admin-page .stat .k { font-size: 12.5px; }
.admin-page .stat .v { margin-top: 8px; font-size: 27px; color: var(--text); }
.admin-page #stats .stat {
  --stat-accent: #4c8ff7;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--stat-accent) 8%, var(--panel)),
    var(--panel) 62%);
}
.admin-page #stats .stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-accent);
  opacity: .9;
}
.admin-page #stats .stat .v { color: var(--stat-accent); }
.admin-page #stats .stat:nth-child(1)  { --stat-accent: #3d82ed; }
.admin-page #stats .stat:nth-child(2)  { --stat-accent: #15936a; }
.admin-page #stats .stat:nth-child(3)  { --stat-accent: #d25260; }
.admin-page #stats .stat:nth-child(4)  { --stat-accent: #7a63d8; }
.admin-page #stats .stat:nth-child(5)  { --stat-accent: #c78924; }
.admin-page #stats .stat:nth-child(6)  { --stat-accent: #0e9b9b; }
.admin-page #stats .stat:nth-child(7)  { --stat-accent: #556fd6; }
.admin-page #stats .stat:nth-child(8)  { --stat-accent: #367bd5; }
.admin-page #stats .stat:nth-child(9)  { --stat-accent: #16865e; }
.admin-page #stats .stat:nth-child(10) { --stat-accent: #d24758; }
.admin-page #stats .stat:nth-child(11) { --stat-accent: #c47c1a; }
.admin-page #stats .stat:nth-child(12) { --stat-accent: #8a58c7; }
.admin-page .order-stats { margin-bottom: 18px; grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.admin-page .order-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
}
.admin-page .order-stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--brand-2);
  background: rgba(9, 146, 121, .1);
  font-size: 20px;
  font-weight: 800;
}
.admin-page .order-stat.success .order-stat-icon { color: var(--ok); background: rgba(19, 135, 94, .11); }
.admin-page .order-stat.failed .order-stat-icon { color: var(--danger); background: rgba(220, 64, 81, .1); }
.admin-page .order-stat.time .order-stat-icon { color: var(--warn); background: rgba(200, 136, 32, .11); }
.admin-page .order-stat .v { margin-top: 1px; line-height: 1.16; }
.admin-page .order-stat-note { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.admin-page .table-wrap { box-shadow: var(--shadow); }
.admin-page th { background: var(--panel-2); color: var(--muted); }
.admin-page tbody tr:hover { background: rgba(9, 146, 121, .045); }
.admin-page .badge.ok { background: rgba(19, 135, 94, .11); color: var(--ok); border-color: rgba(19, 135, 94, .2); }
.admin-page .badge.err { background: rgba(220, 64, 81, .1); color: var(--danger); border-color: rgba(220, 64, 81, .2); }
.admin-page .badge.warn { background: rgba(200, 136, 32, .11); color: var(--warn); border-color: rgba(200, 136, 32, .2); }
.admin-page .badge.info { background: rgba(39, 121, 198, .1); color: var(--info); border-color: rgba(39, 121, 198, .2); }
.admin-page .badge.muted { background: var(--panel-2); color: var(--muted); border-color: var(--line); }
.admin-page .msg.err { color: var(--danger); background: rgba(220, 64, 81, .09); border-color: rgba(220, 64, 81, .22); }
.admin-page .msg.ok { color: var(--ok); background: rgba(19, 135, 94, .09); border-color: rgba(19, 135, 94, .22); }
.admin-page .msg.info { color: var(--info); background: rgba(39, 121, 198, .09); border-color: rgba(39, 121, 198, .22); }
/* ★ M6：后台是浅色主题，必须给 .msg.warn 一套浅色配色（否则琥珀字压在浅底上看不清） */
.admin-page .msg.warn { color: var(--warn); background: rgba(200, 136, 32, .09); border-color: rgba(200, 136, 32, .22); }
.admin-page .trace .t { color: var(--text); }
.admin-page code { background: var(--panel-2); color: var(--brand-2); }
.admin-page .mask { background: rgba(10, 16, 13, .58); backdrop-filter: blur(6px); }

.admin-theme-toggle {
  position: fixed;
  z-index: 70;
  top: 20px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 88px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  font: 650 12.5px/1 inherit;
  cursor: pointer;
}
.admin-theme-toggle:hover { border-color: var(--brand); }
.admin-theme-toggle > span:first-child { font-size: 17px; }

@media (max-width: 860px) {
  .admin-page .side {
    width: 100%;
    flex-basis: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-page .nav-item { padding: 8px 12px; }
  .admin-page .nav-item::before,
  .admin-page .nav-item.on::after { display: none; }
  .admin-page .side > div:last-child { display: flex; min-width: 230px; padding-top: 0 !important; border: 0; }
  .admin-page .side > div:last-child .btn { margin: 0 0 0 6px !important; }
  .admin-page .main { width: 100%; padding: 74px 16px 48px; }
  .admin-page .head { padding-right: 0; }
  .admin-page .order-stats { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .admin-theme-toggle { top: 16px; right: 16px; }
}

@media (max-width: 470px) {
  .admin-page .order-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .admin-page .order-stat { min-height: 96px; padding: 13px; gap: 9px; }
  .admin-page .order-stat-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; }
  .admin-page .order-stat .v { font-size: 21px; }
  .admin-page .order-stat-note { display: none; }
}

/* ── 批量导入 ─────────────────────────────────────────── */
code {
  background: var(--panel-2); color: var(--brand-2);
  padding: 1px 5px; border-radius: 4px; font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.chk {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--muted); margin: 0 0 14px;
}
.chk input { width: auto; margin: 0; }

.imp-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.imp-list {
  max-height: 240px; overflow: auto; margin-top: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.imp-list > div {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line-soft);
}
.imp-list > div:last-child { border-bottom: 0; }
.imp-list .ln { flex: none; width: 30px; text-align: right; color: var(--muted); }
.imp-list .nm { font-family: ui-monospace, Menlo, Consolas, monospace; }
.imp-list .rs { margin-left: auto; flex: none; color: var(--muted); }

/* ── 兑换页：明亮自适应界面（不影响后台）──────────────────────── */
body.redeem-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #0b1931;
  background:
    radial-gradient(circle at 8% 15%, rgba(25, 157, 255, .14), transparent 27%),
    radial-gradient(circle at 91% 20%, rgba(28, 220, 187, .17), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(79, 172, 255, .11), transparent 34%),
    #f8fbff;
}
body.redeem-page::before,
body.redeem-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(67, 177, 255, .2);
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-14deg);
}
body.redeem-page::before { width: 58vw; height: 24vw; left: -17vw; top: 16vh; }
body.redeem-page::after { width: 54vw; height: 23vw; right: -19vw; bottom: 5vh; border-color: rgba(24, 207, 167, .18); }

.redeem-header {
  width: min(1120px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(132, 161, 194, .18);
}
.redeem-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #101a2d;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.7px;
}
.redeem-brand:hover,
.redeem-nav a:hover,
.main-site-promo:hover { text-decoration: none; }
.redeem-brand b { color: #0d8cff; }
.redeem-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 7px 12px rgba(25, 94, 214, .2));
}
.redeem-brand-mark img { display: block; width: 100%; height: 100%; }
.redeem-nav { display: flex; align-items: center; gap: 34px; }
.redeem-nav a {
  position: relative;
  color: #52657f;
  font-weight: 650;
  padding: 26px 2px 23px;
}
.redeem-nav .nav-disabled {
  color: #8797aa;
  font-weight: 650;
  cursor: default;
}
.redeem-nav a[aria-current="page"] { color: #0b1931; }
.redeem-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 999px;
  left: 3px;
  right: 3px;
  bottom: 15px;
  background: linear-gradient(90deg, #0d8cff, #10d7ba);
}

.redeem-layout {
  width: min(960px, calc(100% - 40px));
  margin: 40px auto 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.redeem-card {
  order: 2;
  padding: 42px 48px 34px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 26px;
  box-shadow: 0 24px 65px rgba(39, 91, 135, .13);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

/* ── 维护模式卡片（后台「维护模式」页一键开关，方案 B）─────────────
   开启时：主站推广卡与兑换卡都隐藏，只留这一张。
   文案全部由后端下发（GET /api/maintenance 或兑换接口的 503 detail）。 */
.maint-card {
  order: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 40px 34px;
  text-align: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 26px;
  box-shadow: 0 24px 65px rgba(39, 91, 135, .13);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.maint-icon {
  width: 64px; height: 64px;
  margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 20px;
  background: #e8f3ff;
}
.maint-card h2 {
  margin: 20px 0 0;
  color: #07152e;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.6px;
}
.maint-text {
  margin: 12px 0 0;
  color: #7b8ca4;
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-line;
}
.maint-eta {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 20px 0 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: #fdf4e3;
  color: #8a5a12;
  font-size: 13px;
  font-weight: 650;
}
.maint-eta i { width: 7px; height: 7px; border-radius: 50%; background: #e8a33d; }
.maint-actions { display: flex; gap: 12px; margin-top: 26px; }
.maint-actions .btn { min-height: 50px; }
.maint-buy {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-size: 15.5px;
}
.maint-buy:hover { text-decoration: none; }
.maint-buy span { font-size: 18px; line-height: 1; }
.maint-refresh { flex: none; width: 118px; }
.maint-note { margin: 16px 0 0; color: #9aa9bd; font-size: 12.5px; }
@media (max-width: 560px) {
  .maint-card { padding: 30px 22px 26px; }
  .maint-card h2 { font-size: 22px; }
}
.redeem-heading { text-align: center; }
.redeem-kicker {
  display: inline-block;
  color: #6e829f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  margin-bottom: 7px;
}
.redeem-heading h1 {
  margin: 0;
  color: #07152e;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -1.7px;
}
.redeem-heading h1 span {
  color: transparent;
  background: linear-gradient(120deg, #087cf4 16%, #10cfb7 88%);
  background-clip: text;
  -webkit-background-clip: text;
}
.redeem-heading p { margin: 9px 0 0; color: #7b8ca4; font-size: 15px; }

.redeem-page .steps {
  max-width: 580px;
  margin: 28px auto 30px;
  gap: 0;
}
.redeem-page .steps .s {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: #71839d;
  border: 0;
  background: transparent;
  font-size: 12.5px;
}
.redeem-page .steps .s:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 17px;
  left: calc(50% + 25px);
  width: calc(100% - 50px);
  height: 2px;
  background: #d9e5f1;
}
.redeem-page .steps .s b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eaf1f8;
  color: #71839d;
  font-size: 14px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.95);
}
.redeem-page .steps .s.on,
.redeem-page .steps .s.done { color: #37516e; }
.redeem-page .steps .s.on b,
.redeem-page .steps .s.done b {
  color: #fff;
  background: linear-gradient(145deg, #0a86ff, #11d3ba);
  box-shadow: 0 8px 20px rgba(13, 140, 255, .22), 0 0 0 6px rgba(255,255,255,.95);
}
.redeem-page .steps .s.done:not(:last-child)::after { background: linear-gradient(90deg, #23a8f8, #82dcd1); }

.redeem-panel { max-width: 740px; margin: 0 auto; }
.redeem-panel h2 { color: #0b1931; font-size: 24px; }
.redeem-page .sub { color: #6f8199; }
.redeem-page label { color: #60758f; font-weight: 650; }
.redeem-code-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.input-with-icon { position: relative; }
.input-with-icon > span {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  color: #7790ad;
  font-size: 26px;
  pointer-events: none;
}
.redeem-page input,
.redeem-page textarea,
.redeem-page select {
  color: #13243e;
  background: rgba(255,255,255,.82);
  border-color: #cfdeed;
}
.redeem-page input::placeholder,
.redeem-page textarea::placeholder { color: #8fa0b6; }
.redeem-page input:focus,
.redeem-page textarea:focus,
.redeem-page select:focus {
  border-color: #168efa;
  box-shadow: 0 0 0 4px rgba(22, 142, 250, .11);
}
.redeem-page #code {
  height: 58px;
  padding-left: 56px;
  font-size: 16px;
  border-radius: 14px;
}
.redeem-page textarea { min-height: 130px; }
.redeem-page .btn {
  min-height: 48px;
  border-radius: 13px;
  border-color: #cbd9e8;
  background: rgba(255,255,255,.7);
  color: #37516e;
}
.redeem-page .btn-primary {
  color: #fff;
  border: 0;
  background: linear-gradient(105deg, #087cf4, #0eafd9 55%, #0fd0ae);
  box-shadow: 0 13px 28px rgba(7, 147, 225, .2);
}
.redeem-submit { height: 58px; margin-top: 14px; font-size: 17px; }
.redeem-submit span { font-size: 23px; line-height: 1; }
.redeem-security { margin: 18px 0 0; text-align: center; color: #778ba4; font-size: 12.5px; }
.redeem-security span {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-right: 7px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #0db99a, #19dbac);
}
.redeem-page .msg { color: #37516e; }
.redeem-page .msg.err { color: #b72f43; background: #fff1f3; border-color: #ffd0d7; }
.redeem-page .msg.ok { color: #08774e; background: #ecfff7; border-color: #bdebd9; }
.redeem-page .msg.info { color: #1766ac; background: #eff8ff; border-color: #c9e6ff; }

.main-site-promo {
  order: 1;
  min-height: 142px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 30px;
  color: #12213a;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 24px;
  background: linear-gradient(110deg, rgba(238,255,249,.94), rgba(243,255,252,.88));
  box-shadow: 0 18px 46px rgba(37, 135, 109, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.main-site-promo:hover { transform: translateY(-2px); box-shadow: 0 22px 52px rgba(37, 135, 109, .16); }
.promo-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: #fff;
  font-size: 28px;
  font-weight: 850;
  background: linear-gradient(145deg, #13d9ac, #0daf75);
  box-shadow: 0 13px 28px rgba(14, 185, 130, .23);
  transform: rotate(-7deg);
}
.promo-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.promo-copy strong { font-size: clamp(22px, 3.2vw, 31px); line-height: 1.2; letter-spacing: -.8px; }
.promo-copy strong em { color: #08a96f; font-style: normal; }
.promo-copy small { color: #72889d; margin-top: 5px; font-size: 13px; }
.promo-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #087e55;
  background: #cffff0;
  font-size: 11px;
  font-weight: 800;
}
.promo-action {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(105deg, #0dbb88, #08a868);
  box-shadow: 0 11px 24px rgba(10, 166, 108, .2);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}
.promo-action span { font-size: 22px; }
.promo-action-disabled {
  background: #91a4b5;
  box-shadow: none;
  cursor: default;
}

.redeem-page .bar { height: 10px; border: 0; background: #e5eef7; }
.redeem-page .bar > i { background: linear-gradient(90deg, #087cf4, #0fd0ae); }
.public-status { margin: 16px 0; text-align: center; color: #0d8cff; }
.public-status strong { font-size: 30px; }
.result-actions { justify-content: center; margin-top: 18px; }
.redeem-footer { padding: 18px 20px 36px; text-align: center; color: #94a4b8; font-size: 12px; letter-spacing: 1.2px; }

@media (max-width: 700px) {
  .redeem-header { width: calc(100% - 32px); height: 66px; }
  .redeem-brand { font-size: 20px; }
  .redeem-brand-mark { width: 34px; height: 34px; }
  .redeem-nav { gap: 0; }
  .redeem-nav .nav-home { display: none; }
  .redeem-nav a { padding: 20px 0; font-size: 13px; }
  .redeem-nav a::after { display: none; }
  .redeem-layout { width: calc(100% - 24px); margin-top: 14px; gap: 12px; }
  .main-site-promo {
    order: 1;
    min-height: 0;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 18px;
  }
  .promo-icon { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; box-shadow: none; }
  .promo-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: -.3px; }
  .promo-copy small { display: none; }
  .promo-badge { margin: 0 0 2px; padding: 1px 7px; font-size: 9.5px; }
  .promo-action { min-height: 38px; padding: 0 12px; border-radius: 11px; font-size: 12px; }
  .promo-action span { display: none; }
  .redeem-card { order: 2; padding: 26px 18px 22px; border-radius: 22px; }
  .redeem-kicker { display: none; }
  .redeem-heading h1 { font-size: clamp(25px, 8vw, 34px); letter-spacing: -1.1px; }
  .redeem-heading p { font-size: 12.5px; }
  .redeem-page .steps { margin: 22px auto 24px; }
  .redeem-page .steps .s { font-size: 11px; gap: 6px; }
  .redeem-page .steps .s b { width: 32px; height: 32px; }
  .redeem-page .steps .s:not(:last-child)::after { top: 15px; left: calc(50% + 22px); width: calc(100% - 44px); }
  .redeem-page #code { height: 52px; font-size: 15px; }
  .redeem-submit { height: 52px; }
  .redeem-security { margin-top: 14px; font-size: 11.5px; }
  .redeem-panel h2 { font-size: 21px; }
  .redeem-page .btn-row { flex-direction: column; }
  .redeem-footer { padding-top: 12px; }
}

@media (max-width: 390px) {
  .promo-copy strong { font-size: 13.5px; }
  .promo-action { padding: 0 9px; font-size: 11px; }
  .redeem-card { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-site-promo,
  .redeem-page .bar > i { transition: none; }
}

/* ── 强刷记录：点击复制的省略单元格 ───────────────────────── */
.copy-cell { cursor: pointer; }
.copy-cell:hover { opacity: .78; }
.copy-cell.ellip {
  display: inline-block; max-width: 260px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  color: var(--brand-2);
}
.badge.copy-cell { font-family: inherit; font-size: 11px; }


/* ── 概览：服务器状态（★ 2026-10-14 纯协议后已移除「浏览器状态」面板） ── */
.host-cards {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin-top: 16px; align-items: start;
}
.host-cards > .card + .card { margin-top: 0; }
.host-cards .head { margin-bottom: 14px; }
.host-at { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.host-body { display: flex; flex-direction: column; gap: 12px; }
.host-sec { display: flex; flex-direction: column; gap: 8px; }
.host-sec + .host-sec { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.host-sec-title {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase;
}
.host-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; font-size: 13px;
}
.host-row .hk { color: var(--muted); }
.host-row .hv {
  font-weight: 600; font-variant-numeric: tabular-nums; text-align: right;
}
.host-row .hv.mono, .host-row .hv .mono { font-weight: 500; }
.host-meter { display: flex; flex-direction: column; gap: 6px; }
.host-meter .bar { height: 5px; }
.host-empty { color: var(--muted); font-size: 12.5px; }
.host-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.host-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 12.5px;
}
.host-item .hi-l { color: var(--muted); min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.host-item .hi-r { font-variant-numeric: tabular-nums; white-space: nowrap; }
.host-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--muted);
}
.host-dot.ok { background: #2fbf71; }
.host-dot.warn { background: #e8a33d; }
.host-dot.err { background: #f0616d; }

@media (max-width: 1000px) {
  .host-cards { grid-template-columns: 1fr; }
}

/* ── 弱化文本（后台多处已用 class="muted"，此前没有对应规则）────── */
.muted { color: var(--muted); }
