/* Shared screen preferences. Printed reports retain their existing type and layout. */
@media screen {
    body.app-theme-navy h1:not(.brand-title) { font-size: calc(var(--app-heading-size, 20px) + 6px) !important; }
    body.app-theme-navy h2:not(.brand-title) { font-size: calc(var(--app-heading-size, 20px) + 2px) !important; }
    body.app-theme-navy :is(h3, .modal-section-title):not(.brand-title) { font-size: var(--app-heading-size, 20px) !important; }
    body.app-theme-navy :is(h4, h5, h6):not(.brand-title) { font-size: max(14px, calc(var(--app-heading-size, 20px) - 2px)) !important; }
    body.app-theme-navy :is(h1, h2, h3, h4, h5, h6) { overflow-wrap: anywhere; }

    body.app-theme-navy table:not(.print-table) :is(th, th span, th div, th strong) {
        font-size: var(--app-heading-size, 20px) !important;
    }
    body.app-theme-navy table:not(.print-table) :is(td, tbody th, td span, td div, td p, td a, td strong, td small, td button, td input, td select, td label, tbody th span) {
        font-size: var(--app-table-size, 18px) !important;
    }
    body.app-theme-navy table:not(.print-table) :is(td, th) { line-height: 1.7; }
    body.app-theme-navy :is(.table-container-modern, .visa-table-wrap, .activity-table-scroll, .users-card) { min-width: 0; overflow-x: auto; }

    /* Preview inherits draft sizes only; the rest of the page uses saved preferences. */
    body.app-theme-navy #font-preview h3 { font-size: calc(var(--sample-heading-size, 20px) + 6px) !important; }
    body.app-theme-navy #font-preview th { font-size: var(--sample-heading-size, 20px) !important; }
    body.app-theme-navy #font-preview td { font-size: var(--sample-table-size, 18px) !important; }

    @media (min-width: 993px) {
        body.app-theme-navy .page-content:has(table):not(.appearance-page) { max-width: none !important; width: calc(100% - 48px); }
        body.app-theme-navy .report-ledger-card { overflow-x: auto; }
        body.app-theme-navy #report-table { table-layout: auto; width: 100%; }
        body.app-theme-navy #report-table :is(th, td) { white-space: nowrap; }
        body.app-theme-navy #report-table :is(th.col-section, th.col-notes) { width: auto; }
        body.app-theme-navy #report-table tbody td:is(.col-section, .col-notes) { white-space: nowrap; overflow-wrap: normal; }
        body.app-theme-navy #report-table :is(th.col-reference, th.col-datetime, th.th-opening, th.th-income, th.th-expense, th.actions) { width: 1%; }
        body.app-theme-navy #report-table :is(td, th) { padding-inline: 16px; }
        body.app-theme-navy :is(.modern-table, .visa-table, .users-table) :is(th, td) { white-space: nowrap; }
        body.app-theme-navy .visa-table tbody th { max-width: none; }
    }
}
