/* #region Application shell and full-width header */
.app-shell {
    --app-header-height: 72px;
    min-height: 100vh;
    padding-top: var(--app-header-height);
}

.left-menu-mode .app-shell {
    display: block
}

.main {
    min-width: 0
}

.left-menu-mode .main {
    margin-left: 235px;
    width: calc(100% - 235px)
}

.top-menu-mode .main {
    width: 100%
}

.app-header {
    width: 100%;
    height: var(--app-header-height);
    min-height: var(--app-header-height);
    box-sizing: border-box;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    position: fixed;
    top: 0;
    z-index: 1700;
    box-shadow: 0 4px 14px rgba(15,23,42,.05)
}

.header-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px
}

    .header-right span {
        font-weight: 700 !important;
    }

.logout {
    background: #eef4ff;
    color: var(--primary);
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 700
}

.page-heading h1 {
    font-size: 20px;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -.025em;
    color: #0f172a
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit
}

.top-brand strong {
    white-space: nowrap;
    font-size: 20px
}

.brand-logo {
    width: 52px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    overflow: hidden
}

    .brand-logo img {
        max-width: 46px;
        max-height: 38px;
        object-fit: contain
    }

.brand-text small {
    display: block;
    color: #8ea0b8;
    font-size: 12px;
    margin-top: 2px
}

.app-brand {
    min-width: 0;
    max-width: 260px;
    flex: 0 1 auto
}

    .app-brand .brand-text {
        min-width: 0;
        display:none;
    }

        .app-brand .brand-text strong,
        .app-brand .brand-text small {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        .app-brand .brand-text strong {
            color: #17243a;
            font-size: 17px
        }

    .app-brand .brand-logo img {
        border-radius: 0
    }

/* The side navigation begins below the shared header instead of creating a separate header column. */
.side-menu {
    width: 235px;
    background: #20262e;
    color: #eaf1fb;
    position: fixed;
    left: 0;
    top: var(--app-header-height);
    bottom: 0;
    min-height: 0;
    overflow: auto;
    border-right: 1px solid #171d24;
    z-index: 1450;
    transition: width .18s ease
}
/* #endregion */

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    background: #f7faff;
    display: grid;
    place-content: center;
    gap: 3px;
    cursor: pointer;
    flex: 0 0 auto
}

    .sidebar-toggle span {
        width: 15px;
        height: 2px;
        border-radius: 3px;
        background: #334155;
        display: block
    }

.menu-list {
    padding: 0;
    margin: 0
}

.menu-node {
    position: relative
}

.side-menu .menu-link {
    min-height: 52px;
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,.075);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f4f8ff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2
}

    .side-menu .menu-link:hover, .side-menu .menu-node.open > .menu-link {
        background: #2c3540;
        color: #fff
    }

.menu-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-icon);
    background: rgba(247,200,70,.12);
    font-size: 0
}

    .menu-icon svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round
    }

.menu-text {
    display: inline-block;
    min-width: 0
}

.side-menu .menu-children {
    display: none;
    margin: 0 0 0 28px;
    padding: 3px 0 3px 8px;
    border-left: 1px solid rgba(255,255,255,.12)
}

.side-menu .menu-node.open > .menu-children {
    display: block
}

.side-menu .menu-children .menu-link {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 600;
    border-bottom: 0;
    color: #dbe8f8
}

.top-menu {
    justify-content:center;
    background: var(--menu-bg);
    color: var(--menu-text);
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 6px 5px;
    min-height: 74px;
    position: sticky;
    top: var(--app-header-height);
    z-index: 1400;
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
    max-width: 100%;
    overflow: visible;
    flex-wrap: wrap
}

    .top-menu > .menu-node {
        display: inline-block;
        position: relative;
        border: 0;
        flex: 0 0 auto
    }

        .top-menu > .menu-node > .menu-link, .top-menu-link {
            min-width: 75px;
            min-height: 62px;
            padding: 5px 5px;
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            color: var(--menu-text);
            font-size: 12px;
            font-weight: 600;
            text-align: center;
            line-height: 1.1;
            white-space: normal
        }

            .top-menu > .menu-node > .menu-link:hover, .top-menu-link:hover, .top-menu > .menu-node:hover > .menu-link {
                background: rgba(255,255,255,.10);
                color: #fff
            }

            .top-menu > .menu-node > .menu-link .menu-icon, .top-menu-link .menu-icon {
                width: 34px;
                height: 30px;
                min-width: 34px;
                background: rgba(247,200,70,.16);
                color: var(--menu-icon);
                border-radius: 10px
            }

                .top-menu > .menu-node > .menu-link .menu-icon svg, .top-menu-link .menu-icon svg {
                    width: 22px !important;
                    height: 22px !important;
                    stroke-width: 2.15pt;
                }

            .top-menu > .menu-node:hover > .menu-link .menu-icon, .top-menu-link:hover .menu-icon {
                background: rgba(247,200,70,.24);
                color: #ffe176
            }

    .top-menu .menu-text {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .top-menu .menu-children {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 270px;
        max-height: calc(100vh - 165px);
        overflow: visible;
        /*overflow-y: auto;
        overflow-x: hidden;*/
        background: #fff;
        border: 1px solid var(--border);
        box-shadow: 0 18px 40px rgba(15,23,42,.18);
        border-radius: 0 0 12px 12px;
        margin: 0;
        padding: 7px;
        z-index: 9000
    }

    .top-menu > .menu-node:nth-last-child(-n+6) > .menu-children {
        left: auto;
        right: 0
    }

    .top-menu .menu-node:hover > .menu-children, .top-menu .menu-node.open > .menu-children {
        display: block
    }

    .top-menu .menu-children .menu-link {
        width: 100%;
        min-height: 32px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 7px 8px;
        border-radius: 7px;
        color: #1f2937;
        font-size: 12.2px;
        font-weight: 500;
        text-align: left;
        white-space: nowrap
    }

        .top-menu .menu-children .menu-link:hover {
            background: #f1f5f9;
            color: var(--primary)
        }

    .top-menu .menu-children .menu-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        color: var(--primary);
        background: #eef3f9
    }

        .top-menu .menu-children .menu-icon svg {
            width: 15px !important;
            height: 15px !important
        }

    .top-menu .menu-children .menu-text {
        max-width: 210px;
        white-space: nowrap
    }
    .top-menu .menu-children .menu-node {
        position: relative
    }

    .top-menu .menu-children .menu-children {
        position: absolute;
        top: -7px;
        left: 100%;
        width: 250px;
        margin: 0 0 0 6px;
        padding: 7px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(15,23,42,.18);
        z-index: 9001;
        overflow: visible;
        max-height: none;
    }

        /* Only clip/scroll the deepest panel — one with no further submenus inside it */
        .top-menu .menu-children .menu-children:not(:has(.menu-node.has-children)) {
            max-height: calc(100vh - 165px);
            overflow-y: auto;
            overflow-x: hidden;
        }

    .top-menu .menu-children .menu-node.flyout-left > .menu-children {
        left: auto;
        right: 100%;
        margin: 0 6px 0 0
    }
    /*.top-menu .menu-children .menu-children {
        position: static;
        width: auto;
        min-width: 0;
        max-height: none;
        overflow: visible;
        margin: 3px 0 5px 25px;
        padding: 4px 0 4px 8px;
        border: 0;
        border-left: 1px solid #d9e3ef;
        border-radius: 0;
        background: #f8fafc;
        box-shadow: none
    }*/

    .top-menu .menu-children .menu-node.has-children > .menu-link::after {
        content: "";
        margin-left: auto;
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
        background: currentColor;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>') center/contain no-repeat;
        color: #94a3b8;
    }
    .top-menu .menu-children .menu-node.has-children:hover > .menu-link::after,
    .top-menu .menu-children .menu-node.has-children.open > .menu-link::after {
        color: var(--primary);
    }
.breadcrumb-line {
    display:none;
    padding: 10px 24px;
    font-size: 13px;
    color: var(--muted);
    background: #f9fafb;
    border-bottom: 1px solid var(--border)
}

.left-menu-mode.sidebar-collapsed .side-menu {
    width: 64px
}

.left-menu-mode.sidebar-collapsed .main {
    margin-left: 64px;
    width: calc(100% - 64px)
}

.left-menu-mode.sidebar-collapsed .side-menu .menu-link {
    justify-content: center;
    padding: 10px 0;
    gap: 0
}

.left-menu-mode.sidebar-collapsed .side-menu > .menu-list > .menu-node > .menu-link > .menu-text,
.left-menu-mode.sidebar-collapsed .side-menu > .menu-list > .menu-node.has-children > .menu-link::after {
    display: none !important
}
/* #region Collapsed sidebar flyout */
.trv-side-flyout {
    position: fixed;
    min-width: 220px;
    max-width: 280px;
    padding: 6px;
    background: #20262e;
    border: 1px solid #171d24;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(15,23,42,.28);
    z-index: 9500;
    display: none;
    overflow: visible;
}

    .trv-side-flyout.is-open {
        display: block;
    }

    /* Only scroll a panel if it has no further nested submenu inside it */
    .trv-side-flyout:not(:has(.menu-node.has-children)) {
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .trv-side-flyout .menu-node {
        position: relative
    }

    .trv-side-flyout .menu-children {
        display: none;
        position: absolute;
        top: -6px;
        left: 100%;
        margin: 0 0 0 6px;
        padding: 6px;
        background: #20262e;
        border: 1px solid #171d24;
        border-radius: 10px;
        box-shadow: 0 18px 40px rgba(15,23,42,.28);
        z-index: 9600;
        overflow: visible;
        width:100%;
    }

    .trv-side-flyout .menu-node.open > .menu-children {
        display: block;
    }

    /* Same rule applies recursively at every nested depth */
    .trv-side-flyout .menu-children:not(:has(.menu-node.has-children)) {
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .trv-side-flyout .menu-node.flyout-left > .menu-children {
        left: auto;
        right: 100%;
        margin: 0 6px 0 0;
    }

    .trv-side-flyout .menu-link {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 38px;
        padding: 8px 10px;
        font-size: 12.5px;
        font-weight: 600;
        color: #dbe8f8;
    }

        .trv-side-flyout .menu-link:hover,
        .trv-side-flyout .menu-node.open > .menu-link {
            background: #2c3540;
            color: #fff;
        }

    .trv-side-flyout .menu-node.has-children > .menu-link::after {
        content: "";
        display: inline-block;
        margin-left: auto;
        width: 12px;
        height: 12px;
        flex: 0 0 auto;
        background: currentColor;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>') center/contain no-repeat;
        color: #8ea0b8;
    }

    .trv-side-flyout .menu-node.has-children:hover > .menu-link::after,
    .trv-side-flyout .menu-node.has-children.open > .menu-link::after {
        color: #ffe176;
    }

    .trv-side-flyout,
    .trv-side-flyout .menu-children {
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,.16) transparent;
    }

        .trv-side-flyout::-webkit-scrollbar,
        .trv-side-flyout .menu-children::-webkit-scrollbar {
            width: 3px;
        }

        .trv-side-flyout::-webkit-scrollbar-thumb,
        .trv-side-flyout .menu-children::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,.16);
            border-radius: 3px;
        }
.left-menu-mode.sidebar-collapsed .side-menu > .menu-list > .menu-node > .menu-link > .menu-text,
.left-menu-mode.sidebar-collapsed .side-menu > .menu-list > .menu-node.has-children > .menu-link::after {
    display: none !important
}
.left-menu-mode.sidebar-collapsed:not(.sidebar-expanded) .side-menu > .menu-list > .menu-node > .menu-children {
    display: none !important;
}
.side-menu .menu-children .menu-node.has-children > .menu-link::after {
    content: "";
    margin-left: auto;
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    background: currentColor;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>') center/contain no-repeat;
    color: #9fb0c4;
    transition: transform .18s ease;
}

.side-menu .menu-children .menu-node.has-children.open > .menu-link::after {
    transform: rotate(90deg);
}

.side-menu .menu-children .menu-node .menu-children {
    display: none;
    margin: 0 0 0 20px;
    padding: 2px 0 2px 8px;
    border-left: 1px solid rgba(255,255,255,.12);
}

.side-menu .menu-children .menu-node.open > .menu-children {
    display: block;
}
/* #endregion */
.left-menu-mode.sidebar-collapsed .side-menu .menu-icon {
    width: 28px;
    height: 28px;
    min-width: 28px
}

    .left-menu-mode.sidebar-collapsed .side-menu .menu-icon svg {
        width: 20px;
        height: 20px
    }

.left-menu-mode.sidebar-collapsed .side-menu .menu-node > .menu-link[title]:hover::before {
    content: attr(title);
    position: fixed;
    left: 70px;
    background: #111827;
    color: #fff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 12px 30px rgba(15,23,42,.25)
}
/* Works at any nesting depth inside the side menu */
.side-menu .menu-node > .menu-children {
    display: none;
    margin: 0 0 0 28px;
    padding: 3px 0 3px 8px;
    border-left: 1px solid rgba(255,255,255,.12);
}

.side-menu .menu-node.open > .menu-children {
    display: block;
}

.side-menu .menu-children .menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 600;
    border-bottom: 0;
    color: #dbe8f8;
}

.side-menu .menu-node.has-children > .menu-link::after {
    content: "";
    margin-left: auto;
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    background: currentColor;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>') center/contain no-repeat;
    color: #9fb0c4;
    transition: transform .18s ease;
}

.side-menu .menu-node.has-children.open > .menu-link::after {
    transform: rotate(90deg);
}
@media(max-width:1100px) {
    .app-brand .brand-text {
        min-width: 0;
        display: none;
    }

    .left-menu-mode .side-menu {
        position: fixed;
        top: var(--app-header-height, 62px);
        left: 0;
        bottom: 0;
        width: 235px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 1000;
        box-shadow: 18px 0 40px rgba(15,23,42,.20)
    }

    .left-menu-mode .main {
        margin-left: 0;
        width: 100%
    }

    .left-menu-mode.sidebar-expanded .side-menu {
        transform: translateX(0)
    }

    .left-menu-mode.sidebar-expanded .main {
        margin-left: 0;
        width: 100%
    }

    .app-shell {
        --app-header-height: 62px
    }

    .left-menu-mode .app-header {
        align-items: center;
        gap: 10px;
        flex-direction: row;
        padding: 8px 14px
    }

    .left-menu-mode .header-left {
        gap: 10px
    }

    .left-menu-mode .header-right {
        width: auto;
        justify-content: flex-end
    }

    .left-menu-mode .page-heading {
        display: none !important;
    }

    .left-menu-mode .app-brand {
        max-width: 220px
    }

        .left-menu-mode .app-brand .brand-text small {
            display: none
        }

    .top-menu {
        top: 0;
        position: relative;
        min-height: 68px;
        padding: 6px 10px
    }

        .top-menu > .menu-node > .menu-link, .top-menu-link {
            min-width: 70px
        }

    .page-heading h1 {
        font-size: 20px
    }

    .breadcrumb-line {
        padding: 9px 14px
    }

    .content {
        min-height: calc(100vh - 110px)
    }
}

@media(max-width:520px) {
    .left-menu-mode.sidebar-collapsed .main {
        margin-left: 0 !important;
        width: 100%;
    }
    .app-shell {
        --app-header-height: 58px
    }

    .sidebar-toggle {
        width: 34px;
        height: 32px
    }

    .header-right {
        font-size: 12px
    }

    .left-menu-mode .app-header {
        padding: 7px 10px
    }

    .left-menu-mode .app-brand {
        max-width: 170px
    }

        .left-menu-mode .app-brand .brand-logo {
            width: 36px;
            height: 36px
        }

    .left-menu-mode .header-right > span {
        display: none
    }

    .logout {
        padding: 7px 10px
    }

    .content {
        padding: 12px
    }

    .top-menu > .menu-node > .menu-link, .top-menu-link {
        min-width: 66px;
        font-size: 11.5px
    }

        .top-menu > .menu-node > .menu-link .menu-icon {
            width: 32px
        }
}

/* #region Top-menu mobile drawer */
.top-menu-toggle,
.top-menu-mobile-heading,
.top-menu-mobile-account,
.top-menu-backdrop {
    display: none;
}

@media (max-width: 1100px) {
    .top-menu-mode .app-shell {
        --app-header-height: 58px;
    }

    .top-menu-mode .app-header {
        height: var(--app-header-height);
        min-height: var(--app-header-height);
        padding: 8px 12px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 2500;
    }

    .top-menu-mode .header-left {
        width: 100%;
        flex: 1;
        gap: 10px;
    }

    .top-menu-mode .page-heading,
    .top-menu-mode .header-right {
        display: none;
    }

    .top-menu-mode .top-brand {
        min-width: 0;
        flex: 1;
    }

        .top-menu-mode .top-brand .brand-logo {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: #f5f8fc;
        }

            .top-menu-mode .top-brand .brand-logo img {
                max-width: 32px;
                max-height: 32px;
            }

        .top-menu-mode .top-brand strong {
            display: block;
            max-width: 220px;
            overflow: hidden;
            font-size: 16px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .top-menu-mode .top-menu-toggle {
        width: 40px;
        height: 40px;
        margin-left: auto;
        flex: 0 0 auto;
        display: grid;
        place-content: center;
        gap: 4px;
        border: 1px solid #d7e1ef;
        border-radius: 11px;
        background: #f7faff;
        color: #334155;
    }

        .top-menu-mode .top-menu-toggle span {
            width: 18px;
            height: 2px;
            display: block;
            border-radius: 3px;
            background: currentColor;
            transition: transform .18s ease, opacity .18s ease;
        }

    .top-menu-mode.top-menu-open .top-menu-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .top-menu-mode.top-menu-open .top-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .top-menu-mode.top-menu-open .top-menu-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .top-menu-mode .top-menu {
        width: min(340px, calc(100vw - 42px));
        height: 100dvh;
        max-width: 100%;
        min-height: 0;
        padding: 10px;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 3px;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 2400;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        background: var(--menu-bg);
        box-shadow: 18px 0 44px rgba(15, 23, 42, .28);
        overscroll-behavior: contain;
    }

    .top-menu-mode.top-menu-open .top-menu {
        transform: translateX(0);
    }

    .top-menu-mode .top-menu-mobile-heading {
        min-height: 48px;
        margin-bottom: 4px;
        padding: 4px 5px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255,255,255,.14);
        color: #fff;
        font-size: 14px;
        font-weight: 800;
    }

        .top-menu-mode .top-menu-mobile-heading button {
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.16);
            border-radius: 9px;
            background: rgba(255,255,255,.08);
            color: #fff;
            font-size: 23px;
            line-height: 1;
        }

    .top-menu-mode .top-menu > .menu-node,
    .top-menu-mode .top-menu .menu-node {
        width: 100%;
        display: block;
        position: relative;
    }

        .top-menu-mode .top-menu > .menu-node > .menu-link,
        .top-menu-mode .top-menu-link,
        .top-menu-mode .top-menu .menu-children .menu-link {
            width: 100%;
            min-width: 0;
            min-height: 46px;
            padding: 7px 9px;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            border-radius: 9px;
            color: #f8fbff;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.25;
            text-align: left;
            white-space: normal;
        }

            .top-menu-mode .top-menu > .menu-node > .menu-link:hover,
            .top-menu-mode .top-menu-link:hover,
            .top-menu-mode .top-menu .menu-node.open > .menu-link {
                background: rgba(255,255,255,.10);
                color: #fff;
            }

            .top-menu-mode .top-menu > .menu-node > .menu-link .menu-icon,
            .top-menu-mode .top-menu-link .menu-icon,
            .top-menu-mode .top-menu .menu-children .menu-icon {
                width: 32px;
                height: 32px;
                min-width: 32px;
                border-radius: 9px;
                color: var(--menu-icon);
                background: rgba(247,200,70,.14);
            }

                .top-menu-mode .top-menu .menu-icon svg,
                .top-menu-mode .top-menu .menu-children .menu-icon svg {
                    width: 19px !important;
                    height: 19px !important;
                }

    .top-menu-mode .top-menu .menu-text,
    .top-menu-mode .top-menu .menu-children .menu-text {
        max-width: none;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .top-menu-mode .top-menu .menu-node.has-children > .menu-link::after {
        content: "";
        margin-left: auto;
        width: 13px;
        height: 13px;
        flex: 0 0 auto;
        background: currentColor;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>') center/contain no-repeat;
        color: #cbd5e1;
        transition: transform .18s ease;
    }

    .top-menu-mode .top-menu .menu-node.has-children.open > .menu-link::after {
        transform: rotate(90deg);
    }

    .top-menu-mode .top-menu .menu-children,
    .top-menu-mode .top-menu .menu-node:hover > .menu-children {
        display: none;
        width: auto;
        max-height: none;
        margin: 2px 0 5px 20px;
        padding: 3px 0 3px 8px;
        position: static;
        overflow: visible;
        border: 0;
        border-left: 1px solid rgba(255,255,255,.16);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .top-menu-mode .top-menu .menu-node.open > .menu-children {
        display: block;
    }

    .top-menu-mode .top-menu .menu-children .menu-link {
        min-height: 39px;
        padding: 6px 8px;
        color: #dbeafe;
        font-size: 11.5px;
        font-weight: 600;
    }

    .top-menu-mode .top-menu-mobile-account {
        margin-top: auto;
        padding: 12px 5px 3px;
        display: flex;
        align-items: center;
        gap: 10px;
        border-top: 1px solid rgba(255,255,255,.14);
    }

        .top-menu-mode .top-menu-mobile-account > span {
            min-width: 0;
            flex: 1;
            overflow: hidden;
            color: #dbeafe;
            font-size: 11px;
            font-weight: 700;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .top-menu-mode .top-menu-mobile-account .logout {
            padding: 7px 10px;
            background: rgba(255,255,255,.10);
            color: #fff;
            font-size: 11px;
        }

    .top-menu-mode .top-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2300;
        display: block;
        border: 0;
        background: rgba(15,23,42,.48);
        backdrop-filter: blur(2px);
    }

        .top-menu-mode .top-menu-backdrop[hidden] {
            display: none;
        }

    body.top-menu-mode.top-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 520px) {
    .top-menu-mode .app-header {
        padding: 7px 10px;
    }

    .top-menu-mode .top-brand strong {
        max-width: 175px;
        font-size: 15px;
    }

    .top-menu-mode .content {
        padding: 10px;
    }

    .top-menu-mode .breadcrumb-line {
        padding: 8px 10px;
        font-size: 12px;
    }
}
/* #endregion */

/* Unified configured page heading. Keeps every non-search page compact and consistent. */
.page-level-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    margin: 0 0 14px;
    padding: 12px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15,42,95,.04)
}

.page-level-heading__icon, .page-heading__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: color-mix(in srgb,var(--primary,#0875ad) 10%,#fff);
    color: var(--primary,#0875ad);
    font-size: 17px
}

.page-level-heading > div:last-child, .page-heading > div:last-child {
    min-width: 0
}

.page-level-heading h1 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -.02em
}

.page-level-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35
}

.app-header .page-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

@media(max-width:768px) {
    .page-level-heading {
        min-height: 60px;
        padding: 10px 12px;
        margin-bottom: 10px
    }

    .page-level-heading__icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px
    }

    .page-level-heading h1 {
        font-size: 18px
    }
}

.top-menu .menu-children .menu-node.open > .menu-link {
    background: #f1f5f9;
    color: var(--primary);
}

.tenant-preview-banner {
    position: relative;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 18px;
    background: #fff7d6;
    border-bottom: 1px solid #e7c95a;
    color: #5d4900;
    font-size: 13px
}

    .tenant-preview-banner > input {
        display: none
    }

    .tenant-preview-banner small {
        opacity: .75
    }

.tenant-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px
}

    .tenant-preview-actions a, .tenant-preview-actions button {
        border: 1px solid #c9aa35;
        background: #fff;
        color: #5d4900;
        border-radius: 7px;
        padding: 6px 10px;
        text-decoration: none;
        font: inherit;
        cursor: pointer
    }

    .tenant-preview-actions button {
        background: #5d4900;
        color: #fff;
        border-color: #5d4900
    }

@media(max-width:700px) {
    .tenant-preview-banner {
        align-items: flex-start;
        flex-direction: column
    }

    .tenant-preview-actions {
        flex-wrap: wrap
    }
}
