<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>حالات الطلاق<?php $__template->endSection(); ?>
<?php $__template->section('page_actions'); ?>
<div style="padding:8px 16px;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:6px;font-size:13px;color:#0284C7;">
    💡 لتسجيل حالة طلاق، اذهب لصفحة العضو
</div>
<?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><th>الحالة</th><th>الإجراءات</th></tr></thead><tbody>
<?php foreach ($rows as $r): ?>
<tr>
    <td><?= (int) $r['id'] ?></td>
    <td><a href="/members/<?= (int) $r['member_id'] ?>" style="color:#0D7377;font-weight:600;"><?= e($r['member_name']) ?></a></td>
    <td><?= e($r['spouse_name']) ?></td>
    <td style="font-size:13px;"><?= e($r['divorce_date']) ?></td>
    <td style="font-size:13px;"><?= e(\App\Modules\Divorce\Models\DivorceCase::getCaseTypeLabel($r['divorce_case_type'])) ?></td>
    <td style="font-weight:600;"><?= money($r['fee_amount'] ?? '0') ?></td>
    <td><span style="color:<?= $r['status'] === 'completed' ? '#059669' : '#D97706' ?>;font-weight:600;">● <?= $r['status'] === 'completed' ? 'مكتمل' : ($r['status'] === 'submitted' ? 'مقدّم' : $r['status']) ?></span></td>
    <td><a href="/divorce/<?= (int) $r['id'] ?>" class="btn btn-sm btn-outline">عرض</a></td>
</tr>
<?php endforeach; ?>
<?php if (empty($rows)): ?><tr><td colspan="8" style="text-align:center;padding:40px;color:#6B7280;">لا توجد حالات طلاق</td></tr><?php endif; ?>
</tbody></table></div></div>
<?php $__template->endSection(); ?>