<?php
$title='Author Success Intelligence';
?>

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

<h2 class="mb-4">
<i class="fa-solid fa-chart-line"></i>
Author Success Intelligence
</h2>

<div class="row g-3">

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

<div class="col-12">
<div class="alert alert-info">
No author intelligence data is available yet.
</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">
Conference #<?= (int)($r['conference_id'] ?? 0) ?>
</div>

<div class="card-body">

<div class="row g-3">

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

<div class="col-md-6">
<h6>Acceptance Probability</h6>
<h3><?= htmlspecialchars($r['acceptance_probability'] ?? '0') ?>%</h3>
</div>

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

<div class="col-md-6">
<h6>Revision Risk</h6>
<div class="fw-bold">
<?= htmlspecialchars($r['revision_risk'] ?? '-') ?>
</div>
</div>

</div>

<hr>

<p>
<strong>Submissions:</strong>
<?= (int)($r['submission_count'] ?? 0) ?>
</p>

<p>
<strong>Accepted:</strong>
<?= (int)($r['accepted_count'] ?? 0) ?>
</p>

<p>
<strong>Under Review:</strong>
<?= (int)($r['under_review_count'] ?? 0) ?>
</p>

<p>
<strong>Revision Required:</strong>
<?= (int)($r['revision_count'] ?? 0) ?>
</p>

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

</div>

</div>

</div>

<?php endforeach; ?>

</div>

</div>
