<div class="container-fluid">

<h2 class="fw-bold mb-4">
Global Operations Control Tower
</h2>

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

<?php

$cards = [

'Organizations' =>
$stats['organizations'],

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

'Users' =>
$stats['users'],

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

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

'Published' =>
$stats['published'],

'DOI Coverage' =>
$stats['doi_count'],

'Overdue Reviews' =>
$stats['overdue_reviews']

];

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

?>

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

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

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

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

<h2>
<?= (int)$value ?>
</h2>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

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

<div class="card-header fw-bold">

Top Conferences By Activity

</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>

<tr>
<th>ID</th>
<th>Conference</th>
<th>Submissions</th>
<th>Accepted</th>
</tr>

</thead>

<tbody>

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

<tr>

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

<td>
<?= htmlspecialchars(
$r['short_name']
?: $r['title']
) ?>
</td>

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
