/* ============================================================
   MacroTracker — Premium Light Theme
   ============================================================ */

:root {
  --bg: #f8fafc;        /* Slate 50: clean light background */
  --bg2: #ffffff;       /* Pure white for containers/cards */
  --bg3: #f1f5f9;       /* Slate 100: soft slate inner background */
  --surface: #ffffff;   /* Pure white card surface */
  --surface2: rgba(15, 23, 42, 0.04);   /* Soft slate alpha overlay */
  --border: rgba(15, 23, 42, 0.08);      /* Thin refined border */
  --border2: rgba(16, 185, 129, 0.28);   /* Vibrant Bio-Emerald active states */
  --neon: #10b981;      /* Modern Bio-Emerald */
  --neon2: #059669;     /* Deep Emerald Accent */
  --neon-dim: rgba(16, 185, 129, 0.08);  /* Soft emerald background tint */
  --neon-glow: 0 4px 16px rgba(16, 185, 129, 0.22); /* Soft emerald glow */
  --protein: #f43f5e;   /* Vibrant Coral Crimson */
  --protein-dim: rgba(244, 63, 94, 0.08);
  --carbs: #f59e0b;     /* Warm Golden Amber */
  --carbs-dim: rgba(245, 158, 11, 0.08);
  --fat: #0ea5e9;       /* Ocean Sky Cyan */
  --fat-dim: rgba(14, 165, 233, 0.08);
  --water: #0284c7;     /* Pure Marine Blue */
  --water-dim: rgba(2, 132, 199, 0.08);
  --danger: #f43f5e;
  --warning: #f59e0b;
  --text: #0f172a;      /* Slate-900: high contrast typography */
  --text2: #475569;     /* Slate-600: secondary typography */
  --text3: #94a3b8;     /* Slate-400: muted subtitle typography */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
input, button, select, textarea { font-family: inherit; }

html, body {
  height: 100%; width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  overscroll-behavior: none;
}

/* ── UTILITIES ─────────────────────────────────────── */
.hidden { display: none !important; }
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* ── SPLASH ─────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #ffffff; /* Solid clean white background matching the logo */
  overflow: hidden;
}
.splash-content {
  display: flex; flex-direction: column; align-items: center;
  z-index: 1;
}
.splash-logo-container {
  width: 290px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  animation: logoFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards, logoBreath 4s ease-in-out infinite alternate 1.5s;
}
.splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(1.08) brightness(1.04);
}
.splash-footer {
  position: absolute;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 1;
  opacity: 0;
  animation: contentFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}
.footer-small {
  font-family: var(--font-body), sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: #64748b; /* Slate-500: clean gray contrast on white background */
  letter-spacing: 4px;
  text-transform: uppercase;
}
.footer-bold {
  font-family: var(--font-body), sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Keyframe Definitions */
@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes logoBreath {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.025);
  }
}
@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ── APP SHELL ──────────────────────────────────────── */
#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
}
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0; pointer-events: none;
  transform: translateX(20px);
  transition: opacity var(--transition), transform var(--transition);
}
.screen.active {
  opacity: 1; pointer-events: all;
  transform: none;
}
.screen-inner { padding: 0 16px; padding-top: env(safe-area-inset-top, 20px); padding-bottom: 120px; }

/* ── HOME HEADER ────────────────────────────────────── */
.home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 16px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.app-logo-mini { width: 38px; height: 38px; flex-shrink: 0; }
.app-logo-mini svg { width: 100%; height: 100%; }
.greeting { font-size: 0.75rem; color: var(--text2); }
.user-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.notif-btn {
  position: relative; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
}
.notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 6px var(--neon);
}

/* ── DAILY CARD ─────────────────────────────────────── */
.daily-cal-num {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
  color: var(--text);
  transition: all 0.5s;
}
.daily-cal-unit { font-size: 0.8rem; color: var(--text2); }
.daily-ring-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.daily-ring { width: 100%; height: 100%; }
.daily-ring circle { transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1); }
.daily-ring-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.65rem; font-weight: 700; color: var(--neon);
}
.macro-pills { display: flex; gap: 12px; }
.macro-pill { display: flex; align-items: center; gap: 8px; flex: 1; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pill-val { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); }
.pill-label { font-size: 0.68rem; color: var(--text2); }
 
/* ── SEARCH ─────────────────────────────────────────── */
.search-wrap {
  position: relative; margin-bottom: 14px;
  display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 14px; color: var(--text3);
  font-size: 20px; pointer-events: none;
}
.search-input {
  width: 100%; padding: 14px 80px 14px 44px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus {
  border-color: var(--border2);
  box-shadow: 0 0 0 3px rgba(255,42,75,0.08);
}
.search-clear {
  position: absolute; right: 12px; background: none; border: none;
  color: var(--text3); cursor: pointer; display: flex; align-items: center;
}
 
/* ── SEARCH RESULTS ─────────────────────────────────── */
.search-results {
  position: absolute; left: 16px; right: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  z-index: 100; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-height: 320px; overflow-y: auto;
}
.search-result-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item:active { background: var(--surface2); }
.result-name { font-weight: 500; font-size: 0.95rem; }
.result-cal { font-family: var(--font-display); font-size: 0.85rem; color: var(--neon); font-weight: 600; }
.result-macros { font-size: 0.72rem; color: var(--text3); margin-top: 2px; }
 
/* ── SCAN CTA ───────────────────────────────────────── */
.scan-cta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(255,42,75,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border-color: var(--border2);
}
.scan-cta-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.scan-cta-sub { font-size: 0.78rem; color: var(--text2); }
.scan-cta-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon2));
  border: none; color: #000000; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: var(--neon-glow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.scan-cta-btn:active { transform: scale(0.93); }

/* ── SECTIONS ───────────────────────────────────────── */
.section { margin-bottom: 22px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.section-link { background: none; border: none; color: var(--neon); font-size: 0.8rem; cursor: pointer; font-family: var(--font-body); }

/* ── RECENT LIST ─────────────────────────────────────── */
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.empty-recent {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; color: var(--text3); font-size: 0.85rem;
}
.empty-icon { font-size: 20px; }
.recent-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.3s ease;
}
.recent-item:active { background: var(--surface2); transform: scale(0.98); }
.recent-item-name { font-size: 0.9rem; font-weight: 500; }
.recent-item-cal { font-family: var(--font-display); font-size: 0.82rem; color: var(--neon); font-weight: 600; }

/* ── POPULAR GRID ───────────────────────────────────── */
.popular-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.popular-chip {
  padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.3s ease both;
}
.popular-chip:active { background: var(--surface2); transform: scale(0.97); }
.chip-emoji { font-size: 1.4rem; margin-bottom: 6px; display: block; }
.chip-name { font-size: 0.85rem; font-weight: 500; color: var(--text); display: block; margin-bottom: 2px; }
.chip-cal { font-family: var(--font-display); font-size: 0.78rem; color: var(--neon); font-weight: 600; }

/* ── SCAN SCREEN ─────────────────────────────────────── */
.scan-screen-inner { height: 100%; display: flex; flex-direction: column; padding: 0 16px; padding-bottom: 80px; }
.scan-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 16px;
}
.scan-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.back-btn, .flash-btn, .scan-info-btn, .scan-gallery-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.back-btn:active, .flash-btn:active { transform: scale(0.9); }
.flash-btn.active { color: var(--neon); border-color: var(--border2); background: var(--neon-dim); }

.camera-frame {
  flex: 1; position: relative; overflow: hidden;
  border-radius: var(--radius); background: #080810;
  border: 1px solid var(--border); margin-bottom: 20px;
  min-height: 300px;
}
.cam-corner {
  position: absolute; width: 28px; height: 28px;
  border-color: var(--neon); border-style: solid; z-index: 2;
}
.cam-corner.tl { top: 16px; left: 16px; border-width: 3px 0 0 3px; border-radius: 6px 0 0 0; }
.cam-corner.tr { top: 16px; right: 16px; border-width: 3px 3px 0 0; border-radius: 0 6px 0 0; }
.cam-corner.bl { bottom: 16px; left: 16px; border-width: 0 0 3px 3px; border-radius: 0 0 0 6px; }
.cam-corner.br { bottom: 16px; right: 16px; border-width: 0 3px 3px 0; border-radius: 0 0 6px 0; }

.cam-scan-line {
  position: absolute; left: 16px; right: 16px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 12px rgba(0,255,136,0.6);
  top: 20%; z-index: 3;
  animation: scanPulse 2.5s ease-in-out infinite;
  opacity: 0;
}
.cam-scan-line.scanning { opacity: 1; animation: scanMove 2s ease-in-out infinite; }

.cam-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.cam-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.cam-icon { font-size: 32px; color: var(--text3); }
.cam-hint { font-size: 0.85rem; color: var(--text3); }
.cam-ai-label {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.7); border: 1px solid var(--border2);
  border-radius: 99px; padding: 8px 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 500; white-space: nowrap;
  backdrop-filter: blur(10px);
}
.ai-dot-anim {
  width: 8px; height: 8px; border-radius: 50%; background: var(--neon);
  animation: aiDotPulse 1s ease-in-out infinite;
  box-shadow: 0 0 8px var(--neon);
}
.cam-file-input { display: none; }
.cam-preview {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius);
}

.scan-actions {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  margin-bottom: 16px;
}
.scan-main-btn {
  position: relative; width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon2));
  border: none; color: #07070d; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: var(--neon-glow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.scan-main-btn:active { transform: scale(0.92); box-shadow: 0 0 30px rgba(0,255,136,0.5); }
.scan-btn-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(0,255,136,0.3);
  animation: btnRingPulse 2s ease-in-out infinite;
}
.scan-tips { text-align: center; margin-bottom: 20px; }
.tip-text { font-size: 0.78rem; color: var(--text3); }

/* ── PAGE HEADER ─────────────────────────────────────── */
.page-header { padding: 24px 0 16px; }
.page-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }
.page-sub { font-size: 0.82rem; color: var(--text2); margin-top: 2px; }

/* ── HISTORY ─────────────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-group {
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease both;
}
.history-group-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}
.history-group-date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text3);
}
.history-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: fadeInUp 0.3s ease;
}
.history-item-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text3);
  font-size: 0.82rem;
  font-style: italic;
}
.history-emoji { font-size: 1.5rem; flex-shrink: 0; }
.history-name { font-size: 0.9rem; font-weight: 500; flex: 1; }
.history-time { font-size: 0.72rem; color: var(--text3); margin-top: 2px; }
.history-cal { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--neon); }
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; gap: 12px; color: var(--text3); text-align: center;
}
.empty-icon-lg { width: 72px; height: 72px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.empty-icon-lg .material-symbols-rounded { font-size: 32px; }
.empty-state h3 { color: var(--text2); font-family: var(--font-display); }
.empty-state p { font-size: 0.85rem; }

/* ── PROFILE ─────────────────────────────────────────── */
.profile-avatar-wrap { text-align: center; padding: 24px 0; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--neon-dim), rgba(0,204,255,0.1));
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar .material-symbols-rounded { font-size: 36px; color: var(--neon); }
.profile-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.profile-joined { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }
.profile-stats {
  display: flex; align-items: center; padding: 20px;
  margin-bottom: 16px;
}
.pstat { flex: 1; text-align: center; }
.pstat-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--neon); }
.pstat-label { font-size: 0.72rem; color: var(--text3); margin-top: 2px; }
.pstat-divider { width: 1px; height: 40px; background: var(--border); }
.profile-goal { padding: 20px; margin-bottom: 16px; }
.goal-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.goal-icon { font-size: 28px; color: var(--warning); }
.goal-label { font-size: 0.78rem; color: var(--text2); margin-bottom: 6px; }
.goal-input-row { display: flex; align-items: center; gap: 6px; }
.goal-input {
  width: 90px; padding: 8px 12px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  outline: none;
}
.goal-input:focus { border-color: var(--border2); }
.goal-unit { font-size: 0.82rem; color: var(--text2); }
.save-goal-btn {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: var(--neon-dim); border: 1px solid var(--border2);
  color: var(--neon); font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.save-goal-btn:active { background: rgba(0,255,136,0.2); }
.cuisine-chip-group {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: 100%;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cuisine-chip-group::-webkit-scrollbar {
  display: none;
}
.cuisine-chip {
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.cuisine-chip:hover {
  transform: translateY(-1px);
}
.cuisine-chip.active {
  background: var(--neon-dim);
  border-color: var(--border2);
  color: var(--neon);
  box-shadow: var(--neon-glow);
}
.profile-menu { display: flex; flex-direction: column; gap: 10px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  cursor: pointer; transition: all var(--transition);
}
.menu-item:active { background: var(--surface2); }
.menu-ico { font-size: 22px; color: var(--neon); }
.menu-text { flex: 1; }
.menu-title { font-size: 0.9rem; font-weight: 500; }
.menu-sub { font-size: 0.75rem; color: var(--text3); margin-top: 2px; }
.menu-arrow { font-size: 18px; color: var(--text3); }

/* ── MODAL ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
.modal-sheet {
  width: 100%; max-height: 90vh; overflow-y: auto;
  background: var(--bg2); border-top: 1px solid var(--border);
  border-radius: 28px 28px 0 0; padding: 0 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.modal-sheet.open { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; border-radius: 99px; background: var(--border); margin: 12px auto; }
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 8px 0 16px;
}
.modal-food-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; }
.modal-food-desc { font-size: 0.8rem; color: var(--text2); margin-top: 4px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.modal-cal-hero { display: flex; justify-content: center; padding: 16px 0 24px; }
.cal-hero-ring-wrap { position: relative; width: 120px; height: 120px; }
.cal-hero-ring { width: 100%; height: 100%; }
.cal-hero-ring circle { transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1) 0.2s; }
.cal-hero-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0;
}
.cal-hero-num {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  color: var(--neon); text-shadow: 0 0 16px rgba(0,255,136,0.4);
  line-height: 1;
}
.cal-hero-unit { font-size: 0.7rem; color: var(--text3); }

.macro-bars-wrap { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.macro-bar-row {}
.macro-bar-label-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.macro-bar-name { font-size: 0.82rem; color: var(--text2); }
.macro-bar-val { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; color: var(--text); }
.macro-bar-track { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.macro-bar-fill { height: 100%; border-radius: 99px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1) 0.3s; }

.qty-section { margin-bottom: 20px; }
.qty-label { font-size: 0.82rem; color: var(--text2); margin-bottom: 10px; }
.qty-controls { display: flex; align-items: center; gap: 16px; }
.qty-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn:active { background: var(--neon-dim); border-color: var(--border2); color: var(--neon); transform: scale(0.92); }
.qty-display { flex: 1; text-align: center; }
.qty-display span:first-child { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }
.qty-unit-select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}
.qty-unit-select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
}

.add-log-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon2) 100%);
  border: none; border-radius: var(--radius);
  color: #ffffff; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--neon-glow);
  transition: all var(--transition);
}
.add-log-btn:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25); }

/* ── BOTTOM NAV ──────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.92); border-top: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.04);
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px; background: none; border: none; color: var(--text3);
  cursor: pointer; transition: all var(--transition); border-radius: 12px;
}
.nav-item.active { color: var(--neon); }
.nav-item.active .nav-icon {
  color: var(--neon);
  transform: translateY(-1px);
}
.nav-icon { font-size: 24px; transition: all var(--transition); }
.nav-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2px; }

.bottom-nav { overflow: visible !important; }
.nav-scan-special { position: relative; overflow: visible !important; }
.nav-scan-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon2));
  display: flex; align-items: center; justify-content: center;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
  margin-top: -24px; margin-bottom: 2px;
  transition: transform var(--transition), box-shadow var(--transition);
  z-index: 10;
}
.nav-scan-special.active .nav-scan-circle {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}
.nav-scan-special .nav-icon,
.nav-scan-special .svg-icon {
  color: #ffffff !important;
  stroke: #ffffff !important;
  text-shadow: none !important;
  filter: none !important;
}
.nav-scan-special .nav-label {
  color: var(--text) !important;
  font-weight: 700;
}

/* ── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 99px; padding: 12px 24px;
  font-size: 0.85rem; font-weight: 500; color: var(--neon);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border2);
  white-space: nowrap; z-index: 600;
  opacity: 0; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes splashLoad {
  0% { width: 0%; }
  100% { width: 100%; }
}
@keyframes splashPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(0,255,136,0.4)); }
  50% { filter: drop-shadow(0 0 24px rgba(0,255,136,0.7)); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes scanMove {
  0% { top: 16px; opacity: 1; }
  50% { top: calc(100% - 20px); opacity: 1; }
  51% { opacity: 0; top: 16px; }
  52% { opacity: 1; }
  100% { top: calc(100% - 20px); opacity: 1; }
}
@keyframes scanPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.6; }
}
@keyframes btnRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 0.1; }
}
@keyframes aiDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── SCROLLBAR & INPUT SPINNER DECORATIONS ────────────── */
::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Hide number input spinner arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type=number] {
  -moz-appearance: textfield !important;
}

/* ── RESPONSIVE CAP ──────────────────────────────────── */
@media (min-width: 480px) {
  #app { max-width: 420px; margin: 0 auto; }
  .bottom-nav { max-width: 420px; left: 50%; transform: translateX(-50%); }
  .toast { position: fixed; }
  .search-results { left: calc(50% - 210px + 16px); right: calc(50% - 210px + 16px); }
  .modal-backdrop {
    display: flex;
    justify-content: center;
    align-items: flex-end;
  }
  .modal-sheet {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 28px 28px 0 0;
  }
}

/* ── NEW STYLES: CAMERA, DATABASE LIST, RANGE SLIDERS ── */
#cameraVideo {
  object-fit: cover;
}

.cam-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Database List Styling */
.db-food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.3s ease both;
}
.db-food-item:active {
  background: var(--surface2);
  transform: scale(0.98);
}
.db-food-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.db-food-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.db-food-macros {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 2px;
}
.db-food-cal {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon);
}

/* Custom range sliders for Macro Goals */
.macro-slider-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}
.macro-slider-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  outline: none;
  transition: opacity .2s;
  margin-top: 8px;
}
.macro-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.1s ease;
}
.macro-slider-group input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.3);
}

#proteinRange::-webkit-slider-thumb { background: var(--neon); }
#carbsRange::-webkit-slider-thumb { background: var(--neon2) !important; }
#fatRange::-webkit-slider-thumb { background: #ea580c !important; }

/* ── PREMIUM WHITE THEME STYLING RULES ── */
.daily-ring circle:first-child {
  stroke: var(--bg3) !important;
}
.cal-hero-ring circle:first-child {
  stroke: var(--bg3) !important;
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.88) !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.03) !important;
}

.search-results {
  background: var(--bg2) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.3) !important;
}

.modal-sheet {
  background: var(--bg2) !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.05) !important;
}

.save-goal-btn {
  box-shadow: var(--neon-glow) !important;
}

.toast {
  background: var(--bg2) !important;
  border-color: var(--border2) !important;
  color: var(--neon) !important;
  box-shadow: 0 8px 24px rgba(255, 42, 75, 0.1), 0 0 0 1px var(--border2) !important;
}

/* Enhancements for better light premium feel */
.pill-label {
  color: var(--text2) !important;
  font-weight: 500;
}
.daily-cal-unit {
  color: var(--text2) !important;
  font-weight: 500;
}
.greeting {
  font-weight: 500;
  color: var(--text2) !important;
}
.profile-menu .menu-item {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02) !important;
}
#clearRecent {
  font-weight: 600;
}

/* ── ULTRA-PREMIUM PROGRESS DASHBOARD STYLING ── */
.premium-dashboard {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
  padding: 20px !important;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.dashboard-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

.premium-gauge {
  width: 175px;
  height: 175px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.daily-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.daily-ring circle {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-ring circle:last-child {
  filter: drop-shadow(0 4px 12px rgba(255, 42, 75, 0.25));
}

.gauge-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.daily-cal-num {
  font-family: var(--font-body);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.daily-cal-unit {
  font-size: 0.75rem;
  color: var(--text3);
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gauge-percentage-pill {
  background: var(--neon-dim);
  border: 1px solid var(--border2);
  padding: 5px 16px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--neon);
  box-shadow: var(--neon-glow);
  margin-bottom: 4px;
  transition: transform var(--transition);
}

.gauge-percentage-pill:hover {
  transform: scale(1.05);
}

.dashboard-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 18px 0;
}

/* 3-Column Premium Macros Grid */
.premium-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.macro-card-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: all var(--transition);
}

.macro-card-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.macro-chip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.macro-chip-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.protein-chip .macro-chip-title { color: var(--protein); }
.carbs-chip .macro-chip-title { color: var(--carbs); }
.fat-chip .macro-chip-title { color: var(--fat); }

.macro-chip-pct {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text);
}

.macro-chip-val {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
}

.macro-chip-progress-track {
  height: 6px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
}

.macro-chip-progress-bar {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.protein-bar {
  background: linear-gradient(90deg, #f43f5e, #e11d48);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.3);
}

.carbs-bar {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.fat-bar {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.3);
}

/* ── QUICK ADD "+" BUTTONS STYLING ── */
.quick-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neon-dim);
  border: 1px solid var(--border2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: var(--neon-glow);
}

.quick-add-btn span {
  font-size: 16px;
  font-weight: 700;
}

.quick-add-btn:hover {
  transform: scale(1.1);
  background: var(--neon);
  color: #ffffff;
}

.quick-add-btn:active {
  transform: scale(0.9);
}

.popular-quick-add-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-dim);
  border: 1px solid var(--border2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 5;
  box-shadow: var(--neon-glow);
}

.popular-quick-add-btn span {
  font-size: 12px;
  font-weight: 700;
}

.popular-quick-add-btn:hover {
  transform: scale(1.15);
  background: var(--neon);
  color: #ffffff;
}

.popular-quick-add-btn:active {
  transform: scale(0.85);
}

/* Ensure popular chip has relative positioning to support absolute button */
.popular-chip {
  position: relative !important;
}

/* ── ONBOARDING DIALOG STYLES ── */
.onboarding-sheet {
  max-width: 400px !important;
  margin: auto !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
  transform: translateY(30px) scale(0.96) !important;
  opacity: 0 !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
}

.onboarding-sheet.open {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
}

/* ── HEADER DROPDOWN & MENU STYLES ── */
.dropdown-container {
  position: relative;
}

.header-menu-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.header-menu-btn:hover {
  transform: scale(1.05);
  background: var(--surface3);
  color: var(--neon);
  border-color: var(--neon-dim);
}

.header-menu-btn:active {
  transform: scale(0.95);
}

.dropdown-menu {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 1000;
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  transform-origin: top right;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.dropdown-menu.hidden {
  display: none !important;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--surface2);
  color: var(--neon);
}

.dropdown-item .material-symbols-rounded {
  color: var(--text3);
  transition: color 0.2s ease;
}

.dropdown-item:hover .material-symbols-rounded {
  color: var(--neon);
}

/* ── ABOUT & CONTACT MODAL CONTENT STYLES ── */
.info-modal-sheet {
  max-width: 420px !important;
  margin: auto !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18) !important;
  background: var(--bg2) !important;
}

.info-about-wrap {
  text-align: center;
  padding: 12px 4px;
}

.info-logo-wrap {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(255, 42, 75, 0.08);
}

.info-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.info-title span {
  color: var(--neon);
}

.info-version {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 16px;
}

.info-description {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text2);
  margin-bottom: 20px;
}

.info-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}

.info-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-feature-icon {
  font-size: 20px;
  color: var(--neon);
  margin-top: 2px;
}

.info-feature-text h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 2px;
}

.info-feature-text p {
  font-size: 0.76rem;
  color: var(--text2);
  line-height: 1.4;
}

.info-contact-icon-hdr {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 42, 75, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.info-contact-icon-hdr .material-symbols-rounded {
  font-size: 32px;
  color: var(--neon);
}

.info-contact-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.info-contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 6px;
}

.info-contact-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text1);
  word-break: break-all;
}

.info-signature {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-top: 24px;
  text-align: center;
}

/* ── PREMIUM SVG ICON STYLING ── */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  transition: stroke var(--transition), fill var(--transition), transform var(--transition);
}

/* Base style for bottom navigation SVG icons */
.nav-item .svg-icon {
  stroke: var(--text3);
  margin-bottom: 2px;
  transition: all 0.2s ease;
}

.nav-item.active .svg-icon {
  stroke: var(--neon) !important;
  transform: scale(1.05);
  filter: drop-shadow(0 2px 8px rgba(255, 42, 75, 0.25));
}

/* Align magnify glass search icon */
.search-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 13px;
  stroke: var(--text3);
}

.search-wrap input:focus + .search-icon {
  stroke: var(--neon);
}

/* Align modal close cross */
.modal-close .svg-icon {
  stroke: var(--text3);
}

.modal-close:hover .svg-icon {
  stroke: var(--neon);
}

/* Quick add buttons inline SVG sizing */
.quick-add-btn .svg-icon {
  stroke: var(--neon);
  transition: stroke 0.2s ease;
}

.quick-add-btn:hover .svg-icon {
  stroke: #ffffff !important;
}

.popular-quick-add-btn .svg-icon {
  stroke: var(--neon);
  transition: stroke 0.2s ease;
}

.popular-quick-add-btn:hover .svg-icon {
  stroke: #ffffff !important;
}

/* ── CAMERA HUD AR SCANNER OVERLAYS ── */
.ar-bounding-box {
  position: absolute;
  border: 2px dashed rgba(255, 42, 75, 0.85);
  box-shadow: 0 0 12px rgba(255, 42, 75, 0.4);
  border-radius: 8px;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 15;
  animation: fadeInUp 0.4s ease both;
}
.ar-bounding-box:hover, .ar-bounding-box:active {
  border-color: #00dd77;
  border-style: solid;
  box-shadow: 0 0 20px rgba(0, 221, 119, 0.6);
  transform: scale(1.02);
}
.ar-box-badge {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: -16px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all var(--transition);
}
.ar-bounding-box:hover .ar-box-badge, .ar-bounding-box:active .ar-box-badge {
  background: #00dd77;
  color: #07070d;
  border-color: rgba(0, 221, 119, 0.3);
  box-shadow: 0 4px 15px rgba(0, 221, 119, 0.4);
  transform: translateY(-2px);
}

/* ── GOOGLE AUTHENTICATION & DIVIDERS ── */
.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.google-auth-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text3);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-divider:not(:empty)::before { margin-right: .5em; }
.auth-divider:not(:empty)::after { margin-left: .5em; }

/* ── MANDATORY LOGIN GATE BACKDROP ── */
.login-gate-backdrop {
  background: var(--bg) !important;
  backdrop-filter: blur(16px) !important;
  z-index: 99999 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
}

/* ── SCAN PREFERENCES & ACCURACY STYLES ── */
.cam-prefs-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.pref-badge-item {
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  width: fit-content;
  animation: fadeIn 0.3s ease;
}
#scanNotesInput:focus {
  border-color: var(--neon) !important;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
}

/* ── HEALTH CONNECT INTEGRATION ── */
.activity-dashboard {
  animation: fadeIn 0.4s ease;
}
#healthConnectStatusBadge.connected {
  background: rgba(0, 255, 136, 0.1) !important;
  color: var(--neon) !important;
  border-color: rgba(0, 255, 136, 0.3) !important;
}
#healthConnectStatusBadge.disconnected {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text3) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
#healthConnectStatusBadge.unsupported {
  background: rgba(255, 107, 107, 0.1) !important;
  color: #ff6b6b !important;
  border-color: rgba(255, 107, 107, 0.3) !important;
}
#syncActivityBtn.syncing svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* ============================================================
   Weekly Report Dashboard Styles
   ============================================================ */

.report-content-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
  animation: fadeInUp 0.4s ease both;
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.report-stat-card {
  padding: 14px 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
}

.report-stat-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.report-stat-label {
  font-size: 0.68rem;
  color: var(--text3);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-chart-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.chart-title-wrap {
  display: flex;
  flex-direction: column;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.chart-subtitle {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 1px;
}

.chart-interactive-info {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon);
  background: var(--neon-dim);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  align-self: center;
}

.chart-svg-container {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-bar-rect {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.chart-bar-rect:hover, .chart-bar-rect.selected {
  transform: translateY(-2px);
  filter: brightness(1.1) drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  opacity: 1 !important;
}

.chart-bar-placeholder {
  cursor: pointer;
  fill: var(--bg3);
  rx: 6px;
  ry: 6px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}
.chart-bar-placeholder:hover, .chart-bar-placeholder.selected {
  opacity: 0.8;
}

/* Macro balance bars */
.macro-balance-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.macro-balance-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
}

.macro-split-progress {
  height: 14px;
  width: 100%;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border);
}

.macro-split-segment {
  height: 100%;
  transition: width 0.5s ease;
}

/* Legends */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text2);
  font-weight: 500;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.detailed-log-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.detailed-log-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── PROFILE FORM UPGRADE ────────────────────────────── */
.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.profile-form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: all var(--transition);
  box-shadow: none;
}
.profile-form-input:focus {
  border-color: var(--border2);
  background: var(--bg2);
  box-shadow: 0 0 0 3px var(--neon-dim);
}
.profile-form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  height: 44px;
  transition: all var(--transition);
}
.profile-form-select:focus {
  border-color: var(--border2);
  background: var(--bg2);
  box-shadow: 0 0 0 3px var(--neon-dim);
}

/* ── IN-APP CUSTOM SELECT BUTTON ─────────────────────── */
.profile-select-custom-btn {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  height: 44px;
  text-align: left;
  user-select: none;
  transition: all var(--transition);
  box-shadow: none;
}
.profile-select-custom-btn:hover {
  border-color: var(--border2);
  background: var(--bg2);
}
.profile-select-custom-btn:focus, .profile-select-custom-btn:active {
  border-color: var(--neon);
  background: var(--bg2);
  box-shadow: 0 0 0 3px var(--neon-dim);
}
.custom-select-label {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.custom-select-arrow {
  color: var(--text3);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.profile-select-custom-btn:active .custom-select-arrow {
  transform: rotate(180deg);
}

/* ── PEDOMETER STATUS BADGE ────────────────────────── */
.pedometer-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}
.pedometer-badge.connected {
  background: var(--neon-dim);
  color: var(--neon);
  border-color: rgba(0, 255, 136, 0.35);
}
.pedometer-badge.disconnected {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}
.pedometer-badge.unsupported {
  background: var(--surface2);
  color: var(--text3);
  border-color: var(--border);
}

/* ── IN-APP SELECT PICKER OPTIONS SHEET ──────────────── */
#inAppPickerModal {
  z-index: 700;
}
.qty-unit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  color: var(--neon);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.2s ease;
  user-select: none;
}
.qty-unit-btn:hover, .qty-unit-btn:active {
  background: var(--surface);
  border-color: var(--neon);
}
.picker-options-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 0 28px;
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.picker-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.picker-option-card:hover {
  background: var(--bg2);
  border-color: var(--border2);
  transform: translateY(-1px);
}
.picker-option-card:active {
  transform: scale(0.98);
}
.picker-option-card.selected {
  background: var(--neon-dim);
  border-color: var(--neon);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.16);
}
.picker-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.picker-option-icon {
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.picker-option-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.picker-option-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-option-desc {
  font-size: 0.72rem;
  color: var(--text2);
  margin-top: 2px;
  line-height: 1.3;
}
.picker-option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: 10px;
}
.picker-option-card.selected .picker-option-check {
  opacity: 1;
  transform: scale(1);
}
.profile-input-unit-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.profile-input-unit-wrapper .profile-form-input {
  padding-right: 50px;
}
.profile-input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text3);
  pointer-events: none;
}

/* ── REPORT DASHBOARD OVERHAUL ────────────────────────── */
.report-stat-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.report-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--neon-glow) !important;
  border-color: var(--border2) !important;
}

/* SVG Chart Bar Hover Effects */
.chart-bar-rect, .chart-bar-placeholder {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.2s ease, opacity 0.2s ease !important;
  transform-origin: bottom;
}
.chart-bar-rect:hover {
  transform: scaleY(1.05);
  opacity: 1 !important;
  filter: brightness(1.1);
}
.chart-bar-placeholder:hover {
  transform: scaleY(1.5);
  opacity: 0.8 !important;
}

/* Circular Macro Rings */
.macro-rings-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.macro-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.macro-ring-svg-wrap {
  position: relative;
  width: 70px;
  height: 70px;
}
.macro-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.macro-ring-bg {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 6;
}
.macro-ring-progress {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.macro-ring-label-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text);
}
.macro-ring-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text2);
}
.macro-ring-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text3);
  font-family: var(--font-display);
}

/* Dynamic Breakdown Card */
.report-day-detail-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  animation: slideDownIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@keyframes slideDownIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── WEEKLY REPORT ADDITIONS ─────────────────────────── */
.report-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
}
.report-date-header h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.report-date-header span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  background: var(--bg3);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Day Badges */
.day-badge-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 4px;
}
.day-badge {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}
.day-badge-best {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.15);
  color: #00aa50;
}
.day-badge-worst {
  background: rgba(255, 42, 75, 0.08);
  border: 1px solid rgba(255, 42, 75, 0.15);
  color: #ff2a4b;
}

/* Insights Card */
.insight-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
}
.insight-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.insight-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.insight-text-item {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.45;
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--neon);
}
.insight-text-item:last-child {
  margin-bottom: 0;
}
.insight-comp-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Shareable Summary Card */
.share-card-wrapper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.share-story-card {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31102f 100%);
  border-radius: 20px;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.share-story-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,42,75,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.share-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.share-card-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-card-logo {
  height: 24px;
  width: auto;
}
.share-card-brand-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ff2a4b, #ff7e40);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.share-card-dates {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  text-transform: uppercase;
}
.share-card-main-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 20px;
  background: linear-gradient(to right, #ffffff, rgba(255,255,255,0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.share-card-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.share-card-metric-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(10px);
}
.share-card-metric-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.share-card-metric-val {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 850;
  margin-top: 4px;
}
.share-card-metric-val.neon-val {
  color: #ff2a4b;
}
.share-card-metric-val.green-val {
  color: #00ff88;
}
.share-card-metric-val.blue-val {
  color: #00ccff;
}
.share-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
  margin-top: 24px;
}
.share-card-studio {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.share-card-url {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
}

/* ── AI CHAT FLOATING ACTION BUTTON (FAB) ────────────── */
.fab-chat-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg2);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.fab-chat-btn:hover {
  transform: scale(1.08);
  background: #1e293b;
}
.fab-chat-btn:active {
  transform: scale(0.95);
}

/* ── AI CHAT DRAWER OVERLAY ──────────────────────────── */
.chat-drawer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: visibility 0.3s linear;
}
.chat-drawer.hidden {
  visibility: hidden;
  pointer-events: none;
}
.chat-drawer-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
  opacity: 1;
}
.chat-drawer.hidden .chat-drawer-overlay {
  opacity: 0;
}
.chat-drawer-content {
  position: relative;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-bottom: none !important;
  border-radius: 20px 20px 0 0 !important;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px -10px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}
.chat-drawer.hidden .chat-drawer-content {
  transform: translateY(100%);
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 2px;
}
.chat-bubble-user {
  align-self: flex-end;
  background: var(--text) !important;
  color: var(--bg2) !important;
  font-weight: 500;
  border-radius: 12px 12px 2px 12px;
}
.chat-bubble-bot {
  align-self: flex-start;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 12px 12px 12px 2px;
}

body.light-theme .chat-suggestion-chip {
  background: var(--bg2) !important;
  color: var(--text2) !important;
  border: 1px solid var(--border) !important;
}

/* typing indicators animation */
@keyframes typingBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (min-width: 480px) {
  .chat-drawer-content {
    max-width: 420px;
    left: 50%;
    transform: translateY(0) translateX(-50%);
  }
  .chat-drawer.hidden .chat-drawer-content {
    transform: translateY(100%) translateX(-50%);
  }
  .fab-chat-btn {
    right: calc(50% - 210px + 20px);
  }
}

/* ── VOICE FOOD LOGGING STYLES ── */
.search-mic-btn {
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--neon);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.search-mic-btn:active {
  transform: translateY(-50%) scale(0.9);
  background: rgba(0, 255, 136, 0.15);
}

.voice-cta-card {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(0, 180, 255, 0.05));
  border: 1px solid rgba(0, 255, 136, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.voice-cta-card:active {
  transform: scale(0.98);
}
.voice-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0, 255, 136, 0.15);
  color: var(--neon);
  margin-bottom: 4px;
}
.voice-cta-mic-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), #00c3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07080e;
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.35);
  flex-shrink: 0;
}

/* Voice Modal (YouTube / Google Voice Search Style) */
.voice-modal-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px 30px;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.voice-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 14px;
}

.voice-badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}

.voice-main-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 84px;
  margin-bottom: 6px;
}

.voice-headline {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 850;
  color: var(--text);
  margin: 0 0 6px 0;
  transition: color 0.2s ease;
  letter-spacing: -0.2px;
}
.voice-headline.listening {
  color: var(--neon);
}
.voice-headline.processing {
  color: #00ddff;
  animation: pulseGlow 1.4s infinite ease-in-out;
}

.voice-live-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text3);
  line-height: 1.45;
  margin: 0;
  max-width: 90%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
  transition: all 0.2s ease;
}
.voice-live-text.active-speech {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 750;
}

/* Sound Wave Equalizer (Google / YouTube Style) */
.voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin: 8px 0 12px;
}
.voice-wave-bar {
  width: 4px;
  height: 6px;
  border-radius: 4px;
  background: var(--neon);
  transition: height 0.15s ease, opacity 0.15s ease;
  opacity: 0.35;
}
.voice-waveform.active .voice-wave-bar {
  opacity: 0.95;
  animation: ytWaveAnim 1.2s infinite ease-in-out;
}
.voice-waveform.active .voice-wave-bar:nth-child(1) { animation-delay: 0.0s; }
.voice-waveform.active .voice-wave-bar:nth-child(2) { animation-delay: 0.2s; }
.voice-waveform.active .voice-wave-bar:nth-child(3) { animation-delay: 0.4s; }
.voice-waveform.active .voice-wave-bar:nth-child(4) { animation-delay: 0.6s; }
.voice-waveform.active .voice-wave-bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes ytWaveAnim {
  0%, 100% { height: 6px; transform: scaleY(0.6); opacity: 0.4; }
  50% { height: 26px; transform: scaleY(1.4); opacity: 1; }
}

/* Big Center Microphone with Pulsing Concentric Rings */
.voice-record-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 8px;
}
.voice-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--neon);
  opacity: 0;
  pointer-events: none;
}
.voice-record-wrap.listening .voice-pulse-ring {
  animation: voicePulse 1.8s infinite ease-out;
}
.voice-record-wrap.listening .voice-pulse-ring:nth-child(2) {
  animation-delay: 0.6s;
}
.voice-record-wrap.listening .voice-pulse-ring:nth-child(3) {
  animation-delay: 1.2s;
}

.voice-record-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--neon), #00c3ff);
  color: #07080e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(0, 255, 136, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.voice-record-btn:active {
  transform: scale(0.92);
}
.voice-record-wrap.listening .voice-record-btn {
  background: linear-gradient(135deg, #ea4335, #ff5722);
  box-shadow: 0 8px 28px rgba(234, 67, 53, 0.45);
  color: #ffffff;
}

@keyframes voicePulse {
  0% { transform: scale(0.7); opacity: 0.85; }
  100% { transform: scale(1.65); opacity: 0; }
}

.voice-tap-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
  margin: 4px 0 16px;
}

/* Quick Example Search Chips */
.voice-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
  width: 100%;
}
.voice-chip {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.voice-chip:hover, .voice-chip:active {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 255, 136, 0.08);
}

/* Bottom Controls */
.voice-bottom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.voice-lang-tabs {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3px;
  flex: 1;
}
.voice-lang-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 20px;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  background: none;
  color: var(--text3);
  transition: all 0.2s ease;
}
.voice-lang-btn.active {
  background: var(--surface2);
  color: var(--neon);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.voice-keyboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text2);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.voice-keyboard-btn:hover, .voice-keyboard-btn:active {
  color: var(--neon);
  border-color: var(--neon);
}

.voice-transcript-box {
  width: 100%;
  min-height: 64px;
  max-height: 110px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text1);
  text-align: left;
  outline: none;
  resize: none;
  margin-top: 8px;
  box-sizing: border-box;
  font-family: inherit;
}
.voice-transcript-box:focus {
  border-color: var(--neon);
}

.voice-submit-row {
  width: 100%;
  margin-top: 14px;
}

/* ═════════════════════════════════════════════════════════════════════
   99% ACCURACY PRECISION SUITE STYLES
   AR Plate Reticle, 3D Dual-Angle HUD, Snap & Speak, Clarification Chips
   ═════════════════════════════════════════════════════════════════════ */

/* ── ACCURACY TOOLBAR (3D MODE) ── */
.cam-accuracy-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  width: 100%;
  max-width: 440px;
  padding: 2px 4px;
}
.cam-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.cam-tool-btn:hover {
  border-color: var(--neon);
  color: var(--text);
  transform: translateY(-1px);
}
.cam-tool-btn.active {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

/* ── 3D DUAL-ANGLE HUD BADGE & THUMBNAIL ── */
.dual-angle-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.9), rgba(0, 255, 136, 0.85));
  color: #07070d;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  z-index: 14;
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.4);
  white-space: nowrap;
  letter-spacing: 0.2px;
  animation: badgeSlideDown 0.3s ease;
  pointer-events: none;
}
@keyframes badgeSlideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.dual-angle-thumb-wrap {
  position: absolute;
  top: 50px;
  right: 12px;
  background: rgba(10, 15, 29, 0.85);
  border: 1.5px solid var(--neon);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 14;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: thumbPopIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes thumbPopIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.dual-angle-thumb-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.dual-angle-thumb-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--neon);
}
.dual-angle-thumb-reset {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text2);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  transition: all 0.2s;
}
.dual-angle-thumb-reset:hover {
  background: #ff3b30;
  color: #ffffff;
}



/* ── 1-TAP SMART CLARIFICATION SECTION ── */
.clarification-section {
  background: rgba(0, 255, 136, 0.03);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 14px 0;
  text-align: left;
}
.clarification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.clarification-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--neon);
  display: flex;
  align-items: center;
  gap: 4px;
}
.clarification-sub {
  font-size: 0.68rem;
  color: var(--text3);
  font-weight: 600;
}
.clarification-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.clarification-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.clarification-chip:active {
  transform: scale(0.95);
}
.clarification-chip.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--neon);
  color: var(--text1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.25);
}
.clarification-chip .chip-delta {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text3);
}
.clarification-chip.active .chip-delta {
  background: rgba(0, 255, 136, 0.25);
  color: var(--neon);
}
/* ── HYDRATION TRACKER ── */
.hydration-card {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}
.hydration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hydration-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hydration-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.hydration-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--water);
  background: var(--water-dim);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}
.hydration-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.hydration-amount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}
.hydration-goal {
  font-size: 0.75rem;
  color: var(--text3);
  font-weight: 600;
}
.hydration-bar-track {
  height: 8px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 14px;
  width: 100%;
}
.hydration-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, var(--water));
  border-radius: 99px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}
.hydration-actions {
  display: flex;
  gap: 8px;
}
.hydration-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(2, 132, 199, 0.2);
  background: rgba(2, 132, 199, 0.04);
  color: var(--water);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.hydration-btn:active {
  transform: scale(0.96);
  background: rgba(2, 132, 199, 0.12);
}

/* ── MULTI-STEP ONBOARDING WIZARD ── */
.onboarding-sheet {
  background: var(--bg2) !important;
  border-radius: 28px !important;
  padding: 24px 20px !important;
  max-width: 440px !important;
  width: 92% !important;
  margin: auto !important;
  box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}
.onboarding-wizard {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
  text-align: left;
}
.onboarding-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.onboarding-step-counter {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.onboarding-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.onboarding-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--neon2));
  border-radius: 99px;
  width: 25%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.onboarding-step-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
}
.onboarding-step-sub {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.4;
}

/* Interactive Option Cards */
.onboarding-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
.onboarding-choice-card {
  padding: 12px 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.onboarding-choice-card:hover {
  border-color: var(--border2);
}
.onboarding-choice-card.selected {
  border-color: var(--neon);
  background: var(--neon-dim);
  box-shadow: 0 0 0 1px var(--neon), var(--neon-glow);
}
.onboarding-choice-card.selected .onboarding-choice-title {
  color: var(--neon);
}
.onboarding-choice-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.onboarding-choice-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}
.onboarding-choice-sub {
  font-size: 0.68rem;
  color: var(--text3);
  line-height: 1.2;
}

/* Gender Pill Selectors */
.gender-selector-wrap {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.gender-btn {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text2);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.gender-btn.selected {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}

/* Dietary Preference Chips */
.diet-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.diet-chip {
  padding: 8px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.diet-chip.selected {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}

/* BMI Indicator Card */
.bmi-live-card {
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.bmi-score {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.bmi-category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  color: #ffffff;
}

/* Nutrition Plan Reveal Blueprint */
.plan-blueprint-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.04));
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.12);
}
.plan-hero-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.plan-macros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.plan-macro-box {
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Onboarding Navigation Buttons */
.onboarding-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}
.onboarding-back-btn {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.onboarding-next-btn {
  flex: 2;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--neon), var(--neon2));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.onboarding-next-btn:active {
  transform: scale(0.98);
}

/* Profile Science Button */
.btn-recalculate-science {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(16, 185, 129, 0.4);
  background: var(--neon-dim);
  color: var(--neon);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 4px;
}
.btn-recalculate-science:hover {
  background: rgba(16, 185, 129, 0.14);
}
