/* ============================================
   NUURA — Design System
   Dark mode · Glassmorphism · Premium UI
   ============================================ */
@import './extended.css';
@import './knowledge_base.css';
@import './landing_v4.css';
@import './onboarding.css';
@import './calendar_integration.css';
@import './calendar.css';

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Colors — Stitch Dark Surface Hierarchy */
  --bg-primary: #0e0e13;
  --bg-secondary: #131318;
  --bg-surface: #1b1b20;
  --bg-surface-container: #1f1f25;
  --bg-surface-high: #2a292f;
  --bg-surface-highest: #35343a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-input: #16161d;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-active: rgba(0, 212, 255, 0.3);
  --border-glass: rgba(255, 255, 255, 0.1);

  /* Text — Stitch Palette */
  --text-primary: #e4e1e9;
  --text-secondary: #94a3b8;
  --text-muted: #55556a;
  --text-inverse: #0e0e13;

  /* Accents — Stitch Primary/Secondary */
  --accent-cyan: #00d4ff;
  --accent-cyan-dim: #3cd7ff;
  --accent-violet: #7c3aed;
  --accent-violet-dim: #d2bbff;
  --accent-green: #10b981;
  --accent-amber: #fbbf24;
  --accent-rose: #ff4b4b;
  --gradient-brand: linear-gradient(135deg, #00d4ff, #7c3aed);
  --gradient-hero: linear-gradient(90deg, #00d4ff 0%, #7c3aed 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(124, 58, 237, 0.06));

  /* Typography — Stitch Inter System */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Inter', -apple-system, sans-serif;
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 2rem;
  --font-4xl: 2.5rem;
  --font-5xl: 3rem;

  /* Spacing — Stitch 4px Grid */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius — Stitch ROUND_EIGHT */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows & Glows — Stitch Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);
  --shadow-glow-violet: 0 0 15px rgba(124, 58, 237, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --nav-height: 64px;
  --sidebar-width: 260px;
  --container-max: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

/* --- Utilities --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

/* Stitch: Gradient text (cyan → violet) */
.text-gradient-cyan-violet {
  background: linear-gradient(90deg, #00d4ff 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Stitch: Glassmorphism Card */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* Stitch: Glow Effects */
.glow-primary { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
.glow-violet { box-shadow: 0 0 15px rgba(124, 58, 237, 0.3); }

/* Stitch: AI Pulse Animation */
.ai-pulse { position: relative; }
.ai-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-violet);
  opacity: 0.4;
  animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
  0% { transform: scale(1); opacity: 0.4; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

/* Stitch: Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Global scrollbar (subtle) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--text-inverse);
  border: none;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25), var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-full {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-base);
}

/* --- Cards (Stitch Glassmorphism) --- */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* --- Forms --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-base);
  transition: all var(--transition-fast);
  outline: none;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  background: rgba(255, 255, 255, 0.08);
}

/* --- Logo --- */
.logo {
  font-family: var(--font-heading);
  font-size: var(--font-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-dot {
  color: var(--accent-cyan);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing {
  min-height: 100vh;
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(7, 7, 14, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

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

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

.nav-links .btn { margin-left: var(--space-4); }

/* Hero */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-24));
  padding-bottom: var(--space-24);
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  animation: fadeInDown 0.6s ease both;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: var(--font-5xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease 0.15s both;
}

.hero p {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-10);
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  animation: fadeInUp 0.6s ease 0.45s both;
}

/* Sections */
.section {
  padding: var(--space-24) 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--font-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  max-width: 560px;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header .section-desc {
  margin: 0 auto;
}

/* Pain Points Grid */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.pain-card {
  padding: var(--space-8);
}

.pain-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--font-xl);
}

.pain-card h3 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.pain-card p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: var(--space-8);
  counter-increment: step;
}

.step-number {
  font-size: var(--font-4xl);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.6;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.step-card h3 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.step-card p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.pricing-card {
  padding: var(--space-8);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--accent-cyan);
  background: var(--gradient-card);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-4);
  background: var(--gradient-brand);
  color: var(--text-inverse);
  font-size: var(--font-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
}

.pricing-plan {
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.pricing-price {
  font-size: var(--font-4xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.pricing-price span {
  font-size: var(--font-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pricing-features li {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
  font-size: var(--font-xs);
}

/* Footer */
.landing-footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.landing-footer p {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* Sidebar */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
}

.sidebar-logo {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent-cyan);
  border-left: 2px solid var(--accent-cyan);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.sidebar-link.active svg {
  opacity: 1;
  color: var(--accent-cyan);
}

.sidebar-footer {
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

/* Main Content */
.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-8);
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.dashboard-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.dashboard-title {
  font-family: var(--font-heading);
  font-size: var(--font-2xl);
  font-weight: 700;
}

.dashboard-badge {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

.user-greeting {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* --- Notification Bell --- */
.dashboard-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.notification-bell-wrapper {
  position: relative;
}

.notification-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-bell-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  color: var(--text-primary);
}

.notification-bell-btn.has-unread {
  color: var(--accent-cyan);
  border-color: rgba(0, 212, 255, 0.2);
  animation: glowPulse 3s ease-in-out infinite;
}

.notification-bell-btn .material-symbols-outlined {
  font-size: 20px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 18px;
  text-align: center;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
  animation: fadeInDown 0.2s ease;
}

/* Notification Panel */
.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: rgba(20, 20, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: fadeInDown 0.2s ease;
  overflow: hidden;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.notification-panel-header h3 {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.notification-mark-all {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-size: var(--font-xs);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.notification-mark-all:hover {
  background: rgba(0, 212, 255, 0.1);
}

.notification-panel-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
  gap: var(--space-3);
}

.notification-empty .material-symbols-outlined {
  font-size: 32px;
  opacity: 0.4;
}

.notification-empty p {
  font-size: var(--font-sm);
}

/* Notification Items */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--bg-card-hover);
}

.notification-item.unread {
  background: rgba(0, 212, 255, 0.03);
}

.notification-item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-item-icon .material-symbols-outlined {
  font-size: 16px;
}

.notification-item-icon.cyan { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); }
.notification-item-icon.green { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); }
.notification-item-icon.rose { background: rgba(255, 75, 75, 0.12); color: var(--accent-rose); }
.notification-item-icon.violet { background: rgba(124, 58, 237, 0.12); color: var(--accent-violet); }

.notification-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-item-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.notification-item-body {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--font-lg);
  flex-shrink: 0;
}

.stat-icon.cyan { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); }
.stat-icon.violet { background: rgba(124, 58, 237, 0.12); color: var(--accent-violet); }
.stat-icon.amber { background: rgba(251, 191, 36, 0.12); color: var(--accent-amber); }
.stat-icon.green { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: 500;
  margin-top: var(--space-1);
}

/* Dashboard Content Cards */
.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.dashboard-content .card h2 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dashboard-content .card p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot.success { background: var(--accent-green); }
.activity-dot.pending { background: var(--accent-amber); }
.activity-dot.info { background: var(--accent-cyan); }

.activity-text {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  flex: 1;
}

.activity-time {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-primary);
}

.auth-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-16);
  background: linear-gradient(135deg, #0e0e13 0%, #131318 40%, rgba(0, 212, 255, 0.04) 70%, rgba(124, 58, 237, 0.06) 100%);
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);
  pointer-events: none;
}

.auth-branding-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Stitch: Auth feature list */
.auth-branding-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-10);
  text-align: left;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.auth-feature .material-symbols-outlined {
  font-size: 22px !important;
}

.auth-branding .logo {
  font-size: var(--font-4xl);
  margin-bottom: var(--space-6);
}

.auth-branding-tagline {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.7;
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-16);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card .logo {
  font-size: var(--font-3xl);
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: var(--space-10);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.auth-error {
  padding: var(--space-3) var(--space-4);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-rose);
  font-size: var(--font-sm);
}

.auth-links {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.auth-links a {
  color: var(--accent-cyan);
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.15); }
  50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.25); }
}

/* Stitch: Loading button animation */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Stitch: Fade-in on scroll (can be triggered via JS) */
.fade-in-view {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-view.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-content { grid-template-columns: 1fr; }
  .pain-grid, .steps-grid, .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .hero h1 { font-size: var(--font-3xl); }
  .nav-links a:not(.btn) { display: none; }
  .hero-buttons { flex-direction: column; align-items: center; }

  .dashboard-sidebar { display: none; }
  .dashboard-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }

  .auth-page { grid-template-columns: 1fr; }
  .auth-branding { display: none; }
}
