/* variables and base reset */
:root {
  --bg-dark: #0A0F1E;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-nav: rgba(10, 15, 30, 0.8);
  --bg-input: rgba(15, 23, 42, 0.8);
  --bg-section: rgba(15, 23, 42, 0.4);
  --bg-gradient-start: rgba(15, 23, 42, 0.8);
  --bg-gradient-end: rgba(99, 102, 241, 0.1);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-card: #E2E8F0;
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --accent: #06B6D4;
  --border: rgba(255, 255, 255, 0.1);
  --success: #10B981;
  --error: #EF4444;
}

[data-theme="light"] {
  --bg-dark: #F8FAFC;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-nav: rgba(248, 250, 252, 0.8);
  --bg-input: rgba(255, 255, 255, 0.8);
  --bg-section: rgba(240, 244, 248, 0.8);
  --bg-gradient-start: rgba(255, 255, 255, 0.9);
  --bg-gradient-end: rgba(99, 102, 241, 0.05);
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-card: #1E293B;
  --border: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Glassmorphism utilities */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.glass-nav {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* Typography */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-accent {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Animated Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Dashboard Sidebar */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-nav);
  z-index: 10;
}

.main-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 500;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

.flex-wrap { flex-wrap: wrap; }

@media (max-width: 1024px) {
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .bento-large { grid-column: span 1; }
  .bento-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 2rem !important; }
  
  .mockup-container { margin: 2rem auto 0; }
  .mockup-window { transform: rotateX(0) scale(1); }
  
  .timeline-step { flex-direction: column; gap: 1rem; }
  .timeline-step:not(:last-child)::after { display: none; }
  
  .btn { width: 100%; margin-bottom: 0.5rem; }
  .flex.gap-4.justify-center { flex-direction: column; }
  
  /* Disable pricing scale on mobile to prevent overlap */
  .scale-mobile-none { transform: none !important; margin: 2rem 0; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* =========================================
   PREMIUM UI/UX EXPANSION STYLES
   ========================================= */

/* Marquee Animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 2rem 0;
  display: flex;
}

.marquee-container::before,
.marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-dark), transparent);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-dark), transparent);
}

.marquee-content {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee 30s linear infinite;
  padding-left: 2rem;
}

.marquee-content.reverse {
  animation-direction: reverse;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.marquee-item {
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marquee-item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.bento-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(99, 102, 241, 0.3);
}

.bento-large {
  grid-column: span 2;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Dashboard Mockup Container */
.mockup-container {
  margin: 4rem auto 0;
  max-width: 900px;
  position: relative;
  perspective: 1000px;
}

.mockup-window {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.2);
  transform: rotateX(5deg) scale(0.95);
  transition: transform 0.5s ease;
}

.mockup-window:hover {
  transform: rotateX(0deg) scale(1);
}

.mockup-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

/* Timeline / How it works */
.timeline-step {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 3rem;
  bottom: -2rem;
  left: 1.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.step-number {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  z-index: 2;
}

/* FAQ Accordion */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--bg-card);
}

.accordion-header {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 1.125rem;
}

.accordion-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   PREMIUM DASHBOARD DESIGN SYSTEM — Linear/Vercel Grade
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: 256px;
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  overflow: hidden;
}

/* subtle noise texture overlay on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

/* ── Sidebar Brand ───────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.sidebar-brand:hover { background: rgba(255,255,255,0.04); }

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.brand-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 10px;
  background: inherit;
  filter: blur(8px);
  opacity: 0.5;
  z-index: -1;
}

/* ── Sidebar Nav ─────────────────────────────────────── */
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.75rem;
  margin: 0 0 0.35rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  border-radius: 8px;
  margin-bottom: 0.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-item i { width: 16px; height: 16px; flex-shrink: 0; }

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(99,102,241,0.12);
  color: var(--primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

/* ── Token Balance Widget ────────────────────────────── */
.token-widget {
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(6,182,212,0.06));
  border: 1px solid rgba(99,102,241,0.15);
  position: relative;
  overflow: hidden;
}
.token-widget::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%);
  pointer-events: none;
}

.token-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 0.6rem;
  overflow: hidden;
}
.token-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── User Footer ─────────────────────────────────────── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  transition: background 0.2s ease;
  cursor: default;
}
.sidebar-user:hover { background: rgba(255,255,255,0.04); }

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

/* ── Main Content ────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 2.5rem 2.5rem 2.5rem 2.5rem;
  min-width: 0;
  background: var(--bg-dark);
  position: relative;
}

/* Subtle grid dot pattern on main content */
.main-content::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* ── Stats Grid ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── KPI Card — redesigned from scratch ─────────────── */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  border-color: rgba(99,102,241,0.25);
}

/* coloured corner accent */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  border-radius: 0 14px 0 64px;
  opacity: 0.08;
  transition: opacity 0.2s ease;
}
.kpi-card:hover::before { opacity: 0.15; }

.kpi-card.violet::before { background: #6366F1; }
.kpi-card.cyan::before   { background: #06B6D4; }
.kpi-card.green::before  { background: #10B981; }
.kpi-card.amber::before  { background: #F59E0B; }
.kpi-card.rose::before   { background: #F43F5E; }
.kpi-card.purple::before { background: #A855F7; }

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.3rem;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.kpi-delta {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* ── Section Card ────────────────────────────────────── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.section-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-main);
}

.section-card-body { padding: 0; }
.section-card-footer {
  padding: 0.875rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Table Rows ──────────────────────────────────────── */
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.data-row:last-child { border-bottom: none; }
.data-row:hover { background: rgba(255,255,255,0.025); }

/* ── Pill Badge ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.badge-violet  { background: rgba(99,102,241,0.12); color: #818CF8; border-color: rgba(99,102,241,0.2); }
.badge-green   { background: rgba(16,185,129,0.12); color: #34D399; border-color: rgba(16,185,129,0.2); }
.badge-amber   { background: rgba(245,158,11,0.12); color: #FCD34D; border-color: rgba(245,158,11,0.2); }
.badge-rose    { background: rgba(244,63,94,0.12);  color: #FB7185; border-color: rgba(244,63,94,0.2); }
.badge-cyan    { background: rgba(6,182,212,0.12);  color: #22D3EE; border-color: rgba(6,182,212,0.2); }
.badge-muted   { background: rgba(148,163,184,0.1); color: var(--text-muted); border-color: var(--border); }
.badge-accent  { background: rgba(6,182,212,0.12);  color: var(--accent); border-color: rgba(6,182,212,0.2); }

/* ── Funnel Bar ──────────────────────────────────────── */
.funnel-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0 1.5rem 0.6rem;
}
.funnel-label {
  width: 84px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}
.funnel-track {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
  min-width: 28px;
  letter-spacing: 0.02em;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.funnel-count {
  width: 28px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Score Chip ──────────────────────────────────────── */
.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.score-high  { background: rgba(16,185,129,0.15); color: #34D399; }
.score-mid   { background: rgba(6,182,212,0.15);  color: #22D3EE; }
.score-low   { background: rgba(244,63,94,0.15);  color: #FB7185; }

/* ── Avatar ──────────────────────────────────────────── */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* ── Inline Actions ──────────────────────────────────── */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}
.btn-ghost:hover {
  background: rgba(99,102,241,0.2);
  transform: translateY(-1px);
}

/* ── Quick Action Card ───────────────────────────────── */
.quick-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
}

.quick-action:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.03);
}

.quick-action.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Insight Box ─────────────────────────────────────── */
.insight-box {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(6,182,212,0.04));
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ── Growth Chart ────────────────────────────────────── */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(to top, rgba(99,102,241,0.7), rgba(6,182,212,0.5));
  border-radius: 5px 5px 0 0;
  min-height: 6px;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.chart-bar:hover { filter: brightness(1.3); }

.chart-bar-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ── AI Metric Mini Card ─────────────────────────────── */
.ai-metric {
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}
.ai-metric:hover {
  border-color: rgba(99,102,241,0.25);
  background: rgba(99,102,241,0.04);
}

.ai-metric-value {
  font-size: 1.875rem;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.ai-metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Link Muted ──────────────────────────────────────── */
.link-muted {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}
.link-muted:hover { color: var(--primary); }

/* ── Separator ───────────────────────────────────────── */
.sep {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Divider label ───────────────────────────────────── */
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
  opacity: 0.6;
}

/* ── Status Dot ──────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: #10B981; box-shadow: 0 0 6px #10B981; }
.dot-red    { background: #F43F5E; }
.dot-amber  { background: #F59E0B; }
.dot-muted  { background: var(--text-muted); }

/* ── Glow Pulse animation ────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
  50% { box-shadow: 0 0 0 6px rgba(99,102,241,0.15); }
}
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* ── Skeleton shimmer ────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE DASHBOARD
   ═══════════════════════════════════════════════════════ */

/* Mobile top bar — hidden on desktop */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 35;
}

.hamburger-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }

/* Full-screen tinted overlay when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 38;
}

/* ── Tablet (1024px) ─────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: 220px; }
  .main-content { padding: 2rem; }
}

/* ── Mobile (768px) ──────────────────────────────────── */
@media (max-width: 768px) {
  /* Show hamburger topbar */
  .mobile-topbar { display: flex; }

  /* Sidebar slides in from left as overlay */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 270px; height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
  }
  .sidebar-overlay.sidebar-open { display: block; }

  /* Layout */
  .dashboard-layout { flex-direction: column; }
  .main-content { padding: 1.25rem 1rem 5rem; }

  /* Page header stacks */
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-header h1 { font-size: 1.35rem; }

  /* Stats grid — 2 columns on mobile */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Modals — full width, scrollable */
  .modal-box, .modal-card {
    max-width: calc(100vw - 2rem) !important;
    max-height: 88dvh;
    overflow-y: auto;
  }

  /* Smaller border-radius on mobile cards */
  .section-card { border-radius: 12px; }

  /* Help drawer goes full-width */
  .help-drawer { width: 100%; max-width: 100%; border-left: none; }
}

/* ── Small phones (480px) ────────────────────────────── */
@media (max-width: 480px) {
  .main-content { padding: 1rem 0.875rem 5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.625rem; }
  .kpi-value { font-size: 1.6rem; }
  .kpi-card { padding: 1rem; }
  .section-card-header { padding: 0.875rem 1rem; }
}

/* Legacy compat aliases */
.dash-card         { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.stat-card-premium { position: relative; overflow: hidden; }
.stat-card-premium::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(to right, var(--primary), var(--accent)); }
.list-item-hover   { transition: background 0.15s ease; }
.list-item-hover:hover { background: rgba(255,255,255,0.025); }
.p-6 { padding: 1.5rem; }

/* ── Spin animation ───────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ── Help Drawer (pure CSS, no Tailwind) ─────────── */
.help-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  z-index: 9998;
}
.help-drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 340px; max-width: 90vw;
  background: var(--bg-dark);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.help-drawer.open { transform: translateX(0); }

/* ── Toast Notifications ─────────────────────────── */
.toast {
  position: fixed; top: 1.5rem; right: 1.5rem;
  padding: 1rem 1.5rem; border-radius: 12px;
  font-size: 0.875rem; font-weight: 500; z-index: 10000;
  display: flex; align-items: center; gap: 0.75rem;
  animation: toastIn 0.4s ease, toastOut 0.4s ease 3.6s forwards;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-width: 420px;
}
.toast-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #34D399; }
.toast-error   { background: rgba(244,63,94,0.15); border: 1px solid rgba(244,63,94,0.3); color: #FB7185; }
@keyframes toastIn  { from { opacity:0; transform:translateY(-1rem); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-1rem); } }

/* ── Modal Overlay ───────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.modal-card {
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 16px; width: 440px; max-width: 92vw;
  padding: 2rem; box-shadow: 0 25px 60px rgba(0,0,0,0.5); position: relative;
}

/* ── Sandbox table row hover ─────────────────────── */
.sandbox-row:hover { background: rgba(255,255,255,0.02); }

/* ── Dropdown menu items hover ───────────────────── */
.dropdown-item {
  width: 100%; text-align: left; padding: 0.5rem 0.75rem;
  background: transparent; border: none; color: var(--text-main);
  font-size: 0.8rem; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; gap: 0.5rem; transition: background 0.15s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); }

/* ── Coming Soon badge pulse ─────────────────────── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.3); }
  50%      { box-shadow: 0 0 20px rgba(99,102,241,0.5); }
}
.badge-pulse { animation: pulse-glow 2s ease-in-out infinite; }

/* ── Add-on card ─────────────────────────────────── */
.addon-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.75rem; transition: border-color 0.2s, transform 0.2s;
}
.addon-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-2px); }

/* ── Config form row ─────────────────────────────── */
.config-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.config-row:last-child { border-bottom: none; }
.config-row:hover { background: rgba(255,255,255,0.015); }
