<div class="container-fluid">

<h2 class="fw-bold mb-4">
Platform Performance & Capacity Intelligence Center
</h2>

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

<?php

$cards = [

'Conferences'
=> $stats['conferences'],

'Tracks'
=> $stats['tracks'],

'Submissions'
=> $stats['submissions'],

'Review Assignments'
=> $stats['review_assignments'],

'Reviewers'
=> $stats['reviewers'],

'Avg Reviews / Reviewer'
=> $stats['avg_reviews_per_reviewer']

];

foreach($cards as $label=>$value):

?>

<div class="col-md-2">

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

<div class="card-body text-center">

<div class="text-muted">
<?= htmlspecialchars($label) ?>
</div>

<h3>
<?= htmlspecialchars((string)$value) ?>
</h3>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

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

<div class="card-body text-center">

<h6>
Platform Capacity Score
</h6>

<h1 class="text-primary">
<?= (int)$stats['capacity_score'] ?>%
</h1>

</div>

</div>

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

<div class="card-header fw-bold">
Conference Capacity Overview
</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>

<tr>
<th>ID</th>
<th>Conference</th>
<th>Tracks</th>
<th>Submissions</th>
<th>Reviews</th>
</tr>

</thead>

<tbody>

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

<tr>

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

<td>
<?= htmlspecialchars(
$r['conference_title']
) ?>
</td>

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

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
