/* Shared call-workflow presentation. Colors follow the portal theme. */
.call-notes-dialog{--workflow-surface:#fff;--workflow-soft:#f5f6f8;--workflow-muted:#626c79;--workflow-border:#dce1e7;box-sizing:border-box;margin:24px auto auto;inset-block-start:0;scrollbar-gutter:stable;width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--workflow-border);border-radius:14px;padding:28px;background:var(--workflow-surface);color:#27313d;box-shadow:0 24px 80px #0004;font-size:15px;line-height:1.6}
.call-notes-dialog::backdrop{background:#10182099;backdrop-filter:blur(3px)}
.call-notes-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 20px;padding-bottom:18px;border-bottom:1px solid var(--workflow-border)}
.call-notes-dialog h2{font-size:22px;line-height:1.35;margin:0;font-weight:600;letter-spacing:-.3px}
.call-notes-dialog h3{font-size:13px;font-weight:600;color:var(--workflow-muted);margin:26px 0 10px}
.call-notes-dialog>header>[data-close],.call-notes-dialog>header>[data-close-list]{display:inline-grid;place-items:center;flex-shrink:0;width:34px;height:34px;min-height:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--workflow-muted);font-size:25px;font-weight:400;line-height:1}
.call-notes-dialog>header>[data-close]:hover,.call-notes-dialog>header>[data-close-list]:hover{background:var(--workflow-soft);color:inherit}
.call-notes-dialog form{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;padding:0;border:0;box-shadow:none;background:transparent;margin:0}
.call-notes-dialog [hidden],.call-notes-dialog form[hidden]{display:none!important}
.call-notes-dialog form>label{display:block;min-width:0;font-size:14px;font-weight:600;color:inherit;line-height:1.5}
.call-notes-dialog textarea,.call-notes-dialog select,.call-notes-dialog input[type=datetime-local]{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:9px 0 0;border:1px solid var(--workflow-border);border-radius:8px;background:var(--workflow-surface);color:inherit;font:inherit;font-size:15px;font-weight:400;padding:12px 14px;line-height:1.6}
.call-notes-dialog textarea{resize:vertical;height:160px;min-height:100px;max-height:32vh}
.call-notes-dialog textarea::placeholder{color:var(--workflow-muted);opacity:.8;font-weight:400}
.call-notes-dialog textarea:focus-visible{outline:3px solid #ce1d0330;outline-offset:2px;border-color:var(--red)}
.call-notes-dialog .notes-context{margin:0 0 20px;padding:14px 16px;background:var(--workflow-soft);border:1px solid var(--workflow-border);border-radius:9px;color:inherit;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.notes-privacy,.notes-meta,.call-notes-dialog .notes-meta{font-size:13px;font-weight:400;color:var(--workflow-muted);overflow-wrap:anywhere}
.call-notes-dialog .notes-privacy{margin:0 0 18px;line-height:1.6}
.call-notes-dialog form>.notes-privacy{margin:-7px 0 0}
.call-notes-dialog .notes-status,.call-notes-dialog [role=status]{font-size:13px;color:var(--workflow-muted);margin:12px 0}
.call-notes-dialog [role=status]:empty,.call-notes-dialog .notes-status:empty{display:none}
.notes-modes{display:flex;gap:4px;background:var(--workflow-soft);border:1px solid var(--workflow-border);padding:4px;border-radius:10px;margin:0 0 22px}
.call-notes-dialog .notes-modes button{flex:1;min-width:0;padding:9px 12px;background:transparent;border:1px solid transparent;border-radius:7px;color:var(--workflow-muted);font-size:14px;line-height:1.5;font-weight:600;white-space:normal}
.call-notes-dialog .notes-modes button:hover{color:inherit;background:var(--workflow-surface)}
.call-notes-dialog .notes-modes button[aria-pressed=true]{background:var(--workflow-surface);color:inherit;border-color:var(--workflow-border);box-shadow:0 1px 3px #0000000c}
.notes-share,.call-notes-dialog form>.notes-share{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:400;cursor:pointer;margin:0}
.call-notes-dialog input[type=checkbox]{accent-color:var(--red);width:18px;height:18px;min-height:0;margin:0;flex-shrink:0}
.notes-list article{padding:16px;background:var(--workflow-soft);border:1px solid var(--workflow-border);border-radius:9px;margin:0 0 18px}
.notes-list .notes-meta{margin:0 0 8px}.notes-list .notes-text{margin:0}
.notes-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.65}
.call-notes-dialog .notes-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;margin:4px 0 0;padding-top:20px;border-top:1px solid var(--workflow-border)}
.call-notes-dialog button,.call-notes-dialog .button{border-radius:8px;min-height:42px;font-size:14px;padding:10px 16px}
.call-notes-dialog .button{background:var(--workflow-surface);color:inherit;border-color:var(--workflow-border)}
.call-notes-dialog .button:hover{background:var(--workflow-soft);border-color:var(--workflow-muted)}
.call-notes-dialog [data-delete]{margin-right:auto;padding-left:0;padding-right:0;background:transparent;border-color:transparent;color:var(--link);font-weight:400}
.call-notes-dialog [data-login]{margin-top:20px;width:100%;white-space:normal}
.call-notes-dialog button:disabled{opacity:.55;cursor:wait}
.field-optional{font-weight:400;color:var(--workflow-muted);font-size:13px;margin-left:4px}
.call-note-button,.call-request-button,.followup-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:0;padding:6px;margin:0 0 0 4px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--workflow-muted,#687382);vertical-align:middle}
.call-note-button svg,.call-request-button svg,.followup-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.call-note-button:hover,.call-request-button:hover,.followup-button:hover{background:#8882;border-color:var(--line);color:var(--link)}
.call-table td:has(>.call-note-button){white-space:nowrap}
.callback-eyebrow{margin:0 0 5px;color:var(--workflow-muted);font-size:12px;letter-spacing:.6px;text-transform:uppercase}
.callback-person{margin:0;font-size:22px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.callback-selection{border:0;padding:0;margin:24px 0 20px;min-width:0;max-height:40vh;overflow:auto}
.callback-selection legend{font-size:14px;font-weight:600;margin:0 0 12px;padding:0}
.callback-selection label{display:flex;align-items:center;gap:12px;color:inherit;font-size:15px;font-weight:400;padding:13px 15px;margin:7px 0;background:var(--workflow-soft);border:1px solid var(--workflow-border);border-radius:8px;cursor:pointer}
.callback-selection label:has(input:checked){border-color:color-mix(in srgb,var(--red) 40%,var(--workflow-border))}
.task-overview{width:min(700px,calc(100vw - 32px))}
.task-card{padding:18px;border:1px solid var(--workflow-border);border-radius:10px;background:var(--workflow-surface);margin:12px 0}
.task-card>p{margin:5px 0}.task-card .task-person{font-size:16px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.task-card .notes-actions{margin-top:16px;padding-top:14px}
.task-card .notes-text:empty{display:none}
.task-card[data-state=completed],.task-card[data-state=cancelled]{background:var(--workflow-soft)}
.task-empty{text-align:center;padding:38px 20px;color:var(--workflow-muted);font-size:15px;line-height:1.7}
#calls-panel .pagehead{justify-content:flex-start;flex-wrap:wrap;gap:10px}
#calls-panel .pagehead>div:first-child{margin-right:auto}
#calls-panel .pagehead>.button{font-size:13px;min-height:40px;border-radius:8px;padding:9px 13px}
:root[data-theme=dark] .call-notes-dialog{--workflow-surface:#1d2229;--workflow-soft:#252c35;--workflow-muted:#aeb9c8;--workflow-border:#3b4552;background:var(--workflow-surface);color:#e7ecf2}
:root[data-theme=dark] .call-notes-dialog label{color:inherit}
:root[data-theme=dark] .call-note-button,:root[data-theme=dark] .call-request-button,:root[data-theme=dark] .followup-button{color:#b2becd}
@media(max-width:600px){.call-notes-dialog{margin-top:12px;width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:20px;border-radius:12px}.call-notes-dialog h2{font-size:20px}.call-notes-dialog .notes-actions{gap:8px}.call-notes-dialog .notes-actions>button,.call-notes-dialog .notes-actions>.button{width:auto;flex:1 1 auto}.call-notes-dialog [data-delete]{flex-basis:100%;text-align:left}.call-notes-dialog form>label{min-width:0}.task-card{padding:15px}.callback-person{font-size:20px}.call-notes-dialog .notes-modes button{font-size:13px;padding:9px 7px}}


.call-row-tools{display:flex;align-items:center;gap:2px;margin-top:8px}.call-row-tools>button{margin:0}.call-table td:has(>.call-row-tools){white-space:nowrap}

/* Keep the call heading free of entry counters. */
#calls-panel .call-count{display:none}

/* Caller identity follows the call list, with readable sizes inside workflows. */
.call-notes-dialog .workflow-party{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.call-notes-dialog .workflow-party .caller-company{display:block;font-size:16px;font-weight:400;margin:0 0 3px}
.call-notes-dialog .workflow-party .caller-name{display:block;font-size:16px;font-weight:600;margin:0 0 5px}
.call-notes-dialog .workflow-party .caller-number{display:block;font-size:16px;font-weight:600}
.call-notes-dialog .workflow-party>.notes-meta{display:block;margin-top:8px;font-size:14px;font-weight:400}
.call-notes-dialog .notes-meta,.call-notes-dialog .notes-privacy,.call-notes-dialog .field-optional,.call-notes-dialog [role=status]{font-size:14px}
.call-notes-dialog .notes-text{font-size:16px}
.call-notes-dialog h3{font-size:16px}
.call-notes-dialog .callback-eyebrow{font-size:14px}
@media(max-width:600px){.call-notes-dialog .notes-modes button{font-size:14px}}

.call-notes-dialog .workflow-party:not(:has(.caller-name)) .caller-company{font-weight:600}
.call-notes-dialog .workflow-party .caller-label-text{white-space:normal;overflow-wrap:anywhere}

/* Review corrections: centered call actions, explicit confirmations and aligned shortcuts. */
.call-table th:nth-child(5),.call-table td:nth-child(5),.call-table .call-status-cell{text-align:center}
.call-row-tools{justify-content:center}
.workflow-shortcuts{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
.workflow-shortcuts:not(:has(button:not([hidden]))){display:none}
.workflow-shortcuts>.button{font-size:14px;min-height:40px;border-radius:8px;padding:9px 13px}
.call-notes-dialog .workflow-icon,.workflow-alert .workflow-icon{display:inline-block;width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;pointer-events:none}
.call-notes-dialog button:has(.workflow-icon),.workflow-alert button:has(.workflow-icon){display:inline-flex;align-items:center;justify-content:center;gap:8px}
.call-notes-dialog .workflow-confirm .workflow-icon{color:#258449}
.call-notes-dialog .workflow-cancel .workflow-icon,.workflow-alert .workflow-cancel .workflow-icon{color:#ba382b}
:root[data-theme=dark] .call-notes-dialog .workflow-confirm .workflow-icon{color:#71d49b}
:root[data-theme=dark] .call-notes-dialog .workflow-cancel .workflow-icon,:root[data-theme=dark] .workflow-alert .workflow-cancel .workflow-icon{color:#ff968d}
.call-notes-dialog>header button[data-close-proposal]{display:grid;place-items:center;width:34px;height:34px;min-height:0;padding:6px;background:transparent;border:0}
.call-notes-dialog button:focus-visible,.call-notes-dialog a:focus-visible{outline:2px solid var(--link);outline-offset:3px}
.call-notes-dialog button:focus:not(:focus-visible){outline:none;box-shadow:none}
.call-notes-dialog:has(#notes-title) textarea{height:120px;min-height:90px;max-height:26vh;font-size:16px}
.call-notes-dialog .request-completed{margin:0 0 16px}
.call-notes-dialog .request-save{position:sticky;bottom:0;background:var(--workflow-surface);padding-bottom:4px}
.request-pending-save{border-color:#258449}
.request-pending-save input{accent-color:#258449}
.workflow-alerts:empty{display:none}.workflow-alerts{display:grid;gap:10px;margin:0 0 18px}
.workflow-alert{display:flex;align-items:center;gap:14px;padding:12px 16px;border:1px solid var(--line);border-left:4px solid #ce1d03;border-radius:8px;background:#fff;font-size:16px}
.workflow-alert>span{flex:1;overflow-wrap:anywhere}.workflow-alert>.button{font-size:14px}
.workflow-alert-close{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:6px;background:transparent;border:0;color:inherit}
:root[data-theme=dark] .workflow-alert{background:#1d2229}
.workflow-shortcuts .request-new,.workflow-shortcuts .followup-due{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
@media(max-width:700px){.workflow-shortcuts{width:100%;justify-content:flex-end}.workflow-shortcuts>.button{font-size:14px}.workflow-alert{flex-wrap:wrap}.workflow-alert>span{flex-basis:calc(100% - 60px)}
#filters,#outgoing-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#filters>label,#outgoing-filters>label{min-width:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr)}
#filters input,#filters select,#outgoing-filters input,#outgoing-filters select{width:100%;min-width:0;max-width:100%}}

.call-notes-dialog .request-pending-save input[type=checkbox]{accent-color:#258449}

@media(max-width:700px){#filters>label.search,#outgoing-filters>label.search{grid-column:1/-1}#filters>button,#outgoing-filters>button{align-self:end}}

/* Second review: readable shared dialog typography and consistent dark edges. */
.call-notes-dialog{--workflow-muted:#4d5866;font-size:16px}
.call-notes-dialog label,.call-notes-dialog form>label,.call-notes-dialog button,.call-notes-dialog .button,.call-notes-dialog textarea,.call-notes-dialog select,.call-notes-dialog .notes-meta,.call-notes-dialog .notes-privacy,.call-notes-dialog .field-optional,.call-notes-dialog [role=status],.call-notes-dialog .callback-eyebrow,.call-notes-dialog .workflow-party>.notes-meta{font-size:16px}
.call-notes-dialog textarea::placeholder{opacity:1}
.call-notes-dialog .workflow-confirm:not(.button) .workflow-icon{color:#fff}
:root[data-theme=dark] dialog{border:1px solid #3b4552;outline:none}
:root[data-theme=dark] .call-notes-dialog{--workflow-muted:#c3ccd8;--workflow-border:#3b4552}
:root[data-theme=dark] .call-notes-dialog .workflow-confirm:not(.button) .workflow-icon{color:#fff}
.workflow-shortcuts .request-new{border:2px solid #b51a03;box-shadow:0 0 0 2px #b51a0333}
:root[data-theme=dark] .workflow-shortcuts .request-new{border-color:#ff9c8b;box-shadow:0 0 0 2px #ff9c8b55;color:#ffe0d9}

.call-table th:last-child,.call-table .initials-cell{text-align:center}
.call-table .initials-select{text-align:center;text-align-last:center}

/* Visible note presence without exposing private text or another user's notes. */
.call-note-button.has-notes{color:var(--link);background:#ce1d0312;border-color:#ce1d0330}
:root[data-theme=dark] .call-note-button.has-notes{color:#ff9e8c;background:#ff9e8c18;border-color:#ff9e8c50}
.callback-confirmation:focus,.followup-confirmation:focus{outline:none}

.call-note-button{padding:0}
.call-note-button svg{display:block;flex:none}

.call-request-button,.followup-button{padding:0}
.call-request-button svg,.followup-button svg{display:block;flex:none}
.call-request-button.has-request,.followup-button.has-followup{color:var(--link);background:#ce1d0312;border-color:#ce1d0330}
:root[data-theme=dark] .call-request-button.has-request,:root[data-theme=dark] .followup-button.has-followup{color:#ff9e8c;background:#ff9e8c18;border-color:#ff9e8c50}

.call-row-tools>.call-note-button{order:1}.call-row-tools>.call-request-button{order:2}.call-row-tools>.followup-button{order:3}

.workflow-shortcuts>.button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.workflow-shortcut-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.workflow-shortcuts>.button[hidden]{display:none}
