/* Leads is a list; the existing contact inspector is reused in a right-side drawer. */
#product-shell #view-leads.leads-list-view:not(.hidden){display:block;min-width:0;overflow:auto}
#product-shell #view-leads.leads-list-view>section:first-child{width:100%;max-width:none;max-height:none;overflow:visible;padding-bottom:12px}
#product-shell #lead-list-container{margin-top:10px}.leads-list-scroll{overflow:auto;border:1px solid var(--es-border,#dde3ed);border-radius:10px;background:var(--es-surface,#fff)}
.leads-contact-list{width:100%;border-collapse:collapse;font-size:12px;min-width:820px;color:var(--es-text,#202638)}.leads-contact-list th{font-size:10px;text-transform:uppercase;letter-spacing:.2px;color:var(--es-text-muted,#63718c);background:var(--es-surface-muted,#f5f7fa);text-align:left;font-weight:600;white-space:nowrap}.leads-contact-list :is(td,th){padding:12px;border-bottom:1px solid var(--es-border,#dde3ed)}.leads-contact-list tbody tr{cursor:pointer;transition:background .15s}.leads-contact-list tbody tr:hover,.leads-contact-list tbody tr.is-selected{background:var(--es-primary-soft,#edf4ff)}.leads-contact-list tbody tr:last-child td{border-bottom:0}.leads-contact-list td>button[data-leads-open]{font:inherit;font-weight:650;color:inherit;border:0;background:none;padding:0;text-align:left}.leads-contact-list small{display:block;font-size:10px;color:var(--es-text-muted,#63718c);margin-top:3px}.leads-status{font-size:10px;padding:3px 7px;background:var(--es-surface-muted,#f5f7fa);border:1px solid var(--es-border,#dde3ed);border-radius:5px;white-space:nowrap}.leads-row-actions{display:flex;gap:6px}.leads-row-actions :is(a,button){display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--es-border,#dde3ed);border-radius:7px;background:var(--es-primary-soft,#edf4ff);color:var(--es-primary,#514bff)}.leads-row-actions svg{width:16px;height:16px}
#leads-contact-drawer{position:fixed;inset:0 0 0 auto;margin:0;padding:0;border:0;border-left:1px solid var(--es-border,#dde3ed);border-radius:14px 0 0 14px;width:min(620px,94vw);max-width:94vw;height:100dvh;max-height:100dvh;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;background:var(--es-surface,#fff);color:var(--es-text,#202638);box-shadow:-16px 0 60px #0b142c40}
#leads-contact-drawer::backdrop{background:#0b142c66}
.leads-drawer-header{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 20px;background:var(--es-surface,#fff);border-bottom:1px solid var(--es-border,#dde3ed)}.leads-drawer-header h2{font-size:15px;font-weight:650;margin:0}.leads-drawer-header button{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--es-border,#dde3ed);border-radius:7px;background:var(--es-surface,#fff);color:var(--es-text,#202638);cursor:pointer}
#leads-contact-drawer #detail-panel{display:block!important;position:relative!important;inset:auto!important;transform:none!important;width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;margin:0!important;border:0!important;border-radius:0!important;padding:20px!important;box-shadow:none!important;background:var(--es-surface,#fff)!important;color:var(--es-text,#202638)!important}
#leads-contact-drawer #es-detail-back{display:none!important}#leads-contact-drawer :focus-visible,.leads-contact-list :focus-visible{outline:2px solid var(--es-primary,#514bff);outline-offset:3px}
@media(max-width:767px){#leads-contact-drawer{width:94vw}.leads-drawer-header{padding:12px 15px}#leads-contact-drawer #detail-panel{padding:15px!important}.leads-row-actions :is(a,button){width:40px;height:40px}}
@media(prefers-reduced-motion:reduce){.leads-contact-list tbody tr{transition:none}}

.leads-contact-list{min-width:1680px}.leads-contact-list .leads-money,.leads-contact-list .leads-date{white-space:nowrap}.leads-contact-list .leads-tags{min-width:120px;max-width:220px;overflow-wrap:anywhere}.leads-contact-list td:first-child{min-width:190px}.leads-contact-list td:nth-child(4){min-width:170px}.leads-contact-list td:nth-child(9){min-width:130px}

/* Compact list proportions supplied in the CRM reference. */
.leads-contact-list.leads-reference-list{min-width:1000px;table-layout:fixed;font-size:12px}
.leads-reference-list th{font-size:10px;font-weight:600;padding:12px 10px;letter-spacing:.2px}
.leads-reference-list td{padding:12px 10px;vertical-align:middle;line-height:1.4;font-weight:400}
.leads-reference-list .leads-check{width:38px;min-width:38px!important;text-align:center}
.leads-reference-list input[type=checkbox]{width:15px;height:15px;accent-color:#0f817a;cursor:pointer}
.leads-reference-list th:nth-child(2){width:23%}.leads-reference-list th:nth-child(3){width:15%}.leads-reference-list th:nth-child(4){width:9%}.leads-reference-list th:nth-child(5){width:13%}.leads-reference-list th:nth-child(6){width:14%}.leads-reference-list th:nth-child(7){width:13%}.leads-reference-list th:nth-child(8){width:12%}
.leads-reference-list td:first-child,.leads-reference-list td:nth-child(4),.leads-reference-list td:nth-child(9){min-width:0}
.leads-reference-list .leads-name-cell>button{font-weight:500!important;font-size:12px}
.leads-reference-list .leads-name-cell small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:10px}
.leads-reference-list .leads-status{display:inline-flex;align-items:center;gap:4px;font-size:10px;padding:2px 7px;border:0;border-radius:12px;background:#eaf1ff;color:#365f9c}
.leads-reference-list .leads-status::before{content:"";width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor}
.leads-reference-list .leads-status[data-stage=won]{background:#e8f5ed;color:#247443}.leads-reference-list .leads-status[data-stage=lost]{background:#edf0f5;color:#67758b}.leads-reference-list .leads-status[data-stage=contacted]{background:#e5f3f1;color:#087f7c}
.leads-reference-list .leads-requirement{font-size:11px;overflow-wrap:anywhere}.leads-reference-list .leads-requirement small{font-size:10px;margin-top:0}
.leads-reference-list .leads-last-activity{font-size:11px;color:var(--es-text-muted,#63718c)}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status{background:#263b56;color:#b3d2ff}:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage=won]{background:#203d32;color:#a3e7b5}:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage=lost]{background:#2d3748;color:#c1cada}:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage=contacted]{background:#203d3c;color:#9ce1d8}

/* Distinct status pills with matching dots and readable light/dark palettes. */
.leads-reference-list .leads-status[data-stage]{--status-bg:#edf0f5;--status-ink:#606d82;background:var(--status-bg);color:var(--status-ink)}
.leads-reference-list .leads-status[data-stage="new"],.leads-reference-list .leads-status[data-stage="new lead"]{--status-bg:#e9f1ff;--status-ink:#2b60ad}
.leads-reference-list .leads-status[data-stage="contacted"]{--status-bg:#e2f5f3;--status-ink:#087b78}
.leads-reference-list .leads-status[data-stage="site visit scheduled"],.leads-reference-list .leads-status[data-stage="site-visit-scheduled"],.leads-reference-list .leads-status[data-stage="visit scheduled"],.leads-reference-list .leads-status[data-stage="meeting"]{--status-bg:#eeeafe;--status-ink:#6241bb}
.leads-reference-list .leads-status[data-stage="qualified"]{--status-bg:#e9edff;--status-ink:#4655a3}
.leads-reference-list .leads-status[data-stage="in progress"]{--status-bg:#e5f4fb;--status-ink:#266c88}
.leads-reference-list .leads-status[data-stage="proposal"],.leads-reference-list .leads-status[data-stage="proposal sent"]{--status-bg:#fbe8f2;--status-ink:#9a386e}
.leads-reference-list .leads-status[data-stage="negotiation"]{--status-bg:#fff0e4;--status-ink:#b34c13}
.leads-reference-list .leads-status[data-stage="follow-up"],.leads-reference-list .leads-status[data-stage="follow up"],.leads-reference-list .leads-status[data-stage="followup"]{--status-bg:#fff5da;--status-ink:#8b600e}
.leads-reference-list .leads-status[data-stage="won"],.leads-reference-list .leads-status[data-stage="booked"]{--status-bg:#e7f6eb;--status-ink:#24713e}
.leads-reference-list .leads-status[data-stage="lost"]{--status-bg:#edf0f5;--status-ink:#606d82}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage]{--status-bg:#303a48;--status-ink:#c0ccdd;background:var(--status-bg);color:var(--status-ink)}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="new"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="new lead"]{--status-bg:#243957;--status-ink:#b4d0ff}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="contacted"]{--status-bg:#173f40;--status-ink:#8de0d9}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="site visit scheduled"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="site-visit-scheduled"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="visit scheduled"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="meeting"]{--status-bg:#35284e;--status-ink:#d3b9ff}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="qualified"]{--status-bg:#2b3154;--status-ink:#bcc9ff}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="in progress"]{--status-bg:#203c4b;--status-ink:#a7dcf4}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="proposal"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="proposal sent"]{--status-bg:#48293e;--status-ink:#f6b6da}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="negotiation"]{--status-bg:#4b3122;--status-ink:#ffc69b}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="follow-up"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="follow up"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="followup"]{--status-bg:#463c23;--status-ink:#ffe09a}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="won"],:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="booked"]{--status-bg:#203e2d;--status-ink:#a4e3b5}
:root[data-es-color-mode=dark] .leads-reference-list .leads-status[data-stage="lost"]{--status-bg:#303a48;--status-ink:#c0ccdd}

/* Keep the inspector actions together without a duplicate contact header. */
#leads-drawer-close{display:none}
#leads-contact-drawer #leads-drawer-close{display:grid;place-items:center;flex-shrink:0;width:34px;height:34px;border:1px solid var(--es-border,#dde3ed);border-radius:7px;background:var(--es-surface,#fff);color:var(--es-text,#202638);cursor:pointer}
/* Compact neutral typography based on the supplied CRM reference. */
#product-shell{--es-sans:'Roboto',Arial,sans-serif;font-family:var(--es-sans)}
#product-shell :is(button,input,select,textarea){font-family:inherit}
#product-shell .leads-reference-list{font-family:var(--es-sans);font-size:14px;font-weight:400}
#product-shell .leads-reference-list th{font-size:11px;font-weight:500;letter-spacing:.2px}
#product-shell .leads-reference-list .leads-name-cell button{font-size:14px;font-weight:400}
#product-shell .leads-reference-list small{font-size:12px;font-weight:400}
#product-shell .leads-reference-list .leads-status{font-size:11px;font-weight:400}

/* Reference dimensions are CSS pixels at the browser's normal 100% zoom. */
@media screen and (min-width:1024px){
 #product-shell{grid-template-rows:56px minmax(0,1fr)}
 #product-shell #main-content{padding:20px 24px!important;gap:14px}
 #product-shell #product-sidebar .nav-item{min-height:36px;padding:8px 10px;font-size:14px;line-height:20px;gap:10px}
 #product-shell #product-sidebar .nav-item .es-icon{width:16px;height:16px}
 #product-shell #controls-bar{padding:12px;gap:8px;border-radius:12px}
 #product-shell #controls-bar :is(input:not([type=checkbox]),select,button){min-height:36px;font-size:14px;line-height:20px}
 #product-shell #controls-bar input:not([type=checkbox]){padding-top:7px;padding-bottom:7px}
 #product-shell #lead-list-container{margin-top:10px}
 #product-shell .leads-reference-list thead tr{height:42px}
 #product-shell .leads-reference-list tbody tr{height:61px}
 #product-shell .leads-reference-list :is(th,td){padding:10px 12px}
 #product-shell .leads-reference-list td{line-height:20px;overflow-wrap:anywhere}
 #product-shell .leads-reference-list .leads-name-cell>button{font-size:14px;font-weight:400!important;line-height:20px}
 #product-shell .leads-reference-list .leads-name-cell small{font-size:11px;line-height:16px;margin-top:1px}
 #product-shell .leads-reference-list .leads-status{line-height:16px;padding:2px 7px}
 #product-shell .leads-reference-list .leads-check{width:40px}
}
