.shell-menu-tree { list-style: none; padding: 0; margin: 0; }
.shell-menu-tree .shell-menu-tree { padding-left: .8rem; }
.shell-menu-tree a, .shell-menu-tree summary, .mobile-menu-action {
    display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem;
    color: inherit; text-decoration: none; cursor: pointer; overflow-wrap: anywhere;
    border-radius: .25rem;
}
.shell-menu-tree summary { list-style: none; }
.shell-menu-tree summary::after { content: '⌄'; margin-left: auto; }
.shell-menu-tree details[open] > summary::after { content: '⌃'; }
.shell-menu-tree a:hover, .shell-menu-tree summary:hover, .mobile-menu-action:hover {
    background: var(--jtp-sidebar-hover-background);
}
.shell-menu-tree a.active, .mobile-menu-action[aria-pressed="true"] {
    background: var(--jtp-sidebar-active-background);
    box-shadow: inset 3px 0 var(--jtp-sidebar-active-indicator);
}
.shell-menu-tree a:active, .shell-menu-tree summary:active, .mobile-menu-action:active {
    background: var(--jtp-sidebar-active-background);
}
.shell-menu-tree a:focus-visible, summary:focus-visible, .mobile-menu-action:focus-visible,
.shell-control:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.sidebar-brand { display: flex; align-items: center; justify-content: center; height: 3.5rem;
    background: var(--jtp-sidebar-header-background); color: var(--jtp-sidebar-text); text-decoration: none; }
.sidebar-brand img { width: 170px; max-width: 100%; }
.shell-control { min-height: 2rem; padding: .25rem .55rem; background: transparent;
    color: var(--jtp-toprow-text); border: 1px solid var(--jtp-toprow-control-border); border-radius: .25rem; cursor: pointer; }
.shell-control:hover { background: rgba(0,0,0,.16); }
.shell-control:active { background: rgba(0,0,0,.28); }
.desktop-controls { display: flex; flex-shrink: 0; }
.top-row > div:first-child { min-width: 0; }
.desktop-top-menu { display: flex; gap: .5rem; align-items: center; min-width: 0; flex-wrap: wrap; }
.desktop-top-menu > .shell-menu-tree { display: flex; flex-wrap: wrap; }
.desktop-top-menu .shell-menu-tree a { gap: .35rem; }
.desktop-top-menu .shell-menu-tree a > .rzi {
    font-size: 1.1rem;
    font-weight: normal;
    font-variant-caps: normal;
}
.desktop-top-menu .shell-menu-tree a.active {
    background: transparent;
    text-decoration: none;
}
.desktop-top-menu .shell-menu-tree a.active > .menu-label {
    font-weight: 700;
    font-variant-caps: small-caps;
}
.desktop-top-menu .shell-menu-tree a.active,
.mobile-menu-panel .shell-menu-tree a.active,
.mobile-menu-panel .mobile-menu-action[aria-pressed="true"] { box-shadow: none; }
.desktop-top-menu .shell-menu-tree details { position: relative; }
.desktop-top-menu .shell-menu-tree details > .shell-menu-tree {
    position: absolute; top: 100%; min-width: 220px; padding: .3rem;
    background: var(--jtp-sidebar-header-background); box-shadow: 0 .3rem 1rem #0003;
}
.mobile-shell-menu { display: none; }
.mobile-brand { display: none; }
.shell-sidebar-menu {
    --rz-panel-menu-item-color: var(--jtp-sidebar-text);
    --rz-panel-menu-item-background-color: transparent;
    --rz-panel-menu-item-hover-color: var(--jtp-sidebar-text);
    --rz-panel-menu-item-hover-background-color: var(--jtp-sidebar-hover-background);
    --rz-panel-menu-item-active-color: var(--jtp-sidebar-text);
    --rz-panel-menu-item-active-background-color: var(--jtp-sidebar-active-background);
    --rz-panel-menu-item-active-indicator: var(--jtp-sidebar-active-indicator);
    --rz-panel-menu-icon-color: var(--jtp-sidebar-icon-color);
    --rz-panel-menu-item-border: 0;
}
.shell-sidebar-menu .rz-panel-menu,
.shell-sidebar-menu .rz-navigation-menu,
.shell-sidebar-menu .rz-navigation-item,
.shell-sidebar-menu .rz-navigation-item-wrapper {
    background: transparent;
    color: var(--jtp-sidebar-text);
    border: 0;
}
.shell-sidebar-menu .rz-panel-menu { padding: 0; margin: 0; }
.shell-sidebar-menu .rz-navigation-item-link {
    color: var(--jtp-sidebar-text);
    border-left: 3px solid transparent;
    border-radius: .25rem;
}
.shell-sidebar-menu .rz-panel-menu .rz-navigation-item-link { background: transparent; }
.shell-sidebar-menu .rz-navigation-item-wrapper-active > .rz-navigation-item-link {
    border-left-color: var(--jtp-sidebar-active-indicator);
}
.shell-sidebar-menu .rz-navigation-item-wrapper:hover,
.shell-sidebar-menu .rz-navigation-item-wrapper:focus-within {
    background: var(--jtp-sidebar-hover-background);
}
.shell-sidebar-menu .rz-navigation-item-wrapper-active,
.shell-sidebar-menu .rz-navigation-item-link.rz-state-active,
.shell-sidebar-menu .rz-navigation-item-link.rz-state-selected {
    background: var(--jtp-sidebar-active-background);
    border-left-color: var(--jtp-sidebar-active-indicator);
}
.shell-sidebar-menu .rz-navigation-item-icon,
.shell-sidebar-menu .rz-navigation-item-icon-children { color: var(--jtp-sidebar-icon-color); }
.shell-sidebar-menu .rz-navigation-item-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}
.sidebar-collapsed .desktop-sidebar:not(.right-sidebar) .shell-sidebar-menu .rz-navigation-item-text,
.sidebar-collapsed .desktop-sidebar:not(.right-sidebar) .shell-sidebar-menu .rz-navigation-item-icon-children {
    display: none;
}
.sidebar-collapsed .desktop-sidebar:not(.right-sidebar) .shell-sidebar-menu .rz-navigation-item-link {
    justify-content: center;
    padding-inline: 0;
}
.sidebar-collapsed .desktop-sidebar:not(.right-sidebar) .shell-sidebar-menu .rz-navigation-item-icon { margin-inline: 0; }
.right-sidebar { width: var(--jtp-sidebar-width) !important; flex-basis: var(--jtp-sidebar-width) !important; }
@media (max-width: 1023.98px) {
    .desktop-sidebar, .desktop-top-menu, .desktop-controls { display: none !important; }
    .mobile-brand { display: block; }
    .mobile-shell-menu { display: block; }
    .mobile-shell-menu > summary { list-style: none; }
    .mobile-shell-menu > summary::-webkit-details-marker { display: none; }
    .mobile-menu-panel {
        position: absolute; top: 100%; right: 0; width: min(100vw, 400px);
        max-height: calc(100dvh - 3.5rem); overflow-y: auto; padding: .5rem;
        color: var(--jtp-sidebar-text); background: var(--jtp-sidebar-header-background);
        box-shadow: 0 .3rem 1rem #0004; z-index: 100;
    }
    .mobile-menu-section { border-bottom: 1px solid var(--jtp-sidebar-divider-color); }
    .mobile-menu-section > summary { cursor: pointer; padding: .8rem; font-weight: 600; }
    .mobile-menu-action { width: 100%; border: 0; background: transparent; text-align: left; }
    .mobile-account-name { display: block; padding: .65rem .8rem; }
}
