<div class="page-heading compact">
    <div>
        <span>Модул 13</span>
        <h1>Admin Panel</h1>
        <p>Управление на потребители, институции, сигнали, AI prompts, CMS, SEO, роли, логове, backup и здраве на системата.</p>
    </div>
</div>

<section class="stat-grid">
    <?php foreach ($overview as $stat): ?>
        <article class="metric-card">
            <span class="metric-icon <?= e($stat['tone']) ?>"><i class="bi <?= e($stat['icon']) ?>"></i></span>
            <div>
                <small><?= e($stat['label']) ?></small>
                <strong><?= e($stat['value']) ?></strong>
                <em><?= e($stat['trend']) ?></em>
            </div>
        </article>
    <?php endforeach; ?>
</section>

<section class="admin-grid">
    <?php
    $cards = [
        ['Потребители', 'Роли, permissions, email verification, Google login hooks', 'bi-people'],
        ['Институции', 'Общини, министерства, портали, срокове, отговорности', 'bi-bank'],
        ['AI prompts', 'Версии, safety правила, OpenAI compatible endpoints', 'bi-robot'],
        ['CMS и SEO', 'Страници, блог, meta, sitemap, OpenGraph', 'bi-window-sidebar'],
        ['Logs и backup', 'Audit log, system health, database snapshots', 'bi-shield-lock'],
        ['Карта и статистики', 'Модерация, heatmap данни, публични показатели', 'bi-map'],
    ];
    ?>
    <?php foreach ($cards as $card): ?>
        <article class="panel module-card">
            <span><i class="bi <?= e($card[2]) ?>"></i></span>
            <h3><?= e($card[0]) ?></h3>
            <p><?= e($card[1]) ?></p>
        </article>
    <?php endforeach; ?>
</section>
