.client-sidebar-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.client-sidebar-head .logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

.client-nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #1d4ed8;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.client-nav-toggle:hover {
    background: #eff6ff;
}

.client-nav-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.client-nav-icon {
    width: 18px;
    display: grid;
    gap: 4px;
}

.client-nav-icon span {
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        animation: none;
    }

    .sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
        position: relative;
        padding: 12px;
        gap: 12px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid #e0e0e0;
    }

    .client-sidebar-head {
        justify-content: center;
        min-height: 52px;
    }

    .client-sidebar-head .logo {
        min-height: 0;
        margin-bottom: 0;
        flex: 0 0 auto;
        justify-content: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo-mark {
        width: 64px;
        height: 64px;
    }

    .logo-image {
        width: 56px;
        height: 56px;
    }

    .client-nav-toggle {
        display: inline-flex;
        position: absolute;
        left: 0;
    }

    body.client-nav-ready .nav-menu {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        display: grid;
        align-content: start;
        width: min(300px, 85vw);
        height: 100vh;
        height: 100dvh;
        padding: 84px 16px 24px;
        margin: 0;
        overflow-y: auto;
        background: #fff;
        box-shadow: 12px 0 32px rgba(15, 23, 42, 0.18);
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 220ms ease, visibility 220ms;
    }

    body.client-nav-ready .sidebar.client-menu-open .nav-menu {
        transform: translateX(0);
        visibility: visible;
    }

    body.client-nav-ready.client-menu-open::before {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(15, 23, 42, 0.42);
        content: "";
    }

    body.client-nav-ready .sidebar.client-menu-open {
        z-index: 45;
    }

    body.client-nav-ready .sidebar.client-menu-open .nav-item {
        position: relative;
        z-index: 51;
    }

    .nav-item {
        min-width: 0;
        min-height: 52px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
        font-size: 14px;
        text-align: left;
    }

    .main-content {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.client-nav-ready .nav-menu {
        transition: none;
    }
}