/**
 * Bootstrap 5.3.8 + Gentelella (legacy BS3) compatibility.
 * Loaded after bootstrap.min.css and before custom.min.css.
 */
.container.body {
    width: 100%;
    max-width: none;
    padding: 0;
}
.container.body .row {
    --bs-gutter-x: 20px;
}
.container.body,
.container.body .main_container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
}
@media (min-width: 992px) {
    .nav-md .container.body .col-md-3.left_col,
    .nav-sm .container.body .col-md-3.left_col {
        float: none !important;
        flex: none !important;
        max-width: none !important;
        position: absolute !important;
    }
}
.navbar-nav > li {
    list-style: none;
}
.navbar-nav.ms-auto,
.navbar-nav.navbar-right {
    margin-left: auto;
}
.dropdown-menu.show,
.open > .dropdown-menu {
    display: block;
}
.modal.in {
    display: block;
}
.modal.show,
.modal.in {
    display: block !important;
}
.modal.in .modal-dialog {
    transform: none;
}
.modal.show .modal-dialog,
.modal.in .modal-dialog {
    transform: none;
}
.modal-backdrop.show,
.modal-backdrop.in {
    opacity: 0.5;
}
.fade.in {
    opacity: 1;
}
.collapse.in,
.collapse.show {
    display: block;
    height: auto !important;
}
.nav-tabs > li {
    display: inline-block;
}
.nav-tabs > li > a {
    display: block;
    padding: 8px 15px;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: #555;
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom-color: transparent;
}
.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    background: transparent;
    border: 0;
}
.close:hover {
    opacity: 0.75;
}
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.btn-default:hover {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}
.pull-left,
.float-start {
    float: left !important;
}
.pull-right,
.float-end {
    float: right !important;
}
.hidden {
    display: none !important;
}
.img-responsive,
.img-fluid {
    max-width: 100%;
    height: auto;
}
/* BS3 .hidden — Bootstrap 5 dropped it. EMR OP/IP list and many blades still toggle this class. */
.hidden {
    display: none !important;
}
.hidden-xs {
    display: none !important;
}
@media (min-width: 768px) {
    .hidden-xs {
        display: block !important;
    }
}
.visible-xs {
    display: block !important;
}
@media (min-width: 768px) {
    .visible-xs {
        display: none !important;
    }
}
.col-xs-1 { width: 8.333333%; float: left; }
.col-xs-2 { width: 16.666667%; float: left; }
.col-xs-3 { width: 25%; float: left; }
.col-xs-4 { width: 33.333333%; float: left; }
.col-xs-5 { width: 41.666667%; float: left; }
.col-xs-6 { width: 50%; float: left; }
.col-xs-7 { width: 58.333333%; float: left; }
.col-xs-8 { width: 66.666667%; float: left; }
.col-xs-9 { width: 75%; float: left; }
.col-xs-10 { width: 83.333333%; float: left; }
.col-xs-11 { width: 91.666667%; float: left; }
.col-xs-12 { width: 100%; float: left; }
.panel,
.card.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.panel-heading,
.card-header.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f5f5f5;
}
.panel-body,
.card-body.panel-body {
    padding: 15px;
}
.panel-footer,
.card-footer.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
}
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
}
.form-horizontal .control-label,
.form-horizontal .col-form-label {
    padding-top: 7px;
    margin-bottom: 0;
    text-align: right;
}
.input-group-addon,
.input-group-text {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
}
.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}
.label {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}
.label-default { background-color: #777; }
.label-primary { background-color: #337ab7; }
.label-success { background-color: #5cb85c; }
.label-info { background-color: #5bc0de; }
.label-warning { background-color: #f0ad4e; }
.label-danger { background-color: #d9534f; }
.badge {
    display: inline-block;
    min-width: 10px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    background-color: #777;
    border-radius: 10px;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
    padding: 5px;
}
.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
}
.has-error .form-control {
    border-color: #a94442;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
/* Glyphicon fallback via Font Awesome if present */
.glyphicon {
    display: inline-block;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
}
.glyphicon-remove:before { content: "\f00d"; font-family: FontAwesome; }
.glyphicon-ok:before { content: "\f00c"; font-family: FontAwesome; }
.glyphicon-plus:before { content: "\f067"; font-family: FontAwesome; }
.glyphicon-minus:before { content: "\f068"; font-family: FontAwesome; }
.glyphicon-search:before { content: "\f002"; font-family: FontAwesome; }
.glyphicon-pencil:before { content: "\f040"; font-family: FontAwesome; }
.glyphicon-edit:before { content: "\f044"; font-family: FontAwesome; }
.glyphicon-trash:before { content: "\f1f8"; font-family: FontAwesome; }
.glyphicon-user:before { content: "\f007"; font-family: FontAwesome; }
.glyphicon-home:before { content: "\f015"; font-family: FontAwesome; }
.glyphicon-print:before { content: "\f02f"; font-family: FontAwesome; }
.glyphicon-calendar:before { content: "\f073"; font-family: FontAwesome; }
.glyphicon-chevron-left:before { content: "\f053"; font-family: FontAwesome; }
.glyphicon-chevron-right:before { content: "\f054"; font-family: FontAwesome; }
.glyphicon-chevron-up:before { content: "\f077"; font-family: FontAwesome; }
.glyphicon-chevron-down:before { content: "\f078"; font-family: FontAwesome; }
.glyphicon-refresh:before { content: "\f021"; font-family: FontAwesome; }
.glyphicon-download:before,
.glyphicon-download-alt:before { content: "\f019"; font-family: FontAwesome; }
.glyphicon-upload:before { content: "\f093"; font-family: FontAwesome; }
.glyphicon-info-sign:before { content: "\f05a"; font-family: FontAwesome; }
.glyphicon-warning-sign:before { content: "\f071"; font-family: FontAwesome; }
.glyphicon-exclamation-sign:before { content: "\f06a"; font-family: FontAwesome; }
.glyphicon-ok-sign:before { content: "\f058"; font-family: FontAwesome; }
.glyphicon-remove-sign:before { content: "\f057"; font-family: FontAwesome; }
.glyphicon-time:before { content: "\f017"; font-family: FontAwesome; }
.glyphicon-list:before { content: "\f03a"; font-family: FontAwesome; }
.glyphicon-th:before { content: "\f00a"; font-family: FontAwesome; }
.glyphicon-file:before { content: "\f15b"; font-family: FontAwesome; }
.glyphicon-folder-open:before { content: "\f07c"; font-family: FontAwesome; }
.form-group { margin-bottom: 15px; }
.glyphicon-star:before { content: "\f005"; font-family: FontAwesome; }
.glyphicon-star-empty:before { content: "\f006"; font-family: FontAwesome; }
.glyphicon-eye-open:before { content: "\f06e"; font-family: FontAwesome; }
.glyphicon-eye-close:before { content: "\f070"; font-family: FontAwesome; }
.glyphicon-th-list:before { content: "\f00b"; font-family: FontAwesome; }

/* Sidebar: keep Main/Favorites switch in footer only — hide extra tiles in the menu */
.left_col .side-menu-topbar,
.left_col #showTopNormalMenu,
.left_col #showTopFavMenu {
    display: none !important;
}
.left_col .user-panel {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.left_col .nav_title > .sidebar-footer:empty {
    display: none !important;
}
.nav.side-menu > li > a > span:empty {
    display: none;
}
.nav.side-menu > li:not(:has(span:not(:empty))):not(:has(.child_menu li)) {
    display: none !important;
}

/* BS5 .nav is flex-wrap — keep one menu item per row */
.left_col ul.nav.side-menu {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
}
.left_col ul.nav.side-menu > li {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto;
}
.left_col ul.nav.child_menu,
.left_col ul.nav.fav_child_menu {
    flex-direction: column;
    flex-wrap: nowrap;
}
.left_col ul.nav.child_menu > li,
.left_col ul.nav.fav_child_menu > li {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
}
.glyphicon-fullscreen:before { content: "\f0b2"; font-family: FontAwesome; }
@media (min-width: 992px) {
    .nav-md .container.body .col-md-3.left_col { width: 230px !important; }
    .nav-sm .container.body .col-md-3.left_col { width: 70px !important; }
    .nav-md .right_col { margin-left: 230px !important; width: calc(100% - 230px) !important; }
    .nav-sm .right_col { margin-left: 70px !important; width: calc(100% - 70px) !important; }
    /* EMR lite hides the sidebar (.left_col_emr). Do not keep the unused gutter.
       When body.his-menu-open, menu is shown and main page is pushed. */
    .nav-md:has(.left_col_emr):not(.his-menu-open) .right_col,
    .nav-sm:has(.left_col_emr):not(.his-menu-open) .right_col,
    .nav-md:has(.left_col_emr):not(.his-menu-open) .top_nav,
    .nav-sm:has(.left_col_emr):not(.his-menu-open) .top_nav,
    .nav-md:has(.left_col_emr):not(.his-menu-open) footer,
    .nav-sm:has(.left_col_emr):not(.his-menu-open) footer {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .nav-md .left_col.left_col_emr,
    .nav-sm .left_col.left_col_emr {
        width: 0 !important;
        display: none !important;
    }
    body.his-menu-open.nav-sm .left_col.left_col_emr,
    body.his-menu-open.nav-md .left_col.left_col_emr,
    body.his-menu-open .container.body .col-md-3.left_col.left_col_emr {
        display: block !important;
        width: 230px !important;
        max-width: 230px !important;
    }
    body.his-menu-open.nav-sm .right_col,
    body.his-menu-open.nav-md .right_col,
    body.his-menu-open.nav-sm footer,
    body.his-menu-open.nav-md footer,
    body.his-menu-open .container.body .right_col {
        margin-left: 230px !important;
        width: calc(100% - 230px) !important;
        max-width: calc(100% - 230px) !important;
    }
    body.his-menu-open.nav-sm .top_nav,
    body.his-menu-open.nav-md .top_nav,
    body.his-menu-open .container.body .top_nav {
        left: 0 !important;
        margin-left: 230px !important;
        width: calc(100% - 230px) !important;
        max-width: calc(100% - 230px) !important;
    }
}
.right_col {
    display: block !important;
    float: none !important;
    max-width: none !important;
    box-sizing: border-box;
    background: #f7f7f7;
}
.right_col .row,
.main_container > .row,
.container.body .row {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
}
/* Nested BS3 columns without an inner .row (desktop/tablet only) */
@media (min-width: 768px) {
    [class*="col-"] > [class*="col-"] {
        float: left;
    }
}
.glyphicon-lock:before { content: "\f023"; font-family: FontAwesome; }
.glyphicon-cog:before { content: "\f013"; font-family: FontAwesome; }
.glyphicon-off:before { content: "\f011"; font-family: FontAwesome; }
.glyphicon-comment:before { content: "\f075"; font-family: FontAwesome; }
.glyphicon-envelope:before { content: "\f0e0"; font-family: FontAwesome; }
.glyphicon-phone:before { content: "\f095"; font-family: FontAwesome; }
.glyphicon-map-marker:before { content: "\f041"; font-family: FontAwesome; }
.glyphicon-save:before { content: "\f0c7"; font-family: FontAwesome; }
.glyphicon-open:before { content: "\f115"; font-family: FontAwesome; }
.glyphicon-new-window:before { content: "\f08e"; font-family: FontAwesome; }
.glyphicon-filter:before { content: "\f0b0"; font-family: FontAwesome; }
.glyphicon-sort:before { content: "\f0dc"; font-family: FontAwesome; }
.glyphicon-check:before { content: "\f046"; font-family: FontAwesome; }
.glyphicon-unchecked:before { content: "\f096"; font-family: FontAwesome; }
.navbar-toggler,
.navbar-toggle {
    padding: 9px 10px;
    background-color: transparent;
    border: 1px solid #ddd;
}
.media {
    display: flex;
    align-items: flex-start;
}
.media-body {
    flex: 1;
}
.checkbox, .radio {
    position: relative;
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
}
.form-control {
    display: block;
    width: 100%;
}
select.form-control {
    display: block;
}
.btn-group > .btn {
    position: relative;
    float: left;
}
.input-sm,
.form-control-sm {
    height: 30px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}
.input-lg,
.form-control-lg {
    height: 46px;
    padding: 10px 16px;
    font-size: 18px;
    line-height: 1.333;
    border-radius: 6px;
}
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.center-block {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.pre-scrollable {
    max-height: 340px;
    overflow-y: scroll;
}
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.alert-dismissable .close,
.alert-dismissible .close {
    position: relative;
    top: -2px;
    right: -21px;
    color: inherit;
}
.progress {
    height: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
}
.progress-bar {
    float: left;
    width: 0;
    height: 100%;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
    text-align: center;
    background-color: #337ab7;
}
.list-inline > li {
    display: inline-block;
    padding-right: 5px;
    padding-left: 5px;
}
.dl-horizontal dt {
    float: left;
    width: 160px;
    overflow: hidden;
    clear: left;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-horizontal dd {
    margin-left: 180px;
}
.modal-header .close {
    margin-top: -2px;
    order: 2;
    margin-left: auto;
    float: none;
}
/* Legacy blades put .close before .modal-title; keep title left / close right under BS5 flex. */
.modal-header .modal-title {
    order: 1;
    flex: 1 1 auto;
}
/* Honor BS3-style inline width on modal-dialog (BS5 defaults max-width:500px). */
.modal-dialog[style*="width"] {
    max-width: none;
}
.pagination > li {
    display: inline;
}
.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}
.pagination > .active > a,
.pagination > .active > span {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: #337ab7;
    border-color: #337ab7;
}
.breadcrumb {
    padding: 8px 15px;
    margin-bottom: 20px;
    list-style: none;
    background-color: #f5f5f5;
    border-radius: 4px;
}
.breadcrumb > li {
    display: inline-block;
}
.breadcrumb > li + li:before {
    padding: 0 5px;
    color: #ccc;
    content: "/\00a0";
}
/* Keep Gentelella x_panel intact under BS5 reboot */
.x_panel {
    position: relative;
}
.left_col, .right_col, .nav_menu, .top_nav {
    box-sizing: border-box;
}
/* Select2 BS5 theme spacing inside Gentelella forms */
.select2-container {
    width: 100% !important;
}
/* bootstrap-toggle leftover */
.toggle {
    display: inline-block;
}
/* Print: avoid extra gutters */
@media print {
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ==========================================================================
   Strict responsive shell (Bootstrap 5.3.8 + Gentelella)
   ========================================================================== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
img,
video,
iframe,
embed,
object {
    max-width: 100%;
}
.x_panel,
.x_content,
.right_col,
.main_container,
.container.body,
.table-responsive,
.dataTables_wrapper,
.nav_menu,
.top_nav {
    max-width: 100%;
}
.x_content,
.dataTables_wrapper,
.table-responsive,
.x_panel .table,
fieldset {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table {
    max-width: 100%;
}
.form-control,
.select2-container,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select {
    max-width: 100%;
}
.select2-container {
    width: 100% !important;
}

@media (max-width: 991.98px) {
    .nav-sm .container.body .col-md-3.left_col {
        display: none !important;
    }
    .nav-md .container.body .col-md-3.left_col {
        display: block !important;
        position: fixed !important;
        left: 0;
        top: 0;
        width: 230px !important;
        max-width: 85vw !important;
        height: 100% !important;
        z-index: 1055 !important;
        overflow-y: auto;
        float: none !important;
        flex: none !important;
    }
    .nav-sm .right_col,
    .nav-md .right_col,
    .nav-sm .container.body .right_col,
    .nav-md .container.body .right_col,
    .nav-sm .top_nav,
    .nav-md .top_nav,
    .nav-sm .container.body .top_nav,
    .nav-md .container.body .top_nav {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    .nav-md .container.body .right_col,
    .nav-sm .container.body .right_col {
        padding: 10px 12px 24px !important;
    }
    body.nav-md::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1050;
    }
    #menu_toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    .top_nav .navbar-nav.navbar-right,
    .top_nav ul.nav.navbar-nav.navbar-right {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 4px;
        margin: 0;
        padding: 4px 8px;
    }
    .top_nav .nav_menu {
        min-height: 42px;
        height: 42px !important;
        max-height: 42px !important;
    }
    .top_nav .nav > li > a {
        padding: 8px 10px !important;
    }
    .nav_title {
        width: 100% !important;
        max-width: 230px;
    }
    .right_col [class*="col-md-"],
    .right_col [class*="col-lg-"],
    .x_content [class*="col-md-"],
    .x_content [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100% !important;
        float: none !important;
    }
    .btn-toolbar,
    div.dt-buttons,
    .dt-buttons {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .x_title h2 {
        width: 100% !important;
        white-space: normal !important;
        float: none !important;
    }
    .x_title .nav.navbar-right,
    .x_title .pull-right,
    .x_title .float-end {
        float: none !important;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 767.98px) {
    .right_col [class*="col-sm-"],
    .x_content [class*="col-sm-"],
    .right_col [class*="col-"] > [class*="col-"],
    .x_content [class*="col-"] > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100% !important;
        float: none !important;
    }
    .form-horizontal .control-label,
    .form-horizontal .col-form-label {
        text-align: left;
        padding-top: 0;
        margin-bottom: 6px;
    }
    .dl-horizontal dt,
    .dl-horizontal dd {
        float: none;
        width: auto;
        margin-left: 0;
        text-align: left;
        white-space: normal;
    }
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        float: none !important;
    }
    .btn-group > .btn {
        float: none;
    }
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100% - 1rem);
        width: auto !important;
    }
    .modal-content,
    .modal-content[style] {
        width: 100% !important;
        max-width: 100% !important;
    }
    .bootbox .modal-dialog {
        max-width: calc(100vw - 24px);
    }
    .pagination {
        display: flex;
        flex-wrap: wrap;
    }
    .input-group {
        flex-wrap: wrap;
        width: 100%;
    }
    .navbar-nav > li {
        float: none;
    }
    .hidden-xs {
        display: none !important;
    }
    .visible-xs {
        display: block !important;
    }
}

@media (max-width: 575.98px) {
    .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4,
    .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8,
    .col-xs-9, .col-xs-10, .col-xs-11 {
        width: 100%;
        float: none;
        max-width: 100%;
    }
    .btn {
        white-space: normal;
    }
    .nav-tabs {
        display: flex;
        flex-wrap: wrap;
    }
    .nav-tabs > li {
        float: none;
    }
}

@media print {
    .left_col,
    .top_nav,
    #menu_toggle,
    body.nav-md::after {
        display: none !important;
    }
    .right_col {
        margin: 0 !important;
        width: 100% !important;
    }
}

/* ===== Top header bar: single compact row (BS5 navbar-nav is column by default) ===== */
.top_nav .nav_menu {
    min-height: 42px;
    height: 42px !important;
    max-height: 42px !important;
}
.top_nav .nav_menu > nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    height: 42px;
    max-height: 42px;
    padding: 0 10px 0 0;
}
.top_nav .nav.toggle {
    float: none !important;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: auto !important;
    max-width: none;
    height: 42px;
    padding: 0 6px !important;
    margin: 0;
    overflow: visible;
}
.top_nav .toggle a {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    margin: 0;
}
.top_nav .toggle #menu_toggle {
    width: 42px;
    justify-content: center;
}
.top_nav .toggle #btn_back_to_dashboard {
    white-space: nowrap;
    cursor: pointer;
}
.top_nav .toggle #btn_back_to_dashboard .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 12px;
    background: #2a3f54;
    color: #fff;
}
.top_nav ul.nav.navbar-nav.navbar-right,
.top_nav .navbar-nav.navbar-right {
    display: flex !important;
    flex-direction: row-reverse !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    float: none !important;
    width: auto !important;
    max-width: calc(100% - 48px) !important;
    margin: 0 0 0 auto !important;
    padding: 0 4px 0 0 !important;
    gap: 4px 14px;
    min-height: 42px;
    height: 42px;
    max-height: 42px;
    overflow: visible;
}
.top_nav .navbar-right > li {
    float: none !important;
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    white-space: nowrap;
}
.top_nav .navbar-right > li:empty,
.top_nav .navbar-right > li:has(> :only-child:empty) {
    display: none !important;
}
.top_nav .navbar-right > li > a {
    display: flex;
    align-items: center;
    padding: 8px 12px !important;
}
.top_nav .navbar-right > li > a.user-profile {
    gap: 8px;
    color: #5e6974 !important;
}
.top_nav .navbar-right > li > a.user-profile img {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    margin-right: 0;
    object-fit: cover;
}
.top_nav .navbar-right > li h5 {
    float: none !important;
    margin: 0 !important;
    display: inline;
    font-size: 13px;
    line-height: 1.2;
}
.top_nav .navbar-right > li .checkbox {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.top_nav .navbar-right .dropdown-menu {
    flex-direction: column;
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    z-index: 1060;
    min-width: 200px;
    width: auto;
    padding: 5px 0;
    margin: 2px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.top_nav .navbar-right .dropdown-menu.show,
.top_nav .navbar-right .open > .dropdown-menu,
.top_nav .navbar-right li.open > .dropdown-menu {
    display: block !important;
}
.top_nav .navbar-right .dropdown-menu > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    white-space: normal;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 575.98px) {
    .top_nav ul.nav.navbar-nav.navbar-right,
    .top_nav .navbar-nav.navbar-right {
        max-width: 100% !important;
    }
    .top_nav .toggle #btn_back_to_dashboard .badge {
        padding: 5px 8px;
        font-size: 11px;
    }
}
