<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<div class="page-header"><div><h1><i class="bi bi-person-plus me-2 text-primary"></i>Add User</h1></div></div>
<?= form_open(base_url('settings/users/store')) ?>
<div class="row g-3"><div class="col-lg-6"><div class="fm-form-section"><h6>User Details</h6>
<div class="mb-3"><label class="form-label">Full Name *</label><input type="text" name="name" class="form-control" required></div>
<div class="mb-3"><label class="form-label">Email *</label><input type="email" name="email" class="form-control" required></div>
<div class="mb-3"><label class="form-label">Phone</label><input type="text" name="phone" class="form-control"></div>
<div class="mb-3"><label class="form-label">Role *</label><select name="role_id" class="form-select" required><?php foreach($roles as $r): ?><option value="<?= $r['id'] ?>"><?= esc($r['display_name']) ?></option><?php endforeach; ?></select></div>
<div class="mb-3"><label class="form-label">Password *</label><input type="password" name="password" class="form-control" required></div>
<div class="mb-3"><label class="form-label">Confirm Password *</label><input type="password" name="confirm_password" class="form-control" required></div>
<button type="submit" class="btn btn-fm-primary w-100">Create User</button>
</div></div></div>
<?= form_close() ?>
<?= $this->endSection() ?>
