<div class="container-fluid">

<h2 class="fw-bold mb-4">
Enterprise Sustainability & Continuous Improvement Center
</h2>

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

<div class="col-md-3">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">User Sustainability</div>
<h2><?= (int)$stats['user_sustainability'] ?>%</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Reviewer Sustainability</div>
<h2><?= (int)$stats['reviewer_sustainability'] ?>%</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Publication Sustainability</div>
<h2><?= (int)$stats['publication_sustainability'] ?>%</h2>
</div>
</div>
</div>

<div class="col-md-3">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Improvement Index</div>
<h2><?= (int)$stats['improvement_index'] ?>%</h2>
</div>
</div>
</div>

</div>

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

<div class="card-header fw-bold">
Continuous Improvement Findings
</div>

<div class="card-body">

<?php foreach($findings as $f): ?>

<div class="alert alert-<?= htmlspecialchars($f['severity']) ?>">

<strong>
<?= htmlspecialchars($f['title']) ?>
</strong>

<br>

<?= htmlspecialchars($f['message']) ?>

</div>

<?php endforeach; ?>

<?php if(empty($findings)): ?>

<div class="alert alert-success">
Sustainability indicators are operating within target levels.
</div>

<?php endif; ?>

</div>

</div>

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

<div class="card-header fw-bold">
Conference Sustainability Matrix
</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>
<tr>
<th>ID</th>
<th>Conference</th>
<th>Submissions</th>
<th>Published</th>
</tr>
</thead>

<tbody>

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

<tr>

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

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

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
