{{-- Compiled by Vite. The Tailwind Play CDN that used to sit here is a development tool that JIT-compiles in the browser; it has no place in a production admin panel. --}} @vite(['resources/css/app.css', 'resources/js/app.js']) {{-- The page itself must never scroll: the shell fills the viewport exactly and each column owns its own scrolling. This is what stops the sidebar being dragged along by the document scrollbar, and it is why there is only ever one scrollbar on screen. --}} Skip to content {{-- h-full, not min-h-full: the shell is exactly the viewport. min-h-full lets it grow with the content, which is precisely what made the sidebar scroll away with the page. --}}
{{-- ── Sidebar ─────────────────────────────────────────────────── --}} {{-- Off-canvas below lg, fixed above it. --}}
{{-- Three bands: a fixed header, a nav that scrolls on its own, and a footer pinned to the bottom. overflow-hidden here is what forces the middle band to scroll instead of the whole column growing. --}} {{-- ── Main column ─────────────────────────────────────────────── --}}
{{-- Sits outside the scrolling region rather than using position:sticky, so it is permanently visible without a stacking-context or backdrop -filter edge case to worry about. --}}

@yield('heading', 'Dashboard')

@hasSection('subheading')

@yield('subheading')

@endif
@yield('header-actions') @if (($unreadCount ?? 0) > 0) {{ $unreadCount }} @endif
{{ \Illuminate\Support\Str::of(auth()->user()?->name ?? '?')->explode(' ')->take(2)->map(fn ($p) => mb_substr($p, 0, 1))->implode('') }}
{{-- The dashboard's own scroll container. min-h-0 is required: without it a flex child refuses to shrink below its content and the overflow escapes to the body instead of scrolling here. --}}
@if (session('success'))
{{ session('success') }}
@endif @if (session('error')) @endif @if ($errors->any()) @endif @yield('content')