<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@yield('title', 'SaaS Control Panel') | ABIC_E-Learning</title>
    <link rel="stylesheet" href="{{ asset('assets/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('assets/css/font-awesome.min.css') }}">
    <link rel="stylesheet" href="{{ asset('assets/css/bootstrap-icons.css') }}">
</head>

<body class="bg-light">
    <nav class="navbar navbar-expand navbar-dark bg-dark">
        <div class="container-fluid">
            <span class="navbar-brand">ABIC_E-Learning <span class="text-white-50">— SaaS Control Panel</span></span>
            @auth
                <div class="d-flex align-items-center gap-3">
                    <a href="{{ route('saas-admin.companies.index') }}"
                        class="nav-link d-inline {{ request()->routeIs('saas-admin.companies.*') ? 'text-white fw-bold' : 'text-white-50' }}">
                        {{ __('Companies') }}
                    </a>
                    <a href="{{ route('saas-admin.subscription-plans.index') }}"
                        class="nav-link d-inline {{ request()->routeIs('saas-admin.subscription-plans.*') ? 'text-white fw-bold' : 'text-white-50' }}">
                        {{ __('Subscription Plans') }}
                    </a>
                    <a href="{{ route('saas-admin.backups.index') }}"
                        class="nav-link d-inline {{ request()->routeIs('saas-admin.backups.*') ? 'text-white fw-bold' : 'text-white-50' }}">
                        {{ __('Backups') }}
                    </a>
                    <form action="{{ route('saas-admin.logout') }}" method="POST" class="d-flex m-0">
                        @csrf
                        <button type="submit" class="btn btn-outline-light btn-sm">{{ __('Log out') }}</button>
                    </form>
                </div>
            @endauth
        </div>
    </nav>

    <div class="container py-4">
        @if (session('success'))
            <div class="alert alert-success">{{ session('success') }}</div>
        @endif
        @if (session('error'))
            <div class="alert alert-danger">{{ session('error') }}</div>
        @endif

        @yield('content')
    </div>

    <script src="{{ asset('assets/scripts/bootstrap.bundle.min.js') }}"></script>
</body>

</html>
