/* =====================================================
   CortexShield AI — Stylesheet
   Unbounded + Inter fonts, mlsac-inspired dark design
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #09090f;
  --bg2:          #0d0d16;
  --bg3:          #12121e;
  --card:         rgba(255,255,255,0.025);
  --card-hover:   rgba(255,255,255,0.048);
  --border:       rgba(255,255,255,0.08);
  --border-hl:    rgba(139,92,246,0.35);

  --purple:       #8b5cf6;
  --purple-dim:   rgba(139,92,246,0.12);
  --purple-glow:  rgba(139,92,246,0.4);
  --violet:       #7c3aed;
  --emerald:      #10b981;
  --red:          #ef4444;
  --amber:        #f59e0b;
  --sky:          #38bdf8;

  --text:         #f0f0f8;
  --text-dim:     #9ca3af;
  --text-muted:   #4b5563;

  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-2xl:   32px;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--purple); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }
h1,h2,h3,h4 { line-height: 1.15; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.35); border-radius: 99px; }

/* ── Noise grain overlay ────────────────────────── */
.noise-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Radial glow blobs ──────────────────────────── */
.bg-glow {
  position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%; filter: blur(140px);
}
.bg-glow-1 { width:700px; height:700px; background:rgba(139,92,246,.09); top:-250px; left:-200px; }
.bg-glow-2 { width:600px; height:600px; background:rgba(59,130,246,.07); bottom:-150px; right:-150px; }
.bg-glow-3 { width:400px; height:400px; background:rgba(16,185,129,.05); top:40%; left:50%; transform:translateX(-50%); }

/* ── Container ──────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════
   NAVBAR — floating pill
   ═══════════════════════════════════════════════════ */
.nav-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 16px 24px;
  display: flex; justify-content: center;
}
.nav-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: rgba(18,18,28,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 999px;
  transition: background .2s;
  text-decoration: none;
}
.nav-brand:hover { background: rgba(255,255,255,0.04); opacity: 1; }
.nav-brand-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--purple), #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.nav-brand-name {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text); white-space: nowrap;
}
.brand-ai {
  background: linear-gradient(90deg, var(--purple), #a78bfa);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-sep {
  width: 1px; height: 20px;
  background: rgba(255,255,255,0.1); margin: 0 4px;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 6px 12px; border-radius: 999px;
  transition: color .2s, background .2s; text-decoration: none;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-btn-ghost {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  background: none; border: none; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-btn-cta {
  font-size: 13px; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.nav-btn-cta:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.25); }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero-section {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 110px 0 80px;
  overflow: hidden;
}
.hero-gradient-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.12) 0%, transparent 70%);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
  position: relative; z-index: 1;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.25);
  color: #a78bfa; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
  margin-bottom: 28px;
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--emerald);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.75)} }

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -.02em; color: var(--text);
  margin-bottom: 24px;
}
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #d4d4f8 40%, #a78bfa 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 16px; color: var(--text-dim); line-height: 1.7;
  max-width: 440px; margin-bottom: 28px;
}
.platform-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.platform-badge {
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  padding: 4px 14px; border-radius: 999px;
  letter-spacing: .03em;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cta-primary {
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  color: #0a0a0f; background: #e4e4f0;
  padding: 12px 24px; border-radius: 14px; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.cta-primary:hover { background: #fff; transform: translateY(-1px); }
.cta-glass {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.15);
  padding: 12px 24px; border-radius: 14px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.cta-glass:hover { border-color: rgba(255,255,255,0.28); transform: translateY(-1px); }
.hero-note { font-size: 13px; color: var(--text-muted); }
.hero-note-dot { color: var(--emerald); margin-right: 4px; }

/* ── Hero widget ────────────────────────────────── */
.hero-right { display: flex; justify-content: center; align-items: center; }
.widget-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-2xl);
  padding: 20px; width: 340px;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.widget-radar-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(8,8,20,0.6); margin-bottom: 14px;
}
#radarCanvas { width: 100%; display: block; border-radius: var(--radius-lg); }
.radar-label {
  position: absolute; bottom: 10px; left: 14px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  letter-spacing: .06em; text-transform: uppercase;
}
.feed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); flex-shrink:0; animation: pulse-dot 2s infinite; }
.widget-detect-toast {
  background: rgba(12,12,24,0.9); border: 1px solid rgba(239,68,68,0.28);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
}
.toast-top { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse-dot 1s infinite; flex-shrink:0; }
.toast-label { font-size: 10px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .07em; }
.toast-player { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.toast-detail { font-size: 12px; color: var(--text-dim); }
.toast-score { color: var(--amber); font-weight: 600; }
.widget-feed { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.widget-feed-hd {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
#feedItems { display: flex; flex-direction: column; gap: 6px; }
.feed-item { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.feed-item .name { color: var(--text); font-weight: 500; }
.feed-item .type { color: var(--red); font-size: 10px; font-weight: 600; }

/* ═══════════════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════════════ */
.stats-row {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 28px 0; background: rgba(255,255,255,0.015);
}
.stats-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.stat-cell { text-align: center; flex: 1; }
.stat-div-v { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }
.stat-n {
  display: block; font-family: var(--font-display);
  font-size: 30px; font-weight: 800; color: var(--text);
  line-height: 1; margin-bottom: 6px;
}
.stat-l { font-size: 12px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════════════════ */
.features-section { padding: 100px 0; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: #a78bfa; font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; margin-bottom: 18px;
}
.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800; letter-spacing: -.02em; color: var(--text); margin-bottom: 12px;
}
.section-p { font-size: 15px; color: var(--text-dim); max-width: 520px; }

.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 14px; margin-top: 52px;
}
.feat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); padding: 28px;
  transition: border-color .25s, background .25s, transform .2s;
  cursor: default;
}
.feat-card:hover {
  border-color: rgba(139,92,246,0.3);
  background: var(--card-hover);
  transform: translateY(-3px);
}
.feat-large {
  grid-column: 1 / 2; grid-row: 1 / 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 36px;
}
.feat-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.2);
  display: flex; align-items: center; justify-content: center;
  color: #a78bfa; margin-bottom: 20px;
  transition: border-color .25s, background .25s;
}
.feat-card:hover .feat-icon { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.35); }
.feat-large .feat-icon { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 28px; }
.feat-card h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}
.feat-large h3 { font-size: 22px; }
.feat-card p { font-size: 13px; color: var(--text-dim); line-height: 1.65; }
.feat-large p { font-size: 14px; }
.feat-tag {
  display: inline-block; margin-top: 18px;
  font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #a78bfa;
  background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.2);
  padding: 3px 10px; border-radius: 999px;
}

/* ═══════════════════════════════════════════════════
   HOW IT WORKS
   ═══════════════════════════════════════════════════ */
.hiw-section { padding: 100px 0; }
.hiw-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 52px; }
.hiw-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px;
  transition: border-color .25s, transform .2s;
}
.hiw-card:hover { border-color: rgba(139,92,246,0.28); transform: translateY(-2px); }
.hiw-num {
  font-family: var(--font-display); font-size: 44px; font-weight: 900;
  color: rgba(139,92,246,0.12); line-height: 1; margin-bottom: 18px;
}
.hiw-card h3 {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}
.hiw-card p { font-size: 13px; color: var(--text-dim); line-height: 1.65; }
.hiw-card code {
  font-family: var(--font-mono); font-size: 11px; color: #c4b5fd;
  background: rgba(139,92,246,0.1); padding: 1px 6px; border-radius: 4px;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand-name {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text);
}
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); opacity: 1; }

/* ═══════════════════════════════════════════════════
   BUTTONS (generic, used in modal + dashboard)
   ═══════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--purple), #6366f1);
  color: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius); border: none; cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s; white-space: nowrap;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(139,92,246,.35); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text-dim);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s; white-space: nowrap;
}
.btn-outline:hover { color: var(--text); border-color: rgba(139,92,246,.45); background: var(--purple-dim); }

/* ═══════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 36px; width: 100%; max-width: 420px;
  position: relative; animation: modal-in .25s cubic-bezier(.22,1,.36,1);
}
@keyframes modal-in { from{opacity:0;transform:scale(.95)} to{opacity:1;transform:scale(1)} }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: color .2s, background .2s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.07); }
.modal-logo { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 26px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; letter-spacing:.03em; }
.form-group input {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 14px;
  padding: 11px 14px; border-radius: var(--radius); outline: none;
  transition: border-color .2s;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus { border-color: rgba(139,92,246,.5); }
.form-btn { width: 100%; margin-top: 6px; padding: 12px; font-size: 14px; border-radius: 10px; }
.form-switch { margin-top: 14px; text-align: center; font-size: 13px; color: var(--text-dim); }
.form-switch a { color: var(--purple); cursor: pointer; }
.form-error { color: var(--red); font-size: 13px; margin-top: 8px; display: none; }
.form-error.show { display: block; }
.form-success { color: var(--emerald); font-size: 13px; margin-top: 8px; display: none; }
.form-success.show { display: block; }

/* ═══════════════════════════════════════════════════
   NOTIFICATION POPUPS
   ═══════════════════════════════════════════════════ */
#notif-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
}
.notif-popup {
  background: rgba(12,12,22,.95);
  border: 1px solid rgba(139,92,246,.22);
  border-left: 3px solid var(--purple);
  border-radius: 10px; padding: 12px 16px;
  min-width: 280px; max-width: 340px;
  backdrop-filter: blur(16px);
  animation: notif-in .35s cubic-bezier(.22,1,.36,1) forwards;
  pointer-events: auto;
}
.notif-popup.notif-out { animation: notif-out .3s ease forwards; }
@keyframes notif-in  { from{opacity:0;transform:translateX(28px)} to{opacity:1;transform:translateX(0)} }
@keyframes notif-out { to{opacity:0;transform:translateX(28px)} }
.notif-popup.level-high { border-left-color: var(--red); }
.notif-popup.level-med  { border-left-color: var(--amber); }
.notif-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.notif-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 4px;
}
.notif-badge.lvl-crit,.notif-badge.lvl-high { background: rgba(239,68,68,.14); color: var(--red); }
.notif-badge.lvl-med  { background: rgba(245,158,11,.14); color: var(--amber); }
.notif-badge.lvl-low  { background: var(--purple-dim); color: #a78bfa; }
.notif-time   { font-size: 11px; color: var(--text-muted); }
.notif-player { font-size: 14px; font-weight: 600; color: var(--text); }
.notif-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.notif-score  { color: var(--purple); font-weight: 600; }

/* ═══════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════ */
.dash-layout {
  min-height: 100vh;
  display: grid; grid-template-columns: 240px 1fr;
  background: var(--bg);
}

/* ── Sidebar ────────────────────────────────────── */
.sidebar {
  background: rgba(255,255,255,0.018); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 20px 16px 14px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.sidebar-logo:hover { opacity: 1; }
.sidebar-nav { padding: 10px 10px; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sidebar-section {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); padding: 14px 8px 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  cursor: pointer; text-decoration: none;
  transition: color .2s, background .2s;
}
.sidebar-item svg { flex-shrink: 0; opacity: .6; transition: opacity .2s; }
.sidebar-item:hover { color: var(--text); background: rgba(255,255,255,.05); opacity: 1; }
.sidebar-item:hover svg { opacity: 1; }
.sidebar-item.active { color: var(--text); background: var(--purple-dim); }
.sidebar-item.active svg { opacity: 1; color: var(--purple); }
.sidebar-bottom { padding: 10px; border-top: 1px solid var(--border); }

/* ── Main ───────────────────────────────────────── */
.dash-main { overflow-y: auto; min-height: 100vh; }
.dash-topbar {
  background: rgba(9,9,15,.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.dash-topbar-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.dash-topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user-name { font-size: 13px; color: var(--text-dim); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #fff;
}
.dash-content { padding: 28px; }

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 14px; margin-bottom: 14px;
}
.dash-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
  transition: border-color .25s;
}
.dash-card:hover { border-color: rgba(139,92,246,.22); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.card-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.card-icon.purple { background: var(--purple-dim); color: var(--purple); }
.card-icon.green  { background: rgba(16,185,129,.1); color: var(--emerald); }
.card-icon.blue   { background: rgba(56,189,248,.1); color: var(--sky); }
.card-icon.amber  { background: rgba(245,158,11,.1); color: var(--amber); }
.card-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); }
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.card-badge-ok   { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--emerald); background: rgba(16,185,129,.1); padding: 3px 8px; border-radius: 999px; margin-top: 8px; }
.card-badge-warn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--amber); background: rgba(245,158,11,.1); padding: 3px 8px; border-radius: 999px; margin-top: 8px; }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.card-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
}

/* Server table */
.server-table { width: 100%; border-collapse: collapse; }
.server-table th {
  font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.server-table td { padding: 11px 10px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.03); }
.server-table tr:last-child td { border-bottom: none; }
.key-value {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,.05); padding: 3px 9px; border-radius: 5px;
  display: inline-block; cursor: pointer; transition: background .2s; letter-spacing:.04em;
}
.key-value:hover { background: rgba(255,255,255,.1); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.status-dot::before { content:''; width:6px; height:6px; border-radius:50%; }
.status-dot.active  { color: var(--emerald); }
.status-dot.active::before { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.status-dot.inactive { color: var(--text-muted); }
.status-dot.inactive::before { background: var(--text-muted); }

/* Health */
.health-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
.health-item:last-child { border-bottom: none; }
.health-name { font-size: 13px; font-weight: 500; }
.health-val  { font-size: 12px; color: var(--text-dim); }
.health-ok   { color: var(--emerald); font-weight: 600; font-size: 12px; }
.health-warn { color: var(--amber);   font-weight: 600; font-size: 12px; }
.health-ok-box {
  margin-top: 12px; padding: 9px 12px;
  background: rgba(16,185,129,.05); border: 1px solid rgba(16,185,129,.15);
  border-radius: 8px; font-size: 12px; color: #6ee7b7;
}

/* Key box */
.key-box {
  background: rgba(139,92,246,.07); border: 1px solid rgba(139,92,246,.18);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.key-box-val {
  font-family: var(--font-mono); font-size: 15px; font-weight: 600;
  letter-spacing: .08em; color: #c4b5fd; flex: 1; word-break: break-all;
}
.key-copy-btn {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px; border-radius: 5px; transition: color .2s, background .2s;
  display: flex; align-items: center;
}
.key-copy-btn:hover { color: var(--text); background: rgba(255,255,255,.07); }
.inline-code {
  font-family: var(--font-mono); font-size: 11px; color: #c4b5fd;
  background: rgba(139,92,246,.1); padding: 1px 6px; border-radius: 4px;
}

/* Download */
.download-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--purple), #6366f1);
  color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 10px; border: none; cursor: pointer;
  text-decoration: none; width: 100%;
  transition: opacity .2s, transform .15s;
  margin-bottom: 10px;
}
.download-btn:hover { opacity: .88; transform: translateY(-1px); color: #fff; }

/* Doc links */
.doc-links { display: flex; flex-direction: column; gap: 7px; }
.doc-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; background: rgba(255,255,255,.02);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 13px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.doc-link:hover { border-color: rgba(139,92,246,.28); color: var(--text); opacity: 1; }

/* Setup steps */
.setup-steps { display: flex; flex-direction: column; gap: 10px; }
.setup-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px; background: rgba(255,255,255,.02);
  border: 1px solid var(--border); border-radius: 10px;
}
.step-circle {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--purple-dim); border: 1px solid rgba(139,92,246,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #a78bfa;
}
.setup-step h4 { font-family: var(--font-display); font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.setup-step p  { font-size: 12px; color: var(--text-dim); }
.setup-step code {
  font-family: var(--font-mono); font-size: 10px; color: #c4b5fd;
  background: rgba(139,92,246,.1); padding: 1px 5px; border-radius: 3px;
}

/* Recent detections */
.detections-list { display: flex; flex-direction: column; gap: 6px; }
.det-loading { font-size: 13px; color: var(--text-muted); padding: 16px 0; text-align: center; }
.det-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(255,255,255,.02);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 12px; transition: border-color .2s;
}
.det-item:hover { border-color: rgba(139,92,246,.2); }
.det-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
}
.det-high { background: rgba(239,68,68,.12); color: var(--red); }
.det-med  { background: rgba(245,158,11,.12); color: var(--amber); }
.det-info { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.det-nick { font-weight: 600; color: var(--text); font-size: 12px; }
.det-check { font-size: 10px; color: var(--purple); font-weight: 600; letter-spacing: .03em; }
.det-detail { flex: 1; font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.det-score { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.det-score span { color: var(--amber); font-weight: 600; }
.det-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feat-large { grid-column: 1 / -1; grid-row: auto; }
  .hiw-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-right { display: none; }
}
@media (max-width: 768px) {
  .nav-links, .nav-sep { display: none; }
  .nav-btn-ghost { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .hiw-grid { grid-template-columns: 1fr; }
  .stats-inner { flex-direction: column; gap: 16px; }
  .stat-div-v { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .det-detail, .det-time { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-h1 { font-size: 32px; }
}

/* ═══════════════════════════════════════════════════
   PRICING
   ═══════════════════════════════════════════════════ */
.pricing-section { padding: 100px 0; }
.pricing-grid {
  display: grid; grid-template-columns: 340px 420px;
  gap: 16px; margin-top: 52px; justify-content: center;
}
.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); padding: 36px;
  position: relative; transition: border-color .25s, transform .2s;
}
.pricing-card:hover { transform: translateY(-3px); }
.pricing-free  { border-color: var(--border); }
.pricing-enterprise {
  border-color: rgba(139,92,246,.35);
  background: rgba(139,92,246,.04);
  box-shadow: 0 0 60px rgba(139,92,246,.08);
}
.pricing-badge-top {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--purple), #6366f1);
  color: #fff; padding: 4px 14px; border-radius: 999px;
  white-space: nowrap;
}
.pricing-plan {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
.pricing-price {
  font-family: var(--font-display); font-size: 52px; font-weight: 900;
  color: var(--text); line-height: 1; margin-bottom: 4px;
}
.pricing-price span { font-size: 28px; font-weight: 700; }
.pricing-period { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.pricing-features li { font-size: 14px; display: flex; align-items: center; gap: 10px; }
.feat-yes { color: var(--text); }
.feat-yes::before { content: '✓'; color: var(--emerald); font-weight: 700; font-size: 13px; flex-shrink:0; }
.feat-no  { color: var(--text-muted); text-decoration: line-through; }
.feat-no::before  { content: '×'; color: var(--text-muted); font-weight: 700; font-size: 13px; flex-shrink:0; }
.pricing-btn {
  width: 100%; padding: 13px; border-radius: 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; font-family: var(--font-body);
}
.pricing-btn-primary {
  background: linear-gradient(135deg, var(--purple), #6366f1);
  color: #fff; border: none;
}
.pricing-btn-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(139,92,246,.35); }
.pricing-btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border);
}
.pricing-btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* Buy modal contact buttons */
.buy-contact-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: opacity .2s, transform .15s;
  color: #fff;
}
.buy-contact-btn:hover { opacity: .88; transform: translateY(-1px); color: #fff; }
.buy-tg { background: #229ED9; }
.buy-dc { background: #5865F2; }

/* License status banner in dashboard */
.license-banner {
  padding: 16px 20px; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 14px; margin-bottom: 0;
}
.lb-active  { background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.2); }
.lb-blocked { background: rgba(239,68,68,.06);  border: 1px solid rgba(239,68,68,.2);  }
.lb-expired { background: rgba(245,158,11,.06); border: 1px solid rgba(245,158,11,.2); }
.lb-free    { background: rgba(139,92,246,.06); border: 1px solid rgba(139,92,246,.2); }
.lb-icon { font-size: 24px; flex-shrink: 0; }
.lb-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.lb-desc  { font-size: 12px; color: var(--text-dim); }
.lb-action { margin-left: auto; flex-shrink: 0; }

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* Trial form */
.form-row-trial { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 600px) { .form-row-trial { grid-template-columns: 1fr; } }
