<?php $pageTitle = 'Create Enrollment'; ?>
<div class="mb-3"><a href="<?= base_url('admin/enrollments') ?>" class="text-secondary"><i class="fas fa-arrow-left me-1"></i> Back to Enrollments</a></div>
<div class="card-cix" style="max-width:700px;">
    <div class="card-cix-header"><h5 class="mb-0"><i class="fas fa-user-plus text-orange me-2"></i> Manual Enrollment</h5></div>
    <form method="POST" action="<?= base_url('admin/enrollment-create') ?>">
        <?= csrf_field() ?>
        <div class="form-group-cix"><label class="form-label-cix">Student *</label><select name="student_id" class="form-control-cix" required><option value="">Select student...</option><?php foreach ($students as $s): ?><option value="<?= $s['id'] ?>"><?= e($s['student_number'] . ' - ' . $s['first_name'] . ' ' . $s['last_name']) ?></option><?php endforeach; ?></select></div>
        <div class="form-group-cix"><label class="form-label-cix">Course *</label><select name="course_id" class="form-control-cix" required><option value="">Select course...</option><?php foreach ($courses as $c): ?><option value="<?= $c['id'] ?>"><?= e($c['title']) ?></option><?php endforeach; ?></select></div>
        <div class="form-group-cix"><label class="form-label-cix">Package</label><select name="package_id" class="form-control-cix"><option value="">None</option><?php foreach ($packages as $p): ?><option value="<?= $p['id'] ?>"><?= e($p['name']) ?></option><?php endforeach; ?></select></div>
        <button type="submit" class="btn-cix btn-cix-accent mt-2"><i class="fas fa-save"></i> Create Enrollment</button>
    </form>
</div>
