<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

    <title><?php echo e($title ?? config('app.name', 'Laravel')); ?></title>

    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

    <script>
        if (localStorage.getItem('darkMode') === 'true') {
            document.documentElement.classList.add('dark');
        }
    </script>

    <?php if(isset($themeCssVariables) && is_array($themeCssVariables)): ?>
    <style>
        :root {
            <?php $__currentLoopData = $themeCssVariables; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $property => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php echo e($property); ?>: <?php echo e($value); ?>;
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        }
    </style>
    <?php endif; ?>

    <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>

    
    <style>
        /* Before Alpine initialises, assume desktop-open state (sidebar = 16rem) */
        [x-cloak] { display: none !important; }
        .app-content-wrapper { margin-left: 16rem; }
        @media (max-width: 767px) {
            .app-content-wrapper { margin-left: 0 !important; }
        }
    </style>
</head>
<body style="font-family: var(--theme-font-body); color: var(--theme-color-body); background-color: var(--theme-bg-body);" class="antialiased">

    <div x-data="appLayoutData()" x-cloak :class="{'dark': darkMode}" class="min-h-screen dark:bg-gray-900">

        <!-- Sidebar (fixed, always rendered) -->
        <?php if (isset($component)) { $__componentOriginaldb4249790d48373143e5b6a3fcfb71cf = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginaldb4249790d48373143e5b6a3fcfb71cf = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.app-sidebar','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-sidebar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginaldb4249790d48373143e5b6a3fcfb71cf)): ?>
<?php $attributes = $__attributesOriginaldb4249790d48373143e5b6a3fcfb71cf; ?>
<?php unset($__attributesOriginaldb4249790d48373143e5b6a3fcfb71cf); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaldb4249790d48373143e5b6a3fcfb71cf)): ?>
<?php $component = $__componentOriginaldb4249790d48373143e5b6a3fcfb71cf; ?>
<?php unset($__componentOriginaldb4249790d48373143e5b6a3fcfb71cf); ?>
<?php endif; ?>

        <!--
            Floating hamburger — visible ONLY on mobile when sidebar is closed.
            NOTE: Do NOT use style="display:none" alongside x-show — Alpine sets
            display via JS and the inline style would override it. Use x-cloak
            pattern or just let x-show handle visibility entirely.
        -->
        <button
            x-show="isMobile && !sidebarOpen"
            x-transition:enter="transition ease-out duration-200"
            x-transition:enter-start="opacity-0 scale-90"
            x-transition:enter-end="opacity-100 scale-100"
            x-transition:leave="transition ease-in duration-150"
            x-transition:leave-start="opacity-100 scale-100"
            x-transition:leave-end="opacity-0 scale-90"
            @click="toggleSidebar()"
            class="fixed top-3 left-3 z-50 w-10 h-10 flex items-center justify-center rounded-xl bg-[#1a4731] text-white shadow-lg"
            aria-label="Open Menu"
        >
            <i class="fa-solid fa-bars text-sm"></i>
        </button>

        <!--
            Main content wrapper.

            DESKTOP (≥768px):
              - Sidebar is visible and takes 16rem (open) or 5rem (collapsed).
              - Content wrapper gets margin-left equal to sidebar width.
              - We use Alpine :style binding (not Tailwind classes) so the margin
                is always applied correctly regardless of breakpoint.

            MOBILE (<768px):
              - Sidebar slides off-screen (-translate-x-full).
              - Content wrapper has NO left margin — it fills the full viewport.
              - The sidebar overlays content when opened (z-40 overlay).

            overflow-x:hidden prevents any child from creating a horizontal scrollbar.
        -->
        <div
            :style="!isMobile ? (sidebarOpen ? 'margin-left:16rem' : 'margin-left:5rem') : 'margin-left:0'"
            class="app-content-wrapper transition-all duration-300 ease-in-out min-h-screen flex flex-col overflow-x-hidden"
        >
            <main class="flex-1 w-full">
                <?php echo e($slot ?? ''); ?>

                <?php echo $__env->yieldContent('content'); ?>
            </main>

            <?php if (isset($component)) { $__componentOriginal868091fdcca1b7cd44d9608210d3c88a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal868091fdcca1b7cd44d9608210d3c88a = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.app-footer','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-footer'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal868091fdcca1b7cd44d9608210d3c88a)): ?>
<?php $attributes = $__attributesOriginal868091fdcca1b7cd44d9608210d3c88a; ?>
<?php unset($__attributesOriginal868091fdcca1b7cd44d9608210d3c88a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal868091fdcca1b7cd44d9608210d3c88a)): ?>
<?php $component = $__componentOriginal868091fdcca1b7cd44d9608210d3c88a; ?>
<?php unset($__componentOriginal868091fdcca1b7cd44d9608210d3c88a); ?>
<?php endif; ?>
        </div>

        <?php if (isset($component)) { $__componentOriginal704196272d5e2debce23ffdbf1a3fb23 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal704196272d5e2debce23ffdbf1a3fb23 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.toast-notifications','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('toast-notifications'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal704196272d5e2debce23ffdbf1a3fb23)): ?>
<?php $attributes = $__attributesOriginal704196272d5e2debce23ffdbf1a3fb23; ?>
<?php unset($__attributesOriginal704196272d5e2debce23ffdbf1a3fb23); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal704196272d5e2debce23ffdbf1a3fb23)): ?>
<?php $component = $__componentOriginal704196272d5e2debce23ffdbf1a3fb23; ?>
<?php unset($__componentOriginal704196272d5e2debce23ffdbf1a3fb23); ?>
<?php endif; ?>
    </div>

</body>
</html>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/layouts/app.blade.php ENDPATH**/ ?>