<div class="container-fluid">

<h2 class="fw-bold mb-4">
Platform Growth & Trend Analytics Center
</h2>

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

<?php

$cards = [

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

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

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

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

];

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="row">

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

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

<div class="card-header fw-bold">
Monthly Submission Trend
</div>

<table class="table table-striped mb-0">

<thead>
<tr>
<th>Period</th>
<th>Total</th>
</tr>
</thead>

<tbody>

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

<tr>
<td><?= htmlspecialchars($r['period']) ?></td>
<td><?= (int)$r['total'] ?></td>
</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

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

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

<div class="card-header fw-bold">
Monthly Review Trend
</div>

<table class="table table-striped mb-0">

<thead>
<tr>
<th>Period</th>
<th>Total</th>
</tr>
</thead>

<tbody>

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

<tr>
<td><?= htmlspecialchars($r['period']) ?></td>
<td><?= (int)$r['total'] ?></td>
</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>

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

<div class="card-header fw-bold">
Conference Activity Ranking
</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>

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

</thead>

<tbody>

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

<tr>

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

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

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
