<?php
/** @var \App\Modules\Members\Models\Member $member */
$hasPhoto = !empty($member->photo_path);
?>
<div style="display:flex;justify-content:space-between;align-items:center;gap:15px;">
    <div style="display:flex;align-items:center;gap:15px;">
        <div style="width:70px;height:70px;border-radius:50%;overflow:hidden;border:3px solid <?= $hasPhoto ? '#0D7377' : '#DC2626' ?>;flex-shrink:0;background:#F3F4F6;display:flex;align-items:center;justify-content:center;">
            <?php if ($hasPhoto): ?>
                <img src="/<?= e($member->photo_path) ?>" alt="صورة العضو" style="width:100%;height:100%;object-fit:cover;">
            <?php else: ?>
                <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#9CA3AF" stroke-width="1.5"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
            <?php endif; ?>
        </div>
        <div>
            <h2 style="margin:0;"><?= e($member->full_name_ar) ?></h2>
            <div style="color:#6B7280;margin-top:4px;">رقم العضوية: <strong><?= e($member->membership_number ?: 'لم يُحدد') ?></strong></div>
            <?php if (!$hasPhoto): ?>
                <div style="margin-top:6px;">
                    <span style="background:#FEF2F2;color:#DC2626;padding:3px 10px;border-radius:4px;font-size:11px;font-weight:600;">⚠ لا توجد صورة — مطلوبة لإصدار الكارنيه</span>
                </div>
            <?php endif; ?>
        </div>
    </div>
    <span style="padding:6px 16px;border-radius:20px;font-weight:700;color:#fff;background:<?= $member->getStatusColor() ?>;"><?= e($member->getStatusLabel()) ?></span>
</div>
