/* ============================================================
   EdgeSyncDB — Main Stylesheet
   Futuristic · Dark · Mobile-First · SaaS
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:         #030712;
  --bg2:        #070f1f;
  --bg3:        #0d1a35;
  --glass:      rgba(7, 15, 31, 0.85);
  --glass2:     rgba(13, 26, 53, 0.7);

  --cyan:       #00d4ff;
  --cyan2:      #38bdf8;
  --cyan-dim:   rgba(0, 212, 255, 0.15);
  --cyan-glow:  rgba(0, 212, 255, 0.35);
  --violet:     #7c3aed;
  --violet2:    #a78bfa;
  --violet-dim: rgba(124, 58, 237, 0.2);
  --pink:       #f0abfc;
  --emerald:    #10b981;
  --amber:      #f59e0b;

  --border:     rgba(0, 212, 255, 0.12);
  --border-hi:  rgba(0, 212, 255, 0.4);

  --text:       #f0f9ff;
  --text2:      #94a3b8;
  --text3:      #475569;
  --danger:     #f87171;

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;

  --shadow:  0 8px 48px rgba(0,0,0,0.6);
  --glow-sm: 0 0 28px rgba(0,212,255,0.15);
  --glow-md: 0 0 52px rgba(0,212,255,0.25);
  --glow-lg: 0 0 90px rgba(0,212,255,0.35);

  --t: 0.22s ease;
  --t-slow: 0.4s ease;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--cyan);
}

/* ── CANVAS ─────────────────────────────────────────────── */
#bg-canvas {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
  opacity: 0.55;
}

/* ── GRADIENTS ──────────────────────────────────────────── */
.grad-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet2) 50%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 20px;
  transition: background var(--t), box-shadow var(--t);
}
.navbar.scrolled {
  background: rgba(3,7,18,0.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 10px;
}
.logo-text {
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--cyan), var(--violet2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text2);
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.nav-links a:not(.nav-btn-ghost):not(.nav-btn-primary):hover {
  color: var(--text); background: rgba(255,255,255,0.05);
}
.nav-btn-ghost {
  border: 1px solid var(--border-hi) !important;
  color: var(--cyan) !important;
  padding: 8px 18px !important;
}
.nav-btn-ghost:hover { background: var(--cyan-dim) !important; }
.nav-btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet)) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  font-weight: 700 !important;
  border-radius: var(--r-sm);
  box-shadow: 0 0 24px var(--cyan-glow);
  transition: all var(--t) !important;
}
.nav-btn-primary:hover {
  box-shadow: 0 0 40px var(--cyan-glow) !important;
  transform: translateY(-1px);
}
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all var(--t);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.04em;
  margin-bottom: 28px;
  animation: fadeUp .4s ease both;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-dot 2s ease infinite;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
  animation: fadeUp .45s ease both .05s;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text2); max-width: 560px;
  margin-bottom: 36px; line-height: 1.7;
  animation: fadeUp .5s ease both .1s;
}

.hero-cta {
  display: flex; flex-wrap: wrap;
  gap: 12px; justify-content: center;
  margin-bottom: 56px;
  animation: fadeUp .55s ease both .15s;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; font-weight: 700; font-size: 0.95rem;
  border-radius: var(--r-md); border: none; cursor: pointer;
  box-shadow: 0 0 36px var(--cyan-glow), 0 4px 16px rgba(0,0,0,0.4);
  transition: all var(--t);
  position: relative; overflow: hidden;
  text-decoration: none; font-family: inherit;
}
.btn-primary::before {
  content: '';
  position: absolute; top: -50%; left: -80%;
  width: 260%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .7s ease;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 60px var(--cyan-glow), 0 8px 28px rgba(0,0,0,0.5);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:active { transform: translateY(-1px); }
.btn-primary.btn-lg { padding: 16px 34px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--text2); font-weight: 600; font-size: 0.95rem;
  border-radius: var(--r-md); cursor: pointer;
  transition: all var(--t);
  text-decoration: none; font-family: inherit;
}
.btn-ghost:hover {
  color: var(--cyan); border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}
.btn-ghost.btn-lg { padding: 16px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-ghost.btn-full { width: 100%; justify-content: center; }

/* ── TERMINAL ────────────────────────────────────────────── */
.hero-terminal {
  width: 100%; max-width: 620px;
  background: rgba(3,7,18,0.92);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--r-xl);
  box-shadow: var(--glow-md), 0 24px 80px rgba(0,0,0,0.7);
  overflow: hidden;
  margin-bottom: 56px;
  animation: fadeUp .6s ease both .2s;
  text-align: left;
}
.terminal-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.t-dots { display: flex; gap: 6px; }
.t-dots span {
  width: 12px; height: 12px; border-radius: 50%;
}
.t-dots span:nth-child(1) { background: #ff5f57; }
.t-dots span:nth-child(2) { background: #ffbd2e; }
.t-dots span:nth-child(3) { background: #28ca41; }
.t-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--text3);
  flex: 1; text-align: center; margin-right: 60px;
}
.terminal-code {
  padding: 22px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; line-height: 1.9;
  color: var(--text2);
  overflow-x: auto;
  white-space: pre;
}
.c-comment { color: #475569; }
.c-key     { color: var(--violet2); }
.c-str     { color: #86efac; }
.c-cyan    { color: var(--cyan); }
.terminal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}
.t-status {
  display: flex; align-items: center; gap: 7px;
  color: var(--emerald); font-weight: 500;
}
.t-dot-green {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
}
.t-latency { color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* ── HERO STATS ─────────────────────────────────────────── */
.hero-stats {
  display: flex; flex-wrap: wrap;
  gap: 0; justify-content: center;
  animation: fadeUp .65s ease both .25s;
}
.stat-item { padding: 10px 28px; text-align: center; }
.stat-num {
  font-size: 1.9rem; font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--cyan), var(--violet2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-num span { font-size: 1.1rem; }
.stat-label { font-size: 0.75rem; color: var(--text3); font-weight: 500; margin-top: 2px; letter-spacing: 0.03em; }
.stat-divider { width: 1px; background: var(--border); align-self: stretch; margin: 6px 0; }

/* ── SECTION ─────────────────────────────────────────────── */
.section { position: relative; z-index: 1; padding: 100px 20px; }
.section-dark { background: rgba(7,15,31,0.6); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.18em; color: var(--cyan);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900; line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.05rem; color: var(--text2);
  max-width: 560px; line-height: 1.7;
  margin-bottom: 52px;
}

/* ── FEATURES GRID ──────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.feature-large { grid-column: 1 / 3; }

.feature-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px;
  backdrop-filter: blur(20px);
  transition: all var(--t-slow);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(0,212,255,0.07), transparent 60%);
  opacity: 0; transition: opacity var(--t-slow);
}
.feature-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--glow-sm), var(--shadow);
  transform: translateY(-4px);
}
.feature-card:hover::before { opacity: 1; }

.feat-icon-wrap {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--cyan-dim), var(--violet-dim));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan); margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 10px; color: var(--text);
}
.feature-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.65; }
.feat-tag {
  display: inline-block; margin-top: 14px; margin-right: 6px;
  padding: 3px 10px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; color: var(--cyan);
  letter-spacing: 0.03em;
}

/* ── HOW IT WORKS ────────────────────────────────────────── */
.steps-grid {
  display: flex; align-items: center;
  gap: 0; flex-wrap: wrap;
  justify-content: center;
}
.step-card {
  flex: 1; min-width: 220px; max-width: 300px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 26px;
  backdrop-filter: blur(20px);
  text-align: center;
  transition: all var(--t-slow);
}
.step-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--glow-sm);
  transform: translateY(-4px);
}
.step-number {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
  color: var(--cyan); margin-bottom: 18px;
}
.step-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-dim), var(--violet-dim));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; color: var(--cyan2);
}
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 0.875rem; color: var(--text2); line-height: 1.65; }
.step-pill {
  margin-top: 16px;
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--emerald);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 4px 12px; border-radius: 999px;
}
.step-connector {
  padding: 0 10px; flex-shrink: 0;
  opacity: 0.5;
}

/* ── PRICING ──────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; align-items: start;
}
.price-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  backdrop-filter: blur(20px);
  position: relative;
  transition: all var(--t-slow);
}
.price-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--glow-sm);
  transform: translateY(-4px);
}
.price-featured {
  border-color: rgba(0,212,255,0.35) !important;
  background: linear-gradient(145deg, rgba(0,212,255,0.07), rgba(124,58,237,0.07)) !important;
  box-shadow: var(--glow-md) !important;
  transform: scale(1.03);
}
.price-featured:hover { transform: scale(1.03) translateY(-4px) !important; }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 4px 16px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-radius: 999px;
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.1em; color: #fff;
  white-space: nowrap;
}
.price-plan {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--text2);
  text-transform: uppercase; margin-bottom: 12px;
}
.price-amount {
  font-size: 2.6rem; font-weight: 900;
  letter-spacing: -0.04em; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--violet2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-currency { font-size: 1.4rem; font-weight: 700; }
.price-period { font-size: 0.9rem; font-weight: 500; color: var(--text3); -webkit-text-fill-color: var(--text3); }
.price-desc { font-size: 0.875rem; color: var(--text2); margin-bottom: 24px; }
.price-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 11px; }
.price-features li { font-size: 0.875rem; color: var(--text2); display: flex; align-items: center; gap: 10px; }
.pf-check { color: var(--emerald); font-size: 0.85rem; flex-shrink: 0; }
.pf-x { color: var(--text3); font-size: 0.85rem; flex-shrink: 0; }
.pricing-note {
  text-align: center; margin-top: 32px;
  font-size: 0.875rem; color: var(--text2);
}
.pricing-note strong { color: var(--cyan); }

/* ── CTA BANNER ──────────────────────────────────────────── */
.cta-banner {
  position: relative; z-index: 1;
  padding: 90px 20px;
  text-align: center;
  overflow: hidden;
}
.cta-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.12), transparent 70%);
  pointer-events: none;
}
.cta-banner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.cta-banner p { font-size: 1rem; color: var(--text2); margin-bottom: 32px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 56px 20px 28px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 48px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand { flex: 1; min-width: 240px; }
.footer-brand p { font-size: 0.875rem; color: var(--text2); margin-top: 14px; line-height: 1.6; max-width: 260px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text); text-transform: uppercase; margin-bottom: 4px; }
.footer-col a { font-size: 0.875rem; color: var(--text2); transition: color var(--t); }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text3);
}
.footer-status { display: flex; align-items: center; gap: 7px; color: var(--emerald); font-weight: 500; }

/* ── AUTH PAGES ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 40px;
  position: relative; z-index: 1;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow), var(--glow-sm);
  animation: fadeUp .4s ease both;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-mark { margin: 0 auto 10px; }
.auth-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; text-align: center; }
.auth-sub { font-size: 0.875rem; color: var(--text2); text-align: center; margin-bottom: 28px; }
.auth-sub a { color: var(--cyan); font-weight: 500; }
.auth-sub a:hover { text-decoration: underline; }

/* Form fields */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text2); margin-bottom: 8px;
}
.field input {
  width: 100%; padding: 12px 16px;
  background: rgba(3,7,18,0.8);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: var(--r-md);
  font-family: inherit; font-size: 0.93rem;
  color: var(--text); transition: all var(--t);
}
.field input::placeholder { color: var(--text3); }
.field input:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(0,212,255,0.04);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12), 0 0 20px rgba(0,212,255,0.08);
}
.field-hint { font-size: 0.75rem; color: var(--text3); margin-top: 5px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text3); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.8rem; color: var(--text3); }
.auth-footer a { color: var(--cyan); }

/* ── DASHBOARD ───────────────────────────────────────────── */
.dash-layout {
  display: flex; min-height: 100vh;
  position: relative; z-index: 1;
}

/* Sidebar */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: rgba(7,15,31,0.95);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  transition: transform var(--t-slow);
}
.sidebar-logo { padding: 10px 8px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all var(--t); text-decoration: none;
}
.sidebar-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.sidebar-item.active {
  color: var(--cyan); background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
}
.sidebar-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text3); text-transform: uppercase;
  padding: 14px 12px 6px;
}
.sidebar-footer {
  border-top: 1px solid var(--border); padding-top: 14px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 0.825rem; font-weight: 600; color: var(--text); }
.user-plan { font-size: 0.7rem; color: var(--cyan); font-weight: 500; }

/* Main content */
.dash-main {
  flex: 1; margin-left: 240px;
  padding: 32px;
  min-height: 100vh;
  overflow-x: hidden;
}
.dash-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-bottom: 30px;
}
.dash-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-subtitle { font-size: 0.875rem; color: var(--text2); margin-top: 3px; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px;
  backdrop-filter: blur(16px);
  transition: all var(--t);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  opacity: 0; transition: opacity var(--t);
}
.stat-card:hover { border-color: var(--border-hi); box-shadow: var(--glow-sm); }
.stat-card:hover::after { opacity: 1; }
.stat-card-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text2); margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.stat-card-label svg { width: 14px; height: 14px; color: var(--cyan); }
.stat-card-value {
  font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--text2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-card-sub { font-size: 0.75rem; color: var(--text3); margin-top: 5px; }
.stat-card-sub .up { color: var(--emerald); }
.stat-card-sub .down { color: var(--danger); }

/* Usage bar */
.usage-bar-wrap { margin-top: 10px; }
.usage-bar-track {
  height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 999px; overflow: hidden;
}
.usage-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: width 1s ease;
}

/* Dashboard cards */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.dash-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
}
.dash-card-title {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text2); margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.dash-card-title a { font-size: 0.75rem; color: var(--cyan); font-weight: 500; text-transform: none; letter-spacing: 0; }

/* API Key box */
.api-key-box {
  display: flex; align-items: center; gap: 10px;
  background: rgba(3,7,18,0.8);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.api-key-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; color: var(--cyan); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-btn {
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: var(--r-sm);
  padding: 6px 12px; cursor: pointer;
  font-size: 0.75rem; font-weight: 600; color: var(--cyan);
  transition: all var(--t); font-family: inherit; white-space: nowrap;
}
.copy-btn:hover { background: rgba(0,212,255,0.25); }

/* Activity list */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
}
.activity-badge {
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.badge-push { background: rgba(16,185,129,0.12); color: var(--emerald); border: 1px solid rgba(16,185,129,0.25); }
.badge-pull { background: rgba(0,212,255,0.1); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.activity-desc { flex: 1; color: var(--text2); }
.activity-desc strong { color: var(--text); font-weight: 600; }
.activity-time { color: var(--text3); flex-shrink: 0; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 200;
  width: 40px; height: 40px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer;
  align-items: center; justify-content: center; color: var(--text);
}

/* ── MISC ────────────────────────────────────────────────── */
.hide-sm { display: block; }

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--emerald); }
  50%       { opacity: .6; box-shadow: 0 0 16px var(--emerald); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET ≤ 900px
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-large { grid-column: 1 / -1; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin: 0 auto; }
  .price-featured { transform: none; }
  .price-featured:hover { transform: translateY(-4px) !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; align-items: stretch; }
  .step-connector { transform: rotate(90deg); display: flex; justify-content: center; }

  /* Sidebar collapse */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.6); }
  .dash-main { margin-left: 0; padding: 72px 16px 24px; }
  .sidebar-toggle { display: flex; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE ≤ 600px
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .navbar { padding: 0 14px; }
  .nav-inner { height: 60px; }
  .nav-links {
    display: none; flex-direction: column;
    position: fixed; inset: 0; top: 60px;
    background: rgba(3,7,18,0.98);
    backdrop-filter: blur(24px);
    padding: 24px 20px;
    gap: 8px; border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 1rem; border-radius: var(--r-md); }
  .nav-links .nav-btn-primary, .nav-links .nav-btn-ghost {
    margin-top: 8px; text-align: center; display: block; padding: 14px !important;
  }
  .nav-hamburger { display: flex; }

  .hero { padding: 100px 16px 60px; }
  .hero-sub br { display: none; }
  .hide-sm { display: none; }
  .hero-stats { gap: 0; }
  .stat-item { padding: 10px 16px; }
  .stat-divider { display: none; }

  .section { padding: 70px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card-value { font-size: 1.5rem; }

  .auth-card { padding: 28px 20px; }

  .hero-terminal { border-radius: var(--r-lg); }
  .terminal-code { font-size: 0.75rem; padding: 16px; }
  .t-title { display: none; }

  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-links { gap: 24px; }

  .dash-main { padding: 64px 12px 20px; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE ≤ 380px
══════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .hero-title { font-size: 2.2rem; }
  .hero-cta { flex-direction: column; }
  .btn-primary.btn-lg, .btn-ghost.btn-lg { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 16px; }
}
