:root {
  --bg: #0b0f17;
  --bg-alt: #10161f;
  --surface: #131b27;
  --surface-hover: #182233;
  --border: #232f42;
  --text: #e7ecf3;
  --text-muted: #94a3b8;
  --primary: #3ba9ff;
  --primary-dark: #2384d1;
  --accent: #7c5cff;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 12px;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.brand-mark {
  color: var(--primary);
  font-size: 1.3rem;
}

.brand-name strong { color: var(--primary); font-weight: 700; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-register {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.nav-register:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

.inline-form { display: inline; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #04121f;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse at top, rgba(59, 169, 255, 0.12), transparent 60%);
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-inner { max-width: 780px; }

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  text-align: center;
  font-size: 1.9rem;
  margin: 0 0 40px;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--primary); transform: translateY(-2px); }

.product-icon { font-size: 2rem; margin-bottom: 12px; }
.product-card h3 { margin: 0 0 12px; font-size: 1.3rem; }
.product-card p { color: var(--text-muted); margin: 0 0 16px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-list li {
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
  font-size: 0.92rem;
}
.feature-list li::before {
  content: "✓";
  color: var(--success);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.cta-inner { text-align: center; }
.cta-inner h2 { font-size: 1.9rem; margin: 0 0 12px; }
.cta-inner p { color: var(--text-muted); margin: 0 0 28px; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  padding: 72px 0 48px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(124, 92, 255, 0.12), transparent 60%);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 16px; }
.page-hero .hero-sub { max-width: 680px; }

/* ---------- Pricing ---------- */
.pricing-grid { align-items: stretch; }

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(59,169,255,0.08), var(--surface) 40%);
}
.pricing-card .badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--primary);
  color: #04121f;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0;
}
.pricing-card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.pricing-card .price {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 20px;
}
.pricing-card .price span {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-card .feature-list { flex: 1; }
.fine-print { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 32px; }

/* ---------- Auth ---------- */
.auth-section { padding: 72px 0; }
.auth-container { display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.auth-card h1 { margin: 0 0 8px; font-size: 1.6rem; }
.auth-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 0.95rem; }

.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}
.auth-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.95rem;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
}
.auth-form .btn { margin-top: 22px; }

.auth-switch {
  text-align: center;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.auth-switch a { color: var(--primary); font-weight: 600; }

.alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}
.alert-error ul { margin: 0; padding-left: 18px; }

/* ---------- Dashboard ---------- */
.dashboard-header { margin-bottom: 32px; }
.dashboard-header h1 { margin: 4px 0 0; font-size: 1.9rem; }
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.dashboard-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.dashboard-main { flex: 1; min-width: 0; }

.dashboard-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 96px;
}
.dashboard-sidebar h3 {
  margin: 0 0 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-nav a.active { background: var(--surface-hover); color: var(--primary); font-weight: 600; }

.status-grid .dash-card { text-align: center; }
.status-grid .status { margin-top: 8px; }
.roadmap-grid .dash-card h3 { font-size: 1rem; }

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.dash-card h3 { margin: 0 0 16px; font-size: 1.1rem; }
.muted { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 16px; }

.service-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
}
.status {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.status-active { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.status-pending { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.status-suspended { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.account-info { margin: 0; }
.account-info dt { color: var(--text-muted); font-size: 0.8rem; margin-top: 12px; }
.account-info dt:first-child { margin-top: 0; }
.account-info dd { margin: 2px 0 0; font-size: 0.95rem; }

/* ---------- Error pages ---------- */
.error-page { text-align: center; padding: 120px 0; }
.error-page h1 { font-size: 3rem; margin: 0 0 12px; color: var(--primary); }
.error-page p { color: var(--text-muted); margin: 0 0 28px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; text-align: center; color: var(--text-muted); font-size: 0.8rem; margin: 16px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 28px;
    gap: 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 14px; }
  .nav-auth { flex-direction: column; align-items: stretch; }
  .nav-auth .btn, .nav-auth form { width: 100%; }
  .nav-register { text-align: center; }

  .dashboard-layout { flex-direction: column; }
  .dashboard-sidebar { width: 100%; position: static; }
}