:root {
  --bg: #0e0e11;
  --bg-2: #131318;
  --panel: #17171c;
  --panel-2: #1c1c22;
  --text: #f3f3f5;
  --muted: #9094a0;
  --border: #26262e;
  --accent: #e8222e;
  --accent-hover: #ff2f3c;
  --on: #25c46a;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(232,34,46,0.16), transparent 55%),
    radial-gradient(800px 600px at 0% 100%, rgba(232,34,46,0.12), transparent 60%);
}

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.lg { padding: 14px 26px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.brand { font-weight: 800; font-size: 20px; letter-spacing: .3px; position: relative; z-index: 2; }
.brand span { color: var(--accent); }
.accent { color: var(--accent); }

/* --- nav --- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  background: rgba(14,14,17,0.8); backdrop-filter: blur(8px);
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; }

/* --- hero --- */
.hero {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 70px 24px 60px;
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.hero-inner { max-width: 620px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent);
  background: rgba(232,34,46,0.12); border: 1px solid rgba(232,34,46,0.3);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 46px; line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.5px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* hero art — стилизованное «кольцо анализа» как в ExitLag */
.hero-art { display: flex; justify-content: center; }
.ring {
  width: 280px; height: 280px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 50%, var(--panel) 60%, transparent 61%);
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(232,34,46,0.18) inset, 0 0 40px rgba(232,34,46,0.12);
}
.ring::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spin 4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ring .pct { font-size: 44px; font-weight: 800; color: var(--accent); }
.ring .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* --- sections --- */
.section { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 70px 24px; }
.section h2 { font-size: 32px; margin: 0 0 8px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 34px; }
.section > h2 + .grid, .section > h2 + .steps { margin-top: 34px; }

.grid { display: grid; gap: 18px; }
.features { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(232,34,46,0.12); font-size: 22px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.soon {
  font-size: 11px; font-weight: 700; color: var(--on);
  border: 1px solid rgba(37,196,106,0.4); background: rgba(37,196,106,0.1);
  padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}

/* --- steps --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step .num {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* --- pricing --- */
.pricing { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan h3 { font-size: 18px; margin: 0 0 6px; }
.plan .price { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan li { color: var(--muted); font-size: 14px; padding: 7px 0 7px 22px; position: relative; border-bottom: 1px solid var(--border); }
.plan li::before { content: "✓"; color: var(--accent); position: absolute; left: 0; font-weight: 800; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(232,34,46,0.12); }
.plan-badge {
  position: absolute; top: -11px; left: 24px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}

/* --- download --- */
.download { text-align: center; }
.dl-card {
  max-width: 560px; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: 18px; padding: 40px;
}
.dl-card h2 { text-align: center; }
.dl-card p { color: var(--muted); margin: 8px 0 22px; }
.dl-card .hint { font-size: 12px; margin-top: 18px; }

/* --- footer --- */
.footer {
  position: relative; z-index: 1; border-top: 1px solid var(--border);
  max-width: var(--max); margin: 40px auto 0; padding: 30px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer .muted, .muted { color: var(--muted); font-size: 13px; }
.footer .links a:hover { color: var(--text); }

/* --- auth page --- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-brand { position: absolute; top: 24px; left: 24px; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 28px;
}
.tabs { display: flex; gap: 6px; background: var(--panel-2); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.tab {
  flex: 1; padding: 9px; border: none; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 14px; border-radius: 8px; cursor: pointer;
}
.tab.active { background: var(--accent); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel-2); color: var(--text); font-size: 14px;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-msg { font-size: 13px; color: var(--accent); margin: 4px 0 0; min-height: 18px; opacity: 0; transition: opacity .2s; }
.auth-msg.show { opacity: 1; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 12px; }

/* --- responsive --- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero h1 { font-size: 36px; }
  .features, .steps, .pricing { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* --- cabinet / admin --- */
.cab { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 30px 24px 60px; }
.cab-title { font-size: 28px; margin: 0 0 4px; }
.cab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.cab .panel h2 { margin: 0 0 14px; font-size: 16px; }
.small { font-size: 12.5px; }
.auth-h { margin: 0 0 6px; font-size: 18px; }

.sub-box { margin-bottom: 16px; font-size: 14px; line-height: 1.7; }
.badge-on { display: inline-block; background: rgba(37,196,106,0.14); color: var(--on); border: 1px solid rgba(37,196,106,0.4); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.badge-off { display: inline-block; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }

.twofa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.twofa-row:first-of-type { border-top: none; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.totp-setup { padding: 12px 0; display: grid; gap: 8px; }
.qr { width: 160px; height: 160px; border-radius: 10px; background: #fff; padding: 6px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); color: var(--text); font-size: 14px; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; font-size: 12px; }

.plans-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.plan-mini { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.pm-term { font-weight: 700; font-size: 14px; }
.pm-disc { color: var(--on); font-size: 12px; }
.pm-price { font-size: 22px; font-weight: 800; margin: 6px 0 2px; }
.pm-btns { display: grid; gap: 6px; margin-top: 10px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stat-accent { border-color: rgba(232,34,46,0.4); }
.stat-val { font-size: 30px; font-weight: 800; }
.stat-lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.codes { background: var(--log-bg); color: var(--on); padding: 12px; border-radius: 10px; margin-top: 12px; font-family: 'Cascadia Code', monospace; font-size: 13px; white-space: pre-wrap; }

.seg { display: flex; gap: 6px; margin: 10px 0; }
.seg-btn { flex: 1; padding: 9px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 9px; font-weight: 700; cursor: pointer; }
.seg-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.linkbtn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; margin-top: 6px; }
.auth-msg.ok { color: var(--on); }

@media (max-width: 760px) {
  .cab-grid { grid-template-columns: 1fr; }
  .plans-row { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
}
