/* --- FUENTES POPPINS LOCALES --- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Poppins/Poppins-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Poppins/Poppins-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Poppins/Poppins-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Poppins/Poppins-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Poppins/Poppins-Bold.ttf') format('truetype');
}

/* --- BASE GENERAL --- */
* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg,
      rgba(0, 15, 102, 0.15) 0%,
      rgba(223, 13, 26, 0.12) 50%,
      rgba(255, 255, 255, 0.95) 100%);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(0, 15, 102, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(223, 13, 26, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
  background-size: cover;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  position: relative;
}

/* --- PATRÓN SUTIL DEL FONDO --- */
.logo-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 20% 30%, #000f66 0%, transparent 8%),
    radial-gradient(circle at 80% 70%, #df0d1a 0%, transparent 10%),
    radial-gradient(circle at 40% 80%, #000f66 0%, transparent 6%),
    radial-gradient(circle at 60% 20%, #df0d1a 0%, transparent 7%);
  background-size: 400px 400px;
  z-index: 0;
}

.bg-bluefll {
  background-color: #000f66;
}

/* --- FORMAS FLOTANTES (SIN ANIMACIÓN) --- */
.background-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 15, 102, 0.1) 0%, transparent 70%);
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
}

.shape-2 {
  width: 220px;
  height: 220px;
  bottom: -70px;
  right: 10%;
  background: radial-gradient(circle, rgba(223, 13, 26, 0.1) 0%, transparent 70%);
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 30%;
  right: -50px;
  background: radial-gradient(circle, rgba(0, 15, 102, 0.08) 0%, transparent 70%);
}

/* --- CONTENEDOR LOGIN --- */
.login-container {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px;
}

/* --- TARJETA PRINCIPAL --- */
.login-card {
  max-width: 460px;
  width: 100%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 60px rgba(0, 15, 102, 0.15);
  padding: 3.5rem 2.5rem 2.5rem;
  backdrop-filter: blur(10px);
  margin: 0 auto;
  position: relative;
  transform: none !important;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg,
      #000f66 0%,
      #1a237e 25%,
      #df0d1a 75%,
      #b40c16 100%);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* --- LOGO SIN MOVIMIENTO --- */
.logo-box {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.logo-centered {
  width: 100px;
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.15));
  transition: filter 0.3s ease;
  cursor: pointer;
}

.logo-centered:hover {
  filter: drop-shadow(0 5px 15px rgba(0, 15, 102, 0.3));
}

/* --- CUERPO DEL LOGIN --- */
.login-body {
  text-align: center;
  margin-top: 1rem;
}

.login-body h3 {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  color: #000f66;
  text-shadow: 0 2px 4px rgba(0, 15, 102, 0.1);
}

/* --- FORMULARIOS --- */
.form-label,
.form-label-fll {
  color: #000f66;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
  display: block;
  text-align: left;
}

.input-container {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #000f66;
  z-index: 2;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.input-modern {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #e8f0fe;
  border-radius: 12px;
  padding: 14px 18px 14px 48px;
  font-size: 15px;
  color: #000;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  box-shadow: none;
  position: relative;
}

.input-modern:focus {
  border-color: #000f66;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 15, 102, 0.15);
  outline: none;
}

.input-modern:focus+.input-icon {
  color: #df0d1a;
}

.input-modern::placeholder {
  color: #8a94a6;
  font-weight: 400;
}

/* --- BOTÓN SIN MOVIMIENTO --- */
.btn-modern {
  border-radius: 12px;
  background: linear-gradient(135deg, #000f66 0%, #1a237e 100%);
  color: white;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 15, 102, 0.35);
  width: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-modern:hover {
  background: linear-gradient(135deg, #1a237e 0%, #000f66 100%);
  box-shadow: 0 8px 25px rgba(0, 15, 102, 0.45);
}

/* --- ENLACES --- */
.recuperarPass,
.redirect-text {
  color: #000f66;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.recuperarPass:hover,
.redirect-text:hover {
  color: #df0d1a;
  text-decoration: underline;
}

/* --- ALERTAS --- */
.incorrect {
  color: #df0d1a;
  font-weight: 500;
  background: rgba(223, 13, 26, 0.08);
  padding: 12px;
  border-radius: 10px;
  border-left: 4px solid #df0d1a;
  margin-top: 1rem;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 768px) {
  .login-card {
    padding: 3rem 2rem 2rem;
  }

  .logo-centered {
    width: 90px;
  }

  .login-body h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .login-card {
    max-width: 95%;
    padding: 3rem 1.5rem 2rem;
  }

  .logo-centered {
    width: 80px;
  }

  .login-body h3 {
    font-size: 1.2rem;
  }

  .shape-1,
  .shape-2,
  .shape-3 {
    display: none;
  }

  .login-container {
    padding: 10px;
  }
}

/* --- GARANTÍA EXTRA CONTRA MOVIMIENTOS --- */
.login-card {
  left: 0 !important;
  right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

/* --- Ajuste de alineación en móviles --- */
@media (max-width: 768px) {
  .login-container {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: 100vh;
    padding-top: 6rem !important;
  }

  /* Permitir desplazamiento si el teclado cubre parte del form */
  body,
  html {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
}