function handleLogin(event) { event.preventDefault(); // Simulate a successful login with a delay for demonstration document.getElementById('loading').classList.add('active'); setTimeout(() => { // Redirect to dashboard.php after animation window.location.href = 'dashboard.php'; }, 2000); }