/* Fondo general */
body {
  background: #f5f6f8;
}

/* Wrapper centrado vertical y horizontal */
.login-wrapper {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Tarjeta */
.login-card {
  background: #ffffff;
  padding: 40px 42px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #eee;
  text-align: center;
}

/* Título */
.login-card h1 {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
}

/* Subtítulo */
.subtitle {
  color: #666;
  font-size: 15px;
  margin-bottom: 32px;
}

/* Labels */
.login-card label {
  display: block;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #222;
}

/* Inputs */
.login-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f1f3f5;
  margin-bottom: 20px;
  font-size: 15px;
  transition: background 0.2s, border 0.2s;
}

.login-card input:focus {
  background: #fff;
  border-color: #aaa;
  outline: none;
}

/* Fila contraseña + enlace */
.password-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -10px;
}

.forgot-link {
  font-size: 14px;
  text-decoration: none;
  color: #1a4eff;
}

/* Botón */
.btn-login {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #333;
}

/* Texto inferior */
.bottom-text {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.bottom-link {
  color: #1a4eff;
  text-decoration: none;
  margin-left: 4px;
}

.error-message {
  color: #ff4d4d;
  background: #ffe6e6;
  border: 1px solid #ffb3b3;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
}

/* Spinner animado dentro del botón */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Estado deshabilitado del botón */
.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.back-home {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  color: #1a4eff;
  text-decoration: none;
  text-align: left;
}

.back-home:hover {
  text-decoration: underline;
  color: #1a4eff;
}