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

html, body {
  overflow-x: hidden;
}

body {
  font-family: "Open Sans", Arial, sans-serif;
  background: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2c2a29;
}

/* Líneas decorativas */
/* Envoltura del container: las líneas se posicionan respecto a él */
.login-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
}

/* El SVG mide 1920x700 y el container queda en el centro,
   con su borde superior a 390px del inicio del SVG */
.fondo-lineas {
  position: absolute;
  top: -390px;
  left: 50%;
  width: 1920px;
  height: 700px;
  margin-left: -960px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.fondo-lineas path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Aviso informativo arriba del container */
.aviso {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #cdeef8;
  border: 1px solid #7fcfe6;
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.aviso-icono {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #93dcf1;
  border: 1px solid #6cc6e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aviso-icono svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #2c2a29;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aviso-texto h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

.aviso-texto p {
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.aviso-texto a {
  font-size: 16px;
  font-weight: 700;
  color: #2c2a29;
  text-decoration: underline;
}

/* Zona central (logo + login) */
.contenido {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  padding: 24px 24px 28px;
  margin-top: 24px;
  color: #2c2a29;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid #b5b5b5;
}

.footer-links a {
  color: #2c2a29;
  text-decoration: none;
  font-size: 16px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.punto {
  font-weight: 700;
  color: #2c2a29;
}

.footer-abajo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}

.footer .footer-logo {
  width: 80px;
  height: 40px;
  margin: 0;
}

.footer-info {
  text-align: right;
  font-size: 14px;
  line-height: 1.5;
}

/* Logo y título encima del container */
.marca {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 250px;
  height: 64px;
  display: block;
  margin: 0 auto 10px;
}

.marca-nombre {
  font-family: "CIB Sans Light", "Segoe UI Light", "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif, -apple-system, BlinkMacSystemFont, system-ui;
  font-size: 30px;
  font-weight: 200;
  text-align: center;
  color: #2c2a29;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.marca-bienvenida {
  font-size: 16px;
  color: #5a5a5a;
  margin-top: 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
}


.l-naranja  { stroke: #ff7f41; }
.l-amarillo { stroke: #fdda24; }
.l-morado   { stroke: #9063cd; }

/* Contenedor blanco con sombra */
.login-container {
  position: relative;
  z-index: 1;
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  padding: 36px 36px 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.login-subtitle {
  font-size: 15px;
  text-align: center;
  color: #2c2a29;
  margin-bottom: 32px;
  line-height: 1.4;
}

/* Campos */
.campo {
  margin-bottom: 28px;
}

.etiqueta {
  display: block;
  font-size: 15px;
  color: #2c2a29;
  margin-bottom: 6px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2c2a29;
  padding: 6px 0;
}

.icono {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: #2c2a29;
  stroke-width: 1.5;
}

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  background: transparent;
  color: #2c2a29;
  padding: 4px 0;
}

.input-wrap input::placeholder {
  color: #8a8a8a;
}

.input-wrap:focus-within {
  border-bottom: 2px solid #2c2a29;
}

/* Estado de error */
.mensaje-error {
  display: none;
  color: #e00000;
  font-size: 13px;
  margin-top: 4px;
}

.campo.error .input-wrap {
  border-bottom: 2px solid #e00000;
}

.campo.error .mensaje-error {
  display: block;
}

/* Links */
.link-olvido {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #2c2a29;
  text-decoration: underline;
  margin-top: 4px;
}

#campoClave {
  margin-bottom: 32px;
}

.link-crear {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #2c2a29;
  text-decoration: underline;
  margin-top: 24px;
}

/* Botón */
.btn-primario {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 25px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(253, 218, 36, 1);
  color: #2c2a29;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-primario:hover:not(:disabled) {
  background: #f5cf0f;
}

.btn-primario:disabled {
  background: #d9dadd;
  color: #9a9a9a;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .login-container {
    padding: 32px 24px;
  }

  .fondo-lineas {
    opacity: 0.5;
  }

  .marca-nombre {
    font-size: 34px;
  }

  .footer-links {
    justify-content: center;
    text-align: center;
  }

  .footer-abajo {
    flex-direction: column;
  }

  .footer-info {
    text-align: center;
  }
}

/* ===== Pantalla de carga ===== */
.cargando-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(70, 70, 70, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
}

.cargando-overlay.activo {
  display: flex;
}

.cargando-circulo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: #e9e9e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 6px solid #d2d2d2;
  border-top-color: #fdda24;
  animation: girar 0.9s linear infinite;
  margin-bottom: 14px;
}

.cargando-titulo {
  font-size: 16px;
  color: #6b6b6b;
}

.cargando-sub {
  font-size: 12px;
  color: #8a8a8a;
  margin-top: 4px;
}

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

/* ===== Páginas de estado (inicio y bloqueado) ===== */
.estado {
  text-align: center;
}

.estado .campo,
.estado form {
  text-align: left;
}

.estado-icono {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.estado-icono svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #2c2a29;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icono-ok { background: #c8ecd2; }

.icono-bloqueo { background: #fde2e2; }
.icono-bloqueo svg { stroke: #e00000; width: 36px; height: 36px; }
.icono-bloqueo circle { fill: #e00000; }

/* Pasos para desbloquear */
.pasos {
  list-style: none;
  text-align: left;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pasos li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.4;
}

.pasos li span {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fdda24;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ===== Código dinámico (6 casillas) ===== */
.icono-candado { background: #f0f0f0; }
.icono-candado svg { stroke: #2c2a29; }

.otp-grupo {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 4px;
}

.otp-casilla {
  width: 48px;
  height: 58px;
  border: none;
  border-bottom: 2px solid #b5b5b5;
  background: transparent;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #2c2a29;
  font-family: inherit;
}

.otp-casilla:focus {
  outline: none;
  border-bottom-color: #fdda24;
}

.otp-grupo.error .otp-casilla {
  border-bottom-color: #e00000;
}

.otp-error {
  text-align: center;
  margin-bottom: 0;
}

.otp-grupo.error + .otp-error {
  display: block;
}

.reenviar {
  text-align: center;
  font-size: 14px;
  margin: 20px 0 24px;
}

.reenviar a {
  color: #2c2a29;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .otp-casilla { width: 40px; height: 52px; font-size: 22px; }
  .otp-grupo { gap: 7px; }
}

/* ===== Opciones de usuario para desbloquear ===== */
.opciones-titulo {
  text-align: left;
  font-size: 15px;
  color: #2c2a29;
  margin-bottom: 12px;
}

.opciones {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #d2d2d2;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.opcion:hover {
  border-color: #b5b5b5;
}

.opcion input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opcion-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #b5b5b5;
  position: relative;
  transition: border-color 0.15s ease;
}

.opcion-texto {
  font-size: 15px;
  color: #2c2a29;
}

/* Opción seleccionada */
.opcion:has(input:checked) {
  border-color: #fdda24;
  background: #fffbe6;
}

.opcion:has(input:checked) .opcion-check {
  border-color: #fdda24;
}

.opcion:has(input:checked) .opcion-check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fdda24;
}
