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

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

<div class="col-md-3">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<h6>Governed Tracks</h6>
<h2>
<?= (int)$coverage['governed_tracks'] ?>
/
<?= (int)$coverage['total_tracks'] ?>
</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<h6>Orphan Tracks</h6>
<h2 class="text-danger">
<?= count($orphanTracks) ?>
</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<h6>Duplicate Tracks</h6>
<h2 class="text-warning">
<?= count($duplicateTracks) ?>
</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<h6>Health Score</h6>
<h2 class="text-success">
<?= $healthScore ?>
%
</h2>
</div>
</div>
</div>

</div>

<div class="row">

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

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

<h4>Decision Pipeline</h4>

<table class="table table-bordered">

<tr>
<th>Status</th>
<th>Total</th>
</tr>

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

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

<?php endforeach; ?>

</table>

</div>
</div>

</div>

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

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

<h4>Duplicate Ownership</h4>

<table class="table table-bordered">

<tr>
<th>Track</th>
<th>Chairs</th>
</tr>

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

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

<?php endforeach; ?>

</table>

</div>
</div>

</div>

</div>

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

<div class="card-body">

<h4>Governance Risk Queue</h4>

<table class="table table-bordered">

<tr>
<th>Track</th>
<th>Submissions</th>
<th>Reviews</th>
</tr>

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

<tr>
<td><?= htmlspecialchars($r['track_name']) ?></td>
<td><?= (int)$r['submissions'] ?></td>
<td><?= (int)$r['reviews'] ?></td>
</tr>

<?php endforeach; ?>

</table>

</div>

</div>

</div>
