/* Opcional: carga Poppins (si no lo incluyes en el HTML) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* ================================
   Reset y base
   ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0a0d11;
  color: #e9eef3;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================
   Layout principal
   ================================ */
.contenedor-login {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ================================
   Lado izquierdo - MEJORADO CON IMAGEN
   ================================ */
.lado-izquierdo {
  flex: 1;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 24px;
  padding: 48px clamp(32px, 6vw, 80px);
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Imagen de fondo de circuitos */
.fondo-circuito {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/fondobp.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.32;
  z-index: 0;
  pointer-events: none;
  animation: subtleZoom 20s ease-in-out infinite;
}

/* Animación sutil de zoom en el fondo */
@keyframes subtleZoom {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.25;
  }
  50% { 
    transform: scale(1.05);
    opacity: 0.3;
  }
}

/* Overlay de gradiente sobre la imagen */
/* Overlay de gradiente sobre la imagen (MEJORADO PARA LEGIBILIDAD) */
.lado-izquierdo::before {
  content: "";
  position: absolute;
  inset: 0; /* top, right, bottom, left = 0 */
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(10, 10, 10, 0.45) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Efecto de resplandor rojo sutil */
.lado-izquierdo::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 77, 109, 0.08) 0%, transparent 50%);
  z-index: 2;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

/* Limita el ancho de los elementos */
.lado-izquierdo > .logo,
.lado-izquierdo > .titulo,
.lado-izquierdo .info-login {
  width: min(100%, 480px);
  position: relative;
  z-index: 1;
}

.lado-izquierdo .logo {
  width: 150px;
  max-width: 40vw;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 24px rgba(255, 77, 109, 0.3));
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.lado-izquierdo .logo:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 32px rgba(255, 77, 109, 0.5));
}

.lado-izquierdo .titulo {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

/* ================================
   Logo con alerta - MEJORADO
   ================================ */
.logo-con-alerta {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  width: 100%;
}

/* ================================
   Alerta de robos - MEJORADO
   ================================ */
.alerta-robos {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.15) 0%, rgba(255, 77, 109, 0.08) 100%);
  border: 1.5px solid rgba(255, 77, 109, 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  font-family: "Poppins", sans-serif;
  color: #ff4d6d;
  font-weight: 600;
  max-width: 380px;
  animation: fadeInSlide 1s ease forwards;
  margin: 0;
  flex: 1;
  min-width: 240px;
  box-shadow: 0 4px 16px rgba(255, 77, 109, 0.15);
  position: relative;
  overflow: hidden;
}

.alerta-robos::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.contador-robos {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #ff4d6d;
  text-shadow: 0 0 12px rgba(255, 77, 109, 0.6);
}

.mensaje-alerta {
  font-size: 0.95rem;
  color: #f5f5f5;
  font-weight: 500;
}

@keyframes fadeInSlide {
  from { 
    opacity: 0; 
    transform: translateX(-20px);
  }
  to { 
    opacity: 1; 
    transform: translateX(0);
  }
}

/* ================================
   Título Program Partner - ULTRA ANIMADO
   ================================ */
.titulo-program-partner {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ff4d6d;
  text-shadow:
    0 0 8px rgba(255, 77, 109, 0.9),
    0 0 16px rgba(255, 77, 109, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0 0 20px 0;
  position: relative;
  display: inline-block;
  
  /* Múltiples animaciones combinadas */
  animation: 
    glowPulse 2s ease-in-out infinite,
    floatUpDown 3s ease-in-out infinite,
    colorShift 4s ease-in-out infinite;
  
  /* Transición suave al hover */
  transition: transform 0.3s ease, letter-spacing 0.3s ease;
}

/* Hover interactivo */
.titulo-program-partner:hover {
  transform: scale(1.05);
  letter-spacing: 3.5px;
  animation: 
    glowPulseIntense 0.5s ease-in-out infinite,
    floatUpDown 3s ease-in-out infinite,
    colorShift 4s ease-in-out infinite;
}

/* Efecto de pulso brillante */
@keyframes glowPulse {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(255, 77, 109, 0.9),
      0 0 16px rgba(255, 77, 109, 0.5),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow:
      0 0 12px rgba(255, 77, 109, 1),
      0 0 24px rgba(255, 77, 109, 0.7),
      0 0 32px rgba(255, 77, 109, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

/* Pulso intenso para hover */
@keyframes glowPulseIntense {
  0%, 100% {
    text-shadow:
      0 0 16px rgba(255, 77, 109, 1),
      0 0 32px rgba(255, 77, 109, 0.8),
      0 0 48px rgba(255, 77, 109, 0.6);
  }
  50% {
    text-shadow:
      0 0 24px rgba(255, 77, 109, 1),
      0 0 48px rgba(255, 77, 109, 0.9),
      0 0 64px rgba(255, 77, 109, 0.7);
  }
}

/* Flotación sutil */
@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Cambio sutil de color */
@keyframes colorShift {
  0%, 100% {
    color: #ff4d6d;
  }
  33% {
    color: #ff6b81;
  }
  66% {
    color: #ff3355;
  }
}

/* Pseudo-elemento decorativo ANTES del texto */
.titulo-program-partner::before {
  content: "▸";
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff4d6d;
  font-size: 1.4em;
  opacity: 0.8;
  animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-50%) translateX(5px);
    opacity: 1;
  }
}

/* Línea inferior con múltiples efectos */
.titulo-program-partner::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #ff4d6d 0%, #ff3355 50%, rgba(255, 77, 109, 0.2) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.5);
  
  /* Múltiples animaciones en la línea */
  animation: 
    lineExpand 2s ease-in-out infinite,
    lineSlide 3s ease-in-out infinite;
}

@keyframes lineExpand {
  0%, 100% {
    width: 80px;
    box-shadow: 0 0 8px rgba(255, 77, 109, 0.5);
  }
  50% {
    width: 100px;
    box-shadow: 0 0 16px rgba(255, 77, 109, 0.8);
  }
}

@keyframes lineSlide {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* ================================
   Información adicional - MEJORADO
   ================================ */
.info-login {
  margin-top: 16px;
}

.info-login .section-a1 p {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 8px 0;
  color: #d0d0d0;
  opacity: 0.9;
}

.info-login .section-a1 h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 700;
  margin: 0 0 24px 0;
  color: #ffffff;
  line-height: 1.3;
}

.info-login .section-a2 h2 {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
  color: #ff4d6d;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(255, 77, 109, 0.3);
}

.info-login .section-a2 p {
  font-size: 0.98rem;
  font-weight: 400;
  color: #e0e0e0;
  margin-bottom: 24px;
  line-height: 1.6;
}

.info-login .section-a3 ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.info-login .section-a3 li {
  font-size: 0.98rem;
  font-weight: 500;
  color: #f0f0f0;
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.info-login .section-a3 li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #ff4d6d;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ================================
   Lado derecho - MEJORADO
   ================================ */
.lado-derecho {
  flex: 1;
  background: linear-gradient(135deg, #d62828 0%, #b82020 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  position: relative;
  overflow: hidden;
}

.lado-derecho::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 255, 255, 0.2), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(0, 0, 0, 0.2), transparent 55%);
  pointer-events: none;
}

.lado-derecho::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 50px,
      rgba(0, 0, 0, 0.03) 50px,
      rgba(0, 0, 0, 0.03) 100px
    );
  pointer-events: none;
  opacity: 0.4;
}

/* ================================
   Tarjeta de formulario - MEJORADO
   ================================ */
.formulario-contenedor {
  width: 100%;
  max-width: 440px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  animation: fadeInScale 0.5s ease forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.formulario-contenedor h2 {
  margin: 0 0 18px 0;
  text-align: center;
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 1.9rem);
  letter-spacing: 0.5px;
}

.formulario-contenedor h3 {
  text-align: center;
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 28px;
  color: #e0e0e0;
  opacity: 0.9;
}

/* ================================
   Etiquetas y campos - MEJORADO
   ================================ */
form label {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
  letter-spacing: 0.3px;
}

form input[type="text"],
form input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

form input[type="text"]:focus,
form input[type="password"]:focus {
  outline: none;
  border-color: rgba(255, 77, 109, 0.6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: 
    0 0 0 4px rgba(255, 77, 109, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ================================
   Botón de ingreso - MEJORADO
   ================================ */
form input[type="submit"] {
  width: 100%;
  padding: 14px 18px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff3355 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 8px 24px rgba(255, 77, 109, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

form input[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

form input[type="submit"]:hover {
  background: linear-gradient(135deg, #ff6b81 0%, #ff4d6d 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 32px rgba(255, 77, 109, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

form input[type="submit"]:hover::before {
  left: 100%;
}

form input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 16px rgba(255, 77, 109, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ================================
   Mensaje de error - MEJORADO
   ================================ */
.error {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.2) 0%, rgba(229, 57, 53, 0.15) 100%);
  color: #ffd6d6;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(229, 57, 53, 0.4);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  animation: shake 0.5s ease;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ================================
   Responsive - MEJORADO
   ================================ */
@media (max-width: 900px) {
  .contenedor-login {
    flex-direction: column;
  }
  
  .lado-izquierdo, .lado-derecho {
    flex: none;
    width: 100%;
    min-height: 50vh;
  }

  .lado-izquierdo {
    align-items: center;
    text-align: center;
    padding: 40px 28px;
  }
  
  .lado-izquierdo > .logo,
  .lado-izquierdo > .titulo,
  .lado-izquierdo .info-login {
    width: 100%;
    max-width: 540px;
  }

  .formulario-contenedor {
    max-width: 540px;
  }
  
  .logo-con-alerta {
    justify-content: center;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .titulo-program-partner {
    font-size: 1.35rem;
    letter-spacing: 2px;
  }
  
  .lado-izquierdo {
    padding: 32px 24px;
  }
  
  .lado-derecho {
    padding: 40px 24px;
  }
}

@media (max-width: 520px) {
  .lado-izquierdo .logo {
    width: 120px;
  }
  
  .formulario-contenedor {
    border-radius: 20px;
    padding: 26px 22px;
  }
  
  .info-login {
    padding: 0 12px;
  }
  
  .alerta-robos {
    min-width: 100%;
  }
  
  form input[type="text"],
  form input[type="password"] {
    padding: 12px 16px;
  }
  
  form input[type="submit"] {
    padding: 12px 16px;
    font-size: 1rem;
  }
}

/* Contenedor REAL del contenido */
.contenido-izquierdo {
  position: relative;
  z-index: 5; /* SIEMPRE por encima de overlays */
  width: 100%;
  max-width: 540px;
}
