<!doctypehtml><html lang=en><meta charset=utf-8><meta content="width=device-width,initial-scale=1"name=viewport><title>Login Page</title><script src=https://cdn.tailwindcss.com></script><link href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css rel=stylesheet><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"rel=stylesheet><style>body{font-family:Roboto,sans-serif}</style><body class="bg-gray-800 flex items-center justify-center min-h-screen"><div class="rounded-lg w-full text-white bg-gray-900 max-w-md p-8 shadow-lg"><div class="flex justify-center mb-6"><div class="flex justify-center items-center bg-blue-600 h-24 rounded-full w-24"><i class="text-white fa-cloud fas text-6xl"></i></div></div><h2 class="mb-6 font-bold text-2xl text-center">Login to Your Account</h2><form id=loginForm><div class=mb-4><label class="block font-medium mb-2 text-sm"for=email>Email Address</label> <input class="rounded-lg w-full py-2 bg-gray-800 border border-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 px-4"id=email placeholder="Enter your email"required type=email></div><div class=mb-6><label class="block font-medium mb-2 text-sm"for=password>Password</label> <input class="rounded-lg w-full py-2 bg-gray-800 border border-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 px-4"id=password placeholder="Enter your password"required type=password></div><button class="rounded-lg w-full py-2 bg-blue-600 font-semibold hover:bg-blue-700 text-white"type=submit>Login</button></form></div><script>document.getElementById('loginForm').addEventListener('submit', async function(event) {
            event.preventDefault();
            const email = document.getElementById('email').value;
            const password = document.getElementById('password').value;

            const response = await fetch('https://institution-hills-generation-smoking.trycloudflare.com/login', { 
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify({ email, password })
            });

            if (response.ok) {
                const data = await response.json();
                localStorage.setItem('token', data.token);
                window.location.href = 'panel.html'; 
            } else {
                alert('Login failed. Please check your credentials.');
            }
        });</script>