:root {
    --app-topbar-height: 4rem;
    --app-sidebar-width: 17.25rem;
    --app-sidebar-compact-width: 4.75rem;
    --app-nav-border: #dce3ea;
    --app-nav-muted: #667085;
    --app-nav-text: #1f2937;
    --app-nav-hover: #eef4ff;
    --app-nav-active: #e5efff;
    --app-nav-primary: #0d6efd;
    --app-nav-accent: #d62828;
}

body.has-app-navigation {
    box-sizing: border-box;
    min-height: 100vh;
    padding-top: var(--app-topbar-height);
    padding-left: var(--app-sidebar-width);
    transition: padding-left .18s ease;
}

.app-topbar {
    position: fixed;
    z-index: 1035;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--app-topbar-height);
    padding: 0 .9rem;
    border-bottom: 1px solid var(--app-nav-border);
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}

.app-topbar-start,
.app-topbar-actions {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .4rem;
}

.app-unit-selector {
    align-items: center;
    background: #f4f7fb;
    border: 1px solid #d8e0eb;
    border-radius: 6px;
    display: flex;
    gap: 0.4rem;
    min-width: 190px;
    padding: 0 0.55rem;
}

.app-unit-selector i {
    color: #315b86;
}

.app-unit-selector select {
    appearance: auto;
    background: transparent;
    border: 0;
    color: #24364a;
    font-size: 0.82rem;
    font-weight: 600;
    height: 34px;
    min-width: 0;
    outline: 0;
    width: 100%;
}

@media (max-width: 767.98px) {
    .app-unit-selector {
        min-width: 0;
        max-width: 148px;
    }

    .app-unit-selector select {
        max-width: 112px;
        text-overflow: ellipsis;
    }
}

.app-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    color: #344054;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-decoration: none;
}

.app-icon-button:hover,
.app-icon-button:focus-visible {
    color: #0b5ed7;
    background: var(--app-nav-hover);
    outline: 0;
}

.app-icon-button i {
    font-size: 1.2rem;
}

.app-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    margin-left: .35rem;
    color: #14395b;
    text-decoration: none;
}

.app-topbar-brand:hover,
.app-topbar-brand:focus {
    color: #0b5ed7;
}

.app-topbar-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0;
}

.app-topbar-brand-mark {
    width: .45rem;
    height: .45rem;
    background: var(--app-nav-accent);
    transform: rotate(45deg);
}

.app-account-button {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 2.65rem;
    padding: .25rem .45rem;
    color: var(--app-nav-text);
    border: 0;
    border-radius: 6px;
    background: transparent;
    gap: .55rem;
}

.app-account-button:hover,
.app-account-button:focus-visible,
.app-account-button[aria-expanded="true"] {
    background: #f1f5f9;
    outline: 0;
}

.app-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #fff;
    border-radius: 50%;
    background: #14395b;
}

.app-account-copy {
    flex-direction: column;
    max-width: 13rem;
    line-height: 1.15;
    text-align: left;
}

.app-account-copy strong,
.app-account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-copy strong {
    font-size: .8rem;
}

.app-account-copy small {
    margin-top: .15rem;
    color: var(--app-nav-muted);
    font-size: .7rem;
}

.app-account-menu {
    width: min(19rem, calc(100vw - 1rem));
    padding: .45rem;
    border-color: var(--app-nav-border);
    border-radius: 6px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
}

.app-account-menu-identity {
    display: flex;
    flex-direction: column;
    padding: .55rem .75rem .3rem;
    overflow-wrap: anywhere;
}

.app-account-menu-identity span {
    color: var(--app-nav-muted);
    font-size: .75rem;
}

.app-sidebar {
    width: min(88vw, 20rem);
    color: var(--app-nav-text);
    border-right: 1px solid var(--app-nav-border);
    background: #fff;
}

.app-sidebar-mobile-header {
    min-height: var(--app-topbar-height);
    border-bottom: 1px solid var(--app-nav-border);
}

.app-sidebar-mobile-brand {
    color: #14395b;
    font-size: 1rem;
    font-weight: 800;
}

.app-sidebar-mobile-caption {
    color: var(--app-nav-muted);
    font-size: .75rem;
}

.app-sidebar-body {
    padding: .7rem .65rem 1.25rem;
    overflow-y: auto;
}

.app-nav-area + .app-nav-area {
    margin-top: .9rem;
}

.app-nav-area-title {
    margin: 0;
    padding: .25rem .7rem .35rem;
    color: #8993a4;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
}

.app-nav-module + .app-nav-module {
    margin-top: .15rem;
}

.app-nav-module-toggle {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) 1rem;
    align-items: center;
    width: 100%;
    min-height: 2.55rem;
    padding: .35rem .55rem;
    color: #344054;
    border: 0;
    border-radius: 6px;
    background: transparent;
    gap: .45rem;
    text-align: left;
}

.app-nav-module-toggle:hover,
.app-nav-module-toggle:focus-visible {
    color: #0b5ed7;
    background: var(--app-nav-hover);
    outline: 0;
}

.app-nav-module.is-active > .app-nav-module-toggle {
    color: #084298;
    background: #f2f6fc;
    font-weight: 700;
}

.app-nav-module-icon {
    font-size: 1.05rem;
    text-align: center;
}

.app-nav-module-name {
    min-width: 0;
    font-size: .84rem;
    overflow-wrap: normal;
    word-break: normal;
}

.app-nav-module-chevron {
    font-size: .72rem;
    transition: transform .16s ease;
}

.app-nav-module-toggle[aria-expanded="true"] .app-nav-module-chevron {
    transform: rotate(180deg);
}

.app-nav-module-items {
    display: grid;
    gap: .1rem;
    padding: .15rem 0 .25rem 2.6rem;
}

.app-nav-module-items[hidden] {
    display: none;
}

.app-nav-item {
    position: relative;
    display: block;
    min-height: 2.15rem;
    padding: .45rem .55rem;
    color: #526071;
    border-radius: 4px;
    font-size: .8rem;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: normal;
    word-break: normal;
}

.app-nav-item:hover,
.app-nav-item:focus-visible {
    color: #0b5ed7;
    background: var(--app-nav-hover);
    outline: 0;
}

.app-nav-item.is-active {
    color: #084298;
    background: var(--app-nav-active);
    font-weight: 700;
}

.app-nav-item.is-active::before {
    position: absolute;
    top: .35rem;
    bottom: .35rem;
    left: -.45rem;
    width: .2rem;
    border-radius: 2px;
    background: var(--app-nav-primary);
    content: "";
}

.app-navigation-search {
    position: absolute;
    z-index: 1060;
    top: calc(100% + .4rem);
    right: .75rem;
    width: min(32rem, calc(100vw - 1.5rem));
    max-height: min(34rem, calc(100vh - 5.5rem));
    overflow: hidden;
    border: 1px solid var(--app-nav-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .2);
}

.app-navigation-search[hidden] {
    display: none;
}

.app-navigation-search-header {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) 2rem;
    align-items: center;
    min-height: 3.4rem;
    padding: .45rem .7rem;
    border-bottom: 1px solid var(--app-nav-border);
    gap: .35rem;
}

.app-navigation-search-header > i {
    color: var(--app-nav-muted);
    text-align: center;
}

.app-navigation-search-header input {
    width: 100%;
    min-width: 0;
    padding: .45rem .25rem;
    border: 0;
    outline: 0;
    font-size: .9rem;
}

.app-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: #667085;
    border: 0;
    border-radius: 4px;
    background: transparent;
}

.app-search-close:hover,
.app-search-close:focus-visible {
    color: #111827;
    background: #eef2f6;
    outline: 0;
}

.app-navigation-search-results {
    max-height: min(29rem, calc(100vh - 9rem));
    padding: .45rem;
    overflow-y: auto;
}

.app-navigation-search-result {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) 1.25rem;
    align-items: center;
    min-height: 3.2rem;
    padding: .45rem .6rem;
    color: var(--app-nav-text);
    border-radius: 6px;
    gap: .55rem;
    text-decoration: none;
}

.app-navigation-search-result:hover,
.app-navigation-search-result:focus-visible {
    color: #084298;
    background: var(--app-nav-hover);
    outline: 0;
}

.app-navigation-search-result > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-navigation-search-result strong {
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.app-navigation-search-result small {
    color: var(--app-nav-muted);
    font-size: .72rem;
}

.app-navigation-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #0d6efd;
    border-radius: 5px;
    background: #edf4ff;
}

.app-navigation-search-empty {
    padding: 1.5rem 1rem;
    color: var(--app-nav-muted);
    text-align: center;
}

@media (min-width: 992px) {
    .app-sidebar.offcanvas {
        position: fixed;
        z-index: 1025;
        top: var(--app-topbar-height);
        right: auto;
        bottom: 0;
        left: 0;
        width: var(--app-sidebar-width);
        visibility: visible;
        transform: none;
        transition: width .18s ease;
    }

    .app-sidebar .offcanvas-body {
        display: block;
    }

    .app-sidebar-mobile-header {
        display: none;
    }

    body.has-app-navigation.sidebar-is-compact {
        padding-left: var(--app-sidebar-compact-width);
    }

    body.sidebar-is-compact .app-sidebar.offcanvas {
        width: var(--app-sidebar-compact-width);
    }

    body.sidebar-is-compact .app-nav-area-title,
    body.sidebar-is-compact .app-nav-module-name,
    body.sidebar-is-compact .app-nav-module-chevron,
    body.sidebar-is-compact .app-nav-module-items {
        display: none;
    }

    body.sidebar-is-compact .app-nav-area + .app-nav-area {
        margin-top: .35rem;
        padding-top: .35rem;
        border-top: 1px solid #eef1f5;
    }

    body.sidebar-is-compact .app-nav-module-toggle {
        display: flex;
        justify-content: center;
        padding: .35rem;
    }

    body.sidebar-is-compact .app-nav-module-icon {
        font-size: 1.15rem;
    }
}

@media (max-width: 991.98px) {
    body.has-app-navigation {
        padding-left: 0;
    }

    .app-account-button::after {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        padding-right: .45rem;
        padding-left: .45rem;
    }

    .app-topbar-brand {
        margin-left: 0;
    }

    .app-navigation-search {
        left: .45rem;
        right: .45rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.has-app-navigation,
    .app-sidebar.offcanvas,
    .app-nav-module-chevron {
        transition: none;
    }
}
