<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}" dir="{{ locale_direction() }}" class="scroll-smooth" data-theme-scope="admin">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ $title ?? 'Nivex Admin' }}</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap" rel="stylesheet">
    <script>
        (() => {
            document.documentElement.classList.add('dark');
            localStorage.setItem('nivex-admin-theme', 'dark');
        })();
    </script>
    <link rel="stylesheet" href="{{ asset('build/assets/app-DC79b1AS.css') }}">
    <link rel="stylesheet" href="{{ asset('build/assets/app-DvB2Xm2x.css') }}">
    <script type="module" src="{{ asset('build/assets/app-Iyknztod.js') }}"></script>
</head>
<body class="{{ locale_font_class() }} min-h-screen bg-slate-100 text-slate-900 dark:bg-ink-950 dark:text-slate-100">
    <div class="grid min-h-screen lg:grid-cols-[280px_1fr]">
        <aside class="border-b border-slate-200 bg-slate-950 px-6 py-8 text-white lg:border-b-0 lg:border-r lg:border-slate-800">
            <a href="{{ route('admin.dashboard') }}" class="flex items-center gap-3">
                <img src="{{ asset('images/logo Nivex All.png') }}" alt="Nivex" class="h-7 w-auto shrink-0 object-contain">
            </a>
            <p class="mt-2 text-sm text-slate-400">Admin dashboard</p>

            <nav class="mt-10 space-y-2">
                @foreach ([['label' => __('Dashboard'), 'route' => 'admin.dashboard'], ['label' => __('Home'), 'route' => 'admin.home.edit'], ['label' => __('About'), 'route' => 'admin.about.edit'], ['label' => __('Services'), 'route' => 'admin.services.index'], ['label' => __('Industries'), 'route' => 'admin.industries.index'], ['label' => __('Clients'), 'route' => 'admin.clients.index'], ['label' => __('Projects'), 'route' => 'admin.projects.index']] as $item)
                    <a href="{{ route($item['route']) }}" class="block rounded-2xl px-4 py-3 text-sm font-semibold transition {{ request()->routeIs($item['route']) ? 'bg-white text-slate-950' : 'text-slate-300 hover:bg-white/10 hover:text-white' }}">{{ $item['label'] }}</a>
                @endforeach
            </nav>

            <form method="POST" action="{{ route('logout') }}" class="mt-10">
                @csrf
                <button type="submit" class="btn-secondary w-full justify-center border-white/20 text-white hover:border-white/40 hover:text-white">{{ __('Logout') }}</button>
            </form>
        </aside>

        <div class="p-4 sm:p-6 lg:p-8">
            @if (session('status'))
                <div class="mb-6 rounded-2xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm font-medium text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-200">{{ session('status') }}</div>
            @endif
            @yield('content')
        </div>
    </div>
</body>
</html>