.pt-root{--pt-blue:#3565b5;--pt-ink:#23313a;--pt-muted:#64748b;color:var(--pt-ink);max-width:1450px;margin:auto}.pt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;height:auto;min-height:0;padding:24px;background:#fff;border:1px solid #dde4ee;border-radius:12px;margin:4px 0 24px}.pt-head h1{margin:0 0 8px;font-size:clamp(26px,3vw,38px);letter-spacing:-1px}.pt-head p{margin:0;color:var(--pt-muted)}.pt-eyebrow{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--pt-blue);margin-bottom:7px}.pt-actions,.pt-tabs{display:flex;gap:8px;flex-wrap:wrap}.pt-tabs{border-bottom:1px solid #dbe2ec;margin-bottom:22px}.pt-tabs button{border:0;background:none;border-bottom:3px solid transparent;color:#64748b;padding:12px 16px;font-weight:650;border-radius:0}.pt-tabs button[aria-selected=true]{color:var(--pt-blue);border-bottom-color:var(--pt-blue)}.pt-root button,.pt-dialog button{min-height:42px;cursor:pointer;font:inherit;border:1px solid #d7e0ed;background:white;border-radius:8px;padding:8px 14px;color:var(--pt-ink)}.pt-root button.pt-primary,.pt-dialog button.pt-primary{background:var(--pt-blue);color:white;border-color:var(--pt-blue)}.pt-root button:disabled,.pt-dialog button:disabled{cursor:default;opacity:.5}.pt-root button:focus-visible,.pt-dialog :focus-visible{outline:3px solid #93b8ef;outline-offset:2px}.pt-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.pt-card{background:white;border:1px solid #dde4ee;border-radius:12px;padding:22px;min-width:0}.pt-kpi-label{font-size:13px;color:var(--pt-muted);margin-bottom:10px}.pt-kpi-value{font-size:26px;font-weight:750;letter-spacing:-.5px}.pt-kpi-note{font-size:12px;color:var(--pt-muted);margin-top:7px}.pt-card h2{font-size:18px;margin:0 0 18px}.pt-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:0 0 18px}.pt-root label,.pt-dialog label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#526277}.pt-root input,.pt-root select,.pt-root textarea,.pt-dialog input,.pt-dialog select,.pt-dialog textarea{font:inherit;color:var(--pt-ink);border:1px solid #d5deea;border-radius:7px;background:white;min-height:42px;padding:9px 11px;max-width:100%;box-sizing:border-box}.pt-root textarea,.pt-dialog textarea{min-height:90px;resize:vertical}.pt-toolbar label:first-child{flex:1;min-width:160px}.pt-table-wrap{overflow:auto;max-width:100%}.pt-table{width:100%;border-collapse:collapse;font-size:14px}.pt-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.7px;color:var(--pt-muted);font-weight:700;background:#f8fafc}.pt-table th,.pt-table td{padding:14px 12px;border-bottom:1px solid #edf0f5;white-space:nowrap}.pt-table td small{display:block;color:var(--pt-muted);margin-top:4px}.pt-table tr:last-child td{border-bottom:0}.pt-status{display:inline-block;border-radius:20px;padding:4px 9px;background:#edf3fd;color:#3565a5;font-size:12px}.pt-status[data-status=confirmed],.pt-status[data-status=active],.pt-status[data-status=delivered]{background:#e7f5ee;color:#27744f}.pt-status[data-status=failed],.pt-status[data-status=needs_review],.pt-status[data-status=returned]{background:#fff1e8;color:#a85e24}.pt-empty{text-align:center;padding:38px 18px;color:var(--pt-muted);line-height:1.6}.pt-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;color:var(--pt-muted);font-size:13px}.pt-error{padding:16px;border:1px solid #f0c4bc;border-radius:8px;background:#fff8f6;color:#963d31}.pt-muted{color:var(--pt-muted);font-size:13px;line-height:1.6}.pt-dialog{border:1px solid #dce3ed;border-radius:14px;padding:26px;width:min(620px,calc(100vw - 32px));max-height:90dvh;overflow:auto;box-sizing:border-box;color:var(--pt-ink);box-shadow:0 24px 80px #14223d35}.pt-dialog::backdrop{background:#14223d55}.pt-dialog h2{margin:0 0 20px;font-size:23px}.pt-form{display:grid;gap:16px}.pt-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pt-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.pt-dialog .pt-error{margin-top:16px}.pt-check{display:flex!important;align-items:center;gap:10px!important}.pt-check input{min-height:auto}.pt-phone-grid{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(340px,1.5fr) minmax(230px,.65fr);gap:18px}.pt-lead{display:block;width:100%;text-align:left;margin-bottom:8px}.pt-lead[aria-pressed=true]{background:#edf3fd;border-color:#b6cdf1}.pt-lead small{display:block;color:var(--pt-muted);margin-top:4px}.pt-messages{min-height:220px;max-height:420px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:12px 0}.pt-bubble{align-self:flex-start;max-width:85%;padding:12px 15px;border-radius:12px;background:#f0f3f8;white-space:pre-wrap;overflow-wrap:anywhere}.pt-bubble[data-direction=outbound]{align-self:flex-end;background:#eaf1fc}.pt-bubble small{display:block;color:#65738a;font-size:11px;margin-top:7px}.pt-compose{display:grid;gap:10px;border-top:1px solid #e5eaf1;padding-top:16px}.pt-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}.pt-keypad button{font-size:20px;min-height:50px}.pt-step{display:flex;gap:14px;align-items:flex-start;margin:18px 0}.pt-step strong{display:block;margin-bottom:5px}.pt-step-number{flex:0 0 28px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e9f0fc;color:var(--pt-blue);font-weight:700}.pt-number-choice{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #dce4ed;padding:15px;border-radius:10px;margin:10px 0}.pt-call-bar{position:fixed;bottom:20px;right:20px;z-index:1000;background:#223449;color:white;border-radius:14px;padding:18px;box-shadow:0 12px 40px #14223d44;width:min(350px,calc(100vw - 40px));box-sizing:border-box}.pt-call-bar button{background:white;color:#213346;border:0;border-radius:7px;min-height:40px;padding:8px 12px;cursor:pointer}.pt-call-bar p{margin:0 0 12px}.pt-call-bar .pt-actions{margin-top:12px}.pt-phone-status{margin:16px 0;padding:12px;border-radius:8px;background:#f3f6fb}.pt-detail-list{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pt-detail-list dt{font-size:12px;color:#65738a}.pt-detail-list dd{margin:4px 0 0;overflow-wrap:anywhere}.pt-panel-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.pt-panel-top h2{margin:0}.pt-table button{min-height:34px;padding:5px 9px;font-size:12px}.pt-mobile-only{display:none}@media(max-width:1100px){.pt-phone-grid{grid-template-columns:250px 1fr}.pt-dial-card{grid-column:1/-1}.pt-keypad{max-width:280px}.pt-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.pt-head{flex-direction:column;padding:20px}.pt-card{padding:16px}.pt-kpis{gap:10px}.pt-kpi-value{font-size:22px}.pt-phone-grid{grid-template-columns:1fr}.pt-toolbar label{flex:1;min-width:120px}.pt-toolbar label:first-child{flex-basis:100%}.pt-tabs{flex-wrap:nowrap;overflow:auto}.pt-tabs button{white-space:nowrap;padding:12px}.pt-form-grid{grid-template-columns:1fr}.pt-dialog{padding:20px}.pt-head .pt-actions{width:100%}.pt-call-bar{bottom:12px;right:12px;width:calc(100vw - 24px)}.pt-detail-list{grid-template-columns:1fr}.pt-messages{max-height:45dvh}.pt-phone-grid .pt-leads-card{max-height:280px;overflow:auto}.pt-mobile-only{display:block}}

@media(max-width:680px){.pt-panel-top{flex-wrap:wrap;align-items:flex-start}.pt-panel-top>.pt-actions{width:100%}.pt-panel-top>.pt-actions button{flex:1}.pt-root .pt-toolbar select{width:100%}.pt-root .pt-toolbar input{width:100%}.pt-table-wrap{overscroll-behavior-x:contain}}

.pt-sample-notice{margin-bottom:22px;background:#f4f7fd}.pt-sample-notice p{margin:8px 0 0}

.pt-history-period{border:1px solid #dde4ee;border-radius:10px;margin:18px 0;overflow:hidden}.pt-history-period h3{margin:0;padding:14px 16px;background:#f3f6fb;font-size:15px}.pt-history-filters{margin-bottom:24px}[data-staff-picker]{max-width:360px;margin-bottom:20px}[data-staff-row][hidden]{display:none}

/* Keep the name search generous and give the period/status controls their own space. */
.pt-root .pt-history-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;align-items:end}.pt-root .pt-history-filters>label{min-width:0;margin:0;flex:none}.pt-root .pt-history-filters>label:first-child:has([data-person-search]){grid-column:span 2;min-width:0}.pt-root .pt-history-filters input,.pt-root .pt-history-filters select{width:100%;min-width:0}.pt-history-actions{display:flex;gap:10px;align-items:end;grid-column:span 2;flex-wrap:wrap}.pt-period-context{margin:-6px 0 22px}.pt-period-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.pt-agreement-details{margin-top:22px}.pt-agreement-details>summary{font-weight:650;cursor:pointer}.pt-agreement-details[open]>summary{margin-bottom:20px}
@media(max-width:1100px){.pt-root .pt-history-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.pt-root .pt-history-filters>label:first-child:has([data-person-search]){grid-column:1/-1}}
@media(max-width:680px){.pt-root .pt-history-filters{grid-template-columns:minmax(0,1fr);gap:14px}.pt-root .pt-history-filters>label:first-child:has([data-person-search]),.pt-history-actions{grid-column:auto}.pt-period-kpis{grid-template-columns:minmax(0,1fr)}.pt-history-actions>button{flex:1}}

.pt-column-heading{display:inline-flex;align-items:center;gap:6px;white-space:normal}.pt-root .pt-column-help,.pt-column-help{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;min-height:18px;padding:0;border:1px solid #b7c9e4;border-radius:50%;background:#f2f6fd;color:#3565a5;font-size:11px;font-weight:650;line-height:1;cursor:help;vertical-align:middle}.pt-column-help:focus-visible,.pt-appointment-status:focus-visible{outline:3px solid #93b8ef;outline-offset:3px}.pt-root .pt-appointment-status{min-height:28px;border:0;border-radius:20px;padding:4px 9px;background:#edf3fd;color:#3565a5;font-size:12px;white-space:nowrap;cursor:help}.pt-help-popup{position:fixed;z-index:1500;width:max-content;max-width:min(430px,calc(100vw - 24px));max-height:min(440px,75dvh);overflow:auto;padding:16px 18px;border:1px solid #bdcce1;border-radius:10px;background:#fff;color:#23313a;box-shadow:0 10px 35px #14223d2b;font:400 13px/1.6 Inter,Arial,sans-serif;letter-spacing:normal;text-transform:none;white-space:pre-line;overflow-wrap:anywhere;box-sizing:border-box}.pt-help-popup[hidden]{display:none}

/* Workspace-level phone survives CRM/page navigation; compact controls fit phones and tablets. */
.pt-call-bar{bottom:84px;max-height:calc(100dvh - 108px);overflow-y:auto;overscroll-behavior:contain;width:min(390px,calc(100vw - 32px));right:16px;padding:18px}
.pt-phone-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.pt-call-bar .pt-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.pt-call-bar button{min-height:44px;font:inherit}.pt-call-bar button:disabled{opacity:.55;cursor:default}
.pt-call-bar button:focus-visible,.pt-call-bar input:focus-visible{outline:3px solid #93baff;outline-offset:3px}
.pt-call-bar form{display:flex;gap:8px;align-items:end;margin:12px 0}.pt-call-bar form label{flex:1;min-width:0;display:grid;gap:6px;font-size:13px}
.pt-call-bar input{box-sizing:border-box;width:100%;min-height:44px;padding:10px;border:1px solid #d5deea;border-radius:7px;font:inherit;background:white;color:#213346}
.pt-call-bar .pt-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.pt-phone-matches{display:flex;flex-wrap:wrap;gap:8px}.pt-call-bar p{overflow-wrap:anywhere}
@media(max-width:600px){.pt-call-bar{bottom:max(16px,env(safe-area-inset-bottom));right:12px;width:calc(100vw - 24px);max-height:calc(100dvh - 32px)}}

.pt-phone-help{--pt-blue:#3565b5;--pt-ink:#23313a;--pt-muted:#64748b;width:min(600px,calc(100vw - 24px));background:white;line-height:1.5}
.pt-phone-help-head{display:flex;align-items:start;justify-content:space-between;gap:16px}.pt-phone-help-head h2{margin-bottom:16px}
.pt-phone-help nav{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}.pt-phone-help nav button{font-size:13px;min-height:44px}.pt-phone-help nav button[aria-pressed=true]{background:#edf3fd;border-color:#3565b5;color:#24559e}
.pt-phone-help [data-help-progress]{font-size:12px;color:#64748b}.pt-phone-help h3{font-size:19px;margin:12px 0}.pt-phone-help ol{padding-left:24px;margin:0}.pt-phone-help li{padding:0 0 14px 5px}.pt-phone-help li p{margin:4px 0;color:#526277;font-size:14px}.pt-phone-help footer{position:sticky;bottom:-26px;background:white;padding:12px 0 0;justify-content:space-between}
.pt-phone-control{display:inline-flex;align-items:center;gap:4px}.pt-call-bar .pt-actions{margin-top:0}.pt-call-bar .pt-phone-control .pt-column-help{min-width:26px;width:26px;min-height:32px;height:32px;border-radius:50%;padding:0;color:#3565a5;background:#edf3fd;font-size:13px}
