/* Shared dossier selection contract. Native controls retain values and ACL;
   every visible chooser uses the same frame, marker and vertical alignment. */
:is(.modal,.workspace-switcher,.dashboard-page){--record-select-height:31px;--record-select-icon-size:14px;--record-select-gap:5px}
:is(.modal,.workspace-switcher,.dashboard-page) select[data-record-select-canonical][hidden]{display:none!important}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-host{display:flex;align-items:center;gap:0;min-width:0;width:100%;max-width:100%}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-host>:is(.record-state-dot,.client-selected-status,.process-selected-icon,[data-estate-choice-icon],[data-estate-choice-state],[id^="process-dot-"]){display:none!important}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select,:is(.modal,.workspace-switcher,.dashboard-page) .record-select-host>.record-select{display:block;width:100%;min-width:0;max-width:100%;border:0;box-shadow:none;background:transparent}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select>summary.record-select-trigger,:is(.modal,.workspace-switcher,.dashboard-page) .record-select-readonly{display:flex;align-items:center;min-height:var(--record-select-height);width:100%;max-width:100%;min-width:0;padding:4px var(--control-inset,7px);box-sizing:border-box;border:1px solid var(--editable-field-border,#ffffff12);border-radius:var(--editable-field-radius,6px);background:transparent;color:var(--ink,#d8d8dc);font-size:13px;font-weight:400;line-height:1.4;text-align:left}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select>summary.record-select-trigger{cursor:pointer;list-style:none}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select>summary.record-select-trigger::-webkit-details-marker{display:none}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select>summary.record-select-trigger::before{display:none}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select[data-record-select-disabled=true]>summary{cursor:default}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-value{display:flex;align-items:center;gap:var(--record-select-gap);flex:1;min-width:0;max-width:100%;line-height:1.4}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-text{display:block;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.4}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon{display:flex;align-items:center;justify-content:center;flex:0 0 var(--record-select-icon-size);width:var(--record-select-icon-size);height:var(--record-select-icon-size);line-height:0}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon>:is(.icon,svg,img,.custom-option-icon),:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon :is(.icon,svg,img){display:block;width:var(--record-select-icon-size);height:var(--record-select-icon-size);max-width:100%;margin:0;object-fit:contain;flex-shrink:0}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-value>.record-state-dot{display:block;flex:0 0 7px;width:7px;height:7px;margin:0}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=gray]{color:#9aa3ab}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=lightgray]{color:#d8d8dc}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=brown]{color:#c3997d}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=orange]{color:#e3a65e}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=yellow]{color:#e0bb52}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=green]{color:#4bc68f}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=blue]{color:#63b4f6}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=purple]{color:#bc93ed}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=pink]{color:#e6a0c2}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=red]{color:#f28f85}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-icon[data-record-select-color=black]{color:#97979e}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .relation-options{width:100%;max-height:260px;overflow-y:auto}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .record-select-option{display:flex;align-items:center;gap:8px;min-height:31px;padding:5px 7px;box-sizing:border-box}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select-option>input{width:16px;height:16px;min-height:16px;margin:0;padding:0;accent-color:var(--gold,#c7b58b);flex-shrink:0}
:is(.modal,.workspace-switcher,.dashboard-page) .client-picker-search input[data-record-select-search-input]{width:100%;min-width:0;min-height:27px;margin:0;padding:0;background:transparent;border:0;color:var(--ink,#d8d8dc);font:inherit;font-size:13px;outline:0}
.record-select>.client-picker-search[hidden]{display:none!important}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .record-select-option[hidden]{display:none!important}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .record-select-option .record-select-text{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .relation-option>.record-select-value>.record-select-icon{flex:0 0 var(--record-select-icon-size)!important;min-width:var(--record-select-icon-size)!important;max-width:var(--record-select-icon-size)!important}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .relation-option>.record-select-value>.record-state-dot{flex:0 0 7px!important;width:7px;min-width:7px!important;max-width:7px!important;margin:0}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .relation-option>.record-select-value>.record-select-text{flex:1;min-width:0}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select .record-select-option:has(input:checked){background:#cfb5730b}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select>summary:is(:hover,:focus-visible){border-color:var(--editable-field-focus,#cfb57366)}
:is(.modal,.workspace-switcher,.dashboard-page) .record-select[open]>summary{border-color:var(--editable-field-focus,#cfb57366);box-shadow:0 0 0 2px #cfb57312}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone]{--record-select-tint:#97979e;background-image:var(--glass-light,linear-gradient(145deg,#ffffff02,transparent));background-color:color-mix(in srgb,var(--record-select-tint) 7%,#1b1b1d66);border-color:color-mix(in srgb,var(--record-select-tint) 22%,transparent)}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=success]{--record-select-tint:#6abd87}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=warning]{--record-select-tint:#c9af50}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=danger]{--record-select-tint:#d68174}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=info]{--record-select-tint:#7da4bd}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=orange]{--record-select-tint:#e3a65e}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=purple]{--record-select-tint:#bc93ed}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-tone=white]{--record-select-tint:#dce1e5}
:is(.modal,.workspace-switcher,.dashboard-page) .process-pinned-property[data-record-select-empty=true]{background-color:#1b1b1d66;border-color:#ffffff16}
/* Task status/result use the existing state palette; an empty result stays neutral. */
.modal.task-entry-modal .task-property[data-record-select-tone]:not([data-record-select-empty=true]){background-image:var(--glass-light,linear-gradient(145deg,#ffffff02,transparent));background-color:color-mix(in srgb,var(--record-select-tint,#97979e) 7%,#1b1b1d66);border-color:color-mix(in srgb,var(--record-select-tint,#97979e) 22%,transparent)}
.modal.task-entry-modal .task-property[data-record-select-tone=success]{--record-select-tint:#6abd87}
.modal.task-entry-modal .task-property[data-record-select-tone=warning]{--record-select-tint:#c9af50}
.modal.task-entry-modal .task-property[data-record-select-tone=danger]{--record-select-tint:#d68174}
.modal.task-entry-modal .task-property[data-record-select-tone=info]{--record-select-tint:#7da4bd}
.modal:is(.task-entry-modal,.process-dossier-modal,.client-profile-dossier,.project-dossier-modal) .record-select[data-record-select-placeholder=true]>summary .record-select-text{color:var(--muted,#97979e)}
/* Existing multi-record/catalog pickers share the same selection frame. */
.modal .process-pinned-properties>.process-pinned-property{display:flex;flex-direction:column;align-items:stretch;gap:5px}
.modal .process-pinned-properties>.process-pinned-property>.process-pinned-label{flex:1}
.modal .process-pinned-properties>.process-pinned-property>.task-property-value{flex:0 0 auto}
.modal .process-pinned-properties .process-pinned-label{align-items:center;min-height:20px}
.modal .process-pinned-properties .process-pinned-label>label{display:flex;align-items:center;line-height:1.4;min-width:0}
.modal .process-pinned-properties .process-pinned-label>label>.icon{display:block;flex-shrink:0}
.modal .process-pinned-properties .relation-picker>summary:not(.task-flag-control):not(.record-link-trigger){display:flex;align-items:center;box-sizing:border-box;min-height:var(--record-select-height);padding:4px var(--control-inset,7px);border:1px solid var(--editable-field-border,#ffffff12);border-radius:var(--editable-field-radius,6px);font-size:13px;line-height:1.4}
.modal .staff-native-picker-trigger{font-size:13px;line-height:1.4}
.modal .process-pinned-properties .relation-summary,.modal .process-pinned-properties .estate-catalog-chip{align-items:center;line-height:1.4}
.modal .process-pinned-properties .estate-catalog-chip [data-estate-choice-icon],.modal .process-pinned-properties .estate-catalog-icon{display:flex;align-items:center;justify-content:center;height:14px;line-height:0;flex-shrink:0}
.modal .process-pinned-properties .estate-catalog-icon>.icon{display:block}
.modal :is(.task-relations,.task-property-value) .relation-picker>summary:not(.task-flag-control):not(.record-link-trigger){display:flex;align-items:center;min-height:var(--record-select-height);box-sizing:border-box;padding:4px var(--control-inset,7px);border:1px solid var(--editable-field-border,#ffffff12);border-radius:var(--editable-field-radius,6px);line-height:1.4}
.modal .task-relations .form-label{display:flex;align-items:center;gap:5px}
.modal .task-relations .form-label>.icon{display:block;flex-shrink:0;width:13px;height:13px}
.modal .client-inquiry-fields .form-label{display:flex;align-items:center;gap:5px}
.modal .client-inquiry-fields .form-label>.icon{display:block;flex-shrink:0;width:13px;height:13px}
.modal .relation-field-caption{display:inline-flex;align-items:center;gap:5px;min-width:0;vertical-align:middle;line-height:1.4}
.modal .relation-field-caption>.icon{display:block;flex:0 0 13px;width:13px;height:13px}
.modal .record-select-readonly .staff-pinned-office{gap:2px}
.modal .staff-pinned-properties .record-select-readonly .record-select-text{white-space:normal}
@supports(grid-template-rows:subgrid){
  .modal .process-pinned-properties{row-gap:5px}
  .modal .process-pinned-properties>.process-pinned-property{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:5px}
  .modal .process-pinned-properties>.process-pinned-property>.task-property-value{display:flex;align-items:center;min-width:0}
  .modal .staff-pinned-properties .record-select-readonly{align-self:stretch}
}
@media(min-width:901px){.modal .record-select>summary.record-select-trigger,.modal .record-select-readonly,.modal .process-pinned-properties .relation-picker>summary:not(.task-flag-control):not(.record-link-trigger),.modal .staff-native-picker-trigger{font-size:13.5px}}
@media(max-width:580px){.modal .record-select>summary.record-select-trigger,.modal .record-select-readonly,.modal .process-pinned-properties .relation-picker>summary:not(.task-flag-control):not(.record-link-trigger),.modal .staff-native-picker-trigger{font-size:12px}}
@media(prefers-reduced-motion:no-preference){.modal .record-select>summary,.modal .process-pinned-property[data-record-select-tone]{transition:background-color .18s,border-color .18s,box-shadow .18s}}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="gray"]{color:#9aa3ab}
.modal .estate-catalog-chip[data-estate-catalog-color="gray"]{--estate-catalog-color:#9aa3ab}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="lightgray"]{color:#d8d8dc}
.modal .estate-catalog-chip[data-estate-catalog-color="lightgray"]{--estate-catalog-color:#d8d8dc}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="brown"]{color:#c3997d}
.modal .estate-catalog-chip[data-estate-catalog-color="brown"]{--estate-catalog-color:#c3997d}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="orange"]{color:#e3a65e}
.modal .estate-catalog-chip[data-estate-catalog-color="orange"]{--estate-catalog-color:#e3a65e}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="yellow"]{color:#e0bb52}
.modal .estate-catalog-chip[data-estate-catalog-color="yellow"]{--estate-catalog-color:#e0bb52}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="green"]{color:#4bc68f}
.modal .estate-catalog-chip[data-estate-catalog-color="green"]{--estate-catalog-color:#4bc68f}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="blue"]{color:#63b4f6}
.modal .estate-catalog-chip[data-estate-catalog-color="blue"]{--estate-catalog-color:#63b4f6}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="purple"]{color:#bc93ed}
.modal .estate-catalog-chip[data-estate-catalog-color="purple"]{--estate-catalog-color:#bc93ed}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="pink"]{color:#e6a0c2}
.modal .estate-catalog-chip[data-estate-catalog-color="pink"]{--estate-catalog-color:#e6a0c2}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="red"]{color:#f28f85}
.modal .estate-catalog-chip[data-estate-catalog-color="red"]{--estate-catalog-color:#f28f85}
.modal .relation-picker .estate-catalog-icon[data-source-icon-color="black"]{color:#97979e}
.modal .estate-catalog-chip[data-estate-catalog-color="black"]{--estate-catalog-color:#97979e}
.modal #field-priorityIds .estate-catalog-chip{color:var(--ink,#d8d8dc);background:transparent;border:0;padding:0;font-size:inherit}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip){background-color:color-mix(in srgb,var(--record-select-tint,#97979e) 7%,#1b1b1d66);border-color:color-mix(in srgb,var(--record-select-tint,#97979e) 22%,transparent)}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="gray"]){--record-select-tint:#9aa3ab}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="lightgray"]){--record-select-tint:#d8d8dc}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="brown"]){--record-select-tint:#c3997d}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="orange"]){--record-select-tint:#e3a65e}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="yellow"]){--record-select-tint:#e0bb52}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="green"]){--record-select-tint:#4bc68f}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="blue"]){--record-select-tint:#63b4f6}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="purple"]){--record-select-tint:#bc93ed}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="pink"]){--record-select-tint:#e6a0c2}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="red"]){--record-select-tint:#f28f85}
.modal .process-pinned-property:has(#field-priorityIds>summary .estate-catalog-chip:first-child[data-estate-catalog-color="black"]){--record-select-tint:#97979e}
/* Native checkboxes and radios retain their keyboard/form semantics. Both
   present the same round marker; the staff listbox decorates its existing
   aria-selected option button without adding another interactive control. */
.modal details.relation-picker .relation-option:has(>input[type=checkbox]){display:flex;align-items:center;gap:8px;min-height:31px;min-width:0;max-width:100%;padding:5px 7px;box-sizing:border-box}
:is(.modal,.workspace-switcher,.dashboard-page) details.relation-picker .relation-option>input:is([type=checkbox],[type=radio]),
.staff-picker-panel .staff-picker-option::before{
  display:inline-block;flex:0 0 16px!important;width:16px!important;min-width:16px!important;max-width:16px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;margin:0!important;padding:0!important;box-sizing:border-box;
  appearance:none!important;-webkit-appearance:none!important;border:1px solid var(--relation-choice-border,#85858f)!important;border-radius:50%!important;
  background:radial-gradient(circle at center,var(--relation-choice-center,transparent) 0 4px,transparent 4.4px),var(--relation-choice-fill,#29292f)!important;
  box-shadow:none!important;line-height:1;vertical-align:middle;accent-color:var(--gold,#cfb573);
}
:is(.modal,.workspace-switcher,.dashboard-page) details.relation-picker .relation-option>input:is([type=checkbox],[type=radio]):checked,
.staff-picker-panel .staff-picker-option[aria-selected=true]::before{
  --relation-choice-border:var(--gold,#cfb573);--relation-choice-center:var(--gold,#cfb573);--relation-choice-fill:#cfb57316;
}
:is(.modal,.workspace-switcher,.dashboard-page) details.relation-picker .relation-option>input:is([type=checkbox],[type=radio]):focus-visible{outline:2px solid var(--editable-field-focus,#cfb573);outline-offset:3px}
:is(.modal,.workspace-switcher,.dashboard-page) details.relation-picker .relation-option>input:is([type=checkbox],[type=radio]):disabled{opacity:.5;cursor:default}
.staff-picker-panel .staff-picker-option::before{content:''}
.staff-picker-panel .staff-picker-option[aria-selected=true]::after{content:none;display:none}
.modal details.relation-picker .relation-option:has(>input[type=checkbox])>span{flex:1;min-width:0;max-width:100%}
.modal details.relation-picker .relation-option:has(>input:checked){background:#cfb5730b}
.modal details.relation-picker .relation-option:has(>input[type=checkbox]:disabled){cursor:default;color:var(--muted,#a6a6ad)}
/* The picker marks actual record names after preserving their complete source
   labels for searching and tooltips. Catalog choices never receive this hook. */
details.relation-picker :is(.relation-option,.record-link-option) .relation-option-name{
  display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  min-width:0;max-width:100%;max-height:2.8em;overflow:hidden!important;text-overflow:ellipsis!important;
  white-space:normal!important;overflow-wrap:anywhere;line-height:1.4;
}
@media(forced-colors:active){
  :is(.modal,.workspace-switcher,.dashboard-page) details.relation-picker .relation-option>input:is([type=checkbox],[type=radio]){appearance:auto!important;-webkit-appearance:auto!important;border:0!important;background:transparent!important;box-shadow:none!important;forced-color-adjust:auto}
  .modal details.relation-picker .relation-option:has(>input:checked){outline:1px solid Highlight;outline-offset:-1px}
  .staff-picker-panel .staff-picker-option::before{--relation-choice-border:ButtonText;--relation-choice-fill:Canvas;forced-color-adjust:none}
  .staff-picker-panel .staff-picker-option[aria-selected=true]::before{--relation-choice-border:Highlight;--relation-choice-center:Highlight;--relation-choice-fill:Canvas}
}

/* Searchable task type uses the same top field throughout selection. */
.record-select[data-record-select-inline-search=true] .record-select-inline-value{display:contents}
.record-select[data-record-select-inline-search=true]>.record-select-trigger>input{display:none}
.record-select[data-record-select-inline-search=true][open]>.record-select-trigger>.record-select-inline-value{display:none}
.record-select[data-record-select-inline-search=true][open]>.record-select-trigger>input{display:block;width:100%;min-width:0;height:auto;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:inherit;font:inherit;outline:none}
.record-select[data-record-select-inline-search=true]>.client-picker-search{display:none!important}

.modal .record-select[data-record-select-inline-search=true][open]>.record-select-trigger>input:focus{border:0;outline:none;box-shadow:none;background:transparent}
