/* ============================================
   BAKEBALANCE - DISEÑO VIBRANTE v3.0
   Compatible con estructura HTML existente

   IMPORTANTE: Este CSS sobrescribe Bootstrap
   usando las MISMAS clases que tus HTML
   ============================================ */

/* ==========================================
   VARIABLES CSS - MODERN SAAS BAKERY
   ========================================== */

:root {
  /* Paleta Principal (Elegante y con alto contraste) */
  --primary-vibrant: #e84a5f; /* Frambuesa oscuro/atrayente, perfecto para leer en blanco */
  --primary-deep: #b83b4c;
  --primary-light: #ffecef;
  --primary-selected: #0553fc;
  --primary-baker: #ff02c8e7;

  /* Colores Accent */
  --accent-energy: #f2a365; /* Naranja horneado */
  --accent-success: #2a9d8f; /* Verde esmeralda (más profesional) */
  --accent-info: #4ecdc4;
  --accent-warning: #ff9a3c;
  --accent-error: #ff4d4d;

  /* Fondos */
  --bg-primary: #f0f2f5; /* Gris muy claro (hace que las tarjetas blancas resalten) */
  --bg-card: #ffffff;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #fff0f2;

  /* Texto (Gris grafito en lugar de negro puro) */
  --text-primary: #2b2d42;
  --text-secondary: #6c757d;
  --text-muted: #8a92a0;

  /* Sombras y Bordes */
  --shadow-sm: 0 2px 8px rgba(30, 45, 64, 0.08);
  --shadow-md: 0 6px 24px rgba(30, 45, 64, 0.12);
  --shadow-lg: 0 8px 32px rgba(30, 45, 64, 0.16);
  --shadow-glow: 0 0 20px rgba(232, 68, 90, 0.3);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Transiciones */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Bordes para inputs */
  --border-color: #c5c5c5;
}

/* ==========================================
   DISEÑO VIBRANTE: NAVBAR Y ANIMACIONES
   ========================================== */

body {
  padding-bottom: 90px !important; /* Espacio vital para el menú inferior */
  background-color: var(--bg-primary, #fafbff) !important;
}

/* Navbar Superior Vibrante */
.navbar {
  background: linear-gradient(135deg, #ffe5f0 0%, #fff9e5 100%) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  position: relative;
  border: none !important;
}

/* Borde inferior tricolor del Navbar */
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b9d 0%, #ffd93d 50%, #4ecdc4 100%);
  opacity: 0.8;
}

.navbar-brand {
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}

/* Logo con efecto Glow */
.navbar-brand img,
.logo-img {
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
  animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
  }
}

/* ==========================================
   BOTONES - Sobrescribir Bootstrap
   ========================================== */

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-vibrant),
    var(--primary-deep)
  ) !important;
  border: none !important;
  color: white !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 20px !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3) !important;
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-deep),
    var(--primary-vibrant)
  ) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-glow) !important;
}

.btn-primary:active {
  transform: scale(0.98) !important;
}

.btn-outline-primary {
  border: 2px solid var(--primary-vibrant) !important;
  color: var(--primary-vibrant) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  background: transparent !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
}

.btn-outline-primary:hover {
  background: var(--primary-vibrant) !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

.btn-outline-secondary {
  border: 2px solid var(--text-muted) !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
}

.btn-outline-secondary:hover {
  background: var(--text-secondary) !important;
  color: white !important;
  border-color: var(--text-secondary) !important;
}

.btn-outline-danger {
  border: 2px solid var(--accent-error) !important;
  color: var(--accent-error) !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
}

.btn-outline-danger:hover {
  background: var(--accent-error) !important;
  color: white !important;
}

/* ==========================================
   BOTTOM NAVIGATION (MENÚ INFERIOR)
   ========================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, #ffffff 0%, #ffffff 95%, #ffe5f0 100%);
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.12),
    0 -2px 8px rgba(255, 107, 157, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px 15px 8px; /* Ajuste para móviles */
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #9095a6;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px;
  border-radius: 12px;
  transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  flex: 1;
  text-decoration: none;
}

.nav-item i {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* Botón COTIZAR - Central y Destacado */
.nav-item.nav-cotizar {
  flex: 1.3;
  color: #ff4fbb;
}
.nav-item.nav-cotizar i {
  font-size: 1.8rem;
}

/* Estado Activo de los botones */
.nav-item.active {
  color: var(--primary-baker) !important;
  background: var(--primary-light) !important; /* Un fondo rosa muy suave */
  transform: translateY(-2px);
  box-shadow: none !important; /* Quitamos el brillo exagerado */
}

/* El botón cotizar destacado */
.nav-item.nav-cotizar {
  color: var(--primary-selected);
}
.nav-item.nav-cotizar.active {
  background: var(--primary-vibrant) !important;
  color: #ffffff !important; /* Aquí el contraste sí funciona */
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.4);
  }
  50% {
    box-shadow: 0 6px 24px rgba(255, 107, 157, 0.6);
  }
}

/* ==========================================
   CONTAINERS Y CARDS
   ========================================== */

.main-content {
  padding: 20px !important;
  overflow-x: hidden;
}

.page-header {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.btn-header {
  background: var(--primary-vibrant);
  color: #fff;
  border-radius: 50px;
  padding: 8px 20px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 10px rgba(232, 74, 95, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header:hover {
  background: var(--primary-deep);
  transform: translateY(-2px);
  color: #fff;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-vibrant),
    var(--accent-energy),
    var(--accent-info)
  );
}

.table-container {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  border: 2px solid transparent !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
}

.table-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--primary-light) !important;
}

.card {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  border: 2px solid transparent !important;
  transition: all var(--duration-normal) var(--ease-smooth) !important;
  overflow: hidden !important;
  position: relative !important;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-vibrant),
    var(--accent-energy)
  );
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--primary-vibrant) !important;
}

.card:hover::before {
  opacity: 1;
}

/* ==========================================
   TABLAS
   ========================================== */

.table {
  color: var(--text-primary) !important;
}

.table thead th {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-end)
  ) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--primary-vibrant) !important;
  padding: 16px !important;
}

.table tbody tr {
  transition: all var(--duration-fast) var(--ease-smooth) !important;
}

.table tbody tr:hover {
  background: var(--bg-gradient-start) !important;
  transform: scale(1.01);
}

.table td {
  vertical-align: middle !important;
  padding: 14px !important;
}

/* ==========================================
   CORRECCIÓN DE INPUTS Y FORMULARIOS (Punto 4)
   ========================================== */
.form-control,
.form-select {
  background-color: #f8f9fa !important; /* Fondo ligerísimamente gris para el input */
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}
.form-control:focus,
.form-select:focus {
  background-color: #ffffff !important;
  border-color: var(--primary-vibrant) !important;
  box-shadow: 0 0 0 3px var(--primary-light) !important;
}

/* ==========================================
   MODALS
   ========================================== */

.modal-content {
  border-radius: var(--radius-lg) !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.modal-header {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-end)
  ) !important;
  border-bottom: 2px solid var(--primary-vibrant) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 20px !important;
}

.modal-title {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
}

.modal-body {
  padding: 24px !important;
}

.modal-footer {
  border-top: 1px solid #e8eaed !important;
  padding: 16px 24px !important;
}

/* ==========================================
   ALERTS Y TOASTS
   ========================================== */

.alert {
  border-radius: var(--radius-md) !important;
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.alert-success {
  background: linear-gradient(135deg, #e8f8ec, #d1f2e0) !important;
  color: #0d6832 !important;
}

.alert-danger {
  background: linear-gradient(135deg, #fff0f0, #ffe0e0) !important;
  color: #c41e3a !important;
}

.alert-warning {
  background: linear-gradient(135deg, #fff8e6, #ffedd6) !important;
  color: #9a5a00 !important;
}

.toast {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ==========================================
   BADGES
   ========================================== */

.badge {
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-weight: 600 !important;
}

.badge.bg-success {
  background: var(--accent-success) !important;
}

.badge.bg-primary {
  background: var(--primary-vibrant) !important;
}

.badge.bg-warning {
  background: var(--accent-warning) !important;
}

/* ==========================================
   UTILIDADES
   ========================================== */

.text-primary {
  color: var(--primary-vibrant) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.bg-light {
  background: var(--bg-primary) !important;
}

.bg-white {
  background: var(--bg-card) !important;
}

/* ==========================================
   ANIMACIONES
   ========================================== */

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

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

/* Aplicar animaciones a elementos que aparecen */
.card,
.table-container,
.page-header {
  animation: fadeIn 0.4s var(--ease-smooth);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .navbar {
    padding: 12px !important;
  }

  .btn {
    font-size: 0.9rem !important;
    padding: 8px 16px !important;
  }

  .table-container {
    padding: 12px !important;
  }

  .modal-content {
    margin: 10px !important;
  }
}

/* ==========================================
   SCROLLBAR PERSONALIZADO (Webkit)
   ========================================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-vibrant);
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  body {
    background: white !important;
  }

  .navbar,
  .btn,
  .modal {
    display: none !important;
  }

  .table-container {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* ==========================================
   MEJORAS UX: ÁREAS TÁCTILES Y TARJETAS
   ========================================== */
/* Agrandar botones dinámicos en las tablas para móvil */
.btn-sm,
.btn-group-sm > .btn {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  min-height: 44px !important; /* Estándar de accesibilidad táctil de Apple/Google */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mejora visual de las tarjetas (cards) generadas dinámicamente */
.insumo-card,
.rec-card {
  background: var(--bg-card) !important;
  border: 1px solid #eaedf2 !important;
  border-radius: var(--radius-md) !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  box-shadow: var(--shadow-sm) !important;
}

.insumo-name,
.rec-name {
  color: var(--text-primary) !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  font-family: "Nunito", sans-serif !important;
}

/* ==========================================
   FIX ESTRICTO: DOBLE LISTADO (TABLAS VS CARDS)
   ========================================== */
@media (max-width: 768px) {
  /* En celulares: Ocultar tabla de insumos */
  .table-responsive {
    display: none !important;
  }

  /* Excepción: tabla del historial siempre visible */
  #historial-contenido .table-responsive {
    display: block !important;
  }

  /* Mostrar cards de insumos */
  #insumosCards {
    display: block !important;
  }

  /* NO ocultar recetasContainer - contiene tabla Y cards móviles */
}

@media (min-width: 769px) {
  /* En PC: Mostrar tabla de insumos */
  .table-responsive {
    display: block !important;
  }

  /* Ocultar cards de insumos */
  #insumosCards {
    display: none !important;
  }

  /* NO tocar recetasContainer - lo maneja el CSS de Opción 3 */
}

/* ==========================================
   VISTA DE LOGIN (Aislado)
   ========================================== */
body.login-page {
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--bg-primary) 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 450px;
}

.login-card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: none;
  padding: 2rem;
  width: 100%;
}

/* Logo del Login */
.login-card .logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .logo img {
  max-width: 180px;
  height: auto;
  margin-bottom: 1rem;
}

.login-card .logo p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Divisor con texto */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #dee2e6;
}

.divider span {
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Selector de idioma */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.lang-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.lang-flag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-flag.active {
  background: var(--primary-vibrant);
  color: white;
}

/* ==========================================
   OPCIÓN 3: TABLA ULTRA COMPACTA
   Tabla en Desktop · Cards horizontales en Móvil
   ========================================== */

/* ==========================================
   TABLA DESKTOP
   ========================================== */

.recetas-table-wrapper {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: block;
}

.recetas-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.recetas-table thead {
  background: linear-gradient(135deg, #ffe5f0, #fff9e5);
}

.recetas-table th {
  padding: 16px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #2d3142;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #ff6b9d;
  white-space: nowrap;
}

.recetas-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f2f5;
  color: #5a5f73;
  font-size: 0.9rem;
  vertical-align: middle;
}

.recetas-table tbody tr {
  transition: all 0.2s ease;
}

.recetas-table tbody tr:hover {
  background: #fafbff;
  transform: scale(1.01);
}

.recetas-table tbody tr:last-child td {
  border-bottom: none;
}

.receta-nombre-cell {
  font-weight: 700;
  color: #2d3142;
}

.receta-nombre-cell i {
  color: #ff6b9d;
  margin-right: 8px;
  font-size: 1.1rem;
}

.cost-highlight {
  font-weight: 700;
  color: #ff6b9d;
}

.serving-highlight {
  font-weight: 700;
  color: #6bcf7f;
}

.actions-cell {
  white-space: nowrap;
}

.btn-table {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid;
  transition: all 0.2s ease;
  margin: 0 2px;
  background: transparent;
  cursor: pointer;
}

.btn-table.edit {
  border-color: #ff6b9d;
  color: #ff6b9d;
}

.btn-table.edit:hover {
  background: #ff6b9d;
  color: white;
  transform: translateY(-1px);
}

.btn-table.delete {
  border-color: #ff5757;
  color: #ff5757;
}

.btn-table.delete:hover {
  background: #ff5757;
  color: white;
  transform: translateY(-1px);
}

/* ==========================================
   CARDS MÓVILES HORIZONTALES
   ========================================== */

.recetas-mobile-list {
  display: none;
  padding: 0 8px; /* Márgenes laterales pequeños para aprovechar el ancho */
}

.receta-mobile-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #ff6b9d;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.receta-mobile-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  transform: translateX(4px);
}

.receta-mobile-info {
  flex: 1;
  min-width: 0;
}

.receta-mobile-name {
  font-weight: 700;
  color: #2d3142;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.receta-mobile-name i {
  color: #ff6b9d;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.receta-mobile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.85rem;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #f5f7fb;
  border-radius: 7px;
  color: #5a5f73;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-badge i {
  font-size: 1rem;
}

.stat-badge.cost {
  background: #ffe5f0;
  color: #ff6b9d;
  font-weight: 700;
}

.stat-badge.serving {
  background: #e8f8ec;
  color: #6bcf7f;
  font-weight: 700;
}

.receta-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.btn-mobile-compact {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: white;
  cursor: pointer;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-mobile-compact i {
  font-size: 1.1rem;
}

.btn-mobile-compact.edit {
  border-color: #ff6b9d;
  color: #ff6b9d;
}

.btn-mobile-compact.edit:hover {
  background: #ff6b9d;
  color: white;
}

.btn-mobile-compact.delete {
  border-color: #ff5757;
  color: #ff5757;
}

.btn-mobile-compact.delete:hover {
  background: #ff5757;
  color: white;
}

.btn-mobile-compact.edit:hover {
  background: #ff6b9d;
  color: white;
}

.btn-mobile-compact.delete {
  border-color: #ff5757;
  color: #ff5757;
}

.btn-mobile-compact.delete:hover {
  background: #ff5757;
  color: white;
}

/* ==========================================
   RESPONSIVE - MEDIA QUERIES
   ========================================== */

/* Tablet y Desktop: Mostrar tabla */
@media (min-width: 769px) {
  .recetas-table-wrapper {
    display: block;
  }

  .recetas-mobile-list {
    display: none;
  }
}

/* Móvil: Ocultar tabla, mostrar cards */
@media (max-width: 768px) {
  .recetas-table-wrapper {
    display: none;
  }

  .recetas-mobile-list {
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════
   SELECTOR DE IDIOMA CON BANDERAS
   ═══════════════════════════════════════════════════════ */

.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.lang-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 2px solid transparent;
  overflow: hidden;
  position: relative;
}

.lang-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lang-flag:hover {
  transform: scale(1.15);
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lang-flag.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: scale(1.1);
}

.lang-flag.active::after {
  content: "✓";
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 2px solid white;
}

/* Responsive - Móvil */
@media (max-width: 768px) {
  .language-switcher {
    top: 15px;
    right: 15px;
    padding: 6px;
    gap: 8px;
  }

  .lang-flag {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================
   FIN DE ESTILOS OPCIÓN 3
   ========================================== */

/* ==========================================
   MEJORAS UI - TESTING END-TO-END
   ========================================== */

/* Checkbox términos más visible cuando vacío */
.form-check-input:not(:checked) {
  border: 2px solid #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15) !important;
}

.form-check-input:checked {
  background-color: #198754 !important;
  border-color: #198754 !important;
}

/* Advertencia conversión más visible (naranja más oscuro) */
.text-warning {
  color: #d97706 !important;
  font-weight: 500 !important;
}

/* Placeholders más claros y distintos del texto escrito */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #9ca3af !important;
  opacity: 0.6 !important;
  font-style: italic !important;
}

input:focus::placeholder,
textarea:focus::placeholder,
select:focus::placeholder {
  opacity: 0.4 !important;
}

/* ==========================================
   FIN MEJORAS UI
   ========================================== */

/* ==========================================
   SISTEMA DE NOTIFICACIONES IN-APP
   ========================================== */

/* Item individual en el panel de notificaciones */
.notificacion-item {
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-smooth);
}

.notificacion-item:hover {
  background: var(--primary-light) !important;
}

.notificacion-item:last-child {
  border-bottom: none !important;
}

/* Botón campana - color frambuesa, tamaño visible */
.notif-bell-btn {
  color: var(--primary-vibrant) !important;
  font-size: 26px !important;
  line-height: 1 !important;
  transition:
    color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth);
}

.notif-bell-btn:hover {
  color: var(--primary-deep) !important;
  transform: scale(1.1);
}

/* Badge numérico de la campana */
#badgeNotificaciones {
  font-size: 11px !important;
  font-weight: 700 !important;
  min-width: 24px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 0 5px !important;
  border: 2px solid white !important;
  left: 70% !important;
  top: 6px !important;
  /*top: 2px !important;
  right: 2px !important;
  transform: none !important;*/
}

/* Panel dropdown - centrado en pantalla móvil */
.notif-dropdown-panel {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(340px, calc(100vw - 16px)) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: var(--shadow-lg) !important;
  top: auto !important;
  margin-top: 4px !important;
}

/* ==========================================
   FIN SISTEMA DE NOTIFICACIONES
   ========================================== */

/* ==========================================
   FIX: CENTRADO DE MODALES EN MÓVIL
   ========================================== */
body.modal-open {
  padding-right: 0 !important;
}
.modal {
  padding-right: 0 !important;
}
.modal-dialog {
  margin-right: auto !important;
  margin-left: auto !important;
}

/* ==========================================
   FIN DEL ARCHIVO
   ==========================================

console.log('✅ BakeBalance Diseño Vibrante v3.0 cargado'); */
