:root {
    --danger: #E65753;
    --success: #26b050;
    --primary: #009688;
    --secondary: #6c7a89;
    --warning: #ffc107;
    --info: #0d6efd;
    --white: #ffffff;
    --blue: #006bb7;
    --black: #000000;
    --purple: #6f42c1;
    --orange: #fd7e14;
    --brown: #b88a00;
    --sidebar-background: #18181B;
    --sidebar-border: #27272A;
    --reports-number-color-bold: #495057;
    --reports-number-color-normal: #111827;
    --warning-text-color: #d68100;
    --secondary-text: #6b7280;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Why: mermaid 11.4 appends a giant "Syntax error in text" SVG under body on
   parse failure. Blazor SPA navigation keeps that node on every later page.
   JS removes these after each render; this hides any that escape cleanup. */
body > div[id^="dmermaid-render-"],
body > iframe[id^="imermaid-render-"],
body > svg[id^="mermaid-render-"],
body > svg:has(text.error-text) {
    display: none !important;
}

/* Prevent horizontal scrolling and hide vertical scrollbars globally */
* {
    box-sizing: border-box;
    font-family: 'Lato', sans-serif !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/*
    MUDBLAZOR
*/

/* Override MudBlazor error color to use our custom danger color */
.mud-error,
.mud-error-text,
.mud-error-hover:hover,
.mud-icon-color-error,
.mud-icon-button.mud-error,
.mud-icon-button.mud-error-text,
.mud-icon-button.mud-error-outlined {
    color: var(--danger) !important;
}

.mud-icon-button.mud-error-outlined {
    border-color: var(--danger) !important;
}

.mud-icon-button.mud-error-outlined:hover {
    background-color: rgba(215, 69, 66, 0.1) !important;
    border-color: var(--danger) !important;
}

/* Status Colors Override */
.mud-chip.mud-chip-color-success {
    background-color: #d1fae5 !important;
    color: var(--primary) !important;
}

.mud-chip.mud-chip-color-warning {
    background-color: #fef3c7 !important;
    color: var(--brown) !important;
}

.mud-chip.mud-chip-color-info {
    background-color: #cfe2ff !important;
    color: var(--info) !important;
}

/* .mud-chip.mud-chip-color-error {
    background-color: #ffe3e3 !important;
    color: var(--danger) !important;
} */
.mud-chip.mud-chip-color-default {
    /* background-color: #f8f9fa !important;
    color: var(--secondary) !important; */
    color: var(--mud-palette-text-primary) !important;
    background-color: var(--mud-palette-action-default-hover) !important;
}

.mud-button{
    text-transform: none !important;
}
.mud-dialog-actions{
    padding: 15px 25px !important;
}

/* Three-dot menu item icons (portal-rendered MudMenu) */
.menu-item-icon,
.mud-menu-item .mud-icon,
.menu-item-content .mud-icon {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin-right: 4px !important;
}

.mud-expand-panel .mud-expand-panel-header{
    padding: 10px !important;
}

.mud-main-content {
    padding: 1rem !important;
    background-color: #f8f9fa;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 0.3s ease;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.mud-main-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

@media (max-width: 768px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

@media (min-width: 769px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

@media (min-width: 1200px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

.content-container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Take remaining height so report pages (height: 100%) fit and horizontal scrollbar stays visible */
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.content-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    padding-top: 1rem !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* AI Chat page runs edge-to-edge: no outer page gutter. :has() scopes this to the routed /ai-chat
   page only — an embedded host (WorkspaceChat, ScenarioBudgetEditor, EmbeddedAiChatDialog) also
   renders .ai-chat-page, but always with the --embedded modifier, so it's excluded and keeps the
   normal 1rem gutter it was built to fit inside. */
.mud-main-content:has(.ai-chat-page):not(:has(.ai-chat-page--embedded)) {
    padding: 0rem !important;
    padding-top: 0rem !important;
    padding-right: 0rem !important;
    padding-bottom: 0rem !important;
    padding-left: 0rem !important;
}

.main-content-wrapper:has(.ai-chat-page):not(:has(.ai-chat-page--embedded)) {
    padding-top: 0rem !important;
}

/* Published /app/{id} and /slide-deck/{id}: fill the content column. Global so the
   rule applies without CSS isolation (the class is on PublishedAppHost, not the route). */
.app-viewer-page {
    height: 100%;
}

/* Ensure drawer transitions smoothly */
.mud-drawer {
    transition: width 0.3s ease !important;
    position: fixed !important;
    z-index: 1200 !important;
}

/* Hide MudDrawer paper background since we use custom sidebar */
.mud-drawer .mud-drawer-content {
    background: transparent !important;
    box-shadow: none !important;
}

/* Ensure MudLayout fills the viewport properly */
.mud-layout {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Ensure main content is not hidden behind sidebar */
.mud-layout .mud-main-content {
    flex: 1;
    min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* Mobile shell (< 960px, MudBlazor "md"): MainLayout's persistent sidebar     */
/* becomes an off-canvas drawer opened from a fixed top bar. MainLayout puts   */
/* .mobile-nav-open on MudLayout; the class does nothing above the breakpoint. */
/* Pages that size themselves to the viewport subtract --app-topbar-height.    */
/* Breakpoint is repeated in DynamicMenu.razor.css — keep them equal.          */
/* -------------------------------------------------------------------------- */
:root {
    --app-topbar-height: 0px;
}

.mobile-topbar,
.mobile-nav-backdrop {
    display: none;
}

@media screen and (max-width: 959.98px) {
    :root {
        --app-topbar-height: 56px;
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1150;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        height: var(--app-topbar-height);
        padding: 0 0.75rem 0 0.25rem;
        background-color: var(--sidebar-background);
        border-bottom: 1px solid var(--sidebar-border);
        color: var(--white);
    }

    .mobile-topbar__menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }

    .mobile-topbar__menu-btn:hover,
    .mobile-topbar__menu-btn:focus-visible {
        background-color: var(--sidebar-border);
    }

    .mobile-topbar__brand {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        min-width: 0;
        font-size: 1.125rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .mobile-topbar__brand img {
        width: 26px;
        height: 26px;
        object-fit: contain;
        border-radius: 8px;
    }

    .mud-layout > .mud-drawer {
        width: min(85vw, 320px) !important;
        z-index: 1300 !important;
        transform: translateX(-100%);
        visibility: hidden;
        /* visibility waits for the slide-out so the closed drawer leaves the tab order */
        transition: transform 0.25s ease, visibility 0s linear 0.25s !important;
    }

    .mud-layout.mobile-nav-open > .mud-drawer {
        transform: none;
        visibility: visible;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.35) !important;
        transition: transform 0.25s ease !important;
    }

    .mud-layout.mobile-nav-open > .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1250;
        background-color: rgba(0, 0, 0, 0.45);
    }

    /* The page behind the open drawer must not scroll with the menu. */
    body:has(.mud-layout.mobile-nav-open) {
        overflow: hidden;
    }

    .mud-layout .mud-main-content {
        margin-left: 0 !important;
    }

    .main-content-wrapper {
        padding-top: calc(var(--app-topbar-height) + 1rem) !important;
    }

    .main-content-wrapper:has(.ai-chat-page):not(:has(.ai-chat-page--embedded)) {
        padding-top: var(--app-topbar-height) !important;
    }
}

/* iPhone Safari zooms the whole page into any focused field whose text is under 16px and leaves it
   zoomed, so every tap into the AI Chat box (13px) or a search field (12.8px) broke the layout.
   Touch-only devices at mobile-shell widths get 16px field text; mouse users keep compact fields. */
@media screen and (max-width: 959.98px) and (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
    textarea,
    select {
        font-size: 16px !important;
    }
}

@media screen and (max-width: 959.98px) and (prefers-reduced-motion: reduce) {
    .mud-layout > .mud-drawer,
    .mud-layout.mobile-nav-open > .mud-drawer {
        transition: none !important;
    }
}

a,
.btn-link {
    color: var(--blue);
}


.mud-button-filled.mud-button-filled-primary {
    color: var(--white) !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.mud-button-filled.mud-button-filled-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-primary.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info.active {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:hover {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:active {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:disabled {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    /* color: var(--white)!important; */
}

.btn-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-primary {
    /* background-color: var(--primary)!important; */
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--white), 0 0 0 0.25rem var(--blue);
}

.mud-button-filled.mud-button-filled-secondary {
    color: var(--white) !important;
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.mud-button-filled.mud-button-filled-secondary:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-outline-secondary.mud-button-outlined-secondary {
    color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-outline-secondary.mud-button-outlined-secondary:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.mud-button-filled.mud-button-filled-error {
    color: var(--white) !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:active {
    color: var(--white) !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-outlined.mud-button-outlined-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:active {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-chip {
    font-weight: 500;
}

.mud-chip-filled.mud-chip-color-error {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-chip-filled.mud-chip-color-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-chip-filled.mud-chip-color-error:active {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
    pointer-events: none;
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    opacity: 0.5;
    text-decoration: none !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-check:checked+.btn-primary,
.btn-primary.active,
.btn-primary.show,
.btn-primary:first-child:active,
:not(.btn-check)+.btn-primary:active {
    color: #fff;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-check:checked+.btn:focus-visible,
.btn.active:focus-visible,
.btn.show:focus-visible,
.btn:first-child:active:focus-visible,
:not(.btn-check)+.btn:active:focus-visible {
    box-shadow: none !important;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--primary);
}

.invalid {
    outline: 1px solid var(--danger);
}

.validation-message {
    color: var(--danger);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}


/* Table row hover effects for better usability and clarity */
/* Standard HTML tables */
.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: #f5f5f5 !important;
    cursor: pointer;
}

/* MudBlazor tables - ensure hover effects work */
.mud-table-body tr:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.mud-simple-table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.mud-simple-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    cursor: pointer;
}

.mud-dialog-title {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 16px;
    margin-bottom: 0;
}

/* Phones: MudBlazor keeps a 32px frame around every dialog and 24px inner gutters, which left a
   form dialog 311px of a 375px screen and ~260px for its fields. Full-screen dialogs are left alone. */
@media screen and (max-width: 599.98px) {
    .mud-dialog:not(.mud-dialog-fullscreen) {
        max-width: calc(100% - 16px) !important;
        max-height: calc(100% - 16px) !important;
    }

    .mud-dialog.mud-dialog-width-full:not(.mud-dialog-fullscreen) {
        width: calc(100% - 16px) !important;
    }

    .mud-dialog .mud-dialog-title {
        padding: 12px 56px 12px 16px;
    }

    .mud-dialog .mud-dialog-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mud-dialog .mud-dialog-actions {
        padding: 12px 16px !important;
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

/* Phones: shared bits of page chrome that assumed a desktop-wide line and ran off the right edge.
   - .ledger-header (Corrections, General Ledger, Manual Import pages): title + a non-wrapping row of
     actions; One-Off Adjustment's "Add Adjustment" was out of reach.
   - Cash-flow reconciliation chip: three amounts in one unbreakable line.
   - Alerts that carry an ID or URL with no break opportunity. */
@media screen and (max-width: 599.98px) {
    .ledger-header > .d-flex,
    .ledger-header > .d-flex > .d-flex {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .reconciliation-badge {
        max-width: 100%;
    }

    .reconciliation-badge .mud-chip,
    .reconciliation-badge .mud-chip .mud-chip-content {
        height: auto;
        max-width: 100%;
        white-space: normal;
    }

    .reconciliation-badge .mud-chip {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    /* MudBlazor lays chip content out as flex, which wraps each text run and amount separately
       into a jumble; inline flow reads as one sentence. */
    .reconciliation-badge .mud-chip .mud-chip-content {
        display: block;
        min-width: 0;
    }

    .mud-alert-message {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* Hidden on screen; first in-flow block when printing (logo once at top of page 1). */
.print-brand-header {
    display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Print: full-page content, no nav chrome (financial reports & general use)   */
/* -------------------------------------------------------------------------- */
@media print {
    @page {
        margin: 12mm;
    }

    html,
    body {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .mud-drawer,
    .mud-drawer-overlay,
    .mud-overlay,
    #blazor-error-ui,
    .header-actions,
    .report-mapping-chat-wrapper {
        display: none !important;
    }

    .mud-layout {
        display: block !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .main-content-wrapper {
        display: block !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .content-container {
        display: block !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .mud-layout .mud-main-content,
    .mud-main-content {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .sidebar-expanded .mud-main-content,
    .sidebar-collapsed .mud-main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .print-brand-header {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        margin: 0 0 5mm 0;
        break-after: avoid;
        page-break-after: avoid;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .print-brand-header img {
        max-height: 8mm;
        max-width: 42mm;
        width: auto;
        height: auto;
        object-fit: contain;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .no-menu .print-brand-header {
        margin-bottom: 4mm;
    }
}
