/* =============================
   Login - Estilos Responsivos
   ============================= */

/* Estilo general */
body {
  background-color: #f8f9fa;
  font-family: 'Roboto', sans-serif;
}

/* Contenedor del login (no sobreescribe .container global) */
.login-container {
  min-height: 100dvh;          /* Mejor que 100vh en móviles (evita recortes por barra de navegador) */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Caja del formulario de login */
.login-box {
  max-width: 400px;
  width: 100%;
  padding: 40px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Logo animado */
.login-logo {
  width: 80px;
  height: 80px;
  animation: spin 2s linear infinite;
  margin-bottom: 20px;
}

/* Respeta preferencia de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  .login-logo { animation: none; }
}

/* Animación para el logo */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Texto de bienvenida */
.welcome-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.subtitle-text {
  font-size: 1rem;
  color: #777;
  margin-bottom: 20px;
}

/* Inputs */
.form-control {
  margin-bottom: 15px;
  font-size: 1rem;                 /* >=16px evita zoom en iOS */
  padding: 10px 44px 10px 12px;    /* deja espacio al icono "ojo" a la derecha */
}

/* Botón principal */
.btn-block {
  margin-top: 20px;
  background-color: #007bff;
  border-color: #007bff;
  transition: all 0.3s ease;
  min-height: 44px;                /* área táctil cómoda */
}

.btn-block:hover {
  background-color: #0056b3;
  border-color: #004085;
}

/* Mensajes Flash */
.alert-dismissible {
  transition: opacity 0.5s ease-out, max-height 0.5s ease-out;
  max-height: 200px;
}

.alert-dismissible.fade.hide {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.5s ease-out, max-height 0.5s ease-out;
}

/* Placeholder */
::placeholder {
  color: #999;
  font-style: italic;
}
input:focus::placeholder {
  color: #666;
}

/* Icono para mostrar/ocultar contraseña */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  width: 32px;                     /* área táctil mayor */
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.toggle-password:hover {
  color: #343a40;
}

/* Enlace "Restablecer" */
.enlace-restablecer {
  text-decoration: none;
  color: #007bff !important;
}
.enlace-restablecer:hover {
  text-decoration: underline;
}

/* =============================
   Ajustes para pantallas pequeñas
   ============================= */
@media (max-width: 576px) {
  .login-box {
    padding: 24px;
    border-radius: 12px;
  }
  .welcome-text {
    font-size: 1.25rem;
  }
  .subtitle-text {
    font-size: 0.95rem;
  }
  .form-control {
    padding: 10px 44px 10px 12px;  /* conserva espacio para el ojo */
  }
  .btn-block {
    font-size: 1rem;
  }
}
