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

<?= $this->section('content') ?>

<p class="text-muted small mb-4">Choose a new password for your account.</p>

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

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

    <div class="mb-3">
        <label for="password" class="form-label">New Password</label>
        <input type="password" class="form-control" id="password" name="password" minlength="10" required>
        <div class="form-text">At least 10 characters, mixing upper/lowercase, a number and a symbol.</div>
    </div>

    <div class="mb-4">
        <label for="password_confirm" class="form-label">Confirm New Password</label>
        <input type="password" class="form-control" id="password_confirm" name="password_confirm" minlength="10" required>
    </div>

    <button type="submit" class="btn btn-primary w-100">Reset Password</button>
</form>

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