/* Call history: a focused list and a contact timeline, with mobile drill-down. */
#view-history .history-direction.abandoned{color:#bd3f50}
#view-history .history-queue-line{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:7px;flex-wrap:wrap;font-size:13px;color:#637587}
#view-history .queue-state-pill{display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:550;padding:4px 8px;border:1px solid #d5dee7;border-radius:20px;background:#f0f3f7;color:#607083;white-space:nowrap}
#view-history .queue-state-pill.state-0{color:#a13749;background:#fff0f3;border-color:#edc9d1}
#view-history .queue-state-pill.state-1{color:#315d90;background:#edf3fc;border-color:#c5d5ea}
#view-history .queue-state-pill.state-2{color:#28684d;background:#edf7f0;border-color:#bedecb}
#view-history .queue-followup{margin:0 0 24px;border-bottom:1px solid #e1e6ec;padding-bottom:20px}
#view-history .queue-followup-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
#view-history .queue-followup-heading h3{margin:0}
#view-history .queue-call-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;margin:18px 0}
#view-history .queue-call-facts>div:last-child{grid-column:1/-1}
#view-history .queue-call-facts dt{font-size:14px;color:#687b8d;margin-bottom:4px}
#view-history .queue-call-facts dd{font-size:16px;color:#304457;margin:0;overflow-wrap:anywhere;line-height:1.4}
#view-history .queue-state-actions{display:flex;gap:10px;flex-wrap:wrap}
#view-history .queue-state-actions button{width:auto;min-height:44px;flex:1 1 170px;min-width:0;padding:10px 12px;border:1px solid #cfd9e4;border-radius:6px;background:#fff;color:#344c63;font-size:15px;line-height:1.4;text-align:center}
#view-history .queue-state-actions button[aria-pressed=true]{background:#edf2f7;border-color:#a9bbcf;color:#253e59}
#view-history #calls-queue-feedback{font-size:14px;color:#5e7285;line-height:1.5;margin:12px 0 6px}
#view-history .queue-followup>small{display:block;font-size:13px;color:#6b7d8d;line-height:1.5}
#view-history .queue-timeline-info{font-size:14px;color:#617589;overflow-wrap:anywhere}
@media(max-width:699px){#view-history .calls-toolbar.is-queue-mode #calls-filter{flex-basis:100%;width:100%}#view-history .calls-toolbar.is-queue-mode #calls-days,#view-history .calls-toolbar.is-queue-mode #calls-deal-filter{flex:1 1 120px;width:0}#view-history .queue-state-actions{flex-direction:column;gap:8px}#view-history .queue-state-actions button{flex:none;width:100%;font-size:16px;min-height:46px}#view-history .queue-call-facts{gap:10px;margin:14px 0}#view-history .queue-call-facts dd{font-size:15px}#view-history .queue-timeline-info{flex-basis:100%;order:4}#view-history .queue-followup{margin-bottom:18px}}
#view-history .calls-workspace{overflow:hidden}
#view-history .calls-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 18px;border-bottom:1px solid var(--line)}
#view-history .calls-search-box{flex:1 1 300px;position:relative;min-width:0;display:flex;align-items:center}
#view-history .calls-search-box>svg{position:absolute;left:13px;width:19px;height:19px;color:#687787;pointer-events:none}
#view-history #calls-search{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 42px;border:1px solid #dce2e8;border-radius:6px;font-size:16px;background:#f6f8fa}
#view-history #calls-search-clear{position:absolute;right:0;width:40px;height:44px;font-size:22px}
#view-history .calls-toolbar select{width:auto;max-width:220px;min-height:44px;margin:0;padding:9px 32px 9px 12px;border:1px solid #d7dfe6;border-radius:6px;font-size:15px;background:#fff}
#view-history .calls-toolbar>button{width:auto;min-height:44px;min-width:44px;padding:9px 12px;font-size:15px;border:1px solid #d7dfe6;border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:center;gap:7px;color:#304354}
#view-history .calls-toolbar>button>svg{width:19px;height:19px}
#view-history .calls-utility{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 18px;border-bottom:1px solid #e2e7ec;background:#fbfcfd}
#view-history #history-source{display:block;flex:1;min-width:0;border:0;border-radius:0;margin:0;padding:0;background:transparent;color:#5f6f7e}
#view-history #history-source summary{cursor:pointer;min-height:32px;display:list-item;list-style:disclosure-closed;font-size:14px;padding:7px 0;line-height:1.4;color:#5d6d7c}
#view-history #history-source[open] summary{list-style:disclosure-open}
#view-history #history-source.source-ready summary{color:#2c6956}
#view-history #history-source p{font-size:14px;line-height:1.5;margin:4px 0 10px;max-width:850px}
#view-history #calls-note{font-size:13px;color:#617181;margin:0}
#view-history .calls-layout{display:grid;grid-template-columns:minmax(310px,31%) minmax(0,1fr);height:var(--calls-pane-height,calc(100dvh - 320px));min-height:280px;max-height:900px}
#view-history .calls-list-pane{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid #dce3ea;background:#fff}
#view-history .calls-list-heading{padding:10px 16px;font-size:14px;color:#657483;border-bottom:1px solid #edf0f3;min-height:38px}
#view-history #call-log{overflow-y:auto;min-height:0;flex:1;padding:6px;overscroll-behavior:contain;scrollbar-gutter:stable}
:is(#view-history,#view-chat,#view-contacts) .history-entry{display:flex;align-items:center;gap:5px;border:1px solid transparent;border-radius:7px;padding:0 4px;margin-bottom:3px;min-width:0}
:is(#view-history,#view-chat,#view-contacts) .history-entry:hover{background:#f5f8fb}
:is(#view-history,#view-chat,#view-contacts) .history-entry.selected{background:#eef2f7;border-color:#dce5ef}
:is(#view-history,#view-chat,#view-contacts) .history-entry-main{flex:1;min-width:0;display:flex;gap:11px;align-items:center;width:100%;background:transparent;border:0;text-align:left;color:#253340;padding:12px 7px;min-height:76px;border-radius:5px}
:is(#view-history,#view-chat,#view-contacts) .history-avatar,#view-history .history-person-avatar{position:relative;flex:none;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#e5ebf2;color:#4e6074;font-size:15px}
:is(#view-history,#view-chat,#view-contacts) .history-avatar .status-dot{position:absolute;bottom:0;right:0;width:11px;height:11px;border:2px solid #fff;margin:0}
:is(#view-history,#view-chat,#view-contacts) .history-entry-text{min-width:0;flex:1;display:block}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name{display:flex;align-items:baseline;gap:7px;min-width:0;flex-wrap:wrap}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name strong{font-size:16px;font-weight:550;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0;max-width:100%}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name small{font-size:13px;line-height:1.4;color:#647589;overflow-wrap:anywhere}
:is(#view-history,#view-chat,#view-contacts) .history-entry-time{display:flex;align-items:center;gap:6px;color:#647487;font-size:13px;margin-top:5px;flex-wrap:wrap}
:is(#view-history,#view-chat,#view-contacts) .history-entry-duration{margin-left:auto;font-variant-numeric:tabular-nums}
#view-history .history-direction{display:inline-flex;align-items:center;justify-content:center;font-size:17px;width:22px;flex:none;font-weight:600;line-height:1;color:#607489}
#view-history .history-direction.missed,#view-history .history-direction.unanswered{color:#bc3c50}
#view-history .history-direction.outgoing{color:#2b8059}
#view-history .history-direction.incoming{color:#2a78b1}
:is(#view-history,#view-chat,#view-contacts) .history-entry-call{width:36px;height:44px;min-height:44px;flex:none;border:0;background:transparent;color:#52677d;border-radius:5px;padding:9px}
:is(#view-history,#view-chat,#view-contacts) .history-entry-call svg{width:19px;height:19px}
:is(#view-history,#view-chat,#view-contacts) .history-entry-call:hover:not(:disabled){background:#e1ebf5;color:#174a7c}
#view-history button:disabled{opacity:.45;cursor:not-allowed}
#view-history .history-list-empty{padding:35px 18px;color:#647587;font-size:16px;text-align:center;line-height:1.5}
#view-history .calls-list-footer{padding:10px 12px;display:flex;flex-direction:column;gap:8px;border-top:1px solid #e5eaf0}
#view-history .calls-list-footer:has(button[hidden]):not(:has(button:not([hidden]))){display:none}
#view-history .calls-list-footer button{font-size:15px;min-height:44px;width:100%;justify-content:center;white-space:normal}
#view-history .calls-detail{min-width:0;min-height:0;overflow:hidden;background:#fff;display:flex;flex-direction:column}
#view-history #calls-detail-content{min-height:0;display:flex;flex-direction:column;flex:1}
#view-history #calls-detail-content[hidden]{display:none}
#view-history .history-contact-header{flex:none;padding:18px 20px;border-bottom:1px solid #e0e6ec;position:relative}
#view-history .history-contact-person{display:flex;align-items:center;gap:13px;padding-right:42px;min-width:0}
#view-history .history-person-avatar{width:50px;height:50px;font-size:18px}
#view-history .history-contact-person>div{min-width:0;flex:1}
#view-history #calls-person-name{font-size:21px;font-weight:550;line-height:1.35;overflow-wrap:anywhere}
#view-history #calls-person-number{font-size:15px;color:#65768a;margin-top:3px;overflow-wrap:anywhere}
#view-history .history-person-presence{font-size:14px;display:inline-block;border-radius:5px;padding:3px 7px;background:#f0f3f6;color:#5a6b7e;margin-top:5px}
#view-history .history-person-presence.available{background:#edf6f0;color:#2b6c50}
#view-history .history-person-presence.busy,#view-history .history-person-presence.dnd{background:#faedf0;color:#a13950}
#view-history .history-person-presence.away{background:#edf2fa;color:#426f9a}
#view-history #calls-detail-close{position:absolute;right:10px;top:10px;min-width:44px;width:44px;height:44px;font-size:24px}
#view-history #calls-detail-back{display:none}
#view-history .history-contact-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:17px}
#view-history .history-contact-actions button{width:auto;min-width:105px;min-height:44px;padding:10px 14px;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px}
#view-history .history-contact-actions svg{width:18px;height:18px}
#view-history .history-contact-body{overflow-y:auto;min-height:0;flex:1;padding:18px 20px;overscroll-behavior:contain}
#view-history .history-contact-body h3{font-size:19px;font-weight:550;margin:0 0 6px}
#view-history #calls-contact-summary{font-size:14px;color:#63758a;line-height:1.5;margin-bottom:18px}
#view-history .history-day{font-size:14px;color:#6c7989;font-weight:500;display:flex;gap:12px;align-items:center;margin:22px 0 12px;line-height:1.4}
#view-history .history-day:after{content:'';height:1px;background:#e4e9ee;flex:1}
#view-history .history-timeline-row{display:flex;align-items:center;gap:10px;min-height:48px;border:1px solid #e0e6ed;border-radius:6px;padding:12px;margin-bottom:10px;color:#344455}
#view-history .history-timeline-row.is-selected{border-color:#b1c5dd;background:#f8fafd}
#view-history .history-timeline-row strong{font-size:15px;font-weight:500;min-width:0}
#view-history .history-timeline-duration,#view-history .history-timeline-row time{font-size:14px;color:#62758b;font-variant-numeric:tabular-nums}
#view-history .history-timeline-row time{margin-left:auto;flex:none}
#view-history #calls-detail-empty{margin:auto;text-align:center;color:#6c7c8e;padding:35px;line-height:1.6;font-size:17px}
#view-history .history-insights{border-top:1px solid var(--line);background:#fbfcfd}
#view-history .history-insights summary{min-height:44px;padding:14px 18px;color:#596c81;font-size:15px;cursor:pointer}
#view-history .history-insights .metrics{margin:0 18px 18px}
#view-history .history-insights .metrics strong{font-size:24px}
#view-history .history-insights .metrics small{font-size:14px}
#view-history .audit-card{margin-top:18px}
@media(min-width:1500px){#view-history .calls-layout{grid-template-columns:minmax(360px,29%) minmax(0,1fr)}}
@media(min-width:700px) and (max-width:1000px){#view-history .calls-layout{grid-template-columns:280px minmax(0,1fr);height:var(--calls-pane-height,calc(100dvh - 340px));min-height:280px}#view-history .calls-search-box{flex-basis:100%}#view-history .history-contact-header,#view-history .history-contact-body{padding:16px}#view-history .history-contact-actions{gap:7px}#view-history .history-contact-actions button{min-width:0;padding:10px 12px;font-size:15px}#view-history .history-timeline-row{gap:7px;flex-wrap:wrap}#view-history .history-timeline-row strong{font-size:15px}#view-history .history-person-avatar{display:none}#view-history #calls-person-name{font-size:20px}}
@media(max-width:699px){
  #view-history.history-detail-open .calls-toolbar,#view-history.history-detail-open .calls-utility,#view-history.history-detail-open .calls-list-pane,#view-history.history-detail-open .history-insights,#view-history.history-detail-open .audit-card{display:none}
  #view-history .calls-toolbar{padding:12px;gap:8px}#view-history .calls-search-box{flex:1 1 100%}#view-history .calls-toolbar select{flex:1;min-width:0;max-width:none;width:0;font-size:16px;padding-left:8px}#view-history .calls-toolbar>button{font-size:14px}#view-history .calls-utility{padding:8px 12px;gap:0}#view-history #history-source{flex-basis:100%}#view-history #history-source summary{font-size:14px;min-height:40px;padding:10px 0}#view-history #calls-note{font-size:13px;margin-bottom:5px}
  #view-history .calls-layout{display:block;min-height:0;height:auto;max-height:none}#view-history .calls-list-pane{border-right:0;min-height:250px}#view-history #call-log{max-height:none;overflow:visible;scrollbar-gutter:auto}:is(#view-history,#view-chat,#view-contacts) .history-entry-main{padding:12px 8px;min-height:78px}:is(#view-history,#view-chat,#view-contacts) .history-entry-call{width:44px;height:44px}:is(#view-history,#view-chat,#view-contacts) .history-entry-name strong{font-size:17px}:is(#view-history,#view-chat,#view-contacts) .history-entry-time{font-size:14px}:is(#view-history,#view-chat,#view-contacts) .history-entry-name small{font-size:14px}#view-history .calls-detail{display:none}
  #view-history.history-detail-open .calls-detail{position:fixed;left:0;right:0;top:calc(var(--visible-top,0px) + 60px);height:calc(var(--visible-height,100dvh) - 60px);z-index:25;display:flex;padding-bottom:env(safe-area-inset-bottom)}body:has(#view-history.history-detail-open:not([hidden])){overflow:hidden}
  #view-history #calls-detail-back{display:flex;align-items:center;min-height:44px;font-size:16px;color:#28578a;padding:8px 0;margin:-6px 0 8px}#view-history #calls-detail-close{top:8px;right:10px}#view-history .history-contact-header{padding:12px 16px;flex-shrink:0}#view-history .history-contact-person{padding-right:0}#view-history .history-contact-person>div{min-width:0}#view-history #calls-person-name{font-size:21px}#view-history .history-contact-actions{gap:8px;margin-top:12px}#view-history .history-contact-actions button{flex:1;min-width:0;padding:10px 8px;font-size:15px}#view-history .history-contact-body{padding:16px}#view-history .history-timeline-row{flex-wrap:wrap;gap:7px;padding:10px}#view-history .history-timeline-row strong{font-size:15px}#view-history .history-timeline-row time{font-size:14px}#view-history .history-timeline-duration{font-size:14px}#view-history .history-person-avatar{width:44px;height:44px;font-size:16px}#view-history .history-insights .metrics{margin:0 12px 12px}
}
@media(max-height:500px) and (max-width:699px){#view-history .history-person-avatar,#view-history .history-person-presence{display:none}#view-history .history-contact-actions{margin-top:8px}#view-history #calls-detail-back{margin-bottom:0}#view-history .history-contact-header{padding:6px 12px}#view-history #calls-person-name{font-size:18px}}
/* 0.17: full-width working surface, compact native-style list and day timeline. */
main:has(#view-history:not([hidden])){max-width:none;padding:20px 0 0;background:#fff}
main:has(#view-history:not([hidden])) .page-heading{margin:0;padding:0 20px 14px}
main:has(#view-history:not([hidden])) .page-heading h1{font-size:25px;letter-spacing:-.4px;margin:0;font-weight:550}
main:has(#view-history:not([hidden])) .page-heading p,main:has(#view-history:not([hidden])) .page-heading .eyebrow,main:has(#view-history:not([hidden])) .page-heading .date{display:none}
#view-history .calls-workspace{border:0;border-radius:0;box-shadow:none}
#view-history .calls-toolbar{padding:8px 20px 16px;gap:8px;position:relative}
#view-history .calls-filter-icon{display:none}
#view-history .calls-search-box{flex-basis:300px}
#view-history #calls-search{border:0;background:#f2f3f5;border-radius:5px;min-height:44px}
#view-history .calls-toolbar select{font-size:16px;color:#30353b;max-width:280px;border-color:#dfe3e7}
#view-history .calls-options{position:relative;flex:none}
#view-history .calls-options>summary{display:flex;align-items:center;justify-content:center;list-style:none;min-height:44px;border:1px solid #dfe3e7;border-radius:5px;padding:8px 14px;font-size:15px;cursor:pointer}
#view-history .calls-options>summary::-webkit-details-marker{display:none}
#view-history .calls-options[open]>summary{background:#edf1f5}
#view-history .calls-options-panel{position:absolute;right:0;top:calc(100% + 6px);width:270px;max-width:calc(100vw - 32px);padding:16px;display:flex;flex-direction:column;gap:12px;z-index:20;background:#fff;border:1px solid #dfe3e7;box-shadow:0 5px 18px #16233320;border-radius:6px}
#view-history .calls-options-panel label{font-size:14px;color:#596575}
#view-history .calls-options-panel select,#view-history .calls-options-panel button{width:100%;max-width:none;min-height:44px;margin:0;font-size:15px}
#view-history .calls-options-panel #calls-days{width:100%;flex:none}
@media(max-width:699px){#view-history .calls-toolbar .calls-search-box{flex:1 1 100%}#view-history .calls-options{position:static}#view-history .calls-options-panel{right:12px;top:calc(100% + 4px)}#view-history .calls-toolbar #calls-filter{flex:1 1 140px;width:auto;min-width:0}}
#view-history .calls-layout{grid-template-columns:minmax(340px,28%) minmax(0,1fr);max-height:none;min-height:300px}
#view-history .calls-list-heading{font-size:13px;padding:6px 16px;min-height:30px;color:#6b7481;background:#fff}
#view-history #call-log{padding:4px 5px 4px 8px}
:is(#view-history,#view-chat,#view-contacts) .history-entry{border:0;margin:0 0 2px;border-radius:5px;padding:0 4px;gap:2px}
:is(#view-history,#view-chat,#view-contacts) .history-entry.selected{background:#eeeef3;border-color:transparent}
:is(#view-history,#view-chat,#view-contacts) .history-entry-main{padding:8px 4px;min-height:64px;gap:10px}
:is(#view-history,#view-chat,#view-contacts) .history-avatar{width:40px;height:40px;background:#98a2b2;color:#fff;font-size:15px}
:is(#view-history,#view-chat,#view-contacts) .history-avatar svg,#view-history .history-person-avatar svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name{flex-wrap:nowrap;gap:8px}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name strong{font-size:16px;line-height:1.4;font-weight:500;flex:0 1 auto}
:is(#view-history,#view-chat,#view-contacts) .history-entry-name small{font-size:14px;white-space:nowrap;flex:none;color:#667185;max-width:110px;overflow:hidden;text-overflow:ellipsis}
:is(#view-history,#view-chat,#view-contacts) .history-entry-time{font-size:14px;gap:5px;margin-top:3px;flex-wrap:nowrap}
:is(#view-history,#view-chat,#view-contacts) .history-entry-time>span:not(.history-direction){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
:is(#view-history,#view-chat,#view-contacts) .history-entry-duration{margin-left:0;flex:none}
:is(#view-history,#view-chat,#view-contacts) .history-entry-duration:before{content:'·';margin-right:5px}
#view-history .history-direction{width:20px;height:20px}
#view-history .history-direction svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
:is(#view-history,#view-chat,#view-contacts) .history-entry-call{width:40px;height:44px;color:#68717c}
#view-history .history-contact-header{padding:20px;border-bottom:1px solid #e6e8eb}
#view-history .history-person-avatar{background:#98a2b2;color:#fff;width:48px;height:48px}
#view-history #calls-person-name{font-size:21px;font-weight:500;color:#20252a}
#view-history .history-person-presence{font-size:14px;padding:1px 6px;margin-top:3px}
#view-history .history-contact-actions{margin-top:20px;gap:12px}
#view-history .history-contact-actions button{font-size:16px;min-height:44px;min-width:110px;background:#fff;color:#30383e;border:1px solid #dfe3e7;border-radius:5px;padding:9px 16px}
#view-history .history-contact-actions button:hover:not(:disabled){background:#f0f3f6;border-color:#aebdcd}
#view-history .history-contact-body{padding:20px}
#view-history .history-timeline-title{display:flex;align-items:center;gap:10px;font-size:20px!important;font-weight:500!important}
#view-history .history-timeline-title:before{content:'◷';font-size:25px;color:#3d4b59;line-height:1}
#view-history #calls-contact-summary{font-size:13px;color:#74808e;margin-top:5px;margin-bottom:12px}
#view-history .history-day{font-size:15px;margin:20px 0 14px}
#view-history .history-timeline-row{min-height:48px;margin-bottom:14px;padding:11px 14px;border-color:#e1e4e9;gap:9px;border-radius:5px}
#view-history .history-timeline-row.is-selected{background:#fff;border-color:#d3dce6}
#view-history .history-timeline-row strong{font-size:16px;font-weight:400;color:#2d333a}
#view-history .history-timeline-row time{font-size:14px}
#view-history .calls-utility{padding:7px 18px;border-top:1px solid #e5e9ed;border-bottom:0;background:#fafbfc}
#view-history #history-source summary{font-size:13px;min-height:28px;padding:4px 0}
#view-history #calls-note{font-size:12px}
#view-history .history-insights summary{font-size:14px;padding:10px 18px}
#view-history .audit-card{margin:0;border-width:1px 0 0;border-radius:0}
@media(min-width:1500px){#view-history .calls-layout{grid-template-columns:minmax(390px,28%) minmax(0,1fr)}}
@media(min-width:700px) and (max-width:1100px){#view-history .calls-layout{grid-template-columns:300px minmax(0,1fr)}:is(#view-history,#view-chat,#view-contacts) .history-entry-name{flex-wrap:wrap;gap:2px}:is(#view-history,#view-chat,#view-contacts) .history-entry-main{min-height:72px}:is(#view-history,#view-chat,#view-contacts) .history-entry-name strong{flex-basis:100%}:is(#view-history,#view-chat,#view-contacts) .history-entry-name small{font-size:13px}#view-history .history-contact-header,#view-history .history-contact-body{padding:16px}#view-history .history-contact-actions{gap:8px}#view-history .history-contact-actions button{min-width:0;padding:9px 12px}#view-history .history-person-avatar{display:none}#view-history .calls-search-box{flex-basis:100%}}
@media(max-width:699px){main:has(#view-history:not([hidden])){padding-top:16px}main:has(#view-history:not([hidden])) .page-heading{padding:0 16px 10px}#view-history .calls-toolbar{padding:8px 12px 12px}#view-history .calls-options-panel{width:250px}#view-history .calls-options>summary{padding:8px 10px}#view-history .calls-toolbar select{max-width:none}#view-history .calls-layout{display:block;min-height:0}:is(#view-history,#view-chat,#view-contacts) .history-entry-main{min-height:72px;padding:10px 4px}:is(#view-history,#view-chat,#view-contacts) .history-entry-name{flex-wrap:wrap;gap:2px 8px}:is(#view-history,#view-chat,#view-contacts) .history-entry-name strong{font-size:17px}:is(#view-history,#view-chat,#view-contacts) .history-entry-time{font-size:14px}#view-history .history-contact-header{padding:12px 16px}#view-history .history-contact-body{padding:16px}#view-history .history-person-avatar{width:44px;height:44px}#view-history .history-contact-actions{gap:8px;margin-top:12px}#view-history .history-contact-actions button{min-width:0;flex:1;padding:10px 8px;font-size:15px}#view-history .history-timeline-row{gap:6px;padding:10px;margin-bottom:12px}#view-history .history-timeline-row strong{font-size:15px}:is(#view-history,#view-chat,#view-contacts) .history-entry-call{width:44px}}
/* Shared column geometry for Calls and Chat. */
:root{--kg-conversation-columns:minmax(340px,28%) minmax(0,1fr)}
main:has(#view-switchboard:not([hidden])){max-width:none;padding:20px 0 0;background:#fff}
main:has(#view-switchboard:not([hidden])) .page-heading{margin:0;padding:0 20px 14px}
main:has(#view-switchboard:not([hidden])) .page-heading h1{font-size:25px;letter-spacing:-.4px;margin:0;font-weight:550}
main:has(#view-switchboard:not([hidden])) .page-heading p,main:has(#view-switchboard:not([hidden])) .page-heading .eyebrow,main:has(#view-switchboard:not([hidden])) .page-heading .date{display:none}
#view-switchboard .switchboard-workspace{border:0;border-radius:0;box-shadow:none}
#view-switchboard .switchboard-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 20px 16px;border-bottom:1px solid #dfe5eb}
#view-switchboard .switchboard-toolbar button{min-height:44px;padding:9px 14px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #dfe3e7;border-radius:5px;background:#fff;color:#455568;font-size:16px;width:auto}
#view-switchboard .switchboard-toolbar button svg{width:19px;height:19px}
#view-switchboard .switchboard-toolbar button[aria-selected=true]{background:#242a30;color:white;border-color:#242a30}
#view-switchboard #board-refresh{margin-left:auto}
#view-switchboard .board-section{padding:20px;min-width:0}
#view-switchboard .board-section-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}
#view-switchboard .board-section-heading h2{font-size:21px;font-weight:500;flex:1;min-width:0}
#view-switchboard .board-section-heading input{width:340px;max-width:100%;min-height:44px;border:0;border-radius:5px;background:#f2f3f5;padding:10px 12px;margin:0}
#view-switchboard .board-section-heading select,#view-switchboard .board-section-heading button{width:auto;min-height:44px;padding:9px 12px;margin:0;font-size:15px;border:1px solid #dfe3e7;border-radius:5px;background:white}
#view-switchboard #board-live-note,#view-switchboard .board-scope-note,#view-switchboard .board-report-context{font-size:14px;color:#69788a;line-height:1.5}
#view-switchboard .board-live-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
#view-switchboard .board-live-metrics>div{border:1px solid #e1e6ed;border-radius:6px;padding:16px;display:flex;gap:10px;align-items:center;background:#fafbfc;min-width:0}
#view-switchboard .board-live-metrics strong{font-size:26px;font-weight:500;color:#34485b}
#view-switchboard .board-live-metrics span{font-size:15px;color:#68788a}
#view-switchboard .board-call-list{margin-bottom:28px}
#view-switchboard .board-active-call{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid #dce3eb;border-radius:5px;margin-bottom:10px;flex-wrap:wrap}
#view-switchboard .board-call-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#edf2f7;color:#486780;flex:none}
#view-switchboard .board-active-call>div{flex:1;min-width:0}
#view-switchboard .board-active-call strong{font-size:17px;font-weight:500;overflow-wrap:anywhere}
#view-switchboard .board-active-call p{font-size:14px;color:#68788a;overflow-wrap:anywhere}
#view-switchboard .board-call-state{font-size:14px;color:#28694e;background:#edf6f0;border:1px solid #cce2d5;padding:5px 9px;border-radius:20px}
#view-switchboard .board-active-call button{width:auto;min-height:44px;padding:9px 12px;font-size:15px}
#view-switchboard .board-empty{padding:22px 16px;border:1px solid #e0e6ed;border-radius:5px;color:#6a798a;font-size:16px}
#view-switchboard .board-team-table{border:1px solid #e0e6ed;border-radius:5px;max-height:560px;overflow:auto}
#view-switchboard table{width:100%;border-collapse:collapse;font-size:16px}
#view-switchboard th{font-weight:500;color:#6a7789;background:#f7f9fb;text-align:left;padding:12px;position:sticky;top:0;z-index:1}
#view-switchboard td{padding:10px 12px;border-top:1px solid #e6eaf0;color:#344457;vertical-align:middle;font-size:15px;overflow-wrap:anywhere}
#view-switchboard td:nth-child(4){font-size:14px;color:#69788a;max-width:450px}
#view-switchboard .board-presence{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:14px}
#view-switchboard .status-dot{width:9px;height:9px;flex:none}.board-presence .status-dot.dnd{background:#c4474f}.board-presence .status-dot.offline{background:#a0a6ac}
#view-switchboard .board-row-actions{display:flex;gap:5px}
#view-switchboard .board-row-actions button{width:40px;height:44px;border:1px solid #dfe4eb;border-radius:5px;background:#fff;color:#586c82;display:grid;place-items:center;padding:8px}
#view-switchboard .board-scope-note{margin:12px 0}
#view-switchboard .calls-utility{display:flex;flex-direction:column;gap:10px;margin-top:18px}
#view-switchboard #history-source{display:block;margin:0;padding:18px;border:1px solid #d6e0ea;border-radius:6px;background:#fafbfc;color:#526579}
#view-switchboard #history-source summary{font-size:19px;font-weight:500;cursor:pointer;color:#364d63}
#view-switchboard #history-source.source-ready summary{color:#2c6956}
#view-switchboard #history-source p{font-size:16px;line-height:1.6;margin:10px 0}
#view-switchboard #call-audit-open{min-height:44px;color:#315f8c;font-size:15px}
#view-switchboard #calls-note{font-size:14px;color:#6a7889}
#view-switchboard .history-insights{margin-top:22px;border:1px solid #dce4ed;border-radius:6px;padding:16px}
#view-switchboard .history-insights summary{font-size:19px;font-weight:500;cursor:pointer;margin-bottom:14px}
#view-switchboard .history-insights .metrics{padding:0;margin:0}
#view-switchboard .history-insights .metrics strong{font-size:26px}
#view-switchboard .audit-card{border:1px solid #dce4ed;border-radius:6px;margin-top:16px;overflow:hidden}
#view-switchboard .audit-card h2{font-size:19px;font-weight:500;padding:16px}
@media(max-width:900px){#view-switchboard .board-live-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#view-switchboard .board-section-heading h2{flex-basis:100%}#view-switchboard .board-section-heading input{flex:1;width:0;min-width:180px}}
@media(max-width:699px){main:has(#view-switchboard:not([hidden])){padding-top:16px}main:has(#view-switchboard:not([hidden])) .page-heading{padding:0 16px 10px}#view-switchboard .switchboard-toolbar{padding:8px 12px 12px;gap:6px}#view-switchboard .switchboard-toolbar button{font-size:14px;padding:9px 10px;flex:1}#view-switchboard .switchboard-toolbar button svg{width:17px;height:17px}#view-switchboard #board-refresh{flex-basis:100%;margin:0}#view-switchboard .board-section{padding:16px 12px}#view-switchboard .board-live-metrics{gap:8px}#view-switchboard .board-live-metrics>div{padding:12px;flex-direction:column;align-items:flex-start;gap:4px}#view-switchboard .board-live-metrics span{font-size:14px}#view-switchboard .board-active-call{gap:10px}#view-switchboard .board-active-call button{flex-basis:100%}#view-switchboard .board-team-table{max-height:none;overflow:visible;border:0}#view-switchboard .table-scroll:before{display:none}#view-switchboard table{min-width:0}#view-switchboard thead{display:none}#view-switchboard tbody{display:block}#view-switchboard tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border:1px solid #dfe5ed;border-radius:5px;margin-bottom:10px;padding:8px}#view-switchboard td{display:block;padding:8px;border:0;font-size:15px;min-width:0}#view-switchboard td:before{display:block;font-size:12px;color:#758194;margin-bottom:4px}#view-switchboard #board-team td:nth-child(1):before{content:'Estado'}#view-switchboard #board-team td:nth-child(2):before{content:'Extensión'}#view-switchboard #board-team td:nth-child(3){grid-column:1/-1;font-size:17px}#view-switchboard #board-team td:nth-child(4){grid-column:1/-1;max-width:none}#view-switchboard #board-team td:nth-child(4):before{content:'Departamento'}#view-switchboard .board-row-actions button{width:44px}#view-switchboard .audit-card td:nth-child(1):before{content:'Fecha'}#view-switchboard .audit-card td:nth-child(2):before{content:'Extensión'}#view-switchboard .audit-card td:nth-child(3):before{content:'Acción'}#view-switchboard .audit-card td:nth-child(4):before{content:'Resultado'}#view-switchboard .audit-card td[colspan],#view-switchboard #board-team td[colspan]{grid-column:1/-1}#view-switchboard .history-insights .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
#view-contacts .contacts-layout{display:grid;grid-template-columns:var(--kg-conversation-columns);height:var(--contacts-pane-height,calc(100dvh - 220px));min-height:300px}
main:has(#view-contacts:not([hidden])){max-width:none;padding:20px 0 0;background:#fff}
main:has(#view-contacts:not([hidden])) .page-heading{margin:0;padding:0 20px 14px}
main:has(#view-contacts:not([hidden])) .page-heading h1{font-size:25px;letter-spacing:-.4px;margin:0;font-weight:550}
main:has(#view-contacts:not([hidden])) .page-heading p,main:has(#view-contacts:not([hidden])) .page-heading .eyebrow,main:has(#view-contacts:not([hidden])) .page-heading .date{display:none}
#view-contacts .contacts-workspace{border:0;border-radius:0;box-shadow:none}
#view-contacts .contacts-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:8px 20px 16px;border-bottom:1px solid #dfe5eb}
#view-contacts .contacts-toolbar input{flex:1 1 280px;width:0;min-width:0;min-height:44px;border:0;border-radius:5px;background:#f2f3f5;padding:10px 14px;margin:0}
#view-contacts .contacts-toolbar select,#view-contacts .contacts-toolbar button{width:auto;min-height:44px;margin:0;padding:9px 14px;border:1px solid #dfe3e7;border-radius:5px;background:#fff;font-size:16px}
#view-contacts #contact-new{width:44px;font-size:24px;padding:4px}
#view-contacts .contacts-list-pane{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid #dce3ea}
#view-contacts .contacts-list-heading{min-height:30px;padding:6px 16px;font-size:13px;color:#6b7481;border-bottom:1px solid #edf0f3}
#view-contacts #contacts-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px 5px 4px 8px}
#view-contacts .contact-entry-number{display:block;font-size:14px;color:#68768a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
#view-contacts .contact-entry-menu{position:relative}
#view-contacts .contact-entry-menu summary{list-style:none;font-size:23px;width:28px;height:44px;display:grid;place-items:center;cursor:pointer;border-radius:5px}
#view-contacts .contact-entry-menu summary::-webkit-details-marker{display:none}
#view-contacts .contact-entry-menu[open] summary{background:#e2e9f1}
#view-contacts .contact-entry-menu>div{position:absolute;right:0;top:100%;width:205px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #d9e0e8;border-radius:5px;padding:5px;box-shadow:0 3px 10px #21344426;z-index:10}
#view-contacts .contact-entry-menu button{display:block;width:100%;min-height:44px;border:0;background:#fff;text-align:left;padding:8px 12px;font-size:15px;color:#35495e}
#view-contacts .contact-entry-menu button:hover:not(:disabled){background:#edf2f7}
#view-contacts .contacts-detail{min-width:0;min-height:0;overflow:hidden;background:#fff;display:flex;flex-direction:column}
#view-contacts #contacts-detail-content{display:flex;flex-direction:column;flex:1;min-height:0}
#view-contacts .contacts-detail-header{flex:none;padding:20px;border-bottom:1px solid #e6e8eb;position:relative}
#view-contacts .contacts-detail-person{display:flex;align-items:center;gap:13px;padding-right:40px}
#view-contacts .contacts-detail-person>div{min-width:0}
#view-contacts #contacts-person-avatar{width:48px;height:48px;font-size:18px;background:#98a2b2;color:#fff}
#view-contacts #contacts-person-name{font-size:21px;font-weight:500;overflow-wrap:anywhere}
#view-contacts #contacts-person-book{font-size:14px;color:#6b7889}
#view-contacts #contacts-detail-close{position:absolute;right:10px;top:10px;width:44px;height:44px;font-size:24px}
#view-contacts #contacts-detail-back{display:none}
#view-contacts .contacts-detail-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}
#view-contacts .contacts-detail-actions button,#view-contacts .contacts-detail-actions a,#view-contacts .contacts-detail-actions select{width:auto;min-height:44px;padding:9px 12px;font-size:15px;border:1px solid #dfe3e7;border-radius:5px;background:#fff;color:#344456;margin:0;text-decoration:none}
#view-contacts .contacts-detail-actions a{display:inline-flex;align-items:center}
#view-contacts #contacts-detail-delete{color:#b32d42}
#view-contacts #contacts-permission-note{font-size:14px;color:#6b7889;margin-top:12px}
#view-contacts .contacts-detail-body{flex:1;min-height:0;overflow-y:auto;padding:20px;overscroll-behavior:contain}
#view-contacts #contacts-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;margin:0 0 25px}
#view-contacts #contacts-fields dt{color:#6c7b8d;font-size:14px;margin-bottom:5px}
#view-contacts #contacts-fields dd{font-size:17px;line-height:1.5;margin:0;display:flex;align-items:center;gap:8px;justify-content:space-between}
#view-contacts #contacts-fields dd>span{overflow-wrap:anywhere;min-width:0}
#view-contacts #contacts-fields dd button{flex:none;width:44px;height:44px}
#view-contacts .contacts-interaction{border-top:1px solid #e1e6ec;padding-top:22px}
#view-contacts .contacts-interaction h3{font-size:20px;font-weight:500;margin-bottom:14px}
#view-contacts .contacts-history-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#view-contacts .contacts-history-toolbar button,#view-contacts .contacts-history-toolbar select{width:auto;min-height:44px;padding:8px 12px;font-size:15px;border:1px solid #dfe3e7;border-radius:5px;background:#fff;margin:0}
#view-contacts #contacts-history-note,#view-contacts .contact-no-history{font-size:14px;color:#65768a;line-height:1.5;margin:12px 0}
#view-contacts .history-day{font-size:15px;color:#718094;font-weight:400;display:flex;align-items:center;gap:12px;margin:22px 0 14px}
#view-contacts .history-day:after{content:'';height:1px;background:#e4e9ee;flex:1}
#view-contacts .history-timeline-row{display:flex;align-items:center;gap:9px;min-height:48px;border:1px solid #e0e6ed;border-radius:5px;padding:11px 14px;margin-bottom:14px;font-size:14px;color:#617185}
#view-contacts .history-timeline-row strong{font-size:16px;font-weight:400;color:#344455}
#view-contacts .history-timeline-row time{margin-left:auto;font-variant-numeric:tabular-nums;flex:none}
#view-contacts .contact-call-direction{font-size:20px;color:#2a78b1}
#view-contacts .contact-call-direction.outgoing{color:#2b8059}
#view-contacts .contact-call-direction.missed,#view-contacts .contact-call-direction.unanswered{color:#bc3c50}
#view-contacts #contacts-detail-empty{margin:auto;text-align:center;color:#6c7c8e;padding:35px;font-size:17px;line-height:1.6}
#view-contacts .contacts-footer{padding:8px 18px;border-top:1px solid #e5e9ed;background:#fafbfc;font-size:12px;color:#617181}
#contacts-delete-dialog{width:520px;max-width:calc(100vw - 24px);border:1px solid #d7dee8;border-radius:9px;padding:22px}
#contacts-delete-dialog h2{font-size:22px;margin-bottom:16px}
#contacts-delete-dialog p{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
#contacts-delete-error{color:#b32d42;margin-top:12px}
@media(min-width:700px) and (max-width:1100px){#view-contacts .contacts-toolbar input{flex-basis:calc(100% - 55px)}#view-contacts .contacts-detail-header,#view-contacts .contacts-detail-body{padding:16px}#view-contacts #contacts-fields{grid-template-columns:1fr}#view-contacts .history-timeline-row{flex-wrap:wrap;gap:6px}}
@media(max-width:699px){main:has(#view-contacts:not([hidden])){padding-top:16px}main:has(#view-contacts:not([hidden])) .page-heading{padding:0 16px 10px}#view-contacts .contacts-toolbar{padding:8px 12px 12px}#view-contacts .contacts-toolbar input{flex-basis:calc(100% - 55px)}#view-contacts .contacts-toolbar select{flex:1;width:0}#view-contacts .contacts-layout{display:block;height:auto;min-height:0}#view-contacts .contacts-list-pane{border-right:0}#view-contacts #contacts-list{overflow:visible;scrollbar-gutter:auto}#view-contacts .contact-entry-menu summary{width:44px}#view-contacts .contacts-detail{display:none}#view-contacts.contact-detail-open .contacts-toolbar,#view-contacts.contact-detail-open .contacts-list-pane,#view-contacts.contact-detail-open .contacts-footer{display:none}#view-contacts.contact-detail-open .contacts-detail{display:flex;position:fixed;left:0;right:0;top:calc(var(--visible-top,0px) + 60px);height:calc(var(--visible-height,100dvh) - 60px);z-index:25;padding-bottom:env(safe-area-inset-bottom)}body:has(#view-contacts.contact-detail-open:not([hidden])){overflow:hidden}#view-contacts #contacts-detail-back{display:inline-flex;align-items:center;min-height:44px;font-size:16px;padding:6px 0;color:#28578a;margin-bottom:8px}#view-contacts .contacts-detail-header{padding:12px 16px}#view-contacts .contacts-detail-body{padding:16px}#view-contacts .contacts-detail-actions{gap:8px;margin-top:12px}#view-contacts .contacts-detail-actions select{flex:1 1 150px;min-width:0;max-width:100%}#view-contacts .contacts-detail-actions button,#view-contacts .contacts-detail-actions a{flex:1;justify-content:center}#view-contacts #contacts-fields{grid-template-columns:1fr;gap:16px}#view-contacts .history-timeline-row{flex-wrap:wrap;padding:10px;gap:6px}}
#view-history .calls-layout,#view-chat .chat-layout{grid-template-columns:var(--kg-conversation-columns)}
main:has(#view-chat:not([hidden])){max-width:none;padding:20px 0 0;background:#fff}
main:has(#view-chat:not([hidden])) .page-heading{margin:0;padding:0 20px 14px}
main:has(#view-chat:not([hidden])) .page-heading h1{font-size:25px;letter-spacing:-.4px;margin:0;font-weight:550}
main:has(#view-chat:not([hidden])) .page-heading p,main:has(#view-chat:not([hidden])) .page-heading .eyebrow,main:has(#view-chat:not([hidden])) .page-heading .date{display:none}
#view-chat .chat-workspace{border:0;border-radius:0;box-shadow:none}
#view-chat .chat-toolbar{padding:8px 20px 16px;gap:8px;min-height:68px}
#view-chat .chat-toolbar>div{flex:1;min-width:0}
#view-chat .chat-toolbar h2{display:none}
#view-chat .chat-toolbar p{margin:0;font-size:14px;color:#687787}
#view-chat .chat-toolbar .primary,#view-chat .chat-toolbar .secondary{min-height:44px;padding:9px 16px;font-size:16px;border-radius:5px}
#view-chat .chat-layout{display:grid;height:var(--chat-pane-height,calc(100dvh - 220px));min-height:300px;max-height:none}
#view-chat .chat-sidebar{max-height:none;padding:12px 8px;gap:10px;border-right:1px solid #dce3ea;border-bottom:0;min-width:0}
#view-chat .chat-sidebar>input{border:0;background:#f2f3f5;min-height:44px;padding:10px 12px;border-radius:5px}
#view-chat .chat-sidebar>select{min-height:44px;border-color:#dfe3e7}
#view-chat .chat-sidebar #chat-unread-filter{margin:0;min-height:44px;font-size:15px;padding:8px}
#view-chat .chat-sidebar #chat-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#view-chat .chat-conversation{min-height:64px;padding:8px;gap:10px;border:0;border-radius:5px;margin-bottom:2px}
#view-chat .chat-conversation.selected{background:#eeeef3;border:0}
#view-chat .chat-sidebar .chat-conversation strong{font-size:16px;font-weight:500;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#view-chat .chat-person-avatar{display:grid;width:40px;height:40px;background:#98a2b2;color:#fff;font-size:15px;font-weight:500}
#view-chat .chat-thread{height:auto;min-height:0;background:#f7f8fa;overflow:hidden}
#view-chat .chat-thread-heading{padding:20px;border-bottom:1px solid #e6e8eb}
#view-chat .chat-thread-heading h3{font-size:21px;font-weight:500}
#view-chat .chat-thread-heading p{font-size:14px}
#view-chat .chat-messages{padding:20px}
#view-chat .chat-composer{grid-template-columns:44px minmax(0,1fr) 44px;padding:12px 20px;gap:8px}
#view-chat .chat-composer .primary,#view-chat .chat-compose-tools .icon-btn{width:44px;min-width:44px;min-height:44px;height:44px}
#view-chat .chat-composer textarea{min-height:44px;height:44px}
@media(min-width:1500px){:root{--kg-conversation-columns:minmax(390px,28%) minmax(0,1fr)}}
@media(min-width:700px) and (max-width:1100px){:root{--kg-conversation-columns:300px minmax(0,1fr)}#view-chat .chat-toolbar>div{flex-basis:auto}#view-chat .chat-toolbar a{width:auto}#view-chat .chat-thread-heading,#view-chat .chat-messages{padding:16px}}
@media(max-width:699px){main:has(#view-chat:not([hidden])){padding-top:16px}main:has(#view-chat:not([hidden])) .page-heading{padding:0 16px 10px}#view-chat .chat-toolbar{padding:8px 12px 12px;flex-wrap:wrap}#view-chat .chat-toolbar>div{flex-basis:100%}#view-chat .chat-layout{display:block;height:auto;min-height:0}#view-chat .chat-sidebar{border:0;padding:12px}#view-chat .chat-sidebar #chat-list{overflow:visible}#view-chat .chat-sidebar .chat-conversation strong{font-size:17px}#view-chat .chat-thread{display:none}#view-chat.chat-thread-open .chat-layout{display:flex;flex:1;min-height:0}#view-chat.chat-thread-open .chat-sidebar,#view-chat.chat-thread-open .chat-toolbar{display:none}#view-chat.chat-thread-open .chat-thread{display:flex;flex:1;min-height:0}#view-chat .chat-thread-heading{padding:8px 14px}#view-chat .chat-thread-heading h3{font-size:19px}#view-chat .chat-messages{padding:14px}#view-chat .chat-composer{padding:10px;gap:7px}}


/* Conversation rows use the same shared row primitives as Calls. */
#view-chat .chat-filter-icon,#view-chat .chat-toolbar>label{display:none}
#view-chat .chat-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 20px 16px}
#view-chat #chat-search{flex:1 1 300px;min-width:0;width:0;min-height:44px;padding:10px 14px;border:0;border-radius:5px;background:#f2f3f5;margin:0}
#view-chat #chat-archive{width:auto;min-height:44px;max-width:240px;margin:0;padding:9px 12px;border:1px solid #dfe3e7;border-radius:5px;background:#fff}
#view-chat #chat-unread-filter{margin:0;width:auto;min-height:44px;padding:9px 12px;font-size:15px}
#view-chat .chat-sidebar{padding:0;gap:0}
#view-chat .chat-list-heading{min-height:30px;padding:6px 16px;font-size:13px;color:#6b7481;border-bottom:1px solid #edf0f3}
#view-chat .chat-sidebar #chat-list{padding:4px 5px 4px 8px}
#view-chat .chat-entry .history-entry-main{background:transparent;border:0;cursor:pointer}
#view-chat .chat-entry-preview{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.4;color:#667185;margin-top:3px}
#view-chat .chat-entry-side{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:0;min-width:90px}
#view-chat .chat-entry-side time{font-size:12px;color:#69758a;line-height:1.4;padding-right:7px}
#view-chat .chat-entry-actions{display:flex;align-items:center;gap:0;height:28px}
#view-chat .chat-entry-actions .history-entry-call{width:28px;height:28px;min-height:28px;padding:5px}
#view-chat .chat-entry-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.chat-delivery{display:inline-flex;align-items:center;justify-content:center;min-width:24px;font-size:14px;letter-spacing:-4px;padding-right:4px;color:#798494;white-space:nowrap}
.chat-delivery.read{color:#1593d0}.chat-delivery.failed{color:#be374e;letter-spacing:0}.chat-delivery.unknown{letter-spacing:0}
#view-chat .chat-entry-menu{position:relative}
#view-chat .chat-entry-menu summary{list-style:none;display:grid;place-items:center;width:28px;height:28px;font-size:23px;cursor:pointer;border-radius:4px}
#view-chat .chat-entry-menu summary::-webkit-details-marker{display:none}
#view-chat .chat-entry-menu[open] summary{background:#dce4ee}
#view-chat .chat-entry-menu>div{position:absolute;right:0;top:100%;z-index:10;width:165px;padding:5px;background:white;border:1px solid #dce1e7;border-radius:5px;box-shadow:0 3px 10px #202c4326}
#view-chat .chat-entry-menu button{width:100%;min-height:44px;background:#fff;color:#303b48;border:0;text-align:left;padding:8px 12px;font-size:15px}
#view-chat .chat-entry-menu button:hover{background:#edf1f6}
#view-chat .chat-entry .unread-badge{min-width:20px;height:20px;font-size:12px;margin:0 3px;padding:0 5px}
#view-chat .chat-update-footer{padding:8px 18px;background:#fafbfc;border-top:1px solid #e5e9ed;font-size:12px;color:#617181}
#view-chat .chat-message small .chat-delivery{margin-left:8px}
#view-chat .chat-entry-menu .chat-delete-menu{color:#b32d42;border-top:1px solid #e5e9ef}
#view-chat .chat-composer{grid-template-columns:auto minmax(0,1fr) 44px}
#view-chat #chat-compose,#view-chat #chat-send{grid-row:2}
#view-chat .chat-compose-tools{grid-column:1;grid-row:2;gap:4px;flex-wrap:nowrap}
#view-chat .chat-compose-tools .icon-btn{width:38px;min-width:38px;height:44px;border:0;background:transparent;color:#5c6d7f}
#view-chat .chat-compose-tools .icon-btn svg{width:21px;height:21px}
#view-chat .chat-compose-tools .icon-btn:hover:not(:disabled),#view-chat .chat-compose-tools .icon-btn[aria-expanded=true]{background:#e8eef5;color:#254e7c}
#view-chat #chat-file-clear{position:static;white-space:nowrap;font-size:13px}
#view-chat .chat-tool-panel{position:absolute;bottom:calc(100% + 6px);left:12px;width:340px;max-width:calc(100% - 24px);max-height:min(340px,50dvh);overflow:auto;background:white;border:1px solid #d5dee7;border-radius:8px;box-shadow:0 6px 24px #1e304b30;padding:12px;z-index:12}
#view-chat .chat-tool-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#334659}
#view-chat .chat-tool-heading button{width:44px;height:44px;font-size:23px}
#view-chat .chat-tool-panel input{width:100%;min-height:44px;padding:8px 10px;border:1px solid #d9e1e8;border-radius:5px;margin:5px 0 10px}
#view-chat .chat-tool-panel p{font-size:14px;line-height:1.5;color:#687585;margin-bottom:10px}
#view-chat .chat-emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
#view-chat .chat-emoji-grid button{min-width:0;min-height:44px;padding:3px;border:0;background:#fff;font-size:25px;border-radius:5px}
#view-chat .chat-emoji-grid button:hover{background:#edf2f7}
#view-chat #chat-replies-list button{width:100%;min-height:44px;text-align:left;padding:10px;border:0;border-top:1px solid #e3e8ee;background:#fff;color:#35495d;font-size:15px}
#view-chat #chat-replies-list button:hover{background:#edf2f7}
#chat-delete-dialog{width:520px;max-width:calc(100vw - 24px);padding:20px;border:1px solid #d7dee8;border-radius:9px}
#chat-delete-dialog .card-heading{padding:0 0 16px}
#chat-delete-dialog p{font-size:16px;line-height:1.6;margin:0 0 14px;overflow-wrap:anywhere}
#chat-delete-dialog #chat-delete-error{color:#a62a40;background:#fff0f3;padding:10px;border-radius:5px}
.chat-delete-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:20px}
.chat-delete-actions button{width:auto;min-height:44px;padding:10px 18px;border-radius:5px}
.chat-delete-actions .danger{background:#b43149;border:1px solid #b43149;color:#fff}
@media(max-width:699px){#view-chat .chat-composer{grid-template-columns:44px minmax(0,1fr) 44px}#view-chat .chat-compose-tools{grid-column:1/-1;grid-row:1}#view-chat .chat-compose-tools .icon-btn{width:44px;min-width:44px}#view-chat .chat-composer textarea{grid-column:1/3;grid-row:2}#view-chat .chat-composer>.primary{grid-column:3;grid-row:2}#view-chat .chat-composer>small{grid-column:1/-1;grid-row:4}#view-chat .chat-composer:has(#chat-file-pending:not([hidden])) #chat-file-pending{grid-row:2}#view-chat .chat-composer:has(#chat-file-pending:not([hidden])) textarea,#view-chat .chat-composer:has(#chat-file-pending:not([hidden]))>.primary{grid-row:3}#view-chat .chat-tool-panel{left:8px;max-width:calc(100% - 16px)}#view-chat .chat-emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(min-width:700px) and (max-width:1100px){#view-chat .chat-entry .history-entry-name{flex-wrap:nowrap}#view-chat .chat-entry .history-entry-name strong{flex-basis:auto}#view-chat .chat-entry .history-entry-name small{display:none}}
@media(max-width:1100px){#view-chat #chat-search{flex-basis:100%}}
@media(max-width:699px){#view-chat .chat-toolbar{padding:8px 12px 12px}#view-chat #chat-search{flex:1 1 100%;width:100%}#view-chat #chat-archive{flex:1;min-width:0;width:0;font-size:16px}#view-chat .chat-toolbar .primary,#view-chat .chat-toolbar .secondary{flex:none}#view-chat .chat-entry-actions{height:44px}#view-chat .chat-entry-actions .history-entry-call,#view-chat .chat-entry-menu summary{width:44px;height:44px;min-height:44px}#view-chat .chat-entry-side{min-width:105px}#view-chat .chat-entry .history-entry-name{flex-wrap:nowrap}#view-chat .chat-entry .history-entry-name small{display:none}#view-chat.chat-thread-open .chat-update-footer{display:none}}

/* Global dialer and focused extension workspace. */
.header-dialer{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#1869b5;color:white;border:0;border-radius:6px;min-height:42px;padding:9px 14px;font-size:16px;cursor:pointer;flex:none}.header-dialer svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}.header-dialer:hover{background:#12528e}
body:has(#view-panel:not([hidden])) main{max-width:none;background:white}body:has(#view-panel:not([hidden])) .page-heading{padding-bottom:20px}body:has(#view-panel:not([hidden])) .page-heading .eyebrow,body:has(#view-panel:not([hidden])) .page-heading .date,body:has(#view-panel:not([hidden])) #view-subtitle{display:none}body:has(#view-panel:not([hidden])) #view-title{font-size:25px;font-weight:500}
#view-panel .panel-layout{grid-template-columns:minmax(0,1.2fr) minmax(320px,1fr);grid-template-areas:'identity identity' 'profile profile' 'actions actions' 'calls parking' 'devices devices';gap:20px}#view-panel .extension-card{border:1px solid #e1e4e8;border-radius:6px;background:#fafbfc;padding:20px;box-shadow:none}#view-panel .extension-identity h2{font-size:24px}#view-panel .profile-summary{margin:0;padding:0;font-size:15px}#view-panel .extension-actions{grid-area:actions;display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:1px solid #e3e6ea;padding-bottom:20px}#view-panel .extension-actions .primary{width:auto;min-height:44px;display:flex;align-items:center;gap:9px;margin:0;padding:10px 18px}#view-panel .extension-actions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}#view-panel .agent-tools{display:flex;align-items:center;gap:10px;margin:0;flex-wrap:wrap}#view-panel .agent-button{min-height:44px;padding:10px 14px;background:white;border:1px solid #dce1e7;border-radius:5px;font-size:15px}#view-panel .agent-status{font-size:14px}#view-panel .agent-service-note{flex-basis:100%;margin:0}#view-panel .quick-actions{margin:0 0 0 auto}#view-panel .quick-actions button{margin:0;min-height:44px;padding:10px 14px;border:1px solid #dce1e7;background:white;color:#273849;font-size:15px;display:flex;gap:8px;align-items:center}#view-panel .quick-actions button>span:last-child{font-size:13px}
#view-panel .card{border:1px solid #e1e4e8;border-radius:6px;box-shadow:none}#view-panel .call-card>.card-heading,#view-panel .parking-board>.card-heading{background:white;padding:18px 20px}#view-panel h2{font-size:20px;font-weight:500}#view-panel .empty-calls{padding:35px 18px;min-height:240px}#view-panel .empty-calls h3{font-size:23px}#view-panel .empty-calls p{font-size:16px;line-height:1.6}#view-panel .device-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#view-panel .device-tile{align-items:center;border-radius:5px}#view-panel .device-tile strong{font-size:16px}#view-panel .device-symbol{display:block}
#keypad-dialog.global-dialer{position:fixed;inset:78px 24px auto auto;margin:0;width:390px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 96px);padding:22px;border:1px solid #dfe4ea;border-radius:10px;box-shadow:0 18px 65px #182b4533;overflow-y:auto}#keypad-dialog::backdrop{background:#15233626}#keypad-dialog .card-heading{display:flex;align-items:start;justify-content:space-between;margin:0 0 18px;gap:12px;padding:0}#keypad-dialog h2{font-size:23px;margin:0}#keypad-dialog .card-heading p{font-size:14px;line-height:1.4;margin:6px 0;color:#687381}#keypad-dialog .icon-btn{flex:none;width:40px;min-width:40px;height:40px}#keypad-dialog .dial-number,#keypad-dialog .device-picker{margin:0 0 16px;min-width:0}#keypad-dialog .dial-label{display:block;margin:0 0 8px;font-size:14px}#keypad-dialog .dial-input{display:flex;align-items:center;gap:4px;border:1px solid #cbd4df;border-radius:6px;padding:2px;background:white}#keypad-dialog #destination{border:0;box-shadow:none;min-width:0;margin:0;padding:12px 8px;font-size:19px;width:100%}#keypad-dialog .dial-input:focus-within{outline:2px solid #377cbd;outline-offset:1px}#keypad-dialog .dial-input svg{width:22px;height:22px}#keypad-dialog .dial-results{margin:10px 0 0;max-height:205px}#keypad-dialog .destination-choice{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:58px;padding:10px 12px;width:100%;border-color:#e0e5ec}#keypad-dialog .destination-choice:hover{background:#f0f5fc;border-color:#8eafd1}#keypad-dialog .device-picker label{font-size:14px;margin:0 0 7px;display:block}#keypad-dialog #device-select{margin:0;width:100%;font-size:15px;min-height:42px}#keypad-dialog #device-detail{font-size:12px;line-height:1.4;margin:7px 0 0;color:#697586}#keypad-dialog .keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:16px 0}#keypad-dialog .key{border:1px solid #e0e5ec;background:#f8fafc;border-radius:6px;min-height:52px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:25px;color:#202b38;padding:6px}#keypad-dialog .key:hover{background:#eaf1fa}#keypad-dialog .key small{font-size:11px;color:#6d7886;min-width:28px}#keypad-dialog .call-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;margin:0;min-height:48px;font-size:18px;background:#24734e}#keypad-dialog #dial-note{text-align:center;font-size:13px;margin:12px 0 0;color:#657284}
@media(max-width:1000px){#view-panel .panel-layout{grid-template-columns:repeat(2,minmax(0,1fr))}#view-panel .extension-actions .quick-actions{margin:0}#view-panel .device-list{grid-template-columns:1fr}}
@media(max-width:699px){.header-dialer{min-width:42px;padding:8px}.header-dialer-label{display:none}#keypad-dialog.global-dialer{inset:66px 12px auto 12px;width:auto;max-width:none;max-height:calc(100dvh - 80px);padding:16px}#view-panel .panel-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:'identity' 'profile' 'actions' 'calls' 'parking' 'devices';gap:16px}#view-panel .extension-card{padding:16px;flex-wrap:wrap}#view-panel .extension-identity>div:last-child{display:block}#view-panel .extension-identity h2{font-size:21px}#view-panel .extension-card .presence-label{width:100%;margin:0}#view-panel .extension-actions{gap:10px}#view-panel .agent-tools{width:100%}#view-panel .agent-status{width:100%}#view-panel .empty-calls{min-height:200px;padding:24px 16px}#view-panel .device-list{padding:0 14px 14px}#view-panel .call-controls{grid-template-columns:1fr}#view-panel .call-controls .danger,#view-panel .call-controls .answer{grid-column:auto}}

#keypad-dialog .key{height:60px;min-height:52px;gap:2px;line-height:1.1}#keypad-dialog .key small{line-height:1;letter-spacing:1px}#keypad-dialog .keypad{padding:0;max-width:none}#keypad-dialog .call-button{position:sticky;bottom:0;box-shadow:0 5px 0 7px white}
@media(max-height:650px){#keypad-dialog.global-dialer{inset-block-start:64px;max-height:calc(100dvh - 76px)}#keypad-dialog .card-heading p,#keypad-dialog #device-detail,#keypad-dialog #dial-note{display:none}#keypad-dialog .key{height:46px;min-height:44px;font-size:22px}#keypad-dialog .keypad{gap:5px;margin:10px 0}#keypad-dialog .card-heading{margin-bottom:10px}#keypad-dialog .dial-number,#keypad-dialog .device-picker{margin-bottom:10px}}

/* Native 3CX-style template area between conversation and composer. */
#view-chat .chat-templates-panel{display:flex;flex-direction:column;flex:none;height:340px;max-height:42dvh;min-height:160px;border-top:1px solid #e0e4e9;background:white;overflow:hidden;margin:0;padding:0}#view-chat .chat-templates-toolbar{display:flex;align-items:center;border-bottom:1px solid #e3e6eb;gap:0;min-height:44px;flex:none}#view-chat #chat-template-categories{display:flex;gap:0;padding:0;margin:0;flex:1;min-width:0;overflow-x:auto;align-self:stretch}#view-chat #chat-template-categories button{width:auto;min-width:max-content;min-height:44px;padding:10px 12px;border:0;border-bottom:3px solid transparent;background:white;font-size:14px;color:#28333e;border-radius:0}#view-chat #chat-template-categories button.active,#view-chat #chat-template-categories button:hover{border-bottom-color:#26313c;background:#f7f9fb}#view-chat .chat-templates-toolbar select{width:auto;max-width:200px;min-width:110px;min-height:44px;margin:0;border:0;border-left:1px solid #e3e6eb;border-radius:0;background:white;font-size:14px;padding:8px}#view-chat .chat-templates-toolbar .icon-btn{flex:none;width:38px;min-width:38px;height:44px;font-size:22px}#view-chat #chat-template-search{margin:10px 12px 0;width:calc(100% - 24px);min-height:38px;padding:8px 12px;border:1px solid #dfe5ec;background:white;font-size:15px;flex:none}#view-chat .chat-template-sections{position:relative;overflow-y:auto;min-height:0;flex:1;padding:0 12px 12px}#view-chat .chat-template-category{padding:0;margin:0 0 20px}#view-chat .chat-template-category h4{font-size:14px;font-weight:500;color:#6c7782;margin:12px 0 8px}#view-chat #chat-replies-list .chat-template-category button{display:flex;align-items:center;gap:16px;width:100%;border:0;border-top:1px solid #e2e7ed;border-bottom:1px solid #e2e7ed;border-radius:0;padding:10px 6px;min-height:44px;background:white;text-align:left}#view-chat .chat-template-category button strong{font-size:15px;font-weight:500;flex:none;max-width:35%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#view-chat .chat-template-category button>span{font-size:14px;color:#7a828c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0;flex:1}#view-chat #chat-replies-list .chat-template-category button:hover{background:#f1f5fa}#view-chat .chat-template-empty{display:flex;align-items:center;justify-content:center;gap:12px;min-height:85px;font-size:15px;color:#687382}#view-chat .chat-template-empty>span{background:#586474;color:white;border-radius:6px;font-size:28px;padding:2px 8px}#view-chat #chat-template-status{padding:14px;font-size:15px;color:#52667b}#view-chat .chat-thread:has(#chat-replies-panel:not([hidden])) #chat-messages{min-height:90px}
@media(max-width:1000px){#view-chat .chat-templates-toolbar{flex-wrap:wrap}#view-chat #chat-template-categories{flex-basis:100%;order:2;border-top:1px solid #e3e6eb}#view-chat .chat-templates-toolbar select{flex:1;max-width:none;min-width:0}#view-chat .chat-templates-panel{height:310px;max-height:45dvh}}
@media(max-width:699px){#view-chat .chat-templates-panel{max-height:40dvh;min-height:180px}#view-chat .chat-template-category button strong{max-width:45%;font-size:14px}#view-chat .chat-template-category button>span{font-size:13px}#view-chat .chat-templates-toolbar select{font-size:14px}#view-chat .chat-template-empty{font-size:14px;min-height:70px}}

#view-chat #chat-template-new{width:auto;min-width:0;min-height:42px;white-space:nowrap;font-size:14px;padding:8px 12px;flex:none;margin:0 4px;border-radius:4px}.chat-template-dialog{width:min(760px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 30px);padding:24px;border:1px solid #dce2ea;border-radius:9px;overflow:auto}.chat-template-dialog .card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.chat-template-dialog h2{font-size:24px}.template-shared-note{padding:12px 14px;background:#f1f5fa;color:#506072;font-size:15px;line-height:1.5;margin-bottom:18px;border-radius:5px}.template-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px 20px}.template-editor-fields label{margin:0;font-size:15px;min-width:0}.template-editor-fields input,.template-editor-fields select,.template-editor-fields textarea{display:block;width:100%;margin:7px 0 0;font:inherit;font-size:16px;padding:10px 12px;border:1px solid #ccd5df;border-radius:5px;min-height:44px}.template-editor-fields .template-editor-text{grid-column:1/-1}.template-editor-fields textarea{resize:vertical;line-height:1.5;min-height:160px;max-height:360px}.template-char-count{text-align:right;color:#6c7784;font-size:13px;margin:7px 0}#chat-template-permission{font-size:14px;color:#5d6b7c;margin:10px 0;line-height:1.5}#chat-template-create-error{padding:12px;background:#fff0f1;color:#983442;border:1px solid #edc7cd;border-radius:5px;font-size:15px;line-height:1.5;margin:12px 0}.template-editor-actions{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #e0e5eb;padding-top:16px;margin-top:18px}.template-editor-actions button{width:auto;min-width:120px;min-height:44px;padding:10px 16px}.template-editor-actions .primary{width:auto}#chat-template-dialog .icon-btn{min-width:44px;width:44px;height:44px}
@media(max-width:699px){#view-chat #chat-template-new{font-size:13px;padding:8px}#chat-template-dialog{padding:16px;max-height:calc(100dvh - 20px);margin:auto}.template-editor-fields{grid-template-columns:minmax(0,1fr);gap:12px}.template-editor-fields .template-editor-text{grid-column:1}.template-editor-actions{position:sticky;bottom:-16px;background:white;padding:14px 0 16px;margin-bottom:-16px}.template-editor-actions button{flex:1;min-width:0}.template-shared-note{font-size:14px}.template-editor-fields textarea{min-height:150px}}

#contact-call-origin{margin:10px 0 0;font-size:17px;font-weight:600;color:#245580;background:#eef5fc;border:1px solid #d8e6f4;border-radius:5px;padding:9px 12px;overflow-wrap:anywhere}

.brand>span{font-size:17px;letter-spacing:0;white-space:nowrap;padding-left:10px}
