/* Appearance is screen-only; existing print/export table styles remain authoritative. */
@media print {
    .ingz-dt-home, .ingz-dt-panel { display: none !important; }
}
@media screen {
    .ingz-dt-scope, .ingz-dt-table, .ingz-dt-panel {
        --ingz-dt-ink: var(--md3-navy, #06133e);
        --ingz-dt-surface: var(--md3-surface, #fff);
        --ingz-dt-outline: var(--md3-border, #e2e8f0);
        --ingz-dt-primary: var(--md3-primary, #dd2229);
        --ingz-dt-cross-column: var(--md3-table-highlight-column, #f1f4fa);
        --ingz-dt-cross-row: var(--md3-table-highlight-row, #e8edf7);
        --ingz-dt-cross-cell: var(--md3-table-highlight-cell, #dae3f5);
    }
    .ingz-dt-home { display: inline-block; max-width: 100%; vertical-align: middle; }
    .ingz-dt-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px; }
    .ingz-dt-trigger, .ingz-dt-reset {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        min-height: 44px; padding: 8px 16px; border: 1px solid var(--ingz-dt-outline);
        border-radius: 20px; background: var(--ingz-dt-surface); color: var(--ingz-dt-ink);
        font: inherit; font-size: 14px; cursor: pointer; line-height: 1.4;
    }
    .ingz-dt-trigger:hover, .ingz-dt-trigger[aria-expanded="true"], .ingz-dt-reset:hover { background: var(--md3-primary-tint, #fef2f2); }
    .ingz-dt-trigger:disabled { opacity: .5; cursor: default; }
    .ingz-dt-trigger:focus-visible, .ingz-dt-panel :is(button, a, input, select):focus-visible {
        outline: 3px solid var(--ingz-dt-primary); outline-offset: 3px;
    }
    .ingz-dt-caret { font-size: 11px; }
    .ingz-dt-panel[hidden] { display: none !important; }
    .ingz-dt-panel {
        position: fixed; z-index: 1060; box-sizing: border-box;
        width: 336px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px);
        overflow: auto; padding: 16px; border: 1px solid var(--ingz-dt-outline); border-radius: 16px;
        background: var(--ingz-dt-surface); color: var(--ingz-dt-ink);
        box-shadow: 0 8px 28px rgba(6, 19, 62, .16); text-align: start;
        font-family: inherit; font-size: 14px; line-height: 1.5;
    }
    .ingz-dt-title { font: inherit; font-weight: 700; font-size: 17px; margin: 0 0 16px; color: inherit; }
    .ingz-dt-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 12px; font-weight: 400; }
    .ingz-dt-control select { min-width: 126px; max-width: 55%; min-height: 40px; border: 1px solid var(--ingz-dt-outline); border-radius: 8px; background: var(--ingz-dt-surface); color: inherit; font: inherit; padding: 4px; }
    .ingz-dt-control input[type="range"] { width: 110px; max-width: 40%; accent-color: var(--ingz-dt-primary); }
    .ingz-dt-control input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--ingz-dt-primary); }
    .ingz-dt-font-value { min-width: 38px; padding: 0; font: inherit; color: inherit; }
    .ingz-dt-reset { width: 100%; margin-block-start: 12px; color: var(--ingz-dt-primary); }
    .ingz-dt-tools .dt-buttons { display: flex; flex-direction: column; float: none !important; gap: 6px; width: 100%; }
    .ingz-dt-tools .dt-buttons > :is(a, button, .dt-button, .btn) { float: none !important; margin: 0 !important; white-space: normal; text-align: start; min-height: 44px; border-radius: 8px; }
    table.dataTable.ingz-dt-table.ingz-dt-font > :is(thead, tbody, tfoot) > tr > :is(th, td) { font-size: var(--ingz-dt-font) !important; line-height: 1.5; }
    .ingz-dt-table[data-ingz-density="compact"] { --ingz-dt-padding: 4px; }
    .ingz-dt-table[data-ingz-density="comfortable"] { --ingz-dt-padding: 10px; }
    .ingz-dt-table[data-ingz-density="spacious"] { --ingz-dt-padding: 15px; }
    table.dataTable.ingz-dt-table:is([data-ingz-density="compact"], [data-ingz-density="comfortable"], [data-ingz-density="spacious"]) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
        padding-block: var(--ingz-dt-padding) !important;
    }
    .ingz-dt-table[data-ingz-borders="soft"] { --ingz-dt-grid: var(--md3-border, #d4dce6); }
    .ingz-dt-table[data-ingz-borders="strong"] { --ingz-dt-grid: var(--md3-navy-muted, #64748b); }
    table.dataTable.ingz-dt-table:is([data-ingz-borders="soft"], [data-ingz-borders="strong"]) { border-collapse: separate !important; border-spacing: 0; border: 0; border-block-start: 1px solid var(--ingz-dt-grid); border-inline-start: 1px solid var(--ingz-dt-grid); }
    table.dataTable.ingz-dt-table:is([data-ingz-borders="soft"], [data-ingz-borders="strong"]) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
        border: 0 !important; border-inline-end: 1px solid var(--ingz-dt-grid) !important; border-block-end: 1px solid var(--ingz-dt-grid) !important;
    }
    table.dataTable.ingz-dt-table[data-ingz-preset="high_visibility"] > thead > tr > :is(th, td) { font-weight: 700; border-block-end: 2px solid var(--ingz-dt-ink) !important; }
    table.dataTable.ingz-dt-table[data-ingz-wrap="true"] .ingz-dt-wrap-cell { white-space: normal !important; overflow-wrap: anywhere; }
    /* Only neutral cells are tinted. Semantic backgrounds and business selections keep their colors. */
    table.dataTable.ingz-dt-table[data-ingz-zebra="true"] > tbody > tr:nth-child(even):not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]) > .ingz-dt-neutral:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]) { background-color: var(--md3-surface-variant, #f1f5f9); }
    table.dataTable.ingz-dt-table > :is(thead, tbody, tfoot) > tr:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]) > .ingz-dt-neutral:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]).ingz-dt-column { background-color: var(--ingz-dt-cross-column) !important; }
    table.dataTable.ingz-dt-table > :is(thead, tbody, tfoot) > tr:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]) > .ingz-dt-neutral:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]).ingz-dt-row { background-color: var(--ingz-dt-cross-row) !important; }
    table.dataTable.ingz-dt-table > :is(thead, tbody, tfoot) > tr:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]) > .ingz-dt-neutral:not(.selected):not(.active):not(.danger):not(.success):not(.warning):not(.info):not([class*="bg-"]):not([style*="background"]).ingz-dt-intersection { background-color: var(--ingz-dt-cross-cell) !important; }
    table.dataTable.ingz-dt-table .ingz-dt-intersection { outline: 2px solid var(--md3-navy-muted, #64748b); outline-offset: -2px; }
}
