<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Vaccination summary · {{ $patient->fullName() }}</title>
    <style>
        body { font-family: system-ui, sans-serif; color: #0f172a; margin: 2rem; }
        h1 { font-size: 1.25rem; margin: 0 0 .25rem; }
        h2 { font-size: .95rem; margin: 1.25rem 0 .5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: .25rem; }
        .meta { color: #64748b; font-size: .875rem; }
        dl { display: grid; grid-template-columns: 10rem 1fr; gap: .35rem .75rem; font-size: .875rem; }
        dt { color: #64748b; }
        dd { margin: 0; font-weight: 500; }
        @media print { .no-print { display: none; } }
    </style>
</head>
<body>
    <p class="no-print"><a href="{{ route('care.specialty.workspace', ['module' => 'vaccination', 'visit' => $visit]) }}">Back</a></p>
    <h1>{{ $patient->fullName() }}</h1>
    <p class="meta">{{ $patient->patient_number }} · Visit #{{ $visit->id }} · Stage {{ $visit->specialty_stage ?? '—' }}</p>
    <h2>Eligibility</h2>
    @if ($eligibility)<dl><dt>Vaccine</dt><dd>{{ $eligibility->payload['vaccine'] ?? '—' }}</dd><dt>Cleared</dt><dd>{{ ! empty($eligibility->payload['cleared']) ? 'Yes' : 'No' }}</dd></dl>@else<p class="meta">No eligibility recorded.</p>@endif
    <h2>Consent</h2>
    @if ($consent)<dl><dt>Consent</dt><dd>{{ ! empty($consent->payload['consent_obtained']) ? 'Obtained' : '—' }}</dd><dt>Type</dt><dd>{{ $consent->payload['consent_type'] ?? '—' }}</dd></dl>@else<p class="meta">No consent recorded.</p>@endif
    <h2>Administration</h2>
    @if ($admin)<dl><dt>Vaccine</dt><dd>{{ $admin->payload['vaccine'] ?? '—' }}</dd><dt>Lot</dt><dd>{{ $admin->payload['batch'] ?? '—' }}</dd><dt>Site</dt><dd>{{ $admin->payload['site'] ?? '—' }}</dd></dl>@else<p class="meta">No administration recorded.</p>@endif
    <h2>Observation / AEFI</h2>
    @if ($observation)<dl><dt>AEFI</dt><dd>{{ $observation->payload['aefi'] ?? '—' }}</dd><dt>Outcome</dt><dd>{{ $observation->payload['outcome'] ?? '—' }}</dd></dl>@else<p class="meta">No observation recorded.</p>@endif
    <script>window.print();</script>
</body>
</html>
