/* Shared form-control dimensions for the workspace. */
:root {
    --crm-control-height: 26px;
    --crm-control-border-width: 1px;
    /* Controls share the application outline (owner, 2026-11-26: "dark like the tabs and sections"; was navy #1e3a8a). */
    /* Buttons and text boxes / dropdowns: a step darker than the shared outline (owner, 2026-11-26). Night value in
       dark-theme-overrides.css. */
    --crm-control-border-color: #475569;
    --crm-control-radius: 8px;
    /* Smaller nested chips need a reduced radius to follow the outer contour. */
    --crm-control-chip-radius: max(0px, calc(var(--crm-control-radius) - 4px));
    --crm-control-font-size: 12px;
}

/* Keep floating picker panels and controls outside the workspace (Select2 and custom address / phone pickers)
   on the same border width as the fields they belong to. */
:root .quick-entity-body :is(input:not([type="hidden"]), select),
:root .party-modal .inventory-field > :is(input, select),
:root .select2-dropdown,
:root .select2-search--dropdown .select2-search__field,
:root .phone-country-menu,
:root .phone-country-search,
:root .challan-address-options,
:root .challan-address-options .picker-search input {
    border-width: var(--crm-control-border-width) !important;
}

/* :not(.designer-section-name) - the Form Designer's section-rename chip (Designer.cshtml /
   form-designer.js) is deliberately NOT a standard-looking input: it's morphed between a small
   pill and a full-width box entirely via a WAAPI border-radius/scale animation (see
   customizations.css / form-designer.js's startRename/commitRename). !important always beats an
   animation's own keyframe values in the cascade, no matter how the animation was created - with
   border-radius forced here, that chip's shape was silently frozen at 12px for the animation's
   entire duration, which is what actually read as the transition "not stretching" and looking
   choppy, not the border-radius/keyframe mismatch an earlier pass (wrongly) chased instead. */
:root .crm-workspace :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not(.designer-section-name)),
:root .crm-workspace select,
:root .crm-workspace .form-control:not(textarea),
:root .crm-workspace .select2-container--default .select2-selection--single {
    box-sizing: border-box;
    height: var(--crm-control-height) !important;
    min-height: var(--crm-control-height) !important;
    border-width: var(--crm-control-border-width) !important;
    border-style: solid !important;
    border-color: var(--crm-control-border-color) !important;
    border-radius: var(--crm-control-radius) !important;
    font-size: var(--crm-control-font-size) !important;
}

:root .crm-workspace textarea,
:root .crm-workspace textarea.form-control {
    box-sizing: border-box;
    border-width: var(--crm-control-border-width) !important;
    border-style: solid !important;
    border-color: var(--crm-control-border-color) !important;
    border-radius: var(--crm-control-radius) !important;
    font-size: var(--crm-control-font-size) !important;
}

:root .crm-workspace input::placeholder,
:root .crm-workspace textarea::placeholder,
:root .crm-workspace select,
:root .crm-workspace .select2-selection__rendered,
:root .crm-workspace .select2-selection__placeholder {
    font-size: var(--crm-control-font-size) !important;
}

/* Compound controls own the visible border; their inner inputs stay seamless. Date & Time's
   calendar+wheel-time pair, a standalone Time Only field, and now a standalone Date Only field too
   (all three are custom-field-calendar.js/wheel-time-picker.js triggers) are exactly this same
   shape - one shared outer border around one or two borderless inner triggers - so they join this
   list rather than keeping their own hand-matched copy of these dimensions, which is what let them
   drift from the plain Date Only <input> control in the first place. */
:root .crm-workspace .money-input,
:root .crm-workspace .contact-page-phone,
:root .crm-workspace .address-phone-group,
:root .crm-workspace .input-group,
:root .crm-workspace .custom-field-datetime,
:root .crm-workspace .custom-field-calendar-only,
:root .crm-workspace .wheel-time {
    box-sizing: border-box;
    height: var(--crm-control-height) !important;
    min-height: var(--crm-control-height) !important;
    border-width: var(--crm-control-border-width) !important;
    border-style: solid !important;
    border-color: var(--crm-control-border-color) !important;
    border-radius: var(--crm-control-radius) !important;
    font-size: var(--crm-control-font-size) !important;
}

/* The wheel-time half nested inside Date & Time doesn't get its own border - the outer
   .custom-field-datetime above already owns one border for both halves - just a divider line
   where the two meet, added back after the seamless rule below strips it like any other inner
   piece. */
:root .crm-workspace .custom-field-datetime .wheel-time {
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

:root .crm-workspace .money-input > input,
:root .crm-workspace .contact-page-phone > input,
:root .crm-workspace .address-phone-group > input,
:root .crm-workspace .input-group > input,
:root .crm-workspace .input-group > select,
:root .crm-workspace .input-group .select2-selection--single,
:root .crm-workspace .custom-field-datetime-date-trigger,
:root .crm-workspace .wheel-time > .wheel-time-trigger {
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: calc(var(--crm-control-radius) - var(--crm-control-border-width)) !important;
    background-color: transparent;
    font-size: var(--crm-control-font-size) !important;
    box-shadow: none !important;
}

/* Where the calendar half hands off to the wheel-time half inside one merged Date & Time control -
   a divider, not a second border, since the outer .custom-field-datetime above is the one visible
   border for both halves together. */
:root .crm-workspace .custom-field-datetime .wheel-time-trigger {
    border-left: var(--crm-control-border-width) solid var(--crm-control-border-color) !important;
}

/* The seamless-inner rule above rounds all four corners of each half, which looked fine while they
   were flush against the outer border on every side - now that two halves sit side by side, their
   touching inner corners round off into a little bump right at the seam. Only the two outer corners
   of each half (the ones that actually meet the shared border) should be rounded; the two corners
   at the seam stay square. Scoped to .custom-field-datetime specifically - Date Only's own
   standalone calendar (.custom-field-calendar-only) uses this exact same trigger class with no
   sibling to hand off to, and needs every corner rounded, same as the seamless-inner rule alone
   already gives it. */
:root .crm-workspace .custom-field-datetime .custom-field-datetime-date-trigger {
    border-radius: calc(var(--crm-control-radius) - var(--crm-control-border-width)) 0 0 calc(var(--crm-control-radius) - var(--crm-control-border-width)) !important;
}
:root .crm-workspace .custom-field-datetime .wheel-time-trigger {
    border-radius: 0 calc(var(--crm-control-radius) - var(--crm-control-border-width)) calc(var(--crm-control-radius) - var(--crm-control-border-width)) 0 !important;
}

:root .crm-workspace .select2-selection--single .select2-selection__rendered,
:root .crm-workspace .select2-selection--single .select2-selection__arrow {
    height: calc(var(--crm-control-height) - (2 * var(--crm-control-border-width))) !important;
    line-height: calc(var(--crm-control-height) - (2 * var(--crm-control-border-width))) !important;
}

:root .crm-workspace .select2-container {
    min-height: var(--crm-control-height);
    font-size: var(--crm-control-font-size) !important;
}

:root .crm-workspace .select2-selection--single .select2-selection__rendered {
    padding-right: 38px !important;
    padding-left: 13px !important;
}

/* Currency and amount fields share the same full-height outer control. */
:root .crm-workspace .money-input {
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

:root .crm-workspace .money-input > span {
    display: grid;
    width: 40px;
    height: 100%;
    flex: 0 0 40px;
    place-items: center;
    border-right: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: var(--crm-control-font-size) !important;
    line-height: 1;
}

:root .crm-workspace .money-input > input {
    padding: 0 13px !important;
}

/* Phone fields use one outer border and a full-height prefix segment. */
:root .crm-workspace .address-country-prefix {
    top: 0;
    bottom: 0;
    height: 100%;
    align-items: center;
    border-radius: calc(var(--crm-control-radius) - var(--crm-control-border-width)) 0 0 calc(var(--crm-control-radius) - var(--crm-control-border-width));
    font-size: var(--crm-control-font-size) !important;
}

:root .crm-workspace .address-country-prefix::after {
    top: 7px;
    bottom: 7px;
}

:root .crm-workspace .inventory-field .contact-page-phone > input,
:root .crm-workspace .party-modal .inventory-field .address-phone-group > input,
:root .crm-workspace .inventory-field .address-phone-group > input {
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: calc(var(--crm-control-radius) - var(--crm-control-border-width)) !important;
    background: transparent !important;
    font-size: var(--crm-control-font-size) !important;
    box-shadow: none !important;
}

:root .crm-workspace .inventory-field .contact-page-phone > input:focus,
:root .crm-workspace .party-modal .inventory-field .address-phone-group > input:focus,
:root .crm-workspace .inventory-field .address-phone-group > input:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Inline bill/order rows use the same control height and typography. */
:root .crm-workspace .bill-line input,
:root .crm-workspace .bill-line select,
:root .crm-workspace .bill-line .select2-selection--single {
    height: var(--crm-control-height) !important;
    min-height: var(--crm-control-height) !important;
    border-width: var(--crm-control-border-width) !important;
    border-radius: var(--crm-control-radius) !important;
    font-size: var(--crm-control-font-size) !important;
}

/* Retain the established focus and validation colours. */
:root .crm-workspace :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"])):focus,
:root .crm-workspace select:focus,
:root .crm-workspace textarea:focus,
:root .crm-workspace .form-control:focus,
:root .crm-workspace .select2-container--focus .select2-selection--single,
:root .crm-workspace .select2-container--open .select2-selection--single {
    outline: none;
    border-color: #8adfff !important;
}

/* One inset corner treatment for all selectable and typeable chips. */
:root .crm-workspace .select2-selection--multiple .select2-selection__choice,
:root .crm-workspace .purchase-serial-chip,
:root .crm-workspace .serial-number-chip {
    border-radius: var(--crm-control-chip-radius) !important;
    overflow: hidden;
}

/* "Filter by related records" switch under a filtered lookup on a record form (form-lookup-filters.js). */
.lookup-related-toggle, .inventory-field label.lookup-related-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: #475569; font-size: 10.5px !important; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; user-select: none; }
.lookup-related-toggle input { width: 13px; height: 13px; margin: 0; accent-color: #1e3a8a; cursor: pointer; }

/* "+ Add New" footer inside every lookup's dropdown (lookup-record-links.js) - MSD365 style. The dropdown is a
   column: the results list scrolls, the footer stays pinned below it however long the list is. */
.select2-dropdown:has(> .lookup-dropdown-footer) { display: flex; flex-direction: column; }
.select2-dropdown:has(> .lookup-dropdown-footer) > .select2-results { flex: 1 1 auto; min-height: 0; }
.select2-dropdown .lookup-dropdown-footer { position: sticky; bottom: 0; z-index: 1; flex: 0 0 auto; display: flex; padding: 4px 6px; border-top: 1px solid var(--crm-footer-divider, #c3ccd8); background: #f8fafc; }
.select2-dropdown .lookup-dropdown-footer button { box-sizing: border-box; display: inline-flex; align-items: center; gap: 7px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #1e3a8a; font: inherit; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; transition: background-color .15s ease; }
/* No size change on hover/press (the app-wide button shrink made this full-width row flicker). */
.select2-dropdown .lookup-dropdown-footer button:hover,
.select2-dropdown .lookup-dropdown-footer button:active,
.select2-dropdown .lookup-dropdown-footer button:focus-visible { transform: none !important; scale: 1 !important; background: #eaf8ff; color: #1e3a8a; outline: none; }
.select2-dropdown .lookup-dropdown-footer button i { font-size: 11px; }

/* ---- Glossy 3D selection bar - one look for every picker's highlight --------------------------------------
   Lookups, Multi Select Lookups, Choice, Multi Choice (Select2 lists), the Date calendar, the Time wheel
   (Time / Date & Time) and the lookup "+ Add New" footer. Built from the sidebar's active-item cyan gloss:
   a split-tone gradient (glass sheen on the top half), a white top edge, a darker bottom edge and a
   soft drop shadow so the bar looks raised. Hover/keyboard highlight is a lighter tint of the same bar. */
:root {
    /* Selected: the theme's dark navy (header bars), glossy - glass sheen on the top half, a light top edge,
       a cyan (#79d4ff) underline like the headers, and a drop shadow so it sits raised. */
    /* Exactly the section title bar's navy (#132c68 -> #0d1e4d), with a faint glass sheen layered on top. */
    --crm-gloss-selected: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 48%, rgba(255,255,255,0) 52%), linear-gradient(180deg, #132c68, #0d1e4d);
    --crm-gloss-selected-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(121,212,255,.6), 0 1px 3px rgba(7,19,43,.28);
    --crm-gloss-selected-text: #d8f4ff; /* the section titles' text colour */
    --crm-gloss-hover: linear-gradient(180deg, #f7fdff 0%, #e6f7ff 48%, #d4f1ff 52%, #e3f6ff 100%);
    --crm-gloss-hover-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(30,58,138,.1), 0 1px 2px rgba(30,58,138,.1);
    --crm-gloss-text: #0b2256;
}

/* Select2 lists: Lookup, Multi Select Lookup, Choice, Multi Choice (and every other Select2 dropdown). */
/* Sleek, compact rows: a slim bar inset from the dropdown edges. */
.select2-container--default .select2-results__option { margin: 1px 4px; padding: 6px 11px; border-radius: 7px; font-size: 13px; line-height: 1.35; transition: background-color .12s ease, box-shadow .12s ease; }
.select2-container--default .select2-results__options { padding: 3px 0; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--crm-gloss-hover); box-shadow: var(--crm-gloss-hover-shadow); color: var(--crm-gloss-text); font-weight: 600;
}
.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option--selected.select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--crm-gloss-selected); box-shadow: var(--crm-gloss-selected-shadow); color: var(--crm-gloss-selected-text); font-weight: 700;
    text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

/* Date calendar (days, months, years). */
.calendar-day:is(:hover,:focus-visible):not(.calendar-day--selected) { background: var(--crm-gloss-hover); box-shadow: var(--crm-gloss-hover-shadow); color: var(--crm-gloss-text); }
.calendar-day--today:is(:hover,:focus-visible):not(.calendar-day--selected) { box-shadow: inset 0 0 0 2px #1e3a8a, var(--crm-gloss-hover-shadow); }
.calendar-day--selected, .calendar-day--selected:hover {
    background: var(--crm-gloss-selected) !important; box-shadow: var(--crm-gloss-selected-shadow) !important; color: var(--crm-gloss-selected-text) !important;
    font-weight: 800; text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

/* Time wheel: the centre selection band. */
.wheel-time-highlight { left: 6px !important; right: 6px !important; background: var(--crm-gloss-selected) !important; box-shadow: var(--crm-gloss-selected-shadow); border-radius: 6px !important; }
.wheel-col li.is-centered { color: var(--crm-gloss-selected-text); text-shadow: 0 1px 1px rgba(0,0,0,.35); }

/* Lookup "+ Add New" footer button. */
.select2-dropdown .lookup-dropdown-footer button:hover,
.select2-dropdown .lookup-dropdown-footer button:active,
.select2-dropdown .lookup-dropdown-footer button:focus-visible { background: var(--crm-gloss-hover) !important; box-shadow: var(--crm-gloss-hover-shadow); color: var(--crm-gloss-text) !important; }

/* ---- Calculated / Rollup field on a record form (_FieldTile.cshtml) ------------------------------------------
   The standard read-only input, with a lock (system-set value) and, for a Rollup, a Recalculate button inside it. */
.crm-workspace .computed-field { position: relative; }
.crm-workspace .computed-field > input { width: 100%; box-sizing: border-box; padding-right: 38px; cursor: default; }
.crm-workspace .computed-field--rollup > input { padding-right: 64px; }
.crm-workspace .computed-field__icons { position: absolute; top: 50%; right: 12px; display: inline-flex; align-items: center; gap: 8px; transform: translateY(-50%); color: #475569; font-size: 11px; }
.crm-workspace .computed-field__icons button { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #1e3a8a; font-size: 11px; cursor: pointer; transform: none !important; }
.crm-workspace .computed-field__icons button:hover { background: #e6eefb; }
.crm-workspace .computed-field__icons button.is-busy i { animation: computed-spin .8s linear infinite; }
@keyframes computed-spin { to { transform: rotate(360deg); } }

/* Native dropdowns before Select2 takes over (owner, 2026-10-20). Select2 is applied by script after the page has
   painted; until then the native <select> showed - and Chrome on Windows / Safari ignore border-radius on a native
   select, so every form's dropdowns flashed as square boxes and then turned rounded. With the native look removed
   (appearance: none), the select already has the shared control radius (rules above) and Select2's grey
   chevron, so nothing changes shape when Select2 replaces it. Multi-selects keep the control height instead of
   flashing as a tall list. Once enhanced, the select is hidden (.select2-hidden-accessible) and these rules no longer
   apply; selects that stay native keep the same look. */
:root .crm-workspace select:not([multiple]):not(.select2-hidden-accessible) {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 10px 6px;
}
:root .crm-workspace select[multiple]:not(.select2-hidden-accessible) {
    height: var(--crm-control-height) !important;
    min-height: var(--crm-control-height) !important;
    overflow: hidden;
}

/* Compact section-header controls fit the shared 32px section bar. */
:root .crm-workspace .section-grid-search {height:24px;min-height:24px;border:1px solid var(--crm-control-border-color);border-radius:8px;background:#e9edf1;position:relative;}
:root .crm-workspace .section-grid-search i {position:absolute;left:10px;top:50%;transform:translateY(-50%);width:auto;height:auto;border:0;font-size:10px;color:#475569;}
:root .crm-workspace .section-grid-search input {height:100% !important;min-height:0 !important;border:0 !important;border-radius:0 !important;padding:0 8px 0 30px !important;background:transparent !important;font-size:11px !important;box-shadow:none !important;}
:root .crm-workspace .form-section-heading:has(.section-grid-search) {height:var(--crm-section-header-height);min-height:var(--crm-section-header-height);}
:root .crm-workspace .form-section-heading .section-add-button {height:26px !important;min-height:26px !important;width:var(--crm-action-width,132px) !important;min-width:var(--crm-action-width,132px) !important;padding:0 11px !important;border-radius:8px !important;font-size:11.5px !important;}

/* ---- Compact controls (owner, 2026-11-27) ---------------------------------------------------------------------------
   With the shorter control height: dropdown text and arrows centred in it, serial / tag chips fitting inside, the
   single-line notes and serial chips fit the shared field height. */
:root .crm-workspace :is(.purchase-serial-chip, .serial-number-chip, .select2-selection__choice) { min-height: 20px; }
:root .crm-workspace .purchase-serial-chips .purchase-serial-chips__input { height: 20px !important; min-height: 20px !important; }
/* Text inside compact controls (owner, 2026-11-27: "text slightly breaking in dropdowns", "Serial Number and Notes
   placeholder alignment"): a dropdown's chosen text fills the box height and sits on its centre line; a multi-select's
   inline search (which carries the "Serial Number" placeholder) uses the control font, a line height equal to its own
   height and the same 13px left inset as the chosen text, so placeholders and values line up with the boxes above and
   below them. */
:root .crm-workspace .select2-container--default .select2-selection--single .select2-selection__rendered { display: block; height: 100%; padding-top: 0 !important; padding-bottom: 0 !important; line-height: calc(var(--crm-control-height) - 2px) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .crm-workspace .select2-container--default .select2-selection--multiple { padding-left: 9px !important; }
:root .crm-workspace .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field { margin: 1px 0 0 4px !important; padding: 0 !important; font-family: inherit !important; font-size: var(--crm-control-font-size) !important; line-height: 20px !important; vertical-align: top; }
:root .crm-workspace .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder { line-height: 20px; }
/* A line's Notes box (bill / quotation rows) starts one control high with its text centred like the boxes above it; it
   can still be dragged taller. */
:root .crm-workspace textarea.line-product-notes-input { box-sizing: border-box; height: var(--crm-control-height); min-height: var(--crm-control-height); padding: 4px 13px !important; line-height: 16px; }
/* Serial chip boxes (Purchase Bill line, kit items, Opening Stock / Adjustment) are one control high with one line of
   chips (owner, 2026-11-27): 20px chips - the remove button too - and 2px box padding fit the 26px field, like a text box. */
:root .crm-workspace .purchase-serial-chips { min-height: var(--crm-control-height) !important; padding: 2px 10px !important; gap: 3px !important; }
:root .crm-workspace .purchase-serial-chip { box-sizing: border-box; min-height: 20px !important; height: 20px; }
:root .crm-workspace .purchase-serial-chip .purchase-serial-chip__remove { min-height: 20px !important; height: 20px; flex-basis: 22px !important; }
:root:root .crm-workspace .purchase-serial-chips .purchase-serial-chips__input { height: 20px !important; min-height: 20px !important; }

/* Compact workspace fields retain readable text and a full clickable switch label. */
:root .crm-workspace :is(.inventory-form-page, .item-form-page) .inventory-form-grid { gap: 6px 12px; }
:root .crm-workspace .inventory-field { gap: 3px; }
/* Compact toggles (owner, 2026-11-28: "the toggle button is touching the bottom border"). One exact geometry in whole
   pixels for workspace toggles and designer popups attached to the body - form / dialog switches (.inventory-switch), grid toggles
   (.party-grid-primary) and the party dialog Primary switch (.party-primary-switch): a 34 x 19 track with a 1px border
   and an 11px knob 3px from every inner edge (off: left 3px, on: left 18px; owner, 2026-11-28: "give slight space" - the
   13px knob 2px from the edge still looked like it touched it), with a soft 1px shadow. The earlier zoom (.72 / .8) of the 48 x 26
   switch rounded the border and offsets unevenly, and the grid toggle's knob sat 4px from the top of a 22px inner
   track, so knobs touched the bottom edge. */
:root :is(.crm-workspace, .designer-field-popover) :is(.inventory-switch > span, .party-primary-switch span, .party-grid-primary) {
    zoom: 1 !important; box-sizing: border-box !important;
    width: 34px !important; min-width: 34px !important; height: 19px !important; min-height: 19px !important; flex: 0 0 34px !important;
}
:root :is(.crm-workspace, .designer-field-popover) .inventory-switch > span::after,
:root .crm-workspace .party-primary-switch span::before,
:root .crm-workspace .party-grid-primary::before {
    top: 3px !important; left: 3px !important; width: 11px !important; height: 11px !important; transform: none !important;
    box-shadow: 0 1px 1.5px rgba(15,23,42,.25) !important;
}
:root :is(.crm-workspace, .designer-field-popover) .inventory-switch input:checked + span::after,
:root .crm-workspace .party-primary-switch input:checked + span::before,
:root .crm-workspace .party-grid-primary:checked::before {
    left: 18px !important;
}
:root .crm-workspace .select2-container--default .select2-selection--multiple {
    min-height: var(--crm-control-height) !important;
    padding-block: 1px !important;
}
:root .crm-workspace .select2-container--default .select2-selection--multiple .select2-selection__choice {
    height: 20px;
    min-height: 20px;
    line-height: 18px;
    margin-block: 1px !important;
}
:root .crm-workspace .select2-container--default .select2-selection--multiple .select2-search--inline { height: 20px !important; }
:root .crm-workspace .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 20px !important;
    margin-top: 1px !important;
}
/* A toggle's label is always a centred row - track, then caption - wherever it sits (owner, 2026-11-28: in dialogs the
   generic ".quick-entity-body label" grid / block layout put the caption against the track and 6px below its centre). */
:root :is(.crm-workspace, .designer-field-popover) label.inventory-switch { display: flex !important; align-items: center !important; }
:root .crm-workspace .quick-entity-body label.inventory-switch { gap: 8px; }
:root :is(.crm-workspace, .designer-field-popover) label.inventory-switch > strong { line-height: 1.2; }
:root :is(.crm-workspace, .designer-field-popover) label.inventory-switch > span { margin: 0 !important; vertical-align: middle; }
