@props(['title' => '', 'subtitle' => null]) {{-- Mobile stacks: title block on its own row, then the actions on a row that is allowed to wrap. The old side-by-side grid gave the action column its intrinsic width, so a page with a view toggle plus two buttons pushed the document wider than the viewport — which is what made the fixed bottom dock look wider than the header and the cards. Nothing here may exceed its column. --}}
merge(['class' => 'mb-6 flex flex-col gap-3 sm:mb-8 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between sm:gap-4']) }}>

{{ $title }}

@if ($subtitle)

{{ $subtitle }}

@endif
@if (! \Illuminate\Support\Str::of($slot)->trim()->isEmpty())
{{ $slot }}
@endif