.customer-panel{position:fixed;top:calc(var(--workspace-header-height,72px) + 12px);left:244px;bottom:16px;width:min(560px,calc(100vw - 276px));background:white;z-index:106;border:1px solid #d9e4ef;border-radius:16px;padding:22px;box-shadow:0 16px 60px #18355233;overflow-y:auto}.customer-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.customer-heading h2{font-size:19px;overflow-wrap:anywhere}.customer-heading small{font-size:10px;letter-spacing:1.5px;color:#6a7f95}.customer-heading button{width:auto;font-size:12px}.customer-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.customer-panel label,.customer-dialog label{display:grid;gap:6px;font-size:13px}.customer-panel input,.customer-panel textarea,.customer-dialog input{width:100%;min-width:0;padding:10px;border:1px solid #dae3ed;border-radius:8px;font:inherit}.customer-panel form{display:grid;gap:12px;margin:16px 0}.customer-panel button{min-height:40px;font-size:13px}.customer-panel article,.dnd-list article{padding:12px 0;border-bottom:1px solid #e2eaf2;overflow-wrap:anywhere}.customer-panel article p{font-size:13px;margin:5px 0;white-space:pre-wrap}.customer-panel article small{color:#718197}.customer-blocked{color:#b42438;background:#fff0f0;padding:10px;border-radius:8px}#customerMessage,.customer-message{color:#a03333;font-size:13px}.customer-search{margin-bottom:16px}.customer-search form{display:flex;gap:8px;justify-content:flex-end}.customer-search input{max-width:300px;min-width:0}.customer-dialog{width:min(700px,calc(100vw - 32px));border:1px solid #dce5ef;border-radius:16px;padding:24px;max-height:85dvh;overflow:auto}.customer-dialog::backdrop{background:#182b4966}.customer-dialog form{display:grid;gap:12px}.customer-close{float:right}.customer-panel[hidden]{display:none!important}@media(max-width:900px){.customer-panel{left:16px;right:16px;width:auto;bottom:92px}.customer-grid{grid-template-columns:1fr}.customer-search form{justify-content:stretch}.customer-search input{width:100%}}

/* v4.3.1: customer workspace beside the existing workflow navigation. */
.customer-panel{position:relative;inset:auto;left:auto;right:auto;top:auto;bottom:auto;width:100%;max-width:none;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;gap:0;padding:0;margin:0 0 24px;border:1px solid #dae4ef;box-shadow:0 6px 24px #18355208;overflow:visible;z-index:auto;scroll-margin-top:calc(var(--workspace-header-height,72px) + 16px)}
.customer-details-column,.customer-history-column{min-width:0;padding:24px}.customer-history-column{border-left:1px solid #e1e8f0;align-self:stretch;background:#fbfcff;border-radius:0 16px 16px 0}.customer-history-column>h3{margin:0 0 6px;font-size:18px}.customer-heading h2{font-size:20px;margin:6px 0;line-height:1.4}.customer-heading{align-items:flex-start}.customer-heading button{background:#edf3fa;color:#405675;flex-shrink:0;min-height:36px}.customer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-panel label{font-size:13px;color:#465b73}.customer-panel input,.customer-panel textarea{background:#fff;font-size:14px}.customer-panel h3{font-size:16px}.customer-panel article{padding:14px 0}.customer-panel article strong{font-size:13px;line-height:1.6}.customer-panel article p{line-height:1.6}.customer-panel #customerComments{max-height:240px;overflow-y:auto}.customer-panel #customerCalls article:last-child{border-bottom:0}.customer-panel #customerCalls{min-height:120px}.customer-panel #customerBlock{background:#fff2f1;color:#a6303d}.customer-panel #customerDnd{font-size:12px}.customer-panel form button{justify-self:start;padding:10px 18px}.customer-search form{justify-content:flex-start}.customer-panel:focus-within{border-color:#b8cce6}
@media(max-width:1150px){.customer-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.customer-details-column,.customer-history-column{padding:18px}.customer-grid{grid-template-columns:1fr}}
@media(max-width:760px){.customer-panel{grid-template-columns:1fr;width:100%;inset:auto}.customer-history-column{border-left:0;border-top:1px solid #e1e8f0;border-radius:0 0 16px 16px}.customer-heading h2{font-size:18px}.customer-panel input,.customer-panel textarea{font-size:16px}}

body.ui-agent .incoming{inset:auto 16px auto auto;top:calc(var(--workspace-header-height,72px) + 12px);width:min(320px,calc(100vw - 32px));height:auto;background:transparent;z-index:120;padding:0}body.ui-agent .incoming-box{width:100%;padding:18px;box-shadow:0 12px 48px #182b4940;border:1px solid #cfdeee;border-radius:14px;max-height:calc(100dvh - var(--workspace-header-height,72px) - 32px)}

#customerSaveStatus{font-size:13px;margin:0;line-height:1.5}.save-success{color:#23754d}.save-failed{color:#b32942;font-weight:600}
/* v4.4: 25% narrower on wide displays, about 10% tighter vertically. */
@media(min-width:1200px){.customer-panel{width:75%;min-width:0}.customer-details-column,.customer-history-column{padding-top:21px;padding-bottom:21px}.customer-panel form{gap:10px;margin:14px 0}.customer-panel article{padding-top:12px;padding-bottom:12px}.customer-panel textarea{padding-top:8px;padding-bottom:8px}.customer-panel #customerCommentForm textarea{height:64px}.customer-panel .customer-grid{gap:10px}}
@media(max-width:1199px){.customer-panel{width:100%;min-width:0}}
.wrapup-banner{padding:12px 16px;background:#fff4df;border:1px solid #f2d290;border-radius:10px;color:#704e16;font-size:14px}.wrapup-banner button{font-size:12px;padding:7px 10px;margin:4px}#dispositionDialog [hidden]{display:none!important}

/* Customer records opened from call history stay above the current list. */
.customer-record-popup{box-sizing:border-box;width:min(1000px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid #d5e3ef;border-radius:16px;background:#fff;color:#153550;box-shadow:0 24px 80px #14284140;overflow:auto;scrollbar-width:none}
.customer-record-popup::backdrop{background:#152b4566}.customer-record-popup::-webkit-scrollbar{display:none}
.customer-record-popup .customer-panel{width:100%;margin:0;border:0;border-radius:0;box-shadow:none;scroll-margin:0}
.customer-record-popup .customer-heading button{min-width:60px}.customer-record-popup :focus-visible{outline:3px solid #ed9200;outline-offset:2px}
@media(max-width:760px){.customer-record-popup{width:calc(100vw - 20px);max-height:calc(100dvh - 24px)}.customer-record-popup .customer-panel{grid-template-columns:1fr}.customer-record-popup .customer-details-column,.customer-record-popup .customer-history-column{padding:16px}}

/* Floating nonmodal customer window: call controls and workspace stay usable. */
body .customer-record-popup{position:fixed;inset:auto;left:max(16px,calc((100vw - 1260px)/2));top:calc(var(--workspace-header-height,72px) + 16px);width:min(920px,calc(100vw - 380px));max-height:calc(100dvh - var(--workspace-header-height,72px) - 40px);margin:0;z-index:110;box-shadow:0 16px 64px #14284140}
body .customer-window-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}body .customer-panel .customer-window-actions button{display:grid;place-items:center;box-sizing:border-box;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:0!important;border:1px solid #dce7ef;border-radius:50%;background:#edf5fa;color:#254763;font-size:22px;line-height:1}
.customer-restore{position:fixed;bottom:20px;left:24px;z-index:115;max-width:calc(100vw - 120px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:10px 16px;min-height:42px;border:1px solid #b7d9e9;border-radius:10px;background:#007eb8;color:white;box-shadow:0 6px 24px #18355230;font-size:13px}
@media(max-width:900px){body .customer-record-popup{left:16px;width:calc(100vw - 32px)}}
@media(max-width:540px){body .customer-record-popup{left:10px;width:calc(100vw - 20px);top:calc(var(--workspace-header-height,72px) + 10px)}body .customer-panel .customer-window-actions button{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}.customer-restore{left:14px;bottom:16px}}
body .customer-record-popup .customer-window-actions{position:absolute;right:14px;top:14px;z-index:2}body .customer-record-popup .customer-history-column>h3{padding-right:74px}@media(max-width:760px){body .customer-record-popup .customer-heading{padding-right:88px}body .customer-record-popup .customer-history-column>h3{padding-right:0}}
