/* Approved neutral consultation presentation. Load LAST, after inflow-ledger.css.
 * HEAD DOM: .db-consult-contact / .db-dual-vehicle and .db-match-approved.
 * Presentation only: no data, asset substitution, event or availability changes.
 * Repeated ID deliberately outranks legacy high-specificity !important themes.
 * Geometry, 55:45 split and mobile flow remain owned by unified-consultation.css.
 */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized){--cn-ink:#252a31;--cn-muted:#68737f;--cn-border:#e5e8ed;--cn-canvas:#f7f8fa;--cn-accent:#4e6b91;font-family:"CRM Dashboard Sans",system-ui,sans-serif!important;color:var(--cn-ink)!important;background:var(--cn-canvas)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) *{font-family:"CRM Dashboard Sans",system-ui,sans-serif!important;font-size:14px!important;font-weight:400!important;color:var(--cn-ink)!important;border-color:var(--cn-border)!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) *::before,
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) *::after{color:inherit!important;border-color:var(--cn-border)!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.window-head,.db-dual-layout,.db-consult-panels){background:var(--cn-canvas)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-contact,.db-dual-vehicle,[data-db-detail-panel],.db-dual-profile,.db-consult-log,.db-consult-composer,.db-match-selection,.db-match-hero){background:#fff!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-note-card,.db-consult-important,.db-consult-legacy,.db-match-original,.db-match-original>div,.db-match-car,.db-match-visual,.notionpreview,.dual-profile-avatar,.db-consult-stage,.db-consult-kind,.db-consult-next-chip,.db-match-candidate-tag){background:var(--cn-canvas)!important;color:var(--cn-muted)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-entry::before,.db-consult-entry::after){background:var(--cn-border)!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(h2,.db-match-model-title){font-size:20px!important;font-weight:600!important;line-height:1.4!important;letter-spacing:normal!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-consult-identity h3{font-size:18px!important;font-weight:600!important;line-height:1.4!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(h4,h5,.db-match-approved-heading h3,.dual-pane-heading h4,.db-consult-composer>label){font-size:16px!important;font-weight:600!important;line-height:1.5!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(strong,b,.db-match-price-value){font-weight:600!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(label,dt,.db-match-selector>span,.db-consult-controls>label,.db-match-search>label){font-size:13px!important;font-weight:400!important;color:var(--cn-muted)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(small,time,summary,.muted,.db-match-status,.db-match-description,.db-match-caution,.db-match-footnote,.db-match-notice,.db-match-provenance,.db-match-save-status,.db-match-actions-note,.db-match-image-note,.db-match-image-disclaimer,.db-match-price-warning,.db-match-price-caption,.db-consult-next-chip,.db-consult-stage,.db-consult-kind,.db-consult-context,.db-consult-legacy header span,.db-consult-feedback,.db-consult-composer footer>span,[data-consult-important-hint]){font-size:12px!important;font-weight:400!important;color:var(--cn-muted)!important;line-height:1.5!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(input,select,textarea,button,.db-consult-call){font-size:14px!important;font-weight:400!important;line-height:1.5!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(input,select,textarea){background:#fff!important;border-color:var(--cn-border)!important;caret-color:var(--cn-ink);}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(input,select,button,.db-consult-call){min-height:34px!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) textarea{padding:10px!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(input,textarea)::placeholder{font:inherit!important;color:var(--cn-muted)!important;opacity:1!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(button,.db-consult-call){background:#fff!important;color:var(--cn-ink)!important;border-color:var(--cn-border)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-call,.db-consult-composer footer>button.primary,.db-match-search>button,.db-match-save){background:var(--cn-ink)!important;border-color:var(--cn-ink)!important;color:#fff!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-call,.primary,.db-match-search>button,.db-match-save) *{color:inherit!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(button[aria-pressed="true"],button.active,.db-match-model[aria-pressed="true"],.db-consult-stage-choice[aria-pressed="true"],.db-match-choice[aria-pressed="true"],.db-consult-stage.is-first){background:var(--cn-canvas)!important;color:var(--cn-accent)!important;border-color:var(--cn-accent)!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(button[aria-pressed="true"],button.active) *{color:inherit!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(button,input,select,textarea,summary,a):focus-visible{outline:2px solid var(--cn-accent)!important;outline-offset:2px!important;border-color:var(--cn-accent)!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(input,select,textarea):focus{border-color:var(--cn-accent)!important;box-shadow:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-match-visual{height:clamp(180px,16vw,220px)!important;min-height:180px!important;width:100%!important;background:var(--cn-canvas)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-match-visual img:not([hidden]){display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;height:calc(100% - 30px)!important;object-fit:contain!important;padding:8px!important;box-sizing:border-box!important;filter:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-match-visual .db-match-image-note{position:static!important;display:block!important;flex:none;text-align:center;padding:2px 6px!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-match-status,.db-match-actions-note,.db-match-image-disclaimer){white-space:normal!important;overflow-wrap:anywhere;}
/* Restore real text labels, not a label plus a second pseudo-icon. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .window-controls button[data-window]{font-size:14px!important;width:auto!important;min-width:54px!important;height:auto!important;padding:5px 9px!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .window-controls button[data-window]::before{content:none!important;display:none!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .window-controls button[data-window]::after{content:none!important;display:none!important;}
/* Never enable disabled actions or force failed/absent images into view. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(button,input,select,textarea):disabled{background:var(--cn-canvas)!important;color:var(--cn-muted)!important;border-color:var(--cn-border)!important;opacity:1!important;cursor:not-allowed!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) button:disabled *{color:inherit!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) [hidden]{display:none!important;}
/* Retain existing natural mobile stack and independent log scroll. */
@media(max-width:850px){
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-consult-panels{display:block!important;overflow:auto!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-consult-contact,.db-dual-vehicle){height:auto!important;min-height:0!important;overflow:visible!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-consult-log{max-height:360px;overflow:auto;}
}

/* Pinned text can grow with the readable controls; no fixed 29px clipping. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-consult-important:has([data-consult-ui=unpin][hidden]){height:auto!important;min-height:34px!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .db-consult-stage{line-height:1.5!important;padding:3px 6px!important;}
/* Font only on the active consultation shell. No ledger or other window selector. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending):has(#db-detail-drawer:not(.minimized) .db-dual-layout) :is(.frame>.top,.frame>.layout>nav.nav,.frame>.top *,.frame>.layout>nav.nav *){font-family:"CRM Dashboard Sans",system-ui,sans-serif!important;}



/* Name is a real button; it must retain customer-heading typography. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) .customer-name-picker-button{font-size:18px!important;font-weight:600!important;}
/* Overlay menus need an opaque surface above consultation history. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-switcher-popover,.db-match-candidates,[role="listbox"],[role="menu"]){background:#fff!important;}

/* Active consultation shell shares the ledger's charcoal/slate palette. */
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending):has(#db-detail-drawer:not(.minimized) .db-dual-layout) :is(.frame>.layout>nav.nav,.frame>.top .brand){background:#252a31!important;color:#fff!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending):has(#db-detail-drawer:not(.minimized) .db-dual-layout) .frame>.layout>nav.nav button{color:#dce1e7!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending):has(#db-detail-drawer:not(.minimized) .db-dual-layout) .frame>.layout>nav.nav button.active{background:#364356!important;color:#fff!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-switcher-result.is-selected,.db-switcher-chip.is-selected){background:var(--cn-canvas)!important;color:var(--cn-accent)!important;border-color:var(--cn-accent)!important;}
body.crm-ui:not(.crm-auth-screen):not(.crm-auth-pending) #db-detail-drawer#db-detail-drawer:not(.minimized) :is(.db-switcher-result.is-selected,.db-switcher-chip.is-selected) *{color:inherit!important;}
