{{-- Dynamic brand colors from admin settings --}} @php $__brandColor = \App\Models\SystemSetting::get('primary_color'); $__brandStrong = \App\Models\SystemSetting::get('secondary_color'); $__accentColor = \App\Models\SystemSetting::get('accent_color'); @endphp @if($__brandColor || $__brandStrong || $__accentColor) @endif {{-- Custom confirm modal setup --}} {{-- Favicon --}} @php $customFavicon = \App\Models\SystemSetting::get('favicon'); @endphp @if($customFavicon) @else @endif {{-- PWA (conditional on admin setting) --}} @php $pwaEnabled = \App\Models\SystemSetting::get('pwa_enabled', 'false') === 'true'; @endphp @if($pwaEnabled) @php $pwaIcon = \App\Models\SystemSetting::get('pwa_icon'); @endphp @if($pwaIcon) @endif @endif {{-- Google Fonts: Outfit --}} @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles {{-- Admin-defined custom CSS rendered into every page's . --}} @php $__customCss = \App\Models\SystemSetting::get('custom_css', ''); @endphp @if(trim($__customCss) !== '') @endif {!! \App\Models\SystemSetting::get('head_code', '') !!} {{-- Skip to content (a11y) --}} Skip to main content {{-- Offline indicator --}} {{-- Progress Bar --}}
{{-- ═══════════════════════════════════════════════ SIDEBAR ═══════════════════════════════════════════════ --}} @persist('sidebar') {{-- Sidebar. The mobile slide-in is driven by the SAME Tailwind utilities the admin layout uses (-translate-x-full on mobile + !translate-x-0 when sidebarOpen=true). Previously we relied on a compiled CSS class `.sidebar-mobile-open` which was rendered into one place but the admin sidebar opening / user sidebar not opening on mobile reported by the customer was caused by that class not winning specificity once Tailwind purged the build. Inline utilities are bulletproof. --}} @endpersist {{-- Mobile overlay --}} {{-- ═══════════════════════════════════════════════ MAIN CONTENT ═══════════════════════════════════════════════ --}}
{{-- Header --}}
{{-- Mobile hamburger --}} {{-- Sidebar collapse toggle (desktop) --}} {{-- Mobile search trigger --}} {{-- Live Search --}}
{{-- Language switcher --}} {{-- Notification bell — fetches list on open, polls unread count every 30s --}}
{{-- User menu --}}
{{-- Toast container — MUST render before any dispatcher so its window listener is registered before flash toasts fire. --}} {{-- Page content --}}
{{-- Breadcrumb slot --}} @isset($breadcrumb)
{{ $breadcrumb }}
@endisset {{-- Flash messages dispatched as toasts --}} @if(session('success')) @endif @if(session('error')) @endif @if(session('warning')) @endif @if(session('info')) @endif {{-- Impersonation banner --}} @if(session('admin_impersonating'))
{{ __('Admin impersonation active (by') }} {{ session('admin_impersonating_name', 'Admin') }}). {{ __('This session is time-limited.') }} {{ __('Return to Admin') }}
@endif
{{ $slot }}
{{-- Screen reader live region for dynamic updates --}}
{{-- Footer removed — links already in sidebar footer --}}
{{-- Keyboard Shortcuts Modal --}} {{-- Help Center --}}
@livewireScripts {{-- Product Tour (first-time users) --}} {{-- Onboarding Tour (step-by-step walkthrough) --}} {{-- Onboarding Checklist (getting-started widget) --}} {{-- Toast container moved above
— see comment there --}} {{-- Cookie Consent --}} {{-- Global Keyboard Shortcuts (safe — no single-key redirects) --}} {{-- Keyboard Shortcuts Help Modal --}} {{-- Service Worker --}} {{-- Custom confirm modal — replaces browser's native confirm() for all wire:confirm --}}
{{-- PWA Service Worker Registration & Install Prompt --}} @if($pwaEnabled) @include('partials.pwa-install-prompt') @endif {!! \App\Models\SystemSetting::get('footer_code', '') !!} {{-- "Powered by" credit — shown only when the current workspace's plan does NOT include the white_label feature. Workspaces with white_label toggled on (typically Pro/Enterprise) get a clean view. --}} @if(\App\Helpers\WhiteLabel::shouldShowPoweredBy())
{{ __('Powered by') }} {{ \App\Helpers\WhiteLabel::brandName() }}
@endif {{-- Admin-defined raw HTML rendered before (analytics, chat widgets, etc.) --}} {!! \App\Models\SystemSetting::get('footer_code', '') !!}