<div class="container-fluid">

<div class="mb-4">
    <h2 class="fw-bold">
        Track Chair Intelligence Center
    </h2>
</div>

<div class="row g-3 mb-4">

<div class="col-md-4">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Tracks</div>
<h2><?= (int)$stats['tracks'] ?></h2>
</div>
</div>
</div>

<div class="col-md-4">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Track Chairs</div>
<h2><?= (int)$stats['track_chairs'] ?></h2>
</div>
</div>
</div>

<div class="col-md-4">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Assignments</div>
<h2><?= (int)$stats['assigned_tracks'] ?></h2>
</div>
</div>
</div>

</div>

<div class="card border-0 shadow-sm">

<div class="card-header fw-bold">
Track Analytics
</div>

<div class="table-responsive">

<table class="table table-striped align-middle">

<thead>
<tr>
<th>ID</th>
<th>Track</th>
<th>Submissions</th>
<th>Reviews</th>
<th>Accepted</th>
<th>Track Chairs</th>
</tr>
</thead>

<tbody>

<?php foreach($rows as $r): ?>

<tr>

<td>
<?= (int)$r['id'] ?>
</td>

<td>
<?= htmlspecialchars(
    $r['name_en']
    ?: $r['name_ar']
) ?>
</td>

<td>
<?= (int)$r['submissions'] ?>
</td>

<td>
<?= (int)$r['reviews'] ?>
</td>

<td>
<?= (int)$r['accepted_papers'] ?>
</td>

<td>
<?= (int)$r['track_chairs'] ?>
</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
