<?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 style="font-size:13px;max-width:300px;overflow:hidden;text-overflow:ellipsis;"><?= e(mb_substr($r['reason'], 0, 100)) ?></td>
                    <td style="font-size:13px;"><?= e($r['start_date']) ?></td>
                    <td style="font-size:13px;<?= $r['end_date'] <= date('Y-m-d', strtotime('+30 days')) ? 'color:#DC2626;font-weight:600;' : '' ?>"><?= e($r['end_date']) ?></td>
                    <td><?= $r['is_renewable'] ? 'نعم' : 'لا' ?></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(); ?>