/* ============================================
   JEFF CLINE BUSINESS DASHBOARD
   Premium Agency Dashboard Styles
   "A Rising Tide Lifts All Boats" 
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  /* Primary Palette - Dark Premium */
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1e2a42;
  --bg-sidebar: #0d1325;
  --bg-input: #1e293b;
  
  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  
  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #3b82f6;
  
  /* Borders */
  --border-color: rgba(59, 130, 246, 0.15);
  --border-color-light: rgba(255, 255, 255, 0.06);
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0a0f1e 0%, #1a1a3e 50%, #0a0f1e 100%);
  --gradient-card: linear-gradient(135deg, #1a2235 0%, #111827 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-premium: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.2);
  --shadow-glow-gold: 0 0 30px rgba(245, 158, 11, 0.2);
  
  /* Sizing */
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-gold);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

.text-gradient {
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-secondary); }

/* ---------- UTILITIES ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-lg {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-top: 16px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-gold {
  background: var(--gradient-gold);
  color: #0a0f1e;
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.4);
  color: #0a0f1e;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
}

.btn-outline:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glow:hover {
  box-shadow: var(--shadow-glow-blue);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.card-icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.card-icon-gold { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.card-icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.card-icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.card-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.card-icon-pink { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.card-icon-red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

/* ---------- NAVIGATION (Landing) ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color-light);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(10, 15, 30, 0.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--text-primary); }

.nav-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

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

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, 3%) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color-light);
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Floating particles */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-blue);
  opacity: 0.3;
  animation: float 20s infinite;
}

.particle:nth-child(2) { left: 20%; animation-delay: -5s; background: var(--accent-gold); }
.particle:nth-child(3) { left: 40%; animation-delay: -10s; background: var(--accent-purple); }
.particle:nth-child(4) { left: 60%; animation-delay: -15s; }
.particle:nth-child(5) { left: 80%; animation-delay: -8s; background: var(--accent-cyan); }
.particle:nth-child(6) { left: 15%; animation-delay: -3s; background: var(--accent-pink); }
.particle:nth-child(7) { left: 55%; animation-delay: -12s; }
.particle:nth-child(8) { left: 75%; animation-delay: -7s; background: var(--accent-gold); }

@keyframes float {
  0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.3; }
  50% { opacity: 0.15; }
  90% { opacity: 0; }
  95% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ---------- FEATURES SECTION ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-card .card-icon {
  margin-bottom: 20px;
}

.feature-card h4 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- PRICING SECTION ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card {
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border-color: var(--accent-gold);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow-gold);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: 20px;
  right: -35px;
  background: var(--gradient-gold);
  color: #0a0f1e;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(45deg);
  letter-spacing: 0.1em;
}

.pricing-tier {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.pricing-card.featured .pricing-tier {
  color: var(--accent-gold);
}

.pricing-amount {
  font-size: 3rem;
  font-weight: 800;
  margin: 8px 0;
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li i {
  color: var(--accent-green);
  font-size: 0.85rem;
}

.pricing-features li.disabled {
  opacity: 0.4;
}

.pricing-features li.disabled i {
  color: var(--text-muted);
}

/* ---------- QUIZ SECTION ---------- */
.quiz-container {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.quiz-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-premium);
}

.quiz-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.quiz-progress-step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--bg-input);
  transition: var(--transition);
}

.quiz-progress-step.active {
  background: var(--accent-blue);
}

.quiz-progress-step.completed {
  background: var(--accent-green);
}

.quiz-step {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.quiz-step.active {
  display: block;
}

.quiz-step h3 {
  margin-bottom: 8px;
}

.quiz-step > p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.quiz-options {
  display: grid;
  gap: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.quiz-option:hover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.quiz-option.selected {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

.quiz-option i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  color: var(--accent-blue);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
}

/* ---------- FAQ SECTION (AEO Optimized) ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: left;
}

.faq-question:hover {
  color: var(--accent-blue);
}

.faq-question i {
  transition: var(--transition);
  color: var(--text-muted);
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* ---------- BLOG PREVIEW ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  overflow: hidden;
}

.blog-card-img {
  height: 200px;
  background: var(--gradient-hero);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.6;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card h4 {
  margin-bottom: 8px;
}

.blog-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(245, 158, 11, 0.1) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h5 {
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   DASHBOARD LAYOUT STYLES
   ============================================ */

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

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.sidebar-brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--accent-red);
  color: white;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 100px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-color-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ---------- TOPBAR ---------- */
.topbar {
  height: var(--topbar-height);
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
}

.topbar-breadcrumb {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.topbar-breadcrumb strong {
  color: var(--text-primary);
}

.topbar-search {
  position: relative;
}

.topbar-search input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 16px 8px 36px;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 280px;
  transition: var(--transition);
  outline: none;
}

.topbar-search input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.topbar-icon-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.topbar-icon-btn .notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

/* ---------- DASHBOARD CONTENT AREA ---------- */
.dash-content {
  padding: 32px;
}

.dash-page {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.dash-page.active {
  display: block;
}

.dash-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.dash-page-header h2 {
  font-size: 1.5rem;
}

.dash-page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ---------- KPI CARDS ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
}

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-label span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
}

.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 100px;
}

.kpi-change.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

.kpi-change.down {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

/* ---------- CHART CONTAINERS ---------- */
.chart-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-card-header h4 {
  font-size: 1rem;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.chart-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  color: var(--text-secondary);
}

.chart-tab.active {
  background: var(--accent-blue);
  color: white;
}

.chart-wrapper {
  position: relative;
  height: 300px;
}

/* ---------- TABLE STYLES ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(59, 130, 246, 0.03);
}

.data-table .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-gold);
}

.status-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

/* ---------- FORMS ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------- EXPENSE TRACKER ---------- */
.expense-total {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.expense-total h3 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.expense-total .amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-red);
}

.expense-total .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- INTEGRATIONS ---------- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.integration-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.integration-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.integration-info {
  flex: 1;
}

.integration-info h5 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.integration-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.integration-status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
}

/* ---------- TRACKING PIXEL ---------- */
.pixel-code {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  overflow-x: auto;
  position: relative;
}

.pixel-code .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.pixel-code .copy-btn:hover {
  background: var(--accent-blue);
  color: white;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in { animation: fadeIn 0.6s ease; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease; }
.animate-slide-in { animation: slideInLeft 0.4s ease; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .pricing-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero { padding-top: 100px; min-height: auto; padding-bottom: 60px; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dash-content { padding: 20px; }
  .quiz-container { padding: 24px; }
  .section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* ---------- SELECTION ---------- */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: white;
}
