<?php $current_page = basename($_SERVER['PHP_SELF']); ?>
<aside class="w-72 bg-primary text-white flex-shrink-0 flex flex-col">
    <div class="px-8 py-10">
        <h1 class="text-xl font-extrabold tracking-tight">SMA Neg. 1<span class="text-accent"> Barumun</span></h1>
        <p class="text-xs text-primary-light mt-1 font-medium select-none uppercase tracking-widest">PADANG LAWAS</p>
    </div>

    <nav class="flex-1 px-4 space-y-2 overflow-y-auto">
        <a href="<?= baseUrl('admin/index.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'index.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
            Dashboard
        </a>
        
        <div class="pt-4 pb-2 px-4 text-[10px] font-bold text-white/40 uppercase tracking-widest">Master Data</div>
        <a href="<?= baseUrl('admin/data-kelas.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-kelas.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Kelas
        </a>
        <a href="<?= baseUrl('admin/data-siswa.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-siswa.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Siswa
        </a>
        <a href="<?= baseUrl('admin/data-gejala.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-gejala.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Gejala
        </a>
        <a href="<?= baseUrl('admin/data-diagnosa.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-diagnosa.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Diagnosa
        </a>
        <a href="<?= baseUrl('admin/data-rule.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-rule.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Aturan
        </a>
        <a href="<?= baseUrl('admin/data-solusi.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'data-solusi.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Data Solusi
        </a>

        <div class="pt-4 pb-2 px-4 text-[10px] font-bold text-white/40 uppercase tracking-widest">Laporan</div>
        <a href="<?= baseUrl('admin/riwayat.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'riwayat.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Riwayat Diagnosa
        </a>
        <a href="<?= baseUrl('admin/laporan.php') ?>" class="flex items-center gap-3 px-4 py-3 rounded-xl transition-all <?= $current_page === 'laporan.php' ? 'bg-white/10 text-accent font-bold' : 'hover:bg-white/5 text-slate-300 hover:text-white' ?>">
            Laporan & Grafik
        </a>
    </nav>

    <div class="p-8">
        <div class="p-4 rounded-2xl bg-white/5 border border-white/10">
            <p class="text-xs text-slate-300 mb-2">Login sebagai:</p>
            <p class="text-sm font-bold truncate"><?= $_SESSION['admin_auth']['nama'] ?></p>
        </div>
    </div>
</aside>
