<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= $title ?></title>
    <link rel="stylesheet" href="/css/admin.css">
</head>
<body class="admin-page">
    <div class="admin-header">
        <h1>Framework Admin Dashboard</h1>
    </div>

    <div class="admin-nav">
        <a href="/admin" class="active">Dashboard</a>
        <a href="/admin/routes">Routen</a>
        <a href="/admin/services">Dienste</a>
        <a href="/admin/environment">Umgebung</a>
        <a href="/admin/performance">Performance</a>
        <a href="/admin/redis">Redis</a>
        <a href="/admin/phpinfo">PHP Info</a>
    </div>

    <div class="admin-content">
        <div class="dashboard-stats">
            <div class="stat-box">
                <h3>Framework Version</h3>
                <div class="stat-value"><?= $stats['frameworkVersion'] ?></div>
            </div>

            <div class="stat-box">
                <h3>PHP Version</h3>
                <div class="stat-value"><?= $stats['phpVersion'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Speicherverbrauch</h3>
                <div class="stat-value"><?= $stats['memoryUsage'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Max. Speicherverbrauch</h3>
                <div class="stat-value"><?= $stats['peakMemoryUsage'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Server</h3>
                <div class="stat-value"><?= $stats['serverInfo'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Serverzeit</h3>
                <div class="stat-value"><?= $stats['serverTime'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Zeitzone</h3>
                <div class="stat-value"><?= $stats['timezone'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Betriebssystem</h3>
                <div class="stat-value"><?= $stats['operatingSystem'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Server Uptime</h3>
                <div class="stat-value"><?= $stats['uptime'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Aktive Sessions</h3>
                <div class="stat-value"><?= $stats['sessionCount'] ?></div>
            </div>

            <div class="stat-box">
                <h3>Registrierte Dienste</h3>
                <div class="stat-value"><?= $stats['servicesCount'] ?></div>
            </div>
        </div>

        <div class="admin-section">
            <h2>PHP Erweiterungen</h2>
            <div class="extensions-list">
                <?php foreach($stats['loadedExtensions'] as $extension): ?>
                    <span class="extension-badge"><?= $extension ?></span>
                <?php endforeach; ?>
            </div>
        </div>
    </div>

    <div class="admin-footer">
        <p>&copy; <?= date('Y') ?> Framework Admin</p>
    </div>
</body>
</html>
