* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0b0f1a;
  color: #e8ecf5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.bg-glow {
  position: fixed; inset:0; z-index:-1;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(700px 500px at 85% 20%, rgba(56,189,248,0.12), transparent 60%),
    radial-gradient(600px 500px at 50% 100%, rgba(168,85,247,0.12), transparent 60%);
}
a { color:#818cf8; text-decoration:none; }
input, button { font-family:inherit; }

/* ===== 登录页 ===== */
.auth-page {
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
}
.auth-card {
  width:100%; max-width:420px; background:rgba(20,25,40,0.85);
  border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:40px 36px; backdrop-filter:blur(12px);
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
}
.logo-badge {
  width:64px; height:64px; border-radius:18px; margin:0 auto 20px;
  background:linear-gradient(135deg,#6366f1,#a855f7);
  display:flex; align-items:center; justify-content:center;
  font-size:26px; font-weight:800; color:#fff;
  box-shadow:0 8px 24px rgba(99,102,241,0.4);
}
.logo-badge.sm { width:36px; height:36px; border-radius:10px; font-size:16px; margin:0 10px 0 0; box-shadow:none; }
.auth-card h1 { text-align:center; font-size:22px; font-weight:700; }
.subtitle { text-align:center; color:#8b93a7; font-size:13px; margin:8px 0 28px; }
.tabs { display:flex; background:rgba(255,255,255,0.05); border-radius:12px; padding:4px; margin-bottom:24px; }
.tab-btn { flex:1; padding:10px; background:transparent; border:none; color:#8b93a7; font-size:14px; border-radius:9px; cursor:pointer; transition:all .2s; }
.tab-btn.active { background:#6366f1; color:#fff; font-weight:600; }
.pane { display:flex; flex-direction:column; gap:14px; }
input[type="text"], input[type="password"], input:not([type]) {
  width:100%; padding:14px 16px; border-radius:12px; border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.05); color:#e8ecf5; font-size:14px; outline:none; transition:border .2s;
}
input:focus { border-color:#6366f1; }
.btn-primary {
  width:100%; padding:14px; border:none; border-radius:12px; cursor:pointer;
  background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff;
  font-size:15px; font-weight:600; transition:opacity .2s;
}
.btn-primary:hover { opacity:0.9; }
.btn-ghost {
  padding:10px 20px; border:1px solid rgba(255,255,255,0.15); border-radius:10px;
  background:transparent; color:#c9d1e3; font-size:13px; cursor:pointer; transition:all .2s;
}
.btn-ghost:hover { border-color:#6366f1; color:#a5b4fc; }
.btn-ghost.sm { padding:6px 12px; font-size:12px; }
.hint { text-align:center; color:#8b93a7; font-size:13px; margin-top:6px; }
.msg { margin-top:14px; text-align:center; font-size:13px; min-height:18px; }
.msg.ok { color:#34d399; }
.msg.err { color:#f87171; }

/* ===== 控制台 ===== */
.dash-page { min-height:100vh; display:flex; flex-direction:column; }
.dash-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 28px; border-bottom:1px solid rgba(255,255,255,0.06);
  background:rgba(11,15,26,0.8); backdrop-filter:blur(10px);
  position:sticky; top:0; z-index:10;
}
.brand { display:flex; align-items:center; }
.brand-name { font-size:16px; font-weight:700; }
.header-right { display:flex; align-items:center; gap:16px; }
.user-name { color:#a5b4fc; font-size:14px; }
.dash-main { flex:1; max-width:860px; width:100%; margin:0 auto; padding:28px 20px 60px; display:flex; flex-direction:column; gap:20px; }
.balance-card {
  background:linear-gradient(135deg, rgba(99,102,241,0.18), rgba(168,85,247,0.12));
  border:1px solid rgba(129,140,248,0.25); border-radius:20px;
  padding:28px; display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap;
}
.balance-label { color:#a5b4fc; font-size:13px; }
.balance-value { font-size:44px; font-weight:800; background:linear-gradient(135deg,#818cf8,#c084fc); -webkit-background-clip:text; background-clip:text; color:transparent; }
.balance-sub { color:#8b93a7; font-size:13px; margin-top:6px; }
.balance-actions { display:flex; gap:12px; }
.balance-actions .btn-primary { width:auto; padding:12px 24px; }
.balance-actions .btn-ghost { width:auto; }
.card {
  background:rgba(20,25,40,0.7); border:1px solid rgba(255,255,255,0.07);
  border-radius:16px; padding:24px;
}
.card-title { font-size:16px; font-weight:700; margin-bottom:16px; }
.card-desc { color:#8b93a7; font-size:13px; margin:10px 0; }
.card-desc code, .key-row code { background:rgba(129,140,248,0.15); color:#a5b4fc; padding:2px 8px; border-radius:6px; font-size:12px; }
.key-row { display:flex; align-items:center; gap:12px; background:rgba(0,0,0,0.3); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:12px 16px; }
.key-row code { flex:1; font-size:14px; word-break:break-all; background:none; color:#c9d1e3; padding:0; }
.model-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.model-item { border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:14px; background:rgba(255,255,255,0.03); }
.model-item .m-name { font-weight:600; font-size:14px; color:#e8ecf5; }
.model-item .m-price { color:#8b93a7; font-size:12px; margin-top:4px; }
.model-item .m-desc { color:#6b7280; font-size:12px; margin-top:6px; }
.redeem-row { display:flex; gap:12px; }
.redeem-row input { flex:1; }
.redeem-row .btn-primary { width:auto; padding:14px 28px; white-space:nowrap; }
.pay-qr-row { display:flex; gap:16px; margin:12px 0 4px; flex-wrap:wrap; }
.pay-title { font-size:14px; color:#a5abc8; margin:14px 0 10px; font-weight:600; }
.pay-tabs { display:flex; gap:12px; flex-wrap:wrap; }
.pay-tab { display:flex; align-items:center; gap:10px; padding:12px 28px; border-radius:12px; border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.04); color:#c9d1e3; font-size:14px; cursor:pointer; font-weight:600; transition:all .15s; }
.pay-tab:hover { border-color:rgba(255,255,255,0.25); }
.pay-tab.active { background:linear-gradient(135deg,#8b5cf6,#6366f1); color:#fff; border-color:transparent; box-shadow:0 4px 16px rgba(99,102,241,.35); }
.pay-ico { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; flex:0 0 auto; }
.pay-ico.wx { background:#07c160; }
.pay-ico.zb { background:#1677ff; }
.pay-hint { margin-top:14px; padding:11px 16px; border-radius:10px; background:rgba(7,193,96,0.08); border:1px solid rgba(7,193,96,0.22); color:#6ee7a0; font-size:13px; font-weight:500; }
.pay-qr-box { flex:1 1 160px; max-width:200px; text-align:center; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1); border-radius:14px; padding:14px; }
.pay-qr-box img { width:100%; max-width:160px; border-radius:10px; display:block; margin:0 auto; background:#fff; }
.pay-qr-label { margin-top:10px; font-size:13px; color:#e8ecf5; font-weight:600; }
.pay-divider { display:flex; align-items:center; gap:12px; color:#8b93a7; font-size:12px; margin:18px 0 8px; }
.pay-divider::before, .pay-divider::after { content:''; flex:1; height:1px; background:rgba(255,255,255,0.08); }
.my-recharge { margin-top:14px; }
.card-subtitle { font-size:13px; color:#a5abc8; font-weight:600; margin-bottom:8px; }
.pay-record { display:flex; align-items:center; gap:12px; padding:8px 12px; border-radius:8px; background:rgba(255,255,255,0.03); margin-bottom:6px; font-size:13px; }
.pay-record span:first-child { font-weight:700; color:#fbbf24; }
.pay-st { padding:2px 10px; border-radius:20px; font-size:12px; }
.pay-st.pending { background:rgba(251,191,36,.12); color:#fbbf24; }
.pay-st.confirmed { background:rgba(52,211,153,.12); color:#34d399; }
.pay-st.rejected { background:rgba(248,113,113,.12); color:#f87171; }
.pay-time { margin-left:auto; color:#6b7280; font-size:12px; }
.code-block { background:rgba(0,0,0,0.35); border:1px solid rgba(255,255,255,0.08); border-radius:12px; margin-top:14px; overflow:hidden; }
.code-head { padding:10px 16px; font-size:12px; color:#8b93a7; background:rgba(255,255,255,0.04); border-bottom:1px solid rgba(255,255,255,0.06); }
.code-block pre { padding:16px; font-size:13px; line-height:1.7; overflow-x:auto; color:#a5f3fc; font-family:Consolas, "Courier New", monospace; white-space:pre-wrap; word-break:break-all; }
.dash-footer { text-align:center; color:#4b5563; font-size:12px; padding:20px; }

@media (max-width:600px) {
  .balance-card { flex-direction:column; align-items:flex-start; }
  .redeem-row { flex-direction:column; }
  .redeem-row .btn-primary { width:100%; }
}
