<?php $pageTitle = 'Certificates'; ?>
<div class="mb-4"><p class="text-secondary">Issued certificates</p></div>
<div class="card-cix">
    <div class="table-responsive">
        <table class="table-cix"><thead><tr><th>Certificate #</th><th>Student</th><th>Student #</th><th>Course</th><th>Issue Date</th><th>Status</th></tr></thead>
        <tbody><?php if (empty($certificates)): ?><tr><td colspan="6" class="text-center text-secondary p-4">No certificates issued</td></tr>
        <?php else: foreach ($certificates as $c): ?>
        <tr><td style="color:var(--secondary);font-weight:600"><?= e($c['certificate_number']) ?></td><td><?= e($c['first_name'] . ' ' . $c['last_name']) ?></td>
        <td class="text-secondary"><?= e($c['student_number']) ?></td><td><?= e($c['course_title']) ?></td>
        <td class="text-secondary small"><?= e($c['issue_date']) ?></td>
        <td><span class="badge-cix badge-issued"><?= ucfirst($c['status']) ?></span></td></tr>
        <?php endforeach; endif; ?></tbody></table>
    </div>
</div>
