/* ============================================================
   FitIndia — Base CSS: Design Tokens, Reset, Typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --cyan: #00d4ff;
  --blue: #3B82F6;
  --purple: #a855f7;
  --pink: #ec4899;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --teal: #14b8a6;
  --yellow: #eab308;

  /* Gradients per vertical */
  --grad-workout: linear-gradient(135deg, #f97316, #ef4444);
  --grad-meals: linear-gradient(135deg, #22c55e, #14b8a6);
  --grad-lifestyle: linear-gradient(135deg, #3B82F6, #a855f7);
  --grad-region: linear-gradient(135deg, #00d4ff, #3B82F6);
  --grad-gold: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-hero: linear-gradient(135deg, #0F1629 0%, #1a1040 50%, #0F1629 100%);

  /* Backgrounds */
  --bg-base: #08090e;
  --bg-surface: #0f1117;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-modal: rgba(8, 9, 14, 0.95);

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(0, 212, 255, 0.4);

  /* Text */
  --text-primary: #f0f4ff;
  --text-secondary: rgba(240, 244, 255, 0.55);
  --text-muted: rgba(240, 244, 255, 0.30);

  /* Typography */
  --font-ui: 'Inter', -apple-system, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 20px; --radius-2xl: 24px; --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.2);
  --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.2);
  --shadow-glow-orange: 0 0 20px rgba(249, 115, 22, 0.2);
  --shadow-glow-green: 0 0 20px rgba(34, 197, 94, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Sidebar */
  --sidebar-width: 76px;
  --sidebar-expanded: 220px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; outline: none; }
input, select, textarea {
  font-family: var(--font-ui);
  color: var(--text-primary);
  outline: none;
  border: none;
}
ul, ol { list-style: none; }
img, svg { display: block; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   Layout
   ============================================================ */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(15, 17, 23, 0.96);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5) 0;
  position: relative;
  z-index: 100;
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  transition: width var(--transition-base);
}
.sidebar:hover { width: var(--sidebar-expanded); }
.sidebar-logo {
  width: 44px; height: 44px;
  background: var(--grad-workout);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: var(--space-8);
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-orange);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  padding: 0 var(--space-3);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item .nav-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.nav-item .nav-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition-base);
  color: var(--text-secondary);
}
.sidebar:hover .nav-label { opacity: 1; }
.nav-item:hover { background: var(--bg-card-hover); }
.nav-item:hover .nav-label { color: var(--text-primary); }
.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.nav-item.active .nav-label { color: var(--cyan); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px var(--cyan)); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; height: 60%;
  width: 3px;
  background: var(--grad-region);
  border-radius: 0 3px 3px 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 0 var(--space-3);
  width: 100%;
}
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-lifestyle);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border-bright);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.user-avatar:hover { border-color: var(--cyan); box-shadow: var(--shadow-glow-cyan); }

/* Main content */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-8);
  background: rgba(15, 17, 23, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.topbar-left { display: flex; flex-direction: column; gap: 2px; }
.topbar-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-subtitle { font-size: 12px; color: var(--text-secondary); }
.topbar-right { display: flex; align-items: center; gap: var(--space-4); }
.aqi-badge {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.aqi-badge:hover { border-color: var(--border-bright); }
.aqi-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}
.weather-strip {
  display: flex; align-items: center; gap: var(--space-4);
  font-size: 13px; color: var(--text-secondary);
}
.weather-item { display: flex; align-items: center; gap: 5px; }
.topbar-time {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.city-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
}
.day-score-mini {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* View content area */
.view { display: none; padding: var(--space-6) var(--space-8); animation: fadeInView 0.3s ease; }
.view.active { display: block; }
@keyframes fadeInView { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-bright); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.card-icon { font-size: 18px; }
.card-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.card-unit { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-top: 2px; }
.card-change {
  font-size: 12px; font-weight: 600; margin-top: var(--space-2);
  display: flex; align-items: center; gap: 4px;
}
.card-change.up { color: var(--green); }
.card-change.down { color: var(--red); }

/* Glow accent line on card top */
.card-glow::after {
  content: '';
  position: absolute;
  top: 0; left: var(--space-6); right: var(--space-6); height: 2px;
  border-radius: 0 0 4px 4px;
  background: var(--glow-color, var(--cyan));
  opacity: 0;
  transition: opacity var(--transition-base);
}
.card-glow:hover::after { opacity: 1; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

/* Section header */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.section-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
}
.section-action {
  font-size: 13px; font-weight: 500;
  color: var(--cyan);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.section-action:hover { background: rgba(0, 212, 255, 0.1); }

/* ============================================================
   Progress Rings (SVG)
   ============================================================ */
.ring-wrapper {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ring-svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.06); }
.ring-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ring-label {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.ring-label .ring-value {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800; line-height: 1;
}
.ring-label .ring-unit { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition-fast);
  border: none;
}
.btn-primary {
  background: var(--grad-region);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35); }
.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-bright); background: var(--bg-card-hover); }
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; justify-content: center; font-size: 16px; }

/* ============================================================
   Gradient Text
   ============================================================ */
.grad-text {
  background: var(--text-gradient, var(--grad-region));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   Inputs
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px; color: var(--text-primary);
  transition: all var(--transition-fast);
  width: 100%;
}
.form-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px; color: var(--text-primary);
  width: 100%;
  transition: all var(--transition-fast);
  appearance: none;
  cursor: pointer;
}
.form-select:focus { border-color: var(--border-focus); }
.form-select option { background: #1a1f2e; color: var(--text-primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }

/* ============================================================
   Tags / Chips
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.chip-cyan { background: rgba(0,212,255,0.1); color: var(--cyan); border-color: rgba(0,212,255,0.2); }
.chip-green { background: rgba(34,197,94,0.1); color: var(--green); border-color: rgba(34,197,94,0.2); }
.chip-orange { background: rgba(249,115,22,0.1); color: var(--orange); border-color: rgba(249,115,22,0.2); }
.chip-red { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.2); }
.chip-purple { background: rgba(168,85,247,0.1); color: var(--purple); border-color: rgba(168,85,247,0.2); }
.chip-yellow { background: rgba(234,179,8,0.1); color: var(--yellow); border-color: rgba(234,179,8,0.2); }

/* ============================================================
   Progress bar
   ============================================================ */
.progress-bar {
  height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   Divider
   ============================================================ */
.divider { height: 1px; background: var(--border); margin: var(--space-5) 0; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4); padding: var(--space-10);
  color: var(--text-secondary); text-align: center;
}
.empty-icon { font-size: 48px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #12151e;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { margin-bottom: var(--space-6); text-align: center; }
.modal-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.modal-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: var(--space-2); }

/* Onboarding steps */
.step-indicator {
  display: flex; justify-content: center; gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-bright);
  transition: all var(--transition-base);
}
.step-dot.active { width: 24px; border-radius: 4px; background: var(--cyan); }
.step-dot.done { background: var(--green); }

/* Life stage cards */
.life-stage-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
}
.life-stage-card {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}
.life-stage-card:hover { border-color: var(--border-bright); background: var(--bg-card-hover); }
.life-stage-card.selected { border-color: var(--cyan); background: rgba(0,212,255,0.08); }
.life-stage-card .ls-icon { font-size: 28px; margin-bottom: var(--space-2); }
.life-stage-card .ls-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.life-stage-card .ls-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   Insight Cards
   ============================================================ */
.insights-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  transition: all var(--transition-base);
}
.insight-card:hover { background: var(--bg-card-hover); border-color: var(--border-bright); transform: translateY(-2px); }
.insight-icon { font-size: 20px; margin-bottom: var(--space-2); }
.insight-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.insight-text strong { color: var(--text-primary); }

/* ============================================================
   Quick Log Bar
   ============================================================ */
.quick-log-bar {
  display: flex; gap: var(--space-3); margin-bottom: var(--space-6);
}
.quick-log-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition-base);
}
.quick-log-btn:hover { border-color: var(--border-bright); color: var(--text-primary); transform: translateY(-2px); background: var(--bg-card-hover); }

/* ============================================================
   Weekly Chart
   ============================================================ */
.chart-wrapper { position: relative; width: 100%; }
.chart-canvas { width: 100% !important; }

/* ============================================================
   Workout Log Items
   ============================================================ */
.workout-feed { display: flex; flex-direction: column; gap: var(--space-3); }
.workout-item {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}
.workout-item:hover { background: var(--bg-card-hover); border-color: var(--border-bright); }
.workout-item-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.workout-item-info { flex: 1; }
.workout-item-name { font-size: 15px; font-weight: 600; }
.workout-item-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.workout-item-stats { text-align: right; }
.workout-item-cal { font-size: 16px; font-weight: 700; color: var(--orange); }
.workout-item-time { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   Meal Slots
   ============================================================ */
.meal-slots { display: flex; flex-direction: column; gap: var(--space-4); }
.meal-slot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
}
.meal-slot-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
}
.meal-slot-header:hover { background: var(--bg-card-hover); }
.meal-slot-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: var(--space-2); }
.meal-slot-cal { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.meal-items { padding: 0 var(--space-5) var(--space-4); }
.meal-food-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.meal-food-item:last-child { border-bottom: none; }
.meal-food-macros { display: flex; gap: var(--space-4); font-size: 12px; color: var(--text-secondary); }
.meal-food-macros span { display: flex; align-items: center; gap: 3px; }

/* Food search dropdown */
.food-search-wrapper { position: relative; }
.food-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #1a1f2e;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.food-result-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer; font-size: 13px;
  transition: background var(--transition-fast);
}
.food-result-item:hover { background: rgba(255,255,255,0.06); }
.food-result-macros { font-size: 11px; color: var(--text-secondary); }

/* ============================================================
   Hydration
   ============================================================ */
.hydration-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.water-glass {
  width: 36px; height: 44px;
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px 4px 8px 8px;
  position: relative; overflow: hidden; cursor: pointer;
  transition: all var(--transition-fast);
}
.water-glass:hover { border-color: var(--cyan); }
.water-glass.filled { border-color: var(--cyan); }
.water-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(0,212,255,0.6), rgba(59,130,246,0.4));
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   Lifestyle sleep widget
   ============================================================ */
.sleep-arc-wrapper { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.sleep-times { display: flex; justify-content: space-between; width: 100%; padding: 0 var(--space-4); }
.sleep-time-label { text-align: center; }
.sleep-time-label .time-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.sleep-time-label .time-desc { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   Streak tracker
   ============================================================ */
.streak-badge {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(239,68,68,0.1));
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-lg);
}
.streak-fire { font-size: 32px; animation: flicker 1.5s infinite alternate; }
@keyframes flicker { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.05) rotate(3deg); } }
.streak-count { font-family: var(--font-display); font-size: 42px; font-weight: 900; color: var(--orange); line-height: 1; }
.streak-label { font-size: 13px; color: var(--text-secondary); }

/* ============================================================
   Region / AQI Gauge
   ============================================================ */
.aqi-gauge {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
}
.city-card-hero {
  background: var(--grad-region);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-4);
}
.city-card-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.city-card-state { font-size: 13px; opacity: 0.8; margin-top: 2px; }
.city-card-tags { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.city-weather-box { text-align: right; }
.city-temp { font-family: var(--font-display); font-size: 48px; font-weight: 900; line-height: 1; }
.city-feels { font-size: 12px; opacity: 0.8; }

/* ============================================================
   Personal Records Table
   ============================================================ */
.pr-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3);
}
.pr-item {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex; flex-direction: column; gap: 4px;
}
.pr-exercise { font-size: 12px; color: var(--text-secondary); }
.pr-value { font-size: 18px; font-weight: 700; }

/* ============================================================
   Responsive — Mobile (bottom nav)
   ============================================================ */
@media (max-width: 768px) {
  #app { flex-direction: column; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    width: 100% !important; height: 64px;
    flex-direction: row; justify-content: space-around;
    border-right: none; border-top: 1px solid var(--border);
    padding: 0; z-index: 1000; align-items: center;
  }
  .sidebar-logo { display: none; }
  .sidebar-bottom { display: none; }
  .sidebar-nav { flex-direction: row; padding: 0; gap: 0; }
  .nav-item { flex-direction: column; gap: 2px; padding: var(--space-2); border-radius: var(--radius-sm); }
  .nav-item .nav-label { font-size: 10px; opacity: 1; }
  .nav-item.active::before { display: none; }
  .main-content { padding-bottom: 80px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .insights-row { grid-template-columns: 1fr; }
  .topbar { padding: var(--space-4); }
  .weather-strip { display: none; }
  .view { padding: var(--space-4); }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .life-stage-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes counter-up {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.count-up { animation: counter-up 0.5s ease forwards; }

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* Dropdown arrow for selects */
.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '▾';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--text-muted); pointer-events: none;
}

/* Toast notifications */
.toast-container {
  position: fixed; bottom: 80px; right: var(--space-6); z-index: 2000;
  display: flex; flex-direction: column; gap: var(--space-2);
}
.toast {
  background: #1e2333;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-size: 14px; font-weight: 500;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex; align-items: center; gap: var(--space-3);
  max-width: 300px;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: translateX(100%); } }

/* Tabs */
.tab-bar { display: flex; background: var(--bg-card); border-radius: var(--radius-lg); padding: 4px; gap: 2px; margin-bottom: var(--space-6); }
.tab-btn {
  flex: 1; padding: 8px 12px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition-fast); background: none;
  text-align: center;
}
.tab-btn.active { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.tab-btn:hover:not(.active) { color: var(--text-secondary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Volume bars (muscle group) */
.volume-bars { display: flex; flex-direction: column; gap: var(--space-3); }
.volume-bar-row { display: flex; align-items: center; gap: var(--space-3); }
.volume-bar-label { font-size: 13px; font-weight: 500; width: 70px; color: var(--text-secondary); }
.volume-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.volume-bar-fill { height: 100%; border-radius: 999px; transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1); }
.volume-bar-val { font-size: 12px; font-weight: 600; width: 40px; text-align: right; }

/* Emoji stress picker */
.stress-picker { display: flex; gap: var(--space-3); }
.stress-option {
  flex: 1; padding: var(--space-3);
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center; cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 22px;
}
.stress-option:hover { border-color: var(--border-bright); transform: scale(1.05); }
.stress-option.selected { border-color: var(--purple); background: rgba(168,85,247,0.1); }

/* India map placeholder */
.map-placeholder {
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(59,130,246,0.05));
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  color: var(--text-muted);
}

/* Macro badge */
.macro-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input); border-radius: var(--radius-md);
}
.macro-badge .mb-val { font-size: 20px; font-weight: 700; }
.macro-badge .mb-label { font-size: 11px; color: var(--text-muted); }

/* Day score ring glow */
.day-score-ring { filter: drop-shadow(0 0 12px rgba(0,212,255,0.3)); }

/* ============================================================
   Onboarding screen
   ============================================================ */
.onboarding-step { display: none; }
.onboarding-step.active { display: block; }
.city-search-results {
  max-height: 200px; overflow-y: auto;
  background: #1a1f2e; border: 1px solid var(--border-bright);
  border-radius: var(--radius-md); margin-top: var(--space-2);
  display: none;
}
.city-search-results.show { display: block; }
.city-result-item {
  padding: 10px 14px; cursor: pointer; font-size: 13px;
  transition: background var(--transition-fast);
  display: flex; justify-content: space-between;
}
.city-result-item:hover { background: rgba(255,255,255,0.06); }
.city-result-state { font-size: 11px; color: var(--text-muted); }

/* GPS button */
.gps-btn {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer; transition: all var(--transition-base);
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  width: 100%; margin-bottom: var(--space-3);
}
.gps-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,0.05); }
.gps-pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); animation: gps-ring 1.5s infinite;
}
@keyframes gps-ring {
  0% { box-shadow: 0 0 0 0 rgba(0,212,255,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(0,212,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
}

/* ============================================================
   Dashboard grid layout
   ============================================================ */
.dashboard-grid-2-1 {
  display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6);
}
.dashboard-grid-1-1 {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6);
}
@media (max-width: 1100px) {
  .dashboard-grid-2-1, .dashboard-grid-1-1 { grid-template-columns: 1fr; }
}

/* Step target label  */
.target-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(59,130,246,0.1));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-md);
  font-size: 13px; margin-top: var(--space-4);
}
.target-label .target-val { font-weight: 700; color: var(--purple); }
