<?php
$adminTitle = $adminTitle ?? 'UGFX Admin';
$bootstrapCss = ugfx_vendor_asset('assets/vendor/bootstrap/css/bootstrap.min.css', 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css', '../');
$currentAdminPage = basename($_SERVER['PHP_SELF'] ?? 'dashboard.php');
$adminNav = [
    'dashboard.php' => 'Dashboard',
    'chat.php' => 'Chat',
    'news.php' => 'News',
    'events.php' => 'Events',
    'pages.php' => 'Pages',
    'friends.php' => 'Friends',
    'schedule.php' => 'Schedule',
    'requests.php' => 'Requests',
    'applications.php' => 'Applications',
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars($adminTitle) ?></title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Orbitron:wght@700;800&display=swap" rel="stylesheet">
<link href="<?= htmlspecialchars($bootstrapCss) ?>" rel="stylesheet">
<link rel="stylesheet" href="../assets/css/theme.css">
</head>
<body class="ugfx-admin-shell">
<div class="container-fluid">
<div class="row">
<aside class="col-lg-2 p-3 ugfx-admin-sidebar">
    <div class="ugfx-brand mb-4"><span class="ugfx-brand-mark">FX</span><span class="ugfx-brand-text">Admin</span></div>
    <nav class="d-grid gap-1">
        <?php foreach ($adminNav as $file => $label): ?>
            <a href="<?= htmlspecialchars($file) ?>" class="<?= $currentAdminPage === $file ? 'active' : '' ?>"><?= htmlspecialchars($label) ?></a>
        <?php endforeach; ?>
        <a href="logout.php">Logout</a>
    </nav>
</aside>
<section class="col-lg-10 p-4">
