/* Design system: table headings, controls, switches, focus, CRM dropdown menu */

/* ===================================================================================================
   Design system 191 (approved Nov 2026)
   · Table headings: Option 5 "Graphite Surface"   · Controls: Option 6 "Inset Surface"
   · One corner radius: 9px (checkboxes 5px; circles stay round)   · One control height: 30px
   =================================================================================================== */
:root { --ui-h: 30px; --ui-r: 9px;
        --ui-bg: #F7FAFF; --ui-line: #D9DEE3; --ui-hover: #EEF2F8; --ui-press: #E4E8EE; --ui-tx: #181B1F; --ui-mut: #4F545A;
        --ui-sh: 0 0.5px 1px rgba(0, 0, 0, 0.10), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
        --ui-track: #E4E8EE; --ui-thumb: #F7FAFF; --ui-sw-off: #B7BCC2; --ui-box: #B7BCC2; --ui-ring: rgba(62, 97, 162, 0.4);
        --ui-pri: #3E61A2; --ui-pri-h: #30569E; --ui-pri-a: #254990; --ui-dan: #696E76;
        --radius-xs: 9px; --radius-sm: 9px; --radius-md: 9px; --radius-lg: 9px; --radius-xl: 9px;
        --hd-bg: #E4E8EE; --hd-tx: #000000; --hd-line: #CBCFD5; }
:root[data-theme="dark"] {
        --ui-bg: #313741; --ui-line: #424853; --ui-hover: #3A404B; --ui-press: #424853; --ui-tx: #E4EAF5; --ui-mut: #A5ACB9;
        --ui-sh: 0 0.5px 1px rgba(0, 0, 0, 0.40);
        --ui-track: #191D25; --ui-thumb: #424853; --ui-sw-off: #424853; --ui-box: #5D6572; --ui-ring: rgba(128, 175, 224, 0.55);
        --ui-pri: #2E75B7; --ui-pri-h: #3A80C3; --ui-pri-a: #3B81C4; --ui-dan: #A5ADB9;
        --hd-bg: #2F343E; --hd-tx: #E4EAF5; --hd-line: #424853; }
/* the top bar is dark graphite in both themes: its controls use the dark surface */
.dock { --ui-bg: #2C374C; --ui-line: #3C485E; --ui-hover: #344055; --ui-press: #3C485E; --ui-tx: #E3EBF8; --ui-mut: #A5ACB9; --ui-sh: 0 0.5px 1px rgba(0, 0, 0, 0.40); --ui-ring: rgba(140, 171, 226, 0.55); }
:root[data-theme="dark"] .dock { --ui-bg: #272F3F; --ui-line: #374050; --ui-hover: #303848; --ui-press: #374050; --ui-tx: #DBE1EB; --ui-mut: #9EA3AC; --ui-sh: 0 0.5px 1px rgba(0, 0, 0, 0.40); --ui-ring: rgba(128, 175, 224, 0.55); }

/* ---- Table headings: Option 5 ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .data-table > thead > tr > th { background: var(--hd-bg) !important; color: var(--hd-tx) !important; border-bottom: 1px solid var(--hd-line) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .data-table > thead > tr > th + th { box-shadow: inset 1px 0 0 var(--hd-line), 0 1px 0 var(--hd-line) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .data-table > thead > tr > th *, html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .data-table > thead > tr > th::after { color: var(--hd-tx) !important; }

/* ---- Buttons: one surface, one height; width follows the label ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .status-filter-actions > button, .ir-save, .add-load-btn) {
    box-sizing: border-box !important; height: var(--ui-h) !important; min-height: var(--ui-h) !important; max-height: var(--ui-h) !important;
    padding: 0 12px !important; border-radius: var(--ui-r) !important; font-family: inherit; font-size: 12.5px !important; font-weight: 600 !important; line-height: 1 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center; gap: 5px !important; white-space: nowrap;
    background: var(--ui-bg) !important; color: var(--ui-tx) !important; border: 1px solid var(--ui-line) !important; box-shadow: var(--ui-sh) !important;
    transform: none !important; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .status-filter-actions > button, .ir-save, .add-load-btn) .ic { font-size: 14px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .status-filter-actions > button):not(:disabled):hover { background: var(--ui-hover) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .status-filter-actions > button):not(:disabled):active { background: var(--ui-press) !important; box-shadow: none !important; }
/* primary: filled with the accent */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.btn:not(.btn-outline):not(.btn-danger):not(.btn-signout-yes):not(.icon-btn), .ir-save, .add-load-btn) { background: var(--ui-pri) !important; border-color: var(--ui-pri) !important; color: #FFFFFF !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn:not(.btn-outline):not(.btn-danger):not(.btn-signout-yes):not(.icon-btn), .ir-save, .add-load-btn):not(:disabled):hover { background: var(--ui-pri-h) !important; border-color: var(--ui-pri-h) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn:not(.btn-outline):not(.btn-danger):not(.btn-signout-yes):not(.icon-btn), .ir-save, .add-load-btn):not(:disabled):active { background: var(--ui-pri-a) !important; border-color: var(--ui-pri-a) !important; }
/* delete actions: same surface, red label */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .btn.btn-danger { color: var(--ui-dan) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .btn.btn-danger .ic { color: var(--ui-dan) !important; }
/* confirming a dangerous action (sign out, delete permanently): filled red, as before */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .btn.btn-signout-yes { background: var(--ui-dan) !important; border-color: var(--ui-dan) !important; color: #FFFFFF !important; }
html[data-theme="dark"]:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .btn.btn-signout-yes { background: #C42B2B !important; border-color: #C42B2B !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .btn.btn-signout-yes:not(:disabled):hover { filter: brightness(.94); }

/* ---- Icon buttons: square, same height ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.icon-btn, .dock-theme, .tb-rm) {
    box-sizing: border-box !important; width: var(--ui-h) !important; height: var(--ui-h) !important; min-width: var(--ui-h) !important; min-height: var(--ui-h) !important; padding: 0 !important;
    border-radius: var(--ui-r) !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    background: var(--ui-bg) !important; color: var(--ui-mut) !important; border: 1px solid var(--ui-line) !important; box-shadow: var(--ui-sh) !important; transform: none !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.icon-btn, .dock-theme, .tb-rm) .ic { font-size: 16px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.icon-btn, .dock-theme, .tb-rm):not(:disabled):hover { background: var(--ui-hover) !important; color: var(--ui-tx) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.icon-btn, .dock-theme, .tb-rm):not(:disabled):active { background: var(--ui-press) !important; box-shadow: none !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .dock-user-btn { height: var(--ui-h) !important; min-height: var(--ui-h) !important; border-radius: var(--ui-r) !important; }

/* ---- Fields and dropdowns: inset surface, same height ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(input.form-control:not(.dtf-src):not(.ih-no):not([type=checkbox]):not([type=radio]), select.form-control, .ss-selected, .dock-team-select, .card-status-select, .date-range-filter) {
    box-sizing: border-box !important; height: var(--ui-h) !important; min-height: var(--ui-h) !important; max-height: var(--ui-h) !important; border-radius: var(--ui-r) !important;
    border: 1px solid var(--ui-line) !important; box-shadow: var(--ui-sh) !important; font-size: 13px !important; line-height: normal; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(input.form-control:not(.dtf-src):not(.ih-no):not([type=checkbox]):not([type=radio]), select.form-control, .ss-selected, .dock-team-select, .date-range-filter) {
    background-color: var(--ui-bg) !important; color: var(--ui-tx) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .card-status-select { font-size: 12px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body textarea.form-control {
    border-radius: var(--ui-r) !important; border: 1px solid var(--ui-line) !important; box-shadow: var(--ui-sh) !important; background-color: var(--ui-bg) !important; color: var(--ui-tx) !important; }
/* fields inside a composite field (date range): the outer box is the field */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .date-range-filter :is(input.dtf-in, input.form-control) { height: calc(var(--ui-h) - 2px) !important; min-height: 0 !important; max-height: none !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(input.form-control, select.form-control, .ss-selected, textarea.form-control, .dock-team-select, .card-status-select):not(:disabled):hover { border-color: var(--border-hover) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(input.form-control, select.form-control, textarea.form-control, .ss-selected, .dock-team-select, .card-status-select):focus,
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.ss-selected:focus-within, .date-range-filter:focus-within) { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--ui-ring) !important; outline: none !important; }

/* ---- Segmented controls: a track with a raised selected item ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.view-toggle, .alx-seg, .db-tabs) {
    box-sizing: border-box !important; height: var(--ui-h) !important; min-height: var(--ui-h) !important; display: inline-flex !important; align-items: stretch !important; gap: 2px !important;
    padding: 2px !important; border-radius: var(--ui-r) !important; background: var(--ui-track) !important; border: 1px solid var(--ui-line) !important; box-shadow: none !important; width: auto; max-width: 100%; }
html[data-theme="dark"]:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.view-toggle, .alx-seg, .db-tabs) { border-color: transparent !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.view-toggle-btn, .alx-seg > button, .db-tab-btn) {
    box-sizing: border-box !important; height: auto !important; min-height: 0 !important; padding: 0 11px !important; margin: 0 !important; border-radius: var(--ui-r) !important; border: 0 !important;
    background: transparent !important; color: var(--ui-mut) !important; box-shadow: none !important; font-size: 12.5px !important; font-weight: 600 !important; line-height: 1 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center; gap: 6px; white-space: nowrap; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.view-toggle-btn, .alx-seg > button, .db-tab-btn):hover { color: var(--ui-tx) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.view-toggle-btn.active, .alx-seg > button[aria-checked="true"], .db-tab-btn.active) {
    background: var(--ui-thumb) !important; color: var(--ui-tx) !important; box-shadow: var(--ui-sh) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .db-tab-btn::after, html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .db-tab-btn.active::after { display: none !important; }

html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.view-toggle, .alx-seg, .db-tabs) { flex-wrap: nowrap !important; overflow: hidden; }
@media (max-width: 480px) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .db-tabs { display: flex !important; width: 100% !important; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .db-tabs > .db-tab-btn { flex: 1 1 auto; min-width: 0; padding: 0 6px !important; gap: 4px !important; font-size: 12px !important; }
}
/* ---- Top bar navigation: same height and corners ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .dock .dock-tab { height: var(--ui-h) !important; min-height: var(--ui-h) !important; border-radius: var(--ui-r) !important; }

/* ---- Switches: 30 × 18, the same everywhere ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-switch, .alx-sw input, .tb .tb-sw input) {
    box-sizing: border-box !important; width: 30px !important; height: 18px !important; min-width: 30px; border-radius: 9px !important; border: 0 !important; background: var(--ui-sw-off) !important;
    position: relative; flex-shrink: 0; margin: 0 !important; transition: background-color .2s !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-switch, .alx-sw input, .tb .tb-sw input)::before { display: none !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-switch, .alx-sw input, .tb .tb-sw input)::after {
    content: "" !important; position: absolute !important; left: 2px !important; top: 2px !important; width: 14px !important; height: 14px !important; border-radius: 50% !important;
    background: #FFFFFF !important; box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.25) !important; transform: none !important; transition: transform .2s ease !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-toggle input:checked + .wc-switch, .tb .tb-sw input:checked) { background: var(--ui-pri) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .alx-sw input:checked { background: var(--success) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-toggle input:checked + .wc-switch, .alx-sw input:checked, .tb .tb-sw input:checked)::after { transform: translateX(12px) !important; width: 14px !important; height: 14px !important; top: 2px !important; left: 2px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.wc-toggle input:disabled + .wc-switch, .alx-sw input:disabled) { opacity: .45; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.wc-toggle input:focus-visible + .wc-switch, .alx-sw input:focus-visible) { box-shadow: 0 0 0 3px var(--ui-ring) !important; }
/* a switch with its label is one 30px control */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.wc-toggle, .alx-sw) { min-height: var(--ui-h) !important; height: auto; display: inline-flex !important; align-items: center !important; gap: 8px; border-radius: var(--ui-r) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body .toolbar .wc-toggle { height: var(--ui-h) !important; padding: 0 10px !important; background: var(--ui-bg) !important; border: 1px solid var(--ui-line) !important; box-shadow: var(--ui-sh) !important; font-size: 12.5px !important; font-weight: 600 !important; color: var(--ui-tx) !important; }

/* ---- Checkboxes (16px, 5px corners) and radio buttons (16px circles) ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=checkbox]:not([role=switch]):not(.wc-toggle input):not(.alx-sw input):not(.tb-sw input):not(.alx-sr):not(.sr-only),
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=radio]:not(.sr-only) {
    -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box !important; width: 16px !important; height: 16px !important; min-width: 16px; margin: 0 !important; flex-shrink: 0;
    border: 1.5px solid var(--ui-box) !important; background: var(--ui-bg) no-repeat center / 12px 12px !important; cursor: pointer; vertical-align: middle; display: inline-block; transition: background-color .15s, border-color .15s; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=checkbox]:not([role=switch]):not(.wc-toggle input):not(.alx-sw input):not(.tb-sw input):not(.alx-sr):not(.sr-only) { border-radius: 5px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=checkbox]:not([role=switch]):not(.wc-toggle input):not(.alx-sw input):not(.tb-sw input):not(.alx-sr):not(.sr-only):checked {
    background-color: var(--ui-pri) !important; border-color: var(--ui-pri) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=checkbox]:not([role=switch]):not(.wc-toggle input):not(.alx-sw input):not(.tb-sw input):not(.alx-sr):not(.sr-only):indeterminate {
    background-color: var(--ui-pri) !important; border-color: var(--ui-pri) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='white' x='6' y='11' width='12' height='2.4' rx='1.2'/%3E%3C/svg%3E") !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=radio]:not(.sr-only) { border-radius: 50% !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body input[type=radio]:not(.sr-only):checked { border-color: var(--ui-pri) !important; background: radial-gradient(circle, var(--ui-pri) 0 3.6px, var(--ui-bg) 4.2px) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(input[type=checkbox], input[type=radio]):disabled { opacity: .45; cursor: not-allowed; }

/* ---- Same focus ring and disabled look for every control ---- */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .icon-btn, .dock-theme, .tb-rm, .view-toggle-btn, .alx-seg > button, .db-tab-btn, .dock-tab, .status-filter-actions > button, input[type=checkbox], input[type=radio]):focus-visible {
    outline: none !important; box-shadow: 0 0 0 3px var(--ui-ring) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .icon-btn, .dock-theme, .tb-rm, .view-toggle-btn, .alx-seg > button, .db-tab-btn, input.form-control, select.form-control, textarea.form-control):disabled { opacity: .45 !important; cursor: not-allowed !important; box-shadow: none !important; }

/* ---- Touchscreens: the same 30px look, with a larger invisible tap area ---- */
@media (pointer: coarse) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .dock-theme, .tb-rm, .view-toggle-btn, .alx-seg > button, .db-tab-btn, .icon-btn:not(.tb-x), .status-filter-actions > button) { position: relative; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .dock-theme, .tb-rm, .view-toggle-btn, .alx-seg > button, .db-tab-btn, .icon-btn, .status-filter-actions > button)::after { content: ""; position: absolute; left: 0; right: 0; top: -7px; bottom: -7px; }
}
/* View Load: the status keeps its place right before the (now 30px) Close button */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8) body #viewModalOverlay .st1v .st-tt { padding-right: 54px !important; }

/* buttons and controls that the page hides stay hidden (the control style must never show them) */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9):not(#y10) body :is(.btn, .up-btn, .tb-add, .back-btn, .dsx-notes, .dsx-toggle, .status-filter-actions > button, .ir-save, .add-load-btn, .icon-btn, .dock-theme, .tb-rm, .dock-user-btn, .view-toggle, .alx-seg, .db-tabs, .view-toggle-btn, .alx-seg > button, .db-tab-btn, .t12-ap, .t12-ap > button, .wc-toggle, .alx-sw, .date-range-filter, .fav-star):is([hidden], [style*="display: none"], [style*="display:none"]) { display: none !important; }

/* segmented controls (team, AM / PM, Cards / List, Database record types):
   every item is a full 30px control, like the fields and buttons beside it; the selected one is the raised surface */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.view-toggle, .alx-seg, .db-tabs, .t12-ap) {
    box-sizing: border-box !important; height: var(--ui-h) !important; min-height: var(--ui-h) !important; max-height: var(--ui-h) !important; display: inline-flex !important; align-items: stretch !important;
    gap: 0 !important; padding: 0 !important; border: 0 !important; border-radius: var(--ui-r) !important; background: var(--ui-track) !important; box-shadow: none !important; flex-wrap: nowrap !important; overflow: visible !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.view-toggle-btn, .alx-seg > button, .db-tab-btn, .t12-ap > button) {
    box-sizing: border-box !important; height: var(--ui-h) !important; min-height: var(--ui-h) !important; max-height: var(--ui-h) !important; margin: 0 !important; padding: 0 11px !important;
    border: 1px solid transparent !important; border-radius: var(--ui-r) !important; background: transparent !important; box-shadow: none !important; color: var(--ui-mut) !important;
    font-size: 12.5px !important; font-weight: 600 !important; line-height: 1 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px; white-space: nowrap; flex: 0 0 auto; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.view-toggle-btn, .alx-seg > button, .db-tab-btn, .t12-ap > button):hover { color: var(--ui-tx) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9):not(#y10) body :is(.view-toggle-btn.active, .alx-seg > button[aria-checked="true"], .db-tab-btn.active, .t12-ap > button[aria-checked="true"]) {
    background: var(--ui-thumb) !important; border-color: var(--ui-line) !important; color: var(--ui-tx) !important; box-shadow: var(--ui-sh) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9):not(#y10) body :is(.view-toggle-btn, .alx-seg > button, .db-tab-btn, .t12-ap > button):focus-visible { box-shadow: 0 0 0 3px var(--ui-ring) !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .t12-ap > button { padding: 0 8px !important; flex: 1 1 0 !important; min-width: 0; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .t12-ap { align-self: center; }
@media (max-width: 480px) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .db-tabs { display: flex !important; width: 100% !important; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .db-tabs > .db-tab-btn { flex: 1 1 auto !important; min-width: 0; padding: 0 6px !important; gap: 4px !important; font-size: 12px !important; }
}

/* Users: no Password column — the other columns share the width; the switch, Edit and Delete always stay on one line */
table.users-table col.uc-name { width: 19%; } table.users-table col.uc-login { width: 9%; } table.users-table col.uc-roles { width: 17%; }
table.users-table col.uc-teams { width: 21%; } table.users-table col.uc-st { width: 7%; } table.users-table col.uc-act { width: 27%; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(table.users-table, table.tm-table) .row-actions { display: inline-flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-end; gap: 8px !important; white-space: nowrap !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(table.users-table, table.tm-table) .row-actions > * { flex: 0 0 auto; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.u-en, .t-en) { height: var(--ui-h) !important; padding: 0 2px 0 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; gap: 7px !important; font-size: 12.5px !important; font-weight: 600 !important; color: var(--ui-tx) !important; cursor: pointer; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.u-en, .t-en) .db-en-t { min-width: 58px; text-align: left; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(.u-en, .t-en):has(input:not(:checked)) .db-en-t { color: var(--ui-mut) !important; }
/* phones / small tablets (Users shows cards there): the three controls stay together on one row */
@media (max-width: 1180px) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body table.users-table td.u-act .row-actions { display: flex !important; justify-content: flex-start !important; flex-wrap: nowrap !important; }
}

/* Database, Users and Teams tables: exactly 9px corners; heading and rows are clipped inside them (sticky headings still work) */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(#dbTableContainer, #usersTableContainer, #teamsTableContainer) > .table-responsive {
    border-radius: 9px !important; overflow: clip !important; overflow-clip-margin: 0; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(#dbTableContainer, #usersTableContainer, #teamsTableContainer) > .table-responsive > table { border-radius: 9px !important; }

/* favorite stars: one size everywhere (18px star in a 24px button), on/off look unchanged */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .fav-star { box-sizing: border-box; width: 24px !important; height: 24px !important; min-width: 24px !important; min-height: 24px !important; max-width: 24px; max-height: 24px; border-radius: 9px !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .fav-star .ic { font-size: 16px !important; width: 18px !important; height: 18px !important; }
@media (pointer: coarse) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .fav-star:not(.card-fav) { position: relative; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .fav-star::after { content: ""; position: absolute; inset: -6px; }
}
/* invisible helper inputs that sit over a custom look (date fields, ASAP, switches, the team field) stay invisible —
   also when locked for a role (the disabled look must never reveal them) */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9):not(#y10):not(#y11) body .tb-asap > input {
    -webkit-appearance: auto !important; appearance: auto !important; position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-width: 0 !important;
    margin: 0 !important; opacity: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9):not(#y10):not(#y11) body :is(input.dtf-src, #loadTeam, .wc-toggle > input, .searchable-select > input:not(.ss-search)) { opacity: 0 !important; }
/* Users: the table uses the full page width, so every row (roles, team access, actions) fits on one line */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body :is(#usersView .users-search-row, #usersTableContainer) { max-width: none !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body table.users-table td.user-roles { white-space: normal !important; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body table.users-table .role-chip { white-space: nowrap; }
/* Active Loads by Status: the Notes button always sits in the panel's top-right corner;
   in a narrow panel (tablet portrait, phones) it shows just the icon and the count (its full name stays in the tooltip) */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head { flex-wrap: nowrap !important; min-width: 0; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > .total-pill { flex: none; }
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > #notesBtn { margin-left: auto !important; flex: none; }
@container (max-width: 459px) {
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > #notesBtn { font-size: 0 !important; gap: 6px !important; padding: 0 6px 0 9px !important; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > #notesBtn .ic { font-size: 15px !important; }
    html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .dsx-head > #notesBtn .dsx-notes-n { font-size: 11.5px !important; }
}
/* ---- hidden by the page = hidden: every rule that hides a restyled control, repeated with more weight ---- */
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body.single-team #activeWholeToggle{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-createuser) #addUserBtn{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body.no-teams #addLoadBtn{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-db) li:has(#navDatabase),
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-stats) li:has(#navStats){display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-edit) #loadsView .header-actions .btn:not(#themeToggleBtn):not(#notesBtn){display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-teams) #navTeams,
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-users) #navUsers,
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-db) #navDatabase,
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-stats) #navStats,
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body:not(.cap-edit) #addLoadBtn{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) .tb-add[style*="none"]{display:none !important;}
@media screen and (max-width: 560px){html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) #viewModalOverlay .modal-footer .btn[style*="display:none"]{display:none !important;}}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) .dsx-notes[hidden]{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body.single-team .dock-team-select{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) body .tb-add:not(#_)[style*="none"]{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) #stCancelBtn[hidden]{display:none !important;}
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) .st1.st-add #copyInfoBtn,
html:not(#yh1):not(#yh2):not(#yh3):not(#yh4):not(#yh5):not(#yh6):not(#yh7):not(#yh8):not(#yh9):not(#yh10):not(#yh11) .st1.st-add #btnDeletePerm{display:none !important;}
/* ---- CRM dropdown menu (Inset Surface) ---- */
@media (pointer: coarse) { select:not([multiple]) { pointer-events: none !important; } }
.cs-menu { position: fixed; z-index: 2147483000; display: none; box-sizing: border-box; margin: 0; padding: 4px; inset: auto;
    overflow-y: auto; overscroll-behavior: contain; background: var(--bg-card); color: var(--ui-tx);
    border: 1px solid var(--ui-line); border-radius: 9px; box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    font-family: var(--font, 'Manrope'), sans-serif; font-size: 13px; font-weight: 500; line-height: 1.2; }
:root[data-theme="dark"] .cs-menu { background: #2A2C30; border-color: #45484D; box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.7); }
.cs-menu.cs-open { display: block; }
.cs-menu[popover] { inset: auto; }
.cs-opt { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px; border-radius: 9px; cursor: pointer; white-space: nowrap; color: var(--ui-tx); }
.cs-opt .cs-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cs-opt.cs-act { background: var(--ui-hover); }
:root[data-theme="dark"] .cs-opt.cs-act { background: #3D4045; }
.cs-opt.cs-on { color: var(--primary); font-weight: 600; }
.cs-opt .cs-ck { width: 16px; height: 16px; flex: none; fill: currentColor; opacity: 0; }
.cs-opt.cs-on .cs-ck { opacity: 1; }
.cs-opt.cs-dis { opacity: .45; cursor: default; }
.cs-grp { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--ui-mut); }
.cs-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
select.cs-expanded { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--ui-ring) !important; }
@media (pointer: coarse) { .cs-opt { min-height: 40px; } }
/* searchable dropdowns and the calendar in the top layer */
html:not(#y1):not(#y2):not(#y3):not(#y4):not(#y5):not(#y6):not(#y7):not(#y8):not(#y9) body .ss-dropdown.ss-float { position: fixed !important; right: auto !important; bottom: auto !important; margin: 0 !important; z-index: 2147482000 !important; }
.ss-dropdown[popover], .dtf-cal[popover] { margin: 0; color: inherit; border: 0; width: auto; height: auto; }
.dtf-cal[popover] { overflow: visible; width: 296px; }
.dtf-cal.dtf-sheet[popover] { width: auto; }
.dtf-cal[popover] { right: auto; bottom: auto; inset-inline-end: auto; }
@media (max-width: 639px) { .dtf-cal.dtf-sheet[popover] { left: 0; right: 0; bottom: 0; top: auto; } }
