<div class="container-fluid">

<h2 class="fw-bold mb-4">
Executive KPI Command Center
</h2>

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

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

<h6>
Executive Platform Score
</h6>

<h1 class="text-primary">
<?= (int)$stats['executive_score'] ?>%
</h1>

</div>

</div>

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

<?php

$cards = [

'Organizations'
=> $stats['organizations'],

'Conferences'
=> $stats['conferences'],

'Users'
=> $stats['users'],

'Submissions'
=> $stats['submissions'],

'Under Review'
=> $stats['under_review'],

'Accepted'
=> $stats['accepted'],

'Approved Production'
=> $stats['approved_production'],

'Published'
=> $stats['published'],

'DOI Records'
=> $stats['doi_count'],

'Dormant Users'
=> $stats['dormant_users']

];

foreach($cards as $label=>$value):

?>

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

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

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

<div class="text-muted">
<?= htmlspecialchars($label) ?>
</div>

<h3>
<?= (int)$value ?>
</h3>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

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

<div class="card-header fw-bold">
Conference Executive Ranking
</div>

<div class="table-responsive">

<table class="table table-striped">

<thead>

<tr>
<th>ID</th>
<th>Conference</th>
<th>Submissions</th>
<th>Accepted</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['accepted'] ?></td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
