.jans-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
    z-index: 1200;
}

.jans-sidebar-shell {
    --jans-sidebar-width: var(--app-sidebar-width, 17.5rem);
    --jans-sidebar-max-width: calc(100vw - 1.5rem);
    min-width: min(var(--jans-sidebar-width), var(--jans-sidebar-max-width));
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: var(--jans-sidebar-width);
    max-width: var(--jans-sidebar-max-width);
    background: #ffffff;
    border-left: none;
    border-right: 1px solid #e5e7eb;
    box-shadow: none;
    overflow: hidden;
    transition: width 200ms ease, transform 200ms ease;
    z-index: 1210;
}

.jans-sidebar-shell.is-closed {
    width: 0;
    min-width: 0;
    transform: translateX(-100%);
}

.jans-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.jans-sidebar-content::-webkit-scrollbar {
    display: none;
}

.jans-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.jans-sidebar-menu::-webkit-scrollbar {
    width: 0.4rem;
}

.jans-sidebar-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.jans-sidebar-header {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.jans-sidebar-footer {
    flex: 0 0 auto;
}

.jans-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: 64px;
    padding: 0 1rem;
    border-radius: 0;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    text-decoration: none;
}

.jans-sidebar-brand:hover {
    background: #f9fafb;
    color: #111827;
}

.jans-sidebar-brand-icon {
    display: block;
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.jans-sidebar-brand strong {
    display: block;
    line-height: 1.1;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.jans-sidebar-avatar-button {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.jans-sidebar-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jans-sidebar-avatar-button .rz-gravatar {
    width: 100%;
    height: 100%;
    border-radius: 999px;
}

.jans-sidebar-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
}

.jans-sidebar-avatar-fallback .rz-navigation-item-icon {
    font-size: 3.25rem;
}

.jans-sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #eef2f7;
    border-radius: 14px;
    padding: 0.4rem 0.75rem;
    gap: 0.15rem;
    border: 1px solid #e2e8f0;
}

.jans-sidebar-search-icon {
    color: #64748b;
}

.jans-sidebar-search-input {
    flex: 1 1 auto;
    border: none;
    background: transparent;
    color: #0f172a;
    outline: none;
    font-size: 0.9rem;
}

.jans-sidebar-search-input::placeholder {
    color: #94a3b8;
}

.jans-sidebar-shell .jans-panel-menu {
    background: transparent;
    color: #374151;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 100%;
    gap: 0.18rem;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-item {
    width: 100%;
}

.jans-sidebar-shell .jans-panel-menu > .jans-panel-menu-item > .jans-panel-menu-link {
    background: transparent;
    color: #374151;
    border-radius: 0;
    padding: 0 1rem;
    border: 0;
    border-left: 3px solid transparent;
    min-height: 2.75rem;
}

.jans-sidebar-shell .jans-panel-menu > .jans-panel-menu-item > .jans-panel-menu-link:hover {
    background: #f8fafc;
    color: #111827;
}

.jans-sidebar-shell .jans-panel-menu > .jans-panel-menu-item > .jans-panel-menu-link .jans-panel-menu-icon {
    color: #6b7280;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-link {
    color: #374151;
    border-radius: 0;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-text {
    color: inherit;
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-icon {
    color: #6b7280;
    width: 1.25rem;
    min-width: 1.25rem;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-item.is-active > .jans-panel-menu-link {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    box-shadow: none;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-item.is-active > .jans-panel-menu-link .jans-panel-menu-icon {
    color: #2563eb;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-group-text {
    color: #6b7280;
    font-weight: 700;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-group {
    background: transparent;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-children {
    background: #f9fafb;
    border-radius: 0;
    margin: 0.2rem 0 0.4rem 0;
    padding: 0.2rem 0;
    border: 0;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-children .jans-panel-menu-link {
    color: #4b5563;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-children .jans-panel-menu-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.jans-sidebar-shell .jans-panel-menu .jans-panel-menu-children .jans-panel-menu-icon {
    color: #6b7280;
}

.jans-sidebar-shell .jans-panel-menu .jans-sidebar-logout {
    margin-top: auto;
}

.jans-sidebar-shell .jans-panel-menu .jans-sidebar-logout > .jans-panel-menu-link {
    background: #fff1f2;
    color: #be123c;
}

.jans-sidebar-shell .jans-panel-menu .jans-sidebar-logout > .jans-panel-menu-link .jans-panel-menu-icon {
    color: #be123c;
}

.jans-sidebar-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.jans-sidebar-search-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.jans-sidebar-search-title {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-left: 0.25rem;
}

.jans-sidebar-search-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.jans-sidebar-search-item:hover {
    background: #f1f5f9;
}

.jans-sidebar-search-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 10px;
    background: #e2e8f0;
    color: #334155;
}

.jans-sidebar-search-tag {
    background: #1d4ed8;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.jans-sidebar-search-name {
    flex: 1 1 auto;
    font-weight: 600;
}

.jans-sidebar-search-type {
    color: #64748b;
    font-size: 0.75rem;
}

.jans-sidebar-search-empty {
    color: #64748b;
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
}

.layout-shell.sidebar-closed .jans-sidebar-content {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .layout-shell {
        position: relative;
    }

    .layout-main {
        width: 100%;
    }

    .jans-sidebar-shell {
        position: fixed;
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        height: 100dvh;
        max-height: 100dvh;
        width: var(--jans-sidebar-width);
        max-width: var(--jans-sidebar-max-width);
        border-right: 1px solid #e5e7eb;
        border-left: none;
        box-shadow: 16px 0 35px rgba(15, 23, 42, 0.12);
        transform: translateX(-100%);
    }

    .layout-shell.sidebar-open .jans-sidebar-shell {
        transform: translateX(0);
        width: var(--jans-sidebar-width);
        min-width: min(var(--jans-sidebar-width), var(--jans-sidebar-max-width));
        max-width: var(--jans-sidebar-max-width);
    }
}

@media (min-width: 1101px) {
    .jans-sidebar-backdrop {
        display: none;
    }

    .layout-shell.sidebar-closed .jans-sidebar-shell {
        width: 0;
        min-width: 0;
        transform: translateX(-100%);
        border-right-width: 0;
        box-shadow: none;
    }

    .layout-shell.sidebar-closed .jans-sidebar-content {
        opacity: 0;
        pointer-events: none;
    }
}
