:root {
  --bg: #0b1220;
  --card: #121a2b;
  --line: #243049;
  --text: #e8eefc;
  --muted: #93a0b8;
  --primary: #3b82f6;
  --accent: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 10% -10%, #1d4ed855, transparent),
    radial-gradient(700px 300px at 90% 0%, #05966933, transparent),
    var(--bg);
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #06b6d4); color: white;
}
h1 { margin: 0; font-size: 1.25rem; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 16px;
}
.card.accent { border-color: #166534; background: linear-gradient(180deg, #12241c, #121a2b); }
.grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
input, select {
  background: #0b1324; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; min-width: 140px;
}
.btn {
  border: 1px solid var(--line); background: #1a2438; color: var(--text);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.primary { background: var(--primary); border-color: transparent; color: white; }
.btn.warn { background: var(--warn); border-color: transparent; color: #111; }
.btn.danger { background: var(--danger); border-color: transparent; color: white; }
.balance { font-size: 2.4rem; font-weight: 800; letter-spacing: .5px; }
.balance small { font-size: 1rem; margin-left: 6px; color: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }
.msg { color: var(--warn); min-height: 1.2em; }
.hidden { display: none !important; }
.task {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  margin-top: 12px; background: #0d1526;
}
.task h3 { margin: 0 0 8px; }
.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1.8rem; font-weight: 800; color: #67e8f9;
}
.gb {
  font-size: 1.4rem; font-weight: 700; color: var(--accent);
}
.urls { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; word-break: break-all; }
.urls div { margin: 4px 0; color: #cbd5e1; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: .75rem; border: 1px solid var(--line); color: var(--muted);
}
.badge.active { color: #86efac; border-color: #166534; }
.badge.draft { color: #93c5fd; border-color: #1e3a8a; }
.badge.expired { color: #fca5a5; border-color: #7f1d1d; }
.ledger { font-size: .9rem; }
.ledger .item { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; }
.wechat { font-size: 1.1rem; }
.qr-box {
  margin-top: 10px; width: 140px; height: 140px; border-radius: 12px;
  border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden;
  background: #0b1324;
}
.qr-box img { width: 100%; height: 100%; object-fit: cover; }
.qr-placeholder { text-align: center; color: var(--muted); font-size: .8rem; padding: 8px; }
footer { text-align: center; color: var(--muted); padding: 24px; font-size: .85rem; }
.meter {
  height: 8px; background: #1e293b; border-radius: 999px; overflow: hidden; margin: 8px 0 4px;
}
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #eab308, #ef4444); }
