<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>بيانات الزوج: <?= e($spouse->full_name_ar) ?><?php $__template->endSection(); ?>
<?php $__template->section('page_actions'); ?>
<a href="/members/<?= (int) $member['id'] ?>/spouses/<?= (int) $spouse->id ?>/edit" class="btn btn-outline">تعديل</a>
<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:#0D7377;margin-bottom:15px;">البيانات الشخصية</h4>
        <table style="width:100%;font-size:14px;">
            <tr><td style="padding:6px 0;color:#6B7280;width:40%;">الاسم</td><td style="padding:6px 0;font-weight:600;"><?= e($spouse->full_name_ar) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الرقم القومي</td><td style="padding:6px 0;direction:ltr;text-align:right;"><?= e($spouse->national_id ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">تاريخ الميلاد</td><td style="padding:6px 0;"><?= e($spouse->date_of_birth) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">السن</td><td style="padding:6px 0;"><?= (int) $spouse->age_years ?> سنة <?= $spouse->age_months ? 'و ' . (int) $spouse->age_months . ' شهر' : '' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">النوع</td><td style="padding:6px 0;"><?= $spouse->gender === 'male' ? 'ذكر' : 'أنثى' ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الجنسية</td><td style="padding:6px 0;"><?= e($spouse->nationality ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">المؤهل</td><td style="padding:6px 0;"><?= e($spouse->getQualificationName()) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">تاريخ الزواج</td><td style="padding:6px 0;"><?= e($spouse->marriage_date) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">تاريخ الالتحاق</td><td style="padding:6px 0;"><?= e($spouse->join_date) ?></td></tr>
        </table>
    </div>
    <div class="card" style="padding:20px;">
        <h4 style="color:#0D7377;margin-bottom:15px;">بيانات العضوية</h4>
        <table style="width:100%;font-size:14px;">
            <tr><td style="padding:6px 0;color:#6B7280;width:40%;">الترتيب</td><td style="padding:6px 0;font-weight:600;">#<?= (int) $spouse->spouse_order ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">التصنيف</td><td style="padding:6px 0;"><?= e($spouse->getClassificationLabel()) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الحالة</td><td style="padding:6px 0;color:<?= $spouse->status === 'active' ? '#059669' : '#DC2626' ?>;font-weight:600;"><?= e($spouse->getStatusLabel()) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">رسوم الإضافة</td><td style="padding:6px 0;font-weight:700;color:#0D7377;"><?= money($spouse->addition_fee) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">رقم الإيصال</td><td style="padding:6px 0;"><?= e($spouse->fee_receipt_number ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الوظيفة</td><td style="padding:6px 0;"><?= e($spouse->occupation ?: '—') ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">المحمول</td><td style="padding:6px 0;direction:ltr;text-align:right;"><?= e($spouse->mobile ?: '—') ?></td></tr>
        </table>
    </div>
</div>
<?php $__template->endSection(); ?>