/* Ext JS geometry, module colors, and embedded pages retain their own layout. */
html.mb-console-active {
    --console-bg: #0b1518;
    --console-surface: #102024;
    --console-border: #2c514d;
    --console-text: #eff9f5;
    --console-muted: #b5cec5;
    --console-accent: #79e2b8;
    --console-action: linear-gradient(180deg, #ab154e, #78002c);
}

html.mb-console-active body {
    background: #0b1518 url('../images/mb-auth-aurora-20261116.svg?v=aurora1') center / cover no-repeat;
}

html.mb-console-active :is(.x-viewport, .mb-console-tabs, .mb-console-tabs > .x-panel-body,
    .mb-console-menu, .mb-console-menu > .x-panel-body) {
    background: transparent !important;
}

html.mb-console-active :is(.mb-console-header > .x-panel-body, .mb-console-header .x-toolbar, .ux-taskbar) {
    background: linear-gradient(110deg, #102d28, #171720 64%, #2d1427) !important;
    border-color: var(--console-border) !important;
    color: var(--console-text);
}

html.mb-console-active .mb-console-header img[src*="resources/images/logo.png"] {
    object-fit: contain;
    object-position: left center;
    padding: 4px 10px;
}

html.mb-console-active :is(.mb-console-menu .x-panel-header, .mb-console-tabs .x-panel-header,
    .x-window-header, .ux-start-menu .x-panel-header) {
    background: linear-gradient(120deg, #15332d, #171c26) !important;
    border-color: var(--console-border) !important;
}

html.mb-console-active :is(.mb-console-header, .mb-console-menu, .mb-console-tabs .x-panel-header,
    .ux-taskbar, .x-window-header)
    :is(.x-title-text, .x-title-icon, .x-btn-inner, .x-btn-icon-el, .x-toolbar-text, .x-form-display-field) {
    color: var(--console-text) !important;
}

html.mb-console-active .mb-console-menu .x-grid-inner-locked,
html.mb-console-active .mb-console-menu :is(.x-grid-view, .x-panel-body, .x-tree-view) {
    background: #0d1b1e !important;
    border-color: var(--console-border) !important;
}

html.mb-console-active .mb-console-menu :is(.x-grid-cell, .x-tree-node-text, .x-tree-icon, .x-tree-elbow-img) {
    color: var(--console-text) !important;
    background-color: transparent !important;
    border-color: #21403c !important;
}

html.mb-console-active .mb-console-menu :is(.x-grid-item, .x-grid-row) {
    background-color: transparent !important;
    color: var(--console-text) !important;
}

html.mb-console-active .mb-console-menu :is(.x-grid-item-over, .x-grid-item-focused) .x-grid-cell {
    background: #16342d !important;
}

html.mb-console-active .mb-console-menu .x-grid-item-selected .x-grid-cell {
    background: #61243d !important;
    color: #fff !important;
}

html.mb-console-active .mb-console-tabs > .x-tab-bar,
html.mb-console-active .mb-console-tabs > .x-tab-bar .x-tab-bar-body {
    background: #0c1c20 !important;
    border-color: var(--console-border) !important;
}

html.mb-console-active .mb-console-tabs > .x-tab-bar .x-tab,
html.mb-console-active :is(.mb-console-header, .ux-taskbar) .x-btn {
    background: #17342f !important;
    border-color: #315e54 !important;
    border-radius: 7px 7px 0 0;
}

html.mb-console-active .mb-console-tabs > .x-tab-bar .x-tab-active,
html.mb-console-active :is(.mb-console-header, .ux-taskbar) .x-btn-over {
    background: var(--console-action) !important;
    border-color: #bd3768 !important;
}

html.mb-console-active .mb-console-tabs > .x-tab-bar .x-tab
    :is(.x-tab-inner, .x-tab-icon-el, .x-tab-close-btn) {
    color: var(--console-text) !important;
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn-default-small {
    background-image: none;
    background-color: #dfefe8;
    border-color: #9fc9bd;
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn-default-small.x-btn-over {
    background-color: #c0e5d6;
    border-color: #4f9785;
}

html.mb-console-active .mb-console-tabs .x-toolbar {
    background-color: #e6f2ed;
    border-color: #b4d4c7;
}

/* Native grid cells can contain inline status colors. Keep a high-contrast data surface. */
html.mb-console-active .mb-console-tabs .x-column-header,
html.mb-console-active .mb-console-tabs .x-grid-header-ct {
    background: #e0efe9 !important;
    border-color: #bad6ca !important;
    color: #175046 !important;
}

html.mb-console-active .mb-console-tabs .x-column-header :is(.x-column-header-inner, .x-column-header-text) {
    color: #175046 !important;
}

html.mb-console-active .mb-console-tabs :is(.x-grid-item-over, .x-grid-item-selected) .x-grid-cell {
    background: #d8eeea !important;
}

html.mb-console-active .mb-console-tabs :is(.x-grid-cell, .x-fieldset) {
    border-color: #c8ddd6;
}

html.mb-console-active :is(.x-form-trigger-wrap-focus, .x-boundlist-item-over) {
    border-color: #128369 !important;
}

html.mb-console-active :is(.x-btn, .x-tab, .x-menu-item-link):focus-visible {
    outline: 2px solid #5bdcb1;
    outline-offset: -2px;
}

/* Action contrast in the authenticated workspace */
html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn:is(
    .x-btn-default-small, .x-btn-default-medium, .x-btn-default-large,
    .x-btn-toolbar-small, .x-btn-toolbar-medium, .x-btn-toolbar-large) {
    background: linear-gradient(180deg, #b82058, #8b0b3d) !important;
    border-color: #a52c56 !important;
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn:is(
    .x-btn-default-small, .x-btn-default-medium, .x-btn-default-large,
    .x-btn-toolbar-small, .x-btn-toolbar-medium, .x-btn-toolbar-large)
    :is(.x-btn-inner, .x-btn-icon-el) {
    color: #fff !important;
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn:is(
    .x-btn-default-small, .x-btn-default-medium, .x-btn-default-large,
    .x-btn-toolbar-small, .x-btn-toolbar-medium, .x-btn-toolbar-large):is(.x-btn-over, :hover):not(.x-item-disabled, .x-btn-disabled) {
    filter: brightness(1.08);
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn:is(.x-item-disabled, .x-btn-disabled) {
    background: #e3ede8 !important;
    border-color: #bfd6cc !important;
    opacity: 1 !important;
}

html.mb-console-active :is(.mb-console-tabs, .x-window, .x-menu) .x-btn:is(.x-item-disabled, .x-btn-disabled)
    :is(.x-btn-inner, .x-btn-icon-el) {
    color: #47635b !important;
    opacity: 1 !important;
}

html.mb-console-active .mb-support-new-badge {
    background: #087a57 !important;
    color: #fff !important;
    box-shadow: none !important;
    animation: none !important;
}
