@media screen {
    /* Shared rows also cover pages rendered in the workspace iframe. */
    html body :is(
        .rt-branch-tabs, .report-tabs, .saas-tabs, .cwo-status-tabs, .hall-tabs,
        .running-ticket-types, .admin-nav, .header-actions, .page-actions,
        .report-actions, .cw-action-links, .cw-toolbar, .cw-company-actions,
        .cw-pos-toolbar, .cw-printer-actions, .cw-service-row-actions,
        .saas-invoice-actions, .cwp-actions, .cwu-actions, .qr-actions,
        .qr-notice-actions, .support-actions, .rt-workspace-tools, .receipt-buttons
    ) {
        display: flex !important;
        flex-flow: row wrap;
        align-items: center;
        gap: 6px;
    }

    html body :is(
        .rt-branch-tabs, .report-tabs, .saas-tabs, .cwo-status-tabs, .hall-tabs,
        .running-ticket-types, .admin-nav, .header-actions, .page-actions,
        .report-actions, .cw-action-links, .cw-toolbar, .cw-company-actions,
        .cw-pos-toolbar, .cw-printer-actions, .cw-service-row-actions,
        .saas-invoice-actions, .cwp-actions, .cwu-actions, .qr-actions,
        .qr-notice-actions, .support-actions, .rt-workspace-tools, .receipt-buttons
    ) > :is(a, button, .btn, form) {
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
        margin-inline: 0;
    }

    html body .rt-branch-tabs > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 11px;
        min-height: 36px;
        text-align: center;
        line-height: 1.25;
        color: #174f74;
    }

    html body .rt-branch-tabs > a:nth-child(2) { color: #8b411a; }
    html body .rt-branch-tabs > a:nth-child(3) { color: #604282; }
    html body .rt-branch-tabs > a:nth-child(4) { color: #245939; }
    html body .rt-branch-tabs > a:nth-child(5) { color: #765315; }
    html body .rt-branch-tabs > a:nth-child(6) { color: #89364a; }
    html body .rt-branch-tabs > a:is(:hover,:focus-visible) { color: #211e1b; }

    html body :is(.header-actions, .page-actions, .report-actions, .cw-action-links,
        .cw-toolbar, .cw-company-actions, .cw-printer-actions, .support-actions, .receipt-buttons)
        > :is(a,button).btn:not(.primary,.danger,.success,.warning,.lang-toggle,[aria-current],.active,[data-order-status]) {
        background: var(--veno-secondary,#fffaf4);
        border-color: var(--veno-line,#ded3c5);
        color: var(--veno-secondary-ink,#312218);
    }

    html body :is(.btn.danger, .rt-delivery-reject-button),
    html body form:has(> input[name="action"][value$="_delete"]) > button:not([type="button"],[type="reset"]) {
        background: var(--veno-danger,#a42438) !important;
        border-color: var(--veno-danger,#a42438) !important;
        color: var(--veno-danger-ink,#fff) !important;
    }

    html body form:has(> input[name="action"][value="logout"]) > button[type="submit"],
    html body .rt-dashboard-logout {
        background: var(--veno-logout-button,#ac2437) !important;
        border-color: var(--veno-logout-button,#ac2437) !important;
        color: var(--veno-logout-button-ink,#fff) !important;
    }

    html body .rt-workspace-tools > :is(a,button):enabled { border-color: var(--veno-line,#ded3c5); }
    html body .rt-workspace-tools > a { background: var(--veno-secondary,#fffaf4); color: var(--veno-secondary-ink,#312218); }
    html body .rt-workspace-tools > button:last-child { background: var(--veno-danger,#8b2635); color: var(--veno-danger-ink,#fff); }

    html body :is(.rt-branch-tabs,.rt-workspace-tools,.header-actions,.page-actions,.report-actions,.cw-toolbar,.qr-actions)
        :is(a,button):focus-visible {
        outline: 2px solid var(--veno-accent,#a83a08);
        outline-offset: 2px;
    }
}

@media screen {
    .rt-cashier .rt-top {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 6px;
        min-height: 46px;
        padding-block: 4px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .rt-cashier .rt-top > .top-nav {
        grid-area: auto;
        flex-wrap: nowrap;
        justify-content: safe center;
        gap: 4px;
        padding: 3px;
        overflow-x: auto;
    }

    .rt-cashier .top-nav > :is(a, button, time) {
        flex: 0 0 auto;
    }

    .rt-cashier .top-nav > :is(a, button),
    .rt-cashier .top-nav > #rt-close-shift-open,
    .rt-cashier .top-context .rt-language {
        min-height: 30px;
        padding: 4px 6px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .rt-cashier .top-nav > a {
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }

    .rt-cashier .top-nav > .rt-header-clock {
        padding: 4px 5px;
        font-size: 11px;
    }

    .rt-cashier .top-nav > .qr-audio-header {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
        padding: 3px;
    }

    .rt-cashier .top-nav > .qr-audio-header img {
        width: 20px;
        height: 20px;
    }

    .rt-cashier .top-nav > .qr-audio-status:empty {
        display: none;
    }

    .rt-cashier .top-brand,
    .rt-cashier .top-context {
        gap: 6px;
        white-space: nowrap;
    }

    .rt-cashier .rt-top .brand {
        font-size: 21px;
    }

    .rt-cashier .rt-top .top-brand b {
        font-size: 12px;
        padding-inline-start: 6px;
    }

    .rt-cashier .rt-release-version {
        margin-inline-start: .2em;
        font-size: .72em;
        font-weight: normal;
        color: inherit;
    }

    .rt-cashier .top-context > div {
        max-width: 115px;
        font-size: 12px;
    }

    .rt-cashier .top-context bdi,
    .rt-cashier .top-context small {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    @media (max-width: 800px) {
        .rt-cashier .rt-top {
            grid-template-columns: max-content max-content max-content;
            overflow-x: auto;
        }

        .rt-cashier .rt-top > .top-nav {
            overflow: visible;
        }

        .rt-cashier .top-nav > :is(a, button),
        .rt-cashier .top-nav > #rt-close-shift-open,
        .rt-cashier .top-context .rt-language {
            min-height: 36px;
        }

        .rt-cashier .top-nav > .qr-audio-header {
            height: 36px;
        }
    }
}
