<div class="row justify-content-center"><div class="col-lg-8"><div class="card"><div class="card-header"><h5 class="mb-0">Edit Coach</h5></div><div class="card-body">
<form method="POST" action="/sports/coaches/<?=$coach['id']?>" data-ajax="true" enctype="multipart/form-data"><?=csrf_field()?>
<div class="row g-3">
<div class="col-md-6"><label class="form-label">First Name (EN)</label><input type="text" name="first_name_en" class="form-control" value="<?=e($coach['first_name_en'])?>" required></div>
<div class="col-md-6"><label class="form-label">Last Name (EN)</label><input type="text" name="last_name_en" class="form-control" value="<?=e($coach['last_name_en'])?>" required></div>
<div class="col-md-6"><label class="form-label">First Name (AR)</label><input type="text" name="first_name_ar" class="form-control" dir="rtl" value="<?=e($coach['first_name_ar']??'')?>"></div>
<div class="col-md-6"><label class="form-label">Last Name (AR)</label><input type="text" name="last_name_ar" class="form-control" dir="rtl" value="<?=e($coach['last_name_ar']??'')?>"></div>
<div class="col-md-4"><label class="form-label">Phone</label><input type="text" name="phone" class="form-control" value="<?=e($coach['phone']??'')?>"></div>
<div class="col-md-4"><label class="form-label">Email</label><input type="email" name="email" class="form-control" value="<?=e($coach['email']??'')?>"></div>
<div class="col-md-2"><label class="form-label">Exp (yr)</label><input type="number" name="experience_years" class="form-control" value="<?=$coach['experience_years']?>"></div>
<div class="col-md-2"><label class="form-label">Rate/hr</label><input type="number" name="hourly_rate" class="form-control" step="0.01" value="<?=$coach['hourly_rate']?>"></div>
<div class="col-md-4"><label class="form-label">Status</label><select name="status" class="form-select"><?php foreach(['active','inactive','on_leave','terminated'] as $st):?><option value="<?=$st?>" <?=selected($st,$coach['status'])?>><?=ucfirst(str_replace('_',' ',$st))?></option><?php endforeach;?></select></div>
<div class="col-md-4"><label class="form-label">Photo</label><input type="file" name="photo" class="form-control" accept="image/*"></div>
</div><div class="mt-4 d-flex gap-2"><button type="submit" class="btn btn-primary"><i class="fas fa-save me-1"></i>Save</button><a href="/sports/coaches/<?=$coach['id']?>" class="btn btn-secondary">Cancel</a></div>
</form></div></div></div></div>