:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.6);
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --red: #dd0909;
  --red-500: #f93636;
  --red-400: #ff6a6a;
  --ok: #34d399;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before, body::after {
  content: ''; position: fixed; width: 50vw; height: 50vh; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0;
}
body::before { top: -10%; left: -10%; background: rgba(37, 99, 235, 0.12); }
body::after { bottom: -10%; right: -10%; background: rgba(221, 9, 9, 0.10); }
a { color: var(--blue-400); }
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
header.top img { height: 36px; width: auto; display: block; }
.pill {
  display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 900;
  letter-spacing: 0.18em; text-transform: uppercase; background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2); color: var(--blue-400);
}
.pill.red { background: rgba(221, 9, 9, 0.12); border-color: rgba(249, 54, 54, 0.3); color: var(--red-400); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(32px, 6vw, 60px); font-weight: 900; line-height: 1.05; }
h2 { font-size: clamp(26px, 4.5vw, 44px); font-weight: 900; line-height: 1.1; }
.grad { background: linear-gradient(90deg, var(--blue-400), var(--red-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dim { color: #64748b; }
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); font-weight: 300; max-width: 720px; margin: 16px auto 0; }
.center { text-align: center; }
section { padding: 48px 0; }
.ref { margin-top: 18px; color: var(--soft); font-size: 14px; }
.ref strong { color: #fff; }
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 36px; }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: 24px; padding: 28px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.4));
  border: 1px solid var(--line); backdrop-filter: blur(4px);
}
.card.popular { border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12); }
.card.big { border-color: rgba(249, 54, 54, 0.3); }
.badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.card h3 { font-size: 26px; font-weight: 800; }
.card .desc { color: var(--muted); margin: 8px 0 20px; }
.price { padding: 18px 20px; border-radius: 16px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, 0.05); margin-bottom: 20px; }
.price b { font-size: 44px; font-weight: 900; }
.price span { color: #64748b; font-weight: 500; }
ul.feat { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
ul.feat li { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); padding: 6px 0; }
ul.feat li::before { content: ''; flex: 0 0 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: rgba(59, 130, 246, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.card.big ul.feat li::before { background-color: rgba(249, 54, 54, 0.18); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f93636' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.btn { display: block; text-align: center; padding: 16px; border-radius: 16px; font-weight: 900; text-decoration: none; transition: background 0.2s, color 0.2s, transform 0.2s; }
.btn.buy { background: #fff; color: #020617; }
.btn.buy:hover { background: var(--red); color: #fff; }
.card.popular .btn.buy { background: var(--blue); color: #fff; }
.card.popular .btn.buy:hover { background: var(--red); }
.btn.apply { background: transparent; color: #fff; border: 1px solid rgba(249, 54, 54, 0.5); }
.btn.apply:hover { background: var(--red); }
footer { color: #64748b; font-size: 13px; padding: 40px 0 48px; text-align: center; }
footer a { color: var(--muted); }

/* dashboard */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border-radius: 20px; padding: 18px; background: var(--panel); border: 1px solid var(--line); }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.stat .v { font-size: clamp(24px, 4vw, 36px); font-weight: 900; margin-top: 6px; }
.stat.hi { border-color: rgba(249, 54, 54, 0.4); }
.stat .s { color: #64748b; font-size: 12px; margin-top: 4px; }
.box { border-radius: 20px; padding: 20px; background: var(--panel); border: 1px solid var(--line); margin-top: 18px; }
.box h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.copy { display: flex; gap: 10px; flex-wrap: wrap; }
.copy input { flex: 1 1 240px; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(2, 6, 23, 0.8); color: #fff; font: inherit; }
.copy button { padding: 12px 18px; border-radius: 12px; border: 0; background: var(--red); color: #fff; font-weight: 800; font: inherit; font-weight: 800; cursor: pointer; }
.tbl { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: var(--soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.tag.payable, .tag.active { background: rgba(52, 211, 153, 0.12); color: var(--ok); }
.tag.pending, .tag.past_due { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.tag.canceled, .tag.other { background: rgba(148, 163, 184, 0.12); color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; }
.note { color: var(--muted); font-size: 15px; }
.err { color: var(--red-400); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--red); animation: sp 0.8s linear infinite; margin: 40px auto 12px; }
@keyframes sp { to { transform: rotate(360deg); } }
