<div class="modal fade" id="editServiceModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" style="display:block;">
    <form method="post" action="<?= base_url('admin/consultants/edit') ?>">
      <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" 
             value="<?= $this->security->get_csrf_hash(); ?>" />
      <input type="hidden" name="id" id="editServiceId">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Edit Service</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
        </div>
        <div class="modal-body">
          <div class="mb-3">
            <label>Department</label>
            <select name="department_id" id="editServiceDepartment" class="form-control" required>
              <option value="">Select Department</option>
              <?php foreach($departments as $d): ?>
                <option value="<?= $d->id ?>"><?= $d->name ?></option>
              <?php endforeach; ?>
            </select>
          </div>
          <div class="mb-3">
            <label>Service Name</label>
            <input type="text" name="name" id="editServiceName" class="form-control" required>
          </div>
          <div class="mb-3">
            <label>Description</label>
            <input type="text" name="description" id="editServiceDescription" class="form-control">
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary">Update</button>
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
        </div>
      </div>
    </form>
  </div>
</div>
