/* ==========================================================================
   CALCULADORAESCANDALLOS.ES - DESIGN SYSTEM (DARK MODE & BRANDING HOSTELERÍA)
   Acentos: Verde Esmeralda (#10b981), Lima Margen (#ccff00), Alerta (#ef4444)
   ========================================================================== */

:root {
  --bg-main: #0a0d14;
  --bg-card: #111726;
  --bg-card-hover: #162035;
  --bg-input: #0e1422;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #10b981;

  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.25);
  --accent-lime: #ccff00;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

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

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Tipografía Especial */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-green);
  color: #042f1a;
  box-shadow: 0 4px 14px var(--accent-green-glow);
}
.btn-primary:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-medium);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent-lime {
  background: var(--accent-lime);
  color: #0b0f17;
  font-weight: 900;
}
.btn-accent-lime:hover {
  background: #b8e600;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: #cbd5e1;
}
.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Botón Oficial Google */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #dadce0 !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.btn-google:hover {
  background: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border-color: #cbd5e1 !important;
  transform: translateY(-1px);
}
.btn-google.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Formularios */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Tarjetas y Badges */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-lime);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Modales y Bottom Sheets */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-backdrop.active {
  display: flex;
}

.modal-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: modal-enter 0.25s ease-out;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slider de Inflación */
.slider-range {
  width: 100%;
  accent-color: var(--accent-lime);
  cursor: pointer;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
}

/* Chips de Filtro */
.btn-filter {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  transition: all 0.2s;
  padding: 6px 14px;
}
.btn-filter:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-filter.active {
  background: var(--accent-green);
  color: #042f1a;
  border-color: var(--accent-green);
  font-weight: 800;
}

/* Ficha Técnica Imprimible para Cocina */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .card, .modal-sheet {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    color: #000 !important;
    background: #fff !important;
  }
}

/* ==========================================================================
   SEGMENTED CONTROL & APP NAVIGATION TABS (PREMIUM SAAS UX/UI)
   ========================================================================== */
.app-nav-tabs-wrapper {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 18, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 6px;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.app-nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.app-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.app-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.app-nav-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(204, 255, 0, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.app-nav-tab.active .tab-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 10px var(--accent-lime);
  display: inline-block;
}

.tab-indicator-dot {
  display: none;
}

.tab-count-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}

.app-nav-tab.active .tab-count-pill {
  background: rgba(16, 185, 129, 0.25);
  color: var(--accent-lime);
}

/* ==========================================================================
   LANDING PRODUCT SHOWCASE TABS & PREVIEWS
   ========================================================================== */
.showcase-container {
  background: linear-gradient(180deg, #101623 0%, #0c101a 100%);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.showcase-nav-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.showcase-tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.showcase-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.showcase-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(204, 255, 0, 0.12) 100%);
  color: #fff;
  border-color: var(--accent-lime);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
}

.hub-recipe-card:hover {
  transform: translateY(-4px);
  border-color: rgba(204, 255, 0, 0.45) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   ALTO CONTRASTE Y TIPOGRAFÍA PARA TABLAS Y DESGLOSES
   ========================================================================== */
.table-container table {
  color: #f1f5f9 !important;
}

.table-container table td {
  color: #f1f5f9 !important;
}

.table-container table th {
  color: #cbd5e1 !important;
}

/* ==========================================================================
   SKELETON LOADERS (SMOOTH HYDRATION & NO LAYOUT SHIFT)
   ========================================================================== */
@keyframes skeleton-pulse {
  0% { opacity: 0.35; transform: scale(0.998); }
  50% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0.35; transform: scale(0.998); }
}

.skeleton-pulse {
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-box {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

