<div class="auth-content">
    <h1 class="auth-title"><?= t('forgot_password_title') ?></h1>
    <p class="auth-subtitle"><?= t('forgot_password_subtitle') ?></p>

    <?php if ($success): ?>
    <div class="alert alert-success"><?= t('forgot_password_sent') ?></div>
    <p class="auth-footer-link"><a href="<?= url('login') ?>"><?= t('back_to_login') ?></a></p>
    <?php else: ?>

    <?php foreach ($errors as $e): ?>
    <div class="alert alert-error"><?= Helper::e($e) ?></div>
    <?php endforeach; ?>

    <form method="POST" action="<?= url('forgot-password') ?>" class="auth-form">
        <?= Helper::csrf() ?>
        <div class="form-group">
            <label for="email" class="form-label"><?= t('email') ?></label>
            <input type="email" id="email" name="email" class="form-input" required autofocus
                   value="<?= Helper::e(Helper::post('email')) ?>" autocomplete="email">
        </div>
        <button type="submit" class="btn btn-primary btn-block"><?= t('forgot_password_btn') ?></button>
    </form>
    <p class="auth-footer-link"><a href="<?= url('login') ?>"><?= t('back_to_login') ?></a></p>

    <?php endif; ?>
</div>
