<?php
require_once __DIR__ . '/auth.php';
require_once __DIR__ . '/../../includes/db.php';
?>
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo isset($admin_title) ? $admin_title . ' - Admin Panel' : 'Admin Panel | PT Namora Nexa Niaga'; ?></title>
    
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    
    <!-- FontAwesome for Icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <!-- Admin Styling -->
    <link rel="stylesheet" href="../assets/css/admin.css">
</head>
<body>

    <!-- Sidebar Backdrop for Mobile -->
    <div class="admin-sidebar-backdrop" id="adminSidebarBackdrop"></div>

    <!-- Sidebar Inclusion -->
    <?php require_once 'sidebar.php'; ?>
    
    <!-- Main Content Wrapper -->
    <div class="main-wrapper">
        
        <!-- Admin Navbar -->
        <div class="admin-navbar">
            <button class="admin-mobile-toggle" id="adminMobileToggle" aria-label="Toggle Sidebar" style="display: none; background: none; border: none; font-size: 20px; color: var(--secondary); cursor: pointer; margin-right: 15px; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; transition: var(--transition);">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="navbar-title">
                <h1><?php echo isset($admin_title) ? $admin_title : 'Dashboard'; ?></h1>
            </div>
            
            <div class="navbar-user">
                <a href="../index.php" target="_blank" class="navbar-btn">
                    <i class="fas fa-external-link-alt"></i> Lihat Website
                </a>
                
                <div style="width: 1px; height: 25px; background-color: var(--border-color);"></div>
                
                <div class="user-info">
                    <div class="user-name"><?php echo htmlspecialchars($_SESSION['admin_name']); ?></div>
                    <div class="user-role">Administrator</div>
                </div>
            </div>
        </div>
        
        <!-- Dashboard Content Area -->
        <div class="admin-container">
