<!DOCTYPE html>
<html lang="it">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Accedi</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="./frontend/login/style.css">
</head>
<body>

<form method="POST">
    <h2>Accedi al tuo account</h2>
    <label>Username o Email:</label>
    <input type="text" name="usernameOrEmail" required><br>
    <label>Password:</label>
    <input type="password" name="password" required><br>
    
    <input type="hidden" name="csrf_token" value="<?= generateCSRFToken() ?>">
    
    <button type="submit">Accedi</button>

    <?php if (isset($error)): ?>
        <div class="message error"> <?php echo htmlspecialchars($error); ?> </div>
    <?php endif; ?>

</form>

</body>
</html>