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

<h5 class="fw-semibold mb-4 text-center"><?= lang('Admin.reset_password') ?></h5>

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

<form action="<?= site_url('reset-password') ?>" method="post">
    <?= csrf_field() ?>
    <input type="hidden" name="token" value="<?= esc($token) ?>">

    <div class="mb-3">
        <label class="form-label fw-medium"><?= lang('Admin.new_password') ?></label>
        <input type="password" name="password" class="form-control" placeholder="Min 8 characters" required minlength="8">
    </div>
    <div class="mb-3">
        <label class="form-label fw-medium"><?= lang('Admin.confirm_password') ?></label>
        <input type="password" name="confirm_password" class="form-control" placeholder="Repeat password" required>
    </div>
    <div class="d-grid">
        <button type="submit" class="btn btn-primary"><?= lang('Admin.reset_password') ?></button>
    </div>
</form>

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