<?php
$title = 'Workflow KPI Center';
?>

<div class="container-fluid py-4">

<div class="card border-0 shadow-lg rounded-4">

<div class="card-body">

<h2 class="fw-bold">

<i class="fa fa-chart-line text-primary"></i>

Homepage Workflow KPI Center

</h2>

<hr>

<div class="row g-4">

<?php foreach($kpis as $kpi): ?>

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

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

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

<div class="text-muted small">

<?= htmlspecialchars($kpi['label']) ?>

</div>

<div class="fs-1 fw-bold">

<?= htmlspecialchars($kpi['value']) ?>

</div>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<?php if(!empty($bottlenecks)): ?>

<hr>

<h4 class="fw-bold">

Workflow Bottlenecks

</h4>

<table class="table table-bordered">

<thead>

<tr>
<th>Conference</th>
<th>Status</th>
<th>Last Activity</th>
</tr>

</thead>

<tbody>

<?php foreach($bottlenecks as $b): ?>

<tr>

<td>
<?= htmlspecialchars($b['conference_name']) ?>
</td>

<td>
<?= htmlspecialchars($b['status']) ?>
</td>

<td>
<?= htmlspecialchars($b['created_at']) ?>
</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

<?php endif; ?>

</div>

</div>

</div>
