<div class="container-fluid">

<h2 class="mb-4">
📈 Reviewer Capacity Forecast
</h2>

<div class="row mb-4">

<div class="col-md-3">
<div class="card p-3 border-success">
<h6>Healthy</h6>
<h2><?= (int)$healthy ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-warning">
<h6>Busy</h6>
<h2><?= (int)$busy ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-danger">
<h6>High Load</h6>
<h2><?= (int)$high ?></h2>
</div>
</div>

<div class="col-md-3">
<div class="card p-3 border-dark">
<h6>Overloaded</h6>
<h2><?= (int)$overloaded ?></h2>
</div>
</div>

</div>

<div class="card p-3">

<h4>Reviewer Forecast Table</h4>

<table class="table table-striped">

<thead>
<tr>
<th>Reviewer</th>
<th>Current</th>
<th>7 Days</th>
<th>14 Days</th>
<th>Status</th>
<th>Score</th>
</tr>
</thead>

<tbody>

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

<tr>

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

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

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

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

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>
