/* ======================================== */
/* LOGIN - ESTILOS PROFESIONALES */
/* ======================================== */

.contenedor-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  position: relative;
  overflow: hidden;
}

.contenedor-login::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.login-box {
  max-width: 400px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.login-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 35px 20px;
  text-align: center;
  border-bottom: 2px solid #eef2f7;
  position: relative;
  overflow: hidden;
}

.login-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(30, 60, 114, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

.login-logo {
  text-align: center;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.login-logo img {
  max-width: 160px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-logo img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.login-header h1 {
  color: #1e3c72;
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.login-header p {
  color: #495057;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.login-form {
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
}

.campo {
  margin-bottom: 25px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  position: relative;
}

.campo label {
  display: block;
  margin-bottom: 8px;
  color: #1e3c72;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  width: 100%;
  letter-spacing: 0.3px;
}

.campo input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #eef2f7;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.campo input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow:
    0 0 0 4px rgba(30, 60, 114, 0.1),
    0 8px 15px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.campo input::placeholder {
  text-align: left;
  font-size: 13px;
  color: #adb5bd;
}

/* Efecto de enfoque para los campos */
.campo::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3c72, #2a5298);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.campo:focus-within::after {
  width: 80%;
}

.btn-login {
  width: 100%;
  max-width: 300px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-top: 15px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-login:hover::before {
  transform: translateX(100%);
}

.btn-login::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-login:hover::after {
  opacity: 1;
}

.btn-login:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(30, 60, 114, 0.4);
}

.btn-login:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.3);
}

/* ======================================== */
/* TOASTS - SIN EMOJIS */
/* ======================================== */

.toast-container {
  margin: 20px 25px 0 25px;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: none;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.toast-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

.toast-container::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  opacity: 0.5;
  pointer-events: none;
}

/* Toast de éxito (verde) */
.toast-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left: 6px solid #28a745;
}

/* Toast de error (rojo) */
.toast-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left: 6px solid #dc3545;
  margin-bottom: 20px;
}

/* Toast de información (azul) */
.toast-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border-left: 6px solid #17a2b8;
}

/* Toast de advertencia (amarillo) */
.toast-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  color: #856404;
  border-left: 6px solid #ffc107;
}

/* Animaciones */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======================================== */
/* FOOTER */
/* ======================================== */

.login-footer {
  padding: 20px 25px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 2px solid #eef2f7;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(30, 60, 114, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

.login-footer p {
  color: #495057;
  font-size: 12px;
  margin-bottom: 5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.login-footer p:last-child {
  margin-bottom: 0;
  color: #6c757d;
}

/* ======================================== */
/* RESPONSIVE PROFESIONAL */
/* ======================================== */

@media (max-width: 768px) {
  .login-box {
    max-width: 90%;
  }

  .login-header {
    padding: 30px 15px;
  }

  .login-header h1 {
    font-size: 28px;
  }

  .login-header p {
    font-size: 13px;
  }

  .login-form {
    padding: 30px 20px;
  }

  .campo {
    max-width: 100%;
  }

  .campo input {
    padding: 12px 15px;
  }

  .btn-login {
    max-width: 100%;
    padding: 12px 18px;
    font-size: 15px;
  }

  .toast-container {
    margin: 15px 20px 0 20px;
    padding: 12px 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .login-header {
    padding: 25px 12px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .login-header p {
    font-size: 12px;
  }

  .login-logo img {
    max-width: 130px;
  }

  .login-form {
    padding: 25px 15px;
  }

  .campo {
    margin-bottom: 20px;
  }

  .campo label {
    font-size: 13px;
  }

  .campo input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn-login {
    padding: 10px 15px;
    font-size: 14px;
  }

  .toast-container {
    margin: 10px 15px 0 15px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .login-footer {
    padding: 15px 20px;
  }

  .login-footer p {
    font-size: 11px;
  }
}

/* Estilo para botón deshabilitado */
.btn-login:disabled {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.btn-login:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-login:disabled::before,
.btn-login:disabled::after {
  display: none;
}

/* Estilos para intentos restantes - VERSIÓN MEJORADA */
.intentos-restantes {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #721c24;
  margin: 15px 25px 15px 25px;
  padding: 12px 15px;
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-radius: 10px;
  border-left: 6px solid #dc3545;
  animation: pulseWarning 1s ease;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

@keyframes pulseWarning {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mejora para botón deshabilitado */
.btn-login:disabled {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
  box-shadow: none !important;
}

.btn-login:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.btn-login:disabled::before,
.btn-login:disabled::after {
  display: none;
}

/* Mejora para inputs deshabilitados */
.campo input:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
  border-color: #ced4da;
}

.campo input:disabled:focus {
  outline: none;
  box-shadow: none;
  border-color: #ced4da;
}

/* Estilo para mensaje de bloqueo persistente */
.toast-error.persistente {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
  border: 2px solid #dc3545;
}

/* Mejorar visibilidad del mensaje de bloqueo */
.toast-error:has(:contains("Demasiados intentos")) {
  animation: none !important;
  opacity: 1 !important;
}
/* ======================================== */
/* CONTENEDOR DE CONTRASEÑA CON OJITO DENTRO */
/* ======================================== */

.password-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.password-wrapper input {
  width: 100%;
  padding: 14px 45px 14px 18px !important;
  border: 2px solid #eef2f7;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.password-wrapper input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow:
    0 0 0 4px rgba(30, 60, 114, 0.1),
    0 8px 15px rgba(0, 0, 0, 0.05);
}

.toggle-password {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.toggle-password:hover {
  background: rgba(30, 60, 114, 0.05);
}

.toggle-password:hover .eye-icon {
  stroke: #1e3c72;
}

.toggle-password:focus {
  outline: none;
}

.eye-icon {
  transition: stroke 0.2s ease;
}
