<div style="display: grid; grid-template-columns: 250px 1fr; gap: 2rem;">
    <aside class="card" style="height: fit-content; padding: 1rem;">
        <h3 style="margin-top: 0;"><?= \App\Helpers\Lang::t('admin_panel') ?></h3>
        <ul style="list-style: none; padding: 0;">
            <li style="padding: 0.5rem 0;"><a href="/admin" style="text-decoration: none; color: var(--primary); font-weight: bold;"><?= \App\Helpers\Lang::t('dashboard') ?></a></li>
            <li style="padding: 0.5rem 0;"><a href="/admin/users" style="text-decoration: none; color: inherit;"><?= \App\Helpers\Lang::t('user_management') ?></a></li>
            <li style="padding: 0.5rem 0;"><a href="/admin/content" style="text-decoration: none; color: inherit;"><?= \App\Helpers\Lang::t('content_moderation') ?></a></li>
            <li style="padding: 0.5rem 0;"><a href="/admin/settings" style="text-decoration: none; color: inherit;"><?= \App\Helpers\Lang::t('site_settings') ?></a></li>
        </ul>
    </aside>

    <div class="admin-content">
        <h1><?= \App\Helpers\Lang::t('dashboard_overview') ?></h1>
        
        <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem;">
            <div class="card" style="text-align: center;">
                <div style="font-size: 2rem; font-weight: bold;"><?= $stats['total_users'] ?></div>
                <div style="color: #666;"><?= \App\Helpers\Lang::t('total_users') ?></div>
            </div>
            <div class="card" style="text-align: center;">
                <div style="font-size: 2rem; font-weight: bold;"><?= $stats['total_posts'] ?></div>
                <div style="color: #666;"><?= \App\Helpers\Lang::t('total_posts') ?></div>
            </div>
            <div class="card" style="text-align: center;">
                <div style="font-size: 2rem; font-weight: bold;">0</div>
                <div style="color: #666;"><?= \App\Helpers\Lang::t('new_reports') ?></div>
            </div>
        </div>

        <div class="card">
            <h3><?= \App\Helpers\Lang::t('recent_activity') ?></h3>
            <table style="width: 100%; border-collapse: collapse;">
                <thead>
                    <tr style="border-bottom: 1px solid var(--border); text-align: left;">
                        <th style="padding: 0.75rem;"><?= \App\Helpers\Lang::t('action') ?></th>
                        <th style="padding: 0.75rem;"><?= \App\Helpers\Lang::t('user') ?></th>
                        <th style="padding: 0.75rem;"><?= \App\Helpers\Lang::t('ip') ?></th>
                        <th style="padding: 0.75rem;"><?= \App\Helpers\Lang::t('time') ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($stats['recent_logs'] as $log): ?>
                        <tr style="border-bottom: 1px solid var(--border);">
                            <td style="padding: 0.75rem;"><?= $log['action'] ?></td>
                            <td style="padding: 0.75rem;"><?= $log['user_id'] ?? 'Guest' ?></td>
                            <td style="padding: 0.75rem;"><?= $log['ip_address'] ?></td>
                            <td style="padding: 0.75rem;"><?= date('H:i:s d/m/y', strtotime($log['created_at'])) ?></td>
                        </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
