:root {
  --bg: #070b14;
  --bg-2: #0a1120;
  --panel: #0f172a;
  --panel-2: #131e36;
  --line: #20304f;
  --text: #e8eefc;
  --muted: #94a3bd;
  --brand: #5b8cff;
  --brand-2: #8b5cf6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: #8fb0ff; }
img { max-width: 100%; }
h1,h2,h3,h4 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.danger { color: var(--red); }
.success { color: var(--green); }
.gradient-text {
  background: linear-gradient(100deg, #7aa2ff 0%, #a78bfa 48%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn:hover { background: #1a2947; color: #fff; border-color: #2c4574; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 30px rgba(91,140,255,.25);
}
.btn-primary:hover { background: linear-gradient(100deg, #6d99ff, #9b75ff); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color: #ff9b9b; }
.btn-danger:hover { background: rgba(239,68,68,.2); color: #ffb4b4; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,11,20,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(32,48,79,.7);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.logo:hover { color: #fff; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(91,140,255,.35);
}
.logo-mark svg { width: 19px; height: 19px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 13px; color: #b7c4dd; border-radius: 8px; font-weight: 550; font-size: 14px; }
.nav-link:hover { background: rgba(91,140,255,.1); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 92px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: -40% 20% 30% -10%;
  background: radial-gradient(circle at 30% 40%, rgba(91,140,255,.22), transparent 60%),
              radial-gradient(circle at 70% 20%, rgba(139,92,246,.18), transparent 55%);
  filter: blur(20px); pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: rgba(91,140,255,.12); border: 1px solid rgba(91,140,255,.3);
  color: #a9c4ff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); margin: 22px 0 20px; letter-spacing: -.045em; }
.hero p.lead { font-size: 18px; color: #aebbd4; max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: 13px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 16px; height: 16px; color: var(--green); }
.hero-visual {
  position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 24px;
  background: linear-gradient(160deg, rgba(19,30,54,.95), rgba(10,17,32,.95)); box-shadow: var(--shadow);
}
.hero-visual .mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.hero-visual .big-amount { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.hero-visual .pay-box { border: 1px dashed #2b3e63; border-radius: 12px; padding: 14px; margin-top: 14px; background: rgba(91,140,255,.05); }
.hero-visual .pay-box .mono { font-size: 11px; word-break: break-all; color: #cbd7ee; }
.hero-visual .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(32,48,79,.6); font-size: 13px; }
.hero-visual .row:last-child { border-bottom: 0; }

/* Sections */
.section { padding: 78px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid rgba(32,48,79,.5); border-bottom: 1px solid rgba(32,48,79,.5); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { color: var(--muted); font-size: 16px; }

/* Plans */
.billing-toggle { display: inline-flex; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 30px; }
.billing-toggle button { border: 0; background: none; color: var(--muted); padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.billing-toggle button.active { background: var(--brand); color: #fff; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.plan-card {
  position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(19,30,54,.8), rgba(10,17,32,.85));
  display: flex; flex-direction: column; transition: .2s ease;
}
.plan-card:hover { transform: translateY(-4px); border-color: #355184; box-shadow: 0 20px 45px rgba(0,0,0,.3); }
.plan-card.popular { border-color: rgba(91,140,255,.6); box-shadow: 0 0 0 1px rgba(91,140,255,.25), 0 25px 60px rgba(91,140,255,.12); }
.plan-tag { position: absolute; top: -12px; right: 20px; background: linear-gradient(100deg,var(--brand),var(--brand-2)); color: #fff; font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.plan-name { font-size: 20px; font-weight: 750; }
.plan-tagline { color: var(--muted); font-size: 13px; min-height: 20px; }
.plan-price { margin: 20px 0 4px; font-size: 42px; font-weight: 800; letter-spacing: -.05em; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-features { list-style: none; padding: 0; margin: 22px 0 26px; flex: 1; }
.plan-features li { display: flex; gap: 10px; padding: 7px 0; color: #c6d1e8; font-size: 14px; }
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 800; }
.plan-desc { color: var(--muted); font-size: 13px; min-height: 40px; }

/* Feature grid */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(15,23,42,.55); transition: .2s;
}
.feature:hover { border-color: #355184; transform: translateY(-3px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(91,140,255,.2), rgba(139,92,246,.2)); color: #a9c4ff;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16px; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 13px; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 24px 24px 72px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15,23,42,.55); }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 24px;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #fff; font-weight: 800;
}
.step h3 { font-size: 17px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: rgba(15,23,42,.5); }
.faq summary { padding: 17px 20px; cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); margin: 0; font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 46px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #cdd8ef; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--muted); font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: var(--muted); font-size: 13px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; color: #73819b; font-size: 12px; flex-wrap: wrap; }

/* Cards, forms, tables */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(19,30,54,.8), rgba(10,17,32,.9)); padding: 24px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; }
.card.subtle { background: rgba(15,23,42,.45); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: #c6d1e8; }
input, select, textarea {
  width: 100%; background: #0a1222; color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; font: inherit; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,140,255,.13); }
textarea { min-height: 110px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand); }
.alert { padding: 13px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #ffadad; }
.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #92e6ae; }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #ffd591; }
.alert-info { background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.3); color: #bcd0ff; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 12px 14px; background: rgba(255,255,255,.03); color: #9eabc6; font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid rgba(32,48,79,.6); vertical-align: middle; }
tbody tr:hover { background: rgba(91,140,255,.04); }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.badge-green { background: rgba(34,197,94,.14); color: #7ee2a2; }
.badge-amber { background: rgba(245,158,11,.14); color: #ffd08a; }
.badge-red { background: rgba(239,68,68,.14); color: #ff9b9b; }
.badge-blue { background: rgba(91,140,255,.14); color: #a9c4ff; }
.badge-gray { background: rgba(148,163,189,.14); color: #b8c4da; }
.empty { padding: 34px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 50px 20px; position: relative; overflow: hidden; }
.auth-wrap::before { content:""; position:absolute; width:600px; height:600px; border-radius:50%; background:radial-gradient(circle,rgba(91,140,255,.16),transparent 65%); top:-200px; }
.auth-card { width: min(450px, 100%); position: relative; }
.auth-card h1 { font-size: 28px; }
.auth-alt { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* Client dashboard */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: rgba(15,23,42,.6); }
.stat-card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; }
.tabs a.active, .tabs a:hover { color: #fff; border-color: var(--brand); }

/* Invoice / payment */
.pay-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 20px; align-items: start; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(32,48,79,.6); gap: 14px; font-size: 14px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span:first-child { color: var(--muted); }
.amount-big { font-size: 38px; font-weight: 850; letter-spacing: -.05em; margin: 6px 0 2px; }
.qr-box { background: #fff; padding: 14px; border-radius: 12px; display: inline-block; }
.qr-box img, .qr-box canvas { display: block; width: 168px; height: 168px; }
.pay-method { border: 1px solid rgba(91,140,255,.4); background: rgba(91,140,255,.07); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.copy-row code { flex: 1; background: #08101f; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12px; word-break: break-all; color: #dbe6ff; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--amber); }
.credential { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(32,48,79,.6); font-size: 14px; }
.credential:last-child { border: 0; }
.secret { filter: blur(6px); user-select: none; transition: .2s; }
.secret.revealed { filter: none; }

/* Admin shell */
.admin-shell { display: grid; grid-template-columns: 238px 1fr; min-height: calc(100vh - 70px); }
.sidebar { border-right: 1px solid var(--line); background: var(--bg-2); padding: 22px 14px; }
.sidebar-group { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #6f7f9c; padding: 14px 12px 7px; font-weight: 800; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: #aebbd4; font-size: 14px; font-weight: 550; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(91,140,255,.12); color: #fff; }
.sidebar-link svg { width: 17px; height: 17px; opacity: .8; }
.admin-main { padding: 28px 32px 60px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 16px; }
.admin-topbar h1 { font-size: 26px; margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,var(--brand),var(--brand-2)); font-weight: 800; font-size: 13px; }

/* Misc */
.flash-stack { position: fixed; top: 82px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.flash { padding: 12px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; animation: slidein .25s ease; }
.flash.success { border-color: rgba(34,197,94,.5); }
.flash.error { border-color: rgba(239,68,68,.5); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #14203a; border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; z-index: 100; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin-bottom: 9px; }
.auth-code { background: #08101f; border: 1px solid var(--line); border-radius: 8px; padding: 13px; word-break: break-all; font-size: 12px; color: #cddcff; }
.prose h2 { font-size: 22px; margin-top: 26px; }
.prose p { color: #b9c6de; }

@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .grid-3, .steps, .grid-4, .stat-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .pay-grid, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: #0a1120; border-bottom: 1px solid var(--line); flex-direction: column; padding: 14px 20px; align-items: stretch; }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }
  .hero { padding: 64px 0; }
  .section { padding: 58px 0; }
  .grid-3, .steps, .grid-4, .stat-grid, .form-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-main { padding: 22px 18px 50px; }
  .footer-grid { grid-template-columns: 1fr; }
}
