/* Shared visual language for the questionnaire and staff workspace.
   Keep the type scale and palette here; legacy layout rules remain structural. */
:root{
  --ui-font:Heebo,Arial,sans-serif;
  --ui-small:14px;--ui-body:16px;--ui-section:18px;--ui-dialog:24px;--ui-title:28px;
  --ui-ink:#28313a;--ui-muted:#65707b;--ui-line:#dce1e5;
  --ui-paper:#fff;--ui-soft:#f4f5f6;--ui-canvas:#f3f4f5;
  --ui-brand:#c8223d;--ui-brand-hover:#ad1831;--ui-brand-soft:#fcf0f2;
  --ui-success:#35694d;--ui-success-soft:#eef5f0;
  --ui-warning:#855b20;--ui-warning-soft:#fff8ec;
  --ui-radius:6px;
}
#app, #app *, body dialog, body dialog *, .inline-editor, .inline-editor *{
  font-family:var(--ui-font)!important;letter-spacing:normal;
}
#app, body dialog, .inline-editor{font-size:var(--ui-body);line-height:1.6;color:var(--ui-ink)}
#app button, body dialog:is(dialog,#action-feedback,#unsaved-dialog,#detail) button{font-weight:500}
#app [hidden],body dialog [hidden]{display:none!important}
#app :is(input,textarea,select), body dialog :is(input,textarea,select){font-size:var(--ui-body)!important;line-height:1.5;color:var(--ui-ink)}
#app :is(button,input,select,textarea,summary,a):focus-visible,
body dialog :is(button,input,select,textarea,summary,a):focus-visible{
  outline:2px solid var(--ui-brand);outline-offset:3px;
}
#app .primary, #detail .primary, body .invite-primary, body .queue-confirm,
body .completion-confirm, body .feedback-confirm, .inline-editor .inline-confirm{
  background:var(--ui-brand)!important;color:white!important;border-color:var(--ui-brand);
  box-shadow:none!important;font-size:var(--ui-body)!important;font-weight:600;
  border-radius:var(--ui-radius);line-height:1.5;
}
#app .primary:hover, #detail .primary:hover, .invite-primary:hover,
.completion-confirm:hover, .feedback-confirm:hover{background:var(--ui-brand-hover)!important}

/* A quiet paper surface above the school photograph. */
body.standalone-survey{--ui-body:18px}
body.standalone-survey #app{
  padding:32px 24px;min-height:100dvh;
  background:linear-gradient(#171b2447,#171b2466),url('https://rockstarschool.co.il/wp-content/uploads/2026/09/hero-cover-main-opt.webp') center/cover;
}
body.standalone-survey .experience{max-width:720px;margin:auto;padding:0}
#app .question-area{
  padding:28px 32px 20px;background:#fffefc;color:var(--ui-ink);
  border:1px solid #ffffffb3;border-radius:var(--ui-radius);backdrop-filter:none;
  box-shadow:0 12px 40px #11182729;
}
#app .question-area .card{padding:24px 0 0;margin:0;background:transparent;color:var(--ui-ink);animation:none}
#app .question-area .journey{padding:0 0 20px;border-color:var(--ui-line);gap:16px;justify-content:space-between}
#app .journey-step{font-size:var(--ui-small);font-weight:400;gap:8px;color:var(--ui-muted)}
#app .journey-step b{width:28px;height:28px;font-size:var(--ui-small);font-weight:500;border:1px solid var(--ui-line);background:transparent;color:var(--ui-muted)}
#app .journey-step.current{color:var(--ui-ink);font-weight:600}
#app .journey-step.current b{background:var(--ui-brand);border-color:var(--ui-brand);color:white}
#app .journey-step.done b{background:var(--ui-soft);border-color:var(--ui-line);color:var(--ui-success)}
#app .question-area .step-meta{font-size:var(--ui-small);color:var(--ui-muted);margin-bottom:12px;line-height:1.5}
#app .question-area h2{font-size:var(--ui-title);line-height:1.35;font-weight:600;color:var(--ui-ink);margin:0 0 12px}
#app .question-area .brand-emphasis{color:inherit;font-weight:inherit}
#app .question-area .muted{font-size:var(--ui-body);line-height:1.7;color:var(--ui-muted);margin:0 0 24px;max-width:none}
#app .question-area :is(h3,h4){font-size:var(--ui-section);line-height:1.5;font-weight:600;color:var(--ui-ink);margin:0 0 12px}
#app .question-area :is(.section-title,.field>span){font-size:var(--ui-body);line-height:1.5;font-weight:500;color:var(--ui-ink)}
#app .question-area .section-title{display:block;margin:24px 0 8px}
#app .question-area .field{margin:12px 0;min-width:0}
#app .question-area .field .optional{font-size:var(--ui-small);font-weight:400;color:var(--ui-muted)}
#app .question-area .fields{gap:16px;align-items:start}
#app .question-area .prefill-summary{
  margin:0;padding:16px 18px;background:var(--ui-soft);border:1px solid var(--ui-line);
  box-shadow:none;align-items:flex-start;gap:12px;
}
#app .question-area .prefill-summary .record-label{font-size:var(--ui-small);font-weight:400;line-height:1.5;color:var(--ui-muted);margin:0 0 6px}
#app .question-area .prefill-summary strong{font-size:var(--ui-section);font-weight:600;line-height:1.5;color:var(--ui-ink)}
#app .question-area .prefill-summary p,#app .question-area .prefill-summary small{font-size:var(--ui-body);font-weight:400;line-height:1.5;color:var(--ui-ink);margin:4px 0 0}
#app .question-area .summary-check{background:#e6ede8;color:var(--ui-success);width:26px;height:26px;font-size:16px;margin-top:2px;box-shadow:none}
#app .question-area .verification-block{padding:12px 0 20px;margin:0 0 20px;gap:12px;border-color:var(--ui-line)}
#app .question-area .verification-block details{padding:0;border:0;margin:0}
#app .question-area .verification-block .verify-prompt{font-size:var(--ui-small);font-weight:400;color:var(--ui-muted)}
#app .question-area .verification-block .identity-edit,
#app .question-area .verification-block details[open] .identity-edit{
  font-size:var(--ui-small);font-weight:500;color:var(--ui-ink);background:transparent;
  border:1px solid var(--ui-line);min-height:40px;padding:8px 12px;
}
#app .question-area .verification-block .identity-edit:before{width:14px;height:14px;color:var(--ui-muted)}
#app .question-area .verification-block .identity-edit:hover{background:var(--ui-soft);border-color:#9da8b2}
#app .question-area .verification-block+.section-title{margin-top:0}
#app .question-area :is(input,textarea,select,.callback-toggle){
  border:1px solid #cbd2d8;background:white;color:var(--ui-ink);padding:11px 12px;
  font-size:var(--ui-body);font-weight:400;line-height:1.5;min-height:48px;box-shadow:none;
}
#app .question-area input::placeholder,#app .question-area textarea::placeholder{color:#747c84;opacity:1}
#app .question-area :is(.callback-toggle,.custom-dropdown .callback-toggle,.day-row .custom-dropdown .callback-toggle){height:48px;text-align:right}
#app .question-area .select-control{margin:8px 0 16px;min-width:0}
#app .question-area .callback-toggle span,#app .question-area .neighborhood-toggle{color:var(--ui-muted);font-size:20px}
#app .question-area .callback-control{margin:8px 0 0}
#app .question-area .callback-options,#app .question-area .neighborhood-list{border-color:var(--ui-line);box-shadow:0 8px 24px #25303d1f;padding:4px;background:white}
#app .question-area .callback-options button,#app .question-area .neighborhood-list [role=option]{font-size:var(--ui-body);font-weight:400;line-height:1.5;color:var(--ui-ink);padding:10px 12px;min-height:44px}
#app .question-area .callback-options button:hover,#app .question-area .callback-options button[aria-selected=true],#app .question-area .neighborhood-list [aria-selected=true]{background:var(--ui-brand-soft);color:var(--ui-brand)}
#app .question-area .location-section{margin:24px 0 0}
#app .question-area .location-section h3{font-size:var(--ui-body);font-weight:500;margin:0 0 8px}
#app .question-area .location-option{padding:14px;min-height:80px;border:1px solid #cbd2d8;background:white;gap:12px}
#app .question-area .location-option strong{font-size:var(--ui-body);font-weight:500;line-height:1.5;color:var(--ui-ink)}
#app .question-area .location-option small{font-size:var(--ui-small);line-height:1.5;color:var(--ui-muted);margin-top:3px}
#app .question-area .location-option.selected{background:var(--ui-brand-soft);border-color:var(--ui-brand);box-shadow:inset 0 0 0 1px var(--ui-brand)}
#app .question-area .location-option:hover{border-color:var(--ui-brand)}
#app .location-radio{width:18px;height:18px;border:1px solid #a2acb5}
#app .location-option.selected .location-radio{border:5px solid var(--ui-brand)}
#app .question-area .home-address{border-color:var(--ui-line);padding-top:16px;margin-top:20px}
#app .question-area .home-availability{font-size:var(--ui-small);line-height:1.65;color:var(--ui-muted)}
#app .question-area .actions{margin:24px 0 0;padding:0;border:0;position:static;background:transparent;backdrop-filter:none}
#app .question-area .primary{min-height:48px;padding:12px 16px}
#app .question-area .primary span{font-size:20px}
#app .question-area .secondary{font-size:var(--ui-small);font-weight:400;color:var(--ui-muted);padding:10px 12px;margin:4px auto 0;min-height:40px;line-height:1.5}
#app .question-area .privacy-line{font-size:var(--ui-small);line-height:1.5;color:var(--ui-muted);margin:12px 0 0}
#app .preview-label{font-size:var(--ui-small);line-height:1.5;color:white;padding:16px 0 0}
#app .question-area details{padding:16px 0;margin:0;border-color:var(--ui-line)}
#app .question-area summary{font-size:var(--ui-body);font-weight:500;line-height:1.6;color:var(--ui-ink)}
#app .question-area summary:before{color:var(--ui-muted);font-size:18px}
#app .question-area summary small{font-size:var(--ui-small);font-weight:400;color:var(--ui-muted)}
#app .question-area .missing-fields{margin:20px 0;padding:16px;background:var(--ui-soft);border:1px solid var(--ui-line)}
#app .question-area .day-add{gap:12px;margin:20px 0}
#app .question-area .day-add .select-control{margin:0}
#app .question-area .day-add #add-day{height:48px;min-height:48px;font-size:var(--ui-body);font-weight:500;background:white;color:var(--ui-ink);border:1px solid #cbd2d8;padding:10px 14px}
#app .question-area .day-add #add-day:hover{background:var(--ui-soft);border-color:var(--ui-brand)}
#app .question-area .day-row{background:var(--ui-soft);border:1px solid var(--ui-line);box-shadow:none;padding:16px;gap:12px;color:var(--ui-ink)}
#app .question-area .day-row .time-range-prompt{font-size:var(--ui-small);color:var(--ui-muted);line-height:1.6;margin:0}
#app .question-area .day-row strong{font-size:var(--ui-body);font-weight:600;color:var(--ui-ink)}
#app .question-area .day-row small{font-size:var(--ui-small);color:var(--ui-muted);margin-bottom:6px}
#app .question-area .day-row .remove-day{font-size:20px;color:var(--ui-muted);min-width:32px;min-height:32px}
#app .question-area .day-row .time-select{margin:0}
#app #survey .callback-preference{padding:20px;background:var(--ui-soft);border:1px solid var(--ui-line);margin:24px 0}
#app #survey .callback-preference h3{font-size:var(--ui-section);margin:0 0 8px;color:var(--ui-ink)}
#app #survey .callback-preference p{font-size:var(--ui-small);line-height:1.7;color:var(--ui-muted);margin:0 0 16px}
#app #survey .callback-preference .field{margin:0}
#app #survey .callback-preference input[type=date]{min-height:48px;height:48px}
#app .question-area .music-preference{margin:24px 0 0;padding-top:24px;border-color:var(--ui-line)}
#app .question-area .music-preference h3{font-size:var(--ui-section);margin:0 0 8px}
#app .question-area .music-preference p{font-size:var(--ui-body);line-height:1.7;color:var(--ui-muted);margin:0 0 12px}
#app .question-area :is(.file-note,#video-selection){font-size:var(--ui-small);line-height:1.6;color:var(--ui-muted)}
#app .question-area input[type=file]{height:auto;padding:10px;min-height:48px}
#app .question-area input[type=file]::file-selector-button{font:inherit;color:var(--ui-ink);background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:4px;padding:7px 10px;margin-inline-end:10px}

/* Staff table, cards, history and dialogs share the same scale and neutral surfaces. */
body:has(.admin-layout),body:has(.login){background:var(--ui-canvas)}
body:has(.admin-layout) #app{padding:28px 32px;color:var(--ui-ink)}
.admin-layout .admin-heading h1{font-size:var(--ui-title);font-weight:600;margin:4px 0 8px}
.admin-layout .admin-heading :is(.eyebrow,p),.admin-layout .stage-description{font-size:var(--ui-small);line-height:1.6;color:var(--ui-muted)}
.admin-layout .admin-heading{margin-bottom:24px;gap:20px}
.admin-layout :is(.primary,.choice,.open-lead,.row-whatsapp){font-size:var(--ui-small)!important;font-weight:500;min-height:40px;line-height:1.5}
.admin-layout .admin-utilities .primary{margin-top:0}
.admin-layout .lead-stage-tabs button{font-size:var(--ui-body);font-weight:500;padding:16px 20px;color:var(--ui-muted);border-color:var(--ui-line);border-bottom-color:transparent}
.admin-layout .lead-stage-tabs strong{font-size:var(--ui-dialog);font-weight:600;color:var(--ui-ink)}
.admin-layout .lead-stage-tabs button[aria-selected=true]{color:var(--ui-brand);background:var(--ui-brand-soft);border-bottom-color:var(--ui-brand)}
.admin-layout .lead-stage-tabs button[aria-selected=true] strong{color:var(--ui-brand)}
.admin-layout :is(.filter-panel,.bulk-toolbar){border:1px solid var(--ui-line);background:white;padding:16px;box-shadow:none}
.admin-layout .toolbar :is(input,button){font-size:var(--ui-body);min-height:44px;height:44px}
html body .admin-layout .toolbar .callback-toggle{min-height:44px!important;height:44px!important}
.admin-layout .toolbar label>span{font-size:var(--ui-small);font-weight:500;color:var(--ui-muted)}
.admin-layout .toolbar .callback-toggle>span{font-size:20px;color:var(--ui-muted)}
.admin-layout .bulk-toolbar strong{font-size:var(--ui-body);font-weight:500;color:var(--ui-ink)}
.admin-layout .bulk-toolbar p{font-size:var(--ui-small);color:var(--ui-muted);margin-top:4px}
.admin-layout .bulk-actions button{font-size:var(--ui-small);font-weight:500}
.admin-layout .leads-table{font-size:var(--ui-body);color:var(--ui-ink)}
.admin-layout .leads-table :is(th,small,.status-label,.invitation-state,.decline-reason-cell .inline-value){font-size:var(--ui-small);line-height:1.6}
.admin-layout .leads-table th{background:var(--ui-soft);color:var(--ui-muted);font-weight:500;padding:14px 16px}
.admin-layout .leads-table td{padding:16px;line-height:1.6;border-color:#e9ecef}
.admin-layout .leads-table small{color:var(--ui-muted);margin-top:4px}
.admin-layout .leads-table .inline-value.lead-name{font-size:var(--ui-body);font-weight:600;color:var(--ui-ink)}
.admin-layout .leads-table .inline-value.status-label{font-size:var(--ui-small);font-weight:500;padding:4px 8px}
.admin-layout .leads-table .status-0{background:#edf1f5;color:#4a5d72}
.admin-layout .leads-table .status-1{background:var(--ui-success-soft);color:var(--ui-success)}
.admin-layout .leads-table .status-2{background:#f1f1f2;color:#67626a}
.admin-layout .leads-table .row-whatsapp{color:var(--ui-ink);border-color:var(--ui-line);background:white}
.admin-layout .leads-table .row-whatsapp:hover{background:var(--ui-brand-soft);border-color:var(--ui-brand);color:var(--ui-brand)}
.admin-layout :is(.stage-description,.inline-edit-summary,#result-count,.list-summary,.sync-state){font-size:var(--ui-small);color:var(--ui-muted);line-height:1.6}
body :is(.invitation-dialog,.callback-calendar,#detail){color:var(--ui-ink);border-color:var(--ui-line);border-radius:var(--ui-radius);background:white}
body :is(.invitation-dialog,.callback-calendar,#detail) h2{font-size:var(--ui-dialog)!important;line-height:1.4;font-weight:600;color:var(--ui-ink);margin:4px 0 8px}
body :is(.invitation-dialog,.callback-calendar,#detail) h3{font-size:var(--ui-section)!important;line-height:1.5;font-weight:600;color:var(--ui-ink)}
body :is(.invitation-dialog,.callback-calendar,#detail) :is(p,.edit-hint,.muted){font-size:var(--ui-body);line-height:1.7;color:var(--ui-muted)}
#detail :is(.field>span,.eyebrow,.crm-contact-line,.crm-overview small,.crm-help,.crm-empty,.crm-check,.crm-section-heading>span){font-size:var(--ui-small);color:var(--ui-muted);line-height:1.6}
#detail .callback-toggle>span{font-size:20px;color:var(--ui-muted)}
#detail .crm-contact-line{font-size:var(--ui-body);margin:0}
#detail .crm-overview strong{font-size:var(--ui-small);font-weight:500;color:var(--ui-ink)}
#detail .crm-overview{background:var(--ui-soft);border-color:var(--ui-line)}
#detail .crm-tabs button{font-size:var(--ui-small);font-weight:500;color:var(--ui-muted);padding:14px 16px;line-height:1.6}
#detail .crm-tabs button[aria-selected=true]{background:var(--ui-brand-soft);color:var(--ui-brand);border-bottom-color:var(--ui-brand)}
#detail .crm-section{padding:20px;border-color:var(--ui-line);margin-bottom:20px}
#detail .crm-section h3{margin-bottom:16px}
#detail :is(.choice,.wa,.close),.invitation-dialog :is(button,a),.callback-calendar button{font-size:var(--ui-small);font-weight:500}
#detail :is(.choice,.wa){border-color:var(--ui-line);color:var(--ui-ink);min-height:40px}
#detail .crm-task{background:var(--ui-soft);border-color:var(--ui-line);border-inline-start:2px solid #98a5b0}
#detail .crm-task strong{font-size:var(--ui-body);font-weight:500;color:var(--ui-ink)}
#detail .crm-task small,#detail .crm-task .choice{font-size:var(--ui-small)}
#detail .crm-save{box-shadow:none;border-color:var(--ui-line);gap:16px}
#detail .crm-conversation{border-color:var(--ui-line);box-shadow:none;background:white}
#detail .crm-conversation p{font-size:var(--ui-body);color:var(--ui-ink);line-height:1.75}
#detail :is(.crm-conversation time,.crm-history-day h4,.crm-conversation-channel,.crm-history-count,.crm-system-event,.crm-system-event p,.crm-system-event dl,.crm-system-event>time,.crm-system-history summary,.crm-history-heading p){font-size:var(--ui-small);color:var(--ui-muted);line-height:1.6}
#detail .crm-system-event strong{font-size:var(--ui-small);font-weight:500;color:var(--ui-ink)}
#detail .crm-system-history{border-color:var(--ui-line);background:var(--ui-soft)}
#detail .source-details :is(summary,th,td,p){font-size:var(--ui-small);line-height:1.7;color:var(--ui-ink)}
.inline-editor{font-size:var(--ui-body);border-color:var(--ui-line);box-shadow:0 8px 24px #25303d26}
.inline-editor :is(.inline-editor-label,.inline-editor-error){font-size:var(--ui-small);line-height:1.6}
.inline-editor :is(input,textarea,button),.inline-status-editor>button{font-size:var(--ui-body);line-height:1.5}
.inline-editor .inline-editor-actions button{font-size:var(--ui-small)}
.inline-status-editor>button[aria-selected=true]{background:var(--ui-brand-soft);color:var(--ui-brand);font-weight:500}
body .invitation-dialog :is(.invite-guidance,.invite-tracking p,.invite-tracking small,.queue-explanation,.queue-counts,.queue-review li,.queue-person,.queue-phone,.queue-note,.queue-navigation,.queue-exclusions){font-size:var(--ui-small);line-height:1.7;color:var(--ui-muted)}
body .invitation-dialog :is(textarea,.invite-message-label){font-size:var(--ui-body);line-height:1.7;color:var(--ui-ink)}
body .invitation-dialog .rs-wa-connection{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin:16px 0;padding:14px;background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:4px;text-align:right}
.invitation-dialog .rs-wa-connection-copy{flex:1 1 240px;min-width:0}
body .invitation-dialog .rs-wa-connection strong{display:block;font-size:14px;font-weight:500;color:var(--ui-ink)}
body .invitation-dialog .rs-wa-connection .rs-wa-status{margin:4px 0;font-size:13px;line-height:1.6;color:var(--ui-muted)}
body .invitation-dialog .rs-wa-connection small{display:block;font-size:12px;line-height:1.6;color:var(--ui-muted)}
.invitation-dialog .rs-wa-install-actions{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin-inline-start:auto}
body .invitation-dialog .rs-wa-download{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 12px;box-sizing:border-box;background:white;border:1px solid var(--ui-line);border-radius:4px;color:var(--ui-ink);font-size:14px;font-weight:500;line-height:1.5;text-decoration:none;white-space:nowrap}
.invitation-dialog .rs-wa-download svg{flex:none}
body .invitation-dialog .rs-wa-download:hover{border-color:var(--ui-brand);color:var(--ui-brand);background:var(--ui-brand-soft)}
body .invitation-dialog .rs-wa-install-help{display:flex;align-items:center;justify-content:center;min-height:32px;color:var(--ui-muted);font-size:12px;line-height:1.5;text-underline-offset:3px}
.invitation-dialog .rs-wa-install-actions a:focus-visible{outline:2px solid var(--ui-brand);outline-offset:3px}
.invitation-dialog .rs-wa-install-help .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){.invitation-dialog .rs-wa-install-actions{width:100%;margin-inline-start:0}}
.queue-counts strong{font-size:var(--ui-section);font-weight:600;color:var(--ui-ink)}
.queue-person small{font-size:var(--ui-small)}
.queue-person.current{background:var(--ui-brand-soft);box-shadow:inset -2px 0 var(--ui-brand)}
.queue-counts,.invite-tracking{background:var(--ui-soft);border-color:var(--ui-line)}
body .invitation-dialog .queue-confirm{background:var(--ui-success)!important;border-color:var(--ui-success)}
.callback-calendar :is(.calendar-header span,.calendar-header p,.calendar-controls label,.calendar-weekdays,.calendar-day span,.calendar-agenda-heading span,.calendar-item small,.calendar-item p,.calendar-item-time,.calendar-empty,.calendar-feedback){font-size:var(--ui-small);line-height:1.6;color:var(--ui-muted)}
.callback-calendar .calendar-day b{font-size:var(--ui-body);font-weight:500}
.callback-calendar .calendar-month .calendar-day[aria-pressed=true]{background:var(--ui-brand-soft);box-shadow:inset 0 0 0 2px var(--ui-brand);color:var(--ui-brand)}
.callback-calendar .calendar-day[aria-pressed=true] span{color:var(--ui-brand)}
.callback-calendar .calendar-item>strong{font-size:var(--ui-body);font-weight:600}
.callback-calendar .calendar-overdue{color:var(--ui-warning);background:var(--ui-warning-soft);font-size:var(--ui-small)}
body :is(#detail,.invitation-dialog,.callback-calendar) .close{font-size:24px!important;line-height:1;width:40px;height:40px;min-width:40px;min-height:40px;background:var(--ui-soft);color:var(--ui-muted)}

/* The WhatsApp header stays outside the scrolling content, including on small screens. */
body #invitation-dialog{width:min(760px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 32px);padding:0;overflow:hidden}
body #invitation-dialog[open]{display:flex;flex-direction:column}
#invitation-dialog>.detail-header{flex:none;align-items:flex-start;gap:16px;margin:0;padding:20px 24px 16px;border-bottom:1px solid var(--ui-line);background:white}
#invitation-dialog .detail-header>div{min-width:0}
#invitation-dialog .eyebrow{font-size:12px;line-height:1.5;color:var(--ui-muted)}
body #invitation-dialog h2{font-size:22px!important;margin:4px 0}
body #invitation-dialog .invite-recipient{font-size:14px;line-height:1.5;margin:0;overflow-wrap:anywhere}
body #invitation-dialog .close{position:static;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;border:1px solid var(--ui-line);border-radius:4px;color:var(--ui-ink)}
#invitation-dialog .close:hover{background:var(--ui-brand-soft);color:var(--ui-brand)}
#invitation-dialog .invite-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 24px 24px}
#invitation-dialog .invite-message-preview{margin:0;border:1px solid var(--ui-line);border-radius:4px;padding:0;background:white}
#invitation-dialog .invite-message-preview summary{padding:10px 12px;font-size:14px;font-weight:500;cursor:pointer}
body #invitation-dialog #invite-message{display:block;width:100%;height:176px;min-height:120px;max-height:280px;resize:vertical;margin:0;padding:12px;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:var(--ui-soft);font-size:14px;line-height:1.7}
body #invitation-dialog .invite-guidance{margin:12px 0;font-size:14px}
#invitation-dialog .invite-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
#invitation-dialog .invite-actions>*{margin:0;min-height:44px;padding:10px 12px;text-align:center;border-radius:4px}
#invitation-dialog .invite-tracking{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:12px;margin:16px 0 0;border:1px solid var(--ui-line);border-radius:4px}
#invitation-dialog .invite-tracking strong{font-size:14px;font-weight:500}
body #invitation-dialog .invite-tracking p{margin:2px 0;font-size:14px}
#invitation-dialog .invite-tracking button{min-height:40px;padding:8px 12px;background:white;border:1px solid var(--ui-line);border-radius:4px}
#invitation-dialog .invite-tracking small{flex-basis:100%;font-size:12px}
body #invitation-dialog #invite-operation-state{color:var(--ui-warning);font-size:14px;margin:8px 0}
#invitation-dialog #invite-operation-state:empty{display:none}
#invitation-dialog #invite-feedback{border:0;margin:0;padding:0}
#invitation-dialog #invite-feedback h3{margin:0 0 4px}
body #invitation-dialog :is(.invite-feedback-help,.invite-feedback-last,#invite-feedback-state){font-size:14px;line-height:1.65;margin:8px 0 12px}
#invitation-dialog .invite-feedback-last{padding:10px 12px;background:var(--ui-soft);border-inline-start:3px solid var(--ui-line);overflow-wrap:anywhere;white-space:pre-line}
#invitation-dialog #invite-feedback .field{margin:16px 0;gap:6px}
#invitation-dialog #invite-feedback .field>span{font-size:14px;color:var(--ui-ink);font-weight:500}
#invitation-dialog .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#invitation-dialog #invite-feedback .select-control{display:block;width:100%;position:relative}
#invitation-dialog #invite-feedback .callback-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;text-align:right}
#invitation-dialog #invite-feedback .callback-toggle>span{font-size:20px;line-height:1}
#invitation-dialog #invite-feedback textarea{min-height:90px;resize:vertical;background:white;border:1px solid var(--ui-line);border-radius:4px;padding:10px 12px;font-size:16px}
#invitation-dialog #invite-feedback .callback-toggle{min-height:44px;padding:10px 12px;background:white;border:1px solid var(--ui-line);border-radius:4px;font-size:16px}
#invitation-dialog #invite-feedback .callback-options{position:relative;inset:auto;margin:4px 0 0;max-height:260px;overflow:auto;border-color:var(--ui-line);border-radius:4px;box-shadow:none}
#invitation-dialog #invite-feedback .callback-options button{display:block;width:100%;text-align:right;font-size:14px;min-height:40px;padding:10px 12px;border:0;background:white}
#invitation-dialog #invite-feedback .callback-options button:hover,#invitation-dialog #invite-feedback .callback-options button[aria-selected=true]{background:var(--ui-brand-soft);color:var(--ui-brand)}
#invitation-dialog #invite-feedback-save{min-height:44px;padding:10px 20px;border-radius:4px}
body #invitation-dialog .invite-local-error{color:#a72737!important}
#invitation-dialog .invite-close-warning{flex:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 24px;background:var(--ui-warning-soft);border-bottom:1px solid var(--ui-line)}
body #invitation-dialog .invite-close-warning p{margin:0;font-size:14px;flex:1 0 100%}
#invitation-dialog .invite-close-warning button{min-height:36px;padding:6px 10px;background:white;border:1px solid var(--ui-line);border-radius:4px}
@media(max-width:600px){
 body #invitation-dialog{max-height:calc(100dvh - 16px);width:calc(100vw - 16px)}
 #invitation-dialog>.detail-header{padding:14px 16px;gap:8px}
 body #invitation-dialog h2{font-size:20px!important}
 #invitation-dialog .invite-body{padding:16px}
 #invitation-dialog .invite-actions{grid-template-columns:1fr}
 #invitation-dialog .invite-close-warning{padding:12px 16px}
}

/* Matching feedback, completion, entry and expired-link states. */
body :is(.completion-dialog,.feedback-popup){padding:32px;box-shadow:0 16px 48px #16202b33;background:white;color:var(--ui-ink)}
body :is(.completion-dialog,.feedback-popup) h2{font-size:var(--ui-dialog);font-weight:600;line-height:1.4;color:var(--ui-ink);margin:0 0 12px}
body :is(.completion-dialog,.feedback-popup) p{font-size:var(--ui-body);line-height:1.7;color:var(--ui-muted);margin:0 0 24px}
body :is(.completion-check,.feedback-icon){width:44px;height:44px;font-size:24px;margin-bottom:20px;box-shadow:none;background:var(--ui-brand-soft);color:var(--ui-brand);border:0}
body .completion-check svg{width:24px;height:24px}
body :is(.completion-confirm,.feedback-confirm){min-height:48px;height:auto;padding:12px 16px}
body .completion-site{font-size:var(--ui-small);line-height:1.6;color:var(--ui-muted);margin-top:16px}
body :is(.completion-close,.feedback-close){font-size:24px;width:36px;height:36px;background:var(--ui-soft);color:var(--ui-muted)}
#app .login{max-width:440px;padding:32px;background:white;border:1px solid var(--ui-line);box-shadow:none}
#app .login h1{font-size:var(--ui-title);font-weight:600;margin:8px 0 12px}
#app .login .muted{font-size:var(--ui-body);line-height:1.7;color:var(--ui-muted)}
#app .login :is(.eyebrow,.field>span){font-size:var(--ui-small);color:var(--ui-muted)}
#app .card.success{background:#fffefc!important;border-color:var(--ui-line)!important;box-shadow:none;padding:32px!important;color:var(--ui-ink)!important}
#app .card.success h1{font-size:var(--ui-title)!important;font-weight:600;color:var(--ui-ink)!important;line-height:1.4}
#app .card.success p{font-size:var(--ui-body)!important;line-height:1.7;color:var(--ui-muted)!important}
#app .card.success a{color:var(--ui-brand)!important}

@media(max-width:800px){
  body:has(.admin-layout) #app{padding:20px 16px}
  .admin-layout .admin-heading h1{font-size:var(--ui-dialog)}
  .admin-layout .admin-utilities{gap:8px}
  .admin-layout .lead-stage-tabs button{padding:14px 12px;font-size:var(--ui-small)}
  .admin-layout .lead-stage-tabs strong{font-size:var(--ui-section)}
  .admin-layout .leads-table .inline-value.lead-name{font-size:var(--ui-body)}
  .admin-layout .leads-table td{padding:0}
  #detail .crm-section{padding:16px}
  #detail .crm-tabs button{padding:12px;font-size:var(--ui-small)}
  .callback-calendar .calendar-month .calendar-day{padding:8px 4px;min-height:72px}
  .callback-calendar .calendar-day-count{display:inline-block;min-width:24px;padding:0 4px;background:var(--ui-soft);border-radius:4px}
  .callback-calendar .calendar-day .calendar-count-label{display:none}
}
@media(max-width:700px){
  body.standalone-survey #app{padding:16px 12px;background-attachment:scroll}
  #app .question-area{padding:20px 18px 16px}
  #app .question-area .card{padding-top:20px}
  #app .question-area h2{font-size:var(--ui-dialog)}
  #app .question-area .journey{padding-bottom:16px;gap:8px}
  #app .journey-step{font-size:var(--ui-small);gap:6px}
  #app .journey-step b{width:26px;height:26px;font-size:var(--ui-small)}
  #app .question-area .prefill-summary{padding:14px;gap:10px}
  #app .question-area .verification-block{gap:8px;padding:12px 0 16px;margin-bottom:20px}
  #app .question-area .location-options{grid-template-columns:1fr;gap:10px}
  #app .question-area .location-option{min-height:72px;padding:12px 14px}
  #app .question-area .fields{grid-template-columns:1fr;gap:12px}
  #app .question-area .day-add{grid-template-columns:1fr;gap:10px}
  #app #survey .callback-preference{padding:16px}
  body :is(.completion-dialog,.feedback-popup){padding:32px 24px 24px}
}
@media(prefers-reduced-motion:reduce){#app *,body dialog *{animation:none!important;scroll-behavior:auto!important}}

/* Discoverable status changes without expanding table rows. */
.admin-layout .leads-table .inline-value.status-label{display:inline-flex;align-items:center;gap:10px;border:1px solid transparent;min-height:32px;cursor:pointer;white-space:nowrap}
.admin-layout .leads-table .inline-value.status-label::after{content:'⌄';font-size:16px;line-height:1;color:currentColor}
.admin-layout .leads-table .inline-value.status-label:hover,.admin-layout .leads-table .inline-value.status-label[aria-expanded=true]{border-color:currentColor;text-decoration:none}

/* Staff workspace: one quiet brand strip, without the marketing site shell. */
html:has(body.staff-workspace){scroll-padding-top:16px}
body.staff-workspace{background:var(--ui-canvas);min-height:100dvh}
.staff-workspace .workspace-brandbar{background:var(--ui-paper);border-bottom:1px solid var(--ui-line)}
.staff-workspace .workspace-brandbar-inner{box-sizing:border-box;max-width:1700px;min-height:76px;margin:0 auto;padding:12px 32px;display:flex;align-items:center;justify-content:flex-start;direction:rtl}
.staff-workspace .workspace-logo{display:block;width:142px;height:52px;object-fit:contain;object-position:right center}
body.staff-workspace #app{box-sizing:border-box;min-height:calc(100dvh - 77px);margin-top:0;margin-bottom:0}
body.staff-workspace #app:has(.login){padding-top:48px;padding-bottom:48px}
@media(max-width:800px){
  .staff-workspace .workspace-brandbar-inner{min-height:64px;padding:10px 16px}
  .staff-workspace .workspace-logo{width:122px;height:44px}
  body.staff-workspace #app{min-height:calc(100dvh - 65px)}
  body.staff-workspace #app:has(.login){padding-top:24px;padding-bottom:24px}
}

/* Compact priority editing and three explicit, reversible sorting modes. */
.admin-layout .lead-order-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;flex-wrap:wrap}
.admin-layout .lead-sort-buttons{display:flex;gap:6px;flex-wrap:wrap}
.admin-layout .lead-sort-buttons button{min-height:40px;padding:8px 14px;font-size:var(--ui-small);font-weight:500;border:1px solid var(--ui-line);border-radius:4px;background:var(--ui-paper);color:var(--ui-muted)}
.admin-layout .lead-sort-buttons button[aria-pressed=true]{background:var(--ui-brand-soft);border-color:#dbafb7;color:var(--ui-brand)}
.admin-layout #lead-order-help{margin:0;font-size:var(--ui-small);line-height:1.6;color:var(--ui-muted)}
.admin-layout .leads-table .priority-label{display:inline-flex;align-items:center;gap:8px;padding:4px 8px;border:1px solid transparent;min-height:32px;border-radius:4px;font-size:var(--ui-small);white-space:nowrap}
.admin-layout .leads-table .priority-label::after{content:'⌄';font-size:16px;line-height:1}
.admin-layout .leads-table .priority-0{background:#fbefed;color:#964238}
.admin-layout .leads-table .priority-1{background:#f5f2eb;color:#7a663c}
.admin-layout .leads-table .priority-2{background:#eef2f5;color:#5b6a78}
.admin-layout .leads-table .priority-label:hover,.admin-layout .leads-table .priority-label[aria-expanded=true]{border-color:currentColor;text-decoration:none}
.admin-layout .leads-table .lead-drag-handle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;min-height:40px;padding:0;margin:0;border:1px solid transparent;background:transparent;color:#82909c;font-size:20px;line-height:1;letter-spacing:-4px;cursor:grab;touch-action:none;user-select:none}
.admin-layout .leads-table .lead-drag-handle:hover{border-color:var(--ui-line);background:var(--ui-soft);color:var(--ui-ink)}
.admin-layout .leads-table .lead-drag-handle:disabled{opacity:.25;cursor:default}
.admin-layout .leads-table .contact-select{gap:8px;align-items:flex-start}
.lead-is-dragging,.lead-is-dragging *{cursor:grabbing!important;user-select:none!important}
.admin-layout .leads-table tr.lead-dragging{opacity:.45}
.admin-layout .leads-table tr.lead-drop-before{box-shadow:0 -3px 0 var(--ui-brand)}
.admin-layout .leads-table tr.lead-drop-after{box-shadow:0 3px 0 var(--ui-brand)}
.lead-order-menu{position:fixed;z-index:3000;box-sizing:border-box;padding:6px;background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:6px;box-shadow:0 8px 28px #16202b22;font-family:var(--ui-font)}
.lead-order-menu button{display:block;width:100%;min-height:42px;padding:10px 12px;border:0;border-radius:4px;background:transparent;color:var(--ui-ink);text-align:right;font:14px var(--ui-font);cursor:pointer}
.lead-order-menu button:hover,.lead-order-menu button:focus-visible{background:var(--ui-brand-soft);outline:2px solid var(--ui-brand);outline-offset:-2px}
.lead-order-menu button:disabled{opacity:.4;cursor:default}
@media(min-width:801px){.admin-layout .leads-table{min-width:1040px}.admin-layout .leads-table th,.admin-layout .leads-table td{padding-inline:12px}}
@media(max-width:800px){.admin-layout .lead-order-controls{align-items:stretch}.admin-layout .lead-sort-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px}.admin-layout .lead-sort-buttons button{padding:8px 6px}.admin-layout #lead-order-help{font-size:13px}.admin-layout .leads-table .lead-drag-handle{flex-basis:32px;width:32px;min-height:44px}}

/* Column sorting: quiet, keyboard-accessible headings with explicit direction. */
.admin-layout .leads-table .lead-column-heading{display:flex;align-items:center;gap:8px}
.admin-layout .leads-table .lead-column-heading input{flex:0 0 auto;margin:0}
.admin-layout .leads-table .lead-column-sort{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;width:100%;padding:6px 4px;margin:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--ui-muted);font:500 var(--ui-small)/1.5 var(--ui-font);text-align:right;cursor:pointer;white-space:nowrap}
.admin-layout .leads-table .lead-column-sort:hover{background:var(--ui-paper);color:var(--ui-ink);border-color:var(--ui-line)}
.admin-layout .leads-table .lead-column-sort:focus-visible{outline:2px solid var(--ui-brand);outline-offset:2px}
.admin-layout .leads-table th[aria-sort=ascending] .lead-column-sort,.admin-layout .leads-table th[aria-sort=descending] .lead-column-sort{color:var(--ui-brand);background:var(--ui-brand-soft)}

/* Keep list tools compact; reveal search and message preparation only on demand. */
.admin-layout.simple-admin .admin-heading{margin-bottom:18px}
.admin-layout .admin-heading h1{margin:0}
.admin-layout .lead-stage-tabs button{padding:12px 18px;min-height:54px}
.admin-layout .lead-stage-tabs strong{font-size:20px}
.admin-layout .admin-list-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0 0;scroll-margin-top:18px}
.admin-layout .admin-list-actions>.choice{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 14px;min-height:40px;margin:0;border:1px solid var(--ui-line);border-radius:4px;color:var(--ui-ink);background:white;font-size:14px}
.admin-layout .admin-list-actions>.choice[aria-expanded=true],.admin-layout .admin-list-actions>.choice.has-filters{border-color:#dbafb7;background:var(--ui-brand-soft);color:var(--ui-brand)}
.admin-layout .admin-list-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.admin-layout .admin-list-toolbar .lead-order-controls{margin:0;margin-inline-start:auto}
.admin-layout .admin-list-toolbar .lead-sort-buttons{gap:0;border:1px solid var(--ui-line);border-radius:4px;overflow:hidden}
.admin-layout .admin-list-toolbar .lead-sort-buttons button{border:0;border-inline-end:1px solid var(--ui-line);border-radius:0;min-height:38px;padding:8px 12px}
.admin-layout .admin-list-toolbar .lead-sort-buttons button:last-child{border-inline-end:0}
.admin-layout #lead-order-help{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.admin-layout .list-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin:10px 0 12px;font-size:12px}
.admin-layout .list-meta #result-count{font-size:12px}
.admin-layout .active-filter-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:13px;color:var(--ui-muted)}
.admin-layout .active-filter-summary button{font-size:13px;min-height:32px;padding:4px 8px;border:0;background:transparent;color:var(--ui-brand);text-decoration:underline;text-underline-offset:3px}
.admin-layout .bulk-toolbar{gap:10px 16px;padding:12px 14px;margin:0 0 12px;background:white}
.admin-layout .bulk-toolbar strong{font-size:14px}
.admin-layout .bulk-toolbar p{font-size:13px;line-height:1.5;margin:3px 0 0}
.admin-layout .bulk-actions{gap:8px}
.admin-layout .bulk-actions button{font-size:13px;min-height:40px;padding:8px 12px}
.admin-layout :is(.bulk-toolbar,.active-filter-summary)[hidden],.admin-layout #inline-edit-summary:empty{display:none!important}
.admin-layout #inline-edit-summary:not(:empty){padding:10px 12px;margin:10px 0;background:var(--ui-warning-soft);color:var(--ui-warning);border-radius:4px}
body .search-dialog{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--ui-line);border-radius:4px;overflow:auto}
.search-dialog .detail-header{align-items:center;padding:0 0 16px;margin:0 0 18px}
body .search-dialog .close{min-height:44px;min-width:44px;border:1px solid var(--ui-line)}
body .search-dialog .search-scope{font-size:14px;margin:0 0 16px}
.search-dialog .filter-panel{border:0;background:transparent;padding:0;margin:0}
.search-dialog .toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px 14px;margin:0}
.search-dialog .toolbar .search-field{grid-column:1/-1}
.search-dialog .toolbar .field{margin:0;min-width:0}
.search-dialog .toolbar label>span{font-size:14px;font-weight:500;color:var(--ui-ink);margin-bottom:6px}
.search-dialog .toolbar input,.search-dialog .callback-toggle{width:100%;min-height:44px;padding:10px 12px;background:white;border:1px solid var(--ui-line);border-radius:4px;font-size:16px;color:var(--ui-ink)}
.search-dialog .callback-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:right}
.search-dialog .callback-toggle>span{font-size:20px;line-height:1}
.search-dialog .select-control{position:relative;overflow:visible}
.search-dialog .callback-options{position:relative;inset:auto;max-height:210px;overflow:auto;padding:4px;margin:4px 0 0;border:1px solid var(--ui-line);border-radius:4px;background:white}
.search-dialog .callback-options[hidden]{display:none}
.search-dialog .callback-options button{display:block;width:100%;padding:10px 12px;min-height:40px;text-align:right;background:white;border:0;border-radius:4px;font-size:14px;color:var(--ui-ink)}
.search-dialog .callback-options button:hover,.search-dialog .callback-options button:focus-visible,.search-dialog .callback-options button[aria-selected=true]{background:var(--ui-brand-soft);color:var(--ui-brand)}
.search-dialog .search-actions{display:flex;gap:10px;flex-wrap:wrap;padding-top:20px;margin-top:20px;border-top:1px solid var(--ui-line)}
.search-dialog .search-actions button{min-height:44px;padding:10px 18px;border-radius:4px;font-size:14px}
.search-dialog .search-actions .primary{background:var(--ui-brand);color:white;box-shadow:none}
@media(max-width:800px){
 .admin-layout .lead-stage-tabs button{flex-direction:row;align-items:center;gap:8px;padding:10px;font-size:13px}
 .admin-layout .lead-stage-tabs strong{font-size:18px}
 .admin-layout .admin-list-toolbar .lead-order-controls{width:100%;margin-inline-start:0}
 .admin-layout .admin-list-toolbar .lead-sort-buttons{gap:0}
}
@media(max-width:480px){
 body .search-dialog{padding:18px}
 .search-dialog .toolbar{grid-template-columns:minmax(0,1fr)}
 .search-dialog .search-actions{flex-direction:column}
}
.admin-layout .column-sort-arrow{font-size:16px;line-height:1;min-width:12px;text-align:center}
.admin-layout th[aria-sort=none] .column-sort-arrow{color:#8b96a1}
@media(min-width:801px){.admin-layout .leads-table th{padding-block:8px}}

/* One task at a time, with stable headings and matching action widths. */
#invitation-dialog .invite-tabs{display:grid;grid-template-columns:1fr 1fr;flex:none;gap:0;padding:0 24px;border-bottom:1px solid var(--ui-line);background:white}
#invitation-dialog .invite-tabs button{min-height:48px;margin:0;padding:12px 16px;border:0;border-bottom:2px solid transparent;border-radius:0;background:white;color:var(--ui-muted);font-size:14px;font-weight:500}
#invitation-dialog .invite-tabs button[aria-selected=true]{color:var(--ui-brand);border-bottom-color:var(--ui-brand);background:var(--ui-brand-soft)}
#invitation-dialog .invite-tabs button:focus-visible{outline:2px solid var(--ui-brand);outline-offset:-4px}
#invitation-dialog [role=tabpanel][hidden]{display:none!important}
#invitation-dialog .invite-body{padding-top:24px}
#invitation-dialog .invite-tracking,#invitation-dialog .rs-wa-connection{padding:16px;margin-top:20px}
#invitation-dialog .rs-wa-connection{margin-bottom:0}
#invitation-dialog .invite-feedback-fields{display:grid;gap:18px;margin:20px 0}
#invitation-dialog #invite-feedback .invite-feedback-fields .field{margin:0}
#invitation-dialog #invite-feedback textarea{min-height:112px}
#invitation-dialog #invite-feedback-save{width:100%;margin-top:12px}
@media(max-width:600px){
 #invitation-dialog .invite-tabs{padding:0 16px}
 #invitation-dialog .invite-tabs button{padding:12px 8px}
 #invitation-dialog .invite-body{padding-top:18px}
 #invitation-dialog .invite-tracking{align-items:stretch}
 #invitation-dialog .invite-tracking button{width:100%}
}

/* A single workspace heading: logo right, actions left. */
body.staff-workspace:has(.admin-layout) #school-frame{display:none}
body.staff-workspace:has(.admin-layout) #app{min-height:100dvh;padding-top:20px}
.admin-layout .admin-brand{display:flex;align-items:center;flex:none;min-height:52px}
.admin-layout .admin-brand .workspace-logo{width:142px;height:52px;object-fit:contain;object-position:right center}
.admin-layout.simple-admin .admin-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px}
.admin-layout .admin-heading>h1{text-align:center;white-space:nowrap}
.admin-layout .admin-heading>.admin-utilities{justify-self:end;flex-wrap:nowrap}
@media(max-width:1100px){.admin-layout.simple-admin .admin-heading{grid-template-columns:1fr 1fr;gap:14px}.admin-layout .admin-heading>h1{text-align:left}.admin-layout .admin-heading>.admin-utilities{grid-column:1/-1;width:100%;justify-content:flex-end;flex-wrap:wrap}}
@media(max-width:800px){body.staff-workspace:has(.admin-layout) #app{padding-top:16px}.admin-layout .admin-brand{min-height:44px}.admin-layout .admin-brand .workspace-logo{width:122px;height:44px}}

/* Calm staff palette; treatment status does not tint lead records. */
body.staff-workspace{--ui-brand:#414b55;--ui-brand-hover:#2d353d;--ui-brand-soft:#eef0f2}
.staff-workspace .admin-layout .lead-stage-tabs button[aria-selected=true]{background:#f0f2f3;color:#303942;border-bottom-color:#515c66}
.staff-workspace .admin-layout .lead-stage-tabs button[aria-selected=true] strong{color:#303942}
.staff-workspace .admin-layout .leads-table tbody tr{background:white}
.staff-workspace .admin-layout .leads-table tbody tr:hover{background:#fafbfb}
.staff-workspace .admin-layout .leads-table .inline-value.status-label{background:transparent;color:#4c5761}
.staff-workspace .admin-layout .leads-table .inline-value.status-label:hover,.staff-workspace .admin-layout .leads-table .inline-value.status-label[aria-expanded=true]{background:#f0f2f3;border-color:#c5ccd2}
.staff-workspace .admin-layout .lead-sort-buttons button[aria-pressed=true],.staff-workspace .admin-layout .admin-list-actions>.choice[aria-expanded=true],.staff-workspace .admin-layout .admin-list-actions>.choice.has-filters{border-color:#bfc7ce}
.staff-workspace .inline-status-editor>button:hover,.staff-workspace .inline-status-editor>button:focus-visible{background:var(--ui-brand-soft);outline-color:var(--ui-brand)}
.staff-workspace .inline-editor :is(input,textarea):focus{outline-color:var(--ui-brand);border-color:var(--ui-brand)}
.staff-workspace :is(input[type=checkbox],input[type=radio]){accent-color:var(--ui-brand)}
.staff-workspace :is(.callback-toggle>span,.select-control::after){color:var(--ui-muted)}

/* Keep the new-lead action in its original brand red. */
body.staff-workspace #app #add{background:#c8223d!important;border-color:#c8223d;color:white!important}
body.staff-workspace #app #add:hover{background:#ad1831!important;border-color:#ad1831}

/* WhatsApp queue action: green with readable white text. */
body.staff-workspace #app #prepare-invitations{background:#128047!important;border-color:#128047;color:white!important}
body.staff-workspace #app #prepare-invitations:hover:not(:disabled){background:#0d6939!important;border-color:#0d6939}
.staff-workspace .admin-layout .leads-table .lead-created-at{font-size:12px;font-weight:400;color:var(--ui-muted);line-height:1.6}

/* Compact lead timeline, shared by desktop and mobile rows. */
.staff-workspace .lead-timeline{display:grid;gap:12px;text-align:right;padding-inline-start:13px;border-inline-start:1px solid #dde2e6}
.staff-workspace .lead-timeline-event{position:relative;display:grid;gap:3px;font-size:13px;font-weight:400;line-height:1.5}
.staff-workspace .lead-timeline-event::before{content:"";position:absolute;inset-inline-start:-17px;top:6px;width:7px;height:7px;border-radius:50%;background:#a3adb6;box-shadow:0 0 0 3px white}
.staff-workspace .lead-timeline .timeline-label{font-size:12px;color:var(--ui-muted);font-weight:400}
.staff-workspace .admin-layout .leads-table .lead-timeline small{margin:0}

/* Quiet brand heading and a centred, user-arrangeable lead table. */
.admin-layout.simple-admin .admin-heading{display:flex;justify-content:space-between;flex-wrap:wrap}
.admin-layout .admin-brand{gap:20px}
.admin-layout .admin-brand h1{font-size:16px;font-weight:400;color:var(--ui-muted);margin:0;padding-inline-start:20px;border-inline-start:1px solid var(--ui-line)}
.admin-layout .leads-table :is(th,td){text-align:center;vertical-align:middle}
.admin-layout .leads-table th{position:relative;padding-inline:28px}
.admin-layout .leads-table .lead-column-heading,.admin-layout .leads-table .lead-column-sort,.admin-layout .leads-table .contact-select{justify-content:center;text-align:center}
.admin-layout .leads-table .lead-column-sort{width:auto;flex:0 1 auto}
.admin-layout .leads-table .inline-edit-trigger{text-align:center}
.admin-layout .leads-table .lead-timeline{text-align:center;display:inline-grid;padding-inline:0;border:0}
.admin-layout .leads-table .lead-timeline-event::before{display:none}
.admin-layout .leads-table .table-actions button{margin-inline:auto}
.admin-layout .leads-table .column-move-handle{position:absolute;inset-inline-end:3px;top:50%;transform:translateY(-50%);width:24px;min-height:32px;padding:0;border:0;background:transparent;color:#a2aab2;cursor:grab;font-size:15px}
.admin-layout .leads-table .column-move-handle:hover,.admin-layout .leads-table .column-move-handle:focus-visible{color:var(--ui-ink);background:#e8ecef}
.admin-layout .leads-table .column-drop{box-shadow:inset 3px 0 #637380;background:#edf1f4}
.admin-layout .leads-table .column-moving{opacity:.5}
.column-layout-dialog{width:min(440px,calc(100vw - 32px));padding:24px;border:1px solid var(--ui-line);border-radius:10px;color:var(--ui-ink);max-height:85vh;overflow:auto}
.column-layout-dialog::backdrop{background:rgb(20 28 36 / .35)}
.column-layout-heading,.column-layout-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}
.column-layout-heading h2{font-size:19px;margin:0;font-weight:600}
.column-layout-dialog p{font-size:13px;color:var(--ui-muted)}
.column-layout-dialog ol{list-style:none;padding:0;margin:20px 0;display:grid;gap:8px}
.column-layout-dialog li{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--ui-line);border-radius:5px;font-size:14px}
.column-layout-dialog li span{flex:1}
.column-layout-dialog button{min-height:36px;padding:6px 12px;border:1px solid var(--ui-line);background:white;border-radius:4px;color:var(--ui-ink);cursor:pointer;font:inherit}
.column-layout-dialog button:disabled{opacity:.3;cursor:default}
@media(max-width:800px){.admin-layout .admin-brand{gap:12px}.admin-layout .admin-brand h1{font-size:14px;padding-inline-start:12px}.admin-layout .leads-table .column-move-handle{display:none}}
@media(max-width:800px){.admin-layout .leads-table td:first-child{grid-column:auto}.admin-layout .leads-table td:first-child::before{display:block}.admin-layout .leads-table td[data-column-key=name],.admin-layout .leads-table td.table-actions{grid-column:1/-1}.admin-layout .leads-table td[data-column-key=name]::before{display:none}}

/* Keep scrollbars on the physical right while retaining Hebrew content. */
html[dir="rtl"]{direction:ltr}
body{direction:rtl}
body dialog,body .inline-editor,body .callback-options,body .neighborhood-list,body .invite-body,body .queue-recipients,body .queue-review ul,body .queue-exclusions ul,body .leads-table-wrap,body .crm-tabs{direction:ltr;scrollbar-width:thin;scrollbar-color:#b8bec5 #f4f5f6;scrollbar-gutter:stable}
body dialog>*:not([dir="ltr"]),body .inline-editor>*:not([dir="ltr"]),body .callback-options>*,body .neighborhood-list>*,body .invite-body>*,body .queue-recipients>*,body .queue-review ul>*,body .queue-exclusions ul>*,body .leads-table-wrap>*,body .crm-tabs>*{direction:rtl}
html,*{scrollbar-width:thin;scrollbar-color:#b8bec5 #f4f5f6}
*::-webkit-scrollbar{width:7px;height:7px}
*::-webkit-scrollbar-track{background:#f4f5f6}
*::-webkit-scrollbar-thumb{background:#b8bec5;border:2px solid #f4f5f6;border-radius:8px}
*::-webkit-scrollbar-thumb:hover{background:#9ca4ae}
body .action-feedback .feedback-icon{background:#eff5f1;color:#426750}
body .action-feedback{direction:rtl;text-align:right}
body .action-feedback>*{direction:rtl}

/* Center all notification dialogs and use soft, readable colors. */
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog){text-align:center;direction:rtl;background:#fcfefd;color:#49635c;border:1px solid #dbe8e2;border-radius:14px;box-shadow:0 14px 42px #63857826;padding:34px 30px 28px}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog)::backdrop{background:#697e8c55;backdrop-filter:blur(3px)}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) :is(h2,p){text-align:center}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) h2{color:#49635c}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) p{color:#72817c}
body :is(.feedback-popup,.completion-dialog) :is(.feedback-icon,.completion-check){margin:0 auto 20px;display:flex;align-items:center;justify-content:center;background:#e7f1eb;color:#668b79;border-radius:12px}
body .feedback-popup:not(.action-feedback) .feedback-icon{background:#fbefe5;color:#aa805e}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) :is(.feedback-confirm,.completion-confirm,.invite-primary){display:block;margin-inline:auto;background:#deece5!important;color:#466b5b!important;border:1px solid #cbded3!important;border-radius:9px;box-shadow:none!important}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) :is(.feedback-confirm,.completion-confirm,.invite-primary):hover{background:#d1e4d9!important;color:#3d604f!important}
body :is(.feedback-popup,.completion-dialog,#unsaved-dialog) button:focus-visible{outline:2px solid #91b9a5;outline-offset:3px}
body :is(.feedback-popup,.completion-dialog) :is(.feedback-close,.completion-close){background:#f0f4f2;color:#81948a;border-radius:8px}
body #unsaved-dialog .invite-actions{justify-content:center}
body #unsaved-dialog #discard-edit{background:#f7eee8;color:#93735e;border:1px solid #e7d8cc;border-radius:9px}
body .completion-site{display:block;text-align:center;color:#789388}

/* Shared Rockstar action color across popup dialogs. */
body dialog:is(dialog,#action-feedback,#unsaved-dialog,#detail) button:not(.close):not(.feedback-close):not(.completion-close):not([role="tab"]):not([role="combobox"]):not(.select-control):not(.neighborhood-toggle):not([role="option"]){background:#c8223d!important;border-color:#c8223d!important;color:#fff!important}
body dialog:is(dialog,#action-feedback,#unsaved-dialog,#detail) button:not(.close):not(.feedback-close):not(.completion-close):not([role="tab"]):not([role="combobox"]):not(.select-control):not(.neighborhood-toggle):not([role="option"]):hover:not(:disabled){background:#ad1831!important;border-color:#ad1831!important;color:#fff!important}
body dialog:is(dialog,#action-feedback,#unsaved-dialog,#detail) button:focus-visible{outline-color:#c8223d!important}

/* Compact filtering next to the existing ordering controls. */
.staff-workspace .lead-sort-and-filters{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.staff-workspace .lead-dropdown-filters{display:flex;gap:0;align-items:center;flex-wrap:wrap}
.staff-workspace .lead-dropdown-filters .field{margin:0;gap:0;display:block}
.staff-workspace .lead-dropdown-filters .field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.staff-workspace .lead-dropdown-filters .select-control{margin:0}
.staff-workspace .lead-dropdown-filters select{height:41px;min-height:41px;width:auto;max-width:210px;padding:8px 12px 8px 28px;border:1px solid #d7dfe7;border-radius:0;background:#fff;color:#64778d;font:400 13px Arial,sans-serif;cursor:pointer;box-shadow:none}
.staff-workspace .lead-dropdown-filters .field:first-child select{border-radius:0 4px 4px 0}
.staff-workspace .lead-dropdown-filters .field:last-child select{border-radius:4px 0 0 4px}
.staff-workspace .lead-dropdown-filters .field+.field select{border-inline-start:0}
.staff-workspace .lead-dropdown-filters select:hover{background:#f5f7f9}
@media(max-width:800px){.staff-workspace .lead-sort-and-filters{justify-content:flex-start;width:100%}.staff-workspace .lead-dropdown-filters{max-width:100%;gap:4px}.staff-workspace .lead-dropdown-filters select{max-width:180px;border:1px solid #d7dfe7!important;border-radius:4px!important}}

/* Refined staff controls: distinct actions, filters and ordering. */
body.staff-workspace{background:#f5f6f8}
body.staff-workspace .admin-layout .lead-stage-tabs{background:#fff;border:1px solid #e5e8ed;border-radius:14px;padding:6px;gap:6px;box-shadow:0 2px 5px #24304403;margin-bottom:18px;overflow:hidden}
body.staff-workspace .admin-layout .lead-stage-tabs button{border:0!important;border-radius:9px;padding:14px 18px;background:transparent;color:#687383;box-shadow:none;justify-content:flex-start;gap:12px;min-height:54px}
body.staff-workspace .admin-layout .lead-stage-tabs button strong{font-size:13px;font-weight:600;background:#f0f2f5;color:#6d7786;border-radius:7px;min-width:32px;padding:3px 8px;margin-inline-start:auto}
body.staff-workspace .admin-layout .lead-stage-tabs button[aria-selected=true]{background:#fcf0f2;color:#b9223b;box-shadow:none}
body.staff-workspace .admin-layout .lead-stage-tabs button[aria-selected=true] strong{background:#c8223d;color:#fff}
body.staff-workspace .admin-layout .admin-list-toolbar{display:flex;align-items:center;gap:22px;padding:16px 18px;background:#fff;border:1px solid #e5e8ed;border-radius:14px;box-shadow:0 3px 12px #24304404;margin:0 0 12px;flex-wrap:wrap}
body.staff-workspace .admin-list-actions{gap:6px;align-items:center;flex-shrink:0}
body.staff-workspace .admin-layout .admin-list-actions button{height:38px;min-height:38px;padding:8px 12px;border:0;background:transparent;color:#687383;border-radius:8px;font-size:13px;font-weight:500;box-shadow:none}
body.staff-workspace .admin-layout .admin-list-actions button:hover{background:#f4f5f7;color:#253348}
body.staff-workspace .admin-layout .admin-list-actions #open-search{background:#f4f5f7;border:1px solid #e9ecf0;color:#39485c;min-width:80px}
body.staff-workspace .lead-sort-and-filters{display:flex;flex:1;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;border-inline-start:1px solid #e9ecf0;padding-inline-start:22px}
body.staff-workspace .lead-dropdown-filters{order:-1;gap:8px;flex-wrap:wrap}
body.staff-workspace .lead-dropdown-filters .select-control:after{display:none}
body.staff-workspace .lead-dropdown-filters .field select{appearance:none!important;-webkit-appearance:none!important;height:38px;min-height:38px;max-width:190px;border:1px solid #e5e8ed!important;border-radius:8px!important;background-color:#fff;color:#536174;font-family:inherit;font-size:13px;font-weight:500;line-height:20px;padding:8px 12px 8px 32px;box-shadow:0 1px 2px #24304403;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center;transition:border-color .15s,background-color .15s}
body.staff-workspace .lead-dropdown-filters .field select:hover{border-color:#bbc5d1!important;background-color:#fafbfc}
body.staff-workspace .lead-dropdown-filters .field select:focus-visible{outline:2px solid #eab7c0;outline-offset:2px;border-color:#c8223d!important}
body.staff-workspace .lead-dropdown-filters .field select:has(option:checked:not([value=""])){background-color:#fff5f6;border-color:#e8b8c1!important;color:#b8223b}
body.staff-workspace .lead-sort-and-filters [role=group]{display:flex;gap:2px;padding:3px;border:0;border-radius:9px;background:#f1f3f6}
body.staff-workspace .lead-sort-and-filters [role=group] button{height:32px;min-height:32px;border:0!important;border-radius:6px!important;background:transparent;color:#7c8695;font-size:12px;font-family:inherit;padding:6px 11px;box-shadow:none}
body.staff-workspace .lead-sort-and-filters [role=group] button[aria-pressed=true]{background:#fff;color:#334155;box-shadow:0 1px 4px #25334816}
body.staff-workspace .admin-layout .list-meta{padding:0 4px;margin:12px 0;color:#8c95a3;font-size:12px}
body.staff-workspace .admin-layout .active-filter-summary{background:#fff5f6;border:1px solid #f0dce1;border-radius:9px;padding:10px 14px;color:#9e3449}
body.staff-workspace .admin-layout .leads-table-wrap{border:1px solid #e5e8ed;border-radius:14px;background:white;box-shadow:0 3px 12px #24304403;overflow:auto}
body.staff-workspace .admin-layout .leads-table th{background:#fafbfc;border-bottom:1px solid #e9edf2;color:#7d8795;font-size:12px;height:54px}
body.staff-workspace .admin-layout .leads-table tbody tr:hover{background:#fcfcfd}
@media(max-width:1250px){body.staff-workspace .lead-sort-and-filters{gap:12px;padding-inline-start:14px}body.staff-workspace .admin-layout .admin-list-toolbar{gap:14px}}
@media(max-width:900px){body.staff-workspace .lead-sort-and-filters{flex-basis:100%;border-inline-start:0;border-top:1px solid #edf0f3;padding:12px 0 0;gap:12px}body.staff-workspace .admin-layout .admin-list-toolbar{padding:12px}body.staff-workspace .lead-dropdown-filters .field select{max-width:170px}body.staff-workspace .admin-layout .lead-stage-tabs button{padding:10px;gap:6px}}

/* Balanced, clickable client rows and contact actions. */
body.staff-workspace .admin-layout .leads-table :is(td,th){text-align:center;vertical-align:middle}
body.staff-workspace .admin-layout .leads-table .inline-cell-edit{display:inline-flex;justify-content:center;align-items:center;max-width:100%}
body.staff-workspace .admin-layout .leads-table .inline-value{justify-content:center;text-align:center;margin-inline:auto}
body.staff-workspace .admin-layout .leads-table .contact-select{justify-content:center;align-items:center;text-align:center}
body.staff-workspace .admin-layout .leads-table .contact-select>div{text-align:center}
body.staff-workspace .admin-layout .leads-table .open-lead.lead-name{display:inline-block;background:none;border:0;padding:4px 6px;min-height:30px;margin:0 auto;color:#26364b;font:600 14px inherit;cursor:pointer;box-shadow:none;text-align:center}
body.staff-workspace .admin-layout .leads-table .open-lead.lead-name:hover{color:#c8223d;text-decoration:underline;text-underline-offset:4px}
body.staff-workspace .admin-layout .leads-table tr[data-lead-row]{cursor:pointer}
body.staff-workspace .admin-layout .leads-table tr[data-lead-row]:focus-visible{outline:2px solid #c8223d;outline-offset:-2px}
body.staff-workspace .admin-layout .leads-table .row-contact-actions{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:148px;margin-inline:auto}
body.staff-workspace .admin-layout .leads-table .row-contact-actions select{width:148px;height:30px;min-height:30px;padding:4px 10px;border:1px solid #e7ebef;border-radius:6px;background:#f8f9fb;color:#657286;font-family:inherit;font-size:12px;text-align:center;cursor:pointer}
body.staff-workspace .admin-layout .leads-table .row-contact-actions button{width:148px;min-height:36px;margin:0;padding:7px 10px;border:1px solid #dce3eb;border-radius:7px;background:#fff;color:#384b62;font-family:inherit;font-size:12px;text-align:center}
body.staff-workspace .admin-layout .leads-table .row-contact-actions button:hover{border-color:#c8223d;color:#b6223c;background:#fff6f7}

/* Secondary lines must share the same center as their column heading. */
body.staff-workspace #app .leads-table :is(td,th,td small,td .inline-cell-edit,td .inline-value,td .contact-select>div,td .lead-timeline,td .lead-timeline-event){text-align:center!important}
body.staff-workspace #app .leads-table td small{width:100%;margin-inline:auto}
body.staff-workspace #app .leads-table .contact-select{position:relative;display:block;padding-inline:34px;min-height:48px}
body.staff-workspace #app .leads-table .contact-select>input[type=checkbox]{position:absolute;inset-inline-start:22px;top:50%;transform:translateY(-50%);margin:0}
body.staff-workspace #app .leads-table .contact-select>button{position:absolute;inset-inline-start:0;top:50%;transform:translateY(-50%);margin:0}
body.staff-workspace #app .leads-table .contact-select>div{width:100%;margin-inline:auto}

/* Unified lead workspace — 2026-10-08. Scoped to the lead card. */
body dialog#detail#detail.crm-unified{width:min(1240px,96vw);max-width:96vw;max-height:94dvh;height:94dvh;padding:0!important;border:1px solid #e1e6ed;border-radius:18px;overflow:hidden!important;background:#f6f8fa;color:#20364a;direction:rtl;box-shadow:0 24px 80px #13253630}
body dialog#detail#detail.crm-unified[open]{display:flex;flex-direction:column}
#detail.crm-unified .unified-header{display:flex;align-items:center;gap:20px;flex:none;margin:0;padding:18px 26px;border-bottom:1px solid #e5e9ee;background:white}
#detail.crm-unified .unified-identity{flex:1;min-width:0}
#detail.crm-unified .eyebrow{font-size:11px;letter-spacing:.03em;color:#788695}
#detail.crm-unified .identity-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:3px 0 5px}
#detail.crm-unified #crm-name{margin:0;font-size:25px;line-height:1.3;font-weight:700}
#detail.crm-unified .unified-status{font-size:12px;background:#f8edf0;color:#ae2440;padding:4px 10px;border-radius:20px}
#detail.crm-unified .crm-contact-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0;font-size:13px;color:#65778a}
#detail.crm-unified .crm-contact-line span+span{border-inline-start:1px solid #dde3ea;padding-inline-start:12px}
#detail.crm-unified .unified-quick{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
body dialog#detail#detail.crm-unified button:not(.primary),body dialog#detail#detail.crm-unified .wa{background:white!important;color:#355069!important;border:1px solid #dce3eb!important;border-radius:8px!important;box-shadow:none!important;min-height:36px;padding:7px 12px;font-size:13px;line-height:1.4;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
body dialog#detail#detail.crm-unified button:not(.primary):hover,body dialog#detail#detail.crm-unified .wa:hover{background:#f0f4f7!important;border-color:#bac9d7!important}
body dialog#detail#detail.crm-unified .close{width:34px;min-width:34px;height:34px;padding:0!important;font-size:24px!important;border:0!important;background:#f3f5f7!important;align-self:flex-start}
#detail.crm-unified #crm-update{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;margin:0}
#detail.crm-unified .unified-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;direction:ltr;padding:20px 24px;scrollbar-width:thin;scrollbar-color:#b9c0c8 transparent;scroll-padding:20px}
#detail.crm-unified .unified-body>*{direction:rtl}
#detail.crm-unified .crm-section{padding:18px 20px;margin:0;border:1px solid #e2e7ed;border-radius:12px;background:white;min-width:0;box-shadow:0 2px 5px #20364a03}
#detail.crm-unified .crm-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#detail.crm-unified .crm-section-heading h3{font-size:16px;font-weight:700;color:#253e53;margin:0}
#detail.crm-unified .crm-section-heading>span{font-size:11px;color:#7b8897;text-align:left}
#detail.crm-unified .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#detail.crm-unified .management-fields{grid-template-columns:repeat(4,minmax(0,1fr))}
#detail.crm-unified .field{min-width:0;display:flex;flex-direction:column;gap:6px;margin:0}
#detail.crm-unified .field>span{font-size:12px!important;color:#697c8d;font-weight:500;line-height:1.5}
#detail.crm-unified :is(input:not([type=checkbox]),select,textarea){width:100%;min-width:0;box-sizing:border-box;border:1px solid #dce3eb;background:#fcfdfe;border-radius:7px;padding:8px 11px;min-height:39px;font-size:14px!important;color:#20364a;line-height:1.5}
#detail.crm-unified textarea{resize:vertical}
#detail.crm-unified .note-field textarea{min-height:88px;height:88px}
body dialog#detail#detail.crm-unified .callback-toggle{width:100%;height:39px;min-height:39px;justify-content:space-between!important;text-align:right!important;background:#fcfdfe!important;font-size:14px!important}
body dialog#detail#detail.crm-unified [role=option]{justify-content:flex-start!important;border:0!important}
#detail.crm-unified :is(button,a,input,textarea,summary):focus-visible{outline:2px solid #ac3750;outline-offset:3px}
#detail.crm-unified .next-action{margin-top:12px}
#detail.crm-unified .crm-decline-field{grid-column:1/-1}
#detail.crm-unified [hidden]{display:none!important}
#detail.crm-unified .unified-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:18px;margin-top:18px;align-items:start}
#detail.crm-unified .unified-sidebar{display:grid;gap:16px;min-width:0}
#detail.crm-unified .unified-composer>.field:first-child{max-width:210px;margin-bottom:12px}
#detail.crm-unified .crm-help{font-size:11px;line-height:1.6;color:#798794;margin:10px 0 0}
#detail.crm-unified .unified-timeline{margin-top:20px;border-top:1px solid #e9edf1;padding-top:18px}
#detail.crm-unified .unified-timeline h3{font-size:14px}
#detail.crm-unified .unified-event{position:relative;padding:0 20px 20px 0;border-inline-start:1px solid #e1e7ed;margin-inline-start:5px}
#detail.crm-unified .unified-event:last-child{padding-bottom:4px;border-color:transparent}
#detail.crm-unified .event-dot{position:absolute;right:-4px;top:5px;width:7px;height:7px;background:#c3cdd6;border-radius:50%;box-shadow:0 0 0 4px white}
#detail.crm-unified .is-note .event-dot{background:#b6435b}
#detail.crm-unified .event-body header{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
#detail.crm-unified .event-body strong{font-size:13px;font-weight:600}
#detail.crm-unified .event-body time{font-size:11px;color:#788998;white-space:nowrap}
#detail.crm-unified .event-author{font-size:10px;color:#8a96a2}
#detail.crm-unified .event-body p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.75;color:#43586b;margin:7px 0 0}
#detail.crm-unified .event-changes{font-size:12px;margin-top:6px}
#detail.crm-unified .event-changes summary{color:#6f8192;cursor:pointer}
#detail.crm-unified .event-changes dl{background:#f6f8fa;padding:10px;border-radius:6px}
#detail.crm-unified .event-changes dd{margin:4px 0 12px;overflow-wrap:anywhere}
#detail.crm-unified .crm-task{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border:0;border-bottom:1px solid #edf0f3;background:transparent;border-radius:0}
#detail.crm-unified .crm-task>div{min-width:0}
#detail.crm-unified .crm-task strong{font-size:13px;display:block;overflow-wrap:anywhere}
#detail.crm-unified .crm-task small{display:block;font-size:11px;line-height:1.6;color:#7a8895;margin-top:3px}
#detail.crm-unified .crm-task button{white-space:nowrap;font-size:11px!important;padding:5px 8px!important;min-height:32px!important}
#detail.crm-unified .crm-task.overdue{border-inline-start:2px solid #c95d70;padding-inline-start:10px}
#detail.crm-unified .crm-task.overdue small{color:#a14558}
#detail.crm-unified .crm-task.completed strong{text-decoration:line-through;color:#80909c}
#detail.crm-unified .crm-empty{padding:10px 0;margin:0;color:#7b8a98;font-size:13px;line-height:1.7}
#detail.crm-unified .unified-accordion{border-top:1px solid #e9edf1;margin-top:10px;padding-top:0}
#detail.crm-unified summary{cursor:pointer;line-height:1.6}
#detail.crm-unified .unified-accordion>summary,#detail.crm-unified .older-events>summary{padding:12px 0;font-size:13px;font-weight:500;color:#36536a}
#detail.crm-unified .unified-accordion[open]>summary{margin-bottom:6px}
#detail.crm-unified .unified-accordion .fields{grid-template-columns:1fr}
#detail.crm-unified .client-summary{margin:0 0 10px;font-size:13px}
#detail.crm-unified .client-summary>div{display:grid;grid-template-columns:100px 1fr;gap:10px;padding:6px 0}
#detail.crm-unified .client-summary dt{color:#7c8996;font-size:12px}
#detail.crm-unified .client-summary dd{margin:0;overflow-wrap:anywhere}
#detail.crm-unified .detail-grid{grid-template-columns:1fr;gap:10px;padding:0}
#detail.crm-unified .detail-field{padding:7px 0;border-bottom:1px solid #edf0f3;font-size:13px;min-width:0;overflow-wrap:anywhere}
#detail.crm-unified .trial-details{margin-top:0;padding:5px 20px}
#detail.crm-unified .trial-details[open]{padding-bottom:18px}
#detail.crm-unified .crm-save{position:static;display:flex;flex:none;align-items:center;justify-content:space-between;margin:0;padding:12px 26px;background:white;border-top:1px solid #e1e7ed;z-index:2;font-size:12px;color:#7b8995}
body dialog#detail#detail.crm-unified button.primary{background:#c8223d!important;color:white!important;border:1px solid #c8223d!important;border-radius:8px!important;padding:10px 24px;min-height:42px;font-size:14px!important;box-shadow:none!important}
@media(max-width:900px){#detail.crm-unified .unified-header{gap:12px;padding:14px 18px}#detail.crm-unified .unified-quick{max-width:230px}#detail.crm-unified .unified-columns{grid-template-columns:minmax(0,1.2fr) minmax(260px,1fr);gap:12px}#detail.crm-unified .unified-body{padding:14px}#detail.crm-unified .crm-section{padding:15px}#detail.crm-unified .management-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){body dialog#detail#detail.crm-unified{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0}#detail.crm-unified .unified-header{flex-wrap:wrap;gap:10px;padding:12px 16px}#detail.crm-unified .unified-identity{flex-basis:calc(100% - 55px)}#detail.crm-unified .close{order:1}#detail.crm-unified .unified-quick{order:2;max-width:none;width:100%;gap:6px}#detail.crm-unified #crm-name{font-size:21px}#detail.crm-unified .crm-contact-line{font-size:12px;gap:8px}#detail.crm-unified .unified-columns{grid-template-columns:1fr;gap:14px}#detail.crm-unified .unified-body{padding:12px}#detail.crm-unified .crm-section{padding:14px}#detail.crm-unified .management-fields{gap:10px}#detail.crm-unified .crm-save{padding:10px 14px;gap:8px}#detail.crm-unified .crm-save>span{font-size:10px;max-width:45%}body dialog#detail#detail.crm-unified button.primary{padding:10px 15px}#detail.crm-unified .unified-status{font-size:11px}#detail.crm-unified .crm-section-heading>span{font-size:10px}#detail.crm-unified .event-body time{font-size:10px}}

#detail.crm-unified .next-action{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
#detail.crm-unified .field input:not([type=checkbox]){height:39px!important;min-height:39px!important;padding:8px 11px!important}
body dialog#detail#detail.crm-unified .callback-toggle{height:39px!important;min-height:39px!important;padding:8px 11px!important}
#detail.crm-unified .unified-accordion>summary::before{content:none}
#detail.crm-unified .new-task>summary::after{content:none}
#detail.crm-unified .unified-header{padding:18px 26px!important}
#detail.crm-unified .crm-section h3{font-size:16px!important;margin:0!important}
@media(max-width:640px){#detail.crm-unified .unified-header{padding:12px 16px!important}}

#detail.crm-unified .unified-header{height:auto!important;min-height:0!important;box-sizing:border-box;flex-shrink:0!important}
#detail.crm-unified .crm-save{flex-direction:row!important;height:auto!important;min-height:0!important}
#detail.crm-unified .crm-save .primary{width:auto!important}

@media(max-width:640px){#detail.crm-unified .management-fields>.field:has(input[name=followup]),#detail.crm-unified .management-fields>.field:has(input[name=crm_owner]){grid-column:1/-1}}

/* Refined staff dropdowns: continuous rows, drawn chevrons, clear selection. */
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-toggle{border-radius:10px!important;background:#fff!important;border-color:#dfe4e9!important;box-shadow:0 1px 2px #20304005!important;transition:border-color .16s,box-shadow .16s,background .16s;gap:12px!important}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-toggle:hover{background:#fafbfc!important;border-color:#b9c4ce!important}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-toggle[aria-expanded=true]{border-color:#aebbc8!important;background:white!important;box-shadow:0 0 0 3px #647c9410!important}
body.staff-workspace .custom-dropdown .dropdown-chevron{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 16px;width:16px;height:16px;color:#82909d!important;transition:transform .16s}
body.staff-workspace .custom-dropdown .dropdown-chevron svg{display:block;width:16px;height:16px}
body.staff-workspace .custom-dropdown .callback-toggle[aria-expanded=true] .dropdown-chevron{transform:rotate(180deg)}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options{padding:5px!important;margin-top:6px;border:1px solid #e3e7ec!important;border-radius:12px!important;background:#fff!important;box-shadow:0 14px 34px #1d30451c,0 3px 8px #1d304509!important;overflow-x:hidden;max-height:260px;scrollbar-width:thin;scrollbar-color:#c6ced5 transparent}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options>button[role=option]{position:relative;display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;min-height:38px!important;margin:0!important;padding:9px 12px 9px 34px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#425466!important;box-shadow:none!important;font-size:13px!important;font-weight:400!important;line-height:1.5!important;text-align:right!important;transition:background .12s,color .12s}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options>button[role=option]:hover{background:#f3f5f7!important;color:#253d51!important}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options>button[aria-selected=true]{background:#f0f4f7!important;font-weight:600!important;color:#253d51!important}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options>button[aria-selected=true]::after{content:'';position:absolute;left:12px;top:50%;width:15px;height:15px;transform:translateY(-50%);background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
body.staff-workspace :is(#detail#detail,#invitation-dialog#invitation-dialog,#search-dialog#search-dialog,.admin-layout) .custom-dropdown .callback-options>button[role=option]:focus-visible{outline:2px solid #94a8ba!important;outline-offset:-2px;background:#f3f5f7!important}
@media(prefers-reduced-motion:reduce){body.staff-workspace .custom-dropdown :is(.callback-toggle,.dropdown-chevron,[role=option]){transition:none!important}}

body dialog#detail#detail.crm-unified{scrollbar-gutter:auto!important}

/* Action-first lead workspace: compact, calm and keyboard accessible. */
body.staff-workspace #app .action-dashboard{--work-ink:#263746;--work-muted:#84909b;max-width:1680px;margin:auto}
body.staff-workspace #app .action-dashboard .work-overview{display:flex;align-items:center;justify-content:space-between;gap:32px;margin:8px 0 24px;padding:8px 4px;background:transparent}
body.staff-workspace #app .action-dashboard .work-overview h2{font-size:25px;letter-spacing:-.6px;margin:0 0 5px;color:var(--work-ink)}
body.staff-workspace #app .action-dashboard .work-overview p{font-size:13px;margin:0;color:#84909b}
body.staff-workspace #app .action-dashboard .work-metrics{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr));gap:12px}
body.staff-workspace #app .action-dashboard .work-metric{display:flex;align-items:center;gap:15px;min-height:68px;border:1px solid #e4e8ed;background:#fff;border-radius:12px;padding:13px 22px;color:#566474;text-align:right;box-shadow:0 2px 4px #24304402;transition:.15s}
body.staff-workspace #app .action-dashboard .work-metric strong{font-size:27px;font-weight:650;color:#273747;line-height:1;font-variant-numeric:tabular-nums}
body.staff-workspace #app .action-dashboard .work-metric span{font-size:13px;white-space:nowrap}
body.staff-workspace #app .action-dashboard .work-metric:hover{border-color:#bbc6d0;transform:translateY(-1px)}
body.staff-workspace #app .action-dashboard .work-metric[aria-pressed=true]{border-color:#ce7283;background:#fffafb;box-shadow:0 0 0 2px #cc224011}
body.staff-workspace #app .action-dashboard .metric-overdue strong{color:#bc3b52}
body.staff-workspace #app .action-dashboard .lead-stage-tabs{padding:0 2px;border:0;border-bottom:1px solid #dfe5eb;border-radius:0;box-shadow:none;background:transparent;margin-bottom:16px;justify-content:flex-start;gap:28px;display:flex}
body.staff-workspace #app .action-dashboard .lead-stage-tabs button{flex:0 1 auto;min-width:140px;gap:14px;background:none;border:0;border-radius:0;padding:11px 4px;color:#84909b;border-bottom:2px solid transparent}
body.staff-workspace #app .action-dashboard .lead-stage-tabs button[aria-selected=true]{background:transparent;color:#bd2543;border-bottom-color:#cb2040}
body.staff-workspace #app .action-dashboard .lead-stage-tabs strong{background:#e9edf1;color:#6d7b8a;border-radius:6px;min-width:26px;font-size:12px}
body.staff-workspace #app .action-dashboard .lead-stage-tabs button[aria-selected=true] strong{background:#f7e8ed;color:#b32441}
body.staff-workspace #app .action-dashboard .admin-list-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:14px;padding:16px;background:#fff;border-radius:12px;margin-bottom:8px}
body.staff-workspace #app .action-dashboard .quick-lead-search{display:block;max-width:400px;margin:0}
.quick-lead-search>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.staff-workspace #app .action-dashboard #quick-lead-search{height:40px;min-height:40px;width:100%;border:1px solid #e7ebf0;border-radius:8px;background:#f7f9fb;font:inherit;font-size:13px;padding:8px 13px;color:#33485c}
body.staff-workspace #app .action-dashboard .admin-list-actions{display:flex;gap:8px;flex-wrap:wrap}
body.staff-workspace #app .action-dashboard .admin-list-actions button{background:transparent;color:#667585;min-height:36px;padding:7px 12px;border:1px solid #e7ebef;border-radius:7px;font-size:12px}
body.staff-workspace #app .action-dashboard .lead-sort-and-filters{grid-column:1/-1;width:100%;border:0;border-top:1px solid #eef1f4;padding:14px 0 0;margin:0;gap:12px;display:flex;justify-content:space-between;align-items:center}
body.staff-workspace #app .action-dashboard .lead-dropdown-filters{gap:7px;flex-wrap:wrap}
body.staff-workspace #app .action-dashboard .lead-dropdown-filters .field select{height:35px;min-height:35px;font-size:12px;max-width:185px;padding-block:5px;background-color:#fff!important;color:#5e6e80!important}
body.staff-workspace #app .action-dashboard #list-followup-date{width:145px;height:35px;min-height:35px;border:1px solid #e3e8ed;border-radius:7px;font:inherit;font-size:12px;padding:4px 7px}
body.staff-workspace #app .action-dashboard .lead-sort-buttons{flex-wrap:wrap}
body.staff-workspace #app .action-dashboard .lead-sort-buttons button{font-size:11px;padding:5px 9px;min-height:29px;height:29px}
body.staff-workspace #app .action-dashboard .list-meta{padding:3px 3px 8px;margin:0;font-size:11px;color:#8a96a3}
body.staff-workspace #app .action-dashboard .leads-table{width:100%;min-width:940px;table-layout:fixed;border-collapse:collapse}
body.staff-workspace #app .action-dashboard .leads-table th{height:43px;padding:7px 12px;background:#f9fafb;font-size:11px;white-space:nowrap}
body.staff-workspace #app .action-dashboard .leads-table td{height:66px;padding:8px 12px!important;vertical-align:middle;border-bottom:1px solid #edf0f3;font-size:13px;line-height:1.45;background:transparent}
body.staff-workspace #app .action-dashboard .leads-table tbody tr{background:#fff}
body.staff-workspace #app .action-dashboard .leads-table tbody tr:hover{background:#f8fafc}
body.staff-workspace #app .action-dashboard .leads-table tbody tr.lead-selected{background:#fff6f8}
body.staff-workspace #app .action-dashboard [data-column-key=name]{width:20%}
body.staff-workspace #app .action-dashboard [data-column-key=course]{width:12%}
body.staff-workspace #app .action-dashboard [data-column-key=status]{width:14%}
body.staff-workspace #app .action-dashboard [data-column-key=next]{width:21%}
body.staff-workspace #app .action-dashboard [data-column-key=followup]{width:15%}
body.staff-workspace #app .action-dashboard [data-column-key=priority]{width:8%}
body.staff-workspace #app .action-dashboard [data-column-key=actions]{width:10%}
body.staff-workspace #app .action-dashboard .leads-table .contact-select{min-height:42px;padding-inline:30px 0;display:flex;align-items:center;justify-content:center}
body.staff-workspace #app .action-dashboard .leads-table .contact-select>input[type=checkbox]{inset-inline-start:15px;width:15px;height:15px}
body.staff-workspace #app .action-dashboard .leads-table .contact-select>button{inset-inline-start:-7px;width:20px;min-width:20px;opacity:.5}
body.staff-workspace #app .action-dashboard .lead-drag-handle:disabled{visibility:hidden}
body.staff-workspace #app .action-dashboard .leads-table .open-lead.lead-name{font-size:14px;font-weight:600;padding:0 3px;min-height:22px;line-height:22px;color:#293d50;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.staff-workspace #app .action-dashboard .leads-table td small{display:block;font-size:11px;line-height:17px;margin:1px 0 0;color:#8794a2}
body.staff-workspace #app .action-dashboard .leads-table .inline-value{min-height:28px;max-width:100%;padding:3px 6px;border:1px solid transparent;border-radius:6px;font-size:12px;line-height:20px;background:transparent;white-space:normal}
body.staff-workspace #app .action-dashboard .leads-table .inline-value:hover{background:#f0f3f6;border-color:#e1e7ed}
body.staff-workspace #app .action-dashboard .leads-table [data-edit-field=phone]{font-size:11px;min-height:17px;line-height:17px;padding:0 3px;color:#8793a2}
body.staff-workspace #app .action-dashboard .leads-table .status-label{background:#f2f5f8;color:#596f84;border:0}
body.staff-workspace #app .action-dashboard .leads-table .priority-label{background:none!important;color:#8893a1;min-width:0}
body.staff-workspace #app .action-dashboard .leads-table .priority-0{color:#b5475a!important}
body.staff-workspace #app .action-dashboard .inline-value[aria-haspopup=listbox]:after{content:'';display:inline-block;width:5px;height:5px;border-bottom:1.3px solid currentColor;border-left:1.3px solid currentColor;transform:rotate(-45deg);margin-inline-start:9px;vertical-align:3px;opacity:.55}
body.staff-workspace #app .action-dashboard .next-action-text{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#42566a;font-size:13px}
body.staff-workspace #app .action-dashboard .work-overdue .work-flag{color:#ba4157}
body.staff-workspace #app .action-dashboard .work-today .work-flag{color:#688598}
body.staff-workspace #app .action-dashboard .work-fresh .work-flag{color:#68897e}
body.staff-workspace #app .action-dashboard .work-overdue td[data-column-key=name]{box-shadow:inset -2px 0 #cb7183}
body.staff-workspace #app .action-dashboard .contact-menu-trigger{display:inline-flex;gap:8px;align-items:center;justify-content:center;background:#fff;color:#596e80;border:1px solid #dfe6ec;box-shadow:0 1px 2px #22334404;border-radius:7px;padding:6px 10px;font:inherit;font-size:12px;min-height:34px;white-space:nowrap;margin:0}
body.staff-workspace #app .action-dashboard .contact-menu-trigger:hover{border-color:#a6b4c0;background:#f7f9fb}
body.staff-workspace #app .action-dashboard .column-move-handle{opacity:.25;font-size:11px;width:15px;min-width:15px}
body.staff-workspace #app .action-dashboard th:hover .column-move-handle{opacity:.8}
body.staff-workspace .lead-contact-menu{position:fixed;z-index:1000;width:220px;padding:5px;border:1px solid #e1e7ed;border-radius:11px;background:#fff;box-shadow:0 12px 35px #24364a20}
body.staff-workspace .lead-contact-menu button{display:block;text-align:right;width:100%;min-height:37px;background:transparent;border:0;border-radius:7px;padding:8px 12px;font:inherit;font-size:13px;color:#41576d}
body.staff-workspace .lead-contact-menu button:hover,body.staff-workspace .lead-contact-menu button:focus-visible{background:#f1f5f8;outline:none}
@media(max-width:1100px){body.staff-workspace #app .action-dashboard .work-overview{gap:15px}body.staff-workspace #app .action-dashboard .work-metrics{grid-template-columns:repeat(3,1fr);gap:7px}body.staff-workspace #app .action-dashboard .work-metric{padding:12px;gap:10px}body.staff-workspace #app .action-dashboard .lead-sort-and-filters{align-items:flex-start}}
@media(max-width:700px){
 body.staff-workspace #app .action-dashboard .work-overview{display:block;margin-bottom:12px;padding:0}
 body.staff-workspace #app .action-dashboard .work-overview-title{margin:12px 0}
 body.staff-workspace #app .action-dashboard .work-overview h2{font-size:22px}
 body.staff-workspace #app .action-dashboard .work-metric{display:flex;flex-direction:column;gap:8px;padding:12px 5px;min-height:78px}
 body.staff-workspace #app .action-dashboard .work-metric strong{font-size:23px}
 body.staff-workspace #app .action-dashboard .work-metric span{font-size:11px}
 body.staff-workspace #app .action-dashboard .lead-stage-tabs{gap:12px;margin:10px 0}
 body.staff-workspace #app .action-dashboard .lead-stage-tabs button{min-width:0;flex:1;font-size:12px;gap:6px}
 body.staff-workspace #app .action-dashboard .admin-list-toolbar{display:flex;flex-direction:column;padding:12px;gap:10px;align-items:stretch}
 body.staff-workspace #app .action-dashboard .quick-lead-search{max-width:none}
 body.staff-workspace #app .action-dashboard .admin-list-actions{justify-content:space-between;gap:4px}
 body.staff-workspace #app .action-dashboard .admin-list-actions button{font-size:11px;padding:5px 7px}
 body.staff-workspace #app .action-dashboard .lead-sort-and-filters{display:flex;flex-direction:column;gap:10px;padding-top:10px}
 body.staff-workspace #app .action-dashboard .lead-dropdown-filters{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:6px}
 body.staff-workspace #app .action-dashboard .lead-dropdown-filters .field select{width:100%;max-width:none;font-size:11px}
 body.staff-workspace #app .action-dashboard .leads-table{display:block;min-width:0}
 body.staff-workspace #app .action-dashboard .leads-table thead{display:block}
 body.staff-workspace #app .action-dashboard .leads-table thead tr{display:flex;flex-wrap:wrap;padding:7px}
 body.staff-workspace #app .action-dashboard .leads-table th{display:none;width:auto!important;height:32px;border:0;padding:0 3px;background:transparent}
 body.staff-workspace #app .action-dashboard .leads-table th[data-column-key=name]{display:block}
 body.staff-workspace #app .action-dashboard .leads-table tbody{display:block}
 body.staff-workspace #app .action-dashboard .leads-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;padding:12px;border-top:1px solid #e7ecf1;position:relative}
 body.staff-workspace #app .action-dashboard .leads-table td{display:block;width:auto!important;height:auto!important;min-height:0!important;border:0;padding:0!important;text-align:right!important}
 body.staff-workspace #app .action-dashboard .leads-table td:before{display:none!important}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=name]{grid-column:1;grid-row:1/span 2;box-shadow:none}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=status]{grid-column:2;grid-row:1;text-align:left!important}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=course]{grid-column:2;grid-row:2;text-align:left!important}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=next]{grid-column:1/-1;grid-row:3;padding-top:6px!important}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=followup]{grid-column:1;grid-row:4}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=priority]{grid-column:1;grid-row:5}
 body.staff-workspace #app .action-dashboard .leads-table td[data-column-key=actions]{grid-column:2;grid-row:4/span 2;align-self:center;text-align:left!important}
 body.staff-workspace #app .action-dashboard .leads-table .contact-select{padding-inline:25px 0;justify-content:flex-start}
 body.staff-workspace #app .action-dashboard .leads-table .contact-select>div{text-align:right!important}
 body.staff-workspace #app .action-dashboard .leads-table .contact-select small{text-align:right!important}
 body.staff-workspace #app .action-dashboard .leads-table .contact-select>input[type=checkbox]{inset-inline-start:0}
 body.staff-workspace #app .action-dashboard .leads-table .contact-select>button{inset-inline-start:-15px}
 body.staff-workspace #app .action-dashboard .leads-table .work-flag{display:inline;margin-inline-start:8px;width:auto}
 body.staff-workspace #app .action-dashboard .next-action-text{display:inline}
 body.staff-workspace #app .action-dashboard .column-move-handle{display:none}
 body.staff-workspace #app .action-dashboard .admin-footnote{font-size:10px}
}

body.staff-workspace #app .action-dashboard .mobile-lead-sort{display:none}
@media(max-width:700px){body.staff-workspace #app .action-dashboard .lead-sort-buttons{display:none!important}body.staff-workspace #app .action-dashboard .lead-order-controls{width:100%}body.staff-workspace #app .action-dashboard .mobile-lead-sort{display:flex;align-items:center;gap:10px;font-size:11px;color:#7a8997}body.staff-workspace #app .action-dashboard .mobile-lead-sort select{flex:1;min-height:36px;height:36px;border:1px solid #e3e8ed;border-radius:7px;background:#fff;color:#50677c;font:inherit;padding:5px 9px}}

@media(max-width:700px){body.staff-workspace #app .action-dashboard .admin-heading{gap:10px;margin-bottom:12px}body.staff-workspace #app .action-dashboard .admin-brand{min-height:36px}body.staff-workspace #app .action-dashboard .workspace-logo{width:110px;height:auto}body.staff-workspace #app .action-dashboard .admin-utilities{gap:5px;display:flex;flex-wrap:wrap}body.staff-workspace #app .action-dashboard .admin-utilities button{min-height:32px;height:32px;font-size:10px;padding:5px 8px}body.staff-workspace #app .action-dashboard .work-overview h2{font-size:19px;margin:0}body.staff-workspace #app .action-dashboard .work-overview p{display:none}body.staff-workspace #app .action-dashboard .work-metric{min-height:62px;padding:10px 4px;gap:5px}body.staff-workspace #app .action-dashboard .work-metric strong{font-size:21px}body.staff-workspace #app .action-dashboard .leads-table .next-action-text{font-size:12px}body.staff-workspace #app .action-dashboard .leads-table .work-flag{margin-inline-start:8px!important}body.staff-workspace #app .action-dashboard .admin-list-toolbar{gap:8px}body.staff-workspace #app .action-dashboard .lead-dropdown-filters .field select{padding-inline-start:8px;padding-inline-end:23px;background-position:7px center}}

/* Compact daily lead work: primary workflow and bounded, expandable history. */
body dialog#detail#detail.crm-unified.crm-compact{width:min(1440px,96vw)}
body #detail.crm-compact .unified-header{padding:11px 20px!important;gap:16px}
body #detail.crm-compact .eyebrow{display:none}
body #detail.crm-compact #crm-name{font-size:22px;line-height:1.25}
body #detail.crm-compact .identity-title{margin:0 0 4px}
body #detail.crm-compact .crm-contact-line{font-size:12px;gap:10px}
body dialog#detail#detail.crm-compact .unified-quick :is(button,a){min-height:33px;padding:6px 10px;font-size:12px}
body #detail.crm-compact .unified-body{padding:14px 16px;scroll-padding:12px}
body #detail.crm-compact .unified-columns{grid-template-columns:minmax(0,2.35fr) minmax(280px,1fr);gap:14px;margin:0;align-items:start}
body #detail.crm-compact .unified-main,body #detail.crm-compact .unified-sidebar{display:grid;gap:12px;min-width:0}
body #detail.crm-compact .crm-section{padding:12px 15px;border-radius:10px}
body #detail.crm-compact .crm-section-heading{margin-bottom:8px;gap:8px}
body #detail.crm-compact .crm-section h3{font-size:14px!important}
body #detail.crm-compact .unified-management .crm-section-heading>span{display:none}
body #detail.crm-compact .fields{gap:8px}
body #detail.crm-compact .management-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body #detail.crm-compact .field{gap:3px}
body #detail.crm-compact .field>span{font-size:11px!important;line-height:1.4}
body #detail.crm-compact .field input:not([type=checkbox]){height:35px!important;min-height:35px!important;padding:6px 9px!important;font-size:13px!important}
body dialog#detail#detail.crm-compact .callback-toggle{height:35px!important;min-height:35px!important;padding:6px 9px!important;font-size:13px!important}
body #detail.crm-compact .compact-next{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(200px,1fr);gap:12px;margin:0 0 10px;padding:10px 12px;background:#f2f6f9;border:1px solid #e2e9ef;border-radius:8px}
body #detail.crm-compact .compact-next .field>span{font-weight:650;color:#385b71;font-size:12px!important}
body #detail.crm-compact .compact-next input{background:#fff;border-color:#cbd9e4}
body #detail.crm-compact .unified-composer{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px;align-items:start}
body #detail.crm-compact .unified-composer>.field:first-child{max-width:none;margin:0}
body #detail.crm-compact .note-field textarea{height:64px;min-height:64px;padding:7px 10px;font-size:13px!important;line-height:1.5}
body #detail.crm-compact .unified-timeline{margin-top:12px;padding-top:10px}
body #detail.crm-compact .unified-event{padding:7px 0!important;margin:0!important;border:0!important;border-bottom:1px solid #edf1f4!important;background:transparent;min-height:0}
body #detail.crm-compact .unified-event:last-child{border-bottom:0!important}
body #detail.crm-compact .event-body header{display:flex;align-items:baseline;justify-content:flex-start;gap:8px;flex-wrap:wrap;line-height:1.4;padding:0;margin:0}
body #detail.crm-compact .event-body strong{font-size:12px;line-height:1.4;font-weight:600}
body #detail.crm-compact .event-body time{font-size:10px;color:#81909e;margin-inline-start:auto}
body #detail.crm-compact .event-author{font-size:10px;color:#81909e;line-height:1.4}
body #detail.crm-compact .event-body p{font-size:13px;line-height:1.45;margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
body #detail.crm-compact .event-full-text{margin:3px 0 0;padding:0}
body #detail.crm-compact .event-full-text summary{font-size:13px;color:#43586b;line-height:1.45;overflow-wrap:anywhere;padding:0}
body #detail.crm-compact .event-full-text summary span{color:#81919f;font-size:11px}
body #detail.crm-compact .history-fold{border-top:1px solid #e9eef2;margin-top:7px}
body #detail.crm-compact .history-fold>summary{padding:8px 0;font-size:12px;color:#60798d;font-weight:500;line-height:1.4}
body #detail.crm-compact .system-events>summary{color:#8794a0;font-size:11px}
body #detail.crm-compact .system-events>summary span{margin-inline-start:5px;font-variant-numeric:tabular-nums}
body #detail.crm-compact .history-scroll{max-height:280px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c2cad1 transparent;padding-inline-end:8px}
body #detail.crm-compact .event-changes{margin-top:2px;font-size:11px}
body #detail.crm-compact .event-changes dl{padding:7px;margin:5px 0}
body #detail.crm-compact .event-changes dd{margin:2px 0 6px}
body #detail.crm-compact .crm-task{padding:7px 0;gap:7px}
body #detail.crm-compact .crm-task strong{font-size:12px;line-height:1.45}
body #detail.crm-compact .crm-task small{font-size:10px;margin-top:1px;line-height:1.4}
body #detail.crm-compact .crm-task button{min-height:29px!important;padding:4px 7px!important;font-size:10px!important}
body #detail.crm-compact .crm-empty{padding:6px 0;font-size:12px;line-height:1.5}
body #detail.crm-compact .crm-help{font-size:10px;margin-top:6px;line-height:1.4}
body #detail.crm-compact .unified-accordion{margin-top:6px}
body #detail.crm-compact .unified-accordion>summary{padding:8px 0;font-size:12px;line-height:1.4}
body #detail.crm-compact .unified-sidebar .unified-accordion[open]{max-height:330px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c2cad1 transparent;padding-inline-end:5px}
body #detail.crm-compact .unified-sidebar .unified-accordion[open]>summary{position:sticky;top:0;background:white;z-index:1;margin:0 0 6px}
body #detail.crm-compact .client-summary{margin:0 0 5px;font-size:12px}
body #detail.crm-compact .client-summary>div{padding:3px 0;gap:8px;grid-template-columns:90px 1fr}
body #detail.crm-compact .client-summary dt{font-size:11px}
body #detail.crm-compact .trial-details{padding:3px 15px;margin:0}
body #detail.crm-compact .crm-save{padding:9px 20px;font-size:11px}
body dialog#detail#detail.crm-compact button.primary{min-height:38px;padding:8px 20px;font-size:13px!important}
@media(max-width:1000px){body #detail.crm-compact .unified-columns{grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);gap:10px}body #detail.crm-compact .crm-section{padding:11px}body #detail.crm-compact .unified-composer{grid-template-columns:120px minmax(0,1fr);gap:8px}body #detail.crm-compact .compact-next{grid-template-columns:1fr;gap:7px}body #detail.crm-compact .unified-management .crm-section-heading{margin-bottom:6px}}
@media(max-width:700px){body #detail.crm-compact .unified-columns{grid-template-columns:1fr}body #detail.crm-compact .unified-header{padding:9px 12px!important;gap:7px}body #detail.crm-compact .unified-body{padding:10px}body #detail.crm-compact .unified-main,body #detail.crm-compact .unified-sidebar{gap:10px}body #detail.crm-compact .management-fields{grid-template-columns:repeat(2,minmax(0,1fr))}body #detail.crm-compact .management-fields>.field:has(input[name=crm_owner]){grid-column:1/-1}body #detail.crm-compact .unified-composer{grid-template-columns:1fr}body #detail.crm-compact .unified-composer>.field:first-child{max-width:160px}body #detail.crm-compact .compact-next{grid-template-columns:1fr}body #detail.crm-compact .event-body header{gap:6px}body #detail.crm-compact .crm-save{padding:8px 12px}body #detail.crm-compact .unified-sidebar .unified-accordion[open]{max-height:360px}}

body #detail.crm-compact .event-body header{height:auto!important;min-height:0!important;max-height:none!important;position:static!important;box-shadow:none!important;border:0!important;background:none!important;padding:0!important;margin:0!important}
body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion:not(.crm-section)){padding:0!important}
body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion)>summary{display:list-item!important;list-style-position:inside;height:auto!important;min-height:0!important;font-weight:500}
body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion)>summary::before,body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion)>summary::after{content:none!important;display:none!important}
body #detail.crm-compact summary::marker{color:#8799a8;font-size:10px}

body dialog#detail#detail.crm-unified.crm-compact{height:auto!important}body #detail.crm-compact #crm-update{flex:0 1 auto}body #detail.crm-compact .unified-body{max-height:calc(94dvh - 145px)}
body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion)>summary{list-style-type:disclosure-closed!important}
body #detail.crm-compact :is(.history-fold,.event-full-text,.event-changes,.unified-accordion)[open]>summary{list-style-type:disclosure-open!important}
body #detail.crm-compact .event-full-text>summary{font-weight:400!important;font-size:13px!important}
@media(max-width:640px){body dialog#detail#detail.crm-unified.crm-compact{height:100dvh!important}body #detail.crm-compact #crm-update{flex:1}body #detail.crm-compact .unified-body{max-height:none}}

body dialog#detail#detail.crm-unified.crm-compact{top:50%!important;bottom:auto!important;margin-block:0!important;transform:translateY(-50%);height:fit-content!important;min-height:0!important}body #detail.crm-compact #crm-update{flex:1 1 auto}
@media(max-width:640px){body dialog#detail#detail.crm-unified.crm-compact{top:0!important;bottom:0!important;transform:none;height:100dvh!important}}

/* Focused card polish: contact proximity, follow-up state and readable notes. */
body #detail.crm-compact .unified-identity{flex:0 1 auto;min-width:0}
body #detail.crm-compact .unified-contact-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-inline-end:auto;padding-inline-start:16px;border-inline-start:1px solid #e9edf1}
body dialog#detail#detail.crm-compact :is(.unified-contact-actions,.unified-quick) :is(button,a){display:inline-flex;align-items:center;justify-content:center;height:34px;min-height:34px;padding:6px 11px;font-size:13px;line-height:1.3;white-space:nowrap}
body #detail.crm-compact .unified-contact-actions #card-whatsapp{background:#f5f8f7;border-color:#dce7e2;color:#355b50}
body #detail.crm-compact .unified-contact-actions :is(button,a):hover{background:#edf2f5}
body #detail.crm-compact .unified-quick{flex:none;max-width:none}
body #detail.crm-compact .crm-contact-line{font-size:13px;color:#63778a}
body #detail.crm-compact .compact-next{background:#f7f9fb;border-color:#e0e7ed;padding:8px 10px;border-inline-start:3px solid #cbd8e3}
body #detail.crm-compact .compact-next .field>span{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:18px}
body #detail.crm-compact .followup-state{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px;font-weight:500;color:#7a8895;line-height:1.2}
body #detail.crm-compact .followup-state::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}
body #detail.crm-compact .followup-state[data-state=future]{color:#627e91}
body #detail.crm-compact .followup-state[data-state=today]{color:#90682c}
body #detail.crm-compact .followup-state[data-state=overdue]{color:#b54b59}
body #detail.crm-compact input[name=followup][data-state=today]{border-color:#d8c6a6}
body #detail.crm-compact input[name=followup][data-state=overdue]{border-color:#dcb1b8}
body #detail.crm-compact .field>span{font-size:12px!important;color:#65798c}
body #detail.crm-compact .field input:not([type=checkbox]),body dialog#detail#detail.crm-compact .callback-toggle{font-size:14px!important;height:36px!important;min-height:36px!important}
body #detail.crm-compact input::placeholder,body #detail.crm-compact textarea::placeholder{color:#8997a4;font-size:13px;font-weight:400}
body #detail.crm-compact .field input:focus,body #detail.crm-compact textarea:focus{border-color:#91a8ba;outline:2px solid #eaf0f5;outline-offset:1px}
body #detail.crm-compact .note-field textarea{font-size:14px!important;line-height:1.5;height:64px;min-height:64px}
body #detail.crm-compact .event-body p,body #detail.crm-compact .event-full-text>summary{font-size:14px!important;line-height:1.55;color:#344b5e}
body #detail.crm-compact .event-body time{font-size:11px;color:#758696}
body #detail.crm-compact .recent-human-events>.unified-event:first-child{background:#f8fafc;padding:8px 10px!important;border-radius:7px;border:1px solid #eaf0f4!important;margin-bottom:4px!important}
body #detail.crm-compact .event-full-text>summary{display:block!important;list-style:none!important;cursor:pointer}
body #detail.crm-compact .event-full-text>summary::-webkit-details-marker{display:none}
body #detail.crm-compact .event-full-text .event-preview{display:block;font-size:14px!important;color:#344b5e;line-height:1.55;font-weight:400}
body #detail.crm-compact .event-full-text :is(.event-expand,.event-collapse){font-size:12px;color:#607e94;text-decoration:underline;text-underline-offset:3px}
body #detail.crm-compact .event-full-text .event-collapse{display:none}
body #detail.crm-compact .event-full-text[open] .event-preview,body #detail.crm-compact .event-full-text[open] .event-expand{display:none}
body #detail.crm-compact .event-full-text[open] .event-collapse{display:inline}
body #detail.crm-compact .event-full-text[open] p{margin-top:5px}
body #detail.crm-compact .crm-save{border-top:1px solid #e4eaf0}
body #detail.crm-compact .crm-save.has-changes #save-hint{color:#8e5d35}
body #detail.crm-compact .crm-save.has-changes #save-hint::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#c29365;margin-inline-end:7px;vertical-align:middle}
@media(max-width:900px){body #detail.crm-compact .unified-contact-actions{padding-inline-start:10px;gap:5px}body #detail.crm-compact .unified-header{gap:10px}body #detail.crm-compact .unified-quick :is(button,a){font-size:12px!important}}
@media(max-width:640px){body #detail.crm-compact .unified-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}body #detail.crm-compact .unified-identity{grid-column:1;grid-row:1;flex-basis:auto}body #detail.crm-compact .close{grid-column:2;grid-row:1;align-self:start;order:0}body #detail.crm-compact .unified-contact-actions{grid-column:1;grid-row:2;padding:0;border:0;margin:0;gap:5px}body #detail.crm-compact .unified-quick{grid-column:2;grid-row:2;order:0;width:auto;justify-content:flex-end;gap:4px;max-width:120px}body dialog#detail#detail.crm-compact :is(.unified-contact-actions,.unified-quick) :is(button,a){font-size:12px!important;padding:6px 8px}body #detail.crm-compact .crm-contact-line{font-size:12px;gap:6px}body #detail.crm-compact .crm-contact-line span+span{padding-inline-start:6px}body #detail.crm-compact .event-body time{font-size:10px}body #detail.crm-compact .compact-next{padding:7px 9px}body #detail.crm-compact .unified-body{max-height:none}}

/* Open prospect information and one card scroll surface. */
body #detail.crm-compact .client-info .crm-section-heading{align-items:center;margin-bottom:10px}
body dialog#detail#detail.crm-compact .client-edit-toggle{min-height:30px;height:30px;padding:5px 10px;font-size:12px;color:#43657c;background:#f7f9fb;border:1px solid #dce5ed;border-radius:6px;white-space:nowrap}
body #detail.crm-compact .client-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;margin:0}
body #detail.crm-compact .client-facts>div{min-width:0;padding:0}
body #detail.crm-compact .client-facts dt{font-size:11px;color:#7a8b9a;line-height:1.4;margin:0 0 2px}
body #detail.crm-compact .client-facts dd{font-size:13px;color:#344c60;line-height:1.45;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
body #detail.crm-compact .client-facts .is-missing dd{color:#96a1ac;font-size:12px}
body #detail.crm-compact .client-preferences{border-top:1px solid #e9eef2;margin-top:12px;padding-top:10px}
body #detail.crm-compact .client-info :is(.client-info-view,.client-edit-form)[hidden]{display:none!important}
body #detail.crm-compact .client-edit-form{overflow:visible;max-height:none}
body #detail.crm-compact .client-edit-form fieldset{border:0;border-top:1px solid #e9eef2;padding:8px 0 0;margin:14px 0 0;min-width:0}
body #detail.crm-compact .client-edit-form legend{font-size:12px;font-weight:600;color:#49677d;padding:0 0 0 8px}
body #detail.crm-compact .client-edit-form .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 10px}
body #detail.crm-compact .client-edit-form fieldset:first-of-type .field:has(input[name=email]){grid-column:1/-1}
body #detail.crm-compact .client-survey-readonly{border-top:1px solid #e9eef2;margin-top:12px;padding-top:10px}
body #detail.crm-compact .client-survey-readonly h4{font-size:12px;color:#49677d;margin:0 0 6px}
body #detail.crm-compact .client-survey-readonly .detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body #detail.crm-compact .client-survey-readonly .detail-field{padding:0;border:0;background:none;font-size:13px;min-width:0;overflow-wrap:anywhere}
body #detail.crm-compact .client-survey-readonly .detail-field small{font-size:11px}
body #detail.crm-compact .client-source-meta{padding:0!important;margin:12px 0 0;border-top:1px solid #e9eef2}
body #detail.crm-compact .client-source-meta>summary{padding:9px 0 0;min-height:0!important;height:auto!important;display:list-item!important;list-style:disclosure-closed inside!important;font-size:11px;font-weight:400;color:#81909d}
body #detail.crm-compact .client-source-meta[open]>summary{list-style-type:disclosure-open!important}
body #detail.crm-compact .client-source-meta>summary::before,body #detail.crm-compact .client-source-meta>summary::after{display:none!important;content:none!important}
body #detail.crm-compact .client-video{font-size:12px;margin:9px 0 0}
body #detail.crm-compact .history-scroll,body #detail.crm-compact .unified-sidebar .unified-accordion[open],body #detail.crm-compact .client-source-meta{max-height:none!important;overflow:visible!important;overscroll-behavior:auto;padding-inline-end:0}
body #detail.crm-compact .unified-sidebar .unified-accordion[open]>summary{position:static}
@media(min-width:701px) and (max-width:1050px){body #detail.crm-compact .client-edit-form .fields{grid-template-columns:1fr}body #detail.crm-compact .client-facts{gap:8px}body #detail.crm-compact .client-info .crm-section-heading{gap:5px}body dialog#detail#detail.crm-compact .client-edit-toggle{padding:5px 7px;font-size:11px}}
@media(max-width:360px){body #detail.crm-compact .client-edit-form .fields{grid-template-columns:1fr}}

/* Final readability polish, preserving the compact card layout. */
body #detail.crm-compact .unified-quick:empty{display:none}
body #detail.crm-compact .client-facts dt{font-size:12px;line-height:1.45;color:#728495}
body #detail.crm-compact .client-facts dd{font-size:14px;line-height:1.5;color:#344b5d}
body #detail.crm-compact .client-facts{gap:8px 12px}
body #detail.crm-compact .client-missing{font-size:12px;line-height:1.55;color:#82909b;margin:10px 0 0;padding:0;overflow-wrap:anywhere}
body #detail.crm-compact .client-missing>span{font-weight:500;color:#738493}
body #detail.crm-compact .compact-next{background:#fff9fa;border-color:#eddee2;border-inline-start:3px solid #c9647b}
body #detail.crm-compact .compact-next .field:has(input[name=crm_next_action])>span{color:#953e54;font-size:13px!important;font-weight:650}
body #detail.crm-compact input[name=crm_next_action]{border-color:#d9bdc6;background:#fff;font-weight:500}
body #detail.crm-compact .event-body strong{font-size:13px}
body #detail.crm-compact .event-body time,body #detail.crm-compact .event-author{font-size:12px;color:#738394}
body #detail.crm-compact .event-body p,body #detail.crm-compact .event-full-text>summary,body #detail.crm-compact .event-full-text .event-preview{font-size:14px!important;line-height:1.65;overflow-wrap:anywhere;word-break:normal}
body #detail.crm-compact .recent-human-events>.unified-event:first-child :is(p,.event-preview){font-size:15px!important;line-height:1.65}
body #detail.crm-compact .event-full-text :is(.event-expand,.event-collapse){font-size:13px;line-height:1.5;color:#476b86;font-weight:500;display:inline-block;margin-top:3px}
body #detail.crm-compact .event-full-text .event-collapse{display:none}
body #detail.crm-compact .event-full-text[open] .event-expand{display:none}
body #detail.crm-compact .event-full-text[open] .event-collapse{display:inline-block}
body #detail.crm-compact .trial-details[hidden]{display:none!important}
body dialog#detail#detail.crm-compact .client-trial-edit{min-height:32px;margin-top:12px;padding:6px 10px;font-size:12px;background:#f7f9fb;border:1px solid #dce5ed;color:#49677d;border-radius:6px}
body #detail.crm-compact .client-survey-readonly .detail-field{font-size:14px}
body #detail.crm-compact .client-survey-readonly .detail-field small{font-size:12px}
@media(max-width:640px){body #detail.crm-compact .unified-contact-actions{grid-column:1/-1}body #detail.crm-compact .unified-quick:not(:empty){grid-column:2;grid-row:3}body #detail.crm-compact .event-body time{font-size:11px}}

/* Three-row lead workspace header. */
body.staff-workspace #app .compact-dashboard .admin-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:0 0 12px}
body.staff-workspace #app .compact-dashboard .admin-brand{display:flex;align-items:center;gap:18px}
body.staff-workspace #app .compact-dashboard .workspace-logo{width:112px;height:auto;max-height:43px;object-fit:contain}
body.staff-workspace #app .compact-dashboard .admin-brand h1{display:block;font-size:22px;font-weight:650;line-height:1.3;margin:0;color:#263f51;border:0;padding:0}
body.staff-workspace #app .compact-dashboard .header-result{font-size:12px;color:#7b8b99;margin:4px 0 0;line-height:1.4}
body.staff-workspace #app .compact-dashboard .admin-utilities{display:flex;align-items:center;gap:8px}
body.staff-workspace #app .compact-dashboard .admin-utilities #add{min-height:38px;height:38px;padding:8px 15px;font-size:13px}
body.staff-workspace #app .compact-dashboard .admin-more{position:relative;margin:0;padding:0;border:0;background:none;z-index:30}
body.staff-workspace #app .compact-dashboard .admin-more>summary{display:flex;align-items:center;gap:7px;justify-content:center;list-style:none;cursor:pointer;min-height:38px;height:38px;padding:8px 12px;font-size:13px;line-height:1;border:1px solid #dfe5eb;border-radius:7px;background:#fff;color:#526a7c;box-sizing:border-box}
body.staff-workspace #app .compact-dashboard .admin-more>summary::before,body.staff-workspace #app .compact-dashboard .admin-more>summary::after{display:none;content:none}
body.staff-workspace #app .compact-dashboard .admin-more>summary::-webkit-details-marker{display:none}
body.staff-workspace #app .compact-dashboard .admin-more-panel{position:absolute;inset-inline-end:0;top:calc(100% + 6px);min-width:215px;display:grid;padding:6px;border:1px solid #e1e6ec;border-radius:10px;background:white;box-shadow:0 10px 32px #243c5520;z-index:35}
body.staff-workspace #app .compact-dashboard .admin-more-panel button{display:block;width:100%;min-height:35px;height:auto;text-align:right;border:0;border-radius:5px;background:transparent;color:#415d73;padding:8px 10px;font-size:13px}
body.staff-workspace #app .compact-dashboard .admin-more-panel button:hover{background:#f3f6f9}
body.staff-workspace #app .compact-dashboard .admin-more-panel #logout{border-top:1px solid #edf0f3;border-radius:0;margin-top:4px;color:#8d6170}
body.staff-workspace #app .compact-dashboard #sync-state{font-size:10px;padding:6px 10px;line-height:1.5;color:#81919e}
body.staff-workspace #app .compact-dashboard .compact-stage-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #e1e7ed;margin-bottom:12px;min-height:43px}
body.staff-workspace #app .compact-dashboard .lead-stage-tabs{display:flex;gap:20px;border:0;margin:0;padding:0;min-height:43px;box-shadow:none;background:none}
body.staff-workspace #app .compact-dashboard .lead-stage-tabs button{min-height:43px;padding:8px 3px;min-width:0;font-size:13px;gap:7px;border-radius:0;border:0;border-bottom:2px solid transparent;background:transparent}
body.staff-workspace #app .compact-dashboard .lead-stage-tabs button[aria-selected=true]{border-bottom-color:#ce1742;color:#bd2449;background:none}
body.staff-workspace #app .compact-dashboard .lead-stage-tabs strong{font-size:11px;padding:2px 6px;min-width:23px;border-radius:5px;background:#edf1f5;color:#718495}
body.staff-workspace #app .compact-dashboard .compact-followup{display:flex;gap:5px;align-items:center}
body.staff-workspace #app .compact-dashboard .compact-followup button{display:flex;align-items:center;gap:5px;min-height:29px;padding:4px 8px;font-size:12px;color:#738392;background:transparent;border:1px solid transparent;border-radius:6px}
body.staff-workspace #app .compact-dashboard .compact-followup button[aria-pressed=true]{background:#f8eef1;color:#a63f57;border-color:#edd8de}
body.staff-workspace #app .compact-dashboard .compact-followup span{font-variant-numeric:tabular-nums;font-weight:600}
body.staff-workspace #app .compact-dashboard .admin-list-toolbar{display:grid;grid-template-columns:minmax(160px,1fr) auto minmax(155px,200px) auto;align-items:center;gap:8px;padding:0;margin:0 0 12px;border:0;border-radius:0;box-shadow:none;background:none}
body.staff-workspace #app .compact-dashboard .quick-lead-search{width:100%;max-width:none;min-width:0;margin:0}
body.staff-workspace #app .compact-dashboard .quick-lead-search input{height:38px;min-height:38px;font-size:13px;background:white;padding:8px 12px;border:1px solid #dfe5eb;border-radius:7px}
body.staff-workspace #app .compact-dashboard .admin-list-toolbar>button{min-height:38px;height:38px;padding:7px 13px;font-size:13px;white-space:nowrap;border:1px solid #dfe5eb;border-radius:7px;background:#fff;color:#526a7c}
body.staff-workspace #app .compact-dashboard .admin-list-toolbar>button.has-filters{border-color:#d9b7c2;color:#aa3855;background:#fff9fb}
body.staff-workspace #app .compact-dashboard .mobile-lead-sort{display:block!important;min-width:0;width:100%;margin:0}
body.staff-workspace #app .compact-dashboard .mobile-lead-sort>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.staff-workspace #app .compact-dashboard .mobile-lead-sort select{display:block;width:100%;height:38px;min-height:38px;padding:7px 10px;font-size:13px;font-family:inherit;color:#526a7c;background:#fff;border:1px solid #dfe5eb;border-radius:7px}
body.staff-workspace #app .compact-dashboard .active-filter-summary{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0;border:0}
body.staff-workspace #app .compact-dashboard .lead-column-label{font-size:12px;font-weight:500;color:#6d8294;display:inline-flex;align-items:center;gap:5px}
body.staff-workspace #app .compact-dashboard .lead-column-heading{justify-content:center}
body.staff-workspace #app .compact-dashboard .lead-list{margin-top:0}
body.staff-workspace #app .compact-dashboard .inline-edit-summary:empty{display:none}
body #search-dialog #search-form .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body #search-dialog #followup-date-field[hidden]{display:none!important}
@media(max-width:700px){
 body.staff-workspace #app .compact-dashboard .admin-heading{gap:8px;padding-bottom:9px}
 body.staff-workspace #app .compact-dashboard .admin-brand{gap:9px;min-width:0}
 body.staff-workspace #app .compact-dashboard .workspace-logo{width:76px;max-height:33px}
 body.staff-workspace #app .compact-dashboard .admin-brand h1{font-size:17px}
 body.staff-workspace #app .compact-dashboard .header-result{font-size:10px;margin-top:2px}
 body.staff-workspace #app .compact-dashboard .admin-utilities{gap:5px;flex-wrap:nowrap}
 body.staff-workspace #app .compact-dashboard .admin-utilities #add{font-size:11px;padding:7px 9px;min-height:34px;height:34px}
 body.staff-workspace #app .compact-dashboard .admin-more>summary{min-height:34px;height:34px;padding:7px 9px;font-size:11px}
 body.staff-workspace #app .compact-dashboard .compact-stage-row{gap:5px;margin-bottom:8px;min-height:38px}
 body.staff-workspace #app .compact-dashboard .lead-stage-tabs{gap:9px;min-height:38px}
 body.staff-workspace #app .compact-dashboard .lead-stage-tabs button{font-size:11px;gap:4px;min-height:38px;padding:7px 0;flex:none}
 body.staff-workspace #app .compact-dashboard .lead-stage-tabs strong{font-size:10px;min-width:17px;padding:2px 4px}
 body.staff-workspace #app .compact-dashboard .compact-followup{display:none}
 body.staff-workspace #app .compact-dashboard .admin-list-toolbar{grid-template-columns:minmax(100px,1fr) auto 100px auto;gap:5px;margin-bottom:8px;display:grid;padding:0}
 body.staff-workspace #app .compact-dashboard .admin-list-toolbar>button{font-size:11px;padding:6px 7px;height:36px;min-height:36px}
 body.staff-workspace #app .compact-dashboard .quick-lead-search input{font-size:12px;padding:6px 8px;min-height:36px;height:36px}
 body.staff-workspace #app .compact-dashboard .mobile-lead-sort select{font-size:11px;padding:6px 5px;min-height:36px;height:36px}
 body #search-dialog #search-form .toolbar{grid-template-columns:1fr 1fr;gap:9px}
}
@media(max-width:380px){body.staff-workspace #app .compact-dashboard .workspace-logo{width:62px}body.staff-workspace #app .compact-dashboard .admin-brand{gap:6px}body.staff-workspace #app .compact-dashboard .admin-brand h1{font-size:16px}body.staff-workspace #app .compact-dashboard .admin-list-toolbar{grid-template-columns:minmax(85px,1fr) auto 86px auto}}

@media(max-width:700px){body.staff-workspace #app .compact-dashboard .admin-heading{flex-wrap:nowrap;align-items:center;gap:8px}body.staff-workspace #app .compact-dashboard .admin-brand{flex:1 1 auto;min-width:0;gap:8px}body.staff-workspace #app .compact-dashboard .admin-brand>div{min-width:0}body.staff-workspace #app .compact-dashboard .workspace-logo{width:62px;flex:none}body.staff-workspace #app .compact-dashboard .header-result{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:125px}body.staff-workspace #app .compact-dashboard .admin-utilities{width:auto;flex:0 0 auto;gap:5px}body.staff-workspace #app .compact-dashboard .admin-utilities #add{font-size:11px!important;padding:6px 8px!important;white-space:nowrap}body.staff-workspace #app .compact-dashboard .admin-more>summary{padding:6px 7px}body.staff-workspace #app .compact-dashboard .admin-brand h1{font-size:16px}}

/* Final list polish: clear filter groups and readable daily actions. */
body.staff-workspace #app .compact-dashboard .compact-stage-row{justify-content:flex-start;gap:22px}
body.staff-workspace #app .compact-dashboard .compact-followup{display:flex;gap:6px;border-inline-start:1px solid #dce4eb;padding-inline-start:20px;min-height:28px}
body.staff-workspace #app .compact-dashboard .compact-followup .followup-group-label{font-size:12px;font-weight:400;color:#7d8b97;margin-inline-end:3px}
body.staff-workspace #app .compact-dashboard .compact-followup button{min-height:32px;font-size:12px;padding:5px 9px;background:#f8fafb;border-color:#e4e9ee}
body.staff-workspace #app .compact-dashboard .compact-followup button[aria-pressed=true]{background:#f8eef1;border-color:#e6cbd4;color:#a63f57}
body.staff-workspace #app .compact-dashboard .lead-stage-tabs button{font-size:14px;padding-inline:5px}
body.staff-workspace #app .compact-dashboard .leads-table .lead-name{font-size:14px!important;min-height:30px}
body.staff-workspace #app .compact-dashboard .leads-table .inline-value{font-size:13px;min-height:32px;line-height:20px;padding:5px 7px}
body.staff-workspace #app .compact-dashboard .leads-table [data-edit-field=phone]{font-size:12px;min-height:23px;padding:1px 5px}
body.staff-workspace #app .compact-dashboard .leads-table .contact-menu-trigger{font-size:13px;min-height:36px;padding:7px 11px}
body.staff-workspace #app .compact-dashboard .leads-table td[data-column-key=next]{background:#f8fafc}
body.staff-workspace #app .compact-dashboard .leads-table th[data-column-key=next]{background:#f1f5f8}
body.staff-workspace #app .compact-dashboard .leads-table th[data-column-key=next] .lead-column-label{color:#38566d;font-weight:650}
body.staff-workspace #app .compact-dashboard .leads-table .next-action-text{font-size:14px;font-weight:550;color:#34566e;line-height:1.45}
body.staff-workspace #app .compact-dashboard .leads-table [data-edit-field=followup]{font-variant-numeric:tabular-nums;white-space:nowrap}
body.staff-workspace #app .compact-dashboard .lead-column-label{font-size:13px}
@media(max-width:700px){
 body.staff-workspace #app .compact-dashboard .compact-stage-row{overflow-x:auto;overflow-y:hidden;gap:14px;scrollbar-width:thin;scrollbar-color:#d3dce4 transparent;max-width:100%;padding-bottom:2px}
 body.staff-workspace #app .compact-dashboard .lead-stage-tabs{flex:none;gap:10px}
 body.staff-workspace #app .compact-dashboard .lead-stage-tabs button{font-size:11px;padding-inline:0}
 body.staff-workspace #app .compact-dashboard .compact-followup{display:flex;flex:none;padding-inline-start:12px;gap:5px}
 body.staff-workspace #app .compact-dashboard .compact-followup button{font-size:11px;white-space:nowrap;padding:4px 7px}
 body.staff-workspace #app .compact-dashboard .compact-followup .followup-group-label{font-size:11px;white-space:nowrap}
 body.staff-workspace #app .compact-dashboard #column-layout{white-space:normal;max-width:66px;line-height:1.15;padding:4px 7px}
 body.staff-workspace #app .compact-dashboard .leads-table td[data-column-key=next]{background:transparent;border-inline-start:2px solid #c4d1dc;padding-inline-start:7px!important}
 body.staff-workspace #app .compact-dashboard .leads-table .next-action-text{font-size:14px}
}

/* Column sorting and compact course filtering — 107 */
body.staff-workspace #app .compact-dashboard .quick-course-filter{display:block;min-width:0;width:100%;margin:0}
body.staff-workspace #app .compact-dashboard .quick-course-filter>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.staff-workspace #app .compact-dashboard .quick-course-filter select{display:block;width:100%;height:38px;min-height:38px;padding:7px 10px;font:13px var(--ui-font);color:#526a7c;background:#fff;border:1px solid #dfe5eb;border-radius:7px}
body.staff-workspace #app .compact-dashboard .lead-column-sort{min-height:34px;padding:4px;font-size:13px;gap:6px}
body.staff-workspace #app .compact-dashboard .page-selection{display:flex;align-items:center;gap:5px;flex:0 0 auto;margin:0;font-size:11px;font-weight:400;line-height:1.3;color:#7a8997;cursor:pointer}
body.staff-workspace #app .compact-dashboard .page-selection span{max-width:64px;white-space:normal;text-align:right}
.extra-sort-control{display:flex;align-items:center;gap:12px;margin:14px 0 4px;font-size:13px}
.extra-sort-control select{flex:1;min-width:0;min-height:36px;border:1px solid #dfe5eb;border-radius:7px;background:#fff;color:#526a7c;padding:6px 10px;font:inherit}
.extra-sort-hint{font-size:12px;line-height:1.5;color:#7a8997;margin:4px 0 12px}
@media(max-width:700px){body.staff-workspace #app .compact-dashboard .quick-course-filter select{font-size:11px;padding:6px 5px;min-height:36px;height:36px}}

/* Align bulk selection with row checkboxes; uniform column backgrounds. */
body.staff-workspace #app .compact-dashboard .leads-table th[data-column-key=name] .lead-column-heading{position:relative;min-height:34px;padding-inline:90px 20px}
body.staff-workspace #app .compact-dashboard .leads-table .page-selection{position:absolute;inset-inline-start:15px;top:50%;transform:translateY(-50%)}
body.staff-workspace #app .compact-dashboard .leads-table .page-selection input{width:15px;min-width:15px;height:15px;margin:0}
body.staff-workspace #app .compact-dashboard .leads-table :is(td,th)[data-column-key=next]{background:transparent}
@media(max-width:700px){body.staff-workspace #app .compact-dashboard .leads-table .page-selection{inset-inline-start:2px}}

body.staff-workspace #app .compact-dashboard .leads-table th[data-column-key=next]{background:#f9fafb}


/* ששת סטטוסי הטיפול, לפי סדר הפלואו. אחרון בקובץ כדי לגבור על ההגדרות הישנות. */
.admin-layout .leads-table :is(.status-label,.inline-value).status-0{background:#eaf1ff;color:#35548a}
.admin-layout .leads-table :is(.status-label,.inline-value).status-1{background:#fff3e4;color:#925508}
.admin-layout .leads-table :is(.status-label,.inline-value).status-2{background:#e4f3f8;color:#1f5f72}
.admin-layout .leads-table :is(.status-label,.inline-value).status-3{background:#efeafc;color:#553b96}
.admin-layout .leads-table :is(.status-label,.inline-value).status-4{background:#eaf5ef;color:#246249}
.admin-layout .leads-table :is(.status-label,.inline-value).status-5{background:#f1f1f2;color:#67626a}
