<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>

<div class="container">
    <div class="card auth-card shadow-sm">
        <div class="card-body p-4">
            <h4 class="mb-3 text-center">Log In</h4>
            <form method="post" action="<?= base_url('login') ?>">
                <?= csrf_field() ?>
                <div class="mb-3">
                    <label class="form-label">Email</label>
                    <input type="email" name="email" class="form-control" value="<?= old('email') ?>" required autofocus>
                </div>
                <div class="mb-3">
                    <label class="form-label">Password</label>
                    <input type="password" name="password" class="form-control" required>
                </div>
                <button type="submit" class="btn btn-primary w-100">Log In</button>
            </form>
            <p class="text-center mt-3 mb-0">
                <a href="<?= base_url('forgot-password') ?>">Forgot password?</a>
            </p>
            <hr>
            <p class="text-center mb-0">Don't have an account? <a href="<?= base_url('register') ?>">Sign up</a></p>
        </div>
    </div>
</div>

<?= $this->endSection() ?>
