/* Fondo base */
body {
  background: #323131;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  position: relative;
}

/* Contenedor de partículas */
#particles-js {
      position: absolute;
      width: 100%;
      height: 100%;
      z-index: -1;
    }


/* Tarjeta de login con efecto glassmorphism */
.login-card {
  background: rgba(242, 242, 242, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  opacity: 0;
  transform: translateY(40px);
  animation: slideFade 0.8s ease-out forwards;
}

/* Animación de entrada */
@keyframes slideFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.logo-img {
  width: 120px;
  margin-bottom: 1rem;
}

/* Título principal */
.title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #000000;
}

/* Subtítulo con toque naranja claro */
.tagline {
  font-size: 1.3rem;
  color: #020202;
  margin-bottom: 1.5rem;
}

/* Palabra destacada */
.highlight {
  color: #FF5000;
}

/* Labels */
.form-label {
  font-weight: 600;
  color: #000000;
}

/* Inputs */
.form-control {
  border-radius: 0.5rem;
  border: none;
  background-color: rgba(255, 255, 255, 0.95);
  color: #000;
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 80, 0, 0.4);
}

/* Botón de login */
.btn-login {
  background-color: #FF5000;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
  min-height: 45px;
}

.btn-login:hover {
  background-color: #e04800;
  transform: scale(1.03);
}

/* Spinner */
.spinner-border {
  width: 2.5rem;
  height: 2.5rem;
}

/* Link de recuperación */
.forgot-link {
  color: #0c0c0c;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Alertas (mensajes de error o éxito) */
.alert {
  border-radius: 0.75rem;
  max-width: 500px;
}

@media (max-width: 480px) {
  .login-card {
    padding: 30px 20px;
  }
}
.login-footer {
  color: #BBBBBB;
  font-size: 1rem;
  z-index: 2;
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  pointer-events: none;
}

.legal-links {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  z-index: 3;
}

.legal-links a {
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 500;
  pointer-events: auto;
}

.legal-links a:hover {
  text-decoration: underline;
}

.legal-links .separator {
  color: rgba(241, 245, 249, 0.6);
}

body.light-theme .legal-links a {
  color: #1f2933;
}

body.light-theme .legal-links .separator {
  color: rgba(15, 23, 42, 0.45);
}

.custom-alert {
  z-index: 9999;
  max-width: 600px;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 10px;
}
.toast-container {
  max-width: 90%;
}

.toast {
  min-width: 300px;
  max-width: 500px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/*.custom-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  z-index: 9999;
  font-weight: 500;
  font-size: 0.95rem;
}*/
/* 🌞 Modo claro */
body.light-theme {
  background: #ffffff;
}

body.light-theme .login-card {
  background: rgba(239, 239, 239, 1);
  color: #000000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.light-theme .form-label,
body.light-theme .title {
  color: #000000;
}

body.light-theme .tagline {
  color: #FF5000;
}

body.light-theme .forgot-link {
  color: #FF5000;
}

body.light-theme .btn-login {
  background-color: #FF5000;
  color: #fff;
}

body.light-theme .btn-login:hover {
  background-color: #e04800;
}


#theme-toggle-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

body.light-theme #toggle-theme {
  background-color: #f0f0f0;
  color: #333;
  border-color: #ccc;
}

body.light-theme #toggle-theme:hover {
  background-color: #e6e6e6;
}

/* --- Logo flotante --- */
.floating-brand{
  position: fixed;
  top: 18px;
  left: 22px;
  z-index: 1200;               /* por encima de la tarjeta y partículas */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.floating-brand img{
  display:block;
  width: 40px; height: 40px;   /* respeta el área con padding visual */
  object-fit: contain;
}

/* Hover/active */
.floating-brand:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.92);
}
.floating-brand:active{ transform: translateY(0); }

/* Tema oscuro: base más oscura para mejor contraste */
body:not(.light-theme) .floating-brand{
  background: rgba(24,24,24,0.7);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Muy pequeñas pantallas: un poco más chico */
@media (max-width: 380px){
  .floating-brand{
    top: 12px; left: 14px; width: 44px; height: 44px; border-radius: 12px;
  }
  .floating-brand img{ width: 34px; height: 34px; }
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce){
  .floating-brand{ transition: none; }
}

/* Asegura niveles de pila del resto */
#particles-js{ position: fixed; inset: 0; z-index: 0; }
.login-card{ position: relative; z-index: 1000; }
#theme-toggle-container{ position: fixed; top: 16px; right: 18px; z-index: 1200; }

