.shell-nav-toggle-input {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-close,
.sidebar-backdrop {
    display: none;
}

.sidebar-backdrop {
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    color: #17202a;
    cursor: pointer;
    font-weight: 400;
    padding: 0;
    white-space: nowrap;
}

.topbar-menu-button {
    display: none;
}

.sidebar-menu-button {
    flex: 0 0 auto;
}

.mobile-menu-button .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu-icon {
    position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.mobile-menu-icon::before {
    top: -5px;
}

.mobile-menu-icon::after {
    top: 5px;
}

@media (min-width: 1025px) {
    .app-shell {
        transition: grid-template-columns 180ms ease;
    }

    .sidebar {
        z-index: 30;
        transition: background 180ms ease, color 180ms ease, padding 180ms ease;
    }

    .shell-nav-toggle-input:checked ~ .app-shell {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .shell-nav-toggle-input:checked ~ .app-shell .sidebar {
        z-index: 120;
        align-items: center;
        isolation: isolate;
        overflow: visible;
        border-right: 1px solid #dce2ea;
        background: #ffffff;
        color: #17202a;
        padding: 14px 8px;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .brand {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        width: 100%;
        border-bottom: 0;
        padding: 0;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .sidebar-header {
        grid-template-columns: 1fr;
        justify-items: center;
        width: 100%;
        border-bottom: 0;
        padding: 2px 0 8px;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .sidebar-menu-button {
        display: inline-flex;
        width: 38px;
        height: 38px;
        min-height: 38px;
        color: #00b993;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .brand-copy,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-caret,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-children,
    .shell-nav-toggle-input:checked ~ .app-shell .sidebar-note,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group-toggle .nav-label {
        display: none;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 8px;
        overflow: visible;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group {
        position: relative;
        width: 100%;
        justify-items: center;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within {
        z-index: 130;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group::after {
        position: absolute;
        top: 0;
        left: 100%;
        z-index: 131;
        display: none;
        width: 14px;
        height: 42px;
        content: "";
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover::after,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within::after {
        display: block;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group-toggle {
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 0;
        background: transparent;
        color: #00b993;
        padding: 0;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child) {
        display: grid;
        place-items: center;
        position: relative;
        width: 42px;
        height: 42px;
        color: #00b993;
        padding: 0;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child) .nav-label {
        display: none;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child)::after {
        position: absolute;
        top: 50%;
        left: calc(100% + 8px);
        z-index: 65;
        min-width: 154px;
        border: 1px solid #dce2ea;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
        color: #17202a;
        content: attr(data-nav-label);
        font-size: 13px;
        font-weight: 600;
        opacity: 0;
        padding: 9px 11px;
        pointer-events: none;
        transform: translateY(-50%) translateX(-4px);
        transition: opacity 140ms ease, transform 140ms ease;
        white-space: nowrap;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child):hover::after,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child):focus::after {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-item:not(.nav-child).active {
        background: #e7f8f3;
        color: #009a79;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group.expanded > .nav-group-toggle {
        background: #e7f8f3;
        color: #009a79;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group .nav-children {
        position: absolute;
        top: -2px;
        left: calc(100% + 10px);
        z-index: 140;
        display: grid;
        gap: 2px;
        min-width: 236px;
        max-width: 286px;
        margin-left: 0;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
        opacity: 0;
        overflow: hidden;
        padding: 9px;
        pointer-events: none;
        transform: translateX(-4px);
        transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
        visibility: hidden;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-children,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-children {
        position: absolute;
        top: -2px;
        left: calc(100% + 10px);
        z-index: 140;
        display: grid;
        gap: 2px;
        min-width: 236px;
        max-width: 286px;
        margin-left: 0;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
        opacity: 1;
        overflow: hidden;
        padding: 9px;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-children::before,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-children::before {
        color: #17202a;
        content: attr(data-flyout-label);
        font-size: 12px;
        font-weight: 700;
        padding: 2px 7px 7px;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-child,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-child {
        min-height: 32px;
        border-radius: 7px;
        color: #334155;
        font-weight: 500;
        padding: 8px 10px;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-child:hover,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-child:focus,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:hover .nav-child.active,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-child:hover,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-child:focus,
    .shell-nav-toggle-input:checked ~ .app-shell .nav-group:focus-within .nav-child.active {
        background: #e7f8f3;
        color: #009a79;
        text-decoration: none;
    }
}

@media (min-width: 1025px) and (max-width: 1320px) {
    .topbar {
        gap: 12px;
    }

    .top-actions .environment {
        display: none;
    }
}

@media (max-width: 1024px) {
    body {
        overflow-x: hidden;
    }

    .app-shell {
        display: block;
        min-width: 0;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        width: min(320px, calc(100vw - 44px));
        height: 100dvh;
        max-width: 100%;
        box-shadow: 18px 0 36px rgba(15, 23, 42, 0.26);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        background: rgba(15, 23, 42, 0.38);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .shell-nav-toggle-input:checked ~ .app-shell .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .brand {
        padding-right: 74px;
    }

    .mobile-menu-close {
        position: absolute;
        top: 22px;
        right: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        border: 1px solid #dce2ea;
        border-radius: 7px;
        background: #ffffff;
        color: #17202a;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        padding: 6px 9px;
    }

    .topbar-menu-button {
        display: inline-flex;
    }

    .sidebar-menu-button {
        display: none;
    }

    .nav-list {
        grid-template-columns: 1fr;
    }

    .main {
        width: 100%;
    }

    .topbar {
        grid-template-columns: auto 250px minmax(0, 1fr) auto;
        align-items: end;
    }

    .portal-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .top-actions {
        flex-wrap: wrap;
    }

    .portal-topbar .top-actions {
        justify-self: end;
    }
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px 10px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .portal-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .mobile-menu-button {
        grid-column: 1;
        grid-row: 1;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header-metrics {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        gap: 8px;
    }

    .top-actions {
        grid-column: 3;
        grid-row: 1;
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
    }

    .portal-topbar .top-actions {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
    }

    .portal-topbar .header-metrics {
        grid-column: 2;
        grid-row: 1;
    }

    .top-actions .environment {
        display: none;
    }

    .top-actions .environment,
    .top-actions .top-user,
    .top-actions .text-link,
    .top-actions .profile-menu {
        flex: 0 0 auto;
    }

    .profile-dropdown {
        right: 0;
    }
}

@media (max-width: 560px) {
    .sidebar {
        width: min(304px, calc(100vw - 28px));
        padding: 16px 12px;
    }

    .brand {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 9px;
        padding-right: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .mobile-menu-close {
        top: 19px;
        right: 14px;
    }

    .mobile-menu-button {
        min-height: 36px;
        padding: 7px 10px;
    }

    .mobile-menu-button > span:last-child {
        display: none;
    }

    .topbar {
        gap: 8px;
        margin-bottom: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .top-actions {
        gap: 8px;
    }

    .header-metrics {
        flex-wrap: wrap;
        gap: 5px;
    }

    .header-metric {
        gap: 4px;
        font-size: 11px;
    }

    .header-metric > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .profile-button {
        width: 34px;
        height: 34px;
    }

    .pagination-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-summary {
        margin-left: 0;
    }
}
