:root {
  --bg: #05070d;
  --panel: rgba(255,255,255,.035);
  --line: rgba(255,255,255,.1);
  --text: #f4f6fb;
  --muted: #8b93a7;
  --blue: #3b82f6;
  --blue-2: #1d4ed8;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59,130,246,.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(14,165,233,.12), transparent 50%),
    var(--bg);
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift { to { transform: translateY(64px); } }
.orb {
  position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35;
  pointer-events: none; z-index: 0; animation: floatOrb 12s ease-in-out infinite alternate;
}
.orb-a { width: 420px; height: 420px; left: -120px; top: 120px; background: #1d4ed8; }
.orb-b { width: 320px; height: 320px; right: -80px; top: 40%; background: #0ea5e9; animation-delay: -4s; }
@keyframes floatOrb { to { transform: translateY(-40px) scale(1.08); } }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.topbar {
  position: sticky; top: 16px; z-index: 50; margin: 16px auto 0; max-width: 1120px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 14px;
  background: rgba(5,7,13,.72); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  animation: barIn .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes barIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700;
  font-family: Syne, sans-serif; letter-spacing: -.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); }
.top-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.top-links a, .top-links button {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  color: #d1d5db; background: transparent; font: inherit; font-weight: 600; font-size: 13px;
  padding: 10px 14px; border-radius: 999px; transition: .2s ease;
}
.top-links a:hover, .top-links button:hover, .top-links a.active { color: #fff; background: rgba(255,255,255,.08); }
.top-links .ghost { border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.top-links .solid { background: #fff; color: #000; }
.top-links .solid:hover { background: #e5e7eb; color: #000; }
.top-links .admin-link { color: #fbbf24; }
.page-head { padding: 48px 0 18px; animation: rise .7s both; }
.page-head h1 {
  margin: 0 0 10px; font-family: Syne, sans-serif; font-weight: 800;
  font-size: clamp(32px, 6vw, 52px); letter-spacing: -.04em; line-height: 1;
}
.page-head p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 640px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero { padding: 64px 0 24px; text-align: center; animation: rise .8s both; }
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(59,130,246,.35);
  background: rgba(59,130,246,.12); color: #93c5fd; font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 14px; font-family: Syne, sans-serif; font-weight: 800;
  font-size: clamp(40px, 8vw, 72px); letter-spacing: -.04em; line-height: .95;
}
.hero p { margin: 0 auto 24px; max-width: 640px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
  color: #fff; background: rgba(255,255,255,.06); position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .55s ease, opacity .2s ease;
}
.btn:hover::after { opacity: 1; transform: translateX(120%); }
.btn-primary {
  background: linear-gradient(135deg, #60a5fa 0%, var(--blue) 45%, var(--blue-2) 100%);
  box-shadow: 0 4px 0 rgba(15,23,42,.5), 0 14px 36px rgba(29,78,216,.4);
  border: 1px solid rgba(147,197,253,.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(15,23,42,.5), 0 18px 44px rgba(59,130,246,.45); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(15,23,42,.5), 0 8px 20px rgba(29,78,216,.35); }
.btn-secondary {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: rgba(147,197,253,.35); background: rgba(59,130,246,.1); }
.btn-danger {
  background: linear-gradient(135deg, rgba(248,113,113,.25), rgba(239,68,68,.15));
  border-color: rgba(248,113,113,.45); color: #fecaca;
  box-shadow: 0 8px 24px rgba(239,68,68,.15);
}
.btn-danger:hover { transform: translateY(-1px); border-color: rgba(252,165,165,.55); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.warn {
  margin: 18px auto 0; max-width: 720px; text-align: left;
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08);
  color: #fde68a; font-size: 14px; line-height: 1.45;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); margin-top: 18px; }
.card {
  grid-column: span 12; background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  padding: 22px; backdrop-filter: blur(10px); animation: rise .75s both;
  transition: border-color .25s ease, background .25s ease;
}
.card:hover { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.05); }
@media (min-width: 860px) {
  .span-7 { grid-column: span 7; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-4 { grid-column: span 4; }
}
.card h2, .card h3 { margin: 0 0 8px; font-family: Syne, sans-serif; letter-spacing: -.02em; }
.card h2 { font-size: 22px; }
.card h3 { font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line);
}
.badge.active { color: var(--ok); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.badge.grace { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }
.badge.expired, .badge.rejected { color: var(--muted); }
.badge.trial, .badge.pending_review, .badge.awaiting_receipt { color: #93c5fd; border-color: rgba(147,197,253,.35); background: rgba(59,130,246,.1); }
.badge.fulfilled { color: var(--ok); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.key-list, .order-list { display: grid; gap: 12px; margin-top: 14px; }
.key-item, .order-item {
  padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.25);
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link-row input {
  flex: 1 1 220px; min-width: 0; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #070a12; color: #fff; padding: 0 12px; font-size: 13px;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.chip-btn:hover {
  background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.4);
  transform: translateY(-1px); box-shadow: 0 8px 20px rgba(29,78,216,.15);
}
.chip-btn:active { transform: translateY(0); }
.chip-btn.solid {
  background: linear-gradient(135deg, #fff, #e5e7eb); color: #0f172a; border-color: #fff;
  font-weight: 700;
}
.chip-btn.solid:hover { filter: brightness(1.03); box-shadow: 0 8px 24px rgba(255,255,255,.12); }
.chip-btn.danger {
  border-color: rgba(248,113,113,.45); color: #fecaca;
  background: rgba(248,113,113,.08);
}
.chip-btn.danger:hover { background: rgba(248,113,113,.18); border-color: rgba(252,165,165,.5); }
.form-grid { display: grid; gap: 12px; margin-top: 12px; }
.form-grid label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.form-grid select, .form-grid textarea, .form-grid input[type="file"] {
  width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #070a12;
  color: #fff; padding: 12px; font: inherit;
}
.price { font-size: 28px; font-family: Syne, sans-serif; font-weight: 800; letter-spacing: -.03em; }
.tariffs, .setups, .nav-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 12px; }
.mini, .nav-card {
  padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.22);
  text-decoration: none; color: inherit; display: block; transition: .2s ease;
}
.nav-card:hover { border-color: rgba(59,130,246,.45); transform: translateY(-2px); }
.mini strong, .nav-card strong { display: block; margin-bottom: 6px; font-family: Syne, sans-serif; }
.mini span, .mini p, .nav-card p { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 0; }
.receipt-thumb {
  max-width: 100%; max-height: 280px; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px;
}
.bot-note {
  margin-top: 18px; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--line);
  color: var(--muted); font-size: 14px;
}
.bot-note a { color: #fff; }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, rgba(15,23,42,.95), rgba(30,41,59,.95));
  color: #f8fafc; padding: 12px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; z-index: 200; opacity: 0; pointer-events: none;
  transition: .28s cubic-bezier(.22,1,.36,1);
  border: 1px solid rgba(147,197,253,.25);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06) inset;
  backdrop-filter: blur(12px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }
.field { display: grid; gap: 8px; margin-top: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.field select, .field input {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: #070a12; color: #fff; padding: 0 14px; font: inherit;
}
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 120px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: #d1d5db; font: inherit; font-weight: 700; cursor: pointer;
}
.seg button.active { background: #fff; color: #000; border-color: #fff; }
.price-box {
  margin-top: 16px; padding: 16px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(0,0,0,.28);
}
.drop {
  position: relative; margin-top: 14px; padding: 28px 18px; text-align: center;
  border-radius: 18px; border: 1px dashed rgba(255,255,255,.22); background: rgba(0,0,0,.22);
  transition: .2s ease;
}
.drop.drag { border-color: rgba(59,130,246,.6); background: rgba(59,130,246,.08); }
.drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.admin-list { display: grid; gap: 12px; margin-top: 14px; }
.admin-item {
  padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.25);
}
.receipt-preview { margin: 12px 0; }
.receipt-preview img {
  display: block; max-width: 100%; max-height: 320px; border-radius: 14px;
  border: 1px solid var(--line); background: #000;
}
.setup-list { display: grid; gap: 12px; margin-top: 12px; }
.setup-item {
  padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.22);
}
.pick-grid {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 12px;
}
.pick-grid.pick-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pick-card {
  appearance: none; text-align: left; cursor: pointer;
  padding: 16px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(0,0,0,.28); color: inherit; font: inherit;
  transition: .2s ease; display: grid; gap: 6px; min-height: 110px;
}
.pick-card:hover { border-color: rgba(59,130,246,.45); transform: translateY(-2px); }
.pick-card.active {
  border-color: rgba(59,130,246,.7);
  background: linear-gradient(160deg, rgba(59,130,246,.22), rgba(0,0,0,.35));
  box-shadow: 0 0 0 1px rgba(59,130,246,.25), 0 16px 40px rgba(29,78,216,.18);
}
.pick-card.locked { opacity: .72; cursor: default; }
.pick-card.locked:hover { transform: none; }
.pick-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  font-family: Syne, sans-serif; font-weight: 800; font-size: 14px; color: #93c5fd;
}
.trial-card {
  border-color: rgba(251,191,36,.4) !important;
  background: linear-gradient(160deg, rgba(251,191,36,.12), rgba(255,255,255,.03)) !important;
}
.trial-card .btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 12px 30px rgba(217,119,6,.35);
  white-space: nowrap;
}
#heroTrialBtn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.pick-card span:last-child { color: var(--muted); font-size: 13px; line-height: 1.4; }
@media (max-width: 720px) {
  .topbar { border-radius: 22px; align-items: flex-start; flex-direction: column; }
  .top-links { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Custom modal (confirm / prompt) ── */
.vpn-modal-root {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(2, 6, 14, .72);
  backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.vpn-modal-root.is-open { opacity: 1; visibility: visible; }
.vpn-modal {
  position: relative; width: 100%; max-width: 420px;
  padding: 28px 26px 22px; border-radius: 28px;
  border: 1px solid rgba(147,197,253,.2);
  background: linear-gradient(165deg, rgba(15,23,42,.96) 0%, rgba(5,7,13,.98) 55%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 32px 80px rgba(0,0,0,.55),
    0 0 60px rgba(59,130,246,.12);
  transform: scale(.92) translateY(12px);
  transition: transform .32s cubic-bezier(.22,1,.36,1);
}
.vpn-modal-root.is-open .vpn-modal { transform: scale(1) translateY(0); }
.vpn-modal-glow {
  position: absolute; top: -40%; left: 50%; width: 280px; height: 200px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle, rgba(59,130,246,.35), transparent 70%);
  filter: blur(20px); opacity: .7;
}
.vpn-modal-icon {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(59,130,246,.15); box-shadow: 0 8px 24px rgba(29,78,216,.25);
}
.vpn-modal-root[data-variant="warn"] .vpn-modal-icon {
  background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35);
  box-shadow: 0 8px 24px rgba(217,119,6,.2);
}
.vpn-modal-root[data-variant="success"] .vpn-modal-icon {
  background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.35);
  box-shadow: 0 8px 24px rgba(16,185,129,.2);
}
.vpn-modal-root[data-variant="danger"] .vpn-modal-icon {
  background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.35);
  box-shadow: 0 8px 24px rgba(239,68,68,.2);
}
.vpn-modal-title {
  margin: 0 0 8px; font-family: Syne, sans-serif; font-size: 22px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15; position: relative;
}
.vpn-modal-msg {
  margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.55; position: relative;
}
.vpn-modal-input {
  width: 100%; margin: 0 0 18px; min-height: 48px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line); background: #070a12; color: #fff;
  font: inherit; font-size: 14px; position: relative;
}
.vpn-modal-input:focus {
  outline: none; border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
.vpn-modal-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; position: relative;
}
.vpn-modal-actions .btn { min-height: 44px; flex: 1 1 120px; }
.vpn-modal-actions .btn-secondary { flex: 0 1 auto; min-width: 100px; }
@media (max-width: 400px) {
  .vpn-modal-actions .btn { flex: 1 1 100%; }
}
