body { background: linear-gradient(135deg, #6C3FC5 0%, #4B2A9C 100%) !important; }

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.login-card {
  max-width: 480px;
  width: 100%;
  padding: 3rem 2.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6C3FC5, #4B2A9C);
}

.login-logo {
  margin-bottom: 2rem;
}

.login-logo img {
  max-width: 200px;
  height: auto;
}

.form-control {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.form-control:focus {
  border-color: #6C3FC5;
  box-shadow: 0 0 0 3px rgba(108, 63, 197, 0.1);
  background: white;
}

.form-label {
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.btn-login {
  background: #6D28D9;
  border: none;
  border-radius: 50rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: white!important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  background: #5b21b6;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(109, 40, 217, 0.35);
}

.btn-login:active {
  transform: translateY(0);
}

.forgot-link {
  color: #6C3FC5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.875rem;
}

.forgot-link:hover {
  color: #4B2A9C;
  text-decoration: underline;
}

.forgot-row {
  text-align: right;
  margin-top: 0.4rem;
}

.btn-link-action {
  border: 2px solid #e2e8f0;
  border-radius: 50rem;
  padding: 0.75rem 0.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: #6C3FC5;
  background: #f7fafc;
  white-space: normal;
  transition: all 0.3s ease;
}

.btn-link-action:hover {
  border-color: #6C3FC5;
  color: #4B2A9C;
  background: #fff;
}

.form-check-input:checked {
  background-color: #6C3FC5;
  border-color: #6C3FC5;
}

.form-check-input:focus {
  border-color: #6C3FC5;
  box-shadow: 0 0 0 0.25rem rgba(108, 63, 197, 0.25);
}

.alert {
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
}

.alert-danger {
  background: #fed7d7;
  color: #c53030;
}

@media (max-width: 576px) {
  .login-container {
    padding: 1rem 0.75rem;
  }

  .login-card {
    padding: 1.5rem 1.25rem;
    margin: 0.5rem;
  }

  /* Logo más chico: el usuario ve ambos campos + botón sin scroll */
  .login-logo {
    margin-bottom: 1rem;
  }

  .login-logo img {
    max-width: 110px;
  }

  /* Compactar el espaciado vertical del form en móvil */
  #formAuthentication .mb-3 {
    margin-bottom: 0.85rem;
  }

  #formAuthentication .mb-4 {
    margin-bottom: 1rem;
  }

  /* Botón pegado arriba del teclado (sticky, no fixed: evita jank en iOS) */
  .login-submit-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    padding-top: 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 5;
  }

  .btn-link-action {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
  }
}
