/* Author: Dmitry Karchevsky */
@media screen {
    /* Modified 2026-10-26: Remove horizontal scrollbars from dialog content and embedded dialog pages. */
    html body .ui-dialog .ui-dialog-content,
    html body .ui-dialog .db_fieldsarea,
    html body[headerMargin="0"] { overflow-x: hidden !important; }
    /* Modified 2026-10-26: Use one dark palette for all dialogs, date pickers and embedded forms, including jury desks. */
    html body .ui-dialog,
    html body .ui-datepicker,
    html:has(> body[headerMargin="0"]),
    html body[headerMargin="0"] {
        --shell-dialog-background: #11161d;
        --shell-dialog-header: #0b1016;
        --shell-dialog-field-background: #1a222d;
        --shell-dialog-border: #34404d;
        --shell-dialog-text: #dce5ee;
        --shell-button-background: #25323f;
        --shell-button-border: #526578;
        --shell-button-text: #edf3fa;
        --shell-button-hover: #334858;
        --shell-button-hover-border: #8096ac;
        --shell-danger-text: #efb1b6;
        --shell-danger-border: #66505d;
        --shell-danger-background: #49313c;
        --shell-danger-hover-border: #b87586;
        color-scheme: dark;
    }

    html body .ui-autocomplete.tournament-autocomplete {
        z-index: 20000;
        box-sizing: border-box;
        max-height: min(320px, 60vh);
        max-width: calc(100vw - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 4px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 4px;
        background: var(--shell-dialog-field-background);
        color: var(--shell-dialog-text);
        font: 13px/18px Arial, sans-serif;
    }
    html body .ui-autocomplete.tournament-autocomplete-prior { max-height: 320px; }
    html body .tournament-autocomplete .ui-menu-item {
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }
    html body .tournament-autocomplete .ui-menu-item[data-club-event="1"] + .ui-menu-item[data-club-event="0"] {
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid var(--shell-accent-light);
    }
    html body .tournament-autocomplete .ui-menu-item > a {
        height: auto;
        min-height: 0;
        padding: 4px 8px;
        border: 1px solid transparent;
        border-radius: 3px;
        background: transparent;
        color: var(--shell-dialog-text);
        line-height: 18px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    html body .tournament-autocomplete .ui-menu-item > a.ui-state-focus {
        margin: 0;
        border-color: var(--shell-accent);
        background: var(--shell-accent-surface);
        color: var(--shell-accent-selected-text);
    }
    /* PageMenu navigation uses the same underline as the main navigation. */
    html body:is(.test-shell, [headerMargin="0"]) .pagemenucontainer {
        max-width: calc(100vw - 20px);
        margin: 0 10px 1px;
    }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenucontainer > hr { display: none; }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        min-height: 29px;
        margin: 0;
        border-bottom: 1px solid var(--shell-dialog-border);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu > a {
        position: relative;
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        box-sizing: border-box;
        min-height: 28px;
        padding: 4px 12px;
        border: 0;
        border-radius: 3px 3px 0 0;
        background: transparent;
        color: #95a5b6;
        font: 13px/18px Arial, sans-serif;
        text-decoration: none;
        white-space: nowrap;
    }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu > a:hover { background: var(--shell-accent-nav-background); color: var(--shell-accent-light); }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu > a[page_selected="1"] { color: #edf2f7; font-weight: 600; }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu > a[page_selected="1"]::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 0;
        height: 2px;
        background: var(--shell-accent);
    }
    html body:is(.test-shell, [headerMargin="0"]) .pagemenu > a:focus-visible { outline: 2px solid var(--shell-accent-light); outline-offset: -2px; }

    /* Embedded pages use the same tabs with the shared light dialog palette. */
    html body[headerMargin="0"] .pagemenucontainer {
        max-width: 100%;
        margin: 0 0 8px;
    }
    html body[headerMargin="0"] .pagemenu > a,
    html body[headerMargin="0"] .pagemenu > a:visited,
    html body[headerMargin="0"] .pagemenu > a[page_selected="1"] {
        color: var(--shell-dialog-text);
    }
    html body[headerMargin="0"] .pagemenu > a[page_selected="1"] { background: var(--shell-dialog-field-background); }
    html body[headerMargin="0"] .pagemenu > a:hover { background: #def3fc; color: #2363af; }
    html body[headerMargin="0"] .pagemenu > a:focus-visible { outline-color: var(--shell-accent); }

    /* Column controls are embedded with the shared controls, including when
       an older copy of the shell stylesheet is still deployed. */
    html body.test-shell table[activetable][sortable] thead tr:first-child td {
        /* The hover search button overlays the label without widening columns. */
        padding-right: 5px;
    }
    html body.test-shell table[activetable][sortable] thead tr:first-child td[sort_order] span::after {
        content: "\25b2";
        margin-left: 6px;
        color: var(--shell-accent-light);
        font-size: 10px;
        vertical-align: middle;
    }
    html body.test-shell table[activetable][sortable] thead tr:first-child td[sort_order="DESC"] span::after { content: "\25bc"; }
    html body.test-shell table[activetable][sortable] thead tr:first-child td .searchButton {
        position: absolute;
        top: 50%;
        right: 2px;
        width: 22px;
        height: 22px;
        transform: translateY(-50%);
        border-radius: 3px;
        background: none;
        color: var(--shell-accent-light);
    }
    html body.test-shell table[activetable][sortable] thead tr:first-child td .searchButton::before {
        content: "";
        position: absolute;
        top: 4px;
        left: 4px;
        width: 7px;
        height: 7px;
        border: 2px solid currentColor;
        border-radius: 50%;
    }
    html body.test-shell table[activetable][sortable] thead tr:first-child td .searchButton::after {
        content: "";
        position: absolute;
        top: 13px;
        left: 13px;
        width: 6px;
        height: 2px;
        background: currentColor;
        transform: rotate(45deg);
        transform-origin: left center;
    }
    html body.test-shell table[activetable][sortable] thead tr:first-child td .searchButton:hover { background: var(--shell-accent-surface); }

    /* Shared by the main page and lightweight iframe forms. */
    html body button.ui-button,
    html body input.ui-button[type="button"],
    html body input.ui-button[type="submit"],
    html body input[type="button"],
    html body input[type="submit"],
    html body .db_buttonsarea button,
    html body .ui-dialog .db_buttonsarea button {
        box-sizing: border-box;
        min-width: 112px;
        min-height: 28px;
        height: 30px;
        margin: 0 6px 0 0;
        padding: 0 14px;
        border: 1px solid var(--shell-button-border);
        border-radius: 4px !important;
        background: var(--shell-button-background);
        color: var(--shell-button-text);
        font: 600 12px Arial, sans-serif;
        line-height: 28px;
        text-shadow: none;
        box-shadow: none;
        cursor: pointer;
        transition: none;
    }
    html body button.ui-button:enabled:hover,
    html body input.ui-button[type="button"]:enabled:hover,
    html body input.ui-button[type="submit"]:enabled:hover,
    html body input[type="button"]:enabled:hover,
    html body input[type="submit"]:enabled:hover,
    html body .db_buttonsarea button:enabled:hover,
    html body .ui-dialog .db_buttonsarea button:enabled:hover {
        background: var(--shell-button-hover);
        border-color: var(--shell-button-hover-border);
    }
    html body input[id$="_Add"],
    html body input.ui-button[name="SubmitInsert"],
    html body input.ui-button[name="SubmitUpdate"],
    html body input[name="SubmitInsert"],
    html body input[name="SubmitUpdate"],
    html body .db_buttonsarea button:first-child {
        background: var(--shell-accent);
        border-color: var(--shell-accent);
        color: var(--shell-accent-button-text);
    }
    html body .ui-dialog .db_buttonsarea button:first-child {
        background: var(--shell-accent);
        border-color: var(--shell-accent);
        color: var(--shell-accent-button-text);
    }
    html body input[name="SubmitInsert"]:enabled:hover,
    html body input[name="SubmitUpdate"]:enabled:hover,
    html body input.ui-button[name="SubmitInsert"]:enabled:hover,
    html body input.ui-button[name="SubmitUpdate"]:enabled:hover,
    html body .ui-dialog .db_buttonsarea button:first-child:enabled:hover,
    html body .db_buttonsarea button:first-child:enabled:hover {
        background: var(--shell-accent-light);
        border-color: var(--shell-accent-light);
    }
    html body input.ui-button[name="SubmitDelete"],
    html body input[name="SubmitDelete"] {
        color: var(--shell-danger-text);
        border-color: var(--shell-danger-border);
    }
    html body input.ui-button[name="SubmitDelete"]:enabled:hover,
    html body input[name="SubmitDelete"]:enabled:hover {
        background: var(--shell-danger-background);
        border-color: var(--shell-danger-hover-border);
    }
    html body input[type="button"]:disabled,
    html body input[type="submit"]:disabled,
    html body button:disabled { opacity: .45; cursor: default; }
    html body button:focus-visible,
    html body input:focus-visible,
    html body select:focus-visible,
    html body textarea:focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 1px; }

    html body .ui-dialog {
        padding: 0;
        border: 1px solid var(--shell-dialog-border) !important;
        border-radius: 5px;
        background: var(--shell-dialog-background) !important;
        color: var(--shell-dialog-text);
        box-shadow: 0 10px 32px #0008;
        font: 13px Arial, sans-serif;
    }
    html body .ui-widget-overlay { background: var(--shell-dialog-overlay); opacity: .65; }
    html body .ui-dialog .ui-dialog-titlebar {
        padding: 9px 42px 9px 12px;
        border: 0;
        border-bottom: 1px solid var(--shell-dialog-border);
        background: var(--shell-dialog-header);
        color: var(--shell-dialog-text);
    }
    html body .ui-dialog .ui-dialog-title { margin: 0; line-height: 24px; color: inherit; }
    html body .ui-dialog .ui-dialog-titlebar-close {
        top: 7px;
        right: 7px;
        width: 28px !important;
        min-width: 28px;
        min-height: 28px;
        height: 28px;
        margin: 0;
        padding: 0;
        background: #25323f !important;
    }
    html body .ui-dialog .ui-dialog-titlebar-close:hover { background: #334858 !important; }
    html body .ui-dialog .ui-dialog-titlebar-close .ui-icon { filter: brightness(0) invert(1); }
    html body .ui-dialog .ui-dialog-content,
    html body .ui-dialog .ui-dialog-buttonpane,
    html body .ui-dialog .db_fieldsarea,
    html body .ui-dialog .db_buttonsarea {
        background: var(--shell-dialog-background);
        color: var(--shell-dialog-text);
    }
    html body .ui-dialog .ui-dialog-content { padding: 12px; }
    /* Modified 2026-10-27: Give search dialogs the short landscape viewport instead of squeezing them beneath the navigation. */
    @media (orientation: landscape) and (max-height: 500px) {
        html body .ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-front.ui-draggable.searchDialogContainer:not([style*="display: none"]):not([style*="display:none"]) {
            position: fixed !important;
            top: 8px !important;
            left: 8px !important;
            width: calc(100vw - 16px) !important;
            max-width: calc(100vw - 16px) !important;
            height: calc(100vh - 16px) !important;
            height: calc(100dvh - 16px) !important;
            max-height: calc(100vh - 16px) !important;
            max-height: calc(100dvh - 16px) !important;
            margin: 0 !important;
            transform: none !important;
            display: flex !important;
            flex-direction: column;
            overflow: hidden !important;
            box-sizing: border-box;
        }
        html body .searchDialogContainer > .ui-dialog-titlebar {
            flex: 0 0 auto;
            padding-top: 4px;
            padding-bottom: 4px;
        }
        html body .searchDialogContainer > .ui-dialog-titlebar .ui-dialog-titlebar-close { top: 2px; }
        html body .searchDialogContainer > .ui-dialog-content {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0 !important;
            height: auto !important;
            max-height: none !important;
            padding: 0;
            overflow: hidden;
        }
        html body .ui-dialog.searchDialogContainer .db_fieldsarea {
            flex: 1 1 auto;
            min-height: 0;
            padding: 8px 12px;
            overflow: auto;
        }
        html body .ui-dialog.searchDialogContainer .db_buttonsarea {
            flex: 0 0 auto;
            padding: 6px 12px;
        }
    }
    html body .ui-dialog .ui-dialog-content:has(> iframe) { padding: 0; overflow: hidden; }
    html body .ui-dialog iframe { display: block; border: 0; background: var(--shell-dialog-background); }
    html body .ui-dialog .db_buttonsarea,
    html body[headerMargin="0"] .db_buttonsarea {
        border-top: 1px solid var(--shell-dialog-border);
        padding: 12px 18px;
        margin-top: 0;
    }
    html:has(> body[headerMargin="0"]),
    html body[headerMargin="0"] {
        background: var(--shell-dialog-background) !important;
        color: var(--shell-dialog-text);
        /* Modified 2026-10-26: Match native controls and scrollbars to the dark embedded-dialog palette. */
        color-scheme: dark;
    }
    html body[headerMargin="0"] {
        box-sizing: border-box;
        height: auto;
        min-height: 0;
        margin: 0 !important;
        padding: 10px;
        font: 13px/1.4 Arial, sans-serif;
    }
    html body[headerMargin="0"] > form,
    html body[headerMargin="0"] .iframeWithMargin > form,
    html body[headerMargin="0"] #delete_div > form {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 20px);
        margin: 0;
    }
    html body[headerMargin="0"] .db_fieldsarea {
        flex: 0 1 auto;
        min-height: 0;
        overflow: auto;
        background: var(--shell-dialog-background);
        color: inherit;
    }
    html body[headerMargin="0"] .db_buttonsarea { flex: 0 0 auto; background: var(--shell-dialog-background); }
    html body[headerMargin="0"] #DeleteForm .db_fieldsarea { padding-bottom: 0; }
    html body[headerMargin="0"] #DeleteForm .ui-icon-alert { filter: brightness(0) invert(1); opacity: .7; }
    html body[headerMargin="0"] .db_buttonsarea { display: flex; gap: 8px; flex-wrap: wrap; }
    html body[headerMargin="0"] .db_buttonsarea input { flex: 1 0 auto; margin: 0; }
    html body[headerMargin="0"] .iframeWithMargin { max-height: calc(100vh - 20px); max-width: 100%; }
    html body[headerMargin="0"] .iframeWithMargin:has(> form) {
        display: block;
        width: auto !important;
        height: auto !important;
        max-height: none;
        overflow: visible;
    }
    html body[headerMargin="0"] .ui-widget-content {
        background: var(--shell-dialog-field-background);
        border-color: var(--shell-dialog-border);
        color: var(--shell-dialog-text);
    }
    /* Keep the date picker independent of the legacy dark table/button styles. */
    html body #ui-datepicker-div {
        box-sizing: border-box;
        width: 280px; max-width: calc(100vw - 16px);
        padding: 8px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 6px;
        background: var(--shell-dialog-background);
        color: var(--shell-dialog-text);
        box-shadow: 0 6px 20px #22324226;
        font: 14px/1.4 Arial, sans-serif;
    }
    html body #ui-datepicker-div .ui-datepicker-header {
        min-height: 32px; padding: 0;
        border: 0; border-radius: 4px;
        background: var(--shell-dialog-header);
        color: var(--shell-dialog-text);
    }
    html body #ui-datepicker-div .ui-datepicker-title {
        margin: 0 34px; line-height: 32px; font-weight: 600;
    }
    html body #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next) {
        box-sizing: border-box;
        top: 1px; width: 30px; height: 30px; margin: 0;
        border: 1px solid transparent; border-radius: 4px;
        background: transparent; color: var(--shell-dialog-text);
        cursor: pointer;
    }
    html body #ui-datepicker-div .ui-datepicker-prev { left: 1px; }
    html body #ui-datepicker-div .ui-datepicker-next { right: 1px; }
    html body #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next) .ui-icon { display: none; }
    html body #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next)::after {
        content: ''; position: absolute; top: 10px; width: 7px; height: 7px;
        border: solid currentColor; border-width: 0 2px 2px 0;
    }
    html body #ui-datepicker-div .ui-datepicker-prev::after { left: 12px; transform: rotate(135deg); }
    html body #ui-datepicker-div .ui-datepicker-next::after { right: 12px; transform: rotate(-45deg); }
    html body #ui-datepicker-div .ui-datepicker-calendar {
        table-layout: fixed; width: 100%; margin: 6px 0 0;
        border: 0; border-collapse: separate; border-spacing: 2px;
        background: transparent;
    }
    html body #ui-datepicker-div .ui-datepicker-calendar :is(thead, tbody, tr, th, td) {
        border: 0 !important;
        background: transparent !important;
        color: var(--shell-dialog-text);
    }
    html body #ui-datepicker-div .ui-datepicker-calendar th {
        padding: 5px 0; font: 600 12px/18px Arial, sans-serif;
    }
    html body #ui-datepicker-div .ui-datepicker-calendar td { padding: 0; }
    html body #ui-datepicker-div .ui-datepicker-calendar td :is(a, span) {
        display: block; box-sizing: border-box;
        width: 100%; min-width: 0 !important; height: 32px; min-height: 0;
        margin: 0; padding: 0;
        border: 1px solid transparent; border-radius: 4px;
        background: var(--shell-dialog-field-background);
        color: var(--shell-dialog-text);
        font: 14px/30px Arial, sans-serif;
        text-align: center; text-decoration: none;
    }
    html body #ui-datepicker-div .ui-datepicker-calendar .ui-state-highlight {
        border-color: var(--shell-accent); font-weight: 600;
    }
    html body #ui-datepicker-div .ui-datepicker-calendar .ui-state-active {
        background: var(--shell-accent); color: var(--shell-accent-button-text); font-weight: 600;
    }
    html body #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next):hover,
    html body #ui-datepicker-div .ui-datepicker-calendar a:hover {
        border-color: var(--shell-button-hover-border);
        background: var(--shell-button-hover);
        color: var(--shell-dialog-text);
    }
    html body #ui-datepicker-div a:focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 1px; }
    html body #ui-datepicker-div .ui-state-disabled { opacity: .45; }
    html body[headerMargin="0"] input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    html body[headerMargin="0"] select,
    html body[headerMargin="0"] textarea {
        background: var(--shell-dialog-field-background);
        border-color: var(--shell-dialog-border);
        color: var(--shell-dialog-text);
    }
    /* The shared form treatment applies to generated dialogs and iframe forms alike. */
    html body .ui-dialog .dialogDiv { min-width: 0; padding: 0; }
    html body .ui-dialog form { margin: 0; background: transparent; }
    html body .ui-dialog .db_fieldsarea { padding: 18px; }
    html body .ui-dialog .formTable,
    html body[headerMargin="0"] .formTable {
        width: 100%; margin: 0; border-spacing: 0;
        color: var(--shell-dialog-text); background: transparent;
    }
    html body .ui-dialog .db_fieldsarea td,
    html body[headerMargin="0"] .db_fieldsarea td {
        padding: 5px 6px; border: 0;
        background: transparent; color: var(--shell-dialog-text);
        font: 14px/1.4 Arial, sans-serif;
    }
    html body .ui-dialog .db_fieldsarea td[align="right"],
    html body[headerMargin="0"] .db_fieldsarea td[align="right"] { text-align: left; }
    html body .ui-dialog .db_fieldsarea :where(input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="file"]), select, textarea),
    html body[headerMargin="0"] .db_fieldsarea :where(input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="file"]), select, textarea) {
        box-sizing: border-box; max-width: 100%; min-height: 36px;
        padding: 6px 8px; border: 1px solid var(--shell-dialog-border);
        border-radius: 4px; background: var(--shell-dialog-field-background);
        color: var(--shell-dialog-text); font: 14px/1.4 Arial, sans-serif;
    }
    /* Native number controls stay visible in every score editor. */
    html body .ui-dialog input[type="number"]::-webkit-inner-spin-button,
    html body[headerMargin="0"] input[type="number"]::-webkit-inner-spin-button {
        opacity: 1;
        cursor: pointer;
    }
    html body .ui-dialog .db_fieldsarea input:is([type="checkbox"], [type="radio"]),
    html body[headerMargin="0"] .db_fieldsarea input:is([type="checkbox"], [type="radio"]) {
        width: 16px; height: 16px; margin: 0; vertical-align: middle;
        accent-color: var(--shell-accent);
    }
    html body .ui-dialog .db_buttonsarea,
    html body[headerMargin="0"] .db_buttonsarea {
        display: flex; justify-content: flex-end; gap: 8px;
    }
    html body .ui-dialog .db_buttonsarea :is(button, input[type="button"], input[type="submit"]),
    html body[headerMargin="0"] .db_buttonsarea :is(button, input[type="button"], input[type="submit"]) {
        min-width: 100px; min-height: 36px; height: 36px;
        margin: 0; padding: 6px 16px; font: 600 14px/1.4 Arial, sans-serif;
    }

}

/* Modified 2026-10-26: Size translated text actions by their labels and wrap within forms and dialogs. */
@media screen {
    html body :is(.db_buttonsarea, .ui-dialog-buttonset, .table_container > .noprint) :is(button, input[type="button"], input[type="submit"]),
    html body :is(button.importDivisionsButton, button.eventStatus, .pools-actions button, .vp-actions button, .podiumControls button, .send button):not(.ui-button-icon-only) {
        width: auto !important;
        max-width: 100%;
        height: auto;
        max-height: none;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.4;
        padding-top: 6px;
        padding-bottom: 6px;
        flex-shrink: 0;
    }
    html body :is(.db_buttonsarea, .ui-dialog-buttonset, .table_container > .noprint) :is(input[type="button"], input[type="submit"]) {
        min-width: max-content;
        max-width: none;
    }
    html body :is(.db_buttonsarea, .ui-dialog-buttonset, .vp-actions, .podiumControls, .pools-actions, .division-import-actions) {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }
    html body :is(.db_buttonsarea, .ui-dialog-buttonset) { float: none; }
    html body :is(.db_buttonsarea, .ui-dialog-buttonset, .table_container > .noprint) button.ui-button-text-only .ui-button-text,
    html body :is(.importDivisionsButton, .eventStatus, .pools-actions button, .vp-actions button, .podiumControls button, .send button).ui-button-text-only .ui-button-text {
        padding: 0;
        line-height: inherit;
        white-space: inherit;
        overflow-wrap: inherit;
    }
}

@media screen {
    /* Author: Dmitry Karchevsky — shared light tables for embedded dialog pages. */
    html body[headerMargin="0"] .table_container {
        margin: 0;
        max-width: none;
    }
    html body[headerMargin="0"] .table_container table[activetable] {
        min-width: 0 !important;
        max-width: none !important;
        width: max-content;
        border-collapse: collapse;
        border-spacing: 0;
        background: var(--shell-dialog-background);
        color: var(--shell-dialog-text);
    }
    html body[headerMargin="0"] table[activetable] :is(thead, tbody, tfoot, tr) { background: transparent; }
    html body[headerMargin="0"] table[activetable] :is(td, th) {
        padding: 6px 8px;
        border: 0 !important;
        border-bottom: 1px solid var(--shell-dialog-border) !important;
        background: var(--shell-dialog-background) !important;
        color: var(--shell-dialog-text) !important;
        font: 13px/1.4 Arial, sans-serif;
    }
    html body[headerMargin="0"] table[activetable] thead :is(td, th) {
        background: var(--shell-dialog-header) !important;
        font-weight: 600;
    }
    html body[headerMargin="0"] table[activetable] tbody tr:nth-child(even) :is(td, th) {
        background: var(--shell-dialog-field-background) !important;
    }
    html body[headerMargin="0"] table[activetable] tbody tr[row_selected] :is(td, th),
    html body[headerMargin="0"] table[activetable] tbody tr:hover :is(td, th) {
        background: #def3fc !important;
    }
    html body[headerMargin="0"] table[activetable] a { color: #2363af; }
}
