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

<h5 class="fw-semibold mb-1 text-center"><?= lang('Admin.forgot_password') ?></h5>
<p class="text-muted text-center small mb-4">Enter your email to receive a reset link.</p>

<?php if (session()->getFlashdata('success')): ?>
<div class="alert alert-success"><?= esc(session()->getFlashdata('success')) ?></div>
<?php endif; ?>

<form action="<?= site_url('forgot-password') ?>" method="post">
    <?= csrf_field() ?>
    <div class="mb-3">
        <label class="form-label fw-medium"><?= lang('Admin.email') ?></label>
        <div class="input-group">
            <span class="input-group-text"><i class="bi bi-envelope"></i></span>
            <input type="email" name="email" class="form-control" placeholder="admin@example.com" required>
        </div>
    </div>
    <div class="d-grid">
        <button type="submit" class="btn btn-primary"><?= lang('Admin.send_reset_link') ?></button>
    </div>
    <div class="text-center mt-3">
        <a href="<?= site_url('login') ?>" class="text-muted small">← Back to Login</a>
    </div>
</form>

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