/* Sfera CRM — Customer History Studio 1.125.2.
   Lead / Company unified read-only timeline, adapted from Sfera Activity cards.
   Scoped to #customer-history; no global component overrides. */
#detail-modal #customer-history.sfera-history{
 --hi-ink:var(--co-title,#0e2166);--hi-blue:var(--co-primary,#0b7ff0);
 --hi-border:var(--co-border,#e1e9f4);--hi-muted:var(--co-muted,#7b8da8);
 display:flex;flex-direction:column;gap:0;min-width:0;max-width:100%;width:100%;
 background:#fff;color:var(--hi-ink);padding:clamp(16px,2.3vw,30px) clamp(15px,2.8vw,38px) 48px;
 font-family:"Open Sans",sans-serif;box-sizing:border-box;
}
#detail-modal #customer-history.sfera-history[hidden]{display:none!important}
#customer-history.sfera-history *{box-sizing:border-box}
#customer-history.sfera-history svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
#customer-history.sfera-history :is(button,input,select):focus-visible{outline:2px solid #0b7ff0;outline-offset:2px}
#customer-history.sfera-history button{cursor:pointer}
#customer-history.sfera-history button:disabled{cursor:not-allowed;opacity:.5}
#customer-history.sfera-history .sfera-history__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#detail-modal #customer-history.sfera-history .sfera-history__header{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 padding:0 0 23px;margin:0;border-bottom:1px solid #e9eef6;background:#fff;
}
#customer-history.sfera-history .sfera-history__heading{min-width:0}
#customer-history.sfera-history .sfera-history__eyebrow{margin:0 0 7px;color:var(--hi-blue);font:800 9px "Open Sans",sans-serif;letter-spacing:.11em}
#customer-history.sfera-history .sfera-history__title{margin:0;color:var(--hi-ink);font:750 clamp(22px,2vw,28px)/1.25 Poppins,sans-serif;letter-spacing:-.035em}
#customer-history.sfera-history .sfera-history__subtitle{margin:7px 0 0;color:#8192ab;font:500 11.5px/1.6 "Open Sans",sans-serif;max-width:680px}
#detail-modal #customer-history.sfera-history .sfera-history__refresh{
 display:flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;
 min-height:37px;width:auto;margin:0;padding:8px 13px;
 background:#fff!important;color:#345d84!important;border:1px solid #d4e2f2!important;
 border-radius:9px!important;box-shadow:none!important;
 font:700 11px "Open Sans",sans-serif!important;transition:background .16s,border .16s,transform .16s;
}
#detail-modal #customer-history.sfera-history .sfera-history__refresh:hover{background:#f3f8ff!important;border-color:#bad3ef!important;transform:translateY(-1px)}
#customer-history.sfera-history .sfera-history__refresh svg{width:15px;height:15px}
#customer-history.sfera-history .sfera-history__summary{
 display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0;
 border:1px solid #dfe8f4;border-radius:14px;padding:20px 22px;margin-top:21px;
 background:#fff;box-shadow:0 4px 17px rgba(14,33,102,.043);
}
#customer-history.sfera-history .sfera-history__summary-lead{display:flex;align-items:center;gap:14px;min-width:0}
#customer-history.sfera-history .sfera-history__summary-icon{
 display:grid;place-items:center;flex:0 0 45px;width:45px;height:45px;
 color:#0b7ff0;background:#edf6ff;border:1px solid #dceafb;border-radius:12px;
}
#customer-history.sfera-history .sfera-history__summary-icon svg{width:23px;height:23px}
#customer-history.sfera-history .sfera-history__summary-lead div{display:grid;gap:5px;min-width:0}
#customer-history.sfera-history .sfera-history__summary-lead strong{font:700 13px/1.4 Poppins,sans-serif;color:var(--hi-ink)}
#customer-history.sfera-history .sfera-history__summary-lead small{font:500 10px/1.5 "Open Sans",sans-serif;color:#8395ae}
#customer-history.sfera-history .sfera-history__stats{display:flex;align-items:center;gap:0;flex-shrink:0}
#customer-history.sfera-history .sfera-history__stat{display:flex;align-items:center;gap:9px;padding:0 17px;border-left:1px solid #e6ecf4}
#customer-history.sfera-history .sfera-history__stat:last-child{padding-right:0}
#customer-history.sfera-history .sfera-history__stat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#f0f6fe;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__stat:nth-child(2) .sfera-history__stat-icon{background:#edf7f4;color:#178473}
#customer-history.sfera-history .sfera-history__stat:nth-child(3) .sfera-history__stat-icon{background:#f5f1fb;color:#8064ad}
#customer-history.sfera-history .sfera-history__stat-icon svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__stat>div{display:grid;gap:3px}
#customer-history.sfera-history .sfera-history__stat strong{color:var(--hi-ink);font:750 19px/1.15 Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__stat small{white-space:nowrap;color:#8395ae;font-size:10px}
#customer-history.sfera-history .sfera-history__workspace{display:grid;grid-template-columns:minmax(0,1fr) 248px;gap:23px;align-items:start;margin-top:26px;min-width:0}
#customer-history.sfera-history .sfera-history__main,#customer-history.sfera-history .sfera-history__aside{min-width:0}
#customer-history.sfera-history .sfera-history__toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
#customer-history.sfera-history .sfera-history__search{
 display:flex;align-items:center;gap:9px;flex:1 1 230px;min-width:170px;
 height:41px;padding:0 12px;border:1px solid #d4e1f2;border-radius:10px;background:#fafcff;color:#8da0bc;
 transition:border-color .17s,box-shadow .17s;
}
#customer-history.sfera-history .sfera-history__search:focus-within{border-color:#0b7ff0;box-shadow:0 0 0 3px rgba(11,127,240,.075)}
#customer-history.sfera-history .sfera-history__search svg{width:16px;height:16px}
#detail-modal #customer-history.sfera-history .sfera-history__search input{
 flex:1;min-width:0;width:100%;height:39px;margin:0;padding:0;border:0;
 background:transparent;box-shadow:none;outline:none;border-radius:0;
 font:500 11px "Open Sans",sans-serif;color:var(--hi-ink);
}
#customer-history.sfera-history .sfera-history__search input::placeholder{color:#95a8bd}
#customer-history.sfera-history .sfera-history__select{
 position:relative;display:flex;align-items:center;gap:7px;flex:0 1 157px;
 min-width:143px;height:41px;padding:0 10px;border:1px solid #d4e1f2;
 border-radius:10px;background:#fff;color:#0b7ff0;
 transition:border-color .17s,background .17s;
}
#customer-history.sfera-history .sfera-history__select:hover{border-color:#b6cff0;background:#fcfdff}
#customer-history.sfera-history .sfera-history__select>svg:first-child{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__select>svg:last-child{width:12px;height:12px;color:#8ca0b7;pointer-events:none}
#detail-modal #customer-history.sfera-history .sfera-history__select select{
 appearance:none;flex:1;width:100%;min-width:0;height:38px;margin:0;padding:0;border:0;outline:0;
 color:#2b4a73;background:transparent;box-shadow:none;font:700 10.5px "Open Sans",sans-serif;cursor:pointer;
}
#customer-history.sfera-history .sfera-history__select:focus-within{border-color:#0b7ff0;box-shadow:0 0 0 3px rgba(11,127,240,.075)}
#customer-history.sfera-history .sfera-history__subtools{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap;padding:15px 0 13px;border-bottom:1px solid #e8eef6}
#customer-history.sfera-history .sfera-history__chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#detail-modal #customer-history.sfera-history .sfera-history__chip{
 display:inline-flex;align-items:center;gap:6px;width:auto;min-height:30px;
 padding:7px 11px;margin:0;border:1px solid #e1eaf4;border-radius:999px;
 background:#fff;color:#6e829f;box-shadow:none;
 font:700 10px "Open Sans",sans-serif;
 transition:background .16s,color .16s,border-color .16s;
}
#customer-history.sfera-history .sfera-history__chip svg{width:13px;height:13px}
#detail-modal #customer-history.sfera-history .sfera-history__chip:hover{color:#0b7ff0;border-color:#b6d2f3}
#detail-modal #customer-history.sfera-history .sfera-history__chip.is-active{color:#0b7ff0;border-color:#abd0f8;background:#eef6ff}
#detail-modal #customer-history.sfera-history .sfera-history__compact{
 display:inline-flex;align-items:center;gap:7px;min-height:30px;
 padding:6px 0;margin:0;background:transparent;border:0;color:#7e91a9;box-shadow:none;
 white-space:nowrap;font:650 10.5px "Open Sans",sans-serif;
}
#customer-history.sfera-history .sfera-history__compact svg{width:16px;height:16px}
#detail-modal #customer-history.sfera-history .sfera-history__compact[aria-pressed="true"]{color:#0b7ff0}
#customer-history.sfera-history .sfera-history__search-note{margin:11px 2px 0;color:#91a1b5;font-size:10px;line-height:1.6}
#customer-history.sfera-history .sfera-history__feed-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:22px 0 10px}
#customer-history.sfera-history .sfera-history__feed-heading h4{margin:0;font:700 14px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__shown{font:550 10.5px "Open Sans",sans-serif;color:#8294ae}
#customer-history.sfera-history #customer-history-state{min-width:0;color:#617d9f;font-size:11px;margin:7px 0}
#customer-history.sfera-history #customer-history-state[hidden]{display:none}
#customer-history.sfera-history .sfera-history__list{list-style:none;display:grid;gap:18px;padding:0;margin:0;min-width:0}
#customer-history.sfera-history .sfera-history__day{list-style:none;min-width:0}
#customer-history.sfera-history .sfera-history__day-heading{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 padding:10px 13px;margin-bottom:10px;background:#f7fafd;border:1px solid #e7edf6;border-radius:9px;
}
#customer-history.sfera-history .sfera-history__day-heading strong{font:700 11px Poppins,sans-serif;color:#435d7e}
#customer-history.sfera-history .sfera-history__day-heading span{font:600 10px "Open Sans",sans-serif;color:#9aabc0}
#customer-history.sfera-history .sfera-history__day-events{
 display:grid;gap:11px;position:relative;list-style:none;margin:0 0 0 19px;padding:0 0 0 19px;
 border-left:1px solid #dde7f3;
}
#customer-history.sfera-history .sfera-history__event{
 list-style:none;position:relative;min-width:0;padding:17px 18px 13px;
 border:1px solid #e0e9f6;border-radius:13px;background:#fff;
 box-shadow:0 3px 14px rgba(14,33,102,.045);
 animation:hi-event-enter .32s both;animation-delay:calc(var(--order,0) * 24ms);
 transition:border-color .17s,box-shadow .17s,transform .17s;
}
@keyframes hi-event-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
#customer-history.sfera-history .sfera-history__event:before{
 content:"";position:absolute;top:25px;left:-25px;width:9px;height:9px;
 border-radius:50%;background:#9dc9f5;border:3px solid #fff;box-shadow:0 0 0 1px #bfd7ef;
}
#customer-history.sfera-history .sfera-history__event:hover{
 border-color:#c9dcf2;box-shadow:0 5px 16px rgba(14,33,102,.055);transform:translateY(-1px);
}
#customer-history.sfera-history .sfera-history__event-head{display:flex;align-items:flex-start;gap:12px;min-width:0}
#customer-history.sfera-history .sfera-history__event-icon{
 display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;
 border-radius:10px;color:#0b7ff0;background:#edf5ff;
}
#customer-history.sfera-history .sfera-history__event-icon svg{width:18px;height:18px}
#customer-history.sfera-history .sfera-history__event-heading{flex:1;min-width:0}
#customer-history.sfera-history .sfera-history__event-heading h5{
 margin:1px 0 5px;color:#0e2166;font:700 12.5px/1.45 Poppins,sans-serif;overflow-wrap:anywhere;
}
#customer-history.sfera-history .sfera-history__event-byline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;color:#7e91ab;font-size:10.5px}
#customer-history.sfera-history .sfera-history__event-byline i{display:block;width:3px;height:3px;flex:none;background:#a4b1c4;border-radius:50%}
#customer-history.sfera-history .sfera-history__event-time{
 flex:none;margin:0;color:#607fa4;font:700 10.5px "Open Sans",sans-serif;
 padding:5px 8px;background:#f2f7fe;border:1px solid #e0eaf8;border-radius:7px;
}
#customer-history.sfera-history .sfera-history__event-desc{margin:12px 0 0 49px;color:#687f9c;font-size:10.7px;line-height:1.65;overflow-wrap:anywhere}
#customer-history.sfera-history .sfera-history__event-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:14px;border-top:1px solid #edf1f7;padding-top:11px}
#customer-history.sfera-history .sfera-history__tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#customer-history.sfera-history .sfera-history__tag{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;color:#567ca8;border:1px solid #e0eaf7;border-radius:7px;background:#f4f8fe;font-size:9.5px;font-weight:700}
#customer-history.sfera-history .sfera-history__tag--deal{color:#8762a4;border-color:#e9e2f3;background:#f8f4fc}
#customer-history.sfera-history .sfera-history__tag--legacy{color:#866a35;border-color:#f2e6c9;background:#fffaf0}
#customer-history.sfera-history .sfera-history__tag--private{color:#63788e;border-color:#e2e8ef;background:#f7f9fc}
#customer-history.sfera-history .sfera-history__event-actions{display:flex;align-items:center;gap:7px}
#detail-modal #customer-history.sfera-history :is(.sfera-history__expand,.sfera-history__detail-link){
 display:inline-flex;align-items:center;gap:6px;width:auto;min-height:30px;margin:0;
 padding:5px 7px;background:transparent;color:#0b71d2;border:0;border-radius:8px;box-shadow:none;
 font:700 10px "Open Sans",sans-serif;
}
#detail-modal #customer-history.sfera-history :is(.sfera-history__expand,.sfera-history__detail-link):not(:disabled):hover{background:#eff7ff;color:#0865ba}
#customer-history.sfera-history .sfera-history__expand svg{width:13px;height:13px;transition:transform .2s}
#customer-history.sfera-history .sfera-history__expand[aria-expanded="true"] svg{transform:rotate(180deg)}
#customer-history.sfera-history .sfera-history__detail-link svg{width:14px;height:14px}
#customer-history.sfera-history .sfera-history__comparison[hidden]{display:none!important}
#customer-history.sfera-history .sfera-history__comparison{animation:hi-reveal .25s ease both}
@keyframes hi-reveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
#customer-history.sfera-history .sfera-history__comparison>div{padding-top:13px;margin-top:11px;border-top:1px solid #edf1f7}
#customer-history.sfera-history .sfera-history__diff{display:grid;grid-template-columns:minmax(0,1fr) 25px minmax(0,1fr);gap:9px;align-items:center}
#customer-history.sfera-history .sfera-history__diff-before,#customer-history.sfera-history .sfera-history__diff-after{
 display:grid;gap:6px;min-width:0;padding:12px;border:1px solid #e4ebf5;border-radius:9px;background:#fafcff;
}
#customer-history.sfera-history .sfera-history__diff-after{border-color:#d7e8f9;background:#f5faff}
#customer-history.sfera-history .sfera-history__diff small{color:#8b9db6;font:800 9px "Open Sans",sans-serif;letter-spacing:.07em}
#customer-history.sfera-history .sfera-history__diff strong{color:#354e71;font:650 11px/1.6 "Open Sans",sans-serif;overflow-wrap:anywhere;white-space:pre-wrap}
#customer-history.sfera-history .sfera-history__diff-after strong{color:#0b639e}
#customer-history.sfera-history .sfera-history__diff-arrow{color:#8aa2bf;text-align:center}
#customer-history.sfera-history .sfera-history__diff-arrow svg{width:17px;height:17px}
#customer-history.sfera-history .sfera-history__restricted{margin:0;padding:11px;border:1px solid #e5eaf1;border-radius:8px;background:#f8fafc;color:#69809f;font-size:11px;line-height:1.6}
#customer-history.sfera-history .sfera-history__event.is-compact{padding:12px 14px 10px}
#customer-history.sfera-history .sfera-history__event.is-compact .sfera-history__event-icon{width:31px;height:31px;flex-basis:31px}
#customer-history.sfera-history .sfera-history__event.is-compact .sfera-history__event-foot{margin-top:9px;padding-top:8px}
#customer-history.sfera-history .sfera-history__event.is-compact .sfera-history__event-heading h5{margin:0 0 4px}
#customer-history.sfera-history .sfera-history__empty{
 display:grid;justify-items:center;gap:11px;padding:42px 16px;border:1px dashed #d5e4f4;border-radius:13px;background:#fbfdff;text-align:center;
}
#customer-history.sfera-history .sfera-history__empty svg{width:27px;height:27px;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__empty strong{font:700 14px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__empty p{margin:0;color:#8293ac;font-size:11px}
#customer-history.sfera-history .sfera-history__skeleton{display:grid;gap:12px;padding:24px;border:1px solid #e2eaf5;border-radius:13px;background:#fff}
#customer-history.sfera-history .sfera-history__skeleton span{height:13px;border-radius:8px;background:#eef3fa;animation:hi-skeleton 1.2s ease-in-out infinite alternate}
#customer-history.sfera-history .sfera-history__skeleton span:nth-child(2){width:70%}
#customer-history.sfera-history .sfera-history__skeleton span:nth-child(3){width:40%}
@keyframes hi-skeleton{to{opacity:.4}}
#detail-modal #customer-history.sfera-history .sfera-history__more{
 display:flex;align-items:center;justify-content:center;gap:9px;align-self:center;
 margin:20px auto 0;padding:9px 16px;min-height:37px;
 border:1px solid #d5e4f4;border-radius:9px;background:#fff;color:#345d84;
 box-shadow:none;font:700 11px "Open Sans",sans-serif;
}
#customer-history.sfera-history .sfera-history__more svg{width:14px;height:14px}
#detail-modal #customer-history.sfera-history .sfera-history__more:hover{background:#f2f8ff;border-color:#b7d5f5}
#customer-history.sfera-history .sfera-history__more[hidden]{display:none!important}
#customer-history.sfera-history .sfera-history__aside{display:grid;gap:15px}
#customer-history.sfera-history .sfera-history__insight,
#customer-history.sfera-history .sfera-history__recent{
 display:grid;gap:14px;padding:18px 17px;border:1px solid #dfe8f4;border-radius:13px;
 background:#fff;box-shadow:0 3px 14px rgba(14,33,102,.04);
}
#customer-history.sfera-history .sfera-history__insight-head{display:flex;align-items:center;gap:9px}
#customer-history.sfera-history .sfera-history__insight-icon{display:grid;place-items:center;width:33px;height:33px;border-radius:9px;background:#eff6ff;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__insight-icon svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__insight h4,
#customer-history.sfera-history .sfera-history__recent h4{margin:0;font:700 12.5px/1.4 Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__insight-note{margin:0;color:#8a9bb3;font:500 10.4px/1.6 "Open Sans",sans-serif}
#customer-history.sfera-history .sfera-history__bars-title{display:flex;justify-content:space-between;gap:5px}
#customer-history.sfera-history .sfera-history__bars-title span{font:650 10px "Open Sans",sans-serif;color:#56708f}
#customer-history.sfera-history .sfera-history__bars-title small{color:#92a2b8;font-size:9px}
#customer-history.sfera-history .sfera-history__bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;align-items:end;height:81px;border-bottom:1px solid #e6edf6}
#customer-history.sfera-history .sfera-history__bar-col{display:flex;align-items:center;justify-content:end;flex-direction:column;gap:6px;height:100%;min-width:0}
#customer-history.sfera-history .sfera-history__bar{
 display:block;width:min(100%,22px);height:var(--bar-height,5px);border-radius:5px 5px 0 0;background:#bfd8f5;
 transform:scaleY(0);transform-origin:bottom;animation:hi-bar .55s ease both;
}
@keyframes hi-bar{to{transform:scaleY(1)}}
#customer-history.sfera-history .sfera-history__bar-col:nth-child(odd) .sfera-history__bar{background:#83b9f0}
#customer-history.sfera-history .sfera-history__bar-col small{font:700 9px "Open Sans",sans-serif;color:#9aa9ba}
#customer-history.sfera-history .sfera-history__legend{display:grid;gap:8px;padding-top:3px}
#customer-history.sfera-history .sfera-history__legend-row{display:flex;align-items:center;gap:8px;font-size:10px;color:#7286a3}
#customer-history.sfera-history .sfera-history__legend-row span{flex:1}
#customer-history.sfera-history .sfera-history__legend-row strong{color:#315178;font:700 11px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__legend-dot{width:8px;height:8px;border-radius:3px;background:#7bb6ec}
#customer-history.sfera-history .sfera-history__legend-dot--deal{background:#b5a4d4}
#customer-history.sfera-history .sfera-history__recent-list{display:grid;gap:8px}
#detail-modal #customer-history.sfera-history .sfera-history__recent-event{
 display:flex;align-items:center;gap:9px;width:100%;min-width:0;margin:0;padding:8px;
 border:1px solid #e8eff8;border-radius:9px;background:#fbfdff;box-shadow:none;text-align:left;
 transition:border-color .16s,background .16s;
}
#detail-modal #customer-history.sfera-history .sfera-history__recent-event:hover{background:#f2f8ff;border-color:#c7dcf4}
#customer-history.sfera-history .sfera-history__recent-event>span:first-child{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:8px;background:#edf5ff;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__recent-event svg{width:15px;height:15px}
#customer-history.sfera-history .sfera-history__recent-event>span:last-child{display:grid;gap:4px;min-width:0}
#customer-history.sfera-history .sfera-history__recent-event strong{font:700 10px/1.4 "Open Sans",sans-serif;color:#355579;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#customer-history.sfera-history .sfera-history__recent-event small{font:500 9.5px "Open Sans",sans-serif;color:#8ca0b8}
#customer-history.sfera-history .sfera-history__recent-empty{margin:0;color:#8396ad;font-size:10px}
/* Wide, airy drawer — mirrors Opportunity and Contact 1.124.1. */
#customer-history.sfera-history .sfera-history__overlay[hidden]{display:none!important}
#customer-history.sfera-history .sfera-history__overlay{position:fixed;inset:0;z-index:1950;display:flex;justify-content:flex-end}
#detail-modal #customer-history.sfera-history .sfera-history__scrim{
 position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;
 border:0;border-radius:0;background:rgba(12,26,58,.25);box-shadow:none;
}
#customer-history.sfera-history .sfera-history__drawer{
 position:relative;display:flex;flex-direction:column;min-width:0;width:min(550px,100%);height:100%;max-height:100dvh;
 background:#fff;box-shadow:-10px 0 30px rgba(14,33,102,.12);border-left:1px solid #e1e9f4;
 animation:hi-drawer .22s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes hi-drawer{from{opacity:.7;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
#customer-history.sfera-history .sfera-history__drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 18px;border-bottom:1px solid #e6edf6}
#customer-history.sfera-history .sfera-history__drawer-head>div{flex:1;min-width:0}
#customer-history.sfera-history .sfera-history__drawer-head small{font:800 9px "Open Sans",sans-serif;letter-spacing:.08em;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__drawer-head h3{margin:7px 0 0;font:700 19px/1.35 Poppins,sans-serif;color:#0e2166;overflow-wrap:anywhere}
#customer-history.sfera-history .sfera-history__drawer-head p{margin:7px 0 0;color:#8395b0;font-size:11px}
#detail-modal #customer-history.sfera-history .sfera-history__drawer-close{
 display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;padding:8px;margin:0;
 border:1px solid #dbe7f5;border-radius:9px;background:#fff;color:#3c5f8b;box-shadow:none;
}
#customer-history.sfera-history .sfera-history__drawer-close svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__drawer-body{
 display:flex;flex-direction:column;align-items:stretch;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;
 gap:16px;padding:16px 12px 22px;background:#fff;
}
#customer-history.sfera-history .sfera-history__profile{display:flex;align-items:center;gap:12px;padding:7px 6px 9px}
#customer-history.sfera-history .sfera-history__profile-avatar{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:12px;background:#eaf4ff;color:#176dbb;font:750 16px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__profile div{display:grid;gap:4px}
#customer-history.sfera-history .sfera-history__profile strong{color:#0e2166;font:700 13px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__profile small{color:#8595ad;font-size:10px}
#customer-history.sfera-history .sfera-history__detail-section{
 display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;padding:17px 17px 18px;
 border:1px solid #e0e9f6;border-radius:13px;background:#fff;box-shadow:0 3px 14px rgba(14,33,102,.045);
 transition:border-color .17s,box-shadow .17s;
}
#customer-history.sfera-history .sfera-history__detail-section:hover{border-color:#d0e0f5;box-shadow:0 5px 16px rgba(14,33,102,.055)}
#customer-history.sfera-history .sfera-history__detail-section>header{display:flex;align-items:center;gap:10px;margin-bottom:3px}
#customer-history.sfera-history .sfera-history__detail-section>header>span{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border:1px solid #dce8fa;border-radius:9px;background:#eef5ff;color:#0b7ff0}
#customer-history.sfera-history .sfera-history__detail-section>header svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__detail-section>header>div{display:grid;gap:3px}
#customer-history.sfera-history .sfera-history__detail-section h4{margin:0;color:#0e2166;font:700 12px Poppins,sans-serif}
#customer-history.sfera-history .sfera-history__detail-section header small{color:#8597af;font-size:10px}
#customer-history.sfera-history .sfera-history__field{display:flex;align-items:center;gap:10px;min-width:0;min-height:43px;padding:9px;border:1px solid #e8edf6;border-radius:9px;background:#fbfcff}
#customer-history.sfera-history .sfera-history__field-icon{color:#0b7ff0}
#customer-history.sfera-history .sfera-history__field-icon svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__field div{display:grid;gap:4px;flex:1;min-width:0}
#customer-history.sfera-history .sfera-history__field small{font-size:9.5px;color:#8a9bb3}
#customer-history.sfera-history .sfera-history__field strong{color:#294569;font:650 11px/1.55 "Open Sans",sans-serif;overflow-wrap:anywhere;white-space:pre-wrap}
#customer-history.sfera-history .sfera-history__legacy-detail{margin:0;color:#8f7240;font-size:11px;padding:9px 12px;border-radius:9px;background:#fffbf2}
#customer-history.sfera-history .sfera-history__drawer-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 16px calc(13px + env(safe-area-inset-bottom));border-top:1px solid #e7edf6}
#customer-history.sfera-history .sfera-history__drawer-nav{display:flex;align-items:center;gap:7px}
#detail-modal #customer-history.sfera-history :is(.sfera-history__nav-arrow,.sfera-history__copy){
 display:flex;align-items:center;gap:6px;min-height:37px;width:auto;margin:0;padding:8px 11px;
 border:1px solid #d8e5f4;border-radius:9px;background:#fff;color:#436589;box-shadow:none;
 font:700 10.5px "Open Sans",sans-serif;
}
#detail-modal #customer-history.sfera-history .sfera-history__copy{background:#0b7ff0;color:#fff;border-color:#0b7ff0}
#customer-history.sfera-history .sfera-history__nav-arrow svg,#customer-history.sfera-history .sfera-history__copy svg{width:15px;height:15px}
#customer-history.sfera-history .sfera-history__nav-arrow:first-child svg{transform:rotate(180deg)}
#customer-history.sfera-history .sfera-history__copy-feedback{font-size:10px}
@media(max-width:1280px){
 #customer-history.sfera-history .sfera-history__summary{flex-wrap:wrap}
 #customer-history.sfera-history .sfera-history__stats{width:100%;justify-content:space-between}
 #customer-history.sfera-history .sfera-history__stat:first-child{padding-left:0;border:0}
}
@media(max-width:1080px){
 #customer-history.sfera-history .sfera-history__workspace{grid-template-columns:minmax(0,1fr)}
 #customer-history.sfera-history .sfera-history__aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 #customer-history.sfera-history .sfera-history__stats{width:auto}
 #customer-history.sfera-history .sfera-history__stat{padding:0 14px}
}
@media(max-width:740px){
 #detail-modal #customer-history.sfera-history{padding:17px 13px 32px}
 #customer-history.sfera-history .sfera-history__summary{padding:16px;gap:14px}
 #customer-history.sfera-history .sfera-history__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:7px}
 #customer-history.sfera-history .sfera-history__stat{display:grid;justify-items:center;gap:5px;text-align:center;padding:9px 5px;border:1px solid #e8eff8;border-radius:9px}
 #customer-history.sfera-history .sfera-history__stat>div{justify-items:center}
 #customer-history.sfera-history .sfera-history__stat strong{font-size:17px}
 #customer-history.sfera-history .sfera-history__stat small{white-space:normal;font-size:9px}
 #customer-history.sfera-history .sfera-history__toolbar{gap:8px}
 #customer-history.sfera-history .sfera-history__search{flex-basis:100%;width:100%}
 #customer-history.sfera-history .sfera-history__select{flex:1 1 calc(50% - 7px)}
 #customer-history.sfera-history .sfera-history__aside{grid-template-columns:minmax(0,1fr)}
 #customer-history.sfera-history .sfera-history__drawer{margin-top:auto;width:100%;height:min(95dvh,940px);border:0;border-radius:16px 16px 0 0}
 #customer-history.sfera-history .sfera-history__drawer-head{padding:18px 16px}
 #customer-history.sfera-history .sfera-history__drawer-body{padding:14px 9px 20px}
 #customer-history.sfera-history .sfera-history__detail-section{padding:15px 13px 16px}
}
@media(max-width:420px){
 #customer-history.sfera-history .sfera-history__summary-lead strong{font-size:11.5px}
 #customer-history.sfera-history .sfera-history__day-events{margin-left:9px;padding-left:13px}
 #customer-history.sfera-history .sfera-history__event:before{left:-19px}
 #customer-history.sfera-history .sfera-history__event{padding:13px 12px 12px}
 #customer-history.sfera-history .sfera-history__event-head{gap:8px}
 #customer-history.sfera-history .sfera-history__event-icon{flex-basis:31px;width:31px;height:31px}
 #customer-history.sfera-history .sfera-history__event-heading h5{font-size:11.5px}
 #customer-history.sfera-history .sfera-history__event-byline{font-size:9.5px}
 #customer-history.sfera-history .sfera-history__event-time{padding:4px 6px;font-size:9px}
 #customer-history.sfera-history .sfera-history__event-actions{width:100%;justify-content:flex-end}
 #customer-history.sfera-history .sfera-history__diff{grid-template-columns:minmax(0,1fr)}
 #customer-history.sfera-history .sfera-history__diff-arrow{transform:rotate(90deg)}
 #customer-history.sfera-history .sfera-history__select{flex-basis:100%}
 #customer-history.sfera-history .sfera-history__drawer-foot{gap:7px;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){
 #customer-history.sfera-history *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 #customer-history.sfera-history .sfera-history__event:hover,#customer-history.sfera-history .sfera-history__refresh:hover{transform:none!important}
 #customer-history.sfera-history .sfera-history__bar{transform:none!important}
}

/* 1.125.1 — Cronologia shares the Activity / Opportunity content frame.
   Light surfaces, Sfera tokens and no OS-rendered selector popups. */
#detail-modal #customer-history.sfera-history{
 display:block;min-width:0;width:100%;padding:0!important;margin:0;
 background:transparent;border:0;box-shadow:none;
}
#customer-history.sfera-history .sfera-history__layout{
 display:grid;grid-template-columns:minmax(185px,210px) minmax(0,1fr);
 align-items:stretch;min-width:0;min-height:calc(100dvh - 145px);
 border:1px solid var(--hi-border);border-radius:16px;overflow:visible;
 background:#fff;box-shadow:0 3px 20px rgba(14,33,102,.025);
}
#customer-history.sfera-history .sfera-history__identity{
 position:sticky;top:0;align-self:start;display:flex;flex-direction:column;gap:16px;
 height:calc(100dvh - 145px);min-height:450px;max-height:100dvh;min-width:0;
 padding:22px 13px;background:#f8fafc;border-right:1px solid var(--hi-border);
 overflow-y:auto;scrollbar-width:thin;
}
#customer-history.sfera-history .sfera-history__identity-profile{
 display:flex;align-items:center;flex-direction:column;gap:6px;min-width:0;
 padding:14px 10px 17px;text-align:center;border-bottom:1px solid #e9eef6;
}
#customer-history.sfera-history .sfera-history__identity-avatar{
 display:grid;place-items:center;width:52px;height:52px;border:1px solid #d6e5fb;
 border-radius:13px;background:#eaf4ff;color:var(--hi-blue);
 font:700 17px Poppins,sans-serif;
}
#customer-history.sfera-history .sfera-history__identity-profile strong{
 max-width:100%;overflow-wrap:anywhere;color:var(--hi-ink);font:650 13px/1.35 Poppins,sans-serif;
}
#customer-history.sfera-history .sfera-history__identity-profile small{
 color:#71839d;font-size:10px;max-width:100%;overflow-wrap:anywhere;
}
#customer-history.sfera-history .sfera-history__identity-nav{display:grid;gap:3px;min-width:0}
#detail-modal #customer-history.sfera-history .sfera-history__identity-nav button{
 width:100%;min-height:38px;padding:8px 12px;margin:0;border:0;border-radius:9px;
 display:flex;align-items:center;text-align:left;justify-content:flex-start;
 background:transparent;color:#506584;box-shadow:none;
 font:500 12px/1.25 "Open Sans",sans-serif;
 transition:background-color .16s,color .16s,transform .16s;
}
#detail-modal #customer-history.sfera-history .sfera-history__identity-nav button:is(:hover,:focus-visible){
 background:#ebf3ff;color:var(--hi-blue);transform:translateX(2px);
}
#customer-history.sfera-history .sfera-history__page{
 display:flex;flex-direction:column;min-width:0;
 padding:clamp(17px,2vw,30px);background:#fff;border-radius:0 16px 16px 0;
}
#detail-modal #customer-history.sfera-history .sfera-history__header{
 min-height:64px;align-items:center;flex-wrap:wrap;
 padding:0 0 18px;margin:0 0 16px;background:#fff;
 border:0;border-bottom:1px solid #e9eef6;
}
#customer-history.sfera-history .sfera-history__title{
 margin:0;font:700 clamp(22px,2vw,27px)/1.2 Poppins,"Open Sans",sans-serif;
 letter-spacing:-.035em;color:var(--hi-ink);
}
#customer-history.sfera-history .sfera-history__subtitle{
 margin:7px 0 0;color:#697c99;font-size:12px;line-height:1.45;
}
/* Same icon-only refresh button and hover motion as Opportunity Studio. */
#detail-modal #customer-history.sfera-history .sfera-history__refresh{
 display:inline-grid!important;place-items:center;flex:none!important;
 width:35px!important;min-width:35px!important;
 height:35px!important;min-height:35px!important;
 margin:0!important;padding:8px!important;border-radius:9px!important;
 color:#4b668d!important;background:#fff!important;
 border:1px solid #dae5f3!important;box-shadow:none!important;
 transform:none!important;filter:none!important;
}
#detail-modal #customer-history.sfera-history .sfera-history__refresh:is(:hover,:focus-visible){
 background:#fff!important;border-color:#b6cbe6!important;
 color:var(--hi-blue)!important;transform:none!important;filter:none!important;
}
#detail-modal #customer-history.sfera-history .sfera-history__refresh svg{
 display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;
 stroke-linecap:round;stroke-linejoin:round;
 transition:transform .35s ease;
}
#detail-modal #customer-history.sfera-history .sfera-history__refresh:hover svg{
 transform:rotate(35deg);
}
/* Category chips intentionally retain their original, understated 1.125.0 look.
   The base .sfera-history__chip rules above already implement that design. */
/* Fully custom period and author menus: trigger and popup are both HTML/CSS. */
#customer-history.sfera-history .sfera-history__select{
 position:relative;display:block;flex:0 1 176px;min-width:154px;
 height:41px;padding:0;border:0;background:transparent;box-shadow:none;
 z-index:auto;
}
#customer-history.sfera-history .sfera-history__select.is-open{z-index:30}
#detail-modal #customer-history.sfera-history .sfera-history__select-trigger{
 display:flex;align-items:center;gap:8px;justify-content:flex-start;
 width:100%;height:41px;min-height:41px;margin:0;padding:0 11px;
 border:1px solid #d4e1f2;border-radius:10px;background:#fff;
 color:#2b4a73;box-shadow:none;font:700 10.5px/1.2 "Open Sans",sans-serif;
 transition:border-color .16s,box-shadow .16s,background .16s;
}
#detail-modal #customer-history.sfera-history .sfera-history__select-trigger:hover,
#detail-modal #customer-history.sfera-history .is-open>.sfera-history__select-trigger{
 border-color:#a8c9f4;background:#fafdff;
 box-shadow:0 0 0 3px rgba(11,127,240,.075);
}
#customer-history.sfera-history .sfera-history__select-icon{display:grid;place-items:center;color:var(--hi-blue)}
#customer-history.sfera-history .sfera-history__select-icon svg{width:16px;height:16px}
#customer-history.sfera-history .sfera-history__select-text{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#customer-history.sfera-history .sfera-history__select-chevron{display:grid;place-items:center;color:#8297b2;transition:transform .2s}
#customer-history.sfera-history .sfera-history__select-chevron svg{width:13px;height:13px}
#customer-history.sfera-history .is-open .sfera-history__select-chevron{transform:rotate(180deg)}
#customer-history.sfera-history .sfera-history__options[hidden]{display:none!important}
#customer-history.sfera-history .sfera-history__options{
 position:absolute;top:calc(100% + 7px);right:0;left:0;z-index:60;
 min-width:max(100%,185px);max-height:244px;padding:5px;overflow-y:auto;
 border:1px solid #dce8f6;border-radius:11px;background:#fff;
 box-shadow:0 12px 30px rgba(17,47,91,.12);
 transform-origin:top center;animation:hi-menu-enter .16s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes hi-menu-enter{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
#detail-modal #customer-history.sfera-history .sfera-history__option{
 display:flex;align-items:center;justify-content:space-between;gap:8px;
 width:100%;min-height:36px;margin:0;padding:8px 10px;
 border:0;border-radius:7px;background:#fff;color:#466282;
 text-align:left;font:600 11px/1.35 "Open Sans",sans-serif;box-shadow:none;
}
#detail-modal #customer-history.sfera-history .sfera-history__option:is(:hover,:focus-visible){
 background:#edf5ff;color:var(--hi-blue);
}
#detail-modal #customer-history.sfera-history .sfera-history__option[aria-selected="true"]{
 background:#e8f3ff;color:#0966c2;
}
#customer-history.sfera-history .sfera-history__option svg{width:15px;height:15px;opacity:0;color:var(--hi-blue)}
#customer-history.sfera-history .sfera-history__option[aria-selected="true"] svg{opacity:1}
/* A real centered track, with markers sharing the same coordinate. */
#customer-history.sfera-history .sfera-history__day-events{
 position:relative;margin-left:0;padding-left:32px;border-left:0;
}
#customer-history.sfera-history .sfera-history__day-events::before{
 content:"";position:absolute;left:11px;top:2px;bottom:8px;width:2px;border-radius:2px;
 background:#d5e5f8;
}
#customer-history.sfera-history .sfera-history__event::before{
 top:24px;left:-26px;width:12px;height:12px;
 border:3px solid #fff;background:var(--hi-blue);box-shadow:0 0 0 1px #b6d3f5;
}
#customer-history.sfera-history .sfera-history__event--deal::before{
 background:#8973b5;box-shadow:0 0 0 1px #d0c4e6;
}
#customer-history.sfera-history .sfera-history__event{
 transition:border-color .17s,box-shadow .17s,transform .17s;
}
#customer-history.sfera-history .sfera-history__event:hover{
 transform:translateY(-2px);box-shadow:0 8px 22px rgba(14,33,102,.065);
}
/* Semantic before/after states: previous red, current green. */
#customer-history.sfera-history .sfera-history__diff-before{
 background:#fff5f4;border-color:#f3d8d5;
}
#customer-history.sfera-history .sfera-history__diff-before small,
#customer-history.sfera-history .sfera-history__diff-before strong{color:#a13c3e}
#customer-history.sfera-history .sfera-history__diff-after{
 background:#f0faf5;border-color:#cce9d9;
}
#customer-history.sfera-history .sfera-history__diff-after small,
#customer-history.sfera-history .sfera-history__diff-after strong{color:#1b7754}
/* Never inherit the generic dark section-header skin inside history drawers. */
#detail-modal #customer-history.sfera-history :is(
 .sfera-history__insight-head,.sfera-history__drawer-head,.sfera-history__detail-section>header
){background:#fff!important;background-image:none!important;color:var(--hi-ink)!important;}
#detail-modal #customer-history.sfera-history .sfera-history__insight-head{
 padding:0 0 11px;border-bottom:1px solid #e8eef6;
}
#detail-modal #customer-history.sfera-history .sfera-history__detail-section>header{
 padding:0 0 10px;border-bottom:1px solid #edf1f7;
}
#detail-modal #customer-history.sfera-history .sfera-history__drawer-head{
 padding:22px 24px 18px;background:#fff!important;border-bottom:1px solid #e6edf6;
}
#detail-modal #customer-history.sfera-history .sfera-history__drawer-head h3{
 color:var(--hi-ink)!important;font:700 19px/1.35 Poppins,sans-serif!important;
}
#detail-modal #customer-history.sfera-history .sfera-history__detail-section h4,
#detail-modal #customer-history.sfera-history .sfera-history__insight h4{
 color:var(--hi-ink)!important;
}
#detail-modal #customer-history.sfera-history .sfera-history__drawer-close:hover{
 background:#edf5ff;border-color:#b9d7f6;color:var(--hi-blue);
}
#customer-history.sfera-history .sfera-history__detail-section{animation:hi-event-enter .25s both}
@media(max-width:1080px){
 #customer-history.sfera-history .sfera-history__layout{grid-template-columns:180px minmax(0,1fr)}
 #customer-history.sfera-history .sfera-history__identity{padding:16px 9px}
 #customer-history.sfera-history .sfera-history__page{padding:20px 16px}
}
@media(max-width:740px){
 #customer-history.sfera-history .sfera-history__layout{grid-template-columns:minmax(0,1fr);min-height:0}
 #customer-history.sfera-history .sfera-history__identity{
  position:relative;top:auto;min-height:0;height:auto;max-height:none;
  padding:10px 12px;border-right:0;border-bottom:1px solid var(--hi-border);
  overflow:visible;gap:8px;
 }
 #customer-history.sfera-history .sfera-history__identity-profile{
  display:grid;grid-template-columns:35px minmax(0,1fr);grid-template-rows:auto auto;
  gap:1px 9px;justify-items:start;padding:3px 0 10px;text-align:left;
 }
 #customer-history.sfera-history .sfera-history__identity-avatar{grid-row:1/3;width:35px;height:35px;font-size:12px}
 #customer-history.sfera-history .sfera-history__identity-nav{
  display:flex;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:4px;
 }
 #detail-modal #customer-history.sfera-history .sfera-history__identity-nav button{
  width:auto;min-height:34px;flex:0 0 auto;padding:7px 10px;font-size:10.5px;
 }
 #customer-history.sfera-history .sfera-history__page{padding:17px 13px 28px;border-radius:0 0 16px 16px}
 #customer-history.sfera-history .sfera-history__select{flex:1 1 calc(50% - 7px);min-width:0}
 #customer-history.sfera-history .sfera-history__options{min-width:100%}
}
@media(max-width:420px){
 #customer-history.sfera-history .sfera-history__day-events{margin-left:0;padding-left:32px}
 #customer-history.sfera-history .sfera-history__event::before{left:-26px}
 #customer-history.sfera-history .sfera-history__select{flex-basis:100%}
 #customer-history.sfera-history .sfera-history__drawer-head{padding:17px 16px}
}
@media(prefers-reduced-motion:reduce){
 #customer-history.sfera-history .sfera-history__options{animation:none!important}
 #customer-history.sfera-history .sfera-history__identity-nav button:hover{transform:none!important}
}
