/* The deal is a workspace: a shared header and two independently scrolling panes. */
#crm-view:has(#pipeline-customer-panel:not([hidden]))>h1{display:none}
html[data-theme] body #pipeline-customer-panel:not([hidden]){
 --deal-canvas:#eef1ed;--deal-panel:#fffefa;--deal-inset:#f5f3ed;--deal-line:#cbd5cc;--deal-accent:#26774b;
 display:flex;flex-direction:column;height:var(--deal-height,calc(100dvh - 100px));min-height:0;max-height:1100px;
 padding:0;overflow:hidden;background:var(--deal-canvas)!important;border:1px solid var(--deal-line)!important;border-image:none!important;border-radius:8px!important;
}
html[data-theme=dark] body #pipeline-customer-panel:not([hidden]){--deal-canvas:#101619;--deal-panel:#192125;--deal-inset:#232d32;--deal-line:#35464c;--deal-accent:#71d7ab}
html[data-theme=hero] body #pipeline-customer-panel:not([hidden]){--deal-canvas:#e8eee4;--deal-panel:#faf7ef;--deal-inset:#dde7d7;--deal-line:#bdcbbb;--deal-accent:#276b47}
#pipeline-customer-panel .customer-panel-heading{flex:none;margin:0;padding:20px 22px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:0}
#pipeline-customer-panel .customer-panel-heading>div{min-width:0}
#pipeline-customer-panel .customer-panel-heading h2{font-size:clamp(20px,2vw,28px);font-weight:750;margin:0;overflow-wrap:anywhere;line-height:1.25}
#pipeline-customer-panel .deal-card-subtitle{font-size:12px;margin:8px 0 0}
#pipeline-customer-panel .deal-action-bar{display:flex;justify-content:flex-start;flex:none;gap:8px;padding:0 22px 16px;overflow-x:auto;scrollbar-width:thin}
html[data-theme] body #pipeline-customer-panel .deal-action-bar button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex:none;white-space:nowrap;font-size:12px;border:1px solid var(--deal-line)!important;border-radius:5px!important;background:var(--deal-panel)!important;padding:10px 13px}
#pipeline-customer-panel .deal-action-bar svg{display:block;flex:none}
html[data-theme] body #pipeline-customer-panel .deal-action-bar button:first-child{background:var(--deal-accent)!important;color:#082719!important;font-weight:750}
html[data-theme] body #pipeline-customer-panel .deal-action-bar button:first-child span{color:inherit!important}
html:is([data-theme=light],[data-theme=hero]) body #pipeline-customer-panel .deal-action-bar button:first-child{color:#fff!important}
#pipeline-customer-panel .deal-pin-stages{display:flex;align-items:stretch;gap:4px;flex:none;padding:12px 18px;border-block:1px solid var(--deal-line);background:var(--deal-panel);overflow-x:auto;scrollbar-width:thin}
#pipeline-customer-panel .deal-pin-product{display:grid;place-items:center;min-width:38px;font-size:11px;font-weight:800;flex:none}
html[data-theme] body #pipeline-customer-panel .deal-pin-step{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:85px;max-width:112px;flex:1 0 85px;min-height:78px;border:1px solid transparent!important;border-radius:5px!important;background:transparent!important;font-size:10px;line-height:1.25;padding:8px 5px;white-space:normal}
html[data-theme] body #pipeline-customer-panel .deal-pin-step[aria-pressed=true]{border-color:var(--deal-accent)!important;background:var(--deal-inset)!important;box-shadow:inset 0 -3px var(--deal-accent)!important;font-weight:800}
html[data-theme] body #pipeline-customer-panel .deal-pin-step:hover{background:var(--deal-inset)!important}
#pipeline-customer-panel .deal-pin-symbol{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;box-shadow:0 1px 3px #0003}
html[data-theme] body #pipeline-customer-panel .deal-pin-symbol,html[data-theme] body #pipeline-customer-panel .deal-pin-symbol svg{color:#fff!important}
#pipeline-customer-panel .deal-pin-feedback{font-size:12px;margin:0;padding:7px 22px}
#pipeline-customer-panel .deal-pin-feedback:empty{display:none}
#pipeline-customer-panel .customer-workspace{display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);align-items:stretch;gap:0;margin:0;min-height:0;flex:1;overflow:hidden}
html[data-theme] body #pipeline-customer-panel .customer-sidebar{grid-column:1;grid-row:1;position:static;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 16px;background:var(--deal-panel)!important;border:0!important;border-right:1px solid var(--deal-line)!important;border-radius:0!important;box-shadow:none!important}
html[data-theme] body #pipeline-customer-panel .customer-journal{grid-column:2;grid-row:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px 24px;background:var(--deal-canvas)!important;border:0!important;border-radius:0!important;box-shadow:none!important}
#pipeline-customer-panel .deal-info-group{border-bottom:1px solid var(--deal-line);padding:0 0 6px}
html[data-theme] body #pipeline-customer-panel .deal-info-group>summary{padding:17px 0;min-height:48px;font-size:14px;font-weight:800;color:var(--ws-text)!important;cursor:pointer}
#pipeline-customer-panel .deal-information-section{padding:6px 0 17px;border-bottom:0}
#pipeline-customer-panel .deal-information-section h3{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--ws-muted)!important;margin:8px 0 12px}
#pipeline-customer-panel .deal-information-section .customer-info-fields{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px 8px;align-items:baseline;margin:8px 0}
#pipeline-customer-panel .customer-info-fields dt{margin:0;font-size:11px;font-weight:500}
#pipeline-customer-panel .customer-info-fields dd{font-size:12px}
#pipeline-customer-panel .deal-information-section p{font-size:12px;line-height:1.6}
#pipeline-customer-panel .deal-information-section .crm-relation-link{font-size:12px;padding:9px 10px;min-height:40px}
#pipeline-customer-panel .deal-upcoming{display:none}
#pipeline-customer-panel .context-activities{padding:0 0 20px;margin:0 0 24px;border-bottom:1px solid var(--deal-line)}
#pipeline-customer-panel .context-activities>p:empty{display:none}
#pipeline-customer-panel .activity-list{gap:10px}
html[data-theme] body #pipeline-customer-panel .activity-list-row{display:grid;grid-template-columns:26px minmax(0,1fr);gap:5px 10px;padding:16px;background:var(--deal-panel)!important;border:1px solid var(--deal-line)!important;border-radius:6px!important;text-align:left;white-space:normal}
#pipeline-customer-panel .activity-list-row>.activity-kind-icon{grid-column:1;grid-row:1/6;align-self:start}
#pipeline-customer-panel .activity-list-row>:not(.activity-kind-icon){grid-column:2}
#pipeline-customer-panel .activity-row-actions{display:flex;align-items:stretch;gap:5px}
#pipeline-customer-panel .activity-row-actions>.activity-list-row{flex:1;min-width:0}
#pipeline-customer-panel .activity-remove-button{flex:none;align-self:start}
#pipeline-customer-panel .customer-journal>h3{font-size:16px;margin:0 0 12px}
#pipeline-customer-panel .customer-history-tabs{margin:0 0 18px;border:0;padding:0;flex-wrap:wrap;gap:6px}
html[data-theme] body #pipeline-customer-panel .customer-history-tabs button{min-height:36px;background:var(--deal-panel)!important;border:1px solid var(--deal-line)!important;padding:8px 12px;border-radius:5px!important}
html[data-theme] body #pipeline-customer-panel .customer-history-tabs button.active{box-shadow:inset 0 -3px var(--deal-accent)!important;border-color:var(--deal-accent)!important}
#pipeline-customer-panel .customer-timeline{position:relative;margin-top:22px;padding-left:2px}
html[data-theme] body #pipeline-customer-panel .customer-timeline-entry{grid-template-columns:30px minmax(0,1fr);gap:12px;padding:0 0 22px;margin:0;background:transparent!important;border:0!important;border-radius:0!important;position:relative}
#pipeline-customer-panel .customer-timeline-entry:not(:last-child)::after{content:'';position:absolute;left:14px;top:34px;bottom:0;border-left:1px solid var(--deal-line)}
#pipeline-customer-panel .customer-timeline-entry>div{min-width:0;background:var(--deal-panel);border:1px solid var(--deal-line);border-radius:6px;padding:12px 16px}
html[data-theme] body #pipeline-customer-panel .customer-event-icon{background:var(--deal-inset);border:1px solid var(--deal-line)!important;border-radius:50%!important;color:var(--ws-text)!important}
html[data-theme] body #pipeline-customer-panel .customer-history-open{padding:0;min-height:30px;background:transparent!important;border:0!important;text-align:left;font-size:14px;font-weight:750;box-shadow:none!important}
#pipeline-customer-panel .customer-history-open:hover{text-decoration:underline}
#pipeline-customer-panel .customer-timeline-entry p{padding-top:10px;border-top:1px solid var(--deal-line);font-size:13px}
html[data-theme] body #pipeline-customer-panel .customer-log{background:var(--deal-panel)!important;border:1px solid var(--deal-line)!important;border-radius:6px!important}
#pipeline-customer-panel .deal-pane-switch{display:none}
.deal-pin-dialog form>button{margin-right:8px;min-height:44px}
@media(max-width:900px){
 html[data-theme] body #pipeline-customer-panel:not([hidden]){height:var(--deal-height,calc(100dvh - 84px));min-height:0}
 #pipeline-customer-panel .customer-panel-heading{padding:14px 12px 10px}
 #pipeline-customer-panel .customer-panel-heading h2{font-size:20px}
 #pipeline-customer-panel .customer-panel-heading>button{min-width:82px}
 #pipeline-customer-panel .deal-action-bar{padding:0 12px 12px;gap:6px}
 #pipeline-customer-panel .deal-pin-stages{padding:8px}
 html[data-theme] body #pipeline-customer-panel .deal-pin-step{min-width:75px;flex-basis:75px;min-height:70px}
 #pipeline-customer-panel .deal-pane-switch{display:flex;gap:6px;padding:8px 12px;background:var(--deal-panel);border-bottom:1px solid var(--deal-line);flex:none}
 #pipeline-customer-panel .deal-pane-switch button{flex:1;min-height:42px;font-size:12px}
 #pipeline-customer-panel .deal-pane-switch button[aria-pressed=true]{box-shadow:inset 0 -3px var(--deal-accent)!important}
 #pipeline-customer-panel .customer-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
 html[data-theme] body #pipeline-customer-panel .customer-workspace>:is(.customer-sidebar,.customer-journal){grid-column:1;grid-row:1;min-height:0;height:100%;max-height:none;overflow:auto;overscroll-behavior:contain;position:static}
 #pipeline-customer-panel[data-mobile-pane=journal] .customer-sidebar,#pipeline-customer-panel[data-mobile-pane=information] .customer-journal{display:none!important}
 html[data-theme] body #pipeline-customer-panel .customer-journal{padding:16px 12px}
 html[data-theme] body #pipeline-customer-panel .customer-sidebar{padding:0 14px;border:0!important}
 #pipeline-customer-panel .customer-timeline-entry>div{padding:10px 12px}
 #pipeline-customer-panel .customer-history-tabs button{flex:1}
}

#pipeline-customer-panel .deal-activity-note{font-size:12px;margin:8px 0 0;padding-top:9px;border-top:1px solid var(--deal-line);white-space:pre-wrap;line-height:1.5;overflow-wrap:anywhere}

#pipeline-customer-panel :is(.deal-action-bar,.deal-pin-stages){margin:0;width:100%;max-width:none;box-sizing:border-box}
#pipeline-customer-panel .deal-activity-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
#pipeline-customer-panel .activity-list-row>.deal-activity-meta{grid-column:2}
#pipeline-customer-panel .activity-list-row>.deal-activity-meta span+span::before{content:"·";margin-right:10px}
html[data-theme] body #pipeline-customer-panel :is(.deal-action-bar button,.deal-pin-step,.activity-list-row,.customer-history-open,.customer-history-tabs button){color:var(--ws-text)!important}
html[data-theme] body #pipeline-customer-panel :is(.deal-action-bar button,.deal-pin-step,.activity-list-row,.customer-history-open,.customer-history-tabs button) :is(span,strong,time,p,small){color:inherit!important}
html[data-theme] body #pipeline-customer-panel .deal-pin-symbol svg{color:#fff!important}
html[data-theme] body #pipeline-customer-panel .deal-action-bar button:first-child{color:#082719!important}
html:is([data-theme=light],[data-theme=hero]) body #pipeline-customer-panel .deal-action-bar button:first-child{color:#fff!important}
html[data-theme] body #pipeline-customer-panel .deal-information-section .crm-relation-link{background:var(--deal-inset)!important;color:var(--ws-text)!important;border-color:var(--deal-line)!important}

#pipeline-customer-panel .activity-quick-complete{flex:none;align-self:start;min-height:44px}
#pipeline-customer-panel .deal-activity-status{font-weight:700}
#pipeline-customer-panel .deal-activity-status[data-status=overdue]{color:var(--ui-danger, #d75454)}
#pipeline-customer-panel .activity-action-error{flex-basis:100%}
@media(max-width:600px){#pipeline-customer-panel .activity-row-actions{flex-wrap:wrap}#pipeline-customer-panel .activity-row-actions>.activity-list-row{flex-basis:100%}}
