/* Search CRM brand layer: visual only. Loaded last; no markup or behaviour changes. */
:root{--sc-ink:#101828;--sc-text:#1d2939;--sc-muted:#667085;--sc-border:#e4e7ec;--sc-page:#f5f7fa;--sc-surface:#fff;--sc-accent:#00a393;--sc-accent-hover:#008c7e;--sc-accent-soft:#e7f6f4;--sc-radius:8px;
--brand-accent:#00a393;--brand-accent-hover:#008c7e;--brand-accent-strong:#007a6e;--brand-accent-soft:#e7f6f4;--crm-detail-label-size:12px;--crm-detail-value-size:13px;--crm-filter-surface:#fff;--crm-table-header-surface:#f9fafb}
html[data-theme="dark"]{--sc-ink:#f2f4f7;--sc-text:#e4e7ec;--sc-muted:#98a2b3;--sc-border:#2e3744;--sc-page:#0f141a;--sc-surface:#171d24;--sc-accent:#20c1b1;--sc-accent-hover:#39cebf;--sc-accent-soft:#173934;--crm-filter-surface:#171d24;--crm-table-header-surface:#1d252e}
html,body,button,input,select,textarea{font-family:"Inter","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
body{font-size:13px;color:var(--sc-text);background:var(--sc-page)!important;-webkit-font-smoothing:antialiased}
h1{font-size:20px!important;font-weight:650;letter-spacing:-.01em;line-height:1.25;color:var(--sc-ink)}
h2{font-size:15px;font-weight:600;letter-spacing:-.005em}
.crm-global-header{background:var(--sc-surface);border-bottom:1px solid var(--sc-border);box-shadow:none}
.crm-global-header nav a{font-size:13px;font-weight:500;color:var(--sc-muted)}
.crm-global-header nav a.active,.crm-global-header nav a:hover{color:var(--sc-ink)}
.crm-page-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:12px}
.crm-page-head h1{margin:0}
.crm-page-actions{display:flex;gap:8px;margin:0}
.crm-page-actions .button,.crm-page-head>.button{width:auto!important;flex:0 0 auto}
.button.primary,button.primary{background:var(--sc-accent);border:1px solid var(--sc-accent);color:#fff;border-radius:var(--sc-radius);font-size:13px;font-weight:600;min-height:32px;padding:6px 14px;box-shadow:0 1px 2px rgb(16 24 40/8%)}
.button.primary:hover,button.primary:hover{background:var(--sc-accent-hover);border-color:var(--sc-accent-hover)}
.panel,.crm-list-filterbar{background:var(--sc-surface);border:1px solid var(--sc-border)!important;border-radius:10px;box-shadow:none}
input:not([type=checkbox]):not([type=radio]),select,textarea{border:1px solid var(--sc-border);border-radius:var(--sc-radius);font-size:13px}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--sc-accent)!important;box-shadow:0 0 0 3px rgb(0 163 147/15%)!important}
label,dt{font-size:12px}
.crm-table-wrap{border:1px solid var(--sc-border);border-radius:10px;overflow:auto;background:var(--sc-surface)}
.crm-table th{font-size:12px;font-weight:600;color:var(--sc-muted);background:var(--crm-table-header-surface);text-transform:none;letter-spacing:0}
.crm-table td{font-size:13px;border-color:var(--sc-border)}
.crm-table tbody tr:hover>td{background:rgb(0 163 147/4%)}
.crm-section-entity-nav{display:flex;justify-content:flex-end}
.crm-entity-matrix{display:inline-flex!important;flex-wrap:nowrap;grid-template-columns:none!important;gap:2px;padding:3px;background:var(--sc-page);border:1px solid var(--sc-border);border-radius:9px;width:auto!important}
.crm-entity-matrix a{background:transparent!important;color:var(--sc-muted)!important;font-size:12px!important;font-weight:500!important;text-transform:none!important;letter-spacing:0!important;border:0!important;border-radius:6px!important;padding:5px 12px!important;min-height:0!important;height:auto!important;box-shadow:none!important;width:auto!important}
.crm-entity-matrix a.active{background:var(--sc-surface)!important;color:var(--sc-ink)!important;box-shadow:0 1px 2px rgb(16 24 40/12%)!important}
.crm-deal-command-row{display:flex!important;flex-wrap:wrap;gap:8px;grid-template-columns:none!important}
.crm-deal-command-row>*{flex:0 0 auto!important;width:auto!important}
.crm-deal-hero{border:1px solid var(--sc-border);border-radius:10px;box-shadow:none;background:var(--sc-surface)}
/* v2: entity switcher, record tabs, compact commands */
.crm-entity-matrix>*{background:transparent!important;color:var(--sc-muted)!important;border:0!important;border-radius:6px!important;font-size:12px!important;font-weight:500!important;text-transform:none!important;min-height:0!important;padding:5px 12px!important}
.crm-entity-matrix>.active{background:var(--sc-surface)!important;color:var(--sc-ink)!important;box-shadow:0 1px 2px rgb(16 24 40/12%)!important}
.crm-entity-matrix>a:hover{color:var(--sc-ink)!important}
.crm-record-tabs{display:flex;gap:4px;border-bottom:1px solid var(--sc-border);background:transparent;padding:0;border-radius:0}
.crm-record-tabs button{background:transparent!important;color:var(--sc-muted)!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;font-size:13px;font-weight:500;padding:8px 12px;margin-bottom:-1px}
.crm-record-tabs button:hover{color:var(--sc-ink)!important}
.crm-record-tabs button.active{color:var(--sc-ink)!important;border-bottom-color:var(--sc-accent)!important;font-weight:600}
.crm-record-tabs button span{color:var(--sc-muted);font-weight:500;margin-left:2px}
.crm-small-command{border:1px solid var(--sc-border);border-radius:var(--sc-radius);background:var(--sc-surface);color:var(--sc-text);font-size:12.5px;font-weight:500;min-height:30px;padding:5px 10px;box-shadow:none}
.crm-small-command:hover{border-color:#cfd4dc;background:#f9fafb}
.crm-small-command.primary{background:var(--sc-accent);border-color:var(--sc-accent);color:#fff}
.crm-icon-button{border-radius:var(--sc-radius)!important;border-color:var(--sc-border)!important}
.crm-compact-section,.crm-entity-panel>section{border-color:var(--sc-border);border-radius:10px}
.crm-compact-section>header h2{font-size:14px}
/* v3: companies list, status chips, brand mark */
.crm-brand strong{font-size:15px!important;line-height:1.1}
.crm-company-table td{vertical-align:middle;padding-top:10px;padding-bottom:10px}
.crm-company-table th:nth-child(3),.crm-company-table td:nth-child(3){min-width:320px}
.crm-company-table td:nth-child(2){max-width:260px;min-width:180px}
.crm-company-table .crm-holding-link{font-size:12px!important;font-weight:400!important;color:var(--sc-muted)!important;line-height:1.35}
.crm-company-table .crm-company-title-line a{font-size:13px!important;font-weight:600!important;color:var(--sc-ink)!important;line-height:1.35}
.crm-company-table td small{font-size:11.5px;color:var(--sc-muted)}
.crm-company-table .crm-head-company-badge img{width:12px;height:12px;opacity:.75}
.crm-company-table td:nth-child(4){font-variant-numeric:tabular-nums}
.crm-status{border-radius:999px!important;font-size:11.5px!important;font-weight:500!important;padding:2px 8px!important;border:0!important;background:#f2f4f7!important;color:#344054!important}
.crm-status.new{background:var(--sc-accent-soft)!important;color:#05695f!important}
html[data-theme="dark"] .crm-status{background:#232c36!important;color:#d0d5dd!important}
html[data-theme="dark"] .crm-status.new{color:#70ddd3!important}
/* v4: deal products tab, contacts / LPR */
.crm-tab-panel section>header>div>span:first-child{text-transform:none!important;letter-spacing:0!important;font-size:11.5px!important;font-weight:500!important;color:var(--sc-muted)!important}
.crm-tab-panel section>header h2{font-size:14px!important;font-weight:600!important;margin:0!important}
.crm-deal-products-panel{border:1px solid var(--sc-border);border-radius:10px;background:var(--sc-surface);padding:12px 14px}
.crm-deal-products-panel form{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap}
.crm-deal-products-panel form label{display:flex;align-items:center;gap:8px;margin:0;flex:1 1 320px;max-width:460px;font-size:12px;color:var(--sc-muted)}
.crm-deal-products-panel form label select,.crm-deal-products-panel form select{flex:1;width:auto!important;margin:0!important}
.crm-deal-products-panel form button{margin:0!important;min-height:34px}
.crm-tab-panel>section+section{margin-top:12px}
.crm-reference-contact-list{display:grid;gap:8px}
.contact-inline-record{border:1px solid var(--sc-border);border-radius:10px;padding:12px 14px;background:var(--sc-surface)}
.contact-inline-record>header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.contact-inline-record>header strong{font-size:14px;font-weight:600;color:var(--sc-ink)}
.contact-primary-badge,.contact-inline-record>header span{border-radius:999px;background:var(--sc-accent-soft);color:#05695f;font-size:11.5px;font-weight:500;padding:2px 8px}
.contact-inline-record>header .contact-inline-icon{margin-left:auto}
.contact-inline-data{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:2px 16px;margin:0}
.contact-inline-data dt{font-size:11.5px!important;font-weight:500!important;color:var(--sc-muted)!important;border:0!important;padding:0!important}
.contact-inline-data dd{margin:0 0 6px!important;font-size:13px!important;border:0!important;padding:0!important}
.crm-reference-contact-list>div{display:flex;gap:16px;align-items:baseline;padding:8px 14px;border:1px solid var(--sc-border);border-radius:8px;background:var(--sc-surface)}
.crm-reference-contact-list>div strong{min-width:150px;font-size:12px;font-weight:500;color:var(--sc-muted)}
.crm-reference-contact-list>div span{color:var(--sc-text);font-size:13px}
details.deal-contact-add>summary{min-height:30px;font-size:12.5px}
html[data-theme="dark"] .contact-primary-badge,html[data-theme="dark"] .contact-inline-record>header span{color:#70ddd3}
/* v5: analytics & management surfaces */
.analytics-eyebrow,.analytics-panel header span:first-child:not(:only-child){text-transform:none!important;letter-spacing:0!important;font-size:11.5px!important;font-weight:500!important;color:var(--sc-muted)!important}
.analytics-freshness{display:none!important}
.analytics-panel,.analytics-kpis{border-color:var(--sc-border)!important;border-radius:10px!important;box-shadow:none!important}
.operations-head h1{font-size:20px!important}
.crm-company-table .crm-holding-link{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* v7: my day strip */
.my-day{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.my-day-title{font-size:12px;font-weight:600;color:var(--sc-muted);margin-right:4px}
.my-day-card{display:inline-flex;align-items:baseline;gap:8px;padding:6px 12px;border:1px solid var(--sc-border);border-radius:999px;background:var(--sc-surface);color:var(--sc-text);text-decoration:none;font-size:12.5px}
.my-day-card strong{font-size:14px;font-variant-numeric:tabular-nums;color:var(--sc-ink)}
.my-day-card.overdue strong{color:#b42318}
.my-day-card.today strong{color:#b54708}
.my-day-card:hover{border-color:var(--sc-accent)}
