@php
    $activeTab = $activeTab ?? 'business';

    $items = [
        ['key' => 'business', 'label' => 'Business Profile', 'description' => 'Name, logo, address', 'route' => route('admin.settings.business')],
        ['key' => 'booking', 'label' => 'Booking Settings', 'description' => 'Rules and time windows', 'route' => route('admin.settings.booking')],
        ['key' => 'staff-services', 'label' => 'Staff & Services', 'description' => 'Duration and buffers', 'route' => route('admin.settings.staff-services')],
        ['key' => 'invoices', 'label' => 'Invoice Settings', 'description' => 'Tax and numbering', 'route' => route('admin.settings.invoices')],
        ['key' => 'payments', 'label' => 'Payment Settings', 'description' => 'Cash, Stripe, PayPal', 'route' => route('admin.settings.payments')],
        ['key' => 'notifications', 'label' => 'Notifications', 'description' => 'Customer alerts', 'route' => route('admin.settings.notifications')],
        ['key' => 'whatsapp', 'label' => 'WhatsApp', 'description' => 'API reminders', 'route' => route('admin.settings.whatsapp')],
        ['key' => 'email-smtp', 'label' => 'Email SMTP', 'description' => 'Mail delivery', 'route' => route('admin.settings.email-smtp')],
        ['key' => 'branding', 'label' => 'Branding', 'description' => 'Colors and theme', 'route' => route('admin.settings.branding')],
        ['key' => 'localization', 'label' => 'Language & Localization', 'description' => 'Locale and formats', 'route' => route('admin.settings.localization')],
        ['key' => 'languages', 'label' => 'Languages', 'description' => 'Enable, default, RTL', 'route' => route('admin.settings.languages.index')],
        ['key' => 'translations', 'label' => 'Translations', 'description' => 'Keys and copy', 'route' => route('admin.settings.translations')],
        ['key' => 'translation-import-export', 'label' => 'Import/Export', 'description' => 'JSON translation files', 'route' => route('admin.settings.translations.import-export')],
        ['key' => 'security', 'label' => 'Security', 'description' => 'Access protection', 'route' => route('admin.settings.security')],
        ['key' => 'billing', 'label' => 'Subscription/Billing', 'description' => 'Plan and payments', 'route' => route('admin.settings.billing')],
    ];
@endphp

<aside class="rounded-lg border border-booklio-border bg-white p-3 shadow-card xl:sticky xl:top-24">
    <div class="mb-3 px-2">
        <p class="text-xs font-bold uppercase tracking-wide text-booklio-muted">Settings</p>
        <p class="mt-1 text-sm font-medium leading-5 text-slate-600">Choose an area to configure your business.</p>
    </div>
    <nav class="grid max-h-[240px] gap-1 overflow-y-auto pr-1 booklio-scrollbar sm:max-h-none sm:grid-cols-2 sm:overflow-visible sm:pr-0 xl:grid-cols-1">
        @foreach ($items as $item)
            <a
                href="{{ $item['route'] }}"
                @class([
                    'rounded-lg p-3 transition',
                    'bg-blue-50 text-booklio-primary' => $activeTab === $item['key'],
                    'text-slate-700 hover:bg-slate-50 hover:text-booklio-primary' => $activeTab !== $item['key'],
                ])
            >
                <span class="block text-sm font-extrabold">{{ $item['label'] }}</span>
                <span class="mt-0.5 block text-xs font-medium text-booklio-muted">{{ $item['description'] }}</span>
            </a>
        @endforeach
    </nav>
</aside>
