<?php
require_once __DIR__ . '/../config/db.php';
require_once __DIR__ . '/../includes/functions.php';
?>
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sistem Pakar Kesehatan Mental - SMAN 1 Barumun</title>
    <link rel="stylesheet" href="<?= baseUrl('dist/style.css?v=' . time()) ?>">
</head>
<body class="bg-slate-50 min-h-screen flex flex-col">
    <nav class="bg-white border-b border-slate-100 py-6 sticky top-0 z-50">
        <div class="container mx-auto px-6 flex justify-between items-center">
            <div class="flex items-center gap-4 mb-2">
                <img src="<?= baseUrl('logo.png') ?>" alt="Logo" class="w-8 h-8 object-contain">
                <a href="<?= baseUrl() ?>" class="text-2xl font-extrabold tracking-tight text-primary">
                    SMA Neg. 1<span class="text-accent"> Barumun</span>
                </a>
            </div>
            
            <div class="flex items-center gap-8">
                <a href="<?= baseUrl() ?>" class="text-sm font-bold text-slate-600 hover:text-primary transition-colors">Home</a>
                <?php if (isset($_SESSION['siswa_auth'])): ?>
                    <a href="<?= baseUrl('riwayat-siswa.php') ?>" class="text-sm font-bold text-slate-600 hover:text-primary transition-colors">Riwayat</a>
                    <a href="<?= baseUrl('profil-siswa.php') ?>" class="text-sm font-bold text-slate-600 hover:text-primary transition-colors">Profil Saya</a>
                    <a href="<?= baseUrl('logout-siswa.php') ?>" class="btn-primary py-2 px-6 text-sm">Logout</a>
                <?php else: ?>
                    <a href="<?= baseUrl('login-siswa.php') ?>" class="btn-primary py-2 px-6 text-sm">Login Siswa</a>
                <?php endif; ?>
            </div>
        </div>
    </nav>
    <main class="flex-1">
