<?php
require_once __DIR__.'/../includes/functions.php';
require_once __DIR__.'/../includes/v292_admin_portal_helpers.php';
$admin=require_admin(); mj292_ensure_schema();
$adminTitle='Smart Exception Center'; $adminSubtitle='System shows only mismatches, missing files, failed activations and safety issues that need review.';
$finance=mj292_finance_checks(true); $activation=mj292_activation_checks(true); $items=array_merge($finance,$activation);
include __DIR__.'/_header.php';
?>
<div class="card mj-v292-card"><div class="card-header d-flex"><h3 class="card-title"><i class="fas fa-exclamation-triangle mr-2"></i>Open Exceptions</h3><span class="badge badge-danger ml-auto"><?=e(count($items))?></span></div><div class="card-body">
<?php if(!$items): ?><div class="text-center text-success p-5"><i class="fas fa-check-circle fa-3x mb-3"></i><h4>No open exception detected</h4><p class="text-muted">Finance, wallet and activation checks look clean.</p></div><?php else: foreach($items as $it): ?>
  <a href="<?=e($it['url'] ?? '#')?>" class="mj-v292-action"><span><b><?=e($it['title'])?></b><br><small><?=e($it['message'])?></small></span><span class="badge badge-<?=($it['severity']??'normal')==='high'?'danger':'warning'?>"><?=e($it['severity']??'normal')?></span></a>
<?php endforeach; endif; ?>
</div></div>
<?php include __DIR__.'/_footer.php'; ?>
