<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>عضو مؤقت: <?= e($temp->full_name_ar) ?><?php $__template->endSection(); ?>
<?php $__template->section('page_actions'); ?>
<a href="/members/<?= (int) $member['id'] ?>" class="btn btn-outline">← العودة للعضو</a>
<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:20px;">
    <div class="card" style="padding:20px;">
        <h4 style="color:#1e3a5f;margin-bottom:15px;">البيانات الشخصية</h4>
        <table style="width:100%;font-size:14px;">
            <tr><td style="padding:6px 0;color:#6B7280;width:40%;">الاسم</td><td style="font-weight:600;"><?= e($temp->full_name_ar) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الفئة</td><td><?= e($temp->getCategoryLabel()) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الرقم القومي</td><td style="direction:ltr;text-align:right;"><?= e($temp->national_id ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">تاريخ الميلاد</td><td><?= e($temp->date_of_birth) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">السن</td><td><?= (int) $temp->age_years ?> سنة</td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">النوع</td><td><?= $temp->gender === 'male' ? 'ذكر' : 'أنثى' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">صلة القرابة</td><td><?= e($temp->relationship_to_member ?: '—') ?></td></tr>
        </table>
    </div>
    <div class="card" style="padding:20px;">
        <h4 style="color:#1e3a5f;margin-bottom:15px;">بيانات العضوية</h4>
        <table style="width:100%;font-size:14px;">
            <tr><td style="padding:6px 0;color:#6B7280;width:40%;">الحالة</td><td style="color:<?= $temp->status === 'active' ? '#059669' : '#DC2626' ?>;font-weight:600;">● <?= e($temp->getStatusLabel()) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">رسوم الإضافة</td><td style="font-weight:700;color:#1e3a5f;"><?= money($temp->addition_fee) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">رقم الإيصال</td><td><?= e($temp->fee_receipt_number ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">بطولات جمهورية</td><td><?= $temp->has_championship ? '<span style="color:#059669;">نعم (معفي)</span>' : 'لا' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">وثائق إعاقة</td><td><?= $temp->disability_documentation ? 'نعم' : 'لا' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">يحق له الفصل</td><td><?= $temp->can_separate ? 'نعم' : '<span style="color:#DC2626;">لا</span>' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">يحق له الاستقلال</td><td><?= $temp->can_get_independent ? 'نعم' : '<span style="color:#DC2626;">لا</span>' ?></td></tr>
        </table>
        <?php if ($temp->notes): ?>
        <div style="margin-top:15px;"><h4 style="color:#6B7280;font-size:13px;">ملاحظات</h4><p style="font-size:14px;"><?= nl2br(e($temp->notes)) ?></p></div>
        <?php endif; ?>
    </div>
</div>
<?php $__template->endSection(); ?>