@inherits LayoutComponentBase
@inject NavigationManager Nav

<div class="d-flex flex-column min-vh-100 bg-light">

    <!-- 🔹 Admin Navbar -->
    <nav class="navbar navbar-expand-lg navbar-dark" style="background-color:#003d66;">
        <div class="container-fluid">
            <a class="navbar-brand fw-semibold" href="/admin">
                <i class="bi bi-gear-fill me-2"></i> Adminbereich
            </a>

            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#adminNav">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="adminNav">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                    <li class="nav-item">
                        <NavLink class="nav-link text-white" href="/admin/customers" Match="NavLinkMatch.All">
                            <i class="bi bi-buildings me-1"></i> Kunden
                        </NavLink>
                    </li>
                    <li class="nav-item">
                        <NavLink class="nav-link text-white" href="/admin/filters">
                            <i class="bi bi-funnel me-1"></i> Filter
                        </NavLink>
                    </li>
                    <li class="nav-item">
                        <NavLink class="nav-link text-white" href="/admin/tasks">
                            <i class="bi bi-list-check me-1"></i> Aufgaben
                        </NavLink>
                    </li>
                </ul>

                <button class="btn btn-outline-light btn-sm" @onclick="@(() => Nav.NavigateTo("/"))">
                    <i class="bi bi-arrow-left me-1"></i> Zurück
                </button>
            </div>
        </div>
    </nav>

    <!-- 🔹 Body -->
    <main class="flex-fill container py-4">
        @Body
    </main>

    <footer class="text-center text-secondary small py-2 mt-auto border-top">
        @DateTime.Now.Year FilterCair • Adminbereich
    </footer>
</div>
