<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    @include('eliteadmin::partials.head')
</head>
<body>
    @include('eliteadmin::components.header')
    @include('eliteadmin::components.mobile-nav')
    @include('eliteadmin::components.sidebar')

    <div class="sidebar-overlay"></div>

    <main class="main">
        <div class="main-content @yield('page_class')">
            @if (session('success'))
                <x-eliteadmin::alert type="success" :message="session('success')" class="mb-4" />
            @endif
            @if (session('status'))
                <x-eliteadmin::alert type="success" :message="session('status')" class="mb-4" />
            @endif
            @if (session('error'))
                <x-eliteadmin::alert type="danger" :message="session('error')" class="mb-4" />
            @endif
            @if (session('warning'))
                <x-eliteadmin::alert type="warning" :message="session('warning')" class="mb-4" />
            @endif
            @if (session('info'))
                <x-eliteadmin::alert type="info" :message="session('info')" class="mb-4" />
            @endif
            @if (!empty($integrityStatus) && $integrityStatus === 'tampered')
                <x-eliteadmin::alert type="danger" :message="$integrityMessage ?? 'Core application files were modified. Marketplace access, updates, and platform services are disabled until you restore the official release.'" class="mb-4" />
            @endif

            @yield('content')
        </div>
    </main>

    @include('eliteadmin::partials.scripts')
</body>
</html>
