:root {
  --bg: #060a13;
  --panel: #0c1322;
  --panel-2: #111b2e;
  --line: #1a2742;
  --text: #e8f1ff;
  --muted: #8597b3;
  --accent: #19d8ff;
  --accent-2: #1a6dff;
  --grad: linear-gradient(135deg, #2af2ff 0%, #12a8ff 50%, #1a5cff 100%);
  --accent-ink: #001226;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1100px 600px at 85% -10%, rgba(26,109,255,.22) 0%, transparent 60%), radial-gradient(700px 400px at 0% 0%, rgba(25,216,255,.10) 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 'Space Grotesk', system-ui, sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
a { color: inherit; }
h1, h2 { margin: 0 0 14px; letter-spacing: -0.02em; }
h2 { font-size: 18px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--danger); min-height: 1em; margin: 8px 0; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 19, 0.85); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; }
.brand-logo { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 8px rgba(25,216,255,.45)); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--panel-2); }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 6px 6px 6px 12px; border-radius: 999px; font: inherit;
}
.balance-label { color: var(--muted); font-size: 12px; }
#balance { font-family: var(--mono); font-weight: 700; }
.plus { background: var(--grad); color: var(--accent-ink); border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; font-weight: 700; }
.mock-banner { background: #3a2f00; color: var(--warn); text-align: center; padding: 6px; font-size: 13px; }

main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 80px; }
.view > .card + .card { margin-top: 18px; }

/* controls */
button, .primary { font: inherit; cursor: pointer; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: var(--accent-ink); border: 0; border-radius: 11px;
  padding: 11px 18px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 24px rgba(26,140,255,.25);
}
.primary:disabled { opacity: 0.4; cursor: not-allowed; }
.primary:not(:disabled):hover { filter: brightness(1.08); }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; }
.ghost:hover { background: var(--panel-2); }
.ghost.small, .small.ghost { padding: 5px 10px; font-size: 13px; }
.danger { color: var(--danger); }
.block { width: 100%; display: flex; margin-top: 10px; }
label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
input {
  display: block; width: 100%; margin-top: 6px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font: inherit; font-size: 15px; outline: none;
}
input:focus { border-color: var(--accent); }
.search { width: 220px; margin: 0; padding: 7px 10px; font-size: 14px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 16px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; font-weight: 500; }
.seg button.active { background: var(--panel-2); color: var(--text); }
.chips { display: flex; gap: 8px; margin: -4px 0 6px; }
.chips button { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 7px; }
.chips button:hover { border-color: var(--accent); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* auth */
.auth { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; min-height: 70vh; }
.auth-hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
.auth-hero em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-logo { width: 72px; height: 72px; margin-bottom: 18px; filter: drop-shadow(0 0 22px rgba(25,216,255,.5)); }
.auth-hero p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; }
.ticks li::before { content: '✓'; color: var(--accent); margin-right: 10px; font-weight: 700; }
.auth-card { max-width: 400px; width: 100%; justify-self: end; }

.discord-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; background: #5865f2; color: #fff; border-radius: 11px; padding: 13px 18px; font-weight: 600; text-decoration: none; }
.discord-btn:hover { background: #4752c4; }
.avatar { width: 24px; height: 24px; border-radius: 50%; margin-left: -6px; }

.country-fixed { margin: 0 0 14px; }
.x-logo { font-weight: 700; margin-right: 4px; }
.country-pill { margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }

/* buy */
.grid { display: grid; grid-template-columns: 400px 1fr; gap: 22px; align-items: start; }
.buy-card { position: sticky; top: 84px; }
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  max-height: 280px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  display: none; box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.combo.open .combo-list { display: block; }
.combo-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); font-size: 14px; }
.combo-list li.hl, .combo-list li:hover { background: var(--line); }
.combo-list li.empty { color: var(--muted); cursor: default; }
.price-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.price { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.col-head h2 { margin: 0; }

.order {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px; display: grid; gap: 12px;
}
.order.done { border-color: rgba(25,216,255,.35); }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-svc { font-weight: 600; }
.order-meta { color: var(--muted); font-size: 13px; }
.number { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 22px; font-weight: 700; }
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(25,216,255,.08); border: 1px solid rgba(25,216,255,.35); border-radius: 11px; padding: 12px 14px;
}
.code { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.full-sms { color: var(--muted); font-size: 13px; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.order-actions { display: flex; gap: 8px; justify-content: flex-end; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--accent); border-color: rgba(25,216,255,.35); }
.pill.bad { color: var(--danger); border-color: #4d2020; }
.pill.live { color: var(--warn); border-color: #4d3d10; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .mono, .mono { font-family: var(--mono); }
.table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.table td.empty { color: var(--muted); text-align: center; padding: 24px; }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 4px; }
.stat .s { color: var(--muted); font-size: 12px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; max-height: 94vh; overflow: auto; }
.close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; }
.dep-amount { font-family: var(--mono); font-size: 30px; font-weight: 700; text-align: center; color: var(--accent); word-break: break-all; }
.qr { display: grid; place-items: center; margin: 16px auto; background: #fff; padding: 12px; border-radius: 12px; width: fit-content; }
.qr img, .qr canvas { display: block; width: 200px; height: 200px; }
.copyline { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; margin: 6px 0 4px; }
.copyline code { font-family: var(--mono); font-size: 12px; word-break: break-all; flex: 1; }
.dep-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: var(--accent-ink); font-size: 34px; font-weight: 700; display: grid; place-items: center; margin: 6px auto 16px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.bad { border-color: #4d2020; color: var(--danger); }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .nav { order: 3; width: 100%; }
  .balance-label { display: none; }
  main { padding: 20px 16px 60px; }
  .auth { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
  .auth-card { justify-self: stretch; max-width: none; }
  .grid { grid-template-columns: 1fr; }
  .buy-card { position: static; }
  .number { font-size: 19px; }
  .search { width: 140px; }
}

.manual { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.manual summary { cursor: pointer; font-size: 14px; color: var(--text); }
.manual .copyline input { margin: 0; border: 0; padding: 4px 0; background: transparent; font-family: var(--mono); font-size: 12px; }
.manual.saved summary::after { content: ' ✓'; color: var(--accent); }

/* guide */
.guide { max-width: 760px; margin: 0 auto; }
.guide h1 { font-size: clamp(26px, 4vw, 36px); }
.guide .lead { color: var(--muted); font-size: 16px; margin: -4px 0 20px; }
.guide a { color: var(--accent); }
.guide-before ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.steps > li { display: flex; gap: 16px; align-items: flex-start; }
.steps p { margin: 0 0 8px; color: var(--text); }
.steps h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.steps .best { border-color: rgba(25,216,255,.45); box-shadow: 0 0 0 1px rgba(25,216,255,.15), 0 10px 40px rgba(26,109,255,.12); }
.step-num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; }
kbd { font-family: var(--mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }

.center-link { justify-content: center; text-decoration: none; text-align: center; }

.dep-total { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(25,216,255,.08); border: 1px solid rgba(25,216,255,.25); font-family: var(--mono); font-weight: 700; text-align: center; }
