/* css/style.css - Diseño Visual Premium (Responsive, Dark Mode, Print Mode) */

/* Fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ==========================================
   SISTEMA DE DISEÑO (VARIABLES CSS)
   ========================================== */
:root {
  /* Fuentes */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Colores - Modo Claro */
  --bg-primary: #FAF8F5;       /* Crema muy suave */
  --bg-surface: #FFFFFF;       /* Blanco puro */
  --bg-input: #F3EFE9;         /* Crema intermedio */
  --text-primary: #121413;     /* Gris casi negro */
  --text-secondary: #5C625E;   /* Gris medio */
  --border-color: rgba(224, 83, 60, 0.12);
  
  /* Acentos Gourmet */
  --color-primary: #E0533C;    /* Naranja Terracota */
  --color-primary-hover: #C5422D;
  --color-primary-rgb: 224, 83, 60;
  --color-secondary: #3D6B58;  /* Verde Salvia */
  --color-gold: #F2A900;       /* Amarillo dorado */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(224, 83, 60, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  /* Colores - Modo Oscuro */
  --bg-primary: #121413;       /* Carbono profundo */
  --bg-surface: #1C1E1D;       /* Gris carbón */
  --bg-input: #262927;         /* Gris medio */
  --text-primary: #F2EFE9;     /* Crema claro */
  --text-secondary: #A3A8A5;   /* Gris claro */
  --border-color: rgba(224, 83, 60, 0.2);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   ESTILOS GENERALES Y RESET
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Quitar destello azul móvil */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-primary-hover);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Ocultar elementos auxiliares */
.hidden {
  display: none !important;
}

/* ==========================================
   ESTILOS DE CABECERA Y NAVEGACIÓN
   ========================================== */
.main-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.logo-img {
  width: 36px;
  height: 36px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Barra de navegación */
.navigation-bar {
  display: flex;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
}

/* Botones Premium */
.btn-primary, .btn-secondary, .btn-theme {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  background-color: var(--text-secondary);
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-primary);
}

.btn-theme {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  font-size: 14px;
}

/* ==========================================
   ESTRUCTURA DE SECCIONES (SPA)
   ========================================== */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

.app-section {
  display: none;
}

.app-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* ==========================================
   PANELES Y ELEMENTOS COMUNES
   ========================================== */

/* Banner de Simulación de Email en XAMPP */
.mock-banner {
  background: linear-gradient(135deg, #137333, #34a853);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mock-banner p { margin: 0; font-weight: 500; }
.mock-banner .btn-banner {
  background: white;
  color: #137333;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.1s ease;
}
.mock-banner .btn-banner:active { transform: scale(0.98); }

/* Badges de Categoría */
.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.05em;
  background-color: #F1F3F4;
  color: #3C4043;
}
.category-carne { background-color: #FCE8E6; color: #C5221F; }
.category-pescado { background-color: #E8F0FE; color: #1A73E8; }
.category-vegetariana { background-color: #E6F4EA; color: #137333; }
.category-postre { background-color: #FFE0F0; color: #D81B60; }
.category-otros { background-color: #F1F3F4; color: #3C4043; }

/* Estrellas */
.stars-wrapper { color: var(--color-gold); font-size: 16px; letter-spacing: -2px; }
.star.filled { opacity: 1; }
.star.half { position: relative; } /* Para soporte visual avanzado */
.star.empty { opacity: 0.25; }

/* Cargadores y Estados Vacíos */
.loading, .empty-state { text-align: center; padding: 60px 20px; font-size: 18px; color: var(--text-secondary); }
.error-msg { background-color: #FCE8E6; color: #C5221F; padding: 16px; border-radius: var(--radius-sm); margin-top: 16px; border: 1px solid rgba(197,34,31,0.2); }

/* ==========================================
   PANEL: DASHBOARD DE RECETAS
   ========================================== */

/* Filtros y Buscador */
.dashboard-controls {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-bar-wrapper {
  display: flex;
  gap: 12px;
}
.search-bar-wrapper input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.search-bar-wrapper input:focus {
  border-color: var(--color-primary);
}

/* Buscador por ingredientes */
.ingredient-search-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.ing-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ing-input-row input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  outline: none;
}
.ing-input-row button {
  width: 100%;
}
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ingredient-tag {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-remove-tag {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-weight: bold;
  cursor: pointer;
}
.checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Categorías del Menú */
.categories-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

/* Acordeón de Categorías Gourmet */
.category-dropdown-group {
  width: 100%;
}
.category-dropdown-header {
  position: relative;
  width: 100%;
}
.cat-filter {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.cat-filter:hover {
  background-color: var(--bg-primary);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  color: var(--color-primary);
}
.cat-filter.active {
  background-color: var(--color-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
  font-weight: 600;
}
.cat-dropdown-toggle {
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  border-radius: 50%;
}
.cat-dropdown-toggle:hover {
  background-color: var(--border-color) !important;
}
.cat-filter.active + .cat-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}
.cat-dropdown-children {
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 8px 24px;
  margin-left: 14px;
  border-left: 2px solid rgba(61, 107, 88, 0.15); /* Línea vertical de conexión en Verde Salvia */
  transition: all 0.3s ease;
}
.cat-filter-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  justify-content: flex-start;
}
.cat-filter-sub:hover {
  background-color: rgba(61, 107, 88, 0.06);
  color: var(--color-secondary);
}
.cat-filter-sub.active {
  background-color: var(--color-secondary) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(61, 107, 88, 0.2);
}


/* Selector Desplegable de Categorías */
.custom-category-dropdown {
  position: relative;
  width: 100%;
}
.category-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.category-dropdown-btn:hover {
  border-color: var(--color-primary);
  background-color: var(--bg-primary);
}
.category-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 350px;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 110;
  padding: 8px 0;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.category-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.category-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}
.dropdown-item {
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
  outline: none;
}
.dropdown-item.parent-item {
  padding: 10px 16px;
  font-weight: 600;
  color: var(--text-primary);
  gap: 8px;
  text-transform: capitalize;
}
.dropdown-item.child-item {
  padding: 8px 16px 8px 32px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-secondary);
  gap: 6px;
  text-transform: capitalize;
}
.dropdown-item:hover, .dropdown-item.active {
  background-color: rgba(224, 83, 60, 0.08);
  color: var(--color-primary) !important;
}
.dropdown-item.active {
  font-weight: 700 !important;
}

/* Grid de Recetas */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 290px);
  gap: 24px;
}

.recipe-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 440px;
}
.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-image-wrapper {
  margin: 12px 12px 0 12px;
  height: 180px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.recipe-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}
.card-image-wrapper .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Degradados para recetas sin imagen */
.gradient-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.category-carne { background: linear-gradient(135deg, #FDE8E8, #FCE8E6); }
.category-pescado { background: linear-gradient(135deg, #EBF3FE, #E8F0FE); }
.category-vegetariana { background: linear-gradient(135deg, #EAF8EB, #E6F4EA); }
.category-postre { background: linear-gradient(135deg, #FFEBEE, #FFE0F0); }
.category-otros { background: linear-gradient(135deg, #F3F4F6, #E5E7EB); }

.card-content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.recipe-title {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 6px;
}
.recipe-chef {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: auto;
}
.recipe-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.rating-value {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================
   PANEL: DETALLE DE RECETA
   ========================================== */
.recipe-detail-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-back {
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 16px;
  padding: 8px 0;
}

.recipe-detail-layout {
  display: grid;
  grid-template-columns: 350px 1fr 280px;
  gap: 32px;
}

.detail-image-container {
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.detail-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Caja de Chef */
.chef-info-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chef-title { font-size: 11px; letter-spacing: 0.05em; color: var(--text-secondary); text-transform: uppercase; }
.chef-name-detail { font-size: 18px; font-weight: 700; }
.chef-rep { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.social-share-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Columna de Contenido */
.detail-main h1 { font-size: 32px; line-height: 1.2; margin-bottom: 8px; }
.detail-recipe-desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 24px; }

.recipe-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.meta-item { display: flex; align-items: center; gap: 12px; }
.meta-icon { font-size: 24px; }
.meta-label { font-size: 10px; color: var(--text-secondary); letter-spacing: 0.05em; font-weight: 700; }
.meta-val { font-size: 15px; font-weight: 700; }

/* Caja Escalador */
.scaler-box {
  background-color: rgba(var(--color-primary-rgb), 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 32px;
  border: 1px dashed var(--color-primary);
}
.scaler-box h3 { font-size: 16px; margin-bottom: 12px; }
.portion-selector {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-scale {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}
.btn-scale:active { transform: scale(0.95); }
.portion-display { font-size: 24px; font-weight: 700; font-family: var(--font-heading); }
.portion-unit { font-size: 15px; color: var(--text-secondary); font-weight: 600; }
.scaler-hint { font-size: 12px; color: var(--text-secondary); margin-top: 8px; font-style: italic; }

/* Ingredientes con Checkbox */
.ingredients-list {
  list-style: none;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.ingredient-item-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ingredient-item-label:hover {
  background-color: var(--bg-primary);
}

.ingredient-checkbox {
  display: none;
}
.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--text-secondary);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.ingredient-checkbox:checked + .custom-checkbox {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}
.ingredient-checkbox:checked + .custom-checkbox::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
}

/* Efecto de tachado en texto de ingrediente al marcarlo */
.ingredient-qty { font-weight: 700; color: var(--color-primary); }
.ingredient-checkbox:checked ~ .ingredient-name,
.ingredient-checkbox:checked ~ .ingredient-qty {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Pasos */
.steps-list {
  list-style: none;
  margin-bottom: 32px;
  margin-top: 16px;
}
.steps-list li { margin-bottom: 16px; }
.step-card {
  display: flex;
  gap: 16px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.step-text { font-size: 15px; }

/* Comentarios y valoraciones */
.recipe-comments-section { margin-top: 48px; border-top: 2px solid var(--border-color); padding-top: 32px; }
.comment-form-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rating-stars-input {
  display: flex;
  gap: 8px;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
}
.star-input { transition: color 0.15s ease; }
.star-input.active, .star-input:hover { color: var(--color-gold); }

.comment-form-box textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
}

.comments-list { display: flex; flex-direction: column; gap: 16px; }
.comment-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
}
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-author { font-size: 15px; }
.comment-text { font-size: 14px; margin-bottom: 6px; }
.comment-date { font-size: 11px; color: var(--text-secondary); }

/* ==========================================
   PANEL: LEADERBOARD Y TABLAS
   ========================================== */
.leaderboard-header, .admin-header { text-align: center; margin-bottom: 32px; }
.leaderboard-header p, .admin-header p { color: var(--text-secondary); }

.leaderboard-table-wrapper, .admin-table-wrapper {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th, td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}
th {
  background-color: rgba(var(--color-primary-rgb), 0.04);
  font-family: var(--font-heading);
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }

.rank-cell { font-size: 20px; font-weight: 700; }
.btn-action-vote {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-action-vote:hover {
  background-color: var(--color-primary);
  color: white;
}
.self-badge { background-color: var(--bg-primary); padding: 4px 10px; border-radius: 4px; font-size: 12px; color: var(--text-secondary); }

/* ==========================================
   PANEL: LOGIN Y REGISTRO
   ========================================== */
.auth-container {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg-surface);
  padding: 36px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  text-align: center;
}
.auth-header { margin-bottom: 24px; }
.auth-header h2 { font-size: 28px; margin-bottom: 4px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; }

.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--color-primary);
}

.auth-footer { margin-top: 24px; font-size: 14px; }

/* ==========================================
   PANEL: CREAR RECETA
   ========================================== */
.create-recipe-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  max-width: 800px;
  margin: 0 auto;
}

.ingredient-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 40px;
  gap: 12px;
  margin-bottom: 12px;
}
.step-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.step-badge-form {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.step-form-row textarea { flex: 1; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); outline: none; resize: vertical; background-color: var(--bg-primary); }
.btn-remove-row {
  background-color: #FCE8E6;
  color: #C5221F;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* ==========================================
   PANEL: MI CUENTA
   ========================================== */
.account-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}
.account-details {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
}

/* ==========================================
   ESTILOS DE ADMINISTRACIÓN
   ========================================== */
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.status-badge.verified { background-color: #E6F4EA; color: #137333; }
.status-badge.unverified { background-color: #FEF7E0; color: #B06000; }
.status-badge.active { background-color: #E6F4EA; color: #137333; }
.status-badge.banned { background-color: #FCE8E6; color: #C5221F; }
.status-badge.admin { background-color: #E8F0FE; color: #1A73E8; }
.status-badge.user { background-color: #F1F3F4; color: #3C4043; }

.btn-admin-ban, .btn-admin-role {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-admin-ban { background-color: #FCE8E6; color: #C5221F; }
.btn-admin-role { background-color: #E8F0FE; color: #1A73E8; }

/* Pestañas de Navegación del Panel de Control */
.admin-nav-btn {
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
}
.admin-nav-btn:hover {
  color: var(--color-primary);
  background-color: rgba(224, 83, 60, 0.05) !important;
}
.admin-nav-btn.active {
  color: var(--color-primary) !important;
  border-bottom-color: var(--color-primary) !important;
}

/* Filtros de usuario por roles */
.role-pill-btn {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
}
.role-pill-btn:hover {
  background-color: rgba(224, 83, 60, 0.05) !important;
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}
.role-pill-btn.active {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
}

.admin-panel-content {
  animation: fadeIn 0.25s ease-out;
}

/* ==========================================
   IMPRIMIR RECETAS (HOJA DE ESTILO EXCLUSIVA)
   ========================================== */
@media print {
  @page {
    size: portrait;
    margin: 15mm;
  }

  /* Forzar diseño claro de alto contraste */
  html, body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt;
    font-family: 'Georgia', 'Times New Roman', serif;
    margin: 0;
  }

  /* Ocultar todo lo que no sea el contenido de la receta */
  .main-header,
  .navigation-bar,
  .btn-back,
  .social-share-box,
  .detail-sidebar button,
  .scaler-box,
  .comment-form-box,
  .login-prompt-box,
  .comments-list,
  .recipe-comments-section,
  footer,
  #btn-theme-toggle,
  .btn-favorite-heart,
  .recipe-detail-header,
  .detail-related-column {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
    max-width: 520pt !important;
    margin: 0 auto !important;
  }

  /* Mostrar sólo la sección activa */
  .app-section { display: none !important; }
  .app-section.active { display: block !important; }

  /* ── Info del Chef (Caja del autor) en la barra lateral de impresión ── */
  .chef-info-box {
    display: block !important;
    border: 1pt solid #eee !important;
    border-radius: 6pt !important;
    padding: 10pt !important;
    margin-bottom: 12pt !important;
    background-color: #fafafa !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .chef-title { font-size: 8pt !important; text-transform: uppercase; color: #666 !important; margin: 0 0 2pt 0 !important; }
  .chef-name-detail { font-size: 11pt !important; font-weight: bold !important; margin: 0 0 4pt 0 !important; }
  .chef-rep { font-size: 8pt !important; color: #666 !important; margin: 0 !important; }

  /* Título principal */
  .detail-recipe-title {
    font-size: 20pt !important;
    margin: 6pt 0 4pt !important;
    border-bottom: 1.5pt solid #000 !important;
    padding-bottom: 4pt !important;
  }

  .detail-recipe-desc {
    font-size: 10pt !important;
    color: #333 !important;
    margin-bottom: 8pt !important;
    font-style: italic;
  }

  /* Metadatos (tiempo, porciones…) en línea */
  .recipe-meta-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12pt !important;
    border: 1pt solid #ccc !important;
    background: none !important;
    box-shadow: none !important;
    padding: 6pt 10pt !important;
    margin-bottom: 12pt !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
  }

  .meta-item { text-align: left !important; }
  .meta-val { font-weight: bold; color: #000 !important; font-size: 10pt !important; }
  .meta-label { font-size: 8pt !important; color: #555 !important; }

  /* ──────────────────────────────────────────
     BLOQUE PRINCIPAL: 2 columnas
     Izquierda: ingredientes (.detail-sidebar)
     Derecha: pasos (.detail-main)
     ────────────────────────────────────────── */
  .recipe-detail-layout {
    display: grid !important;
    grid-template-columns: 170pt 1fr !important;
    gap: 20pt !important;
    align-items: start !important;
  }

  /* Sidebar = columna izquierda, estructurada exactamente como la web */
  .detail-sidebar {
    grid-column: 1 !important;
    display: block !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    border-right: 1pt solid #eee !important;
    padding-right: 16pt !important;
  }

  /* Ocultar elementos innecesarios de sidebar al imprimir */
  .detail-sidebar .social-share-box,
  .detail-sidebar .scaler-box,
  .detail-sidebar button { display: none !important; }

  /* Mostrar la imagen en la columna de ingredientes con proporciones elegantes */
  .detail-sidebar .detail-image-container {
    display: block !important;
    width: 100% !important;
    height: 130pt !important;
    overflow: hidden !important;
    border-radius: 6pt !important;
    margin-bottom: 12pt !important;
    border: 1pt solid #eee !important;
  }
  .detail-sidebar .detail-image-container img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
  }

  /* Columna derecha: contenido de la receta */
  .detail-main {
    grid-column: 2 !important;
    display: block !important;
    margin-top: 0 !important;
  }

  /* Ocultar comentarios en la columna derecha */
  .recipe-comments-section { display: none !important; }

  /* Lista de ingredientes: vertical dentro de la columna izquierda */
  .ingredients-sidebar-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 4pt !important;
    margin-top: 6pt !important;
    list-style: none !important;
    padding: 0 !important;
  }

  .ingredients-sidebar-list li {
    border: none !important;
    background: none !important;
    padding: 3pt 0 !important;
    border-bottom: 0.5pt dashed #ccc !important;
    font-size: 10pt !important;
    display: flex !important;
    gap: 6pt !important;
    align-items: baseline !important;
  }

  .ingredient-checkbox, .custom-checkbox { display: none !important; }

  .ingredient-qty {
    font-weight: bold;
    color: #000 !important;
    min-width: 55pt !important;
    display: inline-block !important;
  }

  /* Pasos: lista limpia */
  .steps-list { margin-top: 6pt !important; }

  .step-card {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    padding: 6pt 0 !important;
    border-bottom: 0.5pt dashed #ccc !important;
    page-break-inside: avoid;
    display: flex !important;
    gap: 8pt !important;
    align-items: flex-start !important;
  }

  .step-num {
    border: 1pt solid #000 !important;
    background: none !important;
    color: #000 !important;
    flex-shrink: 0 !important;
    font-size: 9pt !important;
  }

  .step-text { font-size: 10pt !important; line-height: 1.4 !important; }

  /* Secciones H2 */
  h2 {
    page-break-after: avoid;
    font-size: 13pt !important;
    margin: 0 0 6pt !important;
    border-bottom: 1pt solid #000 !important;
    padding-bottom: 3pt !important;
  }

  li { page-break-inside: avoid; }

  /* Badge del nivel de chef */
  .chef-level-badge {
    font-size: 8pt !important;
    padding: 1pt 6pt !important;
    border-radius: 10pt !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
}

/* ==========================================
   RESPONSIVIDAD Y DISPOSITIVOS MÓVILES (ANDROID)
   ========================================== */
@media (max-width: 768px) {
  /* Cabecera Móvil Compacta */
  .main-header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }
  
  .logo-wrapper {
    font-size: 18px;
  }

  /* Menú de pestañas adaptativo en móviles (Desplazable horizontalmente o estilo Bottom Nav) */
  .navigation-bar {
    width: 100%;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    background-color: var(--bg-surface);
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 12px;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    flex: 1;
    text-align: center;
  }
  
  .nav-link .tab-text {
    font-size: 10px;
  }

  .main-content {
    padding: 16px 12px;
  }

  /* Controladores de búsqueda */
  .dashboard-controls {
    padding: 16px;
  }
  
  .search-bar-wrapper {
    flex-direction: column;
  }



  /* Grid de recetas */
  .recipes-grid {
    grid-template-columns: 1fr; /* Una columna por tarjeta en móviles */
    gap: 16px;
  }

  /* Layout detallado de recetas */
  .recipe-detail-layout {
    grid-template-columns: 1fr; /* Apilado vertical */
    gap: 20px;
  }

  .detail-image-container {
    height: 180px;
  }

  .social-share-box {
    margin-top: 8px;
  }

  .recipe-meta-grid {
    grid-template-columns: 1fr; /* Apilado */
    gap: 10px;
  }

  /* Formularios */
  .create-recipe-box, .auth-container, .account-container {
    padding: 20px 16px;
  }

  .ingredient-form-row {
    grid-template-columns: 1.5fr 1fr 1fr; /* Ocultar botón eliminar en la grid o cambiar a fila de abajo */
    gap: 8px;
  }
  .ingredient-form-row .btn-remove-row {
    grid-column: span 3;
    padding: 6px;
  }
}

/* ==========================================
   SELECTOR DE ICONOS (EMOJI PICKER) PARA ETIQUETAS
   ========================================== */
.emoji-picker-container {
  position: relative;
  display: inline-block;
}

.btn-emoji-select {
  width: 60px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-emoji-select:hover {
  background-color: var(--bg-input);
  border-color: var(--color-primary);
}

.emoji-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1010;
  width: 260px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

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

/* Pestañas del selector de emojis */
.emoji-dropdown-tabs {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.emoji-tab-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.emoji-tab-btn:hover {
  background-color: var(--bg-primary);
}

.emoji-tab-btn.active {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border: 1px solid var(--border-color);
}

.emoji-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  width: 100%;
}

/* Scrollbar personalizado para la rejilla de emojis */
.emoji-grid-container::-webkit-scrollbar {
  width: 6px;
}
.emoji-grid-container::-webkit-scrollbar-track {
  background: transparent;
}
.emoji-grid-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.emoji-option {
  font-size: 20px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.emoji-option:hover {
  background-color: var(--bg-primary);
  transform: scale(1.15);
}

.emoji-option:active {
  transform: scale(0.95);
}

/* Edición de etiquetas en línea (Inline Edit Form) */
.inline-edit-tag-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.inline-edit-tag-form input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
}

.inline-edit-tag-form input[type="text"]:focus {
  border-color: var(--color-primary);
}

.btn-inline-save, .btn-inline-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}

.btn-inline-save:hover, .btn-inline-cancel:hover {
  transform: scale(1.15);
}

.btn-inline-save {
  color: var(--color-secondary);
}

.btn-inline-cancel {
  color: #C5221F;
}

/* ==========================================
   ESTILOS DE MODERACIÓN Y ROL MODERADOR
   ========================================== */
.status-badge.moderator {
  background-color: #F3E5F5;
  color: #7B1FA2;
}

.moderation-header {
  text-align: center;
  margin-bottom: 32px;
}
.moderation-header p {
  color: var(--text-secondary);
}
.moderation-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.moderation-card {
  display: flex;
  gap: 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.moderation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.moderation-img-wrapper {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: relative;
}
.moderation-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.moderation-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.moderation-recipe-title {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
}
.moderation-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.moderation-desc {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.moderation-actions {
  display: flex;
  gap: 12px;
}
.btn-approve {
  background-color: #2E7D32;
  color: white;
  border: 1px solid #2E7D32;
}
.btn-approve:hover {
  background-color: #1B5E20;
}
.btn-reject {
  background-color: #C5221F;
  color: white;
  border: 1px solid #C5221F;
}
.btn-reject:hover {
  background-color: #B31412;
}

@media (max-width: 768px) {
  .moderation-card {
    flex-direction: column;
    gap: 16px;
  }
  .moderation-img-wrapper {
    width: 100%;
    height: 200px;
  }
}



/* ==========================================
   ESTILOS ADICIONALES: FAVORITOS, ACCESO SOCIAL, NOTIFICACIONES Y RESPUESTAS
   ========================================== */

/* Corazón de favoritos interactivo */
.btn-favorite-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 10;
}
.btn-favorite-heart:hover {
  transform: scale(1.15);
  background-color: #FFFFFF;
}
.btn-favorite-heart.active {
  color: #E0533C;
}

/* Respuestas a comentarios y Likes */
.comment-replies-container {
  margin-left: 32px;
  border-left: 2px solid var(--border-color);
  padding-left: 16px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-card .comment-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.comment-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, color 0.2s;
}

.comment-action-btn:hover {
  background-color: var(--bg-primary);
  color: var(--color-primary);
}

.comment-action-btn.liked {
  color: #E0533C;
}

.comment-reply-form {
  margin-top: 12px;
  background-color: var(--bg-primary);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.comment-reply-form textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  margin-bottom: 8px;
  font-size: 13px;
}

.comment-mention {
  color: #E0533C;
  font-weight: 700;
  background-color: rgba(224, 83, 60, 0.08);
  padding: 2px 4px;
  border-radius: 4px;
}

/* Notificaciones */
.notification-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.notification-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.notification-item.unread {
  background-color: rgba(224, 83, 60, 0.05);
  border-left: 4px solid var(--color-primary);
}

.notification-item.unread:hover {
  background-color: rgba(224, 83, 60, 0.08);
}

.notification-item.draft-warning {
  border-left: 4px solid #E65100;
  background-color: rgba(230, 81, 0, 0.02);
}

.notification-item.draft-warning:hover {
  background-color: rgba(230, 81, 0, 0.04);
}

.notification-item .time {
  font-size: 11px;
  color: var(--text-secondary);
  align-self: flex-end;
}

/* Pestañas de Cuenta */
.account-tab-btn {
  transition: all 0.2s ease;
}
.account-tab-btn:hover {
  color: var(--color-primary) !important;
}
.account-tab-btn.active {
  color: var(--color-primary) !important;
  border-bottom: 2px solid var(--color-primary) !important;
}

/* Botones de Redes Sociales */
.btn-social {
  box-shadow: var(--shadow-sm);
}
.btn-social:hover {
  background-color: var(--bg-primary) !important;
  border-color: var(--color-primary) !important;
  transform: translateY(-1px);
}

/* ==========================================
   MENÚ DE USUARIO DESPLEGABLE (SUBMENÚ)
   ========================================== */
.user-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .user-menu-wrapper {
    flex: 1;
    justify-content: center;
  }
  .user-menu-wrapper #user-menu-btn {
    width: 100%;
    justify-content: center;
  }
}

.user-submenu {
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  transform-origin: top right;
  opacity: 1;
  visibility: visible;
}

.user-submenu.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
}

.submenu-link {
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.submenu-link:hover {
  background-color: var(--bg-primary) !important;
  color: var(--color-primary) !important;
  padding-left: 22px !important; /* Animación de desplazamiento suave para indicar interactividad */
}

/* ==========================================
   BADGES DE NIVEL DE CHEF (SEGÚN RANKING)
   ========================================== */
.chef-level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  color: #FFFFFF !important;
  text-align: center;
  white-space: nowrap;
}

.chef-level-badge.level-super-chef {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}
.chef-level-badge.level-chef-de-cocina-premium {
  background: linear-gradient(135deg, #FFA500, #FF4500);
}
.chef-level-badge.level-chef-ejecutivo {
  background: linear-gradient(135deg, #FF4500, #D32F2F);
}
.chef-level-badge.level-sous-chef-ejecutante {
  background: linear-gradient(135deg, #D32F2F, #C2185B);
}
.chef-level-badge.level-chef-de-partie {
  background: linear-gradient(135deg, #7B1FA2, #512DA8);
}
.chef-level-badge.level-sous-chef-de-partie {
  background: linear-gradient(135deg, #303F9F, #1976D2);
}
.chef-level-badge.level-cocinero-de-estacion {
  background: linear-gradient(135deg, #0097A7, #00796B);
}
.chef-level-badge.level-ayudante-de-chef {
  background: linear-gradient(135deg, #388E3C, #1B5E20);
}
.chef-level-badge.level-pinche-de-cocina {
  background: linear-gradient(135deg, #F57C00, #E65100);
}
.chef-level-badge.level-aprendiz {
  background: linear-gradient(135deg, #78909C, #37474F);
}

/* ==========================================
   DISEÑO CON BARRA LATERAL (SIDEBAR LAYOUT)
   ========================================== */
@media (min-width: 769px) {
  /* Ancho completo para la zona de contenido principal en desktop */
  .main-content {
    max-width: none !important;
  }
  
  /* Límite de ancho y centrado para mantener consistencia de diseño en el resto de páginas */
  #section-recipe-detail,
  #section-create,
  #section-leaderboard,
  #section-admin,
  #section-moderation,
  #section-notifications,
  #section-account,
  #section-login {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* Catálogo de Recetas: Dos Columnas (Filtros a la izquierda, Recetas a la derecha) */
  #section-recipes.active {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
  }
  
  .dashboard-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
    background-color: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }
  
  .categories-tabs {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    gap: 8px;
    padding-bottom: 0;
  }

  
  .search-bar-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-bar-wrapper input {
    width: 100%;
  }
  
  .search-bar-wrapper button {
    width: 100%;
  }
}

/* ──────────────────────────────────────────
   ESTILOS PARA NUEVOS REQUISITOS
   ────────────────────────────────────────── */

/* Carrusel de Top 10 Recetas */
.top-recipes-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.top-recipes-carousel::-webkit-scrollbar {
  height: 8px;
}
.top-recipes-carousel::-webkit-scrollbar-track {
  background: transparent;
}
.top-recipes-carousel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.top-recipes-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
.top-recipes-carousel .recipe-card {
  flex: 0 0 290px !important; /* Ancho fijo idéntico al de las tarjetas del catálogo */
}

/* Tarjetas de Recetas Relacionadas */
.related-recipe-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary) !important;
  box-shadow: var(--shadow-sm);
}

/* Botones de ordenación del Explorador */
.sort-btn.active, .sort-btn:hover {
  background-color: var(--color-primary) !important;
  color: white !important;
  border-color: var(--color-primary) !important;
}

/* Media query para pantallas medianas (colapsar columna relacionada) */
@media (max-width: 1150px) {
  .recipe-detail-layout {
    grid-template-columns: 350px 1fr;
  }
  .detail-related-column {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .detail-related-column {
    grid-column: span 1;
  }
}

/* Editor Role Badge */
.status-badge.editor {
  background-color: #E0F2F1;
  color: #00796B;
}

/* Grid Meta de Receta auto-fit */
.recipe-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
}

/* Contenedor de múltiples categorías en tarjetas */
.card-categories-container {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 10;
}
.card-categories-container .badge {
  position: static !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Carrusel Top 10 Overrides (Mantener vertical y alineado) */
.top-recipes-carousel .recipe-card {
  flex: 0 0 290px !important;
  flex-direction: column !important;
  height: 440px !important;
}
.top-recipes-carousel .recipe-card .card-image-wrapper {
  margin: 12px 12px 0 12px !important;
  height: 180px !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0 !important;
}

/* Adaptabilidad Móvil */
@media (max-width: 600px) {
  .recipes-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Estilos de Artículos */
.article-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.article-card-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.article-card:hover .article-card-image img {
  transform: scale(1.05);
}
.article-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.article-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-card-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}
.article-body-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-body-content p {
  margin-bottom: 16px;
}

/* Carrusel de Artículos */
.articles-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.articles-carousel::-webkit-scrollbar {
  height: 8px;
}
.articles-carousel::-webkit-scrollbar-track {
  background: transparent;
}
.articles-carousel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.articles-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
.articles-carousel .article-card {
  flex: 0 0 280px !important;
  height: 290px !important;
}
.articles-carousel .article-card .article-card-image {
  height: 120px !important;
  flex-shrink: 0 !important;
}

/* Insignia de Destacado */
.article-badge-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #FF8F00, #FF5722);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Paginación de Recetas */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  margin-bottom: 24px;
}
.pagination-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.pagination-btn:hover:not(:disabled) {
  background-color: var(--bg-primary);
  border-color: var(--text-secondary);
}
.pagination-btn.active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   ESTILOS DE TABLA DE ADMINISTRACIÓN COMPACTA
   ========================================== */
.admin-table-wrapper {
  overflow-x: auto;
  width: 100%;
}
.admin-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 10px 8px !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}
.admin-table th {
  font-size: 11.5px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: rgba(var(--color-primary-rgb), 0.04);
}
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 45px; text-align: center; } /* ID */
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 140px; } /* Username */
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 220px; } /* Email */
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 140px; } /* Role */
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 90px; text-align: center; } /* Verified */
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 85px; text-align: center; } /* Status */
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 75px; text-align: center; } /* Recipes Count */
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 340px; } /* Actions */

.admin-table td.admin-email-cell {
  word-break: break-all;
  white-space: normal;
}
.admin-table td.admin-username-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-role-checkboxes {
  padding: 4px 6px !important;
  gap: 6px !important;
}
.admin-role-checkboxes label {
  gap: 3px !important;
}

/* ==========================================
   NUEVAS CARACTERÍSTICAS PREMIUM
   ========================================== */

/* 1. MODO COCINA INTERACTIVO (KITCHEN MODE) */
.kitchen-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0b0d0c; /* Fondo súper oscuro inmersivo */
  color: #FAF8F5;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  font-family: var(--font-body);
}

.kitchen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
  flex-shrink: 0;
}

.kitchen-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #FFFFFF;
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.btn-kitchen-close {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-kitchen-close:hover {
  background: var(--color-primary);
}

.kitchen-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
  flex-shrink: 0;
}

.kitchen-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  width: 0%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kitchen-content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  flex: 1;
  min-height: 0;
  margin-bottom: 24px;
}

@media (max-width: 850px) {
  .kitchen-content-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    overflow-y: auto;
  }
  .kitchen-timer-panel {
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    padding-left: 0 !important;
  }
}

.kitchen-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.kitchen-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 700px;
  max-height: 100%;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.kitchen-step-num {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.kitchen-step-text {
  font-size: 26px;
  line-height: 1.5;
  color: #FAF8F5;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.kitchen-step-text p,
.kitchen-step-text h2,
.kitchen-step-text h3,
.kitchen-step-text h4,
.kitchen-step-text ul,
.kitchen-step-text ol,
.kitchen-step-text li {
  color: #FAF8F5 !important;
}

.kitchen-step-text p {
  font-size: 26px !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.kitchen-step-text li {
  font-size: 22px !important;
  line-height: 1.6 !important;
  text-align: left;
}

.kitchen-step-text ul,
.kitchen-step-text ol {
  display: inline-block;
  text-align: left;
  margin: 12px 0 16px 20px !important;
}

.kitchen-timer-panel {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.kitchen-timer-circle {
  position: relative;
  width: 180px;
  height: 180px;
}

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

.timer-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 10;
}

.timer-progress-circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 10;
  stroke-dasharray: 502;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.kitchen-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #FFFFFF;
}

.kitchen-timer-controls {
  display: flex;
  gap: 12px;
}

.btn-timer-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-timer-action:hover {
  background: rgba(255, 255, 255, 0.2);
}
.btn-timer-action.running {
  background: #C5221F;
  border-color: #C5221F;
}

.kitchen-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.btn-kitchen-nav {
  padding: 16px 36px;
  font-size: 18px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  transition: all 0.2s ease;
}
.btn-kitchen-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.btn-kitchen-prev {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.btn-kitchen-prev:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.15);
}
.btn-kitchen-next {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.3);
}
.btn-kitchen-next:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

/* 2. PLANIFICADOR DE MENÚ SEMANAL */
.weekly-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-top: 16px;
  width: 100%;
}

@media (max-width: 990px) {
  .weekly-calendar-grid {
    grid-template-columns: 1fr;
  }
}

.calendar-day-col {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.calendar-day-header {
  background-color: rgba(var(--color-primary-rgb), 0.06);
  padding: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
}

.meal-type-slot {
  padding: 10px;
  border-bottom: 1px dashed var(--border-color);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meal-type-slot:last-child {
  border-bottom: none;
}

.meal-slot-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.meal-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.meal-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-sm);
}

.meal-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meal-card-time {
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-meal-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(197, 34, 31, 0.1);
  color: #C5221F;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.meal-card:hover .btn-meal-remove {
  opacity: 1;
}
.btn-meal-remove:hover {
  background-color: #C5221F;
  color: white;
}

.meal-slot-empty {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  opacity: 0.6;
}

/* 3. LISTA DE COMPRAS */
.shopping-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}
.shopping-item-row:last-child {
  border-bottom: none;
}
.shopping-item-row:hover {
  background-color: rgba(var(--color-primary-rgb), 0.02);
}

.shopping-item-row.bought {
  opacity: 0.55;
}

.shop-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.shop-check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.shopping-item-row.bought .shop-check-circle {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.shopping-item-row.bought .shop-check-circle::after {
  content: "✓";
  color: white;
  font-size: 11px;
  font-weight: bold;
}

.shopping-item-name-text {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
  transition: text-decoration 0.2s;
}
.shopping-item-row.bought .shopping-item-name-text {
  text-decoration: line-through;
}

.shop-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shopping-item-amount {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-shopping-delete {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-shopping-delete:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 4. DASHBOARD DE ESTADÍSTICAS DEL CHEF */
.chef-dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat-card-premium {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card-val {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-card-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.dashboard-visual-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}
@media (max-width: 800px) {
  .dashboard-visual-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-panel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dashboard-panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
}

.donut-svg-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
}

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

.donut-segment {
  fill: none;
  stroke-width: 16;
  transition: stroke-dasharray 0.5s ease;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.donut-center-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}
.donut-center-lbl {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.legend-val {
  font-weight: 700;
}

/* Insignias de Logros / Medallas */
.achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.badge-achievement {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.badge-achievement:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  box-shadow: var(--shadow-md);
}

.badge-achievement.locked {
  filter: grayscale(1);
  opacity: 0.45;
}

.achievement-icon {
  font-size: 32px;
  transition: transform 0.3s;
}
.badge-achievement:hover .achievement-icon {
  transform: rotate(10deg) scale(1.1);
}

.achievement-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.achievement-desc {
  font-size: 9.5px;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* 5. TOAST NOTIFICATIONS */
.toast-card {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: transform 0.2s, opacity 0.2s;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(50px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-card.toast-out {
  animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

.toast-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-badge-type {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
}
.toast-badge-mention { background-color: rgba(var(--color-primary-rgb), 0.1); color: var(--color-primary); }
.toast-badge-reply { background-color: rgba(61, 107, 88, 0.1); color: var(--color-secondary); }
.toast-badge-like { background-color: #FFF3E0; color: #E65100; }
.toast-badge-system { background-color: #E8F0FE; color: #1A73E8; }

.btn-toast-close {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.toast-msg-body {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.toast-time {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3.5px;
  background-color: var(--color-primary);
  width: 100%;
}

/* 6. COLECCIONES DE FAVORITOS */
.collections-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.collection-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  height: 170px;
}
.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.collection-folder-icon {
  font-size: 32px;
  color: var(--color-gold);
}

.collection-meta-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.collection-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.collection-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.collection-badge-privacy {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  text-transform: uppercase;
}
.privacy-public { background-color: #E6F4EA; color: #137333; }
.privacy-private { background-color: #F1F3F4; color: #3C4043; }

/* Modal Selector de Colecciones al añadir Favorito */
.collection-selector-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
}

.collection-selector-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 440px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.collection-selector-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collection-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
}
.collection-selector-row:hover {
  border-color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.04);
}

.collection-selector-row.selected {
  border-color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.08);
}

/* Responsividad para el Panel de Favoritos de dos columnas */
@media (max-width: 900px) {
  #subtab-my-favorites {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* 6. PUBLICIDAD Y GOOGLE ADSENSE (ADS) */
.ad-slot-placeholder {
  width: 100%;
  min-height: 90px;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-sizing: border-box;
}

.ad-placeholder-gourmet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 120px;
  background-color: rgba(224, 83, 60, 0.03); /* color-primary con baja opacidad */
  color: var(--text-secondary);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

.ad-placeholder-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  opacity: 0.6;
  margin-bottom: 8px;
}

.ad-placeholder-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.ad-placeholder-icon {
  font-size: 20px;
}

.ad-card-placeholder {
  border-style: dashed !important;
  border-color: rgba(224, 83, 60, 0.3) !important;
  background-color: rgba(224, 83, 60, 0.01) !important;
  position: relative;
}

.ad-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.05em;
  z-index: 1;
}


