/* Custom color for the global DevExtreme LoadPanel indicator */
.custom-global-spinner .dx-loadindicator-segment {
    border-color: #9bac7f transparent transparent !important;
}

/* Generic Page Panel Styles */
.page-panel {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.08); /* Light drop shadow on bottom and right */
    overflow: hidden;
}

.page-panel-header {
    background-color: var(--theme-bg-light, #f8f9fa);
    color: #4b4b4b;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e0e0;
}

.page-panel-body {
    padding: 14px;
}

/* Global App Notification Banner Layout */
.app-notify-banner {
    position: fixed;
    bottom: -150px; /* Starts hidden off-screen */
    left: 0;
    width: 100vw;
    color: #ffffff;
    z-index: 2147483647; /* Maximum z-index to overlay global loaders and menus */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    box-sizing: border-box;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Segoe UI', Verdana, sans-serif;
}

    .app-notify-banner.show {
        bottom: 0; /* Snaps flush to the bottom edge */
    }

.app-notify-text {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.4;
}

.app-notify-close {
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    margin-left: 20px;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

    .app-notify-close:hover {
        opacity: 1;
    }

/* ==========================================================
   Global Top Fixed Title Bar Styles (Reusable across pages)
   ================================================---------- */
.page-title-bar {
    padding: 0 15px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    background-color: color-mix(in srgb, var(--theme-color) 10%, #ffffff);
    z-index: 10;
    height: 42px;
    /* Flex layout to align title on left and toolbar on right */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .page-title-bar .title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #4b4b4b;
        margin: 0;
    }

    .page-title-bar .right-block {
        height: 100%;
        display: flex;
        align-items: center;
    }

        /* Force DevExtreme Toolbar to fill 100% height and remove default borders/backgrounds inside title bar */
        .page-title-bar .right-block .dx-toolbar {
            height: 100% !important;
            background-color: transparent !important;
            border: none !important;
        }

        .page-title-bar .right-block .dx-toolbar-items-container {
            height: 100% !important;
        }

/* Universal Empty State for DevExtreme DataGrids */
.dx-datagrid-nodata {
    /* Base64 encoded SVG: A clean magnifying glass over a document */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23cbd5e1' stroke-width='2'%3E%3Crect x='12' y='8' width='40' height='48' rx='4' /%3E%3Cline x1='20' y1='24' x2='44' y2='24' /%3E%3Cline x1='20' y1='32' x2='36' y2='32' /%3E%3Ccircle cx='38' cy='42' r='10' fill='%23ffffff' /%3E%3Cline x1='45' y1='49' x2='54' y2='58' stroke-width='4' stroke-linecap='round' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center calc(50% - 25px);
    background-size: 75px;
    /* Push the existing 'Please enter search...' text below the image */
    padding-top: 110px !important;
    /* Softer corporate text styling */
    color: #64748b !important;
    font-size: 14px;
    font-weight: 500;
}

body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

.content {
    overflow: auto;
}

.content.no-navigation {
    margin-left: 15px;
    margin-right: 15px;
}

.home-views-caption {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}

#app-side-nav-outer-toolbar {
    flex-direction: column;
    display: flex; 
    height: 100%;
    width: 100%;
}

.layout-header {
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
    z-index: 1505;
}

.dx-toolbar .dx-toolbar-item.menu-button {
    width: 60px;
    text-align: center;
    padding: 0;
}

.dx-card {
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    border-radius: 4px;
    background-color: #fff;
    margin: 2px 2px 3px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

.with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content {
    height: 100%;
}

.with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content > .dx-scrollview-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.layout-body {
    background-color: #f2f2f2;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.layout-body .menu-container {
    height: 100%;
    width: 250px;
    background-color: #fff;
}

.layout-body .content {
    flex-grow: 1;
    height: 100%;
    line-height: 1.5;
    margin: 20px 40px;
}

.layout-body .content h2 {
    font-size: 32px;
    line-height: 40px;
}

.layout-body .content-block {
    margin: 0 0 20px;
}

.layout-body .content-footer {
    display: block;
    color: rgba(0,0,0,.609);
    border-top: 1px solid rgba(0,0,0,.1);
    padding-top: 20px;
    padding-bottom: 24px;
    margin: 0 40px;
}

.layout-body .responsive-paddings {
    padding: 20px;
}

.layout-body-hidden {
    visibility: hidden;
}

#layout-drawer.dx-drawer-shrink .dx-drawer-panel-content {
    box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 2px 0px;
}

@media screen and (max-width: 600px) {
    .layout-body .content {
        margin: 20px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

.menu-container .dx-widget {
    font-weight: 700;
    font-size: 14px;
    font-family: Roboto,RobotoFallback,Helvetica,Arial,sans-serif;
}

.menu-container .dx-treeview {
    white-space: nowrap;
}

.menu-container .dx-treeview .dx-treeview-item {
    padding-left: 0;
    flex-direction: row-reverse;
    border-radius: 0;
}

.menu-container .dx-treeview .dx-treeview-item .dx-icon {
    width: 60px !important;
    margin: 0 !important;
}

.menu-container .dx-treeview .dx-treeview-node {
    padding: 0 0 !important;
}

.menu-container .dx-treeview .dx-treeview-toggle-item-visibility {
    right: 10px;
    left: auto;
}

.menu-container .dx-treeview .dx-rtl .dx-treeview-toggle-item-visibility {
    left: 10px;
    right: auto;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="1"] {
    font-weight: bold;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
    font-weight: normal;
    padding: 0 60px;
}

