/* ───────────────── HydroFuel Styles – Sprint S-2 ──────────────────── */

:root {
  --bg-dark: #070B19;
  --bg-darker: #04060E;
  --brand-primary: #00E5FF;
  --brand-secondary: #7000FF;
  --brand-accent: #FF00A0;
  --text-main: #F2F5FF;
  --text-muted: #A0AEC0; /* Texto más claro para mejorar contraste en fondos oscuros */
  --glass-bg: rgba(20, 26, 45, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --macro-carbs: #00E5FF;
  --macro-protein: #7000FF;
  --macro-fat: #FFB800;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  overflow-x: hidden;
  min-height: -webkit-fill-available;
  font-size: 16px;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Background */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, var(--bg-dark), var(--bg-darker));
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(50px, 30px, 0) scale(1.1);
  }
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  animation: drift 20s infinite alternate ease-in-out;
  will-change: transform;
  transform: translateZ(0); /* Capa de composiciÃ³n forzada */
  pointer-events: none; /* Ignorar clicks mejora el rendimiento DOM */
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15), transparent 70%);
  top: -200px;
  left: -100px;
}

.shape-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(112, 0, 255, 0.15), transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

.shape-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 0, 160, 0.1), transparent 70%);
  top: 40%;
  left: 40%;
  animation-delay: -10s;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 10; /* Asegura que el contenido esté sobre las formas animadas */
}

.glass-panel {
  /* Eliminamos el fondo sÃ³lido para que el liquid-glass tome el control */
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Header */
.app-header {
  padding: 16px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.app-header .header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.app-header .header-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 8px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-primary);
}

.title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  letter-spacing: -0.05em;
  font-weight: 800;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.highlight {
  color: transparent;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
}

/* User badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--brand-primary);
  cursor: pointer;
  align-self: flex-end;
  margin-top: -1.5rem;
  padding: 6px 12px;
  background: rgba(0, 229, 255, 0.08);
  border-radius: 100px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  transition: var(--transition-fast);
}

.user-badge:hover {
  background: rgba(0, 229, 255, 0.15);
}

.user-badge-logout {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 4px;
}

.user-badge-privacy {
  color: var(--brand-primary);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.user-badge-privacy:hover {
  opacity: 1;
}

.user-badge-sep {
  opacity: 0.3;
  margin: 0 4px;
}

/* Forms */
.form-section {
  padding: 40px;
}

.form-group-section {
  margin-bottom: 40px;
}

.form-group-section:last-of-type {
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}

.step-badge {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
}

.grid-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition-fast);
  outline: none;
  width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.45); /* Placeholder más visible */
}

input:focus,
select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

select option {
  background: var(--bg-dark);
  color: var(--text-main);
}

/* Quick Actions Bar */
.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px dashed rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
}

.quick-action-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.submit-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ghost,
.quick-action-btn {
  background: transparent;
  border: 1px dashed var(--glass-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-danger {
  background: #ef4444;
  color: #fff;
  border: 1px solid #f87171;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-danger {
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.danger-note {
  color: #fff5f5;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #ff6b6b;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  line-height: 1.35;
  position: relative;
  z-index: 2;
}

.btn-ghost:hover,
.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
}

.btn-icon {
  transition: transform 0.3s;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn-icon-only {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: rgba(14, 18, 35, 0.85);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  overflow-y: auto;
  padding: 20px 0;
}

.modal-content {
  padding: 32px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#pantry-modal {
  background: rgba(3, 8, 22, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

#pantry-modal .pantry-card {
  width: min(100%, 1180px);
  max-width: 1180px;
  max-height: 92vh;
  margin: auto;
  padding: 36px;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.38);
  background: rgba(7, 12, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#pantry-modal .pantry-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  background: transparent;
}

#pantry-modal .pantry-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

#pantry-modal .pantry-input-row {
  gap: 16px;
}

#pantry-modal .pantry-input-row input {
  min-height: 52px;
}

#pantry-modal .pantry-chip {
  min-width: 130px;
  padding: 12px 16px;
  font-size: 0.92rem;
}

#pantry-modal .pantry-section {
  margin-bottom: 16px;
}

#pantry-modal .pantry-section-title {
  font-size: 0.82rem;
}

#pantry-modal .pantry-group-label {
  font-size: 0.82rem;
}

.hidden {
  display: none !important;
}

/* Auth */
.auth-divider {
  text-align: center;
  margin: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-error {
  color: #ef4444;
  font-size: 0.87rem;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-sm);
  border-left: 3px solid #ef4444;
  margin-top: 4px;
}

/* â”€â”€â”€ AGE GATE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.age-gate-card {
  text-align: center;
  max-width: 420px;
}

.age-gate-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.age-gate-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.age-gate-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 8px;
}

.birthdate-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.birthdate-select {
  flex: 1;
  max-width: 120px;
  text-align: center;
}

.age-gate-error {
  color: #ef4444;
  font-size: 0.87rem;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-sm);
}

.age-gate-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* â”€â”€â”€ ONBOARDING WIZARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.onboarding-card {
  max-width: 560px;
  width: 95%;
  padding: 36px 32px;
}

.ob-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 20px;
}

.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ob-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}

.ob-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s;
}

.ob-dot.active {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}

.ob-dot.done {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.ob-dot-line {
  flex: 1;
  height: 2px;
  background: var(--glass-border);
  min-width: 40px;
  max-width: 80px;
}

.ob-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ob-desc {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 20px;
}

.ob-hint {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.ob-field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.ob-select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  width: 100%;
  outline: none;
}

.ob-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

.ob-nav.single {
  justify-content: flex-end;
}

.ob-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 8px;
}

.ob-success {
  animation: ob-zoom-out 0.8s ease forwards;
}

@keyframes ob-zoom-out {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Restriction chips */
.restriction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}

.restriction-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.restriction-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-primary);
}

.restriction-chip.selected {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
}

#ob-no-restrictions {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

#ob-no-restrictions.selected {
  background: rgba(16,209,255,0.2);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 700;
}

/* Budget chips */
.budget-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.budget-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  padding: 16px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.budget-chip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.budget-chip.selected {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--brand-primary);
}

.budget-emoji {
  font-size: 1.6rem;
}

.budget-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.budget-range {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Goal chips */
.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.goal-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .goal-chip:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

.goal-chip:active {
  transform: scale(0.97);
  box-shadow: 0 0 0 2px rgba(112, 0, 255, 0.35);
}

.goal-chip.selected {
  background: rgba(112, 0, 255, 0.12);
  border-color: var(--brand-secondary);
  color: #ffffff;
}

.goal-icon {
  font-size: 1.4rem;
}

/* RGPD Box */
.rgpd-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rgpd-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.rgpd-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -8px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-checkbox {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand-primary);
  transform: scale(1.2);
}

.consent-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* â”€â”€â”€ MI DESPENSA â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.pantry-card {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;    /* fallback for older browsers */
  max-height: 85dvh;   /* dvh = dynamic viewport height, descounts Safari browser chrome */
  overflow-y: auto;
  padding: 28px;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pantry-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.pantry-header p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.pantry-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pantry-group {
  margin-bottom: 16px;
}

.pantry-group-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.pantry-chips-row,
.supplements-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pantry-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s;
}

.pantry-chip:hover {
  border-color: var(--brand-primary);
  color: var(--text-main);
}

.pantry-chip.selected {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
}

.pantry-input-row {
  display: flex;
  gap: 10px;
}

.pantry-input-row input {
  flex: 1;
}

.pantry-custom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pantry-custom-tag {
  background: rgba(255, 0, 160, 0.1);
  border: 1px solid var(--brand-accent);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pantry-tag-remove {
  background: none;
  border: none;
  color: var(--brand-accent);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

/* --- HARD VALIDATION ERROR BOX --- */
.pantry-error-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 15px;
  animation: slideIn 0.3s ease-out;
}

.pantry-error-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pantry-error-icon {
  font-size: 1.4rem;
}

.pantry-error-header h4 {
  color: #ff8a8a;
  margin: 0;
  font-size: 1rem;
}

.pantry-error-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pantry-error-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.pantry-error-body li {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

.pantry-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Sticky footer — keeps buttons visible while content scrolls */
  position: sticky;
  bottom: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 0 -28px -28px;
  padding-left: 28px;
  padding-right: 28px;
  z-index: 2;
}

.pantry-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.pantry-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* â”€â”€â”€ COOKIE BANNER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: rgba(7, 11, 25, 0.97);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.cookie-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-content p {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-width: 260px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

/* â”€â”€â”€ TOAST â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.hf-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(14, 18, 35, 0.85);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.hf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hf-toast--success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.hf-toast--error {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* â”€â”€â”€ RESULTS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.results-section {
  padding: 40px 0 56px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
}

.results-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 28px;
  align-items: start;
}

@media (max-width: 1400px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1400px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 980px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

.result-card {
  background: rgba(5, 10, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-card.highlight-card {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.08) 0%, rgba(5, 10, 22, 0.92) 100%);
  border-top: 2px solid var(--brand-primary);
}

.bento-card {
  background: rgba(8, 14, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
}

.result-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card.full-width {
  grid-column: 1 / -1;
}

.result-card.highlight-card {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
  border-top: 2px solid var(--brand-primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.bento-card {
  background: rgba(10, 16, 36, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bento-title {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bento-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.status-chip {
  width: fit-content;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 3px 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.status-high { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid #10b981; }
.status-medium { background: rgba(234, 179, 8, 0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.status-low { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid #ef4444; }

.result-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-main);
}

.shopping-list-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.shopping-category-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  min-width: 0;
}

.shopping-category-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
}

.shopping-category-items {
  margin: 0;
  gap: 10px;
}

.shopping-category-items li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.shopping-item-qty {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .shopping-list-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shopping-list-container {
    grid-template-columns: 1fr;
  }
}

.big-number {
  font-size: 3rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: transparent;
  background: linear-gradient(90deg, var(--brand-primary), var(--text-main));
  -webkit-background-clip: text;
  background-clip: text;
  line-height: 1;
}

.big-number .unit {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
}

.rings-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
}

.ring-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.ring-progress {
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}

.ring-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 76px;
  text-align: center;
}

.ring-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1;
}

.ring-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0px;
  margin-top: 2px;
  line-height: 1.1;
  word-break: break-word;
}

.status-indicator {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-top: 10px;
  transition: all 0.5s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.status-green {
  background: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
}

.status-yellow {
  background: #f59e0b;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.status-red {
  background: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
  animation: pulse-red 2s infinite;
  will-change: transform, opacity;
}

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

.macros-breakdown {
  height: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  margin: 16px 0 8px;
}

.macro-bar {
  height: 100%;
  transition: width 1s ease-out;
}

.macro-bar.carbs {
  background: var(--macro-carbs);
}

.macro-bar.protein {
  background: var(--macro-protein);
}

.macro-bar.fats {
  background: var(--macro-fat);
}

.macros-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
}

.macro-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.dot-carbs {
  background: var(--macro-carbs);
}

.dot-protein {
  background: var(--macro-protein);
}

.dot-fats {
  background: var(--macro-fat);
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tips-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tips-list li::before {
  content: "\2022";
  position: absolute;
  left: 4px;
  color: var(--brand-secondary);
  font-size: 1.5rem;
  line-height: 20px;
}

.supplements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .supplements-grid {
    grid-template-columns: 1fr;
  }
}

#res-supplements {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.supplement-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.supplement-community-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 16px 0;
}

.skeleton-card {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  min-height: 160px;
  border-radius: 12px;
}

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

.supplement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.supplement-item h4 {
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.supplement-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--glass-border);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: 0 0 10px rgba(255, 0, 160, 0.5);
}

.timeline-time {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.events-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-tag {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(112, 0, 255, 0.1));
  border: 1px solid var(--brand-primary);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.event-tag button {
  background: none;
  border: none;
  color: var(--brand-accent);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* â”€â”€â”€ MEAL PLAN CARDS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.meal-plan-card {
  background: rgba(0, 0, 0, 0.15) !important;
  border-top: 2px solid #FFB800 !important;
}

.meal-plan-header {
  margin-bottom: 4px;
}

.meal-plan-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.meal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.meal-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* â”€â”€â”€ MODULAR UI LAYOUT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}

.sidebar {
  position: sticky;
  top: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: var(--radius-lg);
  border-color: rgba(255,255,255,0.08);
  background: rgba(8, 12, 25, 0.72);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 10px;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  color: white;
  background: transparent;
  font-size: 0.8rem;
}

.sidebar-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  color: white;
}

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

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-link {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(112,0,255,0.2));
  border-left: 3px solid var(--brand-primary);
  color: white;
  font-weight: 700;
}

.sidebar-account {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
}
.sidebar-account-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sidebar-account-name {
  font-size: 0.9rem;
  font-weight: 700;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.sidebar-account-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.sidebar-account-actions {
  display: flex;
  gap: 6px;
}
.sidebar-account-actions button {
  flex: 1;
  font-size: 0.72rem;
  padding: 5px 8px;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.speed-pill {
  background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.25);
  padding: 3px 8px;
  border-radius: 999px;
  color: #EBFBFF;
  font-size: 0.75rem;
  font-weight: 700;
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-panel {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,14,30,0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.profile-header {
  display: flex;
  align-items: start;
  gap: 10px;
}

.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

#quick-edit-profile {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(112, 0, 255, 0.14));
  border: 1px solid rgba(0, 229, 255, 0.28);
  color: #EBFBFF;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 229, 255, 0.12);
}

#quick-edit-profile:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(112, 0, 255, 0.22));
  border-color: rgba(0, 229, 255, 0.42);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 229, 255, 0.18);
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A6C8FF;
  margin-bottom: 4px;
}

.profile-header h2 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.profile-title-row h2 {
  margin-bottom: 0;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.metric-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 12px;
}

.metric-card h4 {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.metric-card p {
  font-size: 1rem;
  font-weight: 700;
}

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

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.section-screen {
  display: none;
}

.section-screen.active {
  display: block;
}

@media (max-width: 980px) {
  .container {
    padding: 12px 10px;
    overflow-x: hidden; /* Seguridad anti-scroll horizontal */
  }
  .app-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sidebar {
    position: relative;
    top: auto;
    width: auto;
    margin: 0;
    padding: 12px;
    height: auto !important; /* Elimina huecos negros enormes */
    min-height: auto !important;
  }
  .main-panel {
    width: 100%;
  }
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-section, .results-section, .evolution-section {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
  .result-card {
    padding: 16px;
  }
  .sidebar-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .sidebar-link {
    width: 100%;
    text-align: left;
  }
  .logo-container, .page-header, .header-top, .results-header {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .results-header div[style*="display:flex"] {
    width: 100%;
    justify-content: flex-start !important;
    gap: 8px;
    flex-wrap: wrap; /* Evita que los botones del header se salgan de pantalla */
  }
  .page-header h2 {
    margin-bottom: 0;
  }
  .logo-container svg {
    margin-bottom: 8px;
  }
  .app-header {
    padding: 16px;
  }
  .btn-primary, .btn-danger {
    width: 100%;
    justify-content: center;
  }
  .bento-card {
    padding: 14px !important;
    min-height: 130px;
  }
  .bento-value {
    font-size: 1.5rem;
  }
}

.meal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.meal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0; /* Permite que el texto interno se trunque antes de empujar el tiempo */
  flex-shrink: 1;
}

.meal-icon {
  font-size: 1.1rem;
}

.meal-cat-label {
  font-size: 0.78rem;
  font-weight: 700; /* Consistencia: todas las categorías usan 700 */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap; /* Evita que el texto se envuelva */
  overflow: hidden;    /* Oculta el texto que desborda */
  text-overflow: ellipsis; /* Muestra puntos suspensivos si el texto se trunca */
  flex-shrink: 1;      /* Permite que el elemento se encoja si es necesario */
}

.meal-prep-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.meal-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.meal-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meal-macro {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.carbs-color {
  color: var(--macro-carbs);
}

.protein-color {
  color: var(--macro-protein);
}

.fats-color {
  color: var(--macro-fat);
}

.kcal-badge {
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.meal-ingredients,
.meal-steps {
  padding: 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.meal-ingredients li,
.meal-steps li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 3px 0;
}

.meal-ingredients li {
  list-style: none;
}

.meal-ingredients li::before {
  content: "●  ";
  color: var(--brand-primary);
}

.meal-steps {
  padding-left: 20px;
}

.meal-steps li {
  list-style: decimal;
  padding: 4px 0;
}

.meal-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px;
  background: rgba(255, 184, 0, 0.06);
  border-radius: var(--radius-sm);
  border-left: 2px solid #FFB800;
}

.meal-plan-footer {
  margin-top: 12px;
  text-align: right;
}

.capa-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  padding: 4px 10px;
  border-radius: 100px;
}

/* â”€â”€â”€ RESPONSIVE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 2rem;
  }

  .form-section,
  .results-section {
    padding: 24px;
  }

  .rings-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .budget-options {
    grid-template-columns: 1fr;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

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

  .restriction-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .onboarding-card {
    padding: 24px 20px;
  }

  .quick-actions-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pantry-card {
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: 120px !important; 
  }

  /* Reset agresivo para checkboxes en el modal (anula liquid-glass.css) */
  .pantry-card input[type="checkbox"],
  .allergen-consent-checkbox {
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
  }

  .pantry-footer {
    position: sticky !important;
    bottom: -28px !important;
    margin: auto -28px -28px !important;
    padding: 20px 28px !important;
    background: #070C1C !important; /* Fondo opaco para evitar solapamiento visual con el input */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top: 1px solid var(--glass-border) !important;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 16px)) !important;
    z-index: 100 !important;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5) !important;
  }

  .pantry-input-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .pantry-input-row input {
    flex: 1 !important;
    width: auto !important;
  }

  #pantry-add-custom-btn {
    width: 52px !important;
    flex-shrink: 0 !important;
  }

  .pantry-actions {
    flex-direction: column;
    gap: 12px; /* Espacio entre botones apilados */
  }

  .pantry-actions .btn-primary,
  .pantry-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 16px 0;
    overflow-y: auto;
  }
}

/* â”€â”€â”€ BUG FIX ADDITIONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/

/* Restricciones activas en despensa */
.pantry-restrictions-banner {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pantry-restrictions-note {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.restriction-badge {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Ingredientes faltantes en tarjetas de comida */
.missing-ingredients-alert {
  font-size: 0.84rem;
  color: #92400e;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.ingredient-missing {
  opacity: 0.6;
}

.missing-tag {
  font-size: 0.75rem;
}

/* Restricciones en resultados del plan */
.active-restrictions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 10px;
  background: rgba(0, 229, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 229, 255, 0.12);
}

/* SecciÃ³n de restricciones en despensa (contenedor) */
#pantry-active-restrictions {
  margin-bottom: 4px;
}

/* â”€â”€ Pantry close button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pantry-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 10;
}

.pantry-close-btn:hover {
  background: rgba(255, 0, 160, 0.15);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  transform: rotate(90deg);
}

.pantry-card {
  position: relative;
}

/* â”€â”€ Pantry guest panel (regiÃ³n + presupuesto para invitados) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pantry-guest-panel {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 4px;
}

.pantry-guest-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.pantry-guest-field label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.pantry-guest-field select {
  width: auto;
  min-width: 180px;
  font-size: 0.9rem;
  padding: 8px 12px;
}

.pantry-budget-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pantry-budget-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

.pantry-budget-chip small {
  font-size: 0.72rem;
  opacity: 0.7;
}

.pantry-budget-chip:hover {
  border-color: var(--brand-primary);
  color: var(--text-main);
}

.pantry-budget-chip.selected {
  border-color: var(--brand-primary);
  background: rgba(0, 229, 255, 0.1);
  color: var(--brand-primary);
  font-weight: 600;
}

/* â”€â”€ Toast â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hf-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(14, 18, 35, 0.85);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

.hf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hf-toast.hf-toast--warn {
  border-color: rgba(245, 158, 11, 0.4);
}

.hf-toast.hf-toast--error {
  border-color: rgba(239, 68, 68, 0.4);
}

/* â”€â”€ Plan Mode Toggle (Hoy / MaÃ±ana) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.full-span {
  grid-column: 1 / -1;
}

.plan-mode-toggle {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.plan-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

/* hover solo en dispositivos con pointer real (no tÃ¡ctil) */
@media (hover: hover) and (pointer: fine) {
  .plan-mode-btn:hover {
    border-color: rgba(0, 229, 255, 0.5);
    /* mÃ¡s sutil que selected */
    color: var(--text-main);
  }
}

.plan-mode-btn.selected {
  border-color: var(--brand-primary);
  background: rgba(0, 229, 255, 0.08);
  color: var(--text-main);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.pm-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.pm-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.pm-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  word-break: keep-all;
  white-space: normal;
}

.plan-mode-btn.selected .pm-sub {
  color: var(--brand-primary);
  opacity: 0.8;
}

/* â”€â”€ Restriction badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.restriction-badge {
  background: rgba(255, 0, 160, 0.12);
  border: 1px solid rgba(255, 0, 160, 0.3);
  color: #ff80cf;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SISTEMA DE ALÃ‰RGENOS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ SecciÃ³n en Mi Despensa â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pantry-allergen-section {
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 8px;
}

.allergen-section-header {
  margin-bottom: 14px;
}

.allergen-section-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.allergen-section-note strong {
  color: var(--brand-accent);
}

.allergen-group {
  margin-bottom: 10px;
}

.allergen-group-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.allergen-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allergen-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.allergen-chip:hover {
  border-color: var(--brand-accent);
  color: var(--text-main);
  background: rgba(255, 0, 160, 0.06);
}

.allergen-chip.selected {
  background: rgba(255, 0, 160, 0.15);
  border-color: var(--brand-accent);
  color: #ff80cf;
  box-shadow: 0 0 0 2px rgba(255, 0, 160, 0.2);
}

.allergen-chip--custom.selected {
  background: rgba(255, 184, 0, 0.15);
  border-color: #FFB800;
  color: #FFB800;
}

/* EU allergens collapsible */
.allergen-eu-more {
  margin: 10px 0;
}

.allergen-more-toggle {
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.allergen-more-toggle:hover {
  color: var(--brand-primary);
}

/* Custom input */
.allergen-custom-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.allergen-custom-input-wrap {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.allergen-custom-input-wrap input {
  flex: 1;
  font-size: 0.88rem;
}

/* â”€â”€ Disclaimer box â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.allergen-disclaimer-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  transition: box-shadow 0.3s;
}

.allergen-disclaimer-box.allergen-shake {
  animation: allergenShake 0.5s ease;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

@keyframes allergenShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.allergen-disclaimer-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.allergen-disclaimer-body {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.allergen-disclaimer-body p {
  margin-bottom: 8px;
}

.allergen-disclaimer-body strong {
  color: #fca5a5;
}

.allergen-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 10px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.06);
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.allergen-consent-checkbox {
  width: 18px !important;
  height: 18px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #ef4444;
}

/* â”€â”€ Banner en resultados â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.allergen-safety-banner {
  display: flex;
  gap: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.allergen-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.allergen-banner-body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.allergen-banner-body strong {
  color: #fca5a5;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 6px;
}

.allergen-banner-body p {
  margin-bottom: 6px;
}

.allergen-banner-legal {
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-style: italic;
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  padding-top: 8px;
  margin-top: 8px;
}

/* â”€â”€ Compra de sustitutos seguros â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.allergen-buy-alert {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.allergen-buy-alert small {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 4px;
}

.substitute-chip {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* â”€â”€ En tarjetas de receta â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.meal-card--adapted {
  border-color: rgba(16, 185, 129, 0.3);
}

.adapted-badge {
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.swap-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(16, 185, 129, 0.05);
  border-left: 2px solid rgba(16, 185, 129, 0.4);
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.swap-details em {
  color: #fca5a5;
  font-style: normal;
}

.swap-details strong {
  color: #6ee7b7;
}

.buy-needed {
  font-size: 0.75rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 4px;
}

li.ingredient-swapped {
  color: #6ee7b7;
}

.swap-tag {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* â”€â”€ Plan Mode badge (resultados) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.plan-mode-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-left: 10px;
  vertical-align: middle;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

.badge-today {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--brand-primary);
}

.badge-tomorrow {
  background: rgba(112, 0, 255, 0.15);
  border: 1px solid rgba(112, 0, 255, 0.5);
  color: #b47aff;
}

/* â”€â”€ Plan Mode contextual note â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.plan-mode-note-text {
  display: block;
  font-size: 0.83rem;
  color: #b47aff;
  border-left: 2px solid rgba(112, 0, 255, 0.5);
  padding: 8px 12px;
  background: rgba(112, 0, 255, 0.07);
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

.plan-mode-note-text strong {
  color: #c891ff;
}

/* â”€â”€ Sticky submit button (mobile) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 600px) {
  .submit-container {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(to top, var(--bg-dark) 70%, transparent);
    padding: 16px 0 20px;
    margin: 0 -24px -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .submit-container .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   S-3: IA BADGE + QUOTA BADGE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Quota badge en el header */
.ai-quota-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.07);
  color: var(--brand-primary);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.ai-quota-badge.quota-low {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.07);
  color: #f59e0b;
}

.ai-quota-badge.quota-empty {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.07);
  color: #ef4444;
}

/* Badge "âœ¨ IA" en la tarjeta de receta */
.ai-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(112, 0, 255, 0.2), rgba(0, 229, 255, 0.15));
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--brand-primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Meal card con receta IA â€” borde sutil */
.meal-card:has(.ai-badge) {
  border-color: rgba(0, 229, 255, 0.2);
}

/* â”€â”€ App Navigation â”€â”€ */
.app-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-family: inherit;
}

.nav-link:hover {
  color: var(--text-light);
}

.nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

/* â”€â”€ Evolution Section â”€â”€ */
/* Evolution styles moved to styles-evolution.css (lazy loaded) */
@media (prefers-reduced-motion: reduce) {
  .shape { animation: none; }
  .status-red { animation: none; }
}
/* -- Upsell Modal ------------------------------------- */
.upsell-modal-overlay {
  z-index: 1100; /* por encima de cualquier otro modal */
}

.upsell-panel {
  max-width: 400px;
  width: 92%;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.upsell-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 12px;
  border-radius: 100px;
  align-self: center;
}

.upsell-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.upsell-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.upsell-price-block {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upsell-price-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}

.upsell-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.upsell-price-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.upsell-value-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.upsell-value-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 4px;
}

.upsell-value-list li::before {
  content: none; /* override tips-list */
}

.upsell-cta {
  width: 100%;
  justify-content: center;
}

.upsell-secondary {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-color: transparent;
}

.upsell-legal {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  line-height: 1.4;
  margin: 0;
}

/* -- Gate de filas de marcas (M-2) -------------------- */
.marks-blocked-row {
  text-align: center;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 229, 255, 0.03);
  border-top: 1px dashed rgba(0, 229, 255, 0.15);
}

.marks-blocked-cta {
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  cursor: pointer;
  margin-left: 12px;
  transition: var(--transition-fast);
}

.marks-blocked-cta:hover {
  background: rgba(0, 229, 255, 0.08);
}

/* -- Badge de racha en sidebar ------------------------ */
.streak-badge-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
  cursor: pointer;
}

.streak-badge-inner strong {
  color: var(--text-main);
  font-size: 1rem;
}

.streak-badge-inner span {
  font-size: 0.75rem;
}

/* -- Body Comp overlay borroso (M-3) ------------------ */
.body-comp-blur-overlay {
  position: relative;
}

.body-comp-blur-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(7, 11, 25, 0.4);
  border-radius: inherit;
  pointer-events: none;
}

/* -- Safari iOS: evitar zoom automï¿½tico en inputs -------
   font-size < 16px en cualquier input dispara zoom en Safari.
   Forzar mï¿½nimo 16px en todos los contextos.              */

.modal-content input,
.modal-content select,
.age-gate-panel select,
.pantry-card input,
.form-section input,
.form-section select,
.mark-form input,
.mark-form select,
.comp-result-row input {
  font-size: 16px;
}

/* -- Soporte atributo inert para Safari < 15.5 -------- */
[inert] {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

[inert] * {
  pointer-events: none;
}

/* -- Bloqueo scroll body cuando modal abierto ---------- */
body.modal-open {
  overflow: hidden;
  /* NO usar position:fixed â€” colapsa el layout en desktop.
     El scroll se bloquea fijando top via JS (lockBodyScroll).
     width:100% se mantiene para iOS Safari. */
  width: 100%;
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* â”€â”€ Seguridad global anti-overflow horizontal â”€â”€â”€â”€â”€â”€â”€
   Scoped para no romper position:fixed (toast, cookie-banner). */
html, body {
  overflow-x: hidden;
}
img, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

/* --- Projection Section Styles --- */
.projection-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

.projection-ai-msg {
  font-style: italic;
  color: var(--text-muted);
  background: var(--glass-bg); /* Usar variable glass-bg para consistencia */
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 24px;
  line-height: 1.6;
}

.projection-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.proj-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.proj-stat label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.proj-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main); /* Usar text-main como color principal por defecto */
}

/* Ajuste para el color del análisis de tendencia */
.proj-stat .stat-value[style*="accent-primary"] {
  color: var(--accent-primary);
}

/* ── Selector de opciones tipo pill (S-5: formulario marcas) ── */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-option:hover {
  border-color: var(--brand-primary);
  color: var(--text-main);
}

.btn-option.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
}

.mark-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .mark-form-grid {
    grid-template-columns: 1fr;
  }
}

.supplement-legal-note {
  font-size: 0.75rem;
  margin-top: 12px;
}

.supplement-legal-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

.supplement-search-match {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 8px 0;
}

.supplement-community-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 16px 0;
}
/* ── Banner sin alérgenos declarados ─────────────────────────────────── */
.no-allergen-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.no-allergen-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.no-allergen-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.no-allergen-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.no-allergen-link:hover {
  opacity: 0.8;
}

/* --- Rest Day Banner & Switch (S-5) --- */
.rest-day-banner {
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.rest-day-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.hf-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.hf-switch input { opacity: 0; width: 0; height: 0; }

.hf-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.hf-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.hf-switch input:checked + .hf-switch-slider {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.hf-switch input:checked + .hf-switch-slider:before {
  transform: translateX(22px);
  background-color: #fff;
}

/* ── Weekly Template Editor (S-5) ────────────────────────────────── */

#weekly-template-days {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.template-day-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.template-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rest-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 65px;
  text-align: right;
}

.template-day-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.session-row span {
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.session-row select,
.session-row input[type="time"] {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  height: 42px;
  font-size: 0.9rem;
}

.btn-add-session {
  background: transparent;
  border: 1px dashed var(--brand-primary);
  color: var(--brand-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.2s ease;
}

.btn-add-session:hover {
  background: rgba(0, 229, 255, 0.08);
  border-style: solid;
}

@media (min-width: 480px) {
  .session-row span { width: auto; min-width: 70px; }
  .session-row select, .session-row input[type="time"] { flex: none; }
  .session-type { width: 130px; }
  .session-time { width: 105px; }
  .session-intensity { width: 100px; }
}

.rest-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.template-day-card:has(.rest-day-cb:checked) {
  border-color: rgba(0, 229, 255, 0.2);
}

/* S-6: Toggles y Selectores de Evolución */
.consent-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.projection-event-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.pace-calculator-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .metrics-grid { 
    grid-template-columns: 1fr; 
  }
  .pace-calculator-row { 
    flex-direction: column; 
  }

/* --- Toggle de Análisis Avanzados (V-Critica) --- */
/* Aplicando estilos de .hf-switch al .switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Aplicando estilos de .hf-switch-slider al .slider.round */
.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.switch input:checked + .slider.round {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.switch input:checked + .slider.round:before {
  transform: translateX(22px);
  background-color: #fff;
}
}
