/* ==============================================================================
   NutriWise — Master Design System: Radiant Emerald & Sunset Coral Palette
   ============================================================================== */

:root {
  /* Radiant Emerald (Health, Vitality, Purity) */
  --primary: #059669;
  --primary-glow: #10b981;
  --primary-light: #ecfdf5;
  --primary-dark: #064e3b;
  --primary-border: rgba(16, 185, 129, 0.2);

  /* Sunset Coral & Persimmon (Appetizing Warmth, Energy) */
  --accent: #f97316;
  --accent-glow: #ff6b6b;
  --accent-light: #fff7ed;
  --accent-dark: #c2410c;

  /* Golden Turmeric (Traditional Medicine, Radiance) */
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --amber-dark: #b45309;

  /* Deep Botanical Foundation */
  --dark-forest: #0a2f24;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Backgrounds & Glassmorphic Surfaces */
  --bg: #f8fafc;
  --bg-mesh: radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
              radial-gradient(at 85% 85%, rgba(249, 115, 22, 0.06) 0px, transparent 50%),
              #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 10px 30px -10px rgba(10, 47, 36, 0.06), 0 4px 12px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 20px 40px -12px rgba(16, 185, 129, 0.16), 0 8px 18px rgba(0, 0, 0, 0.04);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-mesh);
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==============================================================================
   Navbar & Header
   ============================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--dark-forest), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.brand-tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-400);
  font-weight: 600;
  display: block;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-600);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover, .nav-link-active {
  color: var(--primary);
  background: var(--primary-light);
}

.admin-pill {
  color: var(--accent);
  background: var(--accent-light);
}

/* ==============================================================================
   Buttons & Interactive Elements
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  color: #ffffff;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: 0.6s;
}

.btn-glow:hover::after {
  left: 100%;
}

.btn-secondary {
  background: #ffffff;
  color: var(--slate-800);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--slate-800);
  border: 1.5px solid var(--slate-300);
}

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

.btn-ghost {
  background: transparent;
  color: var(--slate-600);
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--slate-900);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* Alerts */
.alerts-container {
  margin-top: 16px;
}

.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 500;
}

.alert-success {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary-glow);
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* ==============================================================================
   Landing Page (Artistic Hero & Visual Showcase)
   ============================================================================== */
.artistic-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0 80px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--primary-glow);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.2rem;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--slate-900);
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate-600);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 40px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 500px;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--slate-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Hero Floating Visual Card */
.hero-visual-card {
  position: relative;
}

.visual-card-inner {
  background: var(--card-bg);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -12px rgba(10, 47, 36, 0.15);
  overflow: hidden;
  transition: transform 0.4s ease;
}

.visual-card-inner:hover {
  transform: translateY(-6px);
}

.visual-card-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(249, 115, 22, 0.05));
  border-bottom: 1px solid var(--border-light);
}

.visual-card-tag {
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
}

.visual-card-details {
  padding: 24px;
}

.visual-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.visual-dish-name {
  font-size: 1.3rem;
  color: var(--slate-900);
}

.visual-dish-desc {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 16px;
}

.visual-chart-pill {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.mini-macro-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  margin-bottom: 8px;
}

.bar-carb { background: var(--primary-glow); }
.bar-protein { background: var(--accent); }
.bar-fat { background: var(--amber); }
.bar-fiber { background: #6366f1; }

.mini-macro-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-600);
}

.visual-citation-pill {
  font-size: 0.8rem;
  color: var(--primary-dark);
  font-weight: 500;
}

/* Sections & Features */
.section-container {
  padding: 60px 0;
}

.section-header-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  display: inline-block;
  margin-bottom: 8px;
}

.section-heading {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-subtext {
  font-size: 1.05rem;
  color: var(--slate-600);
}

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

.artistic-feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
}

.artistic-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-border);
}

.feature-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.bubble-emerald { background: var(--primary-light); }
.bubble-coral { background: var(--accent-light); }
.bubble-amber { background: var(--amber-light); }
.bubble-indigo { background: #e0e7ff; }

.feature-card-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-card-text {
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* Dietary Pillars Grid (Landing) */
.pillar-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-glow);
}

.pillar-icon-box {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.pillar-info h4 {
  font-size: 1.15rem;
  color: var(--dark-forest);
  margin-bottom: 4px;
}

.pillar-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--dark-forest), #064e3b);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  text-align: center;
  color: #ffffff;
  margin: 60px 0 80px;
  box-shadow: 0 20px 40px -10px rgba(10, 47, 36, 0.4);
}

.cta-content h2 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
}

/* ==============================================================================
   Split Dashboard Layout (Left Navigation + Right Scroll Hub)
   ============================================================================== */
.split-dashboard-wrapper {
  display: flex;
  gap: 28px;
  padding: 24px 0 40px;
}

.split-left-pane {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 94px;
  height: calc(100vh - 118px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.split-right-pane {
  flex-grow: 1;
  min-width: 0;
}

/* User Card in Left Pane */
.pane-user-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar-glow {
  width: 46px;
  height: 46px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.user-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.diet-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.user-location-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--slate-600);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.temp-badge {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Meal Nav List */
.meal-nav-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.meal-nav-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-400);
  font-weight: 800;
  margin-bottom: 10px;
  padding: 0 6px;
}

.meal-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meal-nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
  text-align: left;
  transition: all 0.2s ease;
}

.meal-nav-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.meal-nav-item.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.meal-nav-icon {
  font-size: 1.15rem;
  margin-right: 10px;
}

.meal-nav-label {
  flex-grow: 1;
}

.meal-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--slate-700);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.meal-nav-item.active .meal-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.count-badge-highlight {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.pane-climate-card {
  background: linear-gradient(135deg, #f0fdf4, #fef3c7);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius);
  padding: 16px;
}

.climate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.climate-icon {
  font-size: 1.8rem;
}

.climate-cat {
  font-weight: 700;
  color: var(--dark-forest);
  font-size: 0.95rem;
}

.climate-desc {
  font-size: 0.8rem;
  color: var(--slate-600);
}

.climate-tip {
  font-size: 0.82rem;
  color: var(--slate-700);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pane-season-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-dark);
}

/* ==============================================================================
   Vitality & Health Charts Hub (Right Pane Header)
   ============================================================================== */
.vitality-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.vitality-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vitality-card-header {
  margin-bottom: 12px;
}

.vitality-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

.vitality-badge-amber {
  color: var(--amber-dark);
  background: var(--amber-light);
}

.vitality-badge-green {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.vitality-title {
  font-size: 1.05rem;
  color: var(--slate-900);
}

.chart-flex-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chart-canvas-box {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
}

.chart-legend-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-600);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-carbs { background: #10b981; }
.dot-protein { background: #f97316; }
.dot-fats { background: #f59e0b; }
.dot-fiber { background: #6366f1; }

/* Thermal Meter */
.thermal-meter-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thermal-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-600);
}

.thermal-track {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 35%, #fbbf24 70%, #f87171 100%);
  position: relative;
}

.thermal-thumb {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: left 0.6s ease;
}

.thermal-caption {
  font-size: 0.78rem;
  color: var(--slate-600);
  line-height: 1.4;
  margin-top: 4px;
}

/* Compliance Gauges */
.compliance-gauges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gauge-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gauge-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-700);
}

.gauge-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  background: var(--primary-glow);
  border-radius: 3px;
}

.fill-amber { background: var(--amber); }
.fill-indigo { background: #6366f1; }

.text-emerald { color: var(--primary); }
.text-amber { color: var(--amber-dark); }
.text-indigo { color: #4338ca; }

/* Filter & Synergy Header */
.active-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--slate-700);
}

.clinical-synergy-banner {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.synergy-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.ai-source-pill {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-grounding-subtext {
  font-size: 0.78rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.synergy-content-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.synergy-icon {
  font-size: 1.4rem;
  line-height: 1.2;
}

.synergy-title {
  color: var(--primary-dark);
  margin-right: 6px;
  font-weight: 700;
}

.synergy-text {
  color: var(--slate-700);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* AI Pick Badge & Clinical Rationale Box */
.ai-pick-pill {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  font-size: 0.74rem;
  font-weight: 800;
}

.ai-rationale-box {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
}

.ai-rationale-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* ==============================================================================
   Meal Section & Food Cards (Artistic Culinary Visuals)
   ============================================================================== */
.meal-section-pane {
  margin-bottom: 36px;
  scroll-margin-top: 95px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#health-ingredients-hub {
  scroll-margin-top: 95px;
}

@keyframes mealHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    background-color: transparent;
  }
  35% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.12);
    background-color: rgba(16, 185, 129, 0.04);
    border-radius: var(--radius);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    background-color: transparent;
  }
}

.meal-highlight-pulse {
  animation: mealHighlightPulse 1.2s ease-out;
}

.meal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.meal-header-emoji {
  font-size: 1.6rem;
}

.meal-title {
  font-size: 1.4rem;
  color: var(--slate-900);
}

.meal-slot-count {
  font-size: 0.85rem;
  color: var(--slate-500);
  font-weight: 500;
}

.meal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Individual Food Card */
.food-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.food-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-glow);
}

.food-card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(249, 115, 22, 0.04));
  border-bottom: 1px solid var(--border-light);
}

.category-chip {
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark-forest);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.score-badge-glow {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5);
}

.food-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.food-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.food-card-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--slate-900);
}

.food-card-name:hover {
  color: var(--primary);
}

.featured-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--amber-light);
  color: var(--amber-dark);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.food-summary {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.45;
  margin-bottom: 12px;
}

.clinical-note {
  font-weight: 600;
  color: var(--dark-forest);
}

.reasons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.reason-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.ingredients-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.ing-pill {
  font-size: 0.74rem;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--slate-700);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.clickable-ing {
  cursor: pointer;
  transition: all 0.2s;
}

.clickable-ing:hover {
  background: var(--primary);
  color: #ffffff;
}

.more-pill {
  background: transparent;
  color: var(--slate-500);
  font-weight: 600;
}

/* Citation Box */
.citation-box {
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--slate-600);
  margin-top: auto;
  margin-bottom: 14px;
}

.citation-icon {
  font-size: 1rem;
}

.page-tag {
  font-weight: 700;
  color: var(--primary);
}

.citation-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
  display: inline-block;
  margin-top: 2px;
}

.food-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.cant-make-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-500);
}

.cant-make-link:hover {
  color: var(--accent);
}

/* ==============================================================================
   Health & Ingredients Hub
   ============================================================================== */
.health-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.health-hub-title {
  font-size: 1.6rem;
  color: var(--dark-forest);
  margin-bottom: 4px;
}

.health-hub-subtitle {
  color: var(--slate-600);
  font-size: 0.95rem;
  max-width: 600px;
}

.search-input-styled {
  max-width: 320px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s;
}

.search-input-styled:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.ingredients-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ingredient-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vital-ingredient {
  border-left: 4px solid var(--primary);
}

.ing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ing-card-title {
  font-size: 1.2rem;
}

.ing-dish-count {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.condition-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.ing-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--slate-700);
}

.dishes-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--slate-500);
  display: block;
  margin-bottom: 6px;
}

.ing-dishes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ing-dish-link {
  font-size: 0.82rem;
  font-weight: 600;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--slate-800);
}

.ing-dish-link:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ==============================================================================
   Modal Overlay
   ============================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 47, 36, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.25);
  animation: modal-enter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-enter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--slate-900);
}

.modal-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.modal-title-text {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.modal-meta-text {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 16px;
}

.modal-quote-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px;
  border-radius: 4px;
  font-style: italic;
  color: var(--slate-800);
  line-height: 1.6;
}

/* Mobile Weather Banner */
.weather-banner-compact {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}

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

.footer-brand {
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--slate-600);
  max-width: 440px;
}

.footer-links-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--slate-800);
  margin-bottom: 12px;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--slate-600);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  text-align: center;
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-bottom: 8px;
}

.copyright {
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* ==============================================================================
   Forms & Controls
   ============================================================================== */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-700);
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--slate-800);
  background: #ffffff;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ==============================================================================
   Preferences Wizard (Onboarding & Dietary Profile)
   ============================================================================== */
.wizard-card {
  max-width: 760px;
  width: 100%;
  margin: 32px auto 60px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: 0 20px 40px -12px rgba(10, 47, 36, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.progress-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.step-indicator {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.step-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 1.55rem;
  color: var(--dark-forest);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--slate-600);
  margin-bottom: 24px;
  line-height: 1.5;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.choice-label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-size: 0.92rem;
  color: var(--slate-800);
}

.choice-label:hover {
  background: var(--primary-light);
  border-color: var(--primary-glow);
  transform: translateY(-1px);
}

.choice-label input[type="checkbox"],
.choice-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.choice-label input:checked ~ .choice-text {
  font-weight: 700;
  color: var(--primary-dark);
}

.choice-card-lg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 18px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* AI Generation Loading Overlay */
.ai-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 47, 36, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.ai-loading-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-pulse-orb {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 1.6s infinite;
  margin-bottom: 20px;
}

.ai-loading-title {
  font-size: 1.45rem;
  color: var(--dark-forest);
  margin-bottom: 8px;
}

.ai-loading-subtitle {
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: 24px;
}

.ai-loading-bar-wrap {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 16px;
}

.ai-loading-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-pill);
  animation: indeterminateBar 1.5s infinite ease-in-out;
}

@keyframes indeterminateBar {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(50%); width: 70%; }
  100% { transform: translateX(200%); width: 40%; }
}

.ai-loading-steps {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  min-height: 22px;
}

/* ==============================================================================
   Authentication Box (Login & Registration)
   ============================================================================== */
.auth-box {
  max-width: 440px;
  width: 100%;
  margin: 50px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
}

.auth-title {
  font-size: 1.8rem;
  color: var(--dark-forest);
  margin-bottom: 6px;
  text-align: center;
}

/* ==============================================================================
   Alternatives & Details Layouts
   ============================================================================== */
.alt-header {
  margin-bottom: 30px;
}

.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* ==============================================================================
   Comprehensive Mobile & Tablet Responsive Media Queries
   ============================================================================== */

/* Tablet & Smaller Screens (< 992px) */
@media (max-width: 992px) {
  .container {
    padding: 0 18px;
  }

  .artistic-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px 0 50px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .vitality-hub {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .split-dashboard-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .split-left-pane {
    width: 100%;
    position: static;
    height: auto;
    overflow-y: visible;
  }

  .meal-nav-container {
    position: sticky;
    top: 60px;
    z-index: 90;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    padding: 10px 12px;
  }

  .meal-section-pane, #health-ingredients-hub {
    scroll-margin-top: 130px;
  }

  .meal-nav-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .meal-nav-list::-webkit-scrollbar {
    height: 4px;
  }

  .meal-nav-item {
    width: auto;
    padding: 8px 16px;
    flex-shrink: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Mobile Handsets (< 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  /* Sticky Compact Navbar */
  .nav-container {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .brand-tagline {
    display: none; /* Keep mobile header clean and uncluttered */
  }

  /* Hero on Mobile */
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  /* Preferences Wizard Mobile */
  .wizard-card {
    padding: 24px 18px;
    margin: 16px auto 40px;
    border-radius: var(--radius);
  }

  .step-title {
    font-size: 1.35rem;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .choice-label {
    padding: 14px 14px;
  }

  .wizard-nav {
    flex-direction: row;
    gap: 10px;
  }

  .wizard-nav .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  /* Food Cards on Mobile */
  .meal-section-pane, #health-ingredients-hub {
    scroll-margin-top: 130px;
  }

  .meal-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .food-card-body {
    padding: 16px 18px 20px;
  }

  .food-card-name {
    font-size: 1.15rem;
  }

  /* Vitality Cards on Mobile */
  .chart-flex-wrap {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  /* Health Hub Grid */
  .ingredients-hub-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Auth Boxes */
  .auth-box {
    margin: 24px auto;
    padding: 24px 18px;
  }
}

/* Small Screens (< 480px) */
@media (max-width: 480px) {
  .wizard-nav {
    flex-direction: column;
    gap: 8px;
  }

  .wizard-nav .btn {
    width: 100%;
  }
}
