/* Shared staff and contractor controls. The scope also supersedes legacy ID rules. */
html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--control-line, #3b424a);
    border-radius: 10px;
    color: var(--ink, #edf0f3);
    background: var(--control-bg, #20252b);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    transform: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: background-color 150ms cubic-bezier(.2,0,0,1), border-color 150ms cubic-bezier(.2,0,0,1), color 150ms cubic-bezier(.2,0,0,1), transform 150ms cubic-bezier(.2,0,0,1);
}
@media (hover: hover) and (pointer: fine) {
html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button):not(:disabled):hover {
    background: var(--control-hover, #2b3138);
    border-color: var(--control-hover-line, #67717c);
    color: var(--ink, #edf0f3);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
    transform: none;
}
}
html:root :is(body, #portalLogin, #portalDashboard) :is(.primary-button, .view-invoice-button) {
    color: var(--action-ink, #191c12);
    background: var(--action-bg, #e9d943);
    border-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
html:root :is(body, #portalLogin, #portalDashboard) :is(.primary-button, .view-invoice-button):not(:disabled):hover {
    color: var(--action-ink, #191c12);
    background: var(--action-hover, #f6e975);
    border-color: transparent;
}
}
html:root :is(body, #portalLogin, #portalDashboard) :is(.danger-button, .danger-menu-item, .trash-button, .submit-dispute-button, .invoice-decision-button.dispute) {
    color: #ffb8b4;
    background: #332224;
    border-color: #634044;
}
@media (hover: hover) and (pointer: fine) {
html:root :is(body, #portalLogin, #portalDashboard) :is(.danger-button, .danger-menu-item, .trash-button, .submit-dispute-button, .invoice-decision-button.dispute):not(:disabled):hover {
    color: #ffd1cf;
    background: #442a2d;
    border-color: #b36e73;
}
}
html:root :is(body, #portalLogin, #portalDashboard) button.invoice-decision-button.accept { color: #a7e6c1; background: #20352b; border-color: #416a55; }
html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button):disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button):not(:disabled):active { transform: scale(.96); }
html:root :is(body, #portalLogin, #portalDashboard) :is(button, a):focus-visible { outline: 2px solid var(--accent-text, #e9d943); outline-offset: 4px; }
html:root :is(body, #portalLogin, #portalDashboard) button:is(.icon-button, .icon-action, .gear-button, .modal-close, .add-recipient-button) { min-width: 42px; width: 42px; height: 42px; padding: 8px; flex-shrink: 0; }
html:root :is(body, #portalLogin, #portalDashboard) button svg { flex-shrink: 0; }
html:root :is(body, #portalLogin, #portalDashboard) button.status-info-button { min-width: 40px; min-height: 40px; padding: 8px; }
html:root :is(body, #portalLogin, #portalDashboard) button:is(.nav-button, .nav-menu-toggle, .profile-menu-item) { justify-content: flex-start; width: 100%; text-align: left; }
html:root :is(body, #portalLogin, #portalDashboard) button:is(.nav-button, .nav-menu-toggle) { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted, #a3acb6); }
html:root :is(body, #portalLogin, #portalDashboard) button.nav-menu-toggle { justify-content: space-between; }
html:root :is(body, #portalLogin, #portalDashboard) button:is(.nav-button.active, .rate-tab.active, [aria-selected="true"], [aria-pressed="true"]) { color: var(--accent-text, #e9d943); background: var(--accent-surface, #2c2c21); border-color: var(--accent-border, #655e2c); }
@media (hover: hover) and (pointer: fine) {
html:root :is(body, #portalLogin, #portalDashboard) button:is(.nav-button, .nav-menu-toggle):not(:disabled):hover { color: var(--ink); background: var(--control-bg, #20252b); border-color: transparent; }
}
@media (hover: hover) and (pointer: fine) {
html:root :is(body, #portalLogin, #portalDashboard) button:is(.nav-button.active, .rate-tab.active, [aria-selected="true"], [aria-pressed="true"]):not(:disabled):hover { color: var(--accent-text, #e9d943); background: var(--accent-surface, #2c2c21); border-color: var(--accent-border, #655e2c); }
}
html:root :is(body, #portalLogin, #portalDashboard) button:is([data-driver-sort], [data-invoice-sort], .table-sort-button) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; justify-content: space-between; color: var(--muted); font-size: 11px; }
html:root :is(body, #portalLogin, #portalDashboard) button.audit-item-button { justify-content: space-between; width: 100%; text-align: left; }
html:root :is(body, #portalLogin, #portalDashboard) button.courier-switch-button { padding: 8px 10px; font-size: 11px; }
@media (pointer: coarse) {
    html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button) { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button) { transition: none; }
    html:root :is(body, #portalLogin, #portalDashboard) :is(button, .view-invoice-button):not(:disabled):active { transform: none; }
}
