<div class="container-fluid">

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

<div class="card-body">

<h2 class="fw-bold">
Publication Analytics
</h2>

<div class="text-muted">
Publishing KPIs, DOI coverage, issue statistics and workflow analytics.
</div>

</div>

</div>

<div class="row mb-4">

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

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

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

<h2 class="text-primary">
<?= $funnel['accepted'] ?>
</h2>

<div>
Accepted
</div>

</div>

</div>

</div>

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

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

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

<h2 class="text-warning">
<?= $funnel['camera_ready'] ?>
</h2>

<div>
Camera Ready
</div>

</div>

</div>

</div>

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

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

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

<h2 class="text-secondary">
<?= $funnel['production'] ?>
</h2>

<div>
Production
</div>

</div>

</div>

</div>

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

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

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

<h2 class="text-success">
<?= $funnel['assigned_to_issue'] ?>
</h2>

<div>
Assigned To Issue
</div>

</div>

</div>

</div>

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

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

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

<h2 class="text-dark">
<?= $funnel['published'] ?>
</h2>

<div>
Published
</div>

</div>

</div>

</div>

</div>

<div class="row mb-4">

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

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

<div class="card-header bg-primary text-white">

DOI Coverage

</div>

<div class="card-body">

<h3>
<?= $doiCount ?>
 /
 <?= $totalSubmissions ?>
</h3>

<div class="text-muted">
Submissions with DOI
</div>

</div>

</div>

</div>

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

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

<div class="card-header bg-danger text-white">

Integrity Alerts

</div>

<div class="card-body">

<h3>
<?= $missingGalleys ?>
</h3>

<div class="text-muted">
Missing Galley References
</div>

</div>

</div>

</div>

</div>

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

<div class="card-header bg-success text-white">

Issue Statistics

</div>

<div class="card-body">

<table class="table table-bordered table-hover">

<thead>

<tr>

<th>ID</th>
<th>Volume</th>
<th>Issue</th>
<th>Articles</th>

</tr>

</thead>

<tbody>

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

<tr>

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

<td>
<?= htmlspecialchars($i['volume_no']) ?>
</td>

<td>
<?= htmlspecialchars($i['issue_no']) ?>
</td>

<td>
<?= (int)$i['article_count'] ?>
</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
