.motordex-shell { color: var(--mdx-color-text); }
.motordex-shell .app-content { min-height: calc(100vh - 8rem - var(--mdx-environment-banner-height, 0px)); padding: var(--mdx-space-5) !important; }
.motordex-shell.mdx-development-environment .app-wrapper { min-height: calc(100vh - var(--mdx-environment-banner-height)); }
@media screen and (max-width: 991.98px) {
    .motordex-shell.mdx-development-environment .app-sidebar { top: var(--mdx-environment-banner-height); }
}
.mdx-page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mdx-space-4); margin-bottom: var(--mdx-space-4); padding: var(--mdx-space-5); border: 1px solid var(--mdx-color-border); border-radius: var(--mdx-radius-md); background: linear-gradient(180deg, var(--mdx-color-white), #fafbfc); box-shadow: var(--mdx-shadow-sm); }
.mdx-page-header__title, .mdx-page-header__actions, .mdx-toolbar, .mdx-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mdx-space-2); }
.mdx-page-header__title { min-width: 0; }
.mdx-page-header h1, .mdx-page-header h2 { margin: 0; color: var(--mdx-color-navy); font-weight: 800; }
.mdx-page-header__subtitle { margin: var(--mdx-space-1) 0 0; color: var(--mdx-color-muted); }
.mdx-toolbar { justify-content: space-between; margin-bottom: var(--mdx-space-4); }
.mdx-form-actions { justify-content: flex-end; margin-top: var(--mdx-space-5); }
.motordex-print-scope { isolation: isolate; }

/* Opt-in extension of the existing AdminLTE page/card/table layout. */
.motordex-shell [data-responsive-page] {
    --mdx-page-header-height: 0px;
    min-width: 0;
}
.motordex-shell [data-responsive-page] > * { min-width: 0; }
@media screen and (min-width: 1200px) and (hover: hover) and (pointer: fine) {
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) {
        height: calc(100vh - 8rem - var(--mdx-environment-banner-height, 0px));
        overflow: auto;
        overscroll-behavior: contain;
        display: block;
    }
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-page-header] {
        position: sticky;
        top: 0;
        z-index: 30;
        padding-bottom: .35rem;
    }
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-page-header]:not(.stock-page-header) {
        background: var(--mdx-color-silver, #d9dee7);
    }
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-table],
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-table] .table-responsive {
        overflow: visible;
    }
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-table] thead th {
        position: sticky;
        top: var(--mdx-page-header-height);
        z-index: 20;
    }
    .motordex-shell [data-responsive-page]:not([data-responsive-page="disabled"]) [data-responsive-page-header] .stock-dashboard-control-bar {
        position: static;
    }
}
@media screen and (max-width: 1199.98px), screen and (hover: none) and (pointer: coarse) {
    .motordex-shell [data-responsive-page] {
        height: auto;
        min-height: 0;
        overflow: visible;
        overscroll-behavior: auto;
    }
    .motordex-shell [data-responsive-page-header],
    .motordex-shell [data-responsive-page] .stock-dashboard-control-bar,
    .motordex-shell [data-responsive-page] .creditors-workspace-summary,
    .motordex-shell [data-responsive-page] .mdx-page-action-header,
    .motordex-shell [data-responsive-page] [data-responsive-table] thead th {
        position: static;
        top: auto;
        bottom: auto;
    }
    .motordex-shell [data-responsive-page] .table-responsive,
    .motordex-shell [data-responsive-page] .crm-employee-targets__table-wrap,
    .motordex-shell [data-responsive-page] .crm-notification-table-wrap,
    .motordex-shell [data-responsive-page] .crm-assignment-table-wrap,
    .motordex-shell [data-responsive-page] .report-field-list {
        overflow-x: auto;
        max-height: none;
    }
}
@media print {
    .motordex-shell [data-responsive-page] {
        height: auto !important;
        overflow: visible;
        display: block;
    }
    .motordex-shell [data-responsive-page-header],
    .motordex-shell [data-responsive-page] [data-responsive-table] thead th {
        position: static;
    }
}
