<div class="container-fluid">

<div class="mb-4">
    <h2 class="fw-bold">
        Publication Analytics Warehouse
    </h2>
</div>

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

<div class="col-md-2">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Submissions</div>
<h2><?= (int)$stats['submissions'] ?></h2>
</div>
</div>
</div>

<div class="col-md-2">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Published</div>
<h2><?= (int)$stats['published'] ?></h2>
</div>
</div>
</div>

<div class="col-md-2">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Approved</div>
<h2><?= (int)$stats['approved'] ?></h2>
</div>
</div>
</div>

<div class="col-md-2">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">DOI Coverage</div>
<h2><?= (int)$stats['doi'] ?></h2>
</div>
</div>
</div>

<div class="col-md-2">
<div class="card shadow-sm border-0">
<div class="card-body text-center">
<div class="text-muted">Indexing Ready</div>
<h2><?= (int)$stats['indexing_ready'] ?></h2>
</div>
</div>
</div>

<div class="col-md-2">
<div class="card shadow-sm border-0 bg-success text-white">
<div class="card-body text-center">
<div>Publication Health</div>
<h2><?= (int)$stats['health_score'] ?>%</h2>
</div>
</div>
</div>

</div>

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

<div class="card-header fw-bold">
Issue Analytics
</div>

<div class="table-responsive">

<table class="table table-striped align-middle">

<thead>
<tr>
<th>ID</th>
<th>Volume</th>
<th>Issue</th>
<th>Year</th>
<th>Status</th>
</tr>
</thead>

<tbody>

<?php foreach($issues as $i): ?>

<tr>
<td><?= (int)$i['id'] ?></td>
<td><?= htmlspecialchars($i['volume_no']) ?></td>
<td><?= htmlspecialchars($i['issue_no']) ?></td>
<td><?= htmlspecialchars($i['publication_year']) ?></td>
<td><?= htmlspecialchars($i['status']) ?></td>
</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
