.pro-data-page {
    min-height: calc(100dvh - 72px);
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding: 10px 14px;
    gap: 10px;
}

.pro-page-header {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 4px;
}

.pro-title-block {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pro-page-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.pro-page-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.pro-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.pro-data-panel {
    flex: 1 1 auto;
    min-height: calc(100dvh - 210px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: visible;
}

.global-listing-page #listing-fragment {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.global-listing-page .listing-table-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.global-listing-page .listing-table-container > .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
}

.pro-data-toolbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.pro-search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.pro-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pro-toolbar-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    min-width: 0;
    overflow: visible;
}

.pro-toolbar-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 320px;
}

.pro-toolbar-group--actions {
    justify-content: flex-end;
    flex: 0 1 auto;
}

.pro-toolbar-btn {
    flex: 0 0 auto;
}

.pro-data-toolbar .btn,
.pro-data-toolbar .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pro-data-toolbar .btn i,
.pro-data-toolbar .dropdown-toggle i {
    font-size: 0.95rem;
    line-height: 1;
    flex: 0 0 auto;
}

.pro-data-toolbar .dropdown-toggle::after {
    margin-left: 0.35rem;
}

.pro-toolbar-control {
    flex: 1 1 140px;
    min-width: 0;
}

.pro-toolbar-control--compact {
    flex: 0 0 82px;
}

.pro-toolbar-control--sort {
    flex: 1 1 190px;
}

.pro-toolbar-control--direction {
    flex: 0 0 120px;
}

.pro-toolbar-inline-selects {
    display: flex;
    flex: 1 1 320px;
    min-width: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.pro-search-box {
    position: relative;
    width: 100%;
    min-width: 0;
}

.pro-search-box input {
    width: 100%;
    height: 48px;
    padding: 0 120px 0 48px;
    border-radius: 16px;
    border: 1px solid #d6deea;
    white-space: nowrap;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pro-search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
}

.pro-search-box .pro-search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pro-search-box input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.22rem rgba(59, 130, 246, 0.12);
}

.pro-advanced-toggle-btn {
    min-width: 140px;
    height: 48px;
    border-radius: 16px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pro-advanced-toggle-btn.active,
.pro-advanced-toggle-btn[aria-pressed="true"] {
    color: #0b57d0;
    border-color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
}

.data-toolbar-advanced-only {
    transition: opacity 160ms ease, transform 160ms ease;
}

.global-listing-page[data-page-mode="simple"] .data-toolbar-advanced-only,
.pro-data-page[data-page-mode="simple"] .data-toolbar-advanced-only {
    display: none !important;
}

.global-listing-page[data-page-mode="advanced"] .data-toolbar-advanced-only,
.pro-data-page[data-page-mode="advanced"] .data-toolbar-advanced-only {
    display: block;
}

.pro-data-toolbar .btn,
.pro-data-toolbar select,
.pro-data-toolbar input {
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.pro-data-toolbar .form-select,
.pro-data-toolbar .form-control {
    width: 100%;
    min-width: 0;
}

.pro-filters-grid {
    align-items: start;
}

.pro-filters-grid > * {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.pro-filters-grid .form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.pro-filters-grid .form-select,
.pro-filters-grid .form-control {
    width: 100%;
}

.pro-filters-collapse .card {
    border-radius: 16px;
}

.pro-filters-collapse .card-body {
    padding: 1rem;
}

@media (max-width: 1360px) {
    .pro-toolbar-strip {
        grid-template-columns: 1fr;
    }

    .pro-toolbar-group,
    .pro-toolbar-group--actions {
        width: 100%;
    }

    .pro-toolbar-group--actions {
        justify-content: flex-start;
    }
}

.pro-table-zone {
    flex: 1 1 auto;
    min-height: 480px;
    max-height: calc(100dvh - 320px);
    overflow: auto;
    position: relative;
}

.pro-card-zone {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.pro-data-footer {
    flex: 0 0 auto;
    padding: 10px 12px;
    padding-right: 90px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    visibility: visible;
    position: relative;
    z-index: 5;
}

.pro-data-footer > nav {
    flex: 1 1 auto;
    width: 100%;
}

.pro-data-footer p {
    margin: 0;
}

.pro-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pro-table thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 10px 12px;
    border-bottom: 1px solid #dbe3ef;
}

.pro-table tbody {
    display: table-row-group !important;
    visibility: visible !important;
}

.pro-table tbody tr {
    display: table-row !important;
    visibility: visible !important;
    height: 38px;
}

.pro-table td {
    padding: 7px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
}

.pro-table .col-check {
    width: 44px;
    min-width: 44px;
    text-align: center;
}

.pro-table .col-date {
    width: 150px;
    min-width: 150px;
}

.pro-table .col-invoice {
    width: 120px;
    min-width: 120px;
}

.pro-table .col-name,
.pro-table .col-customer {
    width: 260px;
    min-width: 240px;
}

.pro-table .col-staff {
    width: 220px;
    min-width: 200px;
}

.pro-table .col-location {
    width: 180px;
    min-width: 170px;
}

.pro-table .col-status,
.pro-table .col-payment {
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.pro-table .col-money {
    width: 140px;
    min-width: 130px;
    text-align: right;
}

.pro-table .col-actions {
    width: 140px;
    min-width: 140px;
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 5;
}

.pro-table .cell-wrap {
    white-space: normal;
    line-height: 1.25;
    max-height: 38px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .pro-page-header {
        grid-template-columns: 1fr;
    }

    .pro-header-actions {
        width: 100%;
    }

    .pro-header-actions > * {
        flex: 1;
    }

    .pro-data-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .pro-search-shell {
        grid-template-columns: 1fr;
    }

    .pro-search-actions,
    .pro-search-actions .btn {
        width: 100%;
    }

    .pro-search-box,
    .pro-toolbar-strip,
    .pro-toolbar-group,
    .pro-toolbar-inline-selects,
    .pro-toolbar-control,
    .pro-toolbar-control--compact,
    .pro-toolbar-control--sort,
    .pro-toolbar-control--direction {
        width: 100%;
    }

    .pro-toolbar-group {
        flex: 1 1 100%;
        gap: 8px;
    }

    .pro-toolbar-group--actions {
        justify-content: stretch;
    }

    .pro-data-toolbar .btn,
    .pro-data-toolbar select {
        width: 100%;
    }

    .pro-toolbar-strip {
        grid-column: 1 / -1;
        justify-content: flex-start;
        grid-template-columns: 1fr;
    }

    .pro-filters-collapse .card-body {
        padding: 0.9rem;
    }

    .gmt-has-mobile-cards .pro-table-zone,
    .gmt-has-mobile-cards table.table-pro,
    .gmt-has-mobile-cards table.data-table,
    .gmt-has-mobile-cards div.dataTables_scrollBody {
        display: none !important;
    }

    .pro-card-zone {
        padding: 10px;
    }
}

/* Shared compact data-page refresh */
.pro-data-page {
    --app-header-height: var(--topbar-height, 72px);
    --data-toolbar-height: 54px;
    --data-toolbar-top: calc(var(--app-header-height) + 8px);
    --data-table-sticky-top: calc(var(--data-toolbar-top) + var(--data-toolbar-height) + 10px);
    padding: 16px 14px 12px;
    gap: 12px;
}

.pro-page-header {
    align-items: start;
    gap: 12px;
    padding: 4px 2px 0;
}

.pro-page-title {
    font-size: 24px;
    line-height: 1.05;
}

.pro-header-actions {
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.data-page-breadcrumbs .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.18rem;
    flex-wrap: wrap;
    margin-bottom: 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
}

.data-page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

.data-page-heading-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.data-page-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 1rem;
    flex: 0 0 auto;
}

.data-page-toolbar {
    position: sticky;
    top: var(--data-toolbar-top);
    z-index: 20;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.pro-data-toolbar {
    gap: 10px;
    position: relative;
    z-index: 3;
}

.pro-search-box input {
    min-height: 48px;
}

.pro-search-shortcut,
.pro-search-loading {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pro-search-shortcut {
    right: 48px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pro-search-loading {
    right: 56px;
    display: none;
}

.pro-search-box.is-search-loading .pro-search-loading {
    display: inline-flex;
}

.pro-search-box.is-search-loading .pro-search-shortcut,
.pro-search-box.is-search-loading .pro-search-clear-btn {
    opacity: 0;
}

.pro-active-filter-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px 0;
}

.pro-active-filter-summary[hidden] {
    display: none !important;
}

.pro-active-filter-summary__label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.pro-active-filter-summary__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.pro-active-filter-summary__chips .btn {
    border-radius: 999px;
    min-height: 30px;
    padding: 0 10px;
    max-width: 100%;
    font-size: 0.8rem;
}

.global-listing-page[data-page-mode="advanced"] .data-toolbar-advanced-only.pro-toolbar-strip,
.pro-data-page[data-page-mode="advanced"] .data-toolbar-advanced-only.pro-toolbar-strip {
    display: grid;
}

.global-listing-page[data-page-mode="advanced"] .data-toolbar-advanced-only.pro-active-filter-summary,
.pro-data-page[data-page-mode="advanced"] .data-toolbar-advanced-only.pro-active-filter-summary {
    display: flex;
}

.pro-filters-collapse .card {
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.pro-filters-collapse .card-body {
    padding: 0.9rem;
}

.global-listing-page .data-page-toolbar .pro-data-toolbar,
.pro-data-page .data-page-toolbar .pro-data-toolbar {
    padding: 8px 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.global-listing-page .data-page-toolbar .pro-search-shell,
.pro-data-page .data-page-toolbar .pro-search-shell {
    gap: 8px;
    align-items: center;
}

.global-listing-page .data-page-toolbar .pro-search-box input,
.pro-data-page .data-page-toolbar .pro-search-box input {
    min-height: 42px;
    height: 42px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.global-listing-page .data-page-toolbar .pro-toolbar-btn,
.global-listing-page .data-page-toolbar .pro-search-clear-btn,
.pro-data-page .data-page-toolbar .pro-toolbar-btn,
.pro-data-page .data-page-toolbar .pro-search-clear-btn {
    min-height: 42px;
    height: 42px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    border-radius: 12px;
}

.pro-table thead th,
.global-listing-page .listing-table thead th {
    top: 0;
    z-index: 15;
    box-shadow: inset 0 -1px 0 #dbe3ef;
}

.global-listing-page[data-page-density="compact"] .listing-table th,
.global-listing-page[data-page-density="compact"] .listing-table td,
.pro-data-page[data-page-density="compact"] .pro-table th,
.pro-data-page[data-page-density="compact"] .pro-table td {
    padding: 8px 10px;
}

.global-listing-page[data-page-density="comfortable"] .listing-table th,
.global-listing-page[data-page-density="comfortable"] .listing-table td,
.pro-data-page[data-page-density="comfortable"] .pro-table th,
.pro-data-page[data-page-density="comfortable"] .pro-table td {
    padding: 10px 12px;
}

.global-listing-page[data-page-density="spacious"] .listing-table th,
.global-listing-page[data-page-density="spacious"] .listing-table td,
.pro-data-page[data-page-density="spacious"] .pro-table th,
.pro-data-page[data-page-density="spacious"] .pro-table td {
    padding: 13px 14px;
}

.global-listing-page[data-page-mode="simple"] .data-page-mode-advanced-only,
.global-listing-page[data-page-mode="simple"] [data-advanced-section],
.global-listing-page[data-page-mode="simple"] .pro-filters-collapse.show,
.global-listing-page[data-page-mode="simple"] > .pro-page-header,
.pro-data-page[data-page-mode="simple"] .data-page-mode-advanced-only,
.pro-data-page[data-page-mode="simple"] [data-advanced-section],
.pro-data-page[data-page-mode="simple"] .pro-filters-collapse.show {
    display: none !important;
}

.listing-table .listing-select-col,
.pro-table .listing-select-col {
    position: sticky;
    left: 0;
    z-index: 16;
    background: #fff;
    box-shadow: 1px 0 0 rgba(226, 232, 240, 0.9);
}

.global-listing-page .listing-table tbody tr:hover,
.pro-table tbody tr:hover {
    background: #f8fbff;
}

.global-listing-page .listing-table tbody tr.listing-row-selected,
.pro-table tbody tr.listing-row-selected {
    background: #eef4ff !important;
}

@media (max-width: 768px) {
    .data-page-heading-row {
        gap: 10px;
    }

    .pro-search-box input {
        padding-right: 50px;
    }

    .pro-search-shortcut {
        display: none !important;
    }

    .pro-advanced-toggle-btn {
        min-width: 0;
        height: 40px;
        border-radius: 12px;
    }

    .data-page-toolbar {
        top: calc(var(--app-header-height) + 6px);
        border-radius: 12px 12px 0 0;
    }

    .pro-active-filter-summary {
        padding-top: 6px;
    }
}

html body .global-listing-page .filters-section.data-page-toolbar,
html body .pro-data-page .filters-section.data-page-toolbar,
html body .global-listing-page .data-page-toolbar {
    position: fixed !important;
    top: var(--data-toolbar-top, calc(var(--app-header-height) + 8px)) !important;
    left: var(--data-toolbar-left, auto) !important;
    width: var(--data-toolbar-width, auto) !important;
    z-index: 35 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    margin: 0 !important;
}

html body .global-listing-page[data-page-mode="advanced"] .filters-section.data-page-toolbar,
html body .pro-data-page[data-page-mode="advanced"] .filters-section.data-page-toolbar,
html body .global-listing-page[data-page-mode="advanced"] .data-page-toolbar,
html body .pro-data-page[data-page-mode="advanced"] .data-page-toolbar {
    position: relative !important;
    top: 0 !important;
    left: auto !important;
    width: 100% !important;
    z-index: 22 !important;
}

html body .global-listing-page .listing-table thead th,
html body .global-listing-page .pro-table thead th,
html body .pro-data-page .listing-table thead th,
html body .pro-data-page .pro-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 28 !important;
    background: #ffffff !important;
    box-shadow: inset 0 -1px 0 #dbe3ef;
}

html body .global-listing-page .listing-table thead .listing-select-col,
html body .global-listing-page .pro-table thead .listing-select-col,
html body .pro-data-page .listing-table thead .listing-select-col,
html body .pro-data-page .pro-table thead .listing-select-col {
    left: 0 !important;
    z-index: 33 !important;
    background: #f8fafc !important;
}

html body .global-listing-page .listing-table thead th:last-child,
html body .global-listing-page .listing-table thead .action-cell,
html body .global-listing-page .pro-table thead th:last-child,
html body .global-listing-page .pro-table thead .action-cell,
html body .pro-data-page .listing-table thead th:last-child,
html body .pro-data-page .listing-table thead .action-cell,
html body .pro-data-page .pro-table thead th:last-child,
html body .pro-data-page .pro-table thead .action-cell {
    position: sticky !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 32 !important;
    background: #ffffff !important;
}

html body .global-listing-page .data-page-toolbar + .pro-active-filter-summary,
html body .pro-data-page .data-page-toolbar + .pro-active-filter-summary {
    position: sticky;
    top: calc(var(--app-header-height) + var(--data-toolbar-height) + 6px);
    z-index: 24;
    background: rgba(255, 255, 255, 0.98);
}

html body .global-listing-page #listing-fragment,
html body .pro-data-page #listing-fragment {
    padding-top: calc(var(--data-toolbar-height, 0px) + 4px);
}

html body .global-listing-page[data-page-mode="advanced"] #listing-fragment,
html body .pro-data-page[data-page-mode="advanced"] #listing-fragment {
    padding-top: 0;
}

html body .global-listing-page .listing-table-container,
html body .global-listing-page .data-results-wrapper,
html body .global-listing-page .table-scroll-wrapper,
html body .pro-data-page .listing-table-container,
html body .pro-data-page .data-results-wrapper,
html body .pro-data-page .table-scroll-wrapper {
    overflow: visible !important;
}

html body .global-listing-page .table-responsive,
html body .global-listing-page .table-responsive.table-scroll-lock,
html body .global-listing-page .table-responsive.table-scroll-lock.pro-grid-wrapper,
html body .pro-data-page .table-responsive,
html body .pro-data-page .table-responsive.table-scroll-lock,
html body .pro-data-page .table-responsive.table-scroll-lock.pro-grid-wrapper,
html body .global-listing-page .dataTables_scrollBody,
html body .pro-data-page .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: auto !important;
    position: relative !important;
    scrollbar-gutter: stable;
}

/* ==========================================================
   GLOBAL STICKY TABLE HEADER
   ========================================================== */

:root {
    --topbar-height: 72px;
    --toolbar-height: 56px;
}

.table-responsive,
.dataTables_scrollBody,
.pro-table-zone,
.listing-table-container {
    position: relative;
}

.table thead th,
.pro-table thead th,
.listing-table thead th,
.dataTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #ffffff !important;
    border-bottom: 2px solid #dbe3ef !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    white-space: nowrap;
}

.table thead th:first-child,
.table tbody td:first-child,
.pro-table thead th:first-child,
.pro-table tbody td:first-child,
.listing-table thead th:first-child,
.listing-table tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 101 !important;
    background: #fff !important;
}

.table thead th:last-child,
.table tbody td:last-child,
.pro-table thead th:last-child,
.pro-table tbody td:last-child,
.listing-table thead th:last-child,
.listing-table tbody td:last-child {
    position: sticky !important;
    right: 0 !important;
    z-index: 101 !important;
    background: #fff !important;
}

.table tbody tr:hover td,
.pro-table tbody tr:hover td,
.listing-table tbody tr:hover td {
    background: #f8fbff;
}

.table tbody,
.pro-table tbody,
.listing-table tbody {
    position: relative;
    z-index: 1;
}

html body .global-listing-page .listing-table thead th,
html body .global-listing-page .pro-table thead th,
html body .pro-data-page .listing-table thead th,
html body .pro-data-page .pro-table thead th {
    top: var(--sticky-header-top) !important;
}

html body .global-listing-page .listing-table thead .listing-select-col,
html body .global-listing-page .pro-table thead .listing-select-col,
html body .pro-data-page .listing-table thead .listing-select-col,
html body .pro-data-page .pro-table thead .listing-select-col {
    left: 0 !important;
    z-index: 102 !important;
}

html body .global-listing-page .listing-table thead th:last-child,
html body .global-listing-page .pro-table thead th:last-child,
html body .pro-data-page .listing-table thead th:last-child,
html body .pro-data-page .pro-table thead th:last-child {
    right: 0 !important;
    z-index: 102 !important;
}

@media (max-width: 768px) {
    .table thead th,
    .pro-table thead th,
    .listing-table thead th {
        top: 0 !important;
    }
}

/* Final sticky enforcement */

html body .global-listing-page .table-responsive,
html body .global-listing-page .table-responsive.table-scroll-lock,
html body .global-listing-page .table-responsive.table-scroll-lock.pro-grid-wrapper,
html body .global-listing-page .pro-table-zone,
html body .global-listing-page .listing-table-container,
html body .pro-data-page .table-responsive,
html body .pro-data-page .table-responsive.table-scroll-lock,
html body .pro-data-page .table-responsive.table-scroll-lock.pro-grid-wrapper,
html body .pro-data-page .dataTables_scrollBody,
html body .pro-data-page .pro-table-zone,
html body .pro-data-page .listing-table-container {
    overflow-x: auto !important;
    overflow-y: auto !important;
    position: relative !important;
}

html body .global-listing-page .listing-table thead th,
html body .global-listing-page .pro-table thead th,
html body .global-listing-page .table thead th,
html body .global-listing-page .dataTable thead th,
html body .pro-data-page .listing-table thead th,
html body .pro-data-page .pro-table thead th,
html body .pro-data-page .table thead th,
html body .pro-data-page .dataTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #ffffff !important;
}

html body .global-listing-page .listing-table thead th:first-child,
html body .global-listing-page .listing-table tbody td:first-child,
html body .global-listing-page .pro-table thead th:first-child,
html body .global-listing-page .pro-table tbody td:first-child,
html body .pro-data-page .listing-table thead th:first-child,
html body .pro-data-page .listing-table tbody td:first-child,
html body .pro-data-page .pro-table thead th:first-child,
html body .pro-data-page .pro-table tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 101 !important;
    background: #ffffff !important;
}

html body .global-listing-page .listing-table thead th:last-child,
html body .global-listing-page .listing-table tbody td:last-child,
html body .global-listing-page .pro-table thead th:last-child,
html body .global-listing-page .pro-table tbody td:last-child,
html body .pro-data-page .listing-table thead th:last-child,
html body .pro-data-page .listing-table tbody td:last-child,
html body .pro-data-page .pro-table thead th:last-child,
html body .pro-data-page .pro-table tbody td:last-child {
    position: sticky !important;
    right: 0 !important;
    z-index: 101 !important;
    background: #ffffff !important;
}

/* ==========================================================
   GLOBAL COMPACT DATATABLE TOOLBAR / FILTER REFRESH
   ========================================================== */

html body .global-listing-page .data-page-toolbar .pro-data-toolbar,
html body .pro-data-page .data-page-toolbar .pro-data-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 9px;
    padding: 6px 8px;
    border-radius: 12px;
}

html body .pro-data-toolbar .pro-search-shell {
    flex: 0 1 300px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: min(100%, 250px);
}

html body .pro-data-toolbar .pro-search-actions {
    flex: 0 0 auto;
}

html body .pro-data-toolbar .pro-toolbar-strip {
    flex: 1 1 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 9px;
    min-width: 0;
}

html body .pro-data-toolbar .pro-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    min-width: 0;
    flex: 0 1 auto;
}

html body .pro-data-toolbar .pro-toolbar-group--actions {
    justify-content: flex-end;
    flex: 1 1 auto;
}

html body .pro-data-toolbar .pro-toolbar-group--meta {
    margin-left: 0;
    justify-content: flex-start;
    flex: 0 1 auto;
}

html body .pro-data-toolbar .pro-toolbar-group--panel-actions {
    margin-left: auto;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 8px;
}

html body .pro-data-toolbar .pro-toolbar-group--panel-actions[hidden] {
    display: none !important;
}

html body .pro-data-toolbar .btn,
html body .pro-data-toolbar .dropdown-toggle,
html body .pro-data-toolbar .form-select,
html body .pro-data-toolbar .form-control,
html body .pro-data-toolbar .pro-toolbar-mini-control {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.8125rem;
}

html body .pro-data-toolbar .btn,
html body .pro-data-toolbar .dropdown-toggle {
    padding: 0 9px;
    font-weight: 600;
    box-shadow: none;
}

html body .pro-data-toolbar .btn i,
html body .pro-data-toolbar .dropdown-toggle i,
html body .pro-toolbar-mini-icon i {
    font-size: 0.92rem;
}

html body .pro-data-toolbar .pro-btn-label {
    white-space: nowrap;
}

html body .pro-data-toolbar .pro-search-box input {
    min-height: 38px;
    height: 38px;
    padding: 0 74px 0 38px;
    border-radius: 10px;
    font-size: 0.84rem;
}

html body .pro-data-toolbar .pro-search-box .search-icon {
    left: 13px;
    font-size: 0.92rem;
}

html body .pro-data-toolbar .pro-search-shortcut {
    right: 38px;
    height: 20px;
    padding: 0 6px;
    font-size: 9px;
}

html body .pro-data-toolbar .pro-search-loading {
    right: 42px;
}

html body .pro-data-toolbar .pro-search-clear-btn {
    right: 7px;
    width: 28px;
    height: 28px;
    min-height: 28px;
    border-radius: 8px;
}

html body .pro-data-toolbar .pro-advanced-toggle-btn {
    min-width: 92px;
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
}

html body .pro-data-toolbar .pro-toolbar-btn.has-active-filters {
    border-color: #93c5fd;
    background: rgba(37, 99, 235, 0.08);
    color: #0b57d0;
}

html body .pro-data-toolbar .pro-toolbar-btn.has-active-filters .badge {
    display: inline-flex !important;
}

html body .pro-data-toolbar .pro-toolbar-mini-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 7px;
    border: 1px solid #d6deea;
    background: #fff;
    min-width: 0;
    max-width: 100%;
}

html body .pro-data-toolbar .pro-toolbar-mini-control select {
    border: 0;
    outline: 0;
    box-shadow: none;
    min-height: 36px;
    height: 36px;
    padding: 0 24px 0 0;
    background-color: transparent;
}

html body .pro-data-toolbar .pro-toolbar-mini-control--sort {
    min-width: 138px;
}

html body .pro-data-toolbar .pro-toolbar-group--meta > .pro-toolbar-mini-control:first-child {
    min-width: 68px;
}

html body .pro-data-toolbar .pro-toolbar-group--meta > .pro-toolbar-mini-control:last-child {
    min-width: 86px;
}

html body .pro-data-toolbar .pro-toolbar-mini-icon {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

html body .pro-data-toolbar .pro-toolbar-group--panel-actions .btn,
html body .pro-data-toolbar .pro-toolbar-group--panel-actions a {
    min-height: 38px;
    height: 38px;
    min-width: 96px;
    border-radius: 10px;
}

html body .pro-active-filter-summary {
    padding: 6px 10px 0;
    gap: 6px;
}

html body .pro-active-filter-summary__chips .btn {
    min-height: 28px;
    padding: 0 9px;
    font-size: 0.76rem;
}

html body .pro-filters-collapse .card {
    border-radius: 14px;
    background: #f8fafc;
}

html body .pro-filters-collapse .card-body {
    padding: 0.85rem 0.9rem;
}

html body .pro-filters-grid.row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    gap: 10px 16px;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

html body .pro-filters-grid.row > * {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

html body .pro-filters-grid .form-label {
    margin-bottom: 0;
    font-size: 0.72rem;
    line-height: 1.2;
    min-height: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html body .pro-filters-grid .form-select,
html body .pro-filters-grid .form-control,
html body .pro-filters-grid .select2-container .select2-selection--single,
html body .pro-filters-grid .select2-container .select2-selection--multiple {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.84rem;
}

html body .pro-filters-grid .input-group {
    flex-wrap: nowrap;
}

html body .pro-filters-grid .input-group > .form-control,
html body .pro-filters-grid .input-group > .input-group-text {
    min-height: 38px;
    height: 38px;
}

html body .pro-filters-grid .pro-filter-cell {
    justify-content: flex-start;
}

html body .pro-filters-grid .pro-filter-cell--date {
    gap: 0.5rem;
}

html body .pro-filters-grid .pro-date-range-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html body .pro-filters-grid .pro-filter-subfield {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

html body .pro-filters-grid .select2-container {
    width: 100% !important;
}

html body .pro-filters-grid .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding-left: 12px;
    padding-right: 28px;
}

html body .pro-filters-grid .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

html body .pro-filters-grid .select2-container--default .select2-selection--multiple {
    height: auto;
    min-height: 38px;
    padding: 2px 8px;
}

html body .pro-filters-grid .pro-filters-actions {
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
    margin-top: 0 !important;
    flex-wrap: nowrap;
}

html body .pro-filters-grid .pro-filters-actions .btn,
html body .pro-filters-grid .pro-filters-actions a {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    min-width: 110px;
    justify-content: center;
}

@media (min-width: 992px) {
    html body .global-listing-page .data-page-toolbar .pro-data-toolbar,
    html body .pro-data-page .data-page-toolbar .pro-data-toolbar {
        display: grid;
        grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        row-gap: 8px;
    }

    html body .pro-data-toolbar .pro-search-shell {
        max-width: none;
        min-width: 0;
    }

    html body .pro-data-toolbar .pro-toolbar-strip {
        justify-content: flex-end;
        align-content: flex-start;
    }

    html body .pro-data-toolbar .pro-toolbar-group--actions,
    html body .pro-data-toolbar .pro-toolbar-group--meta {
        flex-wrap: nowrap;
    }

    html body .pro-data-toolbar .pro-toolbar-group--actions {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
    }

    html body .pro-data-toolbar .pro-toolbar-group--meta {
        flex: 0 0 auto;
    }
}

@media (max-width: 1399.98px) {
    html body .pro-filters-grid.row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1366px) {
    html body .pro-data-toolbar .pro-toolbar-btn--compactable .pro-btn-label {
        display: none;
    }

    html body .pro-data-toolbar .pro-toolbar-btn--compactable {
        min-width: 38px;
        width: 38px;
        padding: 0;
    }

    html body .pro-data-toolbar .pro-toolbar-btn--compactable.dropdown-toggle {
        width: auto;
        min-width: 38px;
        padding: 0 9px;
    }
}

@media (max-width: 1180px) {
    html body .pro-data-toolbar .pro-search-shortcut {
        display: none !important;
    }

    html body .pro-data-toolbar .pro-search-box input {
        padding-right: 40px;
    }
}

@media (max-width: 1100px) {

    html body .pro-data-toolbar .pro-toolbar-group--meta {
        margin-left: 0;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    html body .pro-data-toolbar .pro-toolbar-group--actions {
        justify-content: flex-start;
    }

    html body .pro-data-toolbar .pro-toolbar-group--panel-actions {
        margin-left: 0;
        justify-content: flex-start;
        flex-basis: 100%;
    }
}

@media (max-width: 991.98px) {
    html body .pro-filters-grid.row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html body .global-listing-page .data-page-toolbar .pro-data-toolbar,
    html body .pro-data-page .data-page-toolbar .pro-data-toolbar {
        display: flex;
    }

    html body .pro-data-toolbar .pro-search-shell,
    html body .pro-data-toolbar .pro-toolbar-strip {
        flex-basis: 100%;
        max-width: none;
    }

    html body .pro-data-toolbar .pro-toolbar-strip {
        justify-content: flex-start;
    }

    html body .pro-data-toolbar .pro-toolbar-group--filters,
    html body .pro-data-toolbar .pro-toolbar-group--actions,
    html body .pro-data-toolbar .pro-toolbar-group--meta,
    html body .pro-data-toolbar .pro-toolbar-group--panel-actions {
        width: 100%;
    }

    html body .pro-data-toolbar .pro-toolbar-group--meta {
        justify-content: stretch;
    }

    html body .pro-data-toolbar .pro-toolbar-mini-control {
        flex: 1 1 140px;
    }

    html body .pro-data-toolbar .pro-toolbar-mini-control--sort {
        flex-basis: 220px;
    }
}

@media (max-width: 768px) {
    html body .pro-data-toolbar .pro-search-shell {
        flex-direction: column;
        align-items: stretch;
    }

    html body .pro-data-toolbar .pro-search-actions,
    html body .pro-data-toolbar .pro-search-actions .btn {
        width: 100%;
    }

    html body .pro-data-toolbar .pro-search-box input {
        padding-right: 44px;
    }

    html body .pro-filters-grid .pro-date-range-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    html body .pro-data-toolbar .pro-toolbar-group--meta {
        gap: 6px;
    }

    html body .pro-filters-grid.row {
        grid-template-columns: 1fr;
    }

    html body .pro-filters-grid .pro-filters-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    html body .pro-filters-grid .pro-filters-actions .btn,
    html body .pro-filters-grid .pro-filters-actions a {
        width: 100%;
    }
}

/* ==========================================================
   LEGACY / ALTERNATE TOOLBAR COMPRESSION
   ========================================================== */

html body .legacy-pro-toolbar-card,
html body .standard-filter-toolbar,
html body .jobsheets-filters-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

html body .legacy-pro-toolbar-card .card-body,
html body .standard-filter-toolbar .card-body,
html body .jobsheets-filters-card .card-body {
    padding: 0.85rem;
}

html body .legacy-pro-toolbar-bar,
html body .permissions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html body .legacy-pro-toolbar-search,
html body .permissions-toolbar .pro-search-box {
    flex: 1 1 260px;
    min-width: 0;
}

html body .legacy-pro-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 420px;
    justify-content: flex-end;
}

html body .legacy-pro-toolbar-actions .btn,
html body .legacy-pro-toolbar-actions .dropdown-toggle,
html body .legacy-pro-toolbar-actions .form-select,
html body .legacy-pro-toolbar-actions .form-control,
html body .permissions-toolbar .btn,
html body .permissions-toolbar .dropdown-toggle,
html body .permissions-toolbar .form-select,
html body .permissions-toolbar .form-control,
html body .standard-filter-toolbar .btn,
html body .standard-filter-toolbar .form-select,
html body .standard-filter-toolbar .form-control,
html body .jobsheets-filters-card .btn,
html body .jobsheets-filters-card .form-select,
html body .jobsheets-filters-card .form-control {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.84rem;
}

html body .legacy-inline-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

html body .legacy-inline-dates .form-select {
    min-width: 132px;
}

html body .legacy-inline-dates .form-control {
    min-width: 118px;
}

html body .legacy-advanced-filters,
html body .jobsheets-filters-grid,
html body .standard-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 10px;
}

html body .legacy-advanced-filters > *,
html body .jobsheets-filters-grid > *,
html body .standard-filter-grid > * {
    min-width: 0;
}

html body .legacy-filter-actions,
html body .standard-filter-actions,
html body .jobsheets-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

html body .legacy-filter-actions .btn,
html body .standard-filter-actions .btn,
html body .jobsheets-filter-actions .btn,
html body .legacy-filter-actions a,
html body .standard-filter-actions a,
html body .jobsheets-filter-actions a {
    min-width: 104px;
}

html body .permissions-toolbar .pro-search-box input {
    min-height: 40px;
    height: 40px;
}

@media (max-width: 991.98px) {
    html body .legacy-pro-toolbar-actions,
    html body .permissions-toolbar {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    html body .legacy-pro-toolbar-bar,
    html body .permissions-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    html body .legacy-pro-toolbar-actions,
    html body .legacy-inline-dates {
        width: 100%;
        justify-content: stretch;
    }

    html body .legacy-pro-toolbar-actions > *,
    html body .legacy-inline-dates > *,
    html body .permissions-toolbar > * {
        width: 100%;
    }
}

/* ==========================================================
   COMPACT ADVANCED PAGE OVERVIEW / ANALYTICS
   ========================================================== */

html body .gmt-compact-overview {
    margin-bottom: 0.9rem !important;
}

html body .gmt-hero {
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

html body .gmt-hero::before,
html body .gmt-hero::after {
    width: 340px;
    height: 340px;
}

html body .gmt-hero__inner {
    padding: 0.95rem 1rem;
}

@media (min-width: 768px) {
    html body .gmt-hero__inner {
        padding: 1rem 1.05rem;
    }
}

html body .gmt-hero__lead {
    gap: 0.7rem;
}

html body .gmt-hero__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    box-shadow: 0 8px 18px -16px rgba(37, 99, 235, 0.5);
}

html body .gmt-hero__icon i {
    font-size: 1rem !important;
}

html body .gmt-hero__title {
    font-size: 0.98rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    html body .gmt-hero__title {
        font-size: 1.08rem;
    }
}

html body .gmt-hero__desc {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

html body .gmt-hero__badges {
    gap: 0.32rem;
    margin-left: 0.35rem;
}

html body .gmt-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
}

html body .gmt-hero__right {
    gap: 0.55rem 0.8rem;
}

html body .gmt-kpi-strip {
    gap: 0.55rem 0.9rem;
}

html body .gmt-kpi {
    min-width: 110px;
    gap: 0.05rem;
}

html body .gmt-kpi:not(:first-child) {
    padding-left: 0.75rem;
}

html body .gmt-kpi__label,
html body .gmt-stat-card__label {
    font-size: 0.67rem;
    letter-spacing: 0.05em;
}

html body .gmt-kpi__value {
    font-size: 1.05rem;
    line-height: 1.05;
}

html body .gmt-kpi__meta,
html body .gmt-stat-card__sub {
    font-size: 0.74rem;
    gap: 0.35rem;
}

html body .gmt-trend {
    padding: 0.16rem 0.42rem;
    font-size: 0.69rem;
}

html body .gmt-action-row {
    gap: 0.4rem;
}

html body .gmt-action-row .btn {
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.82rem;
}

html body .gmt-stat-card,
html body .gmt-stat-card--compact {
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

html body .gmt-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.28);
}

html body .gmt-stat-card__body {
    padding: 0.85rem 0.9rem;
    gap: 0.7rem;
}

html body .gmt-stat-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

html body .gmt-stat-card__icon i {
    font-size: 0.95rem !important;
}

html body .gmt-stat-card__value {
    margin-top: 0.05rem;
    font-size: 1.22rem;
    line-height: 1.05;
}

html body .gmt-sparkline-box {
    height: 34px;
    position: relative;
}

html body .gmt-chart-card__header {
    padding: 0.8rem 0.9rem 0;
}

html body .gmt-chart-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

html body .gmt-chart-card__subtitle {
    margin-top: 0.12rem;
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.3;
}

html body .gmt-chart-card__body {
    padding: 0.65rem 0.85rem 0.8rem;
}

html body .gmt-chart-card__canvas {
    position: relative;
    width: 100%;
    min-height: 180px;
}

html body .gmt-chart-card__tools .btn,
html body .gmt-chart-card__tools .form-select,
html body .gmt-chart-card__tools .form-control {
    min-height: 34px;
    height: 34px;
    font-size: 0.78rem;
    border-radius: 9px;
}

html body .inventory-overview-hero {
    border-radius: 14px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

html body .inventory-overview-hero__body {
    padding: 1rem !important;
}

html body .inventory-overview-hero__header {
    margin-bottom: 0.9rem !important;
}

html body .inventory-overview-hero .bg-primary.bg-opacity-10 {
    width: 40px !important;
    height: 40px !important;
}

html body .inventory-overview-hero h4 {
    font-size: 1rem;
}

html body .inventory-overview-hero .badge,
html body .inventory-overview-hero .text-muted.small {
    font-size: 0.72rem !important;
}

html body .inventory-overview-metric {
    padding: 0.85rem !important;
    border-radius: 14px !important;
}

html body .inventory-overview-metric h3 {
    font-size: 1.18rem;
    line-height: 1.05;
}

html body .inventory-overview-metric .small,
html body .inventory-overview-metric .text-muted.small {
    font-size: 0.72rem !important;
}

html body .inventory-overview-metric .progress {
    height: 5px !important;
}

@media (max-width: 991.98px) {
    html body .gmt-kpi {
        min-width: 96px;
    }

    html body .gmt-kpi__value {
        font-size: 0.96rem;
    }
}

@media (max-width: 575.98px) {
    html body .gmt-hero__right,
    html body .gmt-kpi-strip {
        width: 100%;
    }

    html body .gmt-kpi {
        min-width: calc(50% - 0.5rem);
    }

    html body .gmt-kpi:not(:first-child) {
        padding-left: 0;
        border-left: 0;
    }

    html body .gmt-chart-card__canvas {
        min-height: 150px;
    }
}

/* ==========================================================
   FULL-SCOPE DATA PAGES STABILIZATION
   Fixes header layout, toolbar alignment, typography, filter
   grid, mini-controls, action rows, responsive breaks.
   High specificity (html body + !important) to override any
   prior base or section rules that cause bleed-over.
   ========================================================== */

/* -------------------- PAGE HEADER -------------------- */
html body .pro-page-header.page-header,
html body .pro-page-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 16px 22px !important;
    padding: 6px 2px 8px !important;
    margin: 0 0 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

html body .pro-title-block {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px 14px !important;
    align-items: start !important;
    min-width: 0 !important;
    padding: 0 !important;
}

html body .data-page-heading-row {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    gap: 0 !important;
}

html body .data-page-header-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    align-self: start !important;
}

html body .data-page-breadcrumbs {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-height: 18px !important;
    display: flex !important;
    align-items: center !important;
}

html body .pro-page-title {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
    min-height: 30px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html body .pro-page-subtitle {
    grid-column: 2 !important;
    grid-row: 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    color: #64748b !important;
    min-height: 20px !important;
    max-width: 46ch !important;
}

html body .pro-header-actions {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
}

html body .pro-header-actions > * {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: none !important;
}

/* header-actions primary create button first, then multi-action row after */
html body .pro-header-actions > *:first-child,
html body .pro-header-actions .inventory-products-actions,
html body .pro-header-actions .page-actions-wrapper,
html body .pro-header-actions .action-btn-row {
    width: 100% !important;
}

html body .pro-header-actions .btn-create,
html body .pro-header-actions > .btn {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 1rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

@media (max-width: 1199.98px) {
    html body .pro-page-header.page-header,
    html body .pro-page-header {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    html body .pro-title-block { grid-column: 1 / -1 !important; grid-row: 1 !important; }
    html body .pro-header-actions { grid-column: 1 / -1 !important; grid-row: 2 !important; }
    html body .pro-page-subtitle { max-width: 100% !important; }
}

@media (max-width: 575.98px) {
    html body .pro-page-title { font-size: 1.28rem !important; white-space: normal !important; }
    html body .data-page-header-icon { width: 40px !important; height: 40px !important; }
}

/* -------------------- TOOLBAR (SEARCH + ADVANCED + BUTTONS) -------------------- */
html body .filters-section.data-page-toolbar,
html body .data-page-toolbar {
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #eef2f7 !important;
    padding: 10px 12px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    margin: 0 0 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    overflow: visible !important;
}

html body .pro-data-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 10px 12px !important;
    padding: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
}

html body .pro-search-shell {
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 0 !important;
}

html body .pro-search-box {
    position: relative !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: stretch !important;
}

html body .pro-search-box input {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 110px 0 44px !important;
    border-radius: 12px !important;
    font-size: 0.86rem !important;
    line-height: 42px !important;
    box-sizing: border-box !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%) !important;
    border: 1px solid #dbe3ef !important;
    color: #0f172a !important;
}

html body .pro-search-box .search-icon {
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #64748b !important;
    font-size: 1rem !important;
}

html body .pro-search-shortcut {
    right: 50px !important;
    height: 22px !important;
    line-height: 20px !important;
    font-size: 10px !important;
}

html body .pro-search-box .pro-search-clear-btn {
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

html body .pro-advanced-toggle-btn {
    min-height: 42px !important;
    height: 42px !important;
    min-width: 120px !important;
    padding: 0 0.9rem !important;
    border-radius: 12px !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

html body .pro-toolbar-strip {
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.4fr) !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    min-height: 40px !important;
}

html body .pro-toolbar-group {
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.55rem !important;
    flex-wrap: wrap !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
}

html body .pro-toolbar-group--filters {
    flex: 1 1 480px !important;
    justify-content: flex-start !important;
}

html body .pro-toolbar-group--actions {
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
}

html body .pro-toolbar-group--meta {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
}

@media (max-width: 1399.98px) {
    html body .pro-toolbar-group--meta {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
}

html body .pro-toolbar-group > * {
    flex: 0 0 auto !important;
}

html body .pro-data-toolbar .btn,
html body .pro-data-toolbar .dropdown-toggle,
html body .pro-toolbar-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    padding: 0 0.85rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate !important;
    background-color: #ffffff !important;
}

html body .pro-data-toolbar .btn i,
html body .pro-data-toolbar .dropdown-toggle i {
    font-size: 0.9rem !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
}

html body .pro-toolbar-mini-control {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.45rem !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 0.55rem !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

html body .pro-toolbar-mini-control .pro-toolbar-mini-icon {
    font-size: 0.9rem !important;
    color: #64748b !important;
    flex: 0 0 auto !important;
}

html body .pro-toolbar-mini-control select,
html body .pro-toolbar-mini-control .form-select,
html body .pro-data-toolbar select,
html body .pro-data-toolbar .form-select,
html body .pro-data-toolbar input,
html body .pro-data-toolbar .form-control {
    min-height: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 2rem 0 0.7rem !important;
    border-radius: 9px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    min-width: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

html body .pro-toolbar-inline-selects {
    display: flex !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
    flex-wrap: wrap !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
}

html body .pro-toolbar-inline-selects .pro-toolbar-control {
    flex: 1 1 160px !important;
    display: inline-flex !important;
    align-items: stretch !important;
    min-width: 0 !important;
}

html body .pro-toolbar-inline-selects .pro-toolbar-control .form-select,
html body .pro-toolbar-inline-selects .pro-toolbar-control .form-control {
    width: 100% !important;
    min-width: 0 !important;
}

/* prevent overlap bleed (red-box #2 issue): no negative margins, flat stacking */
html body .pro-toolbar-strip > *,
html body .pro-toolbar-group > .btn,
html body .pro-toolbar-group > .dropdown,
html body .pro-toolbar-group > .pro-toolbar-mini-control,
html body .pro-toolbar-group > .pro-toolbar-control {
    margin: 0 !important;
    position: relative !important;
    z-index: auto !important;
    float: none !important;
    clear: none !important;
}

html body .pro-data-toolbar .btn[data-toggle-advanced] {
    min-width: 118px !important;
}

html body .pro-active-filter-summary {
    padding: 4px 2px 0 !important;
}

@media (min-width: 992px) {
    html body .global-listing-page .data-page-toolbar .pro-data-toolbar,
    html body .pro-data-page .data-page-toolbar .pro-data-toolbar {
        grid-template-columns: minmax(340px, 420px) minmax(0, 1fr) !important;
        column-gap: 16px !important;
    }
    html body .global-listing-page .data-page-toolbar .pro-search-shell,
    html body .pro-data-page .data-page-toolbar .pro-search-shell {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        align-self: start !important;
    }
    html body .global-listing-page .data-page-toolbar .pro-toolbar-strip,
    html body .pro-data-page .data-page-toolbar .pro-toolbar-strip {
        grid-column: 2 !important;
        grid-row: 1 / span 2 !important;
    }
}

@media (max-width: 1199.98px) {
    html body .pro-toolbar-strip {
        grid-template-columns: 1fr !important;
    }
    html body .pro-toolbar-group--actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 767.98px) {
    html body .pro-search-shell { grid-template-columns: 1fr !important; }
    html body .pro-advanced-toggle-btn { min-width: 0 !important; width: 100% !important; }
    html body .pro-data-toolbar .btn,
    html body .pro-data-toolbar .dropdown-toggle,
    html body .pro-toolbar-mini-control,
    html body .pro-toolbar-control {
        width: 100% !important;
    }
}

/* -------------------- ADVANCED FILTERS GRID -------------------- */
html body .pro-filters-grid.row {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.85rem 0.9rem !important;
    align-items: start !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

html body .pro-filters-grid > .col-12,
html body .pro-filters-grid > .col-md-6,
html body .pro-filters-grid > .col-md-4,
html body .pro-filters-grid > .col-md-3,
html body .pro-filters-grid > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body .pro-filter-cell {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
    min-height: 68px !important;
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

html body .pro-filter-cell .form-label {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    min-height: 16px !important;
    display: flex !important;
    align-items: center !important;
    color: #64748b !important;
    padding: 0 !important;
}

html body .pro-filter-cell .form-select,
html body .pro-filter-cell .form-control {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    padding: 0 2.2rem 0 0.75rem !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
}

html body .pro-filter-cell input.form-control[type="number"] {
    padding: 0 0.75rem !important;
}

html body .pro-filter-cell .input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

html body .pro-filter-cell .input-group .input-group-text {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 0.7rem !important;
    font-size: 0.88rem !important;
    line-height: 38px !important;
    border-radius: 0 !important;
    background: #f8fafc !important;
    border: 0 !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .pro-filter-cell .input-group .form-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 0.75rem !important;
}

html body .pro-filters-actions {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.6rem !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.25rem !important;
    margin: 0.35rem 0 0 !important;
    border-top: 1px dashed #e5e7eb !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

html body .pro-filters-actions .btn,
html body .pro-filters-actions a {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    min-width: 108px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
}

/* filter grid responsive breakpoints */
@media (max-width: 1439.98px) {
    html body .pro-filters-grid.row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 1199.98px) {
    html body .pro-filters-grid.row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 991.98px) {
    html body .pro-filters-grid.row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 575.98px) {
    html body .pro-filters-grid.row { grid-template-columns: 1fr !important; }
    html body .pro-filters-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
    }
    html body .pro-filters-actions .btn,
    html body .pro-filters-actions a {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* -------------------- DENSE / 6-COL FILTER GRID VARIANTS (professional compact layout) -------------------- */
/* -------------------- PROFESSIONAL TOOLBAR STRIP (single compact row, no vertical stacking) -------------------- */
html body .pro-data-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 0.45rem !important;
    padding: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
}
html body .pro-search-shell {
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) !important;
    align-items: center !important;
    gap: 0.55rem !important;
    min-height: 40px !important;
}
html body .pro-search-box {
    min-width: 0 !important;
    width: 100% !important;
    height: 38px !important;
    display: flex !important;
    align-items: stretch !important;
}
html body .pro-search-box .form-control {
    height: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 0.81rem !important;
}
html body .pro-search-actions .pro-advanced-toggle-btn {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    padding: 0 0.75rem !important;
    font-size: 0.81rem !important;
}

html body .pro-toolbar-strip {
    grid-row: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.45rem 0.6rem !important;
    width: 100% !important;
    min-height: 38px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 0.15rem 0 !important;
}

html body .pro-toolbar-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
}
html body .pro-toolbar-group--filters {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
}
html body .pro-toolbar-group--meta {
    margin-left: auto !important;
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}
html body .pro-toolbar-group--panel-actions {
    margin-left: 0.5rem !important;
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

html body .pro-toolbar-btn,
html body .pro-data-toolbar .btn,
html body .pro-data-toolbar .dropdown-toggle {
    min-height: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
    padding: 0 0.68rem !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
}
html body .pro-toolbar-btn .pro-btn-label {
    font-size: 0.78rem !important;
}

html body .pro-toolbar-mini-control {
    min-height: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0 0.55rem 0 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;
}
html body .pro-toolbar-mini-control .pro-toolbar-mini-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 0.55rem !important;
    color: #94a3b8 !important;
}
html body .pro-toolbar-mini-icon i { font-size: 0.92rem !important; }
html body .pro-toolbar-mini-control select,
html body .pro-toolbar-mini-control .form-select {
    min-height: 34px !important;
    height: 34px !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 1.4rem 0 0 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    background: transparent !important;
}

@media (min-width: 1600px) {
    html body .pro-toolbar-strip { overflow-x: visible !important; }
}
@media (max-width: 1499.98px) {
    html body .pro-toolbar-strip {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    html body .pro-toolbar-group--filters {
        flex: 1 1 100% !important;
        flex-wrap: wrap !important;
        gap: 0.45rem 0.6rem !important;
    }
    html body .pro-toolbar-group--meta {
        margin-left: auto !important;
        flex: 0 0 auto !important;
    }
}
@media (max-width: 1199.98px) {
    html body .pro-toolbar-mini-control .pro-toolbar-mini-icon { display: none !important; }
    html body .pro-toolbar-mini-control { padding: 0 0.45rem 0 0.5rem !important; }
    html body .pro-toolbar-mini-control select,
    html body .pro-toolbar-mini-control .form-select { padding: 0 1.2rem 0 0 !important; }
}

/* -------------------- DENSE / 6-COL FILTER GRID VARIANTS (professional compact layout) -------------------- */
html body .pro-filters-grid.row.pro-filters-grid--dense {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.55rem 0.7rem !important;
}
html body .pro-filters-grid.row.pro-filters-grid--cols6 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
html body .pro-filters-grid.row.pro-filters-grid--cols6.pro-filters-grid--dense {
    gap: 0.5rem 0.65rem !important;
}
@media (max-width: 1599.98px) {
    html body .pro-filters-grid.row.pro-filters-grid--cols6 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 1399.98px) {
    html body .pro-filters-grid.row.pro-filters-grid--cols6,
    html body .pro-filters-grid.row.pro-filters-grid--cols6.pro-filters-grid--dense { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 1199.98px) {
    html body .pro-filters-grid.row.pro-filters-grid--cols6 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 991.98px) {
    html body .pro-filters-grid.row.pro-filters-grid--cols6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 575.98px) {
    html body .pro-filters-grid.row.pro-filters-grid--cols6 { grid-template-columns: 1fr !important; }
}

html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell,
html body .pro-filters-grid--cols6 .pro-filter-cell,
html body .pro-filters-grid.pro-filters-grid--dense > [class*="col-"],
html body .pro-filters-grid--cols6 > [class*="col-"] {
    min-height: 56px !important;
    gap: 0.28rem !important;
}
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell .form-label,
html body .pro-filters-grid--cols6 .pro-filter-cell .form-label {
    font-size: 0.63rem !important;
    letter-spacing: 0.035em !important;
    min-height: 12px !important;
}
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell .form-select,
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell .form-control,
html body .pro-filters-grid--cols6 .pro-filter-cell .form-select,
html body .pro-filters-grid--cols6 .pro-filter-cell .form-control {
    min-height: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 0.82rem !important;
    border-radius: 9px !important;
    padding: 0 2rem 0 0.7rem !important;
}
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell input.form-control[type="number"],
html body .pro-filters-grid--cols6 .pro-filter-cell input.form-control[type="number"] {
    padding: 0 0.7rem !important;
}
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell .input-group,
html body .pro-filters-grid--cols6 .pro-filter-cell .input-group {
    min-height: 36px !important;
    height: 36px !important;
}
html body .pro-filters-grid.pro-filters-grid--dense .pro-filter-cell .input-group > *,
html body .pro-filters-grid--cols6 .pro-filter-cell .input-group > * {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 0.82rem !important;
}

/* Compact inline 3-in-1 checkbox group */
html body .pro-checklist-inline {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.28rem !important;
    min-height: 36px !important;
    justify-content: center !important;
}
html body .pro-checklist-inline__row {
    display: flex !important;
    align-items: center !important;
    gap: 0.9rem !important;
    flex-wrap: wrap !important;
    padding: 0.42rem 0.65rem !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;
    min-height: 36px !important;
}
html body .pro-checklist-inline .form-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}
html body .pro-checklist-inline .form-check-input {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    float: none !important;
}
html body .pro-checklist-inline .form-check-label {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-align: left !important;
    min-height: 0 !important;
    line-height: 1.15 !important;
    padding: 0 !important;
}

/* Inline dual date field inside select cell (has_sell_in / has_no_sell_from custom ranges) */
html body .pro-inline-dual-date {
    display: flex !important;
    align-items: stretch !important;
    gap: 0.3rem !important;
    margin-top: 0.28rem !important;
}
html body .pro-inline-dual-date > input {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    font-size: 0.78rem !important;
    border-radius: 7px !important;
    padding: 0 0.45rem !important;
}

/* Filter actions cell (inline inside grid last column) */
html body .pro-filters-actions--grid {
    display: inline-flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    min-height: 56px !important;
    width: 100% !important;
}
html body .pro-filters-actions--grid .btn,
html body .pro-filters-actions--grid a {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 0.9rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}
html body .pro-filters-grid.pro-filters-grid--dense + .pro-filters-collapse-footer,
html body .pro-filters-grid--cols6 + .pro-filters-collapse-footer {
    display: none !important;
}

/* Soft shell around advanced panel */
html body .pro-filters-collapse > .card {
    border: 1px solid #eef2f7 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.035) !important;
    background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%) !important;
}
html body .pro-filters-collapse > .card > .card-body {
    padding: 0.85rem 0.95rem 0.7rem 0.95rem !important;
}

/* -------------------- GENERIC ACTION-BUTTON ROWS (stabilize page-specific) -------------------- */
html body .page-actions,
html body .data-page-actions,
html body .listing-actions,
html body .pro-header-actions-row,
html body .pro-page-actions,
html body .crud-actions,
html body .records-header-actions {
    display: flex !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

html body .page-actions .btn,
html body .data-page-actions .btn,
html body .listing-actions .btn,
html body .pro-header-actions-row .btn,
html body .pro-page-actions .btn,
html body .crud-actions .btn,
html body .records-header-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.6rem !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 0.55rem 0.9rem !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    line-height: 1.15 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
}

@media (max-width: 1399.98px) {
    html body .page-actions .btn,
    html body .data-page-actions .btn,
    html body .listing-actions .btn,
    html body .pro-header-actions-row .btn,
    html body .pro-page-actions .btn,
    html body .crud-actions .btn,
    html body .records-header-actions .btn {
        min-height: 40px !important;
        padding: 0.45rem 0.75rem !important;
        gap: 0.5rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 767.98px) {
    html body .page-actions,
    html body .data-page-actions,
    html body .listing-actions,
    html body .pro-header-actions-row,
    html body .pro-page-actions,
    html body .crud-actions,
    html body .records-header-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    html body .page-actions .btn,
    html body .data-page-actions .btn,
    html body .listing-actions .btn,
    html body .pro-header-actions-row .btn,
    html body .pro-page-actions .btn,
    html body .crud-actions .btn,
    html body .records-header-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* -------------------- SPECIFIC STABILIZATIONS FOR COMMON PAGE WRAPPERS -------------------- */
/* (prevents any page that uses col-md-8 + col-md-4 from jumping around) */
html body .row.align-items-center > .col-md-8,
html body .row.align-items-center > .col-md-4 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .row.align-items-center > .col-md-4 {
    justify-content: flex-end !important;
}

@media (max-width: 767.98px) {
    html body .row.align-items-center > .col-md-8,
    html body .row.align-items-center > .col-md-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    html body .row.align-items-center > .col-md-4 {
        justify-content: flex-start !important;
    }
}

/* -------------------- INVENTORY OVERVIEW HERO (now global scope for any KPI summary cards) -------------------- */
html body .inventory-overview-hero,
html body .kpi-hero-card,
html body .data-summary-card {
    border-radius: 18px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #eef2f7 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06) !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
}

html body .inventory-overview-hero__body,
html body .kpi-hero-card__body,
html body .data-summary-card .card-body {
    padding: 1.05rem 1.1rem 1.15rem !important;
}

html body .inventory-overview-hero__header,
html body .kpi-hero-card__header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    margin-bottom: 1rem !important;
}

html body .inventory-overview-hero__header .col-md-8,
html body .inventory-overview-hero__header .col-md-4,
html body .kpi-hero-card__header > [class*="col-"] {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
html body .inventory-overview-hero__header .col-md-8,
html body .kpi-hero-card__header > [class*="col-"]:first-child {
    flex: 1 1 360px !important;
    min-width: 0 !important;
}
html body .inventory-overview-hero__header .col-md-4,
html body .kpi-hero-card__header > [class*="col-"]:last-child {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

html body .inventory-overview-grid,
html body .kpi-grid {
    gap: 0.7rem 0.9rem !important;
}

html body .inventory-overview-metric,
html body .kpi-metric-card,
html body .metric-tile {
    border-radius: 14px !important;
    padding: 0.95rem 1rem !important;
    border: 1px solid #eef2f7 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
    min-height: 110px !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    background: #ffffff !important;
}

html body .inventory-overview-metric:hover,
html body .kpi-metric-card:hover,
html body .metric-tile:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
}

html body .inventory-overview-metric .text-muted.small.fw-semibold,
html body .kpi-metric-card .metric-label,
html body .metric-tile .metric-label {
    font-size: 0.7rem !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
    color: #64748b !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    min-height: 16px !important;
    display: flex !important;
    align-items: center !important;
}

html body .inventory-overview-metric h3,
html body .kpi-metric-card h3,
html body .metric-tile h3,
html body .kpi-metric-card .metric-value,
html body .metric-tile .metric-value {
    font-size: 1.35rem !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin: 0 !important;
    color: #0f172a !important;
}

html body .inventory-overview-metric .d-flex.align-items-end.gap-2,
html body .kpi-metric-card .metric-row,
html body .metric-tile .metric-row {
    align-items: baseline !important;
    gap: 0.35rem !important;
    display: flex !important;
    justify-content: flex-start !important;
}

html body .inventory-overview-metric .small,
html body .kpi-metric-card .small,
html body .metric-tile .small,
html body .inventory-overview-metric .text-muted.small,
html body .kpi-metric-card .text-muted.small {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

html body .inventory-overview-metric .mt-2.pt-2.border-top,
html body .kpi-metric-card .metric-footer,
html body .metric-tile .metric-footer {
    margin-top: 0.25rem !important;
    padding-top: 0.55rem !important;
    border-top-width: 1px !important;
    border-color: #eef2f7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
}

html body .inventory-overview-metric .mt-2.pt-2.border-top.small,
html body .inventory-overview-metric .mt-2.pt-2.border-top.small *,
html body .kpi-metric-card .metric-footer.small *,
html body .metric-tile .metric-footer.small * {
    font-size: 0.74rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
}

html body .inventory-overview-metric .progress,
html body .kpi-metric-card .progress {
    height: 6px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #eef2f7 !important;
    box-shadow: none !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
}

@media (max-width: 1399.98px) {
    html body .inventory-overview-metric,
    html body .kpi-metric-card,
    html body .metric-tile {
        min-height: 102px !important;
        padding: 0.85rem 0.9rem !important;
    }
    html body .inventory-overview-metric h3,
    html body .kpi-metric-card h3,
    html body .metric-tile h3 {
        font-size: 1.2rem !important;
    }
}
@media (max-width: 991.98px) {
    html body .inventory-overview-metric,
    html body .kpi-metric-card,
    html body .metric-tile {
        min-height: 96px !important;
    }
    html body .inventory-overview-metric h3,
    html body .kpi-metric-card h3,
    html body .metric-tile h3 {
        font-size: 1.1rem !important;
    }
}

/* Global sanity: prevent any absolute/floated header actions from covering content */
html body .page-header,
html body .pro-page-header,
html body .global-listing-page header.page-header,
html body section.page-header {
    position: relative !important;
    z-index: 5 !important;
}

html body .page-header .btn,
html body .pro-page-header .btn,
html body .pro-header-actions .btn,
html body .pro-title-block ~ * .btn {
    position: relative !important;
    z-index: 1 !important;
    float: none !important;
}

/* Prevent generic Bootstrap "d-flex + align-items-center" rows from having unequal heights */
html body .btn.d-inline-flex,
html body .btn-group > .btn,
html body .dropdown > .btn.dropdown-toggle {
    align-items: center !important;
    justify-content: center !important;
}
