<div class="d-flex justify-content-between align-items-center mb-3"><h4 class="mb-0"><i class="fas fa-tags me-2"></i>Sport Categories</h4></div>
<div class="row g-3">
<div class="col-md-5">
    <div class="card"><div class="card-header">Add Category</div><div class="card-body">
    <form method="POST" action="/sports/categories" data-ajax="true"><?=csrf_field()?>
    <div class="mb-2"><label class="form-label">Code</label><input type="text" name="category_code" class="form-control form-control-sm" required><div class="invalid-feedback" data-field="category_code"></div></div>
    <div class="mb-2"><label class="form-label">Name (EN)</label><input type="text" name="name_en" class="form-control form-control-sm" required></div>
    <div class="mb-2"><label class="form-label">Name (AR)</label><input type="text" name="name_ar" class="form-control form-control-sm" dir="rtl" required></div>
    <div class="mb-2"><label class="form-label">Sort Order</label><input type="number" name="sort_order" class="form-control form-control-sm" value="0"></div>
    <button type="submit" class="btn btn-primary btn-sm"><i class="fas fa-save me-1"></i>Save</button>
    </form></div></div>
</div>
<div class="col-md-7">
    <div class="card"><div class="card-body p-0">
    <table class="table table-sm table-hover mb-0"><thead><tr><th>Code</th><th>Name (EN)</th><th>Name (AR)</th><th>Order</th><th>Active</th></tr></thead><tbody>
    <?php foreach($categories as $c):?>
    <tr><td><?=e($c['category_code'])?></td><td><?=e($c['name_en'])?></td><td><?=e($c['name_ar'])?></td><td><?=$c['sort_order']?></td><td><?=$c['is_active']?'<i class="fas fa-check text-success"></i>':'<i class="fas fa-times text-muted"></i>'?></td></tr>
    <?php endforeach;?>
    </tbody></table>
    </div></div>
</div>
</div>