<div class="row justify-content-center">
    <div class="col-md-6 col-lg-5">
        <div class="card shadow-sm">
            <div class="card-header bg-white">
                <h5 class="mb-0"><i class="bi bi-key"></i> Réinitialiser le mot de passe</h5>
            </div>
            <div class="card-body">
                <div class="alert alert-info">
                    <i class="bi bi-info-circle"></i>
                    Utilisateur : <strong><?= htmlspecialchars($user->full_name); ?></strong>
                    (<code><?= htmlspecialchars($user->username); ?></code>)
                </div>

                <?= form_open('users/reset_password/' . $user->id); ?>

                    <div class="mb-3">
                        <label class="form-label">Nouveau mot de passe</label>
                        <input type="password" name="new_password" class="form-control" 
                               minlength="8" required>
                    </div>

                    <div class="mb-3">
                        <label class="form-label">Confirmer</label>
                        <input type="password" name="confirm_password" class="form-control" required>
                    </div>

                    <div class="d-flex gap-2">
                        <button type="submit" class="btn btn-warning">
                            <i class="bi bi-check-lg"></i> Réinitialiser
                        </button>
                        <a href="<?= site_url('users'); ?>" class="btn btn-outline-secondary">Annuler</a>
                    </div>

                <?= form_close(); ?>
            </div>
        </div>
    </div>
</div>
