/* =========================================================
   SABOR FIT - ESTILOS MÓVIL-FIRST DE ALTA FIDELIDAD
   Paleta Oficial: Verde Esmeralda, Coral y Blanco Limpio
   ========================================================= */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-deep: #064e3b;
  --primary-light: #ecfdf5;
  --primary-glow: rgba(16, 185, 129, 0.25);

  --accent-coral: #ff6b4a;
  --accent-amber: #f59e0b;
  --accent-bg: #fff7ed;

  --bg-app: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-active: #10b981;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background: #ffffff;
  font-family: var(--font-sans);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Contenedor móvil a pantalla completa */
.app-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0 auto;
}

@media (min-width: 600px) {
  body {
    background: #0b1120;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }
  .app-container {
    max-width: 440px;
    height: 94vh;
    border-radius: 40px;
    border: 8px solid #1e293b;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
  }
}

/* =========================================================
   HEADER PRINCIPAL (APP)
   ========================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  padding: calc(env(safe-area-inset-top, 12px) + 8px) 18px 12px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-badge {
  width: 38px;
  height: 38px;
  background: white;
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px var(--primary-glow);
  overflow: hidden;
}

.brand-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-deep);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-text span {
  color: var(--accent-coral);
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.free-access-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================================================
   TOP BAR MINIMALISTA PARA EL CUESTIONARIO
   ========================================================= */
.quiz-top-bar {
  padding: calc(env(safe-area-inset-top, 14px) + 8px) 20px 10px 20px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
}

.quiz-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.quiz-back-btn:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

.quiz-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-step-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-step-text {
  font-size: 0.80rem;
  font-weight: 800;
  color: #064e3b;
  letter-spacing: -0.2px;
}

.quiz-step-percent {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-deep);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.quiz-progress-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.quiz-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.quiz-progress-avocado {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
  z-index: 3;
  user-select: none;
  pointer-events: none;
}

.quiz-progress-avocado .avocado-emoji {
  display: inline-block;
  animation: avocadoWobble 1s ease-in-out infinite alternate;
}

@keyframes avocadoWobble {
  0% { transform: translateY(0) rotate(-7deg) scale(1); }
  100% { transform: translateY(-3px) rotate(7deg) scale(1.1); }
}

.quiz-progress-goal {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
  user-select: none;
  transition: transform 0.25s ease;
}

.quiz-progress-goal.reached {
  animation: goalCheer 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
}

@keyframes goalCheer {
  0% { transform: translateY(-50%) scale(1) rotate(0deg); }
  100% { transform: translateY(-50%) scale(1.35) rotate(14deg); }
}

/* =========================================================
   PANTALLA DE CUESTIONARIO (LAYOUT FULL-SCREEN)
   ========================================================= */
.onboarding-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quiz-content-body {
  flex: 1;
  padding: 10px 20px 100px 20px;
  display: flex;
  flex-direction: column;
}

.quiz-title-area {
  margin-bottom: 20px;
}

.quiz-title-area h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.6px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.quiz-title-area p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =========================================================
   PANTALLA 0: BIENVENIDA
   ========================================================= */
.welcome-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
}

.hero-avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: white;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
  margin-bottom: 18px;
}

.hero-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  overflow: hidden;
}

.hero-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.welcome-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.2;
}

.welcome-title span {
  color: var(--primary);
}

.welcome-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
  margin-bottom: 26px;
}

.welcome-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 30px;
}

.highlight-item {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.highlight-item .icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.highlight-item .text strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}

.highlight-item .text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================================
   CUADRÍCULAS Y TARJETAS VISUALES DEL CUESTIONARIO
   ========================================================= */

/* Cuadrícula 2 columnas */
.visual-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Lista vertical de opciones */
.visual-list-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tarjeta visual base */
.visual-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.visual-card:active {
  transform: scale(0.97);
}

.visual-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.visual-card .card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}

.visual-card .card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.visual-card .card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

.visual-card .card-badge-top {
  position: absolute;
  top: -8px;
  right: 10px;
  background: var(--accent-coral);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tarjeta horizontal (para listas verticales de 1 columna) */
.visual-card-row {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  min-height: 84px;
}

.visual-card-row:active {
  transform: scale(0.98);
}

.visual-card-row.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.visual-card-row .row-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
}

.visual-card-row .row-content {
  flex: 1;
  text-align: left;
}

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

.visual-card-row .row-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
}

.visual-card-row .row-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  letter-spacing: 0.2px;
}

.visual-card-row.selected .row-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #065f46;
}

.visual-card-row .row-sub {
  font-size: 0.81rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.36;
}

.visual-card-row .row-check,
.visual-card .card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.visual-card-row.selected .row-check,
.visual-card.selected .card-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Lista específica para objetivos más espaciosa */
.visual-list-col.goals-list {
  gap: 12px;
  margin-top: 6px;
  margin-bottom: 24px;
}

.visual-list-col.goals-list .visual-card-row {
  min-height: 90px;
  padding: 17px 18px;
}

/* =========================================================
   PASO 1: SUPERMERCADOS (CUADRÍCULA 2x3 SIMÉTRICA Y CENTRADA)
   ========================================================= */
.super-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 24px;
}

.super-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 10px 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 126px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.super-card:active {
  transform: scale(0.96);
}

.super-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.super-card .logo-box {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.super-card .logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.super-card:hover .logo-box img,
.super-card.selected .logo-box img {
  transform: scale(1.05);
}

.super-card .super-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.25;
}

/* Renderizado consistente de emojis Apple en Android y PC */
img.emoji {
  height: 1.2em;
  width: 1.2em;
  margin: 0 .08em;
  vertical-align: -0.16em;
  display: inline-block;
  pointer-events: none;
}

.brand-logo-badge img.emoji {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

.nav-tab-btn .tab-icon img.emoji {
  width: 1.35em;
  height: 1.35em;
  vertical-align: middle;
}

.hero-avatar-inner img.emoji {
  width: 50px;
  height: 50px;
  vertical-align: middle;
}

.empty-week-card img.emoji {
  width: 2.8rem;
  height: 2.8rem;
  vertical-align: middle;
}

.empty-day-card img.emoji {
  width: 2.6rem;
  height: 2.6rem;
  vertical-align: middle;
}

.super-card .super-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f5f9;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.super-card.selected .super-check {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* =========================================================
   PASO 2: PERSONAS (STEPPER INTERACTIVO CON SILUETAS)
   ========================================================= */
.people-stepper-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 24px;
}

.people-hero-card {
  width: 100%;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 28px;
  padding: 28px 18px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  min-height: 380px;
  transition: all 0.25s ease;
}

.people-silhouettes-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 120px;
  max-width: 320px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 6px;
}

.person-silhouette {
  width: 44px;
  height: 58px;
  color: var(--primary);
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.28));
  animation: silhouettePop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.people-silhouettes-stage[data-count="1"] .person-silhouette {
  width: 72px;
  height: 90px;
}

.people-silhouettes-stage[data-count="2"] .person-silhouette,
.people-silhouettes-stage[data-count="3"] .person-silhouette {
  width: 54px;
  height: 68px;
}

.people-silhouettes-stage[data-count="4"] .person-silhouette,
.people-silhouettes-stage[data-count="5"] .person-silhouette {
  width: 44px;
  height: 56px;
}

.people-silhouettes-stage[data-count="6"] .person-silhouette,
.people-silhouettes-stage[data-count="7"] .person-silhouette,
.people-silhouettes-stage[data-count="8"] .person-silhouette {
  width: 35px;
  height: 46px;
  gap: 8px;
}

@keyframes silhouettePop {
  0% { transform: scale(0.5) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.people-stepper-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 14px 0 10px 0;
  width: 100%;
}

.stepper-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.90);
  background: #e2e8f0;
}

.stepper-btn.plus {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.stepper-btn.plus:active:not(:disabled) {
  background: var(--primary-dark);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.people-counter-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.people-number-giant {
  font-size: 3.8rem;
  font-weight: 900;
  color: #064e3b;
  line-height: 1;
  letter-spacing: -0.03em;
}

.people-label-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
  text-align: center;
}

.people-label-sub {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-top: 6px;
  display: inline-block;
  text-align: center;
}

.people-quick-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.people-preset-pill {
  padding: 10px 4px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.people-preset-pill:active {
  transform: scale(0.95);
}

.people-preset-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 800;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.people-info-tip {
  width: 100%;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.people-info-tip .tip-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* =========================================================
   PASO 5: ALÉRGENOS (TARJETA NINGUNA + CUADRÍCULA LIMPIA)
   ========================================================= */
.no-allergen-card {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.no-allergen-card.selected {
  border: 2px solid var(--primary);
  background: var(--primary-light);
  border-style: solid;
}

.no-allergen-card .no-all-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.no-allergen-card .no-all-text {
  flex: 1;
  text-align: left;
}

.no-allergen-card .no-all-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.no-allergen-card .no-all-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.allergens-grid-2 {
  display: grid;
  grid-template-columns: calc(50% - 5px) calc(50% - 5px);
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.allergen-chip-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.allergen-chip-box:active {
  transform: scale(0.97);
}

.allergen-chip-box.selected {
  border-color: #ef4444;
  background: #fef2f2;
}

.allergen-chip-box .all-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.allergen-chip-box .all-label {
  font-size: 0.80rem;
  font-weight: 700;
  color: #1e293b;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.allergen-chip-box.selected .all-label {
  color: #dc2626;
  font-weight: 700;
}

.allergen-chip-box .all-check-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.allergen-chip-box.selected .all-check-mark {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

/* =========================================================
   PASO 6: PRESUPUESTO CON BARRA DESLIZANTE TÁCTIL (SLIDER)
   ========================================================= */
.budget-box-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.budget-giant-amount {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--primary-deep);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.budget-giant-amount .currency {
  font-size: 1.8rem;
  color: var(--primary);
}

.budget-giant-amount .per-week {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.budget-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-top: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.slider-container {
  width: 100%;
  padding: 8px 0;
}

/* Input range estilizado para móvil */
.budget-touch-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #10b981 0%, #10b981 var(--slider-pct, 30%), #e2e8f0 var(--slider-pct, 30%), #e2e8f0 100%);
  outline: none;
  cursor: pointer;
}

.budget-touch-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.budget-touch-slider::-webkit-slider-thumb:active {
  transform: scale(1.18);
}

.budget-scale-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
}

.budget-chips-presets {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
}

.preset-chip-btn {
  flex: 1;
  padding: 10px 4px;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip-btn:active {
  transform: scale(0.95);
}

.preset-chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* =========================================================
   BOTÓN FIJO INFERIOR DEL CUESTIONARIO
   ========================================================= */
.quiz-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 440px;
  padding: 14px 20px calc(env(safe-area-inset-bottom, 16px) + 12px) 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 25%, #ffffff 100%);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.btn-continue-pill {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: all 0.15s ease;
}

.btn-continue-pill:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-continue-pill .btn-arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  stroke: currentColor;
  flex-shrink: 0;
}

.btn-continue-pill:hover .btn-arrow-icon,
.btn-continue-pill:active .btn-arrow-icon {
  transform: translateX(4px);
}

/* =========================================================
   PANTALLA DE CARGA GENERANDO MENÚ
   ========================================================= */
.loading-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.cooking-loader {
  font-size: 60px;
  animation: bounceCooking 1s infinite alternate ease-in-out;
  margin-bottom: 20px;
}

@keyframes bounceCooking {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-16px) rotate(8deg); }
}

/* =========================================================
   ESTILOS DE LA APP PRINCIPAL (TABS)
   ========================================================= */
.main-app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

.tab-pane {
  display: none;
  padding: 16px 16px 20px 16px;
}

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

/* =========================================================
   PESTAÑA MENÚ SEMANAL (RESTAURACIÓN EXACTA & CALENDARIO)
   ========================================================= */
.menu-week-navigator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.week-nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-week-nav-icon {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-week-nav-icon:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.week-nav-info {
  display: flex;
  flex-direction: column;
}

.week-nav-tag {
  font-size: 0.70rem;
  font-weight: 800;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.week-nav-range {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.btn-week-add-pill {
  background: #064e3b;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
}

.btn-week-add-pill:hover {
  background: #047857;
  transform: translateY(-1px);
}

.days-bar {
  display: flex;
  gap: 4px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 6px 2px;
  box-sizing: border-box;
  width: 100%;
}

.days-bar::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: 1 1 0;
  min-width: 36px;
  max-width: 48px;
  height: 58px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 1px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.day-chip .day-letter {
  font-size: 0.70rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
  text-transform: uppercase;
}

.day-chip .day-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.day-chip .day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  margin-top: 1px;
}

.day-chip.active {
  background: #064e3b;
  border-color: #064e3b;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.28);
}

.day-chip.active .day-letter {
  color: #a7f3d0;
}

.day-chip.active .day-num {
  color: #ffffff;
}

.day-chip.active .day-dot {
  background: #34d399;
}

.day-chip.is-today:not(.active) {
  border-color: #10b981;
  background: #f0fdf4;
}

.day-chip.is-today:not(.active) .day-letter {
  color: #059669;
}

.day-chip.is-today:not(.active) .day-num {
  color: #064e3b;
}

.day-today-badge {
  font-size: 0.52rem;
  font-weight: 900;
  color: #059669;
  line-height: 1;
  letter-spacing: 0.3px;
  background: #d1fae5;
  padding: 1px 4px;
  border-radius: 4px;
  margin-top: 1px;
}

.day-chip.active .day-today-badge {
  color: #064e3b;
  background: #6ee7b7;
}

.day-chip.add-week-chip {
  flex: 1 1 0;
  min-width: 38px;
  max-width: 48px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
}

.day-chip.add-week-chip .add-plus {
  font-size: 1.15rem;
  font-weight: 900;
  color: #059669;
  line-height: 1;
}

.day-chip.add-week-chip .add-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #059669;
  line-height: 1;
}

.day-chip.add-week-chip:hover {
  background: #ecfdf5;
  border-color: #059669;
  border-style: solid;
  transform: scale(1.04);
}

/* Chips interactivos de selección de días (Compra y Cuestionario Paso 9) */
.day-chip.select-chip {
  padding: 4px 2px;
  outline: none;
  border-width: 1.5px;
  box-sizing: border-box;
  font-family: inherit;
  user-select: none;
  -webkit-user-select: none;
}

.day-chip.select-chip:active {
  transform: scale(0.92);
}

.day-chip.select-chip.included {
  background: #064e3b;
  border-color: #064e3b;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.22);
}

.day-chip.select-chip.included .day-letter {
  color: #a7f3d0;
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.day-chip.select-chip.included .day-num {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.day-chip.select-chip.included .day-check-badge {
  font-size: 0.58rem;
  font-weight: 900;
  color: #064e3b;
  background: #6ee7b7;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.2px;
  margin-top: 1px;
  display: inline-block;
}

.day-chip.select-chip.included.is-today .day-today-badge {
  font-size: 0.52rem;
  font-weight: 900;
  color: #064e3b;
  background: #6ee7b7;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.3px;
  margin-top: 1px;
  display: inline-block;
}

.day-chip.select-chip.excluded {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  box-shadow: none;
  opacity: 0.72;
}

.day-chip.select-chip.excluded:hover {
  opacity: 0.95;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.day-chip.select-chip.excluded .day-letter {
  color: #94a3b8;
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.day-chip.select-chip.excluded .day-num {
  color: #94a3b8;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.day-chip.select-chip.excluded .day-unplanned-badge {
  font-size: 0.46rem;
  font-weight: 800;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.2px;
  margin-top: 1px;
  display: inline-block;
}

.menu-day-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.menu-day-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.menu-day-name {
  font-size: 1.30rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
  text-transform: capitalize;
}

.menu-day-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.menu-day-date-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.2;
}

.menu-day-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.35;
}

.menu-day-subtitle .sub-line-people {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.menu-day-subtitle .sub-line-week {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  white-space: nowrap;
  font-size: 0.74rem;
  color: #64748b;
}

.btn-exclude-day {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.menu-day-nutrition-capsule {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.capsule-cals {
  font-size: 0.80rem;
  font-weight: 800;
  color: #ea580c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.capsule-divider {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 400;
}

.capsule-prot {
  font-size: 0.80rem;
  font-weight: 800;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-card-full {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease;
}

.menu-card-full:active {
  transform: scale(0.99);
}

.menu-card-img-wrap {
  position: relative;
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-badge-overlay-left {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 8px;
  z-index: 2;
}

.menu-badge-overlay-right {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6b4a, #f97316);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(255, 107, 74, 0.35);
}

.menu-card-content {
  padding: 16px;
}

.menu-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.28;
  margin-bottom: 10px;
  cursor: pointer;
}

.menu-card-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.menu-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-menu-recipe-action {
  flex: 1;
  height: 44px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #059669;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-menu-recipe-action:active {
  background: #dcfce7;
  transform: scale(0.98);
}

.btn-menu-swap-action {
  width: 44px;
  height: 44px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  color: #475569;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-menu-swap-action:active {
  background: #f1f5f9;
  transform: scale(0.95);
}

.btn-menu-remove-action {
  width: 44px;
  height: 44px;
  border: 1.5px solid #fee2e2;
  background: #ffffff;
  border-radius: 14px;
  color: #ef4444;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-menu-remove-action:active {
  background: #fee2e2;
  transform: scale(0.95);
}

/* =========================================================
   LISTA DE LA COMPRA (TAB COMPRA - RESTAURACIÓN EXACTA)
   ========================================================= */
.cart-hero-card {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #ffffff;
  border-radius: 24px;
  padding: 22px 20px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(6, 95, 70, 0.28);
}

.cart-hero-pill {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.4px;
}

.cart-hero-title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 6px;
  color: #ffffff;
}

.cart-hero-sub {
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 18px;
}

.cart-hero-stats {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.cart-stat-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 0;
}

.cart-stat-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap !important;
  word-break: keep-all;
}

@media (max-width: 380px) {
  .cart-hero-stats {
    gap: 8px;
  }
  .cart-stat-num {
    font-size: 1.10rem;
  }
  .cart-stat-label {
    font-size: 0.68rem;
  }
}

.cart-stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 3px;
}

.cart-budget-chip {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 9px 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.cart-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-cart-whatsapp {
  flex: 1;
  height: 46px;
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 0.90rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
  transition: transform 0.15s ease;
}

.btn-cart-whatsapp:active {
  transform: scale(0.97);
}

.btn-cart-copy {
  height: 46px;
  padding: 0 20px;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 0.90rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-cart-copy:active {
  background: #f8fafc;
  transform: scale(0.97);
}

.cart-aisle-group {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.cart-aisle-header {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-aisle-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.cart-aisle-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.cart-item-row {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.cart-item-row.checked {
  background: #f8fafc;
}

.cart-item-square-check {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cart-item-row.checked .cart-item-square-check {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.cart-item-text {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.cart-item-row.checked .cart-item-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.cart-item-brand {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

.cart-item-qty-pill {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.80rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================================
   BUSCADOR Y RECETARIO (TAB RECETAS - RESTAURACIÓN EXACTA)
   ========================================================= */
.recipes-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.recipes-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  color: #94a3b8;
}

#recipes-search-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0 16px 0 42px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease;
}

#recipes-search-input:focus {
  border-color: var(--primary);
}

.recipes-filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.recipes-filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip-btn {
  flex: none;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip-btn:active {
  transform: scale(0.95);
}

.filter-chip-btn.active {
  background: #064e3b;
  border-color: #064e3b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
}

.recipe-card-full {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease;
}

.recipe-card-full:active {
  transform: scale(0.99);
}

.recipe-card-img-wrap {
  position: relative;
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: #f1f5f9;
}

.recipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-badge-overlay-left {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 2;
}

.recipe-badge-overlay-right {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6b4a, #f97316);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(255, 107, 74, 0.35);
}

.recipe-card-content {
  padding: 16px;
}

.recipe-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.28;
  margin-bottom: 10px;
}

.recipe-card-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.meta-pill-chip {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-pill-chip.time {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.meta-pill-chip.cals {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #b45309;
}

.meta-pill-chip.prot {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.btn-recipe-full-action {
  width: 100%;
  height: 42px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #059669;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-recipe-full-action:active {
  background: #dcfce7;
  transform: scale(0.98);
}

/* =========================================================
   MODAL DE RECETA Y MODO COCINA (RESTAURACIÓN EXACTA)
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: flex-end;
}

.modal-overlay.open {
  display: flex;
}

.recipe-modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.25s ease-out;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 24px);
  position: relative;
}

.modal-photo-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f1f5f9;
}

.modal-hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-close-floating-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.70);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease, transform 0.15s ease;
}

.modal-close-floating-btn:active {
  background: rgba(15, 23, 42, 0.90);
  transform: scale(0.92);
}

.modal-body-content {
  padding: 18px 20px 30px 20px;
}

.modal-category-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ea580c;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal-recipe-title {
  font-size: 1.32rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 16px;
}

.modal-portions-banner {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: #475569;
}

.modal-portions-banner .portions-icon {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.modal-portions-banner .portions-banner-text {
  font-weight: 600;
  line-height: 1.35;
  color: #475569;
}

.modal-portions-banner .portions-banner-text strong {
  font-weight: 800;
  color: #0f172a;
}

.modal-macros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.modal-macro-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.modal-macro-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}

.macro-pers-sub {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: none;
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
}

.modal-macro-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.modal-macro-val.cals {
  color: #ea580c; /* Kcal llamativo */
}

.modal-macro-val.prot {
  color: #0284c7; /* Proteínas */
}

.modal-macro-val.carbs {
  color: #d97706; /* Carbos en amarillo */
}

.modal-macro-val.fat {
  color: #16a34a; /* Grasas en verde */
}

.modal-macro-sub {
  font-size: 0.64rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.modal-tip-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.modal-tip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.modal-tip-text {
  flex: 1;
}

.modal-tip-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 3px;
}

.modal-tip-body {
  font-size: 0.82rem;
  color: #047857;
  line-height: 1.4;
}

.modal-timer-box {
  background: #fffaf5;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-timer-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.timer-display-digits {
  font-size: 1.75rem;
  font-weight: 900;
  color: #c2410c;
  line-height: 1.1;
  margin-top: 2px;
}

.modal-timer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-timer-start {
  background: #ea580c;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-timer-start:active {
  transform: scale(0.95);
  background: #c2410c;
}

.btn-timer-reset {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timer-reset:active {
  background: #fff7ed;
  transform: scale(0.92);
}

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

.modal-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-portion-stepper {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portion-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0284c7;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.portion-btn:active {
  background: #e0f2fe;
}

#portion-count-display {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-ingredients-list {
  margin-bottom: 16px;
}

.modal-ing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.modal-ing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.modal-ing-qty {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  min-width: 55px;
  flex-shrink: 0;
}

.modal-ing-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  flex: 1;
}

.modal-ing-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  text-align: right;
}

.modal-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-step-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.modal-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #064e3b;
  color: #ffffff;
  font-size: 0.80rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.modal-step-text {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.5;
}

/* =========================================================
   BARRA DE NAVEGACIÓN INFERIOR (BOTTOM NAV)
   ========================================================= */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 440px;
  height: calc(env(safe-area-inset-bottom, 16px) + 60px);
  padding-bottom: env(safe-area-inset-bottom, 16px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
}

.nav-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.nav-tab-btn .tab-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-tab-btn .tab-label {
  font-size: 0.72rem;
  font-weight: 700;
  transition: color 0.15s ease;
}

.nav-tab-btn.active {
  color: #059669;
}

.nav-tab-btn.active .tab-icon {
  transform: translateY(-2px) scale(1.1);
}

.empty-week-badge-wrap {
  animation: pulseGreenGlow 2.5s infinite alternate ease-in-out;
}

@keyframes pulseGreenGlow {
  0% { transform: scale(1); box-shadow: 0 4px 12px rgba(16,185,129,0.12); }
  100% { transform: scale(1.04); box-shadow: 0 6px 18px rgba(16,185,129,0.22); }
}

.empty-day-card.is-past-day {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.day-chip.is-past {
  opacity: 0.55 !important;
  cursor: pointer;
  background: #f1f5f9;
}

.day-chip.is-past .day-num {
  color: #94a3b8;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 110;
}

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

/* =========================================================
   MOTOR NUTRICIONAL BEDCA & OPEN FOOD FACTS
   ========================================================= */
.nutrition-source-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #166534;
  margin-top: 10px;
  margin-bottom: 14px;
  line-height: 1.35;
}

.nutrition-breakdown-details {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.nutrition-breakdown-details summary {
  font-weight: 800;
  color: #064e3b;
  font-size: 0.86rem;
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nutrition-breakdown-details summary::-webkit-details-marker {
  display: none;
}

.nutrition-breakdown-details summary::after {
  content: "▾";
  font-size: 1.15rem;
  color: #059669;
  transition: transform 0.2s ease;
}

.nutrition-breakdown-details[open] summary::after {
  transform: rotate(180deg);
}

.nutrition-breakdown-wrapper {
  position: relative;
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
}

.nutrition-breakdown-wrapper.is-pro-locked {
  cursor: pointer;
}

.nutrition-breakdown-wrapper.is-pro-locked .nutrition-breakdown-table {
  filter: blur(5px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.breakdown-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  z-index: 5;
  cursor: pointer;
  padding: 12px;
  transition: transform 0.15s ease;
}

.breakdown-lock-overlay:active {
  transform: scale(0.98);
}

.nutrition-breakdown-table {
  width: 100%;
  background: #ffffff;
}

.breakdown-table-header {
  display: grid;
  grid-template-columns: minmax(75px, 1fr) 46px 40px 40px 40px;
  gap: 4px;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  font-size: 0.70rem;
  font-weight: 800;
}

.breakdown-table-body {
  display: flex;
  flex-direction: column;
}

.breakdown-table-row {
  display: grid;
  grid-template-columns: minmax(75px, 1fr) 46px 40px 40px 40px;
  gap: 4px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.75rem;
  transition: background 0.15s ease;
}

.breakdown-table-row:last-child {
  border-bottom: none;
}

.breakdown-table-row:nth-child(even) {
  background: #fafbfc;
}

.breakdown-table-header .b-col-name {
  text-align: left;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.breakdown-table-row .b-col-name {
  text-align: left;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.b-col-val {
  text-align: right;
  white-space: nowrap;
}

.b-col-val.cals {
  color: #ea580c; /* Mismo color llamativo de Calorías */
  font-weight: 800;
}

.b-col-val.prot {
  color: #0284c7; /* Mismo color azul de Proteínas */
  font-weight: 700;
}

.b-col-val.carbs {
  color: #d97706; /* Mismo color amarillo de Carbos */
  font-weight: 700;
}

.b-col-val.fat {
  color: #16a34a; /* Mismo color verde de Grasas */
  font-weight: 700;
}

/* Botón enlace a tienda online en Carrito */
.btn-cart-store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-cart-store:active {
  background: #f8fafc;
  transform: scale(0.98);
}

/* Selector rápido de supermercado en Mi Plan */
.profile-super-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.profile-super-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  text-align: center;
}

.profile-super-chip:active {
  transform: scale(0.96);
}

.profile-super-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: #065f46;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.profile-super-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-bottom: 4px;
}

/* Selector rápido de supermercado en pestaña Compra */
.cart-super-switcher-row {
  margin: 12px 0 16px 0;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
}

.cart-super-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cart-super-switcher-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-super-switcher-sub {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 700;
}

.cart-super-switcher-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.cart-super-switcher-chips::-webkit-scrollbar {
  display: none;
}

.cart-super-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.80rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-super-chip:active {
  transform: scale(0.95);
}

.cart-super-chip.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.cart-super-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* =========================================================
   PLANIFICACIÓN INTELIGENTE DE FECHAS Y DÍAS (PASO 9 & MENÚ)
   ========================================================= */
.planning-option-card {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.planning-option-card:hover {
  border-color: #cbd5e1;
}

.planning-option-card.selected {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18);
}


/* Indicador de día no planificado en el selector del menú */
.day-chip.unplanned {
  opacity: 0.72;
  border-style: dashed;
  background: #f8fafc;
}

.day-chip.unplanned:hover {
  opacity: 0.95;
}

.day-chip.unplanned.active {
  opacity: 1;
  border-style: solid;
  background: #1e293b;
  border-color: #1e293b;
}

.day-chip.unplanned.active .day-letter {
  color: #94a3b8;
}

.day-unplanned-badge {
  font-size: 0.48rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1;
  letter-spacing: 0.2px;
  background: #e2e8f0;
  padding: 1px 3px;
  border-radius: 4px;
  margin-top: 1px;
}

/* Banner de día no incluido en la compra dentro del Menú */
.unplanned-day-banner {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unplanned-day-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unplanned-day-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.unplanned-day-text strong {
  display: block;
  font-size: 0.82rem;
  color: #92400e;
  font-weight: 800;
}

.unplanned-day-text p {
  font-size: 0.73rem;
  color: #b45309;
  line-height: 1.3;
  margin-top: 2px;
}

.btn-toggle-day-planning {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-toggle-day-planning:hover {
  background: #059669;
}

.btn-toggle-day-planning:active {
  transform: scale(0.95);
}

/* Badges en la cabecera del día */
.badge-planned-day {
  font-size: 0.68rem;
  font-weight: 800;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

.badge-unplanned-day {
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

/* Selector interactivo de días en la pestaña de compra */
.cart-day-toggle-chip {
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.cart-day-toggle-chip:active {
  transform: scale(0.92);
}

.cart-day-toggle-chip.active {
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* =========================================================
   MÓDULO DE AUTENTICACIÓN (GOOGLE & EMAIL) & CUMPLIMIENTO LEGAL
   ========================================================= */
.auth-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.auth-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 8px;
  align-self: center;
}

.btn-apple-auth {
  width: 100%;
  height: 50px;
  background: #000000;
  border: 1px solid #000000;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.btn-apple-auth:hover {
  background: #1a1a1a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.btn-apple-auth:active {
  transform: scale(0.98);
  background: #2a2a2a;
}

.apple-logo-icon,
.apple-logo-img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  fill: #ffffff;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.btn-google-auth {
  width: 100%;
  height: 50px;
  background: #ffffff;
  border: 1.5px solid #dadce0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: #3c4043;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.btn-google-auth:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.btn-google-auth:active {
  transform: scale(0.98);
}

.google-g-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 10px;
}

.auth-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  text-align: left;
}

.auth-input-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.auth-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-auth-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  margin-top: 6px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-auth-submit:active {
  transform: scale(0.98);
}

.auth-legal-disclaimer {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.45;
  text-align: center;
  margin-top: 14px;
  padding: 0 8px;
}

.auth-legal-link {
  color: #059669;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.auth-legal-link:hover {
  color: #047857;
}

.btn-guest-bypass {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 10px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.btn-guest-bypass:hover {
  color: #0f172a;
}

/* =========================================================
   PERFIL DE USUARIO EN PESTAÑA 'MI PLAN'
   ========================================================= */
.user-profile-header-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.user-profile-avatar-box {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.user-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.user-profile-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #064e3b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-email {
  font-size: 0.8rem;
  color: #047857;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

.btn-signout-small {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-signout-small:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Sección Legal & Cumplimiento en Perfil */
.profile-action-list-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 18px;
}

.profile-action-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.profile-action-row:last-child {
  border-bottom: none;
}

.profile-action-row:hover {
  background: #f8fafc;
}

.profile-action-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.profile-action-row-left .action-icon {
  font-size: 1.15rem;
}

.profile-action-row-arrow {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Zona de peligro: Eliminar cuenta (Requisito Apple Store) */
.danger-zone-card {
  background: #fff5f5;
  border: 1.5px solid #fecaca;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  text-align: left;
}

.danger-zone-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.danger-zone-desc {
  font-size: 0.76rem;
  color: #7f1d1d;
  line-height: 1.4;
  margin-bottom: 12px;
}

.btn-delete-account-red {
  width: 100%;
  height: 42px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-delete-account-red:active {
  background: #dc2626;
  transform: scale(0.98);
}

/* =========================================================
   MODAL LEGAL & POLÍTICAS (RGPD / APPLE / GOOGLE PLAY)
   ========================================================= */
.legal-modal-sheet {
  width: 100%;
  max-width: 480px;
  height: 85vh;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 16px);
}

.legal-modal-header {
  flex-shrink: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.legal-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.legal-modal-nav-tabs {
  flex-shrink: 0;
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  margin: 12px 16px 8px;
  padding: 4px;
  gap: 6px;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.legal-nav-tab {
  flex: 1;
  height: 36px;
  min-height: 36px;
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.legal-nav-tab.active {
  background: #ffffff;
  color: #064e3b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.legal-modal-body-scroll {
  flex: 1 1 0;
  min-height: 0;
  padding: 16px 20px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #334155;
  text-align: left;
}

.legal-modal-body-scroll h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 14px;
  margin-bottom: 6px;
}

.legal-modal-body-scroll p {
  margin-bottom: 10px;
}

.legal-modal-body-scroll ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-modal-body-scroll li {
  margin-bottom: 4px;
}

.legal-modal-footer {
  flex-shrink: 0;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

/* =========================================================
   SABOR FIT PRO - MONETIZACIÓN, DIFUMINADOS Y CANDADOS
   ========================================================= */

/* Banner de estado de la prueba / suscripción en Menú */
.trial-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 0.80rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.trial-status-banner:active {
  transform: scale(0.985);
}
.trial-status-banner.is-trial {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.trial-status-banner.is-expired {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  color: #92400e;
}
.trial-status-banner.is-pro {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  color: #14532d;
}
.trial-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.trial-banner-left strong {
  font-weight: 800;
}
.trial-banner-cta {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}
.is-trial .trial-banner-cta {
  color: #059669;
}
.is-expired .trial-banner-cta {
  background: #d97706;
  color: #ffffff;
}
.is-pro .trial-banner-cta {
  color: #059669;
}

/* Difuminado y Candado en Cabecera del Menú Diario */
.pro-locked-capsule {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 175px;
  transition: transform 0.15s ease;
}
.pro-locked-capsule:active {
  transform: scale(0.97);
}
.capsule-blurred-text {
  filter: blur(4.5px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.capsule-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(5, 150, 105, 0.95));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  gap: 5px;
  padding: 0 12px;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
  letter-spacing: -0.01em;
}

/* Difuminado y Candado en el Grid de Macros del Modal de Receta */
.modal-macros-wrapper {
  position: relative;
  width: 100%;
}
.modal-macros-wrapper.is-pro-locked {
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
}
.modal-macros-wrapper.is-pro-locked .modal-macros-grid {
  filter: blur(5px);
  opacity: 0.30;
  pointer-events: none;
  user-select: none;
}
.modal-macros-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  border-radius: 16px;
  z-index: 5;
  transition: transform 0.15s ease;
}
.modal-macros-lock-overlay:active {
  transform: scale(0.98);
}
.lock-overlay-badge {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.80rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.35);
  text-align: center;
}
.lock-overlay-badge strong {
  font-weight: 800;
  color: #a7f3d0;
}

/* Botón de Swap con Difuminado y Emoji de Candado */
.btn-swap-recipe.is-locked-blur {
  position: relative !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  overflow: hidden !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}
.btn-swap-recipe.is-locked-blur .swap-icon-blurred {
  filter: blur(2.5px);
  opacity: 0.30;
  user-select: none;
  pointer-events: none;
  font-size: 0.95rem;
}
.btn-swap-recipe.is-locked-blur .swap-padlock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  font-size: 0.92rem;
  line-height: 1;
}

/* Modal de Información del Plan Gratuito (Bienvenida) */
.welcome-plan-modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 16px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}
.welcome-plan-modal-header {
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}
.welcome-plan-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.welcome-plan-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #064e3b;
  margin: 0;
}
.welcome-plan-subtitle {
  font-size: 0.80rem;
  color: #64748b;
  margin-top: 2px;
}
.welcome-feature-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.welcome-feature-title {
  font-size: 0.90rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.welcome-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.45;
}
.welcome-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.welcome-pro-card {
  background: #fafaf9;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.welcome-btn-cta {
  width: 100%;
  background: #059669;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 0.90rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: transform 0.15s ease;
}
.welcome-btn-cta:active {
  transform: scale(0.98);
}
.welcome-btn-close {
  width: 100%;
  background: transparent;
  color: #64748b;
  border: none;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  text-align: center;
}

/* Modal de Cambiar Plato (Rehacer o Elegir de Recetas) */
.swap-modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 16px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}
.swap-modal-header {
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}
.swap-modal-title {
  font-size: 1.10rem;
  font-weight: 800;
  color: #0f172a;
}
.swap-modal-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}
.swap-modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #475569;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.swap-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.swap-allowance-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #065f46;
  font-weight: 700;
}
.swap-action-card-random {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.swap-action-card-random:active {
  transform: scale(0.98);
}
.swap-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.swap-card-icon {
  font-size: 1.8rem;
}
.swap-card-title {
  font-size: 0.96rem;
  font-weight: 800;
}
.swap-card-desc {
  font-size: 0.74rem;
  color: #d1fae5;
  margin-top: 2px;
}
.swap-card-btn-arrow {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.swap-pick-section-title {
  font-size: 0.90rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.swap-tabs-row {
  display: flex;
  gap: 8px;
}
.btn-swap-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-swap-tab:active {
  transform: scale(0.98);
}
.btn-swap-tab.active {
  background: #064e3b;
  color: #ffffff;
  border-color: #064e3b;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.2);
}
.swap-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s;
}
.swap-search-input:focus {
  border-color: #059669;
}
.swap-recipes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}
.swap-recipe-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.swap-recipe-item:active {
  transform: scale(0.985);
  border-color: #059669;
  background: #f0fdf4;
}
.swap-recipe-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.swap-recipe-meta {
  flex: 1;
  min-width: 0;
}
.swap-recipe-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swap-recipe-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}
.swap-recipe-pick-btn {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Modal de Suscripción Sabor Fit PRO */
.premium-modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 16px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}
.premium-modal-header {
  position: relative;
  background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #10b981 100%);
  color: #ffffff;
  padding: 24px 20px 20px 20px;
  text-align: center;
}
.premium-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.premium-header-icon {
  font-size: 2.4rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}
.premium-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.premium-modal-title span {
  color: #a7f3d0;
}
.premium-modal-subtitle {
  font-size: 0.85rem;
  color: #d1fae5;
  font-weight: 500;
}

.premium-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Lista de Beneficios PRO */
.premium-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
}
.premium-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.4;
}
.premium-benefit-item .benefit-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.premium-benefit-item strong {
  color: #0f172a;
}

/* Selector de Planes de Precio */
.premium-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.premium-plan-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.premium-plan-card.selected {
  border-color: #059669;
  background: #f0fdf4;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15);
}
.premium-plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}
.plan-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #059669;
  margin: 4px 0 2px 0;
}
.plan-period {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.plan-subdetail {
  font-size: 0.68rem;
  color: #059669;
  font-weight: 700;
  margin-top: 4px;
}

/* Botón CTA Principal */
.btn-premium-cta {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: inherit;
  margin-top: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-premium-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}
.btn-premium-cta:active {
  transform: scale(0.98);
}
.premium-guarantee-note {
  text-align: center;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 6px;
}

/* Tarjeta de Suscripción en Pestaña "Mi Plan" */
.profile-subscription-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid #e2e8f0;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.sub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sub-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.sub-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}
.sub-badge.trial {
  background: #d1fae5;
  color: #065f46;
}
.sub-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}
.sub-badge.pro {
  background: linear-gradient(135deg, #064e3b, #059669);
  color: #ffffff;
}
.sub-card-progress {
  margin-bottom: 12px;
}
.sub-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.sub-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.sub-card-actions {
  display: flex;
  gap: 8px;
}



/* =========================================================
   CANVA-STYLE CLEAN SUBSCRIPTION SHEET (100% MINIMALISTA)
   ========================================================= */
.canva-modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 28px 28px 0 0;
  padding: 16px 22px calc(env(safe-area-inset-bottom, 20px) + 20px) 22px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: slideUp 0.28s ease-out;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .canva-modal-sheet {
    border-radius: 26px;
    margin: auto;
  }
}

.canva-top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.btn-canva-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #1f2937;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canva-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.canva-perks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.canva-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.90rem;
  color: #1f2937;
  line-height: 1.35;
}

.canva-check {
  color: #16a34a;
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.canva-plans-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.canva-plan-card {
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.canva-plan-card.selected {
  border-color: #7c3aed;
  background: #fdfcff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.12);
}

.canva-radio-outer {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.canva-plan-card.selected .canva-radio-outer {
  border-color: #7c3aed;
}

.canva-radio-inner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7c3aed;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.canva-plan-card.selected .canva-radio-inner {
  opacity: 1;
  transform: scale(1);
}

.canva-plan-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.canva-plan-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
}

.canva-plan-pricing {
  font-size: 0.90rem;
  color: #374151;
  font-weight: 500;
}

.canva-plan-subdetail {
  font-size: 0.82rem;
  color: #6b7280;
}

.canva-offer-tag {
  position: absolute;
  top: -10px;
  left: 18px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.canva-summary-box {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.96rem;
  color: #111827;
  font-weight: 600;
}

.canva-summary-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
}

.canva-btn-submit {
  width: 100%;
  height: 52px;
  background: #7c3aed;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.canva-btn-submit:active {
  transform: scale(0.98);
  background: #6d28d9;
}

.canva-legal-footer {
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.45;
  margin-top: 14px;
  margin-bottom: 0;
}

.canva-legal-footer a {
  color: #374151;
  text-decoration: underline;
}

/* =========================================================
   PASARELA DE PAGO: APPLE PAY, GOOGLE PAY Y WALLET 1-CLIC
   ========================================================= */

.wallet-payment-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.btn-wallet-pay {
  background: #000000;
  color: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  font-family: inherit;
}

.btn-wallet-pay:active {
  transform: scale(0.98);
  background: #1e293b;
}

.btn-wallet-pay .wallet-btn-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
}

.btn-card-pay {
  background: #f8fafc;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  width: 100%;
  font-family: inherit;
}

.btn-card-pay:active {
  background: #e2e8f0;
  transform: scale(0.98);
}

.payment-trust-badges {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trust-shield {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.payment-methods-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pay-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
}



/* Modal de Enhorabuena / Éxito de Pago PRO */
.payment-success-modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 26px 26px 0 0;
  padding: 24px 20px calc(env(safe-area-inset-bottom, 20px) + 24px) 20px;
  text-align: center;
  animation: slideUp 0.28s ease-out;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.30);
}

.success-check-bubble {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border: 3px solid #10b981;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.success-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #064e3b;
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.success-btn-done {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
}
