.crm-entity-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px;align-items:center}.crm-entity-tabs button{min-height:42px;font-size:13px}.crm-entity-tabs button[aria-pressed=true]{background:var(--ui-accent);color:var(--ui-accent-text);border-color:var(--ui-accent)}#crm-new-deal{margin-left:auto}#crm-view:is([data-crm-tab=people],[data-crm-tab=organizations])>:not(h1,.crm-entity-tabs,#crm-directory){display:none!important}.crm-directory{padding-bottom:24px}.crm-directory-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:8px 0 16px}.crm-directory-toolbar h2{flex:1;min-width:120px;font-size:22px;margin:0}.crm-directory-toolbar button{font-size:12px}.crm-directory-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin:16px 0}.crm-contact-card{text-align:left;padding:16px;border:1px solid var(--ui-border);background:var(--ui-surface);color:var(--ui-text);min-width:0}.crm-contact-card>*{display:block;overflow-wrap:anywhere}.crm-contact-card span{font-size:13px;margin-top:8px}.crm-contact-card small{font-size:12px;color:var(--ui-muted)}.crm-contact-summary{padding:18px;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-surface);margin:15px 0}.crm-contact-summary>a{display:block;margin:6px 0;overflow-wrap:anywhere}.crm-relation-link{margin:4px 8px 4px 0;font-size:12px}.crm-combined-history{max-width:1000px}.crm-combined-history article{padding:14px 0;border-bottom:1px solid var(--ui-border)}.crm-combined-history p{white-space:pre-wrap;font-size:13px;overflow-wrap:anywhere}.crm-combined-history small{font-size:11px}.crm-form-dialog{width:min(620px,calc(100% - 20px));max-height:90dvh;overflow:auto;background:var(--ui-surface);color:var(--ui-text)}.crm-form-dialog textarea{min-height:64px}.crm-form-dialog button[type=submit]{width:100%;margin-top:12px}.crm-match-notice{font-size:12px;color:var(--ui-accent);grid-column:1/-1}.crm-error,.crm-form-status{color:#c73b48}.crm-data-notice{padding:12px;border:1px solid #b89045;border-radius:10px;font-size:13px}.crm-card-hierarchy{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 0;margin-bottom:12px;border-bottom:1px solid var(--ui-border)}.crm-card-hierarchy button{font-size:12px;min-height:36px;padding:6px 10px}.crm-card-hierarchy span{font-size:12px}.crm-contact-summary h3{font-size:16px}.crm-deal-title{font-size:15px}.crm-needs-person{font-size:11px;color:#b25a16}
@media(max-width:700px){.crm-entity-tabs{gap:6px}.crm-entity-tabs button{font-size:12px;padding:9px 10px}#crm-new-deal{margin-left:0}.crm-directory-list{grid-template-columns:1fr}.crm-directory-toolbar h2{font-size:20px}.crm-form-dialog{padding:16px}.crm-form-dialog input,.crm-form-dialog select,.crm-form-dialog textarea{font-size:16px}.crm-contact-summary{padding:14px}.crm-directory-toolbar>button:first-child{width:100%}}
/* Dedicated tokens avoid inherited customer/presentation surface overrides. */
:root{--crm-surface:#fffdf7;--crm-field:#fff;--crm-text:#17372b;--crm-muted:#536e60;--crm-border:#c9d3c6;--crm-button:#fffdf7;--crm-button-text:#17372b;--crm-selected:#2b6549;--crm-selected-text:#fff;--crm-link:#176b4a}
:root[data-theme=dark]{--crm-surface:#1b222c;--crm-field:#141b25;--crm-text:#edf2fa;--crm-muted:#b1c0d3;--crm-border:#4a5d75;--crm-button:#344258;--crm-button-text:#edf2fa;--crm-selected:#9dc5ff;--crm-selected-text:#101b2f;--crm-link:#a7ceff}
:root[data-theme=hero]{--crm-surface:#f5f1e8;--crm-field:#fffdf7;--crm-text:#163b29;--crm-muted:#5a7263;--crm-border:#d6cdbb;--crm-button:#2b6549;--crm-button-text:#fff;--crm-selected:#1c5037;--crm-selected-text:#fff;--crm-link:#176b4a}
html body #crm-view :is(.crm-entity-tabs button,.crm-directory-toolbar button,.crm-relation-link,.crm-card-hierarchy button),html body #crm-edit-dialog button{background:var(--crm-button)!important;color:var(--crm-button-text)!important;border-color:var(--crm-border)!important}
html body #crm-view :is(.crm-entity-tabs button[aria-pressed=true],.crm-entity-tabs button.primary,.crm-directory-toolbar button.primary),html body #crm-edit-dialog button.primary{background:var(--crm-selected)!important;color:var(--crm-selected-text)!important}
html body #crm-directory :is(.crm-contact-card,.crm-contact-summary),html body #crm-edit-dialog{background:var(--crm-surface)!important;color:var(--crm-text)!important;border-color:var(--crm-border)!important}
html body #crm-directory .crm-contact-card :is(strong,span),html body #crm-directory .crm-contact-summary :is(h3,p),html body #crm-edit-dialog :is(h2,label,p){color:var(--crm-text)!important}
html body #crm-directory .crm-contact-card small,html body #crm-directory .crm-contact-summary :is(small,.hint){color:var(--crm-muted)!important}
html body #crm-directory .crm-contact-summary a{color:var(--crm-link)!important}
html body #crm-edit-dialog :is(input,textarea,select){background:var(--crm-field)!important;color:var(--crm-text)!important;border-color:var(--crm-border)!important}
html[data-theme=dark] body[data-view=crm] .header-actions button{background:#344258!important;color:#edf2fa!important;border-color:#657893!important}

/* Person cards use normal copy even though the whole card is clickable. */
html body #crm-view[data-crm-tab=people] #crm-directory,html body #crm-view[data-crm-tab=people] #crm-directory *{font-weight:400!important;letter-spacing:normal!important}

.crm-lookup-results{display:grid;gap:6px;margin:8px 0 16px;max-height:260px;overflow:auto;border:1px solid var(--ui-border);padding:8px}.crm-lookup-results[hidden]{display:none}.crm-lookup-results button{width:100%;min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}
