<div class="container-fluid">

<h2 class="fw-bold mb-4">
Enterprise Autonomous Operations Control Center
</h2>

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

<div class="col-md-4">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<div class="text-muted">Automation Readiness</div>
<h1><?= (int)$stats['automation_readiness'] ?>%</h1>
</div>
</div>
</div>

<div class="col-md-4">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<div class="text-muted">Overdue Reviews</div>
<h1><?= (int)$stats['overdue_reviews'] ?></h1>
</div>
</div>
</div>

<div class="col-md-4">
<div class="card border-0 shadow-sm">
<div class="card-body text-center">
<div class="text-muted">Production Queue</div>
<h1><?= (int)$stats['camera_ready_queue'] ?></h1>
</div>
</div>
</div>

</div>

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

<div class="card-header fw-bold">
Operational 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">
No operational anomalies detected.
</div>

<?php endif; ?>

</div>

</div>

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

<div class="card-header fw-bold">
Autonomous Recommendations
</div>

<div class="card-body">

<ul>

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

<li><?= htmlspecialchars($r) ?></li>

<?php endforeach; ?>

</ul>

</div>

</div>

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

<div class="card-header fw-bold">
Operational Risk Matrix
</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>
<tr>
<th>ID</th>
<th>Submission</th>
<th>Status</th>
<th>Production</th>
</tr>
</thead>

<tbody>

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

<tr>

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

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

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

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

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
