<!-- Edit Token Modal -->
<div class="modal fade" id="editTokenModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <?= form_open_multipart('admin/tokens/edit') ?>
      <!-- CSRF (if you prefer manual) -->
      <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
             value="<?= $this->security->get_csrf_hash(); ?>" />
      <input type="hidden" name="id" id="edit_id">

      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Edit Token</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
        </div>

        <div class="modal-body">
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="edit_name">Name</label>
                <input id="edit_name" name="name" type="text" class="form-control" required>
              </div>
            </div>


            <div class="col-md-6">
              <div class="form-group">
                <label for="edit_phone">Contact Number</label>
                <input id="edit_phone" name="phone" type="text" class="form-control" onkeyup="addDashes(this)"
                       minlength="12" maxlength="12" required>
              </div>
            </div>
          </div>

          <div class="row mt-2">
            <div class="col-md-6">
              <div class="form-group">
                <label for="edit_gender">Gender</label>
                <select id="edit_gender" name="gender" class="form-control" required>
                  <option value="">Select Gender</option>
                  <option value="Male">Male</option>
                  <option value="Female">Female</option>
                  <option value="Other">Other</option>
                </select>
              </div>
            </div>

            <div class="col-md-6">
              <div class="form-group">
                <label>Age</label>
                <div class="input-group">
                  <input id="edit_age" name="age" type="number" class="form-control" min="0" required>
                  <select id="edit_age_unit" name="age_unit" class="form-control" style="max-width:120px;" required>
                    <option value="Years">Years</option>
                    <option value="Months">Months</option>
                    <option value="Days">Days</option>
                  </select>
                </div>
              </div>
            </div>
          </div>

          <!-- Departments / Services / Sub-services -->
        

  

        </div> <!-- modal-body -->

        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
          <button type="submit" class="btn btn-primary">Save changes</button>
        </div>

      </div> <!-- modal-content -->
    <?= form_close(); ?>
  </div>
</div>