<div class="mx-auto max-w-4xl"><div class="mb-6"><h2 class="font-display text-2xl font-extrabold">Profile & Settings</h2><p class="mt-2 text-sm text-slate-500">Keep your contact and essential care information current.</p></div><?php if($errors=session()->getFlashdata('errors')): ?><div class="mb-5 rounded-xl bg-rose-50 p-4 text-sm text-rose-700"><?php foreach($errors as $e): ?><div><?= esc($e) ?></div><?php endforeach; ?></div><?php endif; ?><form action="/patient/profile" method="post" class="rounded-2xl border border-slate-100 bg-white p-6 shadow-card"><?= csrf_field() ?><div class="grid gap-5 sm:grid-cols-2"><div class="sm:col-span-2"><label class="mb-1.5 block text-xs font-bold text-slate-500">Full name</label><input name="full_name" value="<?= esc(old('full_name',$user['full_name'] ?? '')) ?>" required class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Email</label><input value="<?= esc($user['email'] ?? '') ?>" disabled class="w-full rounded-xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-400"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Phone</label><input name="phone" value="<?= esc(old('phone',$user['phone'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Date of birth</label><input name="date_of_birth" type="date" value="<?= esc(old('date_of_birth',$profile['date_of_birth'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Gender</label><input name="gender" value="<?= esc(old('gender',$profile['gender'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Blood group</label><input name="blood_group" value="<?= esc(old('blood_group',$profile['blood_group'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Preferred language</label><input name="preferred_language" value="<?= esc(old('preferred_language',$profile['preferred_language'] ?? 'English')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Emergency contact</label><input name="emergency_contact_name" value="<?= esc(old('emergency_contact_name',$profile['emergency_contact_name'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div><div><label class="mb-1.5 block text-xs font-bold text-slate-500">Emergency contact phone</label><input name="emergency_contact_phone" value="<?= esc(old('emergency_contact_phone',$profile['emergency_contact_phone'] ?? '')) ?>" class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm"></div></div><div class="mt-6 flex justify-end"><button class="rounded-xl bg-teal-600 px-6 py-3 text-sm font-extrabold text-white">Save changes</button></div></form></div>
