<div class="container-fluid">

<h2 class="mb-4">
🏆 Reviewer Recognition Reports
</h2>

<div class="row mb-4">

<div class="col-md-3">
<div class="card p-3 border-success">
<h6>Top Reviewers</h6>
<h2><?= count($topReviewers ?? []) ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-warning">
<h6>Award Winners</h6>
<h2><?= count($awards ?? []) ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-danger">
<h6>Risk Reviewers</h6>
<h2><?= count($riskReviewers ?? []) ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-primary">
<h6>Certificates</h6>
<h2><?= (int)$certificateCount ?></h2>
</div>
</div>

</div>

<div class="card p-3 mb-4">

<h4>Top Reviewers</h4>

<table class="table table-striped">

<tr>
<th>Reviewer</th>
<th>Email</th>
<th>Score</th>
<th>Completion</th>
</tr>

<?php foreach(($topReviewers ?? []) as $r): ?>

<tr>

<td>
<?= htmlspecialchars(
trim(
($r['first_name'] ?? '')
.' '.
($r['last_name'] ?? '')
)
) ?>
</td>

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

<td>
<?= number_format(
(float)$r['final_score'],
2
) ?>
</td>

<td>
<?= number_format(
(float)$r['completion_rate'],
2
) ?>%
</td>

</tr>

<?php endforeach; ?>

</table>

</div>

</div>
