/* =========================================
   LOGIN — loaded only by templates/views/login/indexView.php
   ========================================= */

/* Deeper, calmer red over the brand illustration; the page grows with its content */
.bg_background-login {
  position: static;
  min-height: 100vh;
  height: auto;
  z-index: auto;
  background:
    linear-gradient(rgba(74, 18, 12, 0.38), rgba(74, 18, 12, 0.38)),
    url('../images/cdll/bg.webp') no-repeat center center fixed;
  background-size: cover;
}

.bg_background-login .portal-header {
  margin-bottom: 0;
}

.ln-pagina {
  display: flex;
  justify-content: center;
  padding: 28px 16px 40px;
}

.ln-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(40, 8, 4, 0.28);
  color: #212529;
}

.ln-titulo {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.ln-bajada {
  margin: 4px 0 22px;
  font-size: 0.9rem;
  color: #5c636a;
  text-align: center;
}

/* Server messages (Flasher) */
.ln-flash .alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 40px 10px 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.ln-flash .alert .close {
  padding: 8px 12px;
}

.ln-campo {
  margin-bottom: 16px;
}

.ln-label-fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.ln-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #343a40;
}

.ln-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a83a24;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ln-link:hover {
  color: #7f2a19;
}

.ln-link:focus-visible,
.ln-boton-linea:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.ln-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #ced4da;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: #212529;
}

.ln-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(196, 68, 42, 0.18);
}

.ln-input[aria-invalid="true"] {
  border-color: #b02a37;
}

.ln-clave {
  position: relative;
}

.ln-clave .ln-input {
  padding-right: 52px;
}

.ln-ojo {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5c636a;
  cursor: pointer;
}

.ln-ojo:hover {
  color: #212529;
  background: #f3f1ef;
}

.ln-ojo:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: -2px;
}

.ln-ojo .lucide-icon {
  width: 20px;
  height: 20px;
}

.ln-ojo .ln-ojo-ocultar,
.ln-ojo[aria-pressed="true"] .ln-ojo-ver {
  display: none;
}

.ln-ojo[aria-pressed="true"] .ln-ojo-ocultar {
  display: inline-block;
}

.ln-error,
.ln-aviso {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 0.8125rem;
}

.ln-error {
  color: #b02a37;
}

.ln-aviso {
  color: #7a5200;
}

.ln-aviso .lucide-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ln-error[hidden],
.ln-aviso[hidden] {
  display: none;
}

/* Remember email: portal-style checkbox */
.ln-recordar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #343a40;
  cursor: pointer;
}

.ln-recordar input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-blue);
  cursor: pointer;
}

.ln-recordar input:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.ln-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.ln-boton:hover:not(:disabled) {
  background: #ab3a23;
}

.ln-boton:focus-visible {
  outline: 3px solid rgba(196, 68, 42, 0.45);
  outline-offset: 2px;
}

.ln-boton:disabled {
  cursor: progress;
  opacity: 0.85;
}

.ln-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ln-girar 0.8s linear infinite;
}

.ln-boton.is-cargando .ln-spinner {
  display: inline-block;
}

@keyframes ln-girar {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ln-spinner {
    animation-duration: 2.4s;
  }
}

.ln-registro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #f0ebe7;
  font-size: 0.9rem;
  color: #5c636a;
}

.ln-boton-linea {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--primary-blue);
  border-radius: 999px;
  color: #a83a24;
  font-weight: 600;
  text-decoration: none;
}

.ln-boton-linea:hover {
  background: rgba(196, 68, 42, 0.06);
  color: #7f2a19;
  text-decoration: none;
}

.ln-boton-linea .lucide-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .ln-pagina {
    padding: 12px 12px 24px;
  }

  .ln-card {
    padding: 24px 20px 22px;
  }
}

/* Server messages in soft tones (the global alert style is too loud here) */
.ln-flash .alert-danger {
  border: 1px solid #f1c2c6;
  background: #fcebec;
  color: #842029;
}

.ln-flash .alert-success {
  border: 1px solid #badbcc;
  background: #e9f5ee;
  color: #0f5132;
}

.ln-flash .alert-warning,
.ln-flash .alert-info {
  border: 1px solid #f0d9a8;
  background: #fdf3df;
  color: #6b4700;
}

.ln-flash .alert .close {
  color: inherit;
  opacity: 0.7;
  text-shadow: none;
}

/* =========================================
   Shared by Creá tu cuenta and Recuperar contraseña
   ========================================= */

.ln-card-ancha {
  max-width: 600px;
}

.ln-intro {
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #495057;
  text-align: center;
}

.ln-seccion {
  margin: 0 0 6px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #f0ebe7;
}

.ln-seccion:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ln-seccion-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
}

.ln-paso {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(196, 68, 42, 0.1);
  color: #a83a24;
  font-size: 0.8125rem;
  font-weight: 700;
}

.ln-seccion-ayuda {
  margin: -2px 0 14px;
  font-size: 0.8125rem;
  color: #5c636a;
}

.ln-fila {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.ln-ayuda {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #5c636a;
}

/* Live password checklist */
.ln-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: #5c636a;
}

.ln-checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ln-checklist .lucide-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ln-checklist .ln-check-si {
  display: none;
}

.ln-checklist li.is-ok {
  color: #146c43;
}

.ln-checklist li.is-ok .ln-check-si {
  display: inline-block;
}

.ln-checklist li.is-ok .ln-check-no {
  display: none;
}

.ln-terminos {
  margin: 8px 0 18px;
}

.ln-terminos .ln-recordar {
  align-items: flex-start;
  margin: 0;
  line-height: 1.45;
}

.ln-terminos .ln-recordar input {
  margin-top: 2px;
}

/* "Check your inbox" panel */
.ln-enviado {
  text-align: center;
}

.ln-enviado-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #e9f5ee;
  color: #146c43;
}

.ln-enviado-icono .lucide-icon {
  width: 28px;
  height: 28px;
}

.ln-enviado p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #495057;
}

.ln-enviado strong {
  color: #212529;
  word-break: break-all;
}

.ln-pasos-lista {
  margin: 14px 0 18px;
  padding: 12px 14px 12px 32px;
  border-radius: 10px;
  background: #faf8f6;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #495057;
  text-align: left;
}

.ln-volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #a83a24;
  text-decoration: none;
}

.ln-volver:hover {
  color: #7f2a19;
  text-decoration: underline;
}

.ln-volver:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.ln-volver .lucide-icon {
  width: 18px;
  height: 18px;
}

.ln-pie {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0ebe7;
  text-align: center;
}

@media (max-width: 560px) {
  .ln-fila,
  .ln-checklist {
    grid-template-columns: 1fr;
  }
}

a.ln-boton,
a.ln-boton:hover {
  color: #fff;
  text-decoration: none;
}

.ln-boton .lucide-icon {
  width: 18px;
  height: 18px;
}

/* Legends sit inside the fieldset padding (not on its border), so every section spaces alike */
.ln-seccion-titulo {
  float: left;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
}

.ln-seccion-titulo + * {
  clear: both;
}

/* =========================================
   404 — templates/views/error/errorView.php
   Signed out: big white type straight on the brand illustration. Signed in: inside the portal.
   ========================================= */

.er-fuera {
  display: flex;
  justify-content: center;
  padding: 48px 20px 64px;
}

.er-dentro {
  display: flex;
  justify-content: center;
  padding-top: 48px;
}

.er-bloque {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.er-numero {
  margin: 0;
  font-size: clamp(6rem, 22vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.er-titulo {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
}

.er-texto {
  margin: 0 auto;
  max-width: 440px;
  font-size: 1rem;
  line-height: 1.55;
}

.er-ruta {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  word-break: break-all;
}

.er-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.er-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.er-boton .lucide-icon {
  width: 18px;
  height: 18px;
}

.er-boton[hidden] {
  display: none;
}

.er-boton:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* Signed out, on the red illustration */
.er-fuera .er-numero,
.er-fuera .er-titulo {
  color: #fff;
  text-shadow: 0 2px 18px rgba(60, 10, 4, 0.35);
}

.er-fuera .er-texto {
  color: #fdeee9;
}

.er-fuera .er-ruta {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.er-fuera .er-boton-principal {
  border: 0;
  background: #fff;
  color: #a83a24 !important;
  box-shadow: 0 8px 24px rgba(40, 8, 4, 0.25);
}

.er-fuera .er-boton-principal:hover {
  background: #fff4f1;
}

.er-fuera .er-boton-linea {
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  color: #fff;
}

/* Signed in, on the portal's light background */
.er-dentro .er-numero {
  color: #c4442a;
  opacity: 0.18;
}

.er-dentro .er-titulo {
  margin-top: -18px;
  color: #212529;
}

.er-dentro .er-texto {
  color: #495057;
}

.er-dentro .er-ruta {
  background: #ece7e3;
  color: #495057;
}

.er-dentro .er-boton-principal {
  border: 0;
  background: var(--primary-blue);
  color: #fff !important;
}

.er-dentro .er-boton-principal:hover {
  background: #ab3a23;
}

.er-dentro .er-boton-linea {
  border: 1.5px solid #d6cfc9;
  background: #fff;
  color: #343a40;
}
