<?php
$title='Author Submission Readiness';
?>

<div class="container-fluid py-4">

<h2 class="mb-4">
<i class="fa-solid fa-file-circle-check"></i>
Author Submission Readiness
</h2>

<div class="row g-3">

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

<div class="col-12">
<div class="alert alert-info">
No submission readiness intelligence available.
</div>
</div>

<?php endif; ?>

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

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

<div class="card shadow-sm h-100">

<div class="card-header">

<?= htmlspecialchars(
$r['submission_no']
?? ('#'.$r['submission_id'])
) ?>

</div>

<div class="card-body">

<h6>
<?= htmlspecialchars(
$r['title']
?? $r['title_en']
?? $r['title_ar']
?? 'Untitled Submission'
) ?>
</h6>

<hr>

<div class="row">

<div class="col-md-6">
<h6>Readiness Score</h6>
<h3><?= htmlspecialchars($r['readiness_score']) ?></h3>
</div>

<div class="col-md-6">
<h6>Readiness Level</h6>
<h5><?= htmlspecialchars($r['readiness_level']) ?></h5>
</div>

</div>

<hr>

<p>
<strong>Metadata Score:</strong>
<?= htmlspecialchars($r['metadata_score']) ?>
</p>

<p>
<strong>File Score:</strong>
<?= htmlspecialchars($r['file_score']) ?>
</p>

<p>
<strong>Review Score:</strong>
<?= htmlspecialchars($r['review_score']) ?>
</p>

<p>
<strong>Risk Level:</strong>
<?= htmlspecialchars($r['risk_level']) ?>
</p>

<p>
<strong>Status:</strong>
<?= htmlspecialchars($r['status'] ?? '-') ?>
</p>

<p>
<strong>Recommendation:</strong>
<?= htmlspecialchars($r['recommendation_text']) ?>
</p>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

</div>
