<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <title>Super Admin Dashboard</title>
    <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
    <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700&display=swap" rel="stylesheet"/>
    <script id="tailwind-config">
        tailwind.config = {
          darkMode: "class",
          theme: {
            extend: {
              colors: {
                  primary: "#2563EB",
                  "primary-container": "#1D4ED8",
                  "on-primary": "#ffffff",
                  "surface": "#F8FAFC",
                  "on-surface": "#0F172A",
                  "surface-container": "#F1F5F9",
                  "surface-container-highest": "#E2E8F0",
                  "surface-container-lowest": "#ffffff",
                  "outline-variant": "#CBD5E1"
              }
            }
          }
        }
    </script>
</head>
<body class="bg-surface text-on-surface antialiased flex">

<!-- SideNavBar -->
<nav class="hidden md:flex flex-col fixed left-0 top-0 h-full py-8 bg-surface-container border-r border-outline-variant w-72 z-50">
    <div class="px-6 mb-8 flex items-center gap-4">
        <div>
            <h1 class="text-2xl font-bold text-primary m-0">Super Admin</h1>
            <p class="text-sm text-gray-600 m-0">System Administration</p>
        </div>
    </div>
    <div class="flex-1 overflow-y-auto">
        <ul class="space-y-2">
            <li>
                <a class="flex items-center gap-3 px-4 py-3 bg-primary text-on-primary rounded-lg mx-2 transition-all opacity-80" href="/admin">
                    <span class="material-symbols-outlined">dashboard</span>
                    <span>Dashboard</span>
                </a>
            </li>
            <li>
                <a class="flex items-center gap-3 px-4 py-3 text-gray-700 hover:bg-surface-container-highest transition-all rounded-lg mx-2" href="/users">
                    <span class="material-symbols-outlined">manage_accounts</span>
                    <span>User Management</span>
                </a>
            </li>
            <li>
                <a class="flex items-center gap-3 px-4 py-3 text-gray-700 hover:bg-surface-container-highest transition-all rounded-lg mx-2" href="/reports">
                    <span class="material-symbols-outlined">assessment</span>
                    <span>Reports</span>
                </a>
            </li>
            <li>
                <a class="flex items-center gap-3 px-4 py-3 text-gray-700 hover:bg-surface-container-highest transition-all rounded-lg mx-2" href="#">
                    <span class="material-symbols-outlined">settings</span>
                    <span>System Settings</span>
                </a>
            </li>
        </ul>
    </div>
    <div class="mt-auto px-6">
        <a class="flex items-center gap-3 px-4 py-3 text-gray-700 hover:bg-surface-container-highest transition-all rounded-lg mx-2" href="/auth/logout">
            <span class="material-symbols-outlined">logout</span>
            <span>Logout</span>
        </a>
    </div>
</nav>

<!-- Main Content Area -->
<main class="flex-1 md:ml-72 flex flex-col min-h-screen">
    <div class="pt-8 px-6 pb-24 w-full mx-auto">
        <div class="mb-8">
            <h2 class="text-3xl font-bold text-on-surface">Admin Overview</h2>
            <p class="text-gray-600 mt-1">Welcome back, <?= esc($user['nama_lengkap'] ?? 'Administrator') ?>.</p>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
            <div class="bg-white p-6 rounded-xl border border-gray-200 shadow-sm flex flex-col">
                <span class="material-symbols-outlined text-4xl text-primary mb-4">manage_accounts</span>
                <h3 class="text-lg font-bold mb-2">Manage Users</h3>
                <p class="text-sm text-gray-600 mb-4 flex-1">Add or modify roles for Kesantrian, Satpam, and Wali Santri accounts.</p>
                <button class="bg-primary text-white py-2 px-4 rounded-lg w-full font-medium hover:bg-primary-container transition-colors">Go to Users</button>
            </div>
            
            <div class="bg-white p-6 rounded-xl border border-gray-200 shadow-sm flex flex-col">
                <span class="material-symbols-outlined text-4xl text-green-600 mb-4">admin_panel_settings</span>
                <h3 class="text-lg font-bold mb-2">Access Control</h3>
                <p class="text-sm text-gray-600 mb-4 flex-1">Configure system-wide rules and operational parameters for the boarding school.</p>
                <button class="bg-surface-container text-on-surface py-2 px-4 rounded-lg w-full font-medium hover:bg-surface-container-highest transition-colors">Configure</button>
            </div>
            
            <div class="bg-white p-6 rounded-xl border border-gray-200 shadow-sm flex flex-col">
                <span class="material-symbols-outlined text-4xl text-orange-500 mb-4">analytics</span>
                <h3 class="text-lg font-bold mb-2">System Logs</h3>
                <p class="text-sm text-gray-600 mb-4 flex-1">View system activity, login audits, and error reports.</p>
                <button class="bg-surface-container text-on-surface py-2 px-4 rounded-lg w-full font-medium hover:bg-surface-container-highest transition-colors">View Logs</button>
            </div>
        </div>
    </div>
</main>
</body>
</html>
