<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>العضوية الرياضية<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<div class="card">
    <div class="table-responsive">
        <table class="data-table">
            <thead><tr><th>العضو</th><th>الرياضة</th><th>الاتحاد</th><th>سنوات الخدمة</th><th>مؤهل للتحويل</th><th>الحالة</th></tr></thead>
            <tbody>
                <?php foreach ($rows as $r): ?>
                <tr>
                    <td><a href="/members/<?= (int) $r['member_id'] ?>" style="color:#0D7377;font-weight:600;"><?= e($r['member_name']) ?></a></td>
                    <td><?= e($r['sport_name']) ?></td>
                    <td style="font-size:13px;"><?= e($r['federation_name'] ?? '—') ?></td>
                    <td style="text-align:center;font-weight:600;"><?= (int) $r['years_of_service'] ?></td>
                    <td><?= $r['is_conversion_eligible'] ? '<span style="color:#059669;font-weight:600;">✓ نعم</span>' : '<span style="color:#6B7280;">لا</span>' ?></td>
                    <td><span style="color:#059669;font-weight:600;">● نشط</span></td>
                </tr>
                <?php endforeach; ?>
                <?php if (empty($rows)): ?><tr><td colspan="6" style="text-align:center;padding:40px;color:#6B7280;">لا يوجد أعضاء رياضيون</td></tr><?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__template->endSection(); ?>