<?php $pageTitle = 'System Health'; ?>
<div class="mb-4"><p class="text-secondary">Server and system information</p></div>
<div class="row g-4">
    <div class="col-md-6"><div class="card-cix">
        <div class="card-cix-header"><h5 class="mb-0"><i class="fas fa-server text-orange me-2"></i> Server</h5></div>
        <p><strong>PHP Version:</strong> <?= e($info['php_version']) ?></p>
        <p><strong>MySQL Version:</strong> <?= e($info['mysql_version']) ?></p>
        <p><strong>Server:</strong> <?= e($info['server_software']) ?></p>
        <p><strong>Memory Limit:</strong> <?= e($info['memory_limit']) ?></p>
        <p><strong>Upload Max:</strong> <?= e($info['upload_max']) ?></p>
        <p><strong>Post Max:</strong> <?= e($info['post_max']) ?></p>
        <p><strong>Max Execution:</strong> <?= e($info['max_execution']) ?>s</p>
        <p><strong>Free Disk:</strong> <?= $info['disk_free'] !== 'N/A' ? number_format($info['disk_free'] / 1024 / 1024 / 1024, 2) . ' GB' : 'N/A' ?></p>
    </div></div>
    <div class="col-md-6"><div class="card-cix">
        <div class="card-cix-header"><h5 class="mb-0"><i class="fas fa-puzzle-piece text-orange me-2"></i> Extensions</h5></div>
        <?php foreach ($info['extensions'] as $ext => $loaded): ?>
        <div class="d-flex justify-content-between align-items-center" style="padding:0.5rem 0;border-bottom:1px solid var(--border);">
            <span><?= e($ext) ?></span>
            <span class="badge-cix <?= $loaded ? 'badge-active' : 'badge-rejected' ?>"><?= $loaded ? 'Loaded' : 'Missing' ?></span>
        </div>
        <?php endforeach; ?>
    </div></div>
</div>
