<?php
/**
 * Dashboard layout helpers — call at top of every dashboard page.
 *
 * Usage:
 *   require __DIR__ . '/../config/bootstrap.php';
 *   $user = Auth::requireLogin();
 *   $pageTitle = 'My Campaigns';
 *   $activeNav = 'campaigns';
 *   $extraCss = ['campaigns'];   // loads /assets/css/campaigns.css
 *   require __DIR__ . '/../includes/partials/dashboard-head.php';
 *   ... page body ...
 *   require __DIR__ . '/../includes/partials/dashboard-foot.php';
 */
$pageTitle = $pageTitle ?? 'Dashboard';
$activeNav = $activeNav ?? 'dashboard';
$extraCss  = $extraCss ?? [];
$bodyClass = $bodyClass ?? '';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= e($pageTitle) ?> — DroidTester</title>
    <meta name="robots" content="noindex,nofollow">
    <meta name="csrf-token" content="<?= e(Csrf::token()) ?>">
    <meta name="theme-color" content="#1B7A43">
    <link rel="icon" href="/assets/images/favicon.png">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/assets/css/style.css">
    <link rel="stylesheet" href="/assets/css/dashboard.css">
    <?php foreach ($extraCss as $css): ?>
        <link rel="stylesheet" href="/assets/css/<?= e($css) ?>.css">
    <?php endforeach; ?>
    <link rel="stylesheet" href="/assets/css/responsive.css">
</head>
<body class="<?= e($bodyClass) ?>">
<div class="dashboard-page">
    <?php require __DIR__ . '/sidebar.php'; ?>
    <main class="main-content">
        <?php require __DIR__ . '/topbar.php'; ?>
