<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Login — Mount Kenya Treks</title>
    <link rel="stylesheet" href="<?= base_url('css/uno.css') ?>">
</head>
<body class="font-sans bg-light flex items-center justify-center min-h-screen p-4">
    <div class="bg-white w-full max-w-sm rounded-xl shadow-lg p-8">
        <h2 class="text-2xl font-bold text-primary text-center mb-6">Mount Kenya Admin</h2>

        <?php if (session()->has('error')): ?>
            <div class="bg-red-50 text-red-700 px-4 py-3 rounded-lg mb-6">
                <?= esc(session('error')) ?>
            </div>
        <?php endif; ?>

        <?php if (session()->has('info')): ?>
            <div class="bg-green-50 text-green-700 px-4 py-3 rounded-lg mb-6">
                <?= esc(session('info')) ?>
            </div>
        <?php endif; ?>

        <form method="post" action="">
            <?= csrf_field() ?>
            <div class="mb-5">
                <label for="email" class="block text-sm font-semibold text-navy mb-2">Email</label>
                <input 
                    type="email" 
                    id="email" 
                    name="email" 
                    required 
                    autofocus
                    class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
                >
            </div>
            <div class="mb-6">
                <label for="password" class="block text-sm font-semibold text-navy mb-2">Password</label>
                <input 
                    type="password" 
                    id="password" 
                    name="password" 
                    required
                    class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
                >
            </div>
            <button 
                type="submit" 
                class="w-full bg-primary text-white font-semibold py-2.5 rounded-lg hover:bg-primary-dark transition"
            >
                Log In
            </button>
        </form>
    </div>
</body>
</html>