/* Monisystem identity overlay for login and authenticated application shells. */
body.monisystem-brand {
    --monisystem-brand-primary: #030733;
    --monisystem-brand-primary-rgb: 3, 7, 51;
    --monisystem-brand-primary-hover: #080d4a;
    --monisystem-brand-secondary: #0158DE;
    --monisystem-brand-secondary-hover: #0147B4;
    --monisystem-brand-ink: #2b2b2b;
    --monisystem-brand-border: #e4e8ef;
    --monisystem-brand-wash: rgba(1, 88, 222, 0.14);
}

/* Keep the main shell and its route content fluid at wide CSS viewports. */
body.monisystem-brand .hor-header .container,
body.monisystem-brand .main-content .container {
    width: 100%;
    max-width: none !important;
}

body.monisystem-brand .hor-header.header {
    background: var(--monisystem-brand-primary) !important;
    border-bottom: 1px solid var(--monisystem-brand-primary);
    box-shadow: 0 2px 12px rgba(3, 7, 51, 0.14);
    color: #fff;
}

body.monisystem-brand .hor-menu.horizontal-main {
    background: var(--monisystem-brand-primary) !important;
    border-color: rgba(1, 88, 222, 0.5) !important;
    border-top: 0 !important;
    box-shadow: none;
}

body.monisystem-brand .hor-header .horizontalMenu > .horizontalMenu-list {
    justify-content: flex-start;
}

body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a {
    color: #fff !important;
}

body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:hover,
body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:focus-visible,
body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a.active {
    background: transparent !important;
    color: var(--monisystem-brand-secondary) !important;
}

body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:hover {
    /* Emphasize text without changing glyph widths or wrapping the menu. */
    text-shadow: 0.35px 0 currentColor, -0.35px 0 currentColor;
}

body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:hover i,
body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:focus-visible i,
body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a.active i {
    color: var(--monisystem-brand-secondary) !important;
    text-shadow: none;
}

/* Mobile navigation shares the header palette and keeps touch targets legible. */
@media (max-width: 991.98px) {
    body.monisystem-brand .hor-header .horizontalMenu > .horizontalMenu-list {
        background: var(--monisystem-brand-primary) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px;
        padding: 12px 44px 12px 18px;
        font-weight: 500;
        line-height: 24px;
    }

    body.monisystem-brand .hor-header .horizontalMenu .sub-menu {
        background: rgba(255, 255, 255, 0.04) !important;
        border: 0;
        box-shadow: none;
    }

    body.monisystem-brand .hor-header .horizontalMenu .sub-menu li > a {
        display: block;
        min-height: 44px;
        padding-top: 12px;
        padding-bottom: 12px;
        padding-right: 36px;
        line-height: 20px;
        color: #fff !important;
    }

    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:hover,
    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:focus-visible,
    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a.active,
    body.monisystem-brand .hor-header .horizontalMenu > .horizontalMenu-list > li > .ws-activearrow + a,
    body.monisystem-brand .hor-header .horizontalMenu .sub-menu li > a:hover,
    body.monisystem-brand .hor-header .horizontalMenu .sub-menu li > a:focus-visible,
    body.monisystem-brand .hor-header .horizontalMenu .sub-menu li > a.active {
        background: var(--monisystem-brand-primary-hover) !important;
        color: #fff !important;
        text-shadow: none;
        text-decoration: none;
    }

    body.monisystem-brand .hor-header .horizontalMenu a:focus-visible {
        outline: 2px solid #fff;
        outline-offset: -3px;
    }

    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a i,
    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:hover i,
    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a:focus-visible i,
    body.monisystem-brand .hor-header .hor-menu .horizontalMenu > .horizontalMenu-list > li > a.active i,
    body.monisystem-brand .hor-header .horizontalMenu .sub-menu a i,
    body.monisystem-brand .hor-header .horizontalMenu .horizontalMenu-arrow {
        color: #fff !important;
    }

    body.monisystem-brand .hor-header .horizontalMenu > .horizontalMenu-list > li > a .side-menu__icon {
        width: 20px;
        margin: 0;
        text-align: center;
        flex-shrink: 0;
    }

    body.monisystem-brand .hor-header .horizontalMenu > .horizontalMenu-list > li > .horizontalMenu-click {
        height: 52px;
    }

    body.monisystem-brand .hor-header .horizontalMenu .hor-shape1,
    body.monisystem-brand .hor-header .horizontalMenu .hor-shape2,
    body.monisystem-brand .hor-header .horizontalMenu .hor-arrow {
        display: none;
    }

    body.monisystem-brand .hor-header .animated-arrow span,
    body.monisystem-brand .hor-header .animated-arrow span:before,
    body.monisystem-brand .hor-header .animated-arrow span:after {
        background: #fff;
    }

    body.monisystem-brand.active .hor-header .animated-arrow span {
        background: transparent;
    }
}

body.monisystem-brand .hor-header .form-menu-header .form-control,
body.monisystem-brand .hor-header .header-client-field .form-control {
    background: #fff !important;
    border-color: var(--monisystem-brand-border) !important;
    color: var(--monisystem-brand-ink) !important;
}

body.monisystem-brand .header-brand-img.desktop-lgo,
body.monisystem-brand .header-brand-img.dark-logo {
    height: auto;
    width: 130px !important;
    margin: 0 !important;
    vertical-align: middle;
}

body.monisystem-brand .header-brand-img.mobile-logo,
body.monisystem-brand .header-brand-img.darkmobile-logo {
    height: auto;
    width: 32px !important;
    margin: 0 !important;
    vertical-align: middle;
}

body.monisystem-brand .monisystem-brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

body.monisystem-brand .monisystem-brand-mark {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

body.monisystem-brand .monisystem-brand-byline {
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, 0.78);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
}

body.monisystem-brand .hor-header .monisystem-brand-lockup {
    width: 100%;
    gap: 2px;
}

@media (min-width: 576px) {
    body.monisystem-brand .hor-header .monisystem-brand-lockup {
        transform: translateY(3px);
    }
}

body.monisystem-brand .hor-header .header-brand {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 10px !important;
}

@media (max-width: 575.98px) {
    body.monisystem-brand .hor-header .header-brand {
        flex-basis: 48px;
        width: 48px;
        min-width: 48px;
        height: 48px;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    body.monisystem-brand .hor-header .monisystem-brand-lockup {
        width: 32px;
    }

    body.monisystem-brand .hor-header .monisystem-brand-byline {
        font-size: 8px;
    }
}

/* Legacy action buttons use .btn-info; map them to the Monisystem primary. */
body.monisystem-brand .btn-info {
    color: #fff !important;
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-primary) !important;
    box-shadow: none;
}

body.monisystem-brand .btn-info:hover,
body.monisystem-brand .btn-info:active,
body.monisystem-brand .btn-info:not(:disabled):not(.disabled).active,
body.monisystem-brand .show > .btn-info.dropdown-toggle {
    color: #fff !important;
    background-color: var(--monisystem-brand-primary-hover) !important;
    border-color: var(--monisystem-brand-primary-hover) !important;
}

body.monisystem-brand .btn-info:focus,
body.monisystem-brand .btn-info.focus,
body.monisystem-brand .btn-info:not(:disabled):not(.disabled):active:focus,
body.monisystem-brand .show > .btn-info.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(3, 7, 51, 0.22) !important;
}

body.monisystem-brand .btn-info:disabled,
body.monisystem-brand .btn-info.disabled {
    color: #fff !important;
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-primary) !important;
    opacity: 0.65;
}

body.monisystem-brand .avatar {
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-secondary) !important;
}

body.monisystem-brand .btn-primary,
body.monisystem-brand .bg-primary,
body.monisystem-brand .page-item.active .page-link,
body.monisystem-brand .progress-bar.bg-primary {
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-primary) !important;
}

body.monisystem-brand .btn-primary:hover,
body.monisystem-brand .btn-primary:active,
body.monisystem-brand .page-item.active .page-link:hover {
    background-color: var(--monisystem-brand-primary-hover) !important;
    border-color: var(--monisystem-brand-primary-hover) !important;
}

body.monisystem-brand .page-item.active .page-link {
    color: #fff !important;
}

body.monisystem-brand .btn-secondary {
    background-color: var(--monisystem-brand-secondary) !important;
    border-color: var(--monisystem-brand-secondary) !important;
    color: #fff !important;
}

body.monisystem-brand .btn-secondary:hover,
body.monisystem-brand .btn-secondary:active {
    background-color: var(--monisystem-brand-secondary-hover) !important;
    border-color: var(--monisystem-brand-secondary-hover) !important;
    color: #fff !important;
}

/* Badges with an inline background carry the per-situation colors configured by the user. */
body.monisystem-brand .badge-secondary:not([style*="background-color"]),
body.monisystem-brand .bg-secondary {
    background-color: var(--monisystem-brand-secondary) !important;
    border-color: var(--monisystem-brand-secondary) !important;
    color: #fff !important;
}

body.monisystem-brand .btn-outline-primary {
    border-color: var(--monisystem-brand-primary) !important;
    color: var(--monisystem-brand-primary) !important;
}

body.monisystem-brand .btn-outline-primary:hover,
body.monisystem-brand .btn-outline-primary:active,
body.monisystem-brand .btn-outline-primary.active,
body.monisystem-brand .btn-outline-primary:not(:disabled):not(.disabled).active,
body.monisystem-brand .show > .btn-outline-primary.dropdown-toggle {
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-primary) !important;
    color: #fff !important;
}

body.monisystem-brand .btn-outline-primary:focus,
body.monisystem-brand .btn-outline-primary.focus,
body.monisystem-brand .btn-outline-primary:not(:disabled):not(.disabled).active:focus,
body.monisystem-brand .show > .btn-outline-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(3, 7, 51, 0.22) !important;
}

/* Secondary action icons are brand blue in both the row and its context-menu clone. */
body.monisystem-brand .actionRowButton.text-secondary,
body.monisystem-brand .contextMenu .text-secondary {
    color: var(--monisystem-brand-secondary) !important;
}

body.monisystem-brand .text-primary,
body.monisystem-brand .page-link {
    color: var(--monisystem-brand-primary) !important;
}

body.monisystem-brand .form-control:focus,
body.monisystem-brand .custom-select:focus,
body.monisystem-brand .select2-container--default.select2-container--focus .select2-selection--multiple,
body.monisystem-brand .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--monisystem-brand-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(3, 7, 51, 0.18) !important;
}

body.monisystem-brand .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--monisystem-brand-primary) !important;
    border-color: var(--monisystem-brand-primary) !important;
}

body.monisystem-brand ::selection {
    background: rgba(1, 88, 222, 0.2);
    color: var(--monisystem-brand-ink);
}

@media (prefers-reduced-motion: reduce) {
    body.monisystem-brand *,
    body.monisystem-brand *::before,
    body.monisystem-brand *::after {
        scroll-behavior: auto;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

body.monisystem-brand.page-style1 .custom-content:before {
    background: rgba(3, 7, 51, 0.92) !important;
}

body.monisystem-brand.page-style1 .custom-content .monisystem-brand-login-link {
    display: flex;
    width: 100%;
    justify-content: center;
}

body.monisystem-brand.page-style1 .custom-content .monisystem-brand-login-lockup {
    width: 220px;
    max-width: 80%;
    gap: 3px;
}

body.monisystem-brand.page-style1 .custom-content .monisystem-brand-byline {
    font-size: 11px;
}

body.monisystem-brand.page-style1 .custom-content .monisystem-brand-login-lockup .header-brand-img {
    max-width: 100%;
}

body.monisystem-brand.page-style1 .custom-content .header-brand-img {
    display: block !important;
    filter: none;
    height: auto;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    width: 220px !important;
}

@media (max-width: 992px) {
    body.monisystem-brand.page-style1 .page-content > .container > .row > .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body.monisystem-brand.page-style1 .page-content > .container > .row > .col-md-9 > .row {
        justify-content: center;
    }

    body.monisystem-brand.page-style1 .page-content > .container > .row > .col-md-9 > .row > .col-md-5 {
        flex: 0 1 480px;
        width: 100%;
        max-width: 480px;
    }

    body.monisystem-brand.page-style1 .page-content > .container > .row > .col-md-9 > .row > .col-md-7 {
        display: none;
    }
}

body.monisystem-brand.page-style1 .form-control:focus {
    border-color: var(--monisystem-brand-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(3, 7, 51, 0.18) !important;
}
