
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1080;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.page-layout-demo-footer-link {
    color: #ebeef5;
}

    .page-layout-demo-footer-link:hover {
        color: #fff;
    }

.page-layout-demo-option {
    margin-top: 1.5rem;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0px; /* 4px;*/
    padding: 1.5rem 1rem 1rem 1rem;
    position: relative;
}

    .page-layout-demo-option > p {
        position: absolute;
        top: -10px;
        padding: 0 0.5rem;
        background: #fff;
    }

    .page-layout-demo-option .page-layout-demo-option-height {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .page-layout-demo-option .tabs-body-content {
        margin: 0 -1rem -2rem -1rem;
    }

.layout-drawer {
    padding: 13px;
    margin-right: -1rem;
    cursor: pointer;
}

    .layout-drawer:hover {
        background-color: #1893a7;
    }

.layout-drawer-body {
    padding: 1rem;
}

.layout-item {
    cursor: pointer;
    border: 2px solid #e9ecef;
    padding: 4px;
    border-radius: 0px; /* 4px;*/
    height: 80px;
    width: 120px;
    transition: border .3s linear;
}

    .layout-item:hover,
    .layout-item.active {
        border: 2px solid #28a745;
    }

    .layout-item .layout-left {
        width: 30%;
    }

        .layout-item .layout-left .layout-left-header {
            height: 16px;
            background-color: #367fa9;
        }

        .layout-item .layout-left .layout-left-body,
        .layout-item .layout-body .layout-left {
            background-color: #2f4050;
        }

    .layout-item .layout-right .layout-right-header,
    .layout-item .layout-top {
        background-color: #175fb8;
        height: 16px;
    }

    .layout-item .layout-right .layout-right-footer,
    .layout-item .layout-footer {
        background-color: #5b6e84;
        height: 12px;
    }

    .layout-item .layout-top,
    .layout-item .layout-body,
    .layout-item .layout-footer {
        width: 100%;
    }

.layout.is-page .layout-right {
    background-color: #fff;
}

.color {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    cursor: pointer;
    border: 2px solid #e9ecef;
    border-radius: 0px; /* 4px;*/
    transition: border .3s linear;
}

    .color:hover {
        border: 2px solid #28a745;
    }

.color1,
.layout.is-page.color1 .layout-header {
    background-color: #409eff;
}

.layout.is-page.color1 .layout-side .layout-banner {
    background-color: #3e84d0
}

.layout.is-page.color1 .layout-side {
    background-color: #212529;
    color: #ebeef5;
}

.layout.is-page.color1 .layout-footer {
    background-color: #343a40;
}

.layout.is-page.color1 .layout-header-bar {
    background-color: #2b7cd0;
    border-color: #014186;
}

.layout.is-page.color1 .layout-drawer:hover {
    background-color: #3184dc;
}

.color2,
.layout.is-page.color2 .layout-header {
    background-color: #28a745;
}

.layout.is-page.color2 .layout-side .layout-banner {
    background-color: #24903d
}

.layout.is-page.color2 .layout-side {
    background-color: #212529;
    color: #ebeef5;
}

.layout.is-page.color2 .layout-footer {
    background-color: #343a40;
}

.layout.is-page.color2 .layout-header-bar {
    background-color: #258c3c;
    border-color: #014186;
}

.layout.is-page.color2 .layout-drawer:hover {
    background-color: #24903d;
}

.color3,
.layout.is-page.color3 .layout-header {
    background-color: #e83e8c;
}

.layout.is-page.color3 .layout-side .layout-banner {
    background-color: #c5417e
}

.layout.is-page.color3 .layout-side {
    background-color: #212529;
    color: #ebeef5;
}

.layout.is-page.color3 .layout-footer {
    background-color: #343a40;
}

.layout.is-page.color3 .layout-header-bar {
    background-color: #c73477;
    border-color: #014186;
}

.layout.is-page.color3 .layout-drawer:hover {
    background-color: #c5417e;
}

.color4,
.layout.is-page.color4 .layout-header {
    background-color: #ffc107;
}

.layout.is-page.color4 .layout-side .layout-banner {
    background-color: #e4af10
}

.layout.is-page.color4 .layout-side {
    background-color: #212529;
    color: #ebeef5;
}

.layout.is-page.color4 .layout-footer {
    background-color: #343a40;
}

.layout.is-page.color4 .layout-header-bar {
    background-color: #e2b221;
    border-color: #014186;
}

.layout.is-page.color4 .layout-drawer:hover {
    background-color: #e4af10;
}

.layout.is-page.color5 .layout-header, .layout.is-page.color5 .layout-banner {
    background-color: #175fb8;
}

.layout.is-page.color5 .layout-banner {
    background-color: #fff;
    color: #175fb8 !important;
}

    .layout.is-page.color5 .layout-banner .layout-title {
        color: #175fb8 !important;
    }

table:has(.empty) {
    height: 100% !important;
}

td:has(.empty) {
    vertical-align: middle !important;
}

    td:has(.empty) img {
        width: 64px !important;
    }

/*td:has(.empty) .empty-image {
        text-align: center !important;

    }*/

.color5.modal-open .select.dropdown.multi-select .dropdown-menu .dropdown-item.active {
    background-color: #175fb8ee !important;
}

.layout.is-page.color5 .card .card-header, .layout.is-page.color5 table thead, .layout.is-page.color5 table thead th {
    background-color: #175fb8ee;
    color: #ebeef5;
}

.layout.is-page.color5 table table thead, .layout.is-page.color5 table table thead th {
    background-color: #675fb8 !important;
    color: #ebeef5;
}

.layout.is-page.color5 table table table thead, .layout.is-page.color5 table table table thead th {
    background-color: #975fb8 !important;
    color: #ebeef5;
}

.layout.is-page.color5 table thead th.filterable:hover, .layout.is-page.color5 table thead th.sortable:hover {
    /* background-color: #1691a4 !important;*/
    background-color: #175fb888 !important;
    color: #ebeef5 !important;
}

.layout.is-page.color5 table thead th .filter-icon i:hover, .layout.is-page.color5 table thead th .sort-icon:hover {
    background-color: #1691a400 !important;
}

.layout.is-page.color5 table thead th .filter-icon i.active {
    color: #e4af10 !important;
}

.layout.is-page.color5 table table thead th.filterable:hover, .layout.is-page.color5 table table thead th.sortable:hover {
    background-color: #5b8ea1 !important;
}

.layout.is-page.color5 table table table thead th.filterable:hover, .layout.is-page.color5 table table table thead th.sortable:hover {
    background-color: #8993a7 !important;
}


.layout.is-page.color5 .tabs-body-content .tabs-item {
    /*color: #c0c1c2;*/
}

    .layout.is-page.color5 .tabs-body-content .tabs-item:hover {
        background-color: #e9ecef !important;
        color: #8c8c8d !important;
    }

    .layout.is-page.color5 .tabs-body-content .tabs-item.active:hover {
        color: #158394 !important;
    }

.layout.is-page.color5 .nav-link.active {
    background-color: #175fb8;
    color: #fff !important;
    /*color: #158394;*/
}

.layout.is-page.color5 .tabs > .tabs-header .tabs-item.active {
    background-color: #fff !important;
    color: #158394 !important;
    border-color: transparent !important;
    border-bottom: 2px solid #2f80ed !important;
    box-shadow: none !important;
}

.layout.is-page.color5 .tabs-body-content .tabs-item.active {
    background-color: #175fb800;
    /*color: #ebeef5 !important;*/
    color: #158394 !important;
}
/*.layout.is-page.color5 .tabs-border-card .tabs-item.active {
    color: #158394;
}*/

.layout.is-page.color5 .nav-link {
    color: #b3b5b6;
}

    .layout.is-page.color5 .nav-link:hover, .layout.is-page.color5 .nav-link:has(:hover), .layout.is-page.color5 .tabs-item:hover {
        background-color: #175fb8aa !important;
        color: #ebeef5 !important;
        border: solid !important;
        border-width: 1px !important;
        border-color: #ebeef5 !important;
    }

.layout.is-page.color5 .tabs > .tabs-header .tabs-item.active:hover {
    background-color: #f8fbff !important;
    color: #158394 !important;
    border: 0 !important;
    border-bottom: 2px solid #2f80ed !important;
}

.layout.is-page.color5 .tabs-item-close:hover {
    background-color: #ebeef5 !important;
    color: #175fb8;
}

.layout.is-page.color5 .layout-header-bar {
    background-color: #175fb8;
    border-color: #ebeef5;
    color: #ebeef5;
    border: solid;
    border-width: 1px;
    border-radius: 0px;
}

    .layout.is-page.color5 .layout-header-bar:hover {
        background-color: #ebeef5;
        border-color: #175fb8;
        color: #175fb8;
        border: solid;
        border-width: 1px;
    }



.color6,
.layout.is-page.color6 .layout-header {
    background-color: #6610f2;
}

.layout.is-page.color6 .layout-side .layout-banner {
    background-color: #4b0cb3
}

.layout.is-page.color6 .layout-side {
    background-color: #212529;
    color: #ebeef5;
}

.layout.is-page.color6 .layout-footer {
    background-color: #343a40;
}

.layout.is-page.color6 .layout-header-bar {
    background-color: #4b0ab5;
    border-color: #014186;
}

.layout.is-page.color6 .layout-drawer:hover {
    background-color: #4b0cb3;
}

.widget .dropdown-body h3 {
    color: #666666;
    font-size: 14px;
    margin-bottom: 10px;
}

.widget .dropdown-body h4 {
    color: #444444;
    font-size: 15px;
    margin: 0;
}

.widget .dropdown-body small {
    color: #999999;
    font-size: 10px;
    position: absolute;
    top: 0;
    right: 0;
}

.widget .dropdown-item > div:not(.progress):last-child {
    width: calc(100% - 40px);
}

.widget .dropdown-item {
    padding: 0.5rem 1rem;
}

.widget .progress {
    height: 7px;
}

.widget .dropdown-item.active,
.widget .dropdown-item:active {
    color: inherit;
}

.widget .dropdown-item:not(:nth-of-type(odd)):active {
    background-color: inherit;
}

.table-cell img {
    width: 46px;
    border-radius: var(--bs-border-radius);
}

.table-cell .progress {
    height: 6px;
    margin-top: .5rem;
}

.user-demo-address {
    margin-top: .25rem;
    font-size: 86%;
    color: #c0c4cc;
}

.table-users {
    height: auto;
    padding-bottom: .5rem;
    height: calc(100vh - 216px);
}

    .table-users .table-container {
        min-width: 746px;
    }

.tabs-body-content .table-users {
    height: calc(100vh - 250px);
}

.cell-label {
    line-height: 35px;
}


:root {
    --bb-font-weight: 500;
    --bb-title-color: #1f2f3d;
    --bb-sub-font-size: 1.2rem;
}

.navbar {
    --bs-navbar-color: rgba(255,255,255,.85);
    --bs-navbar-hover-color: rgb(255,255,255);
}

.layout {
    --bb-layout-sidebar-banner-background: #702cf8;
}
/*
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1095;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.layout {
    --bb-footer-height: 0px;
}

    .layout.has-footer {
        --bb-footer-height: 40px;
    }

.is-fixed-tab .tabs-body {
    height: calc(100vh - 89px - var(--bb-footer-height));
    overflow: auto;
}

    .is-fixed-tab .tabs-body .tabs-body-content {
        height: auto;
        min-height: 100%;
    }

.bb-sub {
    margin-top: .25rem;
    font-size: 86%;
    color: #c0c4cc;
}

.table-header-group-th1 {
    border-bottom-width: 2px !important;
    border-bottom-color: var(--bs-secondary);
}

    .table-header-group-th1 .table-cell {
        height: 58px;
    }

    .table-header-group-th1 .table-cell,
    .table-header-group-th2 .table-cell {
        justify-content: center !important;
    }

.menu .nav-link.nav-table {
    color: var(--bs-info);
    font-weight: bold;
}

    .menu .nav-link.nav-table:hover {
        color: unset;
    }

.custom-popover {
    --bs-popover-border-color: var(--bs-primary);
    --bs-popover-header-bg: var(--bs-primary);
    --bs-popover-header-color: var(--bs-white);
    --bs-popover-body-padding-x: 1rem;
    --bs-popover-body-padding-y: 1rem;
}

.custom-rate {
    --bb-rate-font-size: 1.7rem;
    --bb-rate-height: 30px;
    --bb-rate-width: 30px;
    --bb-rate-active-color: var(--bs-primary);
}

.connection-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    opacity: 0.5;
}

.connection-body {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: 1rem;
    color: #696969;
}

.connection-body-tail {
    border-right: 1px solid #d8d8d8;
    width: 1px;
    margin-left: 1rem;
}

.connection-link {
    color: #1371C3;
    text-decoration: underline;
    font-weight: bolder;
    margin-left: 0.5rem;
}

.connection-box {
    border-radius: var(--bs-border-radius);
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

    .connection-box .connection-mask,
    .connection-box .connection-body {
        position: absolute;
    }

.connection-body img {
    height: 110px;
    margin-left: 1rem;
}

@media (min-width: 768px) {
    :root {
        --bs-header-height: 50px;
        --bs-sidebar-width: 300px;
    }

    .header-img span {
        display: none;
    }

    .chart {
        max-width: 740px;
    }

        .chart .btn i + span {
            display: inline;
        }

    header.hide {
        transform: translate3d(0,calc(-100% - 2px),0);
    }

    .ms-learn {
        right: 1rem;
    }

    .coms-demo .card {
        cursor: pointer;
    }

    .header-img span {
        display: none;
    }

    .home-section {
        margin: 2rem;
    }
}
*/
.table2, .table2-1, .table2-2, .table2-3, .table2-1-1, .table2-2-1, .table2-3-1, .table2 .tabs.tabs-top, .table-sub, .table3,.table4 {
    overflow: auto !important;
}
/*.table2 > .table-container.table-fixed {
    min-height: calc(100vh - 125px) !important;
}
    .table2-1 > .table-container.table-fixed {
        min-height: calc(100vh - 19.5rem) !important
    }
.table2-2 > .table-container.table-fixed {
    min-height:calc(100vh - 23.1rem) !important
}*/
/*.table2-3 > .table-container.table-fixed {
    min-height: calc(100vh - 28rem) !important;
}*/

/*.table2-2-1 > .table-container.table-fixed {
    min-height: calc(100vh - 40rem) !important;
}
.table2 .tabs-body .tabs-body-content + .tabs-body-content {
    min-height: calc(100vh - 20rem) !important;
}*/
.table-container.table-fixed .nav-pages {
    margin-top: 0px !important;
    padding-top: 10px !important;
}

@media (min-width:768px) {
}
/*.table1 > .table-container.table-fixed {
        height: calc(100vh - 180px);
    }
.table2 > .table-container.table-fixed {
        height: calc(100vh - 7.6rem) !important;
    }
    .table3 > .table-container.table-fixed {
        height: calc(100vh - 8rem) !important;
    }
    
    .table2-1 > .table-container.table-fixed {
        height: calc(100vh - 19.5rem) !important
    }
    .table2-1-1 > .table-container.table-fixed {
        height: calc(100vh - 29rem) !important
    }
    .table2 > .table-container.table-fixed .table2 > .table-container.table-fixed {
        height: calc(100vh - 19.5rem) !important
    }
    .table2 > .table-container.table-fixed .tabs-body-content > .table2 > .table-container.table-fixed {
        height: calc(100vh - 23.6rem) !important
    }
        .table2 > .table-container.table-fixed .tabs-body-content > .table2 > .table-container.table-fixed .tabs-body-content > .table2 > .table-container.table-fixed {
            height: calc(100vh - 40rem) !important
        }

    .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content {
        height: calc(100vh - 23.6rem) !important;
    }
    .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content > .table2 {
        height: 100%;
    }
        .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content > .table2 > .table-container.table-fixed {
            height: calc(100vh - 29.1rem) !important;
        }
            .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content > .table2 > .table-container.table-fixed .table-fixed-body.scroll {
                height: calc(100vh - 31.7rem) !important;
            }

            .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content > .table2 > .table-container.table-fixed .table2 > .table-container.table-fixed {
                height: calc(100vh - 36rem) !important;
            }
                .table2 > .table-container.table-fixed .tabs-body-content + .tabs-body-content > .table2 > .table-container.table-fixed .table2 > .table-container.table-fixed .table-fixed-body.scroll {
                    height: calc(100vh - 41.9rem) !important;
                }
    
    .table2-2 > .table-container.table-fixed {
        height: calc(100vh - 23.1rem) !important
    }
    .table2-2-1 > .table-container.table-fixed {
        height: calc(100vh - 35rem) !important;
    }
    .table2-3 > .table-container.table-fixed {
        height: calc(100vh - 28.6rem) !important;
    }
    .table2-3-1 > .table-container.table-fixed {
        height: calc(100vh - 35rem) !important;
    }
    
    .table2 .tabs-body .tabs-body-content + .tabs-body-content {
        height: calc(100vh - 23.1rem) !important;
    }
        .table2 .tabs-body .tabs-body-content + .tabs-body-content > .table2-3 {
            height:100%;
        }*/
.table2 .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 13.5rem) !important;
}

.table4 .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 28.5rem) !important;
}

.modal-dialog-scrollable .table2 .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 17.5rem) !important;
}

.modal-fullscreen .table2 .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 14rem) !important;
}

.table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 15.6rem) !important;
}

    /*.table2 .table-fixed-body.scroll {
        height: calc(100vh - 15.6rem) !important;
    }*/
    .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
        max-height: calc(100vh - 25.0rem) !important;
    }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll .table-fixed-body.scroll {
            max-height: calc(100vh - 34.4rem) !important;
        }

    .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
        max-height: calc(100vh - 27.1rem) !important;
    }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-fixed-body.scroll {
            max-height: calc(100vh - 35.1rem) !important;
        }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
            max-height: calc(100vh - 43.4rem) !important;
        }

    .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
        max-height: calc(100vh - 30.6rem) !important;
    }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
            max-height: calc(100vh - 40.1rem) !important;
        }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
            max-height: calc(100vh - 42.1rem) !important;
        }

        .table2 .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .tabs-body-content .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
            max-height: calc(100vh - 45.5rem) !important;
        }

@keyframes example2 {
    from {
        max-height: calc(100vh - 20.6rem) !important;
    }

    to {
        max-height: calc(100vh - 16.6rem) !important;
    }
}

.table2 .table-search + .table-toolbar + .table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 16.6rem) !important;
}

.table2 .table-search:has(.collapse.show) + .table-toolbar + .table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 20.6rem) !important;
}

.table2 .card.mb-2 + .table-container .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 22.8rem) !important;
}

h4 + div + .table2 .card.mb-2 + .table-container .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 22.8rem) !important;
}

/*.table3 .card.mb-2 + .table-container .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 22.8rem) !important;
}*/

.table2 .card.mb-2 + .table-container .table-toolbar:has(button) + .table-wrapper.table-fixed .table-fixed-body.scroll .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    max-height: calc(100vh - 32.4rem) !important;
}
/*.table2 .card.mb-2 + .table-fixed .table-fixed-body.scroll {
        height: calc(100vh - 22.8rem) !important;
    }*/


/* Global rounded controls */
input.form-control,
textarea.form-control,
select.form-select,
.select .form-select,
.btn {
    border-radius: 8px !important;
}

.table-wrapper {
    border-radius: 9px !important;
}

.modal-dialog .modal-content {
    overflow: hidden;
    border-radius: 12px !important;
}

.layout-logo {
    border-radius: 0 !important;
}

/* Keep joined controls connected while rounding only the outside corners. */
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child),
.input-group > .select:not(:first-child) .form-select,
.input-group > .btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child),
.input-group > .select:not(:last-child) .form-select,
.input-group > .btn:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.modal-dialog .modal-content {
    border-width: 0px !important;
}
.modal-dialog .modal-footer {
    padding: 10px 14px !important;
    gap: 4px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.modal-dialog .modal-footer .btn {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px !important;
}

.dropdown-menu-arrow {
    display: none !important;
}

.dropdown-menu .search {
    --bb-select-focus-shadow: none;
    --bb-select-bg: #fff;
    --bb-select-padding: 6px 2.25rem 6px .75rem;
    --bb-select-append-width: 30px;
    --bb-select-append-color: #c0c4cc;
    --bb-select-search-padding: 7px 10px;
    --bb-select-search-margin-bottom: .5rem;
    --bb-select-search-border-color: var(--bs-border-color);
    --bb-select-search-padding-right: 30px;
    --bb-select-search-icon-color: var(--bb-select-search-border-color);
    --bb-select-search-icon-right: 18px;
    --bb-select-search-icon-top: 18px
}

.dropdown-menu .search {
    padding: var(--bb-select-search-padding);
    position: relative;
    border-bottom: 1px solid var(--bb-select-search-border-color);
    margin-bottom: var(--bb-select-search-margin-bottom)
}

    .dropdown-menu .search.is-fixed {
        position: sticky;
        top: calc(-1*var(--bs-dropdown-padding-y));
        background-color: var(--bs-dropdown-bg)
    }

    .dropdown-menu .search .search-text {
        padding-right: var(--bb-select-search-padding-right)
    }

    .dropdown-menu .search .icon {
        position: absolute;
        right: var(--bb-select-search-icon-right);
        top: var(--bb-select-search-icon-top);
        color: var(--bb-select-search-icon-color) !important;
    }

.is-page .layout-main > .tabs {
    margin: -1rem;
    border: none;
    border-radius: unset;
    min-height: calc(100% + 2rem)
}

.layout-main {
    /*height: calc(100% - 0.5rem);*/
    height: calc(100vh - 3.1rem) !important;
}

.layout-menu {
    height: calc(100vh - 3.1rem) !important;
}

/*@media(min-width:992px) {
    .scroll {
        overflow: hidden;
        overflow-y: auto;
    }

        .scroll:hover {
            overflow-y: auto;*/
            /*width: calc(100vh + 16px);*/
            /*margin-left: calc(-50vw + 50% + (var(--scrollbar-width)) / 2);*/
        /*}
}*/

::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background-color: #ced2db !important;
}

.listview-body {
    height: 100%;
    scrollbar-color: rgba(0,0,0,.3) rgba(0,0,0,0);
    scrollbar-width: thin;
    overflow: auto;
    --bb-scroll-width: 6px;
    --bb-scorll-height: 6px;
    --bb-scorll-thumb-radius: 3px;
    --bb-scorll-thumb-bg: rgba(0,0,0,.2);
    --bb-scorll-thumb-hover-bg: rgba(0,0,0,.3)
}

.listview-body::-webkit-scrollbar, .scroll::-webkit-scrollbar, .dropdown-menu::-webkit-scrollbar, .table-scroll::-webkit-scrollbar, .modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 10px !important; /*Set the width of the scrollbar */
    background-color: #F5F5F5 !important; /*Set the background color of the scrollbar */
    height: 10px !important;
    /*position: absolute !important;*/
    /*margin-left: 10px !important;*/ /* Position the scrollbar on the left of the element */
}

.listview-body::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb, .dropdown-menu::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb, .modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    /*background-color: #000000;*/ /* Set the color of the thumb */
    background-color: #ced2db !important;
    border-radius: 10px !important;
    /*min-height: 50px;*/
}

/*::-webkit-scrollbar-track {
    background: red;
    border-radius: 5px;
}*/
.table2 .table-wrapper.table-fixed:has(.table-row) {
    max-height: calc(100vh - 13.1rem) !important;
    overflow: auto !important;
    border: none;
}

h4 + div + .table2 .table-wrapper.table-fixed:has(.table-row) {
    max-height: calc(100vh - 20.1rem) !important;
    overflow: auto !important;
    border: none;
}

.table3 .table-wrapper.table-fixed:has(.table-row) {
    max-height: calc(100vh - 20.1rem) !important;
    overflow: auto !important;
    border: none;
}

.table3 .table-container .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 23.7rem) !important;
}

.replen-col2 .table2 .table-container .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 30.2rem) !important;
}

.replen-col2 .d-flex:has(h5 + div) + .table2 .table-container .table-toolbar + .table-wrapper.table-fixed .table-fixed-body.scroll {
    height: calc(100vh - 34.2rem) !important;
}

.table2 .table-wrapper.table-fixed:has(.table-row)::-webkit-scrollbar, .table3 .table-wrapper.table-fixed:has(.table-row)::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: #F5F5F5 !important; /*Set the background color of the scrollbar */
    position: absolute !important;
    left: 0; /*Position the scrollbar on the left of the element */
}

.table2 .table-wrapper.table-fixed:has(.table-row)::-webkit-scrollbar-thumb, .table3 .table-wrapper.table-fixed:has(.table-row)::-webkit-scrollbar-thumb {
    background-color: #ced2db;
    border-radius: 5px;
    min-height: 50px;
}

.modalloading .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--bs-modal-color);
    pointer-events: auto;
    background-color: transparent;
    background-clip: padding-box;
    border: var(--bs-modal-border-width) solid var(--bs-modal-border-color);
    border-radius: var(--bs-modal-border-radius);
    outline: 0;
    box-shadow: 0 0.5rem 1rem #00000000;
}

.replen-col1 {
    height: calc(100vh - 32.3rem) !important;
}

    .replen-col1 .w {
        height: 100%;
    }

.replen-col2 {
    min-height: calc(100vh - 32.3rem) !important;
}

@media (min-width: 768px) {
    .replen-col1 {
        height: 100% !important;
    }

    .replen-col2 {
        height: 100% !important;
    }

    .replen-col1 .w {
        height: 50% !important;
    }
}

.form-label {
    margin-bottom: 0px !important;
    margin-top: 3px !important
}

.table {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: #fff;
    --bs-table-border-color: var(--bs-border-color);
    --bs-table-accent-bg: transparent;
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-striped-bg: rgba(0,0,0,.05);
    --bs-table-active-color: var(--bs-body-color);
    --bs-table-active-bg: rgba(0,0,0,.1);
    --bs-table-hover-color: var(--bs-body-color);
    --bs-table-hover-bg: rgba(0,0,0,.075);
    width: 100%;
    margin-bottom: 0rem;
    color: var(--bs-table-color);
    vertical-align: top;
    border-color: var(--bs-table-border-color)
}
.modal-dialog .modal-body > .tableInModal {
    max-height: calc(100vh - 15rem);
}
.modal-dialog.modal-fullscreen .modal-body > .tableInModal{
    max-height:100%;
    height:100%;
}
th {
    text-transform: uppercase;
}


/* Global BootstrapBlazor table baseline — aligned with /Tasks/ESS */
.layout.is-page.color5 .table,
.layout.is-page.color5 .table > .table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.layout.is-page.color5 .table > .table-container {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.layout.is-page.color5 .table .table-wrapper.table-fixed {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    border-color: #dce5f0;
    border-radius: 9px;
}

.layout.is-page.color5 .table .table-fixed,
.layout.is-page.color5 .table .table-fixed-header,
.layout.is-page.color5 .table .table-fixed-body,
.layout.is-page.color5 .table .table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.layout.is-page.color5 .table .table-fixed-header {
    flex: 0 0 auto;
    overflow: hidden;
}

.layout.is-page.color5 .table .table-fixed-body.scroll,
.layout.is-page.color5 .table .table-fixed-body {
    min-height: 0;
    flex: 1;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.layout.is-page.color5 .table thead th,
.layout.is-page.color5 .table thead th *,
.layout.is-page.color5 .table .table-header,
.layout.is-page.color5 .table .table-header * {
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap;
}

.layout.is-page.color5 .table tbody td,
.layout.is-page.color5 .table tbody td div,
.layout.is-page.color5 .table tbody td span,
.layout.is-page.color5 .table tbody td label,
.layout.is-page.color5 .table tbody td a {
    color: #334155;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.layout.is-page.color5 .table tbody td button:not(.btn),
.layout.is-page.color5 .table tbody td a {
    font-size: 11px !important;
    font-weight: 600 !important;
}

.layout.is-page.color5 .table tbody td .status-pill,
.layout.is-page.color5 .table tbody td .status-pill *,
.layout.is-page.color5 .table tbody td .task-status,
.layout.is-page.color5 .table tbody td .task-status * {
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.layout.is-page.color5 .table tbody td {
    height: 40px;
    padding: 6px 9px;
    vertical-align: middle;
    border-color: #e8edf3 !important;
}

.layout.is-page.color5 .table tbody tr:hover td {
    background-color: #f8fbff;
}

.layout.is-page.color5 .table .table-toolbar {
    min-height: 54px;
    flex: 0 0 auto;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e8edf3;
    background: #fff;
}

.layout.is-page.color5 .table .table-toolbar .btn {
    min-height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1;
}

.layout.is-page.color5 .table .pagination {
    max-width: 100%;
    flex: 0 0 auto;
    margin: 8px 0 0 !important;
    padding: 8px 0 0;
    overflow-x: auto;
    border-top: 1px solid #e8edf3;
}

.layout.is-page.color5 .table .table-page-info {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 11px;
}

.layout.is-page.color5 .table .table-page-info .select {
    width: 112px;
}

.layout.is-page.color5 select,
.layout.is-page.color5 .select .form-select {
    padding-left: 12px !important;
    padding-right: 32px !important;
}

.layout.is-page.color5 select option,
.layout.is-page.color5 .select option {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 400;
}

@media (max-width: 640px) {
    .layout.is-page.color5 .table .table-toolbar {
        min-height: 50px;
        padding: 8px;
        justify-content: flex-start;
    }

    .layout.is-page.color5 .table tbody td {
        height: 38px;
        padding: 5px 7px;
    }
}


/* Global table pagination polish and stronger table headings */
.layout.is-page.color5 .table thead th,
.layout.is-page.color5 .table thead th *,
.layout.is-page.color5 .table .table-header,
.layout.is-page.color5 .table .table-header * {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}

.layout.is-page.color5 .table .pagination,
.layout.is-page.color5 .table .pagination *,
.layout.is-page.color5 .table .table-page-info,
.layout.is-page.color5 .table .table-page-info * {
    font-size: 11px !important;
    font-weight: 400;
}

.layout.is-page.color5 .table .pagination .page-link {
    min-width: 30px;
    min-height: 30px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
}

.layout.is-page.color5 .table .table-page-info .select,
.layout.is-page.color5 .table .table-page-info select,
.layout.is-page.color5 .table .table-page-info .form-select,
.layout.is-page.color5 .table .pagination .select,
.layout.is-page.color5 .table .pagination select,
.layout.is-page.color5 .table .pagination .form-select {
    height: 36px;
    min-height: 36px;
    border-radius: 8px !important;
}

.layout.is-page.color5 .table .table-page-info .select,
.layout.is-page.color5 .table .pagination .select {
    overflow: hidden;
    border-radius: 8px !important;
}

.layout.is-page.color5 .table .table-page-info select,
.layout.is-page.color5 .table .table-page-info .form-select,
.layout.is-page.color5 .table .pagination select,
.layout.is-page.color5 .table .pagination .form-select {
    padding: 0 30px 0 11px !important;
    border: 1px solid #d5deea;
    background-color: #fff;
    box-shadow: none;
}


/* Keep global table page-size dropdown above the scrollable table body. */
.layout.is-page.color5 .table > .table-container {
    overflow: visible !important;
}

.layout.is-page.color5 .table .table-wrapper.table-fixed {
    position: relative;
    z-index: 1;
}

.layout.is-page.color5 .table .nav-pages {
    position: relative;
    z-index: 30;
    min-height: 44px;
    overflow: visible !important;
    isolation: isolate;
}

.layout.is-page.color5 .table .nav-pages .table-page-info,
.layout.is-page.color5 .table .nav-pages .pagination-items {
    position: relative;
    z-index: 31;
    overflow: visible !important;
}

.layout.is-page.color5 .table .nav-pages .select,
.layout.is-page.color5 .table .table-page-info .select {
    position: relative;
    z-index: 32;
    overflow: visible !important;
    border-radius: 8px !important;
}

.layout.is-page.color5 .table .nav-pages .select .form-select,
.layout.is-page.color5 .table .table-page-info .select .form-select {
    border-radius: 8px !important;
}

.layout.is-page.color5 .table .nav-pages .select .dropdown-menu,
.layout.is-page.color5 .table .table-page-info .select .dropdown-menu {
    z-index: 1080 !important;
    min-width: 100% !important;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #d5deea;
    border-radius: 8px !important;
    background: #fff;
    box-shadow: 0 10px 28px rgb(15 23 42 / 16%);
}

.layout.is-page.color5 .table .nav-pages .select .dropdown-item,
.layout.is-page.color5 .table .table-page-info .select .dropdown-item {
    min-height: 32px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    font-size: 11px;
    line-height: 1.2;
}


/* Page-size menus need an unclipped ancestor and must open above the footer. */
.layout.is-page.color5 *:has(> .table:has(.table-page-info)),
.layout.is-page.color5 *:has(> .table > .table-container:has(.table-page-info)),
.layout.is-page.color5 .table:has(.table-page-info),
.layout.is-page.color5 .table:has(.table-page-info) > .table-container {
    overflow: visible !important;
}

.layout.is-page.color5 .table .nav-pages:has(.table-page-info) {
    z-index: 1100 !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .select {
    isolation: auto;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .select .dropdown-menu.show {
    position: absolute !important;
    inset: auto auto calc(100% + 4px) 0 !important;
    z-index: 1200 !important;
    display: block !important;
    min-width: 100% !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* ATCRazor applies .show to the Select parent, not to .dropdown-menu. */
.layout.is-page.color5 .table .nav-pages .table-page-info .select.show {
    position: relative !important;
    z-index: 1300 !important;
    overflow: visible !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .select.show > .dropdown-menu {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: calc(100% + 4px) !important;
    left: 0 !important;
    z-index: 1301 !important;
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-height: 220px;
    margin: 0 !important;
    overflow-y: auto !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .select.show > .dropdown-menu-arrow {
    display: none !important;
}


/* Native page-size select: browser popup is not clipped by table overflow. */
.layout.is-page.color5 .table .table-page-info .table-page-size-select {
    width: 104px;
    height: 32px;
    min-height: 32px;
    padding: 0 30px 0 10px !important;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px !important;
    background-color: #fff;
    font-size: 11px !important;
    font-weight: 400;
    line-height: 30px;
    box-shadow: none;
    cursor: pointer;
}

.layout.is-page.color5 .table .table-page-info .table-page-size-select:focus {
    border-color: #38a3c7;
    box-shadow: 0 0 0 2px rgb(56 163 199 / 16%);
    outline: 0;
}

.layout.is-page.color5 .table .table-page-info .table-page-size-select option {
    padding: 7px 10px;
    color: #475569;
    background: #fff;
    font-size: 12px;
}

.layout.is-page.color5 .table .table-page-info .table-page-size-select option:checked {
    color: #fff;
    background: #1596bd;
}


/* Compact native page-size control to match dense table rows. */
.layout.is-page.color5 .table .nav-pages .table-page-info {
    width: auto !important;
    min-width: max-content;
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    white-space: nowrap !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info > div {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .table-page-size-select {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 24px 0 8px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
    line-height: 26px !important;
}

.layout.is-page.color5 .table .nav-pages .table-page-info .table-page-size-select option {
    font-size: 10px;
}

.layout.is-page.color5 .table .nav-pages {
    min-height: 36px;
    padding: 4px 12px;
}


/* Global backdrop for the ATCRazor modern modal theme */
.modal-backdrop.show {
    opacity: .58;
    background-color: #0f172a;
    backdrop-filter: blur(3px);
}

.modal.show {
    backdrop-filter: blur(1px);
}


/* Preserve contextual button foreground colors inside globally styled table cells. */
.layout.is-page.color5 .table tbody td .btn-primary,
.layout.is-page.color5 .table tbody td .btn-primary *,
.layout.is-page.color5 .table tbody td .btn-secondary,
.layout.is-page.color5 .table tbody td .btn-secondary *,
.layout.is-page.color5 .table tbody td .btn-success,
.layout.is-page.color5 .table tbody td .btn-success *,
.layout.is-page.color5 .table tbody td .btn-danger,
.layout.is-page.color5 .table tbody td .btn-danger *,
.layout.is-page.color5 .table tbody td .btn-info,
.layout.is-page.color5 .table tbody td .btn-info * {
    color: #fff !important;
}

.layout.is-page.color5 .table tbody td .btn-warning,
.layout.is-page.color5 .table tbody td .btn-warning *,
.layout.is-page.color5 .table tbody td .btn-light,
.layout.is-page.color5 .table tbody td .btn-light * {
    color: #1f2937 !important;
}

.layout.is-page.color5 .table tbody td .btn {
    font-weight: 600 !important;
}

.layout.is-page.color5 .table tbody td .btn i,
.layout.is-page.color5 .table tbody td .btn svg {
    color: inherit !important;
    fill: currentColor;
}


/* Global spacing between table action buttons. */
.layout.is-page.color5 .table tbody td .btn {
    margin: 2px !important;
}

.layout.is-page.color5 .table .table-toolbar .table-toolbar-button + .table-toolbar-button,
.layout.is-page.color5 .table .table-toolbar .btn + .btn {
    margin-left: 4px !important;
}

.layout.is-page.color5 .table .btn-group {
    gap: 4px;
}

.layout.is-page.color5 .table .btn-group > .btn,
.layout.is-page.color5 .table .btn-group > .btn-group > .btn {
    margin-left: 0 !important;
    border-radius: 8px !important;
}


/* Keep a consistent 4px gap for buttons outside tables and inside modal content. */
.layout.is-page.color5 .btn + .btn,
.modal-dialog .btn + .btn,
.modal-dialog .table-toolbar-button + .table-toolbar-button {
    margin-left: 4px !important;
}

.layout.is-page.color5 .btn-group,
.modal-dialog .btn-group,
.modal-dialog .modal-footer,
.modal-dialog .table-toolbar {
    gap: 4px !important;
}

.modal-dialog .table tbody td .btn {
    margin: 2px !important;
}

.modal-dialog .btn-group > .btn,
.modal-dialog .btn-group > .btn-group > .btn {
    margin-left: 0 !important;
    border-radius: 8px !important;
}


/* Global soft action buttons — based on the /Tasks/ESS action style. */
.layout.is-page.color5 .btn-primary,
.layout.is-page.color5 .table .btn-primary,
.layout.is-page.color5 .btn-primary * {
    color: #1d4ed8 !important;
    background-color: #93c5fd !important;
    border-color: #60a5fa !important;
}

.layout.is-page.color5 .btn-success,
.layout.is-page.color5 .table .btn-success,
.layout.is-page.color5 .btn-success * {
    color: #15803d !important;
    background-color: #86efac !important;
    border-color: #4ade80 !important;
}

.layout.is-page.color5 .btn-danger,
.layout.is-page.color5 .table .btn-danger,
.layout.is-page.color5 .btn-danger * {
    color: #dc2626 !important;
    background-color: #fca5a5 !important;
    border-color: #f87171 !important;
}

.layout.is-page.color5 .btn-warning,
.layout.is-page.color5 .table .btn-warning,
.layout.is-page.color5 .btn-warning * {
    color: #b45309 !important;
    background-color: #fcd34d !important;
    border-color: #fbbf24 !important;
}

.layout.is-page.color5 .btn-info,
.layout.is-page.color5 .table .btn-info,
.layout.is-page.color5 .btn-info * {
    color: #087f8c !important;
    background-color: #67e8f9 !important;
    border-color: #22d3ee !important;
}

.layout.is-page.color5 .btn-secondary,
.layout.is-page.color5 .table .btn-secondary,
.layout.is-page.color5 .btn-secondary * {
    color: #475569 !important;
    background-color: #cbd5e1 !important;
    border-color: #64748b !important;
}

/* ไอคอนปุ่มในแถบ PreWork ต้องไม่รับพื้นหลังแยกจากปุ่มตามกฎลูกของ btn-primary */
.layout.is-page.color5 .prework-toolbar button.btn-primary > i {
    background: transparent !important;
}

.layout.is-page.color5 .btn-primary:hover { background-color: #60a5fa !important; border-color: #3b82f6 !important; }
.layout.is-page.color5 .btn-success:hover { background-color: #4ade80 !important; border-color: #22c55e !important; }
.layout.is-page.color5 .btn-danger:hover { background-color: #f87171 !important; border-color: #ef4444 !important; }
.layout.is-page.color5 .btn-warning:hover { background-color: #fbbf24 !important; border-color: #f59e0b !important; }
.layout.is-page.color5 .btn-info:hover { background-color: #22d3ee !important; border-color: #06b6d4 !important; }
.layout.is-page.color5 .btn-secondary:hover { background-color: #94a3b8 !important; border-color: #64748b !important; }

.layout.is-page.color5 .btn {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgb(15 23 42 / 5%);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.layout.is-page.color5 .btn:disabled,
.layout.is-page.color5 .btn.disabled {
    opacity: .72;
    box-shadow: none;
}


/* Keep soft-button foreground colors inside table cells and on hover. */
.layout.is-page.color5 .table tbody td .btn-primary,
.layout.is-page.color5 .table tbody td .btn-primary * { color: #1d4ed8 !important; }
.layout.is-page.color5 .table tbody td .btn-success,
.layout.is-page.color5 .table tbody td .btn-success * { color: #15803d !important; }
.layout.is-page.color5 .table tbody td .btn-danger,
.layout.is-page.color5 .table tbody td .btn-danger * { color: #dc2626 !important; }
.layout.is-page.color5 .table tbody td .btn-warning,
.layout.is-page.color5 .table tbody td .btn-warning * { color: #b45309 !important; }
.layout.is-page.color5 .table tbody td .btn-info,
.layout.is-page.color5 .table tbody td .btn-info * { color: #087f8c !important; }
.layout.is-page.color5 .table tbody td .btn-secondary,
.layout.is-page.color5 .table tbody td .btn-secondary * { color: #475569 !important; }



/* Global solid action buttons — dark backgrounds with light foregrounds. */
.layout.is-page.color5 .btn-primary,
.layout.is-page.color5 .table tbody td .btn-primary {
    color: #fff !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}
.layout.is-page.color5 .btn-primary:hover { background-color: #1d4ed8 !important; border-color: #1d4ed8 !important; }

.layout.is-page.color5 .btn-success,
.layout.is-page.color5 .table tbody td .btn-success {
    color: #fff !important;
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}
.layout.is-page.color5 .btn-success:hover { background-color: #15803d !important; border-color: #15803d !important; }

.layout.is-page.color5 .btn-danger,
.layout.is-page.color5 .table tbody td .btn-danger {
    color: #fff !important;
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}
.layout.is-page.color5 .btn-danger:hover { background-color: #dc2626 !important; border-color: #dc2626 !important; }

.layout.is-page.color5 .btn-warning,
.layout.is-page.color5 .table tbody td .btn-warning {
    color: #fff !important;
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}
.layout.is-page.color5 .btn-warning:hover { background-color: #b45309 !important; border-color: #b45309 !important; }

.layout.is-page.color5 .btn-info,
.layout.is-page.color5 .table tbody td .btn-info {
    color: #fff !important;
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
}
.layout.is-page.color5 .btn-info:hover { background-color: #0e7490 !important; border-color: #0e7490 !important; }

.layout.is-page.color5 .btn-secondary,
.layout.is-page.color5 .table tbody td .btn-secondary {
    color: #fff !important;
    background-color: #64748b !important;
    border-color: #64748b !important;
}
.layout.is-page.color5 .btn-secondary:hover { background-color: #475569 !important; border-color: #475569 !important; }

.layout.is-page.color5 .btn-primary *,
.layout.is-page.color5 .btn-success *,
.layout.is-page.color5 .btn-danger *,
.layout.is-page.color5 .btn-warning *,
.layout.is-page.color5 .btn-info *,
.layout.is-page.color5 .btn-secondary *,
.layout.is-page.color5 .table tbody td .btn-primary *,
.layout.is-page.color5 .table tbody td .btn-success *,
.layout.is-page.color5 .table tbody td .btn-danger *,
.layout.is-page.color5 .table tbody td .btn-warning *,
.layout.is-page.color5 .table tbody td .btn-info *,
.layout.is-page.color5 .table tbody td .btn-secondary * {
    color: #fff !important;
}


/* Solid buttons must not retain the former soft background on child elements. */
.layout.is-page.color5 .btn > *,
.layout.is-page.color5 .btn span,
.layout.is-page.color5 .btn i,
.layout.is-page.color5 .btn svg,
.layout.is-page.color5 .table tbody td .btn > *,
.layout.is-page.color5 .table tbody td .btn span,
.layout.is-page.color5 .table tbody td .btn i,
.layout.is-page.color5 .table tbody td .btn svg {
    background-color: transparent !important;
    background-image: none !important;
}


/* Global raised button treatment — based on the compact CLOSE button reference. */
.layout.is-page.color5 .btn {
    min-height: 36px;
    padding: 0 12px;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 0 rgb(15 23 42 / 18%), 0 2px 5px rgb(15 23 42 / 7%) !important;
    font-size: 11px;
    font-weight: 700;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.layout.is-page.color5 .btn:hover {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgb(15 23 42 / 18%), 0 1px 3px rgb(15 23 42 / 7%) !important;
    filter: brightness(.98);
}

.layout.is-page.color5 .btn:active,
.layout.is-page.color5 .btn.active {
    transform: translateY(3px);
    box-shadow: none !important;
}

.layout.is-page.color5 .btn-secondary,
.layout.is-page.color5 .table tbody td .btn-secondary,
.layout.is-page.color5 .btn-light,
.layout.is-page.color5 .table tbody td .btn-light {
    color: #111827 !important;
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

.layout.is-page.color5 .btn-secondary *,
.layout.is-page.color5 .table tbody td .btn-secondary *,
.layout.is-page.color5 .btn-light *,
.layout.is-page.color5 .table tbody td .btn-light * {
    color: #111827 !important;
}

.layout.is-page.color5 .btn-secondary:hover,
.layout.is-page.color5 .btn-light:hover {
    color: #111827 !important;
    background-color: #e5e7eb !important;
    border-color: #cbd5e1 !important;
}

.layout.is-page.color5 .btn:disabled,
.layout.is-page.color5 .btn.disabled {
    transform: none;
    box-shadow: 0 2px 0 rgb(15 23 42 / 10%) !important;
    filter: none;
}


/* Readable muted colors for disabled raised buttons. */
.layout.is-page.color5 .btn:disabled,
.layout.is-page.color5 .btn.disabled {
    opacity: 1 !important;
    cursor: not-allowed;
}

.layout.is-page.color5 .btn-primary:disabled,
.layout.is-page.color5 .btn-primary.disabled {
    color: #1d4ed8 !important;
    background-color: #dbeafe !important;
    border-color: #bfdbfe !important;
}

.layout.is-page.color5 .btn-success:disabled,
.layout.is-page.color5 .btn-success.disabled {
    color: #15803d !important;
    background-color: #dcfce7 !important;
    border-color: #bbf7d0 !important;
}

.layout.is-page.color5 .btn-danger:disabled,
.layout.is-page.color5 .btn-danger.disabled {
    color: #b91c1c !important;
    background-color: #fee2e2 !important;
    border-color: #fecaca !important;
}

.layout.is-page.color5 .btn-warning:disabled,
.layout.is-page.color5 .btn-warning.disabled {
    color: #92400e !important;
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
}

.layout.is-page.color5 .btn-info:disabled,
.layout.is-page.color5 .btn-info.disabled {
    color: #0e7490 !important;
    background-color: #cffafe !important;
    border-color: #a5f3fc !important;
}

.layout.is-page.color5 .btn:disabled *,
.layout.is-page.color5 .btn.disabled * {
    color: inherit !important;
}


/* Increase contrast for switches in the off state. */
.layout.is-page.color5 .switch:not(.is-checked) .switch-core {
    background-color: #94a3b8 !important;
    border-color: #64748b !important;
}

.layout.is-page.color5 .switch .switch-core::after {
    background-color: #fff !important;
    border: 1px solid rgb(15 23 42 / 10%);
    box-shadow: 0 1px 3px rgb(15 23 42 / 28%);
}

.layout.is-page.color5 .switch:not(.is-checked) .switch-core:hover {
    background-color: #7c8ba1 !important;
    border-color: #475569 !important;
}


/* Compact controls and rows inside tables only. */
.layout.is-page.color5 .table tbody td {
    height: 34px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.layout.is-page.color5 .table tbody td .btn {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    gap: 4px;
    border-radius: 6px !important;
    box-shadow: 0 2px 0 rgb(15 23 42 / 16%), 0 1px 3px rgb(15 23 42 / 6%) !important;
    font-size: 10px !important;
}

.layout.is-page.color5 .table tbody td .btn:hover {
    box-shadow: 0 1px 0 rgb(15 23 42 / 16%) !important;
}

.layout.is-page.color5 .table input[type="checkbox"],
.layout.is-page.color5 .table .form-check-input,
.layout.is-page.color5 .table .checkbox input,
.layout.is-page.color5 .table .checkbox > span {
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
    min-height: 14px !important;
}

.layout.is-page.color5 .table .form-check,
.layout.is-page.color5 .table .checkbox {
    min-height: 14px;
    margin: 0;
}


/* Keep disabled toolbar actions readable, including ESS bulk cancel. */
.layout.is-page.color5 .table .table-toolbar .btn-danger:disabled,
.layout.is-page.color5 .table .table-toolbar .btn-danger.disabled {
    color: #b91c1c !important;
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    opacity: 1 !important;
}

.layout.is-page.color5 .table .table-toolbar .btn-danger:disabled *,
.layout.is-page.color5 .table .table-toolbar .btn-danger.disabled * {
    color: #b91c1c !important;
    background-color: transparent !important;
}


/* Center ellipsis content without overriding sticky/fixed column positioning. */
.layout.is-page.color5 .table thead th,
.layout.is-page.color5 .table tbody td {
    vertical-align: middle !important;
}

.layout.is-page.color5 .table thead th .table-cell.is-ellips:not(.is-resizable) {
    min-height: 34px;
    display: flex !important;
    align-items: center;
    overflow: hidden;
}

.layout.is-page.color5 .table tbody td .table-cell.is-ellips:not(.is-resizable) {
    min-height: 26px;
    display: flex !important;
    align-items: center;
    overflow: hidden;
}

.layout.is-page.color5 .table thead th .table-cell.is-ellips.is-resizable,
.layout.is-page.color5 .table tbody td .table-cell.is-ellips.is-resizable {
    top: 50% !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
}


/* Global compact spacing for adjacent action buttons.
   Use one 4px gap source so flex gap and button margins do not accumulate. */
.layout.is-page.color5 .btn-toolbar,
.layout.is-page.color5 .btn-group,
.layout.is-page.color5 .table-toolbar,
.layout.is-page.color5 .table-toolbar .d-flex,
.layout.is-page.color5 .table-toolbar [class*="toolbar-actions"],
.layout.is-page.color5 .table-toolbar [class*="filterbar-actions"],
.modal-dialog .btn-toolbar,
.modal-dialog .btn-group,
.modal-dialog .modal-footer {
    gap: 4px !important;
}

.layout.is-page.color5 .btn + .btn,
.layout.is-page.color5 .table .btn + .btn,
.layout.is-page.color5 .table-toolbar .btn,
.layout.is-page.color5 .btn-group > .btn,
.modal-dialog .btn + .btn,
.modal-dialog .btn-group > .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* Global ultra-compact controls inside table body rows only. */
.layout.is-page.color5 .table tbody tr {
    height: 30px !important;
}

.layout.is-page.color5 .table tbody td {
    height: 30px !important;
    min-height: 30px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
}

.layout.is-page.color5 .table tbody td .table-cell,
.layout.is-page.color5 .table tbody td .table-cell.is-ellips {
    min-height: 22px !important;
    line-height: 22px !important;
}

.layout.is-page.color5 .table tbody td .btn {
    width: auto;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 6px !important;
    gap: 3px !important;
    border-radius: 5px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    box-shadow: 0 1px 0 rgb(15 23 42 / 16%) !important;
}

.layout.is-page.color5 .table tbody td .btn:has(> i:only-child),
.layout.is-page.color5 .table tbody td .btn:has(> svg:only-child) {
    width: 24px !important;
    padding: 0 !important;
}

.layout.is-page.color5 .table tbody td input[type="checkbox"],
.layout.is-page.color5 .table tbody td .form-check-input,
.layout.is-page.color5 .table tbody td .checkbox input,
.layout.is-page.color5 .table tbody td .checkbox > span {
    width: 12px !important;
    min-width: 12px !important;
    height: 12px !important;
    min-height: 12px !important;
    border-radius: 3px !important;
}

.layout.is-page.color5 .table tbody td .form-check,
.layout.is-page.color5 .table tbody td .checkbox {
    min-height: 12px !important;
    line-height: 12px !important;
}

.layout.is-page.color5 .table tbody td .switch {
    --bb-switch-padding: 0;
    --bb-switch-border-radius: 8px;
    --bb-switch-bar-width: 12px;
    --bb-switch-bar-height: 12px;
    --bb-switch-bar-top: 1px;
    width: auto !important;
    min-height: 16px !important;
    padding: 0 !important;
}

.layout.is-page.color5 .table tbody td .switch .switch-core {
    width: 30px !important;
    min-width: 30px !important;
    height: 16px !important;
    min-height: 16px !important;
}

.layout.is-page.color5 .table tbody td .form-control,
.layout.is-page.color5 .table tbody td .select,
.layout.is-page.color5 .table tbody td select {
    min-height: 24px !important;
    height: 24px !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    border-radius: 5px !important;
    font-size: 10px !important;
}

.layout.is-page.color5 .table tbody td .badge {
    padding: 3px 6px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
    line-height: 1 !important;
}

/* Shared management filter bar
   Usage: wms-filterbar > actions + divider + filters. */
.wms-filterbar {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
}

.wms-filterbar-actions,
.wms-filterbar-filters {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.wms-filterbar-actions {
    flex: 0 0 auto;
}

.wms-filterbar-filters {
    flex: 1 1 auto;
    justify-content: flex-end;
}

.wms-filterbar-divider {
    width: 1px;
    height: 30px;
    flex: 0 0 1px;
    margin: 0 4px;
    background: #d5deea;
}

.wms-filter-label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    color: #718198;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.wms-filter-label i {
    color: #2468e8;
}

.wms-filter-search {
    position: relative;
    width: 285px;
    min-width: 190px;
    max-width: 360px;
    height: 38px;
    flex: 0 1 285px;
    display: flex;
    align-items: center;
}

.wms-filter-search > i {
    position: absolute;
    left: 12px;
    z-index: 1;
    color: #65758e;
    font-size: 13px;
    pointer-events: none;
}

.wms-filter-search input {
    width: 100%;
    height: 38px;
    padding: 0 38px 0 35px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    outline: 0;
    color: #263751;
    background: #fff;
    font-size: 12px;
}

.wms-filter-search input::placeholder {
    color: #8b99ad;
}

.wms-filter-search input:focus,
.wms-filter-select:focus {
    border-color: #5d91e8;
    box-shadow: 0 0 0 3px rgb(36 104 232 / 11%);
}

.wms-filter-search button {
    position: absolute;
    right: 7px;
    width: 25px;
    height: 25px;
    display: grid;
    border: 0;
    border-radius: 6px;
    place-items: center;
    color: #52647c;
    background: #eef2f7;
    font-size: 11px;
}

.wms-filter-search button:hover {
    color: #1e2b40;
    background: #dfe6ef;
}

.wms-filter-select {
    width: 145px;
    height: 38px;
    flex: 0 1 145px;
    padding: 0 32px 0 11px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    outline: 0;
    color: #34445d;
    background-color: #fff;
    font-size: 11px;
}

.wms-filter-select--wide {
    width: 180px;
    flex-basis: 180px;
}

.wms-filter-select--compact {
    width: 130px;
    flex-basis: 130px;
}

.wms-filter-segment {
    height: 38px;
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    background: #fff;
}

.wms-filter-segment button {
    min-width: 68px;
    padding: 0 9px;
    border: 0;
    border-right: 1px solid #d7e0eb;
    color: #526176;
    background: #fff;
    font-size: 10px;
    font-weight: 650;
}

.wms-filter-segment button:last-child {
    border-right: 0;
}

.wms-filter-segment button:hover {
    color: #1d5fd3;
    background: #f1f6ff;
}

.wms-filter-segment button.active {
    color: #1d5fd3;
    background: #eaf1ff;
    box-shadow: inset 0 0 0 1px #1d5fd3;
}

.wms-filter-reset {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    place-items: center;
    color: #34445d;
    background: #fff;
}

.wms-filter-reset:hover {
    border-color: #9eb2cc;
    color: #1d5fd3;
    background: #f1f6ff;
}

.wms-filterbar-actions > .btn {
    min-height: 38px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 1450px) {
    .wms-filterbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .wms-filterbar-divider {
        display: none;
    }

    .wms-filterbar-filters {
        flex: 1 1 100%;
        justify-content: flex-start;
        padding-top: 4px;
        border-top: 1px solid #e1e7ef;
    }
}

@media (max-width: 850px) {
    .wms-filterbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .wms-filterbar-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .wms-filter-label {
        flex-basis: 100%;
    }

    .wms-filter-search,
    .wms-filter-select,
    .wms-filter-select--wide,
    .wms-filter-select--compact {
        width: auto;
        max-width: none;
        flex: 1 1 240px;
    }

    .wms-filter-segment {
        flex: 1 1 auto;
    }

    .wms-filter-segment button {
        min-width: 0;
        flex: 1 1 0;
    }
}

@media (max-width: 560px) {
    .wms-filter-search,
    .wms-filter-select,
    .wms-filter-select--wide,
    .wms-filter-select--compact,
    .wms-filter-segment {
        width: 100%;
        flex: 1 1 100%;
    }

    .wms-filter-reset {
        margin-left: auto;
    }
}



/* Reusable WMS table footer and pagination layout.
   Add wms-table-standard to the page-level table shell. */
.layout.is-page.color5 .wms-table-standard {
    padding-bottom: 0 !important;
}

.layout.is-page.color5 .wms-table-standard .table-container {
    padding-bottom: 0 !important;
}

.layout.is-page.color5 .wms-table-standard table.table thead > tr > th {
    height: 55px !important;
    padding: 8px !important;
    color: #fff !important;
    background: #1f66b8 !important;
    border-color: rgba(255, 255, 255, .16) !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
}

.layout.is-page.color5 .wms-table-standard table.table thead > tr > th > .table-cell,
.layout.is-page.color5 .wms-table-standard table.table thead > tr > th .table-text {
    min-height: 1.65em !important;
    line-height: 1.5 !important;
    overflow: visible !important;
}

.layout.is-page.color5 .wms-table-standard table.table tbody > tr > td {
    height: 45px !important;
    padding: 4px 8px !important;
    border-color: #e5eaf1 !important;
    vertical-align: middle !important;
}

.layout.is-page.color5 .wms-table-standard table.table tbody > tr:hover > td {
    background: #f5f9ff !important;
}

.layout.is-page.color5 .wms-table-standard .nav-pages {
    min-height: 52px !important;
    height: 52px !important;
    max-height: 52px !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    flex: 0 0 52px !important;
    align-items: center;
    overflow: visible !important;
    border-top: 0 !important;
}

.layout.is-page.color5 .wms-table-standard .nav-pages > .table-page-info,
.layout.is-page.color5 .wms-table-standard .nav-pages > .pagination,
.layout.is-page.color5 .wms-table-standard .nav-pages > .page-goto {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center;
}

.layout.is-page.color5 .wms-table-standard .nav-pages > .table-page-info {
    flex: 0 0 auto;
    white-space: nowrap;
}

.layout.is-page.color5 .wms-table-standard .nav-pages > .pagination {
    height: 40px !important;
    min-height: 40px !important;
    margin-left: auto !important;
    padding: 0 !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end !important;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 0 !important;
    scrollbar-gutter: stable;
}

.layout.is-page.color5 .wms-table-standard .nav-pages > .page-goto {
    flex: 0 0 auto;
    margin-left: 8px !important;
}


/* Reusable WMS summary cards — shared by Container, Location and future pages. */
.layout.is-page.color5 .wms-page-header-actions .wms-report-refresh {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #d5deea;
    border-radius: 9px;
    background: #fff;
    color: #1c2b49;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(15, 44, 88, .06);
    cursor: pointer;
}
.layout.is-page.color5 .wms-page-header-actions .wms-report-refresh:hover:not(:disabled) { border-color: #2563eb; color: #2563eb; }
.layout.is-page.color5 .wms-page-header-actions .wms-report-refresh:disabled { opacity: .55; cursor: not-allowed; }

.layout.is-page.color5 .wms-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.layout.is-page.color5 .wms-summary-card {
    min-width: 0;
    min-height: 72px !important;
    height: 72px;
    padding: 12px 15px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dce5f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.layout.is-page.color5 .wms-summary-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    flex: 0 0 38px !important;
    margin: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 10px !important;
    font-size: 15px !important;
}

.layout.is-page.color5 .wms-summary-grid--five {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.layout.is-page.color5 .wms-summary-icon--blue { color: #2563eb; background: #dbeafe; }
.layout.is-page.color5 .wms-summary-icon--emerald { color: #059669; background: #d1fae5; }
.layout.is-page.color5 .wms-summary-icon--cyan { color: #0891b2; background: #cffafe; }
.layout.is-page.color5 .wms-summary-icon--red { color: #dc2626; background: #fee2e2; }
.layout.is-page.color5 .wms-summary-icon--amber { color: #b45309; background: #fff4df; }

.layout.is-page.color5 .wms-summary-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.layout.is-page.color5 .wms-summary-label {
    margin: 0 !important;
    overflow: hidden;
    color: #64748b;
    font-size: 10px !important;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout.is-page.color5 .wms-summary-value {
    margin: 2px 0 0 !important;
    overflow: visible;
    color: #172033;
    font-size: 20px !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
}

/* Reusable compact record-detail strip. */
.layout.is-page.color5 .wms-detail-strip {
    min-height: 72px !important;
    margin-bottom: 10px !important;
}

.layout.is-page.color5 .wms-detail-strip-field {
    min-height: 70px;
    padding: 10px 14px !important;
}

.layout.is-page.color5 .wms-detail-strip-field > small {
    margin-bottom: 3px !important;
    font-size: 9px !important;
}

.layout.is-page.color5 .wms-detail-strip-field > strong {
    font-size: 11px !important;
}

.layout.is-page.color5 .wms-detail-strip-actions {
    min-height: 70px;
    padding: 0 10px !important;
}

@media (max-width: 1050px) {
    .layout.is-page.color5 .wms-summary-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 560px) {
    .layout.is-page.color5 .wms-summary-grid {
        grid-template-columns: 1fr;
    }

    .layout.is-page.color5 .wms-summary-card {
        height: auto;
        min-height: 72px !important;
    }
}


/* Reusable compact WMS page header.
   Structure: wms-page-header > wms-page-header-content + action/actions. */
.layout.is-page.color5 .wms-page-header {
    width: 100%;
    min-width: 0;
    min-height: 64px !important;
    height: 64px;
    max-height: 64px;
    padding: 0 !important;
    display: flex;
    flex: 0 0 64px;
    align-items: center !important;
    justify-content: space-between;
    gap: 16px;
}

.layout.is-page.color5 .wms-page-header-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.layout.is-page.color5 .wms-page-eyebrow {
    display: block;
    margin: 0 0 2px !important;
    color: #2563eb;
    font-size: 9px !important;
    font-weight: 850 !important;
    line-height: 1.15;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.layout.is-page.color5 .wms-page-header h1 {
    margin: 0 !important;
    overflow: hidden;
    color: #0f172a;
    font-size: 25px !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout.is-page.color5 .wms-page-header p {
    margin: 3px 0 0 !important;
    overflow: hidden;
    color: #64748b;
    font-size: 11px !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout.is-page.color5 .wms-page-header-action {
    min-height: 40px;
    flex: 0 0 auto;
}

.layout.is-page.color5 .wms-page-primary-action {
    display: inline-flex;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #1768c5;
    border-radius: 9px;
    color: #fff;
    background: #1768c5;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(23, 104, 197, .14);
}

.layout.is-page.color5 .wms-page-primary-action:hover:not(:disabled) {
    color: #fff;
    border-color: #0f58aa;
    background: #0f58aa;
}

.layout.is-page.color5 .wms-page-header-icon {
    width: 48px !important;
    height: 48px !important;
    min-height: 48px;
    flex-basis: 48px !important;
    border-radius: 13px !important;
    font-size: 19px !important;
}

.layout.is-page.color5 .wms-page-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

@media (max-width: 680px) {
    .layout.is-page.color5 .wms-page-header {
        min-height: 58px !important;
        height: auto;
        max-height: none;
        padding: 4px 0 !important;
        flex-basis: auto;
        align-items: flex-start !important;
    }

    .layout.is-page.color5 .wms-page-header h1 {
        font-size: 21px !important;
    }

    .layout.is-page.color5 .wms-page-header p {
        max-width: 70vw;
        white-space: normal;
    }

    .layout.is-page.color5 .wms-page-header-icon {
        width: 42px !important;
        height: 42px !important;
        min-height: 42px;
        flex-basis: 42px !important;
    }

    .layout.is-page.color5 .wms-page-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* Thai headings need enough ascent space for tone marks and stacked diacritics. */
.layout.is-page.color5 .wms-page-header .wms-page-header-content > h1 {
    min-height: 1.35em;
    padding-top: 0.12em;
    line-height: 1.3 !important;
    overflow: visible;
}

/* Roles page scrolls only inside its role and permission panels. */
.layout.is-page.color5 .tabs-body:has(.roles-designer),
.layout.is-page.color5 .tabs-body-content:has(.roles-designer) {
    overflow: hidden !important;
}

.layout.is-page.color5 .wms-data-card-heading {
    min-height: 58px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #d8e2ee;
}
.layout.is-page.color5 .wms-data-card-heading h2 { margin: 0; color: #172033; font-size: 16px; font-weight: 800; }
.layout.is-page.color5 .wms-data-card-heading p { margin: 4px 0 0; color: #64748b; font-size: 12px; }
.layout.is-page.color5 .wms-live-status,
.layout.is-page.color5 .wms-last-updated,
.layout.is-page.color5 .wms-live-indicator { display: flex; align-items: center; }
.layout.is-page.color5 .wms-live-status { gap: 12px; }
.layout.is-page.color5 .wms-last-updated { gap: 5px; color: #64748b; font-size: 10px; white-space: nowrap; }
.layout.is-page.color5 .wms-last-updated i { color: #2563eb; }
.layout.is-page.color5 .wms-live-indicator { gap: 6px; padding: 6px 10px; border-radius: 999px; color: #059669; background: #d1fae5; font-size: 9px; font-weight: 800; white-space: nowrap; }
.layout.is-page.color5 .wms-live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }

@media (max-width: 1200px) {
    .layout.is-page.color5 .wms-summary-grid--five { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 700px) {
    .layout.is-page.color5 .wms-summary-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout.is-page.color5 .wms-data-card-heading { align-items: flex-start; flex-direction: column; }
    .layout.is-page.color5 .wms-live-status { width: 100%; justify-content: space-between; }
}

/* Pagination is rendered as a sibling of the table element by BootstrapBlazor. */
.layout.is-page .table-container.table-container > .nav-pages {
    padding-right: 12px !important;
    padding-left: 12px !important;
    box-sizing: border-box;
}

/* Shared page layout contract for non-dashboard application pages.
   A page opts in by placing wms-page-header as a direct child of its root. */
.layout.is-page.color5 :is(main, section, div):has(> .wms-page-header) {
    --wms-page-gap: 8px;
    --wms-page-padding: 18px;
    min-width: 0;
    padding: var(--wms-page-padding) !important;
    gap: 0 !important;
    color: #12213f;
    background-color: #f4f7fb;
    box-sizing: border-box;
}

.layout.is-page.color5 :is(main, section, div):has(> .wms-page-header) > .wms-page-header {
    margin: 0 0 var(--wms-page-gap) !important;
}

.layout.is-page.color5 :is(main, section, div):has(> .wms-page-header) > :is(.wms-summary-grid, [class$="-summary"], [class*="-summary "]) {
    margin-top: 0 !important;
    margin-bottom: var(--wms-page-gap) !important;
}

/* Thai combining marks need ascent space and must not be clipped by compact tables. */
.layout.is-page.color5 .table thead th > .table-cell,
.layout.is-page.color5 .table thead th .table-text {
    min-height: 1.65em;
    line-height: 1.5 !important;
    overflow: visible !important;
}

.layout.is-page.color5 .table thead th .table-text {
    padding-top: 2px;
    padding-bottom: 2px;
}

@media (max-width: 700px) {
    .layout.is-page.color5 :is(main, section, div):has(> .wms-page-header) {
        --wms-page-padding: 12px;
    }
}
/* Shared overlays, drawers and editor surfaces used by WMS data-management pages. */
.wms-drawer-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;
    background: rgba(15, 31, 52, .42);
    backdrop-filter: blur(2px);
}

.wms-drawer {
    position: fixed;
    z-index: 1091;
    top: 0;
    right: 0;
    width: min(440px, 100vw);
    height: 100vh;
    border: 0;
    border-left: 1px solid #d7e2ee;
    border-radius: 0;
    background: #fff;
    box-shadow: -18px 0 45px rgba(10, 31, 56, .22);
    animation: wms-drawer-enter .18s ease-out;
}

.wms-overlay-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #526b86;
    background: #edf3f8;
}

.wms-overlay-close:hover,
.wms-overlay-close:focus-visible,
.wms-icon-action:hover,
.wms-icon-action:focus-visible {
    outline: 0;
    color: #fff;
    background: #1768c5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.wms-icon-action {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #9dc4f2;
    border-radius: 8px;
    color: #1768c5;
    background: #fff;
}

@keyframes wms-drawer-enter {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.wms-modal-shell {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d5e0eb;
    border-radius: 16px;
    color: #102b4c;
    background: #f5f8fb;
    box-shadow: 0 24px 70px rgba(9, 26, 48, .35);
}

.wms-modal-backdrop {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: grid;
    padding: 22px;
    place-items: center;
    background: rgba(13, 31, 55, .62);
    backdrop-filter: blur(2px);
}

.wms-modal-header,
.wms-modal-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-color: #d8e3ed;
    background: #fff;
}

.wms-modal-body { min-height: 0; overflow-y: auto; }
.wms-modal-section { border: 1px solid #d8e3ed; border-radius: 12px; background: #fff; }
.wms-step-heading { display: flex; align-items: center; gap: 9px; }
.wms-step-heading > span {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: #1768c5;
    font-size: 11px;
    font-weight: 800;
}
.wms-step-heading h3 { margin: 0; color: #172a45; font-size: 14px; }
.wms-step-heading p { margin: 1px 0 0; color: #73849a; font-size: 10px; }
.wms-inline-table { overflow: hidden; border: 1px solid #dbe5ee; border-radius: 9px; background: #fff; }

.wms-live-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.wms-live-status > span { color: #64748b; font-size: 9px; }
.wms-live-status > span i { color: #2563eb; }
.wms-live-status > b {
    display: inline-flex;
    padding: 5px 8px;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    color: #059669;
    background: #d1fae5;
    white-space: nowrap;
    font-size: 8px;
}
.wms-live-status > b i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }

/* Reusable dialog actions with stable contrast across WMS themes. */
.wms-dialog-button {
    display: inline-flex;
    min-height: 39px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.wms-dialog-button-primary,
.wms-dialog-button-primary *,
.layout.is-page.color5 .wms-dialog-button-primary,
.layout.is-page.color5 .wms-dialog-button-primary * {
    color: #fff !important;
}

.wms-dialog-button-primary,
.layout.is-page.color5 .wms-dialog-button-primary {
    background-color: #1269d3 !important;
    border-color: #1269d3 !important;
}

.wms-dialog-button-primary:hover,
.layout.is-page.color5 .wms-dialog-button-primary:hover {
    background-color: #0e58b2 !important;
    border-color: #0e58b2 !important;
}

.wms-dialog-button-secondary,
.wms-dialog-button-secondary *,
.layout.is-page.color5 .wms-dialog-button-secondary,
.layout.is-page.color5 .wms-dialog-button-secondary * {
    color: #37516f !important;
}

.wms-dialog-button-secondary,
.layout.is-page.color5 .wms-dialog-button-secondary {
    background-color: #fff !important;
    border-color: #ccd9e8 !important;
}

.wms-dialog-button-secondary:hover,
.layout.is-page.color5 .wms-dialog-button-secondary:hover {
    background-color: #f3f7fb !important;
    border-color: #abc0d8 !important;
}

.wms-dialog-button:focus-visible {
    outline: 3px solid rgb(37 99 235 / 24%);
    outline-offset: 2px;
}

.wms-dialog-button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

/* Shared loading feedback for scan and command workflows. */
.wms-scan-control :is(button, input):disabled {
    cursor: wait;
    opacity: .72;
}

.wms-loading-overlay {
    position: fixed;
    z-index: 1600;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(12, 27, 48, .5);
    backdrop-filter: blur(2px);
}

.wms-loading-card {
    display: flex;
    width: min(300px, calc(100% - 36px));
    padding: 24px;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(7, 27, 55, .28);
}

.wms-loading-card > i { color: #1269d3; font-size: 26px; }
.wms-loading-card > strong { margin-top: 4px; color: #0c294d; font-size: 13px; }
.wms-loading-card > span { color: #71839a; font-size: 10px; }

/* Shared blocking error dialog for warehouse workflows. */
.wms-error-backdrop {
    position: fixed;
    z-index: 1700;
    inset: 0;
    display: grid;
    padding: 18px;
    place-items: center;
    background: rgba(12, 27, 48, .58);
    backdrop-filter: blur(2px);
}

.wms-error-dialog {
    width: min(420px, 100%);
    padding: 24px;
    text-align: center;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(7, 27, 55, .3);
}

.wms-error-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    place-items: center;
    border-radius: 15px;
    color: #dc2626;
    background: #fee2e2;
    font-size: 22px;
}

.wms-error-dialog > small { color: #dc2626; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.wms-error-dialog > h2 { margin: 5px 0; color: #172033; font-size: 19px; }
.wms-error-dialog > p { margin: 0 0 18px; color: #64748b; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.wms-error-dialog > button { width: 100%; }
.wms-error-dialog.is-success .wms-error-icon { color: #078653; background: #dcf7ea; }
.wms-error-dialog.is-success > small { color: #078653; }

