/* ============================================================
   The Ideal Card — Complete Stylesheet
   NFC Smart Business Cards — Part of The Ideal Brands Ecosystem
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #03030A;
  --bg-secondary: #08080F;
  --bg-tertiary: #0D0D1A;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.13);
  --glass: rgba(255,255,255,0.04);
  --text-primary: rgba(240,244,255,0.96);
  --text-secondary: rgba(240,244,255,0.58);
  --text-muted: rgba(240,244,255,0.3);
  --accent: #6744DA;
  --accent-hover: #8B6DE8;
  --accent-dark: #4F2FC0;
  --accent-dim: rgba(103,68,218,0.1);
  --accent-border: rgba(103,68,218,0.3);
  --green: #10B981;
  --green-light: #34d399;
  --danger: #F43F5E;
  --amber: #F59E0B;
  --cyan: #22d3ee;
  --violet: #A855F7;
  --pink: #EC4899;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'Satoshi', 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: var(--font); }

/* Native <select> dropdown lists are drawn by the OS in light mode by default,
   so inherited white text lands on a white popup. color-scheme flips the popup
   to dark; the option rule is an explicit fallback (and covers Firefox). */
select { color-scheme: dark; }
select option, select optgroup { background-color: var(--bg-tertiary); color: var(--text-primary); }
[data-theme="light"] select { color-scheme: light; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; }
.page-wrapper { padding-top: 64px; min-height: 100vh; position: relative; z-index: 1; }

/* ============================================================
   NAVIGATION — Marketing Pages
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.navbar.scrolled {
  background: rgba(3,3,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.nav-logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo-text span {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--accent-hover); background: var(--accent-dim); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.nav-mobile-toggle svg { width: 20px; height: 20px; }
.header-mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.header-mobile-toggle svg { width: 20px; height: 20px; }

/* Header (used in index.html & app pages) */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  height: 64px;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.header.scrolled {
  background: rgba(3,3,10,0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom-color: var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700;
  text-decoration: none;
}
.header-logo svg { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.2s;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--text-primary); background: var(--bg-card-hover);
}
.header-actions { display: flex; align-items: center; gap: 12px; }

/* AI Search Button & Overlay */
.ai-search-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; font-family: var(--font); white-space: nowrap; }
.ai-search-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.ai-search-btn .ai-search-label { opacity: 0.7; }
.ai-search-btn .ai-search-kbd { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); margin-left: 4px; font-family: 'SF Mono', 'JetBrains Mono', monospace; }
.ai-search-btn:hover { border-color: var(--accent); color: var(--text-primary); background: rgba(103,68,218,0.08); }
[data-theme="light"] .ai-search-btn { background: rgba(103,68,218,0.04); border-color: rgba(103,68,218,0.15); }
[data-theme="light"] .ai-search-btn:hover { background: rgba(103,68,218,0.08); border-color: var(--accent); }
[data-theme="light"] .ai-search-btn .ai-search-kbd { background: rgba(103,68,218,0.06); border-color: rgba(103,68,218,0.12); color: var(--accent); }

.ai-search-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); align-items: flex-start; justify-content: center; padding-top: min(20vh, 160px); }
.ai-search-overlay.open { display: flex; }
.ai-search-modal { width: 100%; max-width: 600px; margin: 0 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); box-shadow: 0 24px 80px rgba(0,0,0,0.5); overflow: hidden; }
.ai-search-input-wrap { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ai-search-input-wrap svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.ai-search-input-wrap input { flex: 1; border: none; background: none; color: var(--text-primary); font-size: 16px; font-family: var(--font); outline: none; }
.ai-search-input-wrap input::placeholder { color: var(--text-muted); }
.ai-search-input-wrap .ai-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 4px; background: linear-gradient(135deg, var(--accent), #a855f7); color: #fff; white-space: nowrap; }
.ai-search-results { padding: 8px; max-height: 360px; overflow-y: auto; }
.ai-search-group-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 8px 12px 4px; }
.ai-search-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .15s; color: var(--text-secondary); font-size: 14px; text-decoration: none; }
.ai-search-item:hover, .ai-search-item.active { background: rgba(103,68,218,0.1); color: var(--text-primary); }
.ai-search-item svg { width: 16px; height: 16px; opacity: 0.5; flex-shrink: 0; }
.ai-search-item span { flex: 1; }
.ai-search-item .ai-search-type { font-size: 11px; color: var(--text-muted); }
.ai-search-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.ai-search-footer kbd { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); font-family: 'SF Mono', monospace; }
[data-theme="light"] .ai-search-modal { background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,0.15); }
[data-theme="light"] .ai-search-item:hover, [data-theme="light"] .ai-search-item.active { background: rgba(103,68,218,0.06); }
[data-theme="light"] .ai-search-footer kbd { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 12px rgba(103,68,218,0.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(103,68,218,0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}
.btn-danger {
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.2);
  color: #fb7185;
}
.btn-danger:hover { background: rgba(244,63,94,0.2); }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 30% 20%, rgba(103,68,218,0.12), transparent),
    radial-gradient(ellipse 600px 500px at 70% 80%, rgba(34,211,238,0.06), transparent),
    radial-gradient(ellipse 500px 400px at 50% 50%, rgba(168,85,247,0.04), transparent);
  animation: meshFloat 12s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes meshFloat {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.05) translate(-10px, 15px); }
  100% { transform: scale(1) translate(10px, -10px); }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #6744DA, #22d3ee, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.hero-stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   SECTIONS — Generic
   ============================================================ */
.section {
  padding: 100px 24px;
  position: relative;
}
.section-sm { padding: 60px 24px; }
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--accent-dim);
  color: var(--accent-hover);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.green { background: rgba(16,185,129,0.1); color: #10B981; }
.feature-icon.amber { background: rgba(245,158,11,0.1); color: #F59E0B; }
.feature-icon.cyan { background: rgba(34,211,238,0.1); color: #22d3ee; }
.feature-icon.pink { background: rgba(236,72,153,0.1); color: #ec4899; }
.feature-icon.violet { background: rgba(168,85,247,0.1); color: #A855F7; }
.feature-icon.blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Feature list (deep-dive pages) */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}
.feature-detail:last-child { border-bottom: none; }
.feature-detail.reverse { direction: rtl; }
.feature-detail.reverse > * { direction: ltr; }
.feature-detail-content h3 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.feature-detail-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.feature-detail-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.feature-detail-visual .placeholder-icon {
  width: 80px;
  height: 80px;
  color: var(--accent);
  opacity: 0.5;
}
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.check-list li svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.pricing-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all 0.3s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}
.pricing-card.featured {
  border-color: var(--accent-border);
  background: rgba(103,68,218,0.04);
  position: relative;
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pricing-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}
.pricing-amount {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pricing-period {
  font-size: 14px;
  color: var(--text-muted);
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.pricing-features li svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex-shrink: 0;
}
.pricing-features li.disabled {
  color: var(--text-muted);
}
.pricing-features li.disabled svg {
  color: var(--text-muted);
}

/* ============================================================
   HOW IT WORKS — Steps
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all 0.3s;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-hover);
  margin: 0 auto 18px;
}
.step-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   USE CASES
   ============================================================ */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.usecase-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
}
.usecase-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.usecase-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 28px;
}
.usecase-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.usecase-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.usecase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.usecase-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.testimonial-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.testimonial-name {
  font-size: 13px;
  font-weight: 600;
}
.testimonial-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-section h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.cta-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer, .site-footer {
  padding: 60px 24px 120px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(6, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
  margin-top: 12px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dash-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 20px 8px 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-dim); color: var(--accent-hover); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg { opacity: 1; }

.sidebar-brands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 12px;
  margin-top: 4px;
}
.sidebar-brand-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar-brand-btn:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-1px); }
.sidebar-brand-btn .brand-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-btn .brand-dot svg { width: 14px; height: 14px; }
.sidebar-brand-btn span { font-size: 9px; font-weight: 600; color: var(--text-muted); text-align: center; }

/* Sidebar User */
.sidebar-user {
  padding: 16px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main Content Area */
.dash-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dash-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dash-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--danger); }

/* Dashboard Cards/Panels */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.dash-card-title {
  font-size: 14px;
  font-weight: 700;
}
.dash-card-body { padding: 22px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: rgba(16,185,129,0.1); color: #10B981; border: 1px solid rgba(16,185,129,0.2); }
.badge-amber { background: rgba(245,158,11,0.1); color: #F59E0B; border: 1px solid rgba(245,158,11,0.2); }
.badge-red { background: rgba(244,63,94,0.1); color: #fb7185; border: 1px solid rgba(244,63,94,0.2); }
.badge-blue { background: rgba(59,130,246,0.1); color: #60A5FA; border: 1px solid rgba(59,130,246,0.2); }
.badge-violet { background: rgba(168,85,247,0.1); color: #c084fc; border: 1px solid rgba(168,85,247,0.2); }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 12px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.activity-item:hover { background: rgba(255,255,255,0.04); }
.activity-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 14px;
}
.activity-item-info { flex: 1; }
.activity-item-title { font-size: 13px; font-weight: 600; }
.activity-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.activity-item-value { font-size: 14px; font-weight: 700; }

/* Chart Placeholder */
.chart-placeholder {
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   PRODUCT / CARD CATALOG GRID
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}
.product-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.product-image {
  width: 100%;
  height: 120px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 32px;
}
.product-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.product-category { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price { font-size: 16px; font-weight: 700; color: var(--accent-hover); }
.product-stock { font-size: 11px; color: var(--text-muted); }
.product-stock.low { color: var(--danger); }

/* ============================================================
   ANALYTICS
   ============================================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.breakdown-list { display: flex; flex-direction: column; gap: 14px; }
.breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.breakdown-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.breakdown-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.5s ease;
}
.breakdown-label { font-size: 13px; font-weight: 600; min-width: 60px; }
.breakdown-value { font-size: 13px; color: var(--text-muted); min-width: 40px; text-align: right; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-section {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.settings-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.settings-section > p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 500; }
.settings-row-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle Switch */
.toggle {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle.active { background: var(--accent); }
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle.active::after { transform: translateX(20px); }

/* Filter/Search Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px 10px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus { border-color: var(--accent-border); }
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.filter-select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

/* Form elements */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--accent-border);
  background: rgba(103,68,218,0.04);
  box-shadow: 0 0 0 3px rgba(103,68,218,0.08);
}
.input:hover:not(:focus) { border-color: var(--border-hover); }
select.input { appearance: none; cursor: pointer; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; right: 0;
  min-width: 180px; padding: 6px;
  background: rgba(10,10,18,0.96);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: none; z-index: 50;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 14px; color: var(--text-secondary);
  transition: all 0.15s; width: 100%;
}
.dropdown-item:hover { background: rgba(103,68,218,0.08); color: var(--text-primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(244,63,94,0.1); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.blog-card-image {
  height: 180px;
  background: linear-gradient(135deg, rgba(103,68,218,0.15), rgba(34,211,238,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.blog-card-body { padding: 24px; }
.blog-card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent-hover);
  margin-bottom: 12px;
}
.blog-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.blog-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.blog-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Blog Article */
.article-header {
  padding: 120px 24px 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 720px;
  margin: 0 auto 16px;
}
.article-meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* Article layout with TOC */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  align-items: start;
}
.article-body {
  max-width: 720px;
  min-width: 0;
}
.article-toc {
  position: sticky;
  top: 80px;
  padding: 20px 0;
}
.article-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.article-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.article-toc-list a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}
.article-toc-list a:hover {
  color: var(--text-secondary);
}
.article-toc-list a.active {
  color: var(--accent-hover);
  border-left-color: var(--accent);
}
.article-toc-list a.toc-h3 {
  padding-left: 24px;
  font-size: 12px;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.article-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
  color: var(--text-secondary);
}
.article-body li {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}


/* ============================================================
   ANIMATIONS — Scroll-triggered
   ============================================================ */

/* --- Scroll reveal: fade-up --- */
.fade-in,
.section-header,
.article-header,
.cta-section h2,
.cta-section p {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.is-visible,
.section-header.is-visible,
.article-header.is-visible,
.cta-section h2.is-visible,
.cta-section p.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Staggered grid reveal --- */
.stagger > * {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger.is-visible > *:nth-child(1) { transition-delay: 0.0s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: 0.48s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: 0.56s; }
.stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --- Slide-up (manual trigger) --- */
.slide-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.slide-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scale-in for hero content --- */
.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 2s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s infinite; }

/* ============================================================
   BACKGROUND EFFECTS — Floating Orbs, Grain, Mesh Glow
   ============================================================ */

/* --- Grain overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
[data-theme="light"] body::before {
  opacity: 0.05;
}

/* --- Floating orbs container --- */
.orb-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* --- Individual orbs --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  will-change: transform;
}

.orb-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(103,68,218,0.7), transparent 65%);
  top: -15%;
  left: -10%;
  animation: orbFloat1 20s ease-in-out infinite alternate;
}
.orb-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(34,211,238,0.6), transparent 65%);
  top: 25%;
  right: -15%;
  animation: orbFloat2 25s ease-in-out infinite alternate;
}
.orb-3 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(168,85,247,0.6), transparent 65%);
  bottom: 5%;
  left: 15%;
  animation: orbFloat3 22s ease-in-out infinite alternate;
}
.orb-4 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.5), transparent 65%);
  top: 55%;
  right: 20%;
  animation: orbFloat4 18s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(150px, 200px) scale(1.2); }
  66%  { transform: translate(-80px, 100px) scale(0.9); }
  100% { transform: translate(120px, -80px) scale(1.15); }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-180px, 140px) scale(1.15); }
  66%  { transform: translate(100px, -120px) scale(0.85); }
  100% { transform: translate(-130px, 180px) scale(1.1); }
}
@keyframes orbFloat3 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(120px, -150px) scale(1.2); }
  66%  { transform: translate(-140px, 80px) scale(0.9); }
  100% { transform: translate(80px, -120px) scale(1.12); }
}
@keyframes orbFloat4 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-100px, -130px) scale(1.18); }
  66%  { transform: translate(130px, 100px) scale(0.88); }
  100% { transform: translate(-60px, 150px) scale(1.08); }
}

/* Light mode orbs — bold */
[data-theme="light"] .orb { opacity: 0.22; filter: blur(70px); }

/* --- Section mesh glow (behind key sections) --- */
.section {
  position: relative;
}
.section::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}
.section:nth-child(odd)::before {
  background: var(--accent);
  top: -100px;
  right: -100px;
}
.section:nth-child(even)::before {
  background: var(--cyan);
  bottom: -100px;
  left: -100px;
}
[data-theme="light"] .section::before {
  opacity: 0.08;
}

/* Ensure content sits above orbs */
.hero, .section, .cta-section, .footer, .site-footer,
.article-header, .article-layout, .page-wrapper {
  position: relative;
  z-index: 1;
}
.navbar, .header {
  z-index: 200;
}

/* Live dot */
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   MOBILE SIDEBAR
   ============================================================ */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 150;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.sidebar-toggle svg { width: 20px; height: 20px; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  /* Sidebar collapses */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay.active { display: block; }
  .dash-main { margin-left: 0; padding: 24px 16px; padding-top: 64px; }

  /* Feature detail stacks */
  .feature-detail { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail.reverse { direction: ltr; }

  /* Nav — mobile menu */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(3,3,10,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 2px;
  }
  .nav-links.mobile-open { display: flex; }
  .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; }
  .nav-mobile-toggle { display: flex; }
  .nav-actions { display: none; }
  .header-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(3,3,10,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 2px;
  }
  .header-nav.mobile-open { display: flex; }
  .header-nav a { padding: 12px 16px; font-size: 15px; }
  .header-actions { display: none; }
  .header-mobile-toggle { display: flex; }

  .hero { min-height: 70vh; padding: 100px 20px 60px; }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { min-height: auto; padding: 80px 16px 48px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-badge { font-size: 11px; padding: 6px 14px; }
  .hero-img { max-width: 260px; margin: 0 auto; }
  .hero-price { font-size: 28px; }
  .section-title { font-size: 28px; }
  .article-header h1 { font-size: 28px; }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-toc { display: none; }
  .navbar { padding: 0 16px; }
  .product-grid { grid-template-columns: 1fr !important; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .cta-section { padding: 48px 20px; }
  .cta-section h2 { font-size: 24px; }
  .pd-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pd-tabs::-webkit-scrollbar { display: none; }
  .pd-tab { white-space: nowrap; padding: 14px 16px; font-size: 13px; }
  .pricing-toggle { flex-wrap: wrap; justify-content: center; }
  .partner-tier-grid, .tier-grid { grid-template-columns: 1fr !important; }
  .comparison-table { font-size: 13px; }
  .comparison-table th, .comparison-table td { padding: 10px 8px; }

  /* Force inline 2-col grids to stack on mobile */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Spec tables / detail grids */
  .spec-grid, .detail-grid, .dg-spec-grid, .dg-spec-row { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  /* Container — tighter side padding */
  .container { padding: 0 16px; }

  /* Sections — reduce vertical padding */
  .section { padding: 64px 16px; }
  .section-sm { padding: 40px 16px; }
  .section-header { margin-bottom: 36px; }

  /* Hero — smaller type */
  .hero { padding: 72px 16px 40px; }
  .hero h1 { font-size: 22px; line-height: 1.25; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 16px; }
  .hero-stat-value { font-size: 22px; }
  .hero-stat-label { font-size: 11px; }

  /* Section titles */
  .section-title { font-size: 22px; }
  .section-desc { font-size: 14px; }

  /* Buttons — slightly smaller at this width */
  .btn { padding: 9px 16px; font-size: 13px; }
  .btn-lg { padding: 12px 22px; font-size: 14px; }

  /* Grids — single column for anything still multi-col */
  .product-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  /* CTA */
  .cta-section { padding: 36px 16px; }
  .cta-section h2 { font-size: 20px; }

  /* Navbar */
  .navbar { padding: 0 12px; }

  /* Article */
  .article-header h1 { font-size: 22px; }

  /* Dashboard */
  .dash-main { padding: 16px 12px; padding-top: 60px; }
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --bg-primary: #FAFAFF;
  --bg-secondary: #F0F0FA;
  --bg-tertiary: #E8E8F4;
  --bg-card: rgba(103,68,218,0.03);
  --bg-card-hover: rgba(103,68,218,0.06);
  --bg-input: rgba(103,68,218,0.04);
  --border: rgba(103,68,218,0.10);
  --border-hover: rgba(103,68,218,0.18);
  --glass: rgba(255,255,255,0.7);
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A72;
  --text-muted: #9A9AB0;
  --accent: #6744DA;
  --accent-hover: #5A38C8;
  --accent-dark: #4F2FC0;
  --accent-dim: rgba(103,68,218,0.08);
  --accent-border: rgba(103,68,218,0.20);
}

/* Nav — light: transparent until scroll */
[data-theme="light"] .navbar,
[data-theme="light"] .header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
[data-theme="light"] .navbar.scrolled,
[data-theme="light"] .header.scrolled {
  background: rgba(245,243,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 4px rgba(103,68,218,0.08);
  border-bottom-color: rgba(103,68,218,0.10);
}

/* Logo — dark text + purple icon for light bg */
[data-theme="light"] .nav-logo img,
[data-theme="light"] .header-logo img {
  content: url("../img/logo.svg");
}

/* Footer logo — always white version */
.footer-logo img {
  height: 24px;
  margin-bottom: 16px;
}

/* Gradient text — deeper purple for light bg */
[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #5A38C8, #3B1F99, #6744DA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero — softer radials */
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 800px 600px at 30% 20%, rgba(103,68,218,0.08), transparent),
    radial-gradient(ellipse 600px 500px at 70% 80%, rgba(34,211,238,0.05), transparent),
    radial-gradient(ellipse 500px 400px at 50% 50%, rgba(168,85,247,0.04), transparent);
}
[data-theme="light"] .hero::after {
  background-image:
    linear-gradient(rgba(103,68,218,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103,68,218,0.04) 1px, transparent 1px);
}

/* Buttons — ensure contrast */
[data-theme="light"] .btn-primary {
  color: #fff;
}
[data-theme="light"] .btn-ghost {
  color: var(--text-primary);
  border-color: var(--border-hover);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(103,68,218,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* Feature cards — subtle border in light */
[data-theme="light"] .feature-card {
  border: 1px solid rgba(103,68,218,0.08);
}
[data-theme="light"] .feature-card:hover {
  border-color: rgba(103,68,218,0.16);
  box-shadow: 0 4px 20px rgba(103,68,218,0.06);
}

/* CTA section */
[data-theme="light"] .cta-section {
  background: var(--bg-tertiary);
}

/* Footer */
.footer, .site-footer {
  background: var(--bg-primary);
}
[data-theme="light"] .footer,
[data-theme="light"] .site-footer {
  background: #E8E5F5;
  color: #1A1A2E;
  border-top: 1px solid rgba(103,68,218,0.10);
}
[data-theme="light"] .footer-brand h4 {
  color: #1A1A2E;
}
[data-theme="light"] .footer-brand p {
  color: #6E6E88;
}
[data-theme="light"] .footer h5,
[data-theme="light"] .footer-col h5 {
  color: #8A8AA0;
}
[data-theme="light"] .footer-col a {
  color: #5A5A72;
}
[data-theme="light"] .footer-col a:hover {
  color: #6744DA;
}
[data-theme="light"] .footer-bottom {
  border-top-color: rgba(103,68,218,0.10);
  color: #9A9AB0;
}
[data-theme="light"] .footer-logo img {
  content: url("../img/logo.svg");
}

/* Scrollbar — light */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(103,68,218,0.15); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(103,68,218,0.25); }

/* Mobile nav overlay — light */
[data-theme="light"] .nav-links.mobile-open {
  background: rgba(255,255,255,0.97);
}
[data-theme="light"] .header-nav.mobile-open {
  background: rgba(255,255,255,0.97);
}

/* Blockquote */
[data-theme="light"] blockquote {
  border-left-color: var(--accent);
  background: rgba(103,68,218,0.04);
}

/* Badge overrides */
[data-theme="light"] .badge {
  background: rgba(103,68,218,0.08);
}

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
/* Show sun in dark mode, moon in light mode */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Cart button */
.cart-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}
.cart-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}
.cart-btn svg {
  width: 18px;
  height: 18px;
}
.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--bg-primary);
}

/* Dashboard / analytics sidebar — keep dark in light mode */
[data-theme="light"] .sidebar {
  background: #1A1A2E;
  color: rgba(240,244,255,0.96);
}
[data-theme="light"] .sidebar a { color: rgba(240,244,255,0.58); }
[data-theme="light"] .sidebar a:hover,
[data-theme="light"] .sidebar a.active { color: rgba(240,244,255,0.96); }

/* Pricing / product cards — add subtle shadow */
[data-theme="light"] .pricing-card,
[data-theme="light"] .product-card {
  border: 1px solid rgba(103,68,218,0.08);
  box-shadow: 0 2px 12px rgba(103,68,218,0.04);
}
[data-theme="light"] .pricing-card:hover,
[data-theme="light"] .product-card:hover {
  box-shadow: 0 4px 24px rgba(103,68,218,0.08);
}

/* Stat cards in light */
[data-theme="light"] .stat-card {
  border: 1px solid rgba(103,68,218,0.08);
}

/* ============================================================ */
/* Dashboard role switcher (Personal <-> Partner) */
/* ============================================================ */
.dash-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--bg-card-hover, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: 10px;
}
.dash-switcher-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.dash-switcher-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.dash-switcher-btn:hover {
  color: var(--text-primary);
}
.dash-switcher-btn.active {
  background: var(--accent);
  color: #fff;
  cursor: default;
}
.dash-switcher-btn.active:hover {
  color: #fff;
}
