<?php 
session_start();
if (isset($_SESSION['driver_id'])) {
    header('Location: /driver/index.php');
    exit;
}
include 'header.php'; 
?>

<main>
    <div class="auth-container">
        <h1>Driver Login</h1>
        <?php if (isset($_GET['error'])): ?>
            <p class="error-message"><?php echo htmlspecialchars($_GET['error']); ?></p>
        <?php endif; ?>
        <form action="login_process.php" method="POST">
            <div class="form-group">
                <label for="email">Email</label>
                <input type="email" id="email" name="email" required>
            </div>
            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" required>
            </div>
            <button type="submit" class="btn-submit">Login</button>
        </form>
    </div>
</main>

<?php include 'footer.php'; ?>
