html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg, #fff), 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.55);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Contenido principal crece y empuja el footer al fondo (sticky footer) */
body > header {
  flex-shrink: 0;
}

body > .container.container-feed {
  flex: 1 0 auto;
}

/* Ensure main content has a reasonable minimum height so the footer */
/* doesn't stick immediately under very short pages. */
.main-feed {
  min-height: 600px;
}

h1,
h2,
h3 {
  font-weight: 900;
}
h4 {
    font-weight: 800;
    font-size: 18px;
}
h5 {
    font-weight: 700;
    font-size: 15px;
}

string {
    font-weight: 900;
}

hr.hr1 {
    margin-top: -4px;
    border: 0;
    border-bottom: 1px dashed #dcdcdc;
    background: #666;
}

.zborder{
    border: 0px dashed #bbb9b9;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 0 8px #dddddd;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navbar: una sola l?nea; el color de fondo lo define Bootstrap (p.ej. bg-primary) + tema Bootswatch */
.navbar-feed {
  background-color: transparent !important;
}
.navbar-feed .container-fluid {
  max-width: 100%;
  flex-wrap: nowrap;
}
.navbar-feed .navbar-collapse {
  flex-wrap: nowrap;
  min-width: 0;
}
.navbar-feed .navbar-nav {
  flex-wrap: nowrap;
}
.navbar-feed .navbar-nav .nav-item {
  margin-left: 0;
  margin-right: 0;
}
.navbar-feed .navbar-brand {
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 0.18rem 0.315rem;
  margin-right: 0.225rem;
}
.navbar-feed .navbar-logo {
  max-height: 108px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Mismo isologo que el brand, ~50% tama?o + escala de grises; nombre debajo */
.navbar-feed .navbar-org-display {
  line-height: 1.15;
  padding: 0 0.35rem;
}
.navbar-feed .navbar-org-logo {
  display: block;
  max-height: 2.7rem;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.92;
}
.navbar-feed .navbar-org-name {
  font-size: 0.612rem;
  font-weight: 600;
  margin-top: 0.1rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.2;
}

/* Home: solo icono casita */
.navbar-feed .nav-link-home-icon {
  padding-left: 0.405rem;
  padding-right: 0.405rem;
  min-width: 2.025rem;
  text-align: center;
}
.navbar-feed .nav-link-home-icon .bi {
  margin-right: 0 !important;
}

/* Refresh session + Logout: sin borde de caja */
.navbar-feed .nav-link.nav-link-navbar-plain,
.navbar-feed .btn.nav-link-navbar-plain {
  border: none !important;
  box-shadow: none !important;
}
/* Iconos en navbar un poco m?s grandes que el texto */
.navbar-feed .nav-link .bi,
.navbar-feed .navbar-brand .bi,
.navbar-feed .btn .bi {
  font-size: 1.17em;
  vertical-align: middle;
  line-height: 1;
  margin-right: 0.135rem !important;
}
.navbar-feed .dropdown-menu .bi {
  font-size: 1.17em;
}
.navbar-feed .nav-link {
  border: 1px solid #c4c4c4;
  border-radius: 5px;
  font-size: 0.9rem;
  padding: 0.18rem 0.27rem;
  white-space: nowrap;
  margin: 0 0.45rem;
  transition: background-color 0.15s, color 0.5s;
}
.navbar-feed .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--bs-primary) !important;
}
.navbar-feed .nav-link:active {
  background-color: rgba(0, 0, 0, 0.1);
}
.navbar-feed .nav-link.active {
  background-color: rgba(0, 0, 0, 0.08);
  font-weight: 600;
  color: var(--bs-primary) !important;
}
.navbar-feed .navbar-nav .btn {
  font-size: 0.72rem;
  padding: 0 0.27rem;
  white-space: nowrap;
  margin: 0 0.45rem;
  transition: background-color 0.15s;
  border-radius: 5px;
}
.navbar-feed .navbar-nav .btn:hover {
  filter: brightness(1.2);

}
.navbar-feed .navbar-nav .btn.active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.navbar-feed .navbar-nav .btn.ms-2 {
  margin-left: 0.225rem !important;
}
/* Website (marketing) + other compact outline buttons aligned with brand row */
.navbar-feed .container-fluid > .btn.btn-sm {
  font-size: 0.7875rem;
  padding: 0.18rem 0.45rem;
  line-height: 1.3;
}
.navbar-feed .navbar-text {
  font-size: 0.63rem;
  margin: 0 0.135rem;
  padding: 0.18rem 0;
}
.navbar-feed .dropdown-menu {
  font-size: 0.72rem;
}
.navbar-feed .dropdown-item .bi {
  font-size: 1.035em;
}
.navbar-feed .nav-item.dropdown {
  margin: 0 0.09rem;
}
.navbar-feed .nav-item.dropdown .nav-link {
  padding: 0.18rem 0.27rem;
}

/* ~10% tighter than Bootstrap ms-1/ms-2 inside crowded SuperAdmin bar */
.navbar-feed .navbar-nav .nav-item.ms-1 {
  margin-left: 0.225rem !important;
}
.navbar-feed .navbar-nav .nav-item.dropdown.ms-2 {
  margin-left: 0.45rem !important;
}

.navbar-feed .navbar-toggler {
  border-radius: 5px;
}

/* Footer secci?n completa con logo FeedNova ? fondo opaco (no sticky: evita solaparse con el scroll) */
.footer-feed {
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
  background-color: var(--bs-body-bg);
  border-top: 2px dashed #444;
}
.footer-feed-inner {
  max-width: 90%;
}
.footer-feed .footer-logo {
  max-height: 100%;
  width: auto;

}
/* Footer brand: same asset as navbar (FeedNova_Isologo.png); compact row height */
.footer-feed .footer-brand-logo {
  max-height: 2rem;
  width: auto;
  object-fit: contain;
}
.footer-feed .footer-brand-text {
  font-size: 1rem;
  font-weight: 600;
}
.footer-feed .footer-brand-link:hover {
  color: var(--bs-primary) !important;
}
.footer-feed .footer-tagline {
  color: var(--bs-secondary-color);
  max-width: 280px;
}
.footer-feed .footer-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-body-color);
  margin-bottom: 0.6rem;
}
.footer-feed .footer-heading .bi {
  font-size: 1.2rem;
  opacity: 1;
}
.footer-feed .footer-links li {
  margin-bottom: 0.30rem;
}
.footer-feed .footer-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-size: 0.85rem;
  
}
.footer-feed .footer-link:hover {
  color: var(--bs-primary);
}
.footer-feed .footer-link .bi {
  font-size: 0.9em;
  opacity: 1;
}
.footer-feed .footer-about {
  color: var(--bs-secondary-color);
  line-height: 1.5;
  max-width: 320px;
}
.footer-feed .footer-bottom {
  color: var(--bs-secondary-color);
}
.footer-feed .footer-bottom .footer-link:hover {
  color: var(--bs-primary);
}

/* Home: imagen de bienvenida y feature cards */
.home-welcome {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--bs-body-bg);
  text-align: center;
  margin-top: 50px;
}
.home-welcome-image {
  width: 80%;
  height: auto;
  display: block;  
 
}
.home-welcome + .container-feed h2 {
  font-size: 1.5rem;
  font-weight: 800;
}
.home-feature-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.home-feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.home-feature-card .card-body {
  padding: 1rem 1rem 1.1rem;
}
.home-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8f4fc 0%, #d4ebf7 100%);
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
}
.home-feature-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.home-feature-card .card-text {
  line-height: 1.4;
  margin-bottom: 0;
}

/* Container principal m?s ancho (90%) */
.container-feed {
  max-width: 90%;
}

/* Secciones: m?s espacio para t?tulo y botones de acci?n */
.main-feed h1, .main-feed h2 {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}
.main-feed .btn {
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.main-feed .btn:hover {
  transform: translateY(-1px);
}
.main-feed .btn:active {
  transform: translateY(0);
}
/* Botones de acci?n en p?ginas (Create, Edit, etc.) m?s compactos */
.main-feed .btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}
.main-feed .btn:not(.btn-sm):not(.btn-lg) {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}
.main-feed .d-flex.justify-content-between.align-items-center,
.main-feed .row.mb-3:first-of-type {
  margin-bottom: 1.25rem;
}

/* Tablas: menos padding */
.main-feed .table td,
.main-feed .table th {
  padding: 0.30rem 0.4rem;
  vertical-align: middle;
  font-size: 12px;
}
.main-feed .table thead th {
  padding: 0.3rem 0.4rem;
}

/* Global loading overlay: operaciones largas (upload/reindex RAG, etc.) */
.global-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.global-loading-overlay.is-active {
  display: flex;
}
.global-loading-content {
  position: relative;
  overflow: hidden;
  width: min(94vw, 560px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  background: #000;
}
.global-loading-media-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.global-loading-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.global-loading-text-stack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.25rem 1.1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
}
.global-loading-message {
  font-weight: 600;
  color: #fff;
}
.global-loading-hint {
  color: rgba(255, 255, 255, 0.88);
}

/* Knowledge Details: chunk preview como referencia, compacta y centrada */
.knowledge-chunk-preview {
  margin-top: 200px;
  width: 50%;
  max-width: 50vw;
  margin-left: auto;
  margin-right: auto;
  font-size: 9px;
}
.knowledge-chunk-preview h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.knowledge-chunk-preview .table {
  font-size: 9px;
}
.knowledge-chunk-preview .table th,
.knowledge-chunk-preview .table td {
  padding: 0.25rem 0.35rem;
}

/* Test RAG Query: tabla de chunks como referencia, compacta y centrada */
.knowledge-test-results-table {
  margin-top: 1rem;
  width: 50%;
  max-width: 50vw;
  margin-left: auto;
  margin-right: auto;
  font-size: 9px;
}
.knowledge-test-results-table .table {
  font-size: 9px;
}
.knowledge-test-results-table .table th,
.knowledge-test-results-table .table td {
  padding: 0.25rem 0.35rem;
}

/* Formulation Details: tabla de ingredientes con fuente algo m?s peque?a para dar m?s aire */
.formulation-details-ingredients-table {
  font-size: 0.8125rem; /* ~13px @ 16px base, ~1?2px menos que el cuerpo */
}
.formulation-details-ingredients-table th,
.formulation-details-ingredients-table td {
  padding: 0.4rem 0.5rem;
}

/* Agent chat (Generate Recipe) */
.agent-chat-container {
  max-height: 480px;
  overflow-y: auto;
  background-color: #fafafa;
  font-size: 0.875rem;
}
.agent-chat-container .fw-bold {
  font-size: 0.75rem;
}
.agent-chat-input-area {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background-color: #ffffff;

}
.agent-chat-input {
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
  border-width: 1px;
  border-color: #fafafa;
  box-shadow: inset 0 0 0 1px #12c19b;
}
.agent-chat-input:focus {
  border-color: #0d6efd;
}

/* Generate Recipe: Did you know + assistant bubbles (readable on dark UI) */
.chat-hints-heading {
  font-weight: 700;
  color: var(--bs-body-color);
}
.chat-hint-card {
  background-color: var(--bs-dark);
  border-color: rgba(255, 255, 255, 0.12) !important;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-hint-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.chat-hint-title {
  line-height: 1.3;
  font-size: 0.95rem;
  font-weight: 600;
  color: #424242;
}
.chat-hint-example {
  line-height: 1.35;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.agent-chat-bubble-assistant {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.agent-chat-bubble-assistant,
.agent-chat-bubble-assistant .fw-bold {
  color: var(--bs-body-color);
}

.agent-species-strip {
  background-color: var(--bs-dark);
}
.agent-species-img {
  height: 80px;
  object-fit: contain;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px;
}
.agent-species-label {
  color: #444;
}

/* Delete formulation modal: remove vertical \"container\" feel and soften edges */
#deleteConfirmModal.modal {
  /* Avoid the internal scroll-column effect; backdrop sigue manejado por Bootstrap */
  overflow-y: hidden;
}
#deleteConfirmModal .modal-dialog {
    margin-top: 0;
    margin-bottom: 0;
    background-color: rgba(15, 23, 42, 0.0);
    box-shadow: none !important;
    border: none !important;
}
#deleteConfirmModal .modal-content {
  border-radius: 0.8rem;
  border: none;
  box-shadow: none;
  height: 400px;
}

/* Backdrop global: suavizar overlay para que no parezca una columna opaca */
.modal-backdrop.show {
    background-color: rgba(15, 23, 42, 0.5);  
}

/* Scientific sources accordion spacing in formulation details */
#citationAccordion .accordion-item {
  border-radius: 0.5rem;
}
#citationAccordion .accordion-item + .accordion-item {
  margin-top: 0.25rem;
}
#citationAccordion .accordion-button {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
#citationAccordion .accordion-body {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* -------------------------------------------------------------------------- */
/* Bootswatch Darkly (see wwwroot/lib/bootswatch/darkly/bootstrap.min.css)   */
/* https://bootswatch.com/darkly/                                            */
/* -------------------------------------------------------------------------- */
.theme-bootswatch-darkly .navbar-feed {
  background-color: var(--bs-primary) !important;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.45) !important;
}

/* Navbar oscuro: quitar aspecto "cajas blancas" y forzar texto claro */
.theme-bootswatch-darkly .navbar-feed .nav-link {
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.theme-bootswatch-darkly .navbar-feed .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.theme-bootswatch-darkly .navbar-feed .nav-link.active {
  background-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

.theme-bootswatch-darkly .navbar-feed .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.theme-bootswatch-darkly .navbar-feed .navbar-toggler-icon {
  filter: invert(1) brightness(1.1);
}

.theme-bootswatch-darkly .navbar-feed .btn-link.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.theme-bootswatch-darkly .navbar-feed .btn-link.nav-link:hover {
  color: #fff !important;
}

.theme-bootswatch-darkly .nav-link-recipe-cta {
  background: rgba(52, 152, 219, 0.45) !important;
  border-radius: 5px;
  border: 1px solid rgba(52, 152, 219, 0.5) !important;
}

.theme-bootswatch-darkly .nav-link-recipe-cta:hover {
  background: rgba(52, 152, 219, 0.65) !important;
}

.theme-bootswatch-darkly .footer-feed {
  /* Opaco: no usar rgba con alpha o el contenido se ve ?debajo? */
  background: var(--bs-body-bg) !important;
  background-color: var(--bs-body-bg) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.theme-bootswatch-darkly .navbar-feed .nav-link-navbar-plain {
  border: none !important;
  background-color: transparent !important;
}

.theme-bootswatch-darkly .navbar-feed .nav-link-navbar-plain:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-bootswatch-darkly .footer-feed .footer-heading,
.theme-bootswatch-darkly .footer-feed .footer-brand-text {
  color: var(--bs-body-color);
}

.theme-bootswatch-darkly .zborder {
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Loading overlay tuned for dark UI */
.theme-bootswatch-darkly .global-loading-overlay {
  background: rgba(15, 20, 25, 0.88);
  backdrop-filter: blur(6px);
}
.theme-bootswatch-darkly .global-loading-content {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

/* Wizard context strip (species / stage): darker on dark theme for contrast */
.wizard-context-bar {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.375rem;
  color: var(--bs-body-color);
}
.wizard-context-label {
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  font-weight: 600;
}
.theme-bootswatch-darkly .wizard-context-bar {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}
.theme-bootswatch-darkly .wizard-context-label {
  color: rgba(255, 255, 255, 0.55);
}

/* Step 2 labels: “optional” in cyan, slightly smaller */
.form-label-optional {
  color: #0dcaf0;
  font-size: 0.75em;
  font-weight: 500;
}

/* Wizard step 2: breathing room inside the card */
.wizard-step2-card .card-body {
  padding: 1.75rem clamp(1rem, 2vw, 1.75rem);
}
.wizard-step2-field .form-text {
  margin-top: 0.5rem;
}

/* Step 2 — cost constraint: calm, card-style choices */
.wizard-cost-option {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  border-width: 1px;
  border-style: solid;
}
.wizard-cost-option:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
}
.wizard-cost-option--selected {
  box-shadow: 0 0 0 0.12rem rgba(var(--bs-primary-rgb), 0.2);
}
.wizard-maxcost-input-group .form-control {
  font-variant-numeric: tabular-nums;
}

/* Step 3: extra air below solver tips carousel + cancel inner mb so one block controls spacing */
.wizard-step3-solver-block {
  margin-bottom: 2.75rem;
}
.wizard-step3-solver-block .solver-tips-outer {
  margin-bottom: 0 !important;
}
/* Solver tips card: rounded shell (matches header + gradient body) */
.solver-tips-panel {
  border-radius: 12px;
  overflow: hidden;
}
/* Step 3 subnav: primary label under tips */
.wizard-step3-within-heading {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  color: var(--bs-body-color);
}
.theme-bootswatch-darkly .wizard-step3-within-heading {
  color: rgba(255, 255, 255, 0.92);
}
nav.wizard-step3-subnav {
  margin-top: 1rem;
}
/* Fine-tune gate: highlighted question + icon */
.wizard-finetune-gate__question-text {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--bs-info);
}
.theme-bootswatch-darkly .wizard-finetune-gate__question-text {
  color: #7dd3fc;
}
.wizard-finetune-gate__question-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--bs-info);
  margin-top: 0.1rem;
}
.theme-bootswatch-darkly .wizard-finetune-gate__question-icon {
  color: #38bdf8;
}

/* Formulation wizard — Guided Solver badge (compact next to H2) */
.wizard-guided-solver-badge {
  font-size: 0.65rem !important;
  font-weight: 600;
  padding: 0.2em 0.5em !important;
  vertical-align: 0.35em;
  letter-spacing: 0.02em;
}

/* Wizard stepper: large circular step numbers (~3× default badge size) + doubled label text */
.wizard-progress-nav {
  --wizard-progress-num-size: 4.25rem;
  --wizard-progress-num-font: 1.6rem;
}
.wizard-progress-num {
  flex-shrink: 0;
  width: var(--wizard-progress-num-size);
  height: var(--wizard-progress-num-size);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--wizard-progress-num-font);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.wizard-progress-num--on {
  background-color: var(--bs-primary);
  color: #fff;
}
.wizard-progress-num--off {
  background-color: var(--bs-secondary);
  color: #fff;
}
.theme-bootswatch-darkly .wizard-progress-num--off {
  background-color: #495057;
}
/* Labels: ~100% larger than previous .small (0.875rem → ~1.75rem) */
.wizard-progress-label {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 14rem;
}
@media (max-width: 767.98px) {
  .wizard-progress-label {
    font-size: 1.25rem;
    max-width: none;
  }
  .wizard-progress-nav {
    --wizard-progress-num-size: 3.25rem;
    --wizard-progress-num-font: 1.25rem;
  }
}
.wizard-progress-arrow {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0.15rem;
  user-select: none;
}

/* Step 1: half-width selects (was col-md-6 each → col-md-3) */
.wizard-step1-select {
  max-width: 100%;
}

/* Step 3 groups: strategy radio pills (green / yellow / red) + group max slider */
.wizard-strategy-pill {
  cursor: pointer;
}
.wizard-strategy-pill__face {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.wizard-strategy-pill--green .wizard-strategy-pill__face {
  border-color: rgba(25, 135, 84, 0.85);
  color: #0f5132;
  background: rgba(25, 135, 84, 0.06);
}
.wizard-strategy-pill--yellow .wizard-strategy-pill__face {
  border-color: rgba(234, 179, 8, 0.95);
  color: #854d0e;
  background: rgba(234, 179, 8, 0.08);
}
.wizard-strategy-pill--red .wizard-strategy-pill__face {
  border-color: rgba(220, 53, 69, 0.9);
  color: #842029;
  background: rgba(220, 53, 69, 0.06);
}
.wizard-strategy-pill--green input:checked + .wizard-strategy-pill__face {
  background: rgba(25, 135, 84, 0.22);
  box-shadow: 0 0 0 0.12rem rgba(25, 135, 84, 0.35);
}
.wizard-strategy-pill--yellow input:checked + .wizard-strategy-pill__face {
  background: rgba(234, 179, 8, 0.25);
  box-shadow: 0 0 0 0.12rem rgba(234, 179, 8, 0.45);
}
.wizard-strategy-pill--red input:checked + .wizard-strategy-pill__face {
  background: rgba(220, 53, 69, 0.2);
  box-shadow: 0 0 0 0.12rem rgba(220, 53, 69, 0.35);
}
.wizard-strategy-pill input:focus-visible + .wizard-strategy-pill__face {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}
.theme-bootswatch-darkly .wizard-strategy-pill--green .wizard-strategy-pill__face {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.65);
  background: rgba(22, 101, 52, 0.25);
}
.theme-bootswatch-darkly .wizard-strategy-pill--yellow .wizard-strategy-pill__face {
  color: #fde047;
  border-color: rgba(250, 204, 21, 0.7);
  background: rgba(113, 63, 18, 0.2);
}
.theme-bootswatch-darkly .wizard-strategy-pill--red .wizard-strategy-pill__face {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(127, 29, 29, 0.2);
}
.theme-bootswatch-darkly .wizard-strategy-pill--green input:checked + .wizard-strategy-pill__face {
  background: rgba(22, 163, 74, 0.35);
  box-shadow: 0 0 0 0.15rem rgba(74, 222, 128, 0.35);
}
.theme-bootswatch-darkly .wizard-strategy-pill--yellow input:checked + .wizard-strategy-pill__face {
  background: rgba(161, 98, 7, 0.45);
  box-shadow: 0 0 0 0.15rem rgba(250, 204, 21, 0.35);
}
.theme-bootswatch-darkly .wizard-strategy-pill--red input:checked + .wizard-strategy-pill__face {
  background: rgba(185, 28, 28, 0.4);
  box-shadow: 0 0 0 0.15rem rgba(248, 113, 113, 0.35);
}
.wizard-step3-group-accordion .group-max-slider {
  accent-color: #38bdf8;
  height: 0.45rem;
}
.theme-bootswatch-darkly .wizard-step3-group-accordion .group-max-slider {
  accent-color: #7dd3fc;
}

/* Wizard Review: primary CTA — ~2× default button size and label */
.wizard-run-formulation-btn {
  font-size: calc(2rem + 2px);
  font-weight: 700;
  line-height: 1.2;
  padding: 1.1rem 2.75rem;
  letter-spacing: 0.06em;
  border-radius: 0.5rem;
}
.wizard-run-formulation-btn__icon {
  font-size: calc(1.85rem + 2px);
  vertical-align: -0.12em;
}
@media (max-width: 576px) {
  .wizard-run-formulation-btn {
    font-size: calc(1.35rem + 2px);
    padding: 0.85rem 1.5rem;
    letter-spacing: 0.04em;
  }
  .wizard-run-formulation-btn__icon {
    font-size: calc(1.35rem + 2px);
  }
}

/* Wizard step 3: ingredient universe, groups, fine-tuning */
.wizard-step3-form .wizard-universe-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wizard-step3-form .wizard-universe-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.45) !important;
}
.wizard-step3-group-accordion .accordion-button {
  font-size: 0.95rem;
}
.wizard-step3-summary .card-body {
  background: rgba(0, 0, 0, 0.06);
}
.theme-bootswatch-darkly .wizard-step3-summary .card-body {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}
.wizard-step3-finetune-card {
  padding: 1.25rem clamp(0.75rem, 2vw, 1.25rem);
}
/* Step 3c — fine-tune gate: breathing room + solid actions separated from copy */
.wizard-finetune-gate .wizard-finetune-gate__body {
  padding: 1.5rem 1.5rem 1.75rem;
}
@media (min-width: 768px) {
  .wizard-finetune-gate .wizard-finetune-gate__body {
    padding: 1.75rem 1.75rem 2rem;
  }
}
.wizard-finetune-gate .wizard-finetune-gate__actions {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
}
.theme-bootswatch-darkly .wizard-finetune-gate .btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #6c757d;
  --bs-btn-border-color: #6c757d;
  --bs-btn-hover-bg: #5c636a;
  --bs-btn-hover-border-color: #565e64;
}
/* Step 3 substeps: one panel visible at a time */
.wizard-step3-phase {
  display: none !important;
}
.wizard-step3-phase.is-active {
  display: block !important;
}
.wizard-step3-subnav .wizard-step3-subnav-dot.bg-primary {
  color: #fff;
}
/* Fine-tune table: no cell spacing gaps (avoids dark lines between columns on colored rows) */
.wizard-finetune-table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}
.wizard-finetune-table tbody tr.wizard-finetune-row:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.06);
}
/* Fine-tune: rows with ban/cap/price differ from plain defaults */
.wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--edited > td {
  background-color: rgba(var(--bs-warning-rgb), 0.07);
}
.theme-bootswatch-darkly .wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--edited > td {
  background-color: rgba(var(--bs-warning-rgb), 0.12);
}

/* Alerts: make warning orange more intense/darker than default */
.alert-warning {
  background-color: #e67e22 !important;
}
/* Banned row: solid fill; inset accent only on first cell (per-cell inset caused vertical dark seams) */
.wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--banned > td {
  background-color: rgba(var(--bs-danger-rgb), 0.14);
  box-shadow: none;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}
.wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--banned > td:first-child {
  box-shadow: inset 4px 0 0 0 rgba(var(--bs-danger-rgb), 0.7);
}
.theme-bootswatch-darkly .wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--banned > td {
  background-color: rgba(var(--bs-danger-rgb), 0.22);
}
.theme-bootswatch-darkly .wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--banned > td:first-child {
  box-shadow: inset 4px 0 0 0 rgba(var(--bs-danger-rgb), 0.85);
}
@keyframes wizard-finetune-flash {
  from {
    background-color: rgba(var(--bs-info-rgb), 0.35);
  }
  to {
    background-color: transparent;
  }
}
.wizard-finetune-table tbody tr.wizard-finetune-row.wizard-finetune-row--flash > td {
  animation: wizard-finetune-flash 0.65s ease-out;
}

/* Max cost slider: visible track on dark cards (greenish / yellow-green) */
.wizard-maxcost-range {
  --wizard-range-track: linear-gradient(90deg, #4a6b14 0%, #7cb342 45%, #c5e1a5 100%);
  --wizard-range-thumb-border: #2e4410;
  height: 1.25rem;
  padding: 0;
  background: transparent;
  accent-color: #aed581;
}
.wizard-maxcost-range:focus {
  outline: none;
}
.wizard-maxcost-range:focus-visible {
  outline: 2px solid rgba(174, 213, 129, 0.65);
  outline-offset: 2px;
}
.wizard-maxcost-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: var(--wizard-range-track);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}
.wizard-maxcost-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -4px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffde7 0%, #dce775 100%);
  border: 2px solid var(--wizard-range-thumb-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.wizard-maxcost-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: var(--wizard-range-track);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}
.wizard-maxcost-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffde7 0%, #dce775 100%);
  border: 2px solid var(--wizard-range-thumb-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.theme-bootswatch-darkly .wizard-maxcost-range {
  --wizard-range-track: linear-gradient(90deg, #4a6b14 0%, #689f38 40%, #9ccc65 100%);
  --wizard-range-thumb-border: #2e4410;
}

/* Tips panel: compact height (~50%), prominent title bar */
.solver-tips-header {
  background: linear-gradient(90deg, #5b2c83 0%, #0d6efd 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.solver-tips-header-title {
  color: #fff !important;
}
.solver-tips-header .badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Formulation wizard tips carousel: dark gradient body (Darkly) */
.theme-bootswatch-darkly .solver-tips-panel .carousel-inner {
  min-height: 11rem;
  background: linear-gradient(
    155deg,
    #0b0f14 0%,
    #121a26 28%,
    rgba(var(--bs-primary-rgb), 0.14) 52%,
    #0d1520 78%,
    #0a1624 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 992px) {
  .theme-bootswatch-darkly .solver-tips-panel .carousel-inner {
    min-height: 12rem;
  }
}
.theme-bootswatch-darkly .solver-tips-panel .solver-tip-slide {
  min-height: 11rem;
  color: rgba(255, 255, 255, 0.9);
}
@media (min-width: 992px) {
  .theme-bootswatch-darkly .solver-tips-panel .solver-tip-slide {
    min-height: 12rem;
  }
}
.theme-bootswatch-darkly .solver-tips-panel .solver-tip-slide .text-muted {
  color: rgba(255, 255, 255, 0.58) !important;
}
.theme-bootswatch-darkly .solver-tips-outer .solver-tips-control .carousel-control-prev-icon,
.theme-bootswatch-darkly .solver-tips-outer .solver-tips-control .carousel-control-next-icon {
  filter: invert(85%);
}

/* Home: tarjetas y bloque hero coherentes con Darkly */
.theme-bootswatch-darkly .home-feature-card {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.theme-bootswatch-darkly .home-feature-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Agent chat (Generate Recipe): fondo oscuro opaco + input y contraste */
.theme-bootswatch-darkly .agent-chat-container {
  background-color: #1e2226 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
}
.theme-bootswatch-darkly .agent-chat-input-area {
  background-color: var(--bs-secondary-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.theme-bootswatch-darkly .agent-chat-input {
  background-color: #222 !important;
  border: 1px solid rgba(72, 146, 34, 0.85) !important;
  color: #f3f3f3 !important;
}
.theme-bootswatch-darkly .agent-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.theme-bootswatch-darkly .chat-hint-card {
  background-color: #2b3035;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
.theme-bootswatch-darkly .chat-hint-card:hover {
  background-color: #32383e;
}
.theme-bootswatch-darkly .chat-hint-title {
  color: #777 !important;
}
.theme-bootswatch-darkly .chat-hint-example {
  color: rgba(255, 255, 255, 0.88) !important;
}

.theme-bootswatch-darkly .agent-chat-bubble-assistant {
  background-color: #343a40 !important;
  color: #f1f3f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}
.theme-bootswatch-darkly .agent-chat-bubble-assistant .fw-bold {
  color: #fff !important;
}
.theme-bootswatch-darkly .agent-chat-bubble-assistant a {
  color: #7dcdf8;
}
.theme-bootswatch-darkly .agent-chat-bubble-assistant a:hover {
  color: #fff;
}

/* Formulation wizard: rotating solver tips (English); compact slides; arrows outside card */
.solver-tips-outer {
  position: relative;
  overflow: visible;
  padding-left: 50px;
  padding-right: 50px;
}
.solver-tips-carousel {
  overflow: hidden;
}
.solver-tips-panel .carousel-inner {
  min-height: 11rem;
  background: linear-gradient(
    155deg,
    #eef2f7 0%,
    #f8fafc 45%,
    #e2e8f0 100%
  );
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
@media (min-width: 992px) {
  .solver-tips-panel .carousel-inner {
    min-height: 12rem;
  }
}
.solver-tip-slide {
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
@media (min-width: 992px) {
  .solver-tip-slide {
    min-height: 12rem;
  }
}
.solver-tips-panel .carousel-item {
  transition: transform 0.65s ease-in-out;
}
/* Prev / Next: outside the card; 50px side gutters align arrows with card edge */
.solver-tips-outer .solver-tips-control--outside {
  position: absolute;
  z-index: 4;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
  width: 2.75rem !important;
  max-width: none !important;
  height: 2.75rem;
  border-radius: 50%;
  opacity: 1;
  margin: 0;
  padding: 0;
}
.solver-tips-outer .solver-tips-control--outside.carousel-control-prev {
  left: 0;
}
.solver-tips-outer .solver-tips-control--outside.carousel-control-next {
  right: 0;
}
.solver-tips-outer .solver-tips-control--outside {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.solver-tips-outer .solver-tips-control--outside:hover {
  background: rgba(0, 0, 0, 0.14);
}
.theme-bootswatch-darkly .solver-tips-outer .solver-tips-control--outside {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.theme-bootswatch-darkly .solver-tips-outer .solver-tips-control--outside:hover {
  background: rgba(255, 255, 255, 0.15);
}
.solver-tips-outer .solver-tips-control .carousel-control-prev-icon,
.solver-tips-outer .solver-tips-control .carousel-control-next-icon {
  filter: invert(35%);
  width: 1.35rem;
  height: 1.35rem;
}

/* Login (LayoutAuth): sin navbar ? 50% imagen / 50% formulario, centrado vertical */
.login-auth-body {
  margin: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
}

.login-auth-main {
  min-height: 100vh;
  padding: 0 !important;
}

.login-auth-root {
  min-height: 100vh;
}

.login-auth-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

@media (min-width: 992px) {
  .login-auth-pane {
    min-height: 100vh;
  }
}

.login-auth-pane-image {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.login-auth-img {
  max-height: 400px;
  width: 100%;
  max-width: 560px;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}

.login-auth-form-inner {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.login-auth-logo {
  height: 6rem;
  width: auto;
  object-fit: contain;
}

/* Forgot password / paginas de cuenta: bloque al 50% centrado en pantalla (sin navbar: usar _LayoutAuth) */
.login-auth-centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.login-auth-centered-panel {
  width: 50%;
  max-width: 50%;
  min-width: 0;
}

@media (max-width: 575.98px) {
  .login-auth-centered-panel {
    width: 100%;
    max-width: 100%;
  }
}

/* Edit / Create Ingredient - 3-column layout, compact numeric fields */
.bo-ing-edit .bo-ing-identity {
  background: linear-gradient(
    145deg,
    rgba(var(--bs-primary-rgb), 0.22) 0%,
    rgba(var(--bs-primary-rgb), 0.08) 100%
  );
  border: 1px solid rgba(var(--bs-primary-rgb), 0.45);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
}

.bo-ing-edit .bo-ing-mini {
  max-width: 240px;
  width: 100%;
}

.bo-ing-edit .bo-ing-mini .form-control {
  width: 100%;
  max-width: 100%;
}

.bo-ing-edit .bo-ing-mini--checks {
  max-width: 240px;
}

/* Generate Recipe — mode chooser (A.I. vs Wizard), image-forward floating tiles */
.recipe-mode-page-intro {
  margin-bottom: 100px;
}

.recipe-mode-picker .recipe-mode-link:focus-visible .recipe-mode-tile {
  outline: 2px solid var(--bs-primary);
  outline-offset: 4px;
  border-radius: 1rem;
}

.recipe-mode-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
  padding: 1.25rem 1rem 1.5rem;
  border-radius: 1rem;
  border: none;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 992px) {
  .recipe-mode-tile {
    min-height: 300px;
    padding: 1.5rem 1.25rem 1.75rem;
  }
}

.recipe-mode-tile__copy {
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.recipe-mode-tile__art {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  margin-bottom: 1rem;
  padding: 0.5rem 0.25rem 1rem;
  background: radial-gradient(ellipse 85% 75% at 50% 35%, rgba(255, 255, 255, 0.06), transparent 62%);
}

.theme-bootswatch-darkly .recipe-mode-tile__art {
  background: radial-gradient(ellipse 85% 75% at 50% 35%, rgba(255, 255, 255, 0.05), transparent 62%);
}

.recipe-mode-tile__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.recipe-mode-tile--free:hover .recipe-mode-tile__img,
.recipe-mode-tile--wizard:hover .recipe-mode-tile__img {
  transform: translateY(-2px);
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.6)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.recipe-mode-link:hover .recipe-mode-tile {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.28);
}