/* Light-only refinement. Dark mode intentionally uses its previous styles unchanged. */
:root.crm-premium-trial[data-theme=light]{
 --wa-canvas:#f3f5f7;--wa-panel:#fff;--wa-chrome:#f8fafc;--wa-soft:#f0f3f6;
 --wa-line:#ccd7e0;--wa-ink:#263440;--wa-muted:#5f6e7a;
 --wa-call-bg:#e7f4ed;--wa-call-ink:#24654e;--wa-call-line:#b9d9c9;--wa-call-hover:#d9eddf;
 --wa-section:#eaf0f5;--wa-section-hover:#dfe9f1;
 --wa-accent:#365e7d;--wa-selected:#eaf1f7;--wa-action:#eef4f8;--wa-action-ink:#365873;
 --wa-action-line:#cedde8;--wa-hover:#e2edf5;--wa-danger:#b63049;--wa-danger-bg:#fff0f3;
 --wa-warning:#805318;--wa-warning-bg:#fff4df;--wa-note:#fff9df;--wa-note-ink:#6d5b28;
}
/* Bridge every existing component family to one shared palette. */
:root.crm-premium-trial[data-theme=light]{
 --bg:var(--wa-canvas);--sidebar:var(--wa-chrome);--surface:var(--wa-panel);--surface2:var(--wa-soft);--surface3:var(--wa-chrome);
 --border:var(--wa-line);--border2:var(--wa-line);--text:var(--wa-ink);--muted:var(--wa-muted);--muted2:var(--wa-muted);
 --blue:var(--wa-accent);--green:#21735b;--green2:#21735b;--purple:var(--wa-accent);--amber:var(--wa-warning);--red:var(--wa-danger);
 --premium-paper:var(--wa-panel);--premium-canvas:var(--wa-canvas);--premium-soft:var(--wa-soft);--premium-line:var(--wa-line);
 --premium-ink:var(--wa-ink);--premium-muted:var(--wa-muted);--premium-action:var(--wa-action);--premium-action-ink:var(--wa-action-ink);
 --premium-action-line:var(--wa-action-line);--premium-hover:var(--wa-hover);--premium-accent:var(--wa-accent);--premium-red:var(--wa-danger);--premium-red-bg:var(--wa-danger-bg);
 --cc-surface:var(--wa-panel);--cc-soft:var(--wa-soft);--cc-line:var(--wa-line);--cc-text:var(--wa-ink);--cc-muted:var(--wa-muted);
 --cc-blue:var(--wa-accent);--cc-orange:var(--wa-warning);--cc-green:#21735b;--cc-red:var(--wa-danger);--cc-yellow:var(--wa-note-ink);
}
html.crm-premium-trial[data-theme=light] body #myClients{
 --mc-bg:var(--wa-canvas);--mc-card:var(--wa-panel);--mc-soft:var(--wa-soft);--mc-line:var(--wa-line);--mc-text:var(--wa-ink);--mc-muted:var(--wa-muted);
 --mc-blue:var(--wa-accent);--mc-blue-bg:var(--wa-selected);--mc-green:#21735b;--mc-green-bg:#eef7f1;
 --mc-red:var(--wa-danger);--mc-red-bg:var(--wa-danger-bg);--mc-amber:var(--wa-warning);--mc-amber-bg:var(--wa-warning-bg);
 background:var(--wa-canvas)!important;
}
html.crm-premium-trial[data-theme=light] body :is(.shell,.page,.workspace-scroll,.call-mode,.call-main,.doc-studio){background:var(--wa-canvas)!important;color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body :is(.sidebar,.topbar){background:var(--wa-chrome)!important;border-color:var(--wa-line)!important;color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body .sidebar .nav-item{
 background:transparent!important;color:var(--wa-muted)!important;border-color:transparent!important;border-radius:12px;box-shadow:none!important;
}
html.crm-premium-trial[data-theme=light] body .sidebar .nav-item:hover{background:var(--wa-soft)!important;color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body .sidebar .nav-item.active{background:var(--wa-selected)!important;color:var(--wa-accent)!important;box-shadow:none!important;font-weight:var(--fw-s,600)}
html.crm-premium-trial[data-theme=light] body :is(.nav-label,.breadcrumb,.today-summary,.calendar-week,.queue-sub){color:var(--wa-muted)!important}
html.crm-premium-trial[data-theme=light] body :is(.avatar,.mc-avatar){border-radius:50%!important;background:var(--wa-selected);color:var(--wa-accent);border-color:var(--wa-line)}
html.crm-premium-trial[data-theme=light] body :is(.client-header,.mc-detail-head){background:var(--wa-chrome)!important;border-color:var(--wa-line)!important;box-shadow:none!important;border-radius:12px}
html.crm-premium-trial[data-theme=light] body :is(.card,.panel,.queue-panel,.mc-list,.mc-detail,.call-left,.call-identity,.focus-step,.own-intro,.client-topic){background:var(--wa-panel)!important;border-color:var(--wa-line)!important;box-shadow:none!important;border-radius:12px}
html.crm-premium-trial[data-theme=light] body :is(.card-head,.panel-head,.client-topic-head,.focus-step-head,.call-top,.call-footer,.modal-foot,.audit-progress-head,.doc-index){background:var(--wa-chrome)!important;border-color:var(--wa-line)!important;color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body .client-topic>summary{border-radius:0;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body .client-topic>summary:hover{background:var(--wa-section-hover)!important}
html.crm-premium-trial[data-theme=light] body .client-topic-body{background:var(--wa-panel);color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body .client-card-layout{gap:16px}
html.crm-premium-trial[data-theme=light] body :is(.client-name,.mc-detail-title h2,.card-head h2,.panel-head h2){color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body .client-contact a{color:var(--wa-accent)!important}
html.crm-premium-trial[data-theme=light] body :is(.call-fact strong,.call-person h2){color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body :is(.call-fact span,.call-person p,.call-left-label,.call-left-phone,.call-note-help,.focus-count,.doc-index-label){color:var(--wa-muted)!important}
html.crm-premium-trial[data-theme=light] body .doc-nav-item{background:transparent!important;color:var(--wa-muted)!important}
html.crm-premium-trial[data-theme=light] body .doc-nav-item.active{background:var(--wa-selected)!important;color:var(--wa-accent)!important;border-color:var(--wa-line)!important}
/* Rounded tools like chat controls, with a restrained filled action tone. */
html.crm-premium-trial[data-theme=light] body :is(button.btn,button.mc-btn,.client-card-button,.prep-tool,button.confirm-btn){border-radius:14px!important;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(.top-actions button.btn,.page-head button.btn,.mc-primary-actions .mc-btn){border-radius:20px!important}
html.crm-premium-trial[data-theme=light] body :is(button.btn-green,button.btn-blue,button.mc-btn.primary){
 background:var(--wa-action)!important;border-color:var(--wa-action-line)!important;color:var(--wa-action-ink)!important;
}
html.crm-premium-trial[data-theme=light] body :is(button.btn-green,button.btn-blue,button.mc-btn.primary):hover:not(:disabled){background:var(--wa-hover)!important;border-color:var(--wa-action-line)!important}
/* Green is a calling affordance, not the generic action colour. */
html.crm-premium-trial[data-theme=light] body :is(#startCall,#startMeet,#ownDial:not(.crm-hangup-icon),#mxPhone,button[data-mc=call],button[data-mc=continue],button[data-mc=quick-start]):not(:disabled):not([aria-disabled=true]){background:var(--wa-call-bg)!important;border-color:var(--wa-call-line)!important;color:var(--wa-call-ink)!important}
html.crm-premium-trial[data-theme=light] body :is(#startCall,#startMeet,#ownDial:not(.crm-hangup-icon),#mxPhone,button[data-mc=call],button[data-mc=continue],button[data-mc=quick-start]):hover:not(:disabled):not([aria-disabled=true]){background:var(--wa-call-hover)!important;border-color:#a3c9b5!important}
html.crm-premium-trial[data-theme=light] body #bpxsMessenger button.mx-send{background:var(--wa-action)!important;border-color:var(--wa-action-line)!important;color:var(--wa-action-ink)!important}
html.crm-premium-trial[data-theme=light] body #bpxsMessenger button.mx-send:hover:not(:disabled){background:var(--wa-hover)!important}
html.crm-premium-trial[data-theme=light] body :is(:is(.flow-step,.nf-stage-button),.queue-tab,.mc-filter,.work-tab){background:transparent!important;color:var(--wa-muted)!important;border-color:transparent!important;border-radius:18px!important;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(:is(.flow-step.active,.nf-stage-button.active),.queue-tab.active,.mc-filter[aria-pressed=true],.work-tab[aria-selected=true]){background:var(--wa-selected)!important;color:var(--wa-accent)!important;border-color:transparent!important;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(.flow-step.active,.nf-stage-button.active) .step-num{background:var(--wa-action);color:var(--wa-accent);border-color:var(--wa-action-line)}
html.crm-premium-trial[data-theme=light] body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:var(--wa-soft);color:var(--wa-ink);border-color:var(--wa-line);border-radius:12px!important;font-family:inherit}
html.crm-premium-trial[data-theme=light] body :is(.search input,#mcSearch,#mxSearch){background:var(--wa-soft)!important;border:1px solid var(--wa-line)!important;border-radius:22px!important;box-shadow:none!important;color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body :is(input,textarea)::placeholder{color:var(--wa-muted);opacity:.85}
html.crm-premium-trial[data-theme=light] body :is(input[type=checkbox],input[type=radio]){accent-color:#21735b}
html.crm-premium-trial[data-theme=light] body :is(button,input,select,textarea,summary):focus-visible{outline:2px solid var(--wa-accent)!important;outline-offset:3px;box-shadow:none!important}
/* Calendar cells remain recognisable as free, selected, occupied or past. */
html.crm-premium-trial[data-theme=light] body :is(.queue-calendar,.availability){background:var(--wa-panel)!important;border-color:var(--wa-line)!important}
html.crm-premium-trial[data-theme=light] body .availability h4{background:var(--wa-chrome)!important;color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body .availability-slot:not(:disabled){background:var(--wa-selected)!important;color:var(--wa-action-ink)!important;border-color:var(--wa-line)!important}
html.crm-premium-trial[data-theme=light] body :is(.availability-slot.selected,.calendar-day.selected,.ws-days button.selected,.ws-slots button.selected){background:#365e7d!important;border-color:#365e7d!important;color:#fff!important;box-shadow:none!important;border-radius:9px}
html.crm-premium-trial[data-theme=light] body .calendar-day.has-calls:not(.selected){background:var(--wa-selected)!important;color:var(--wa-accent)!important;border-color:var(--wa-line)!important}
html.crm-premium-trial[data-theme=light] body .calendar-day.has-calls::after{background:var(--wa-accent)!important}
html.crm-premium-trial[data-theme=light] body .calendar-day.selected::after{background:#fff!important}
html.crm-premium-trial[data-theme=light] body .queue-item{border-radius:10px;color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body .queue-item:hover{background:var(--wa-soft)!important}
html.crm-premium-trial[data-theme=light] body .queue-item.active{background:var(--wa-selected)!important;border-color:var(--wa-line)!important;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(.queue-name,.queue-time strong){color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body :is(.queue-reason,.queue-time,.queue-group-label){color:var(--wa-muted)!important}
html.crm-premium-trial[data-theme=light] body :is(.availability-slot:disabled,.ws-slots button:disabled){background:var(--wa-soft)!important;border-color:var(--wa-line)!important;color:var(--wa-muted)!important;opacity:.5}
/* Native dialogs inherit the same application chrome; document paper stays paper. */
html.crm-premium-trial[data-theme=light] body :is(dialog:not(#bpxsMessenger),.modal){background:var(--wa-panel);color:var(--wa-ink);border-color:var(--wa-line);border-radius:16px}
html.crm-premium-trial[data-theme=light] body :is(.modal-head,.doc-toolbar,.doc-note-row){background:var(--wa-chrome)!important;border-color:var(--wa-line)!important;color:var(--wa-ink)}
html.crm-premium-trial[data-theme=light] body .prep-tool .tool-icon{background:var(--wa-selected)!important;color:var(--wa-accent)!important;border-radius:50%}
/* Section chrome is distinct from white content, without looking like a primary action. */
html.crm-premium-trial[data-theme=light] body :is(.card-head,.panel-head,.client-topic-head,#clientPersistentWorkbench .work-tabs-bar){background:var(--wa-section)!important;border-color:var(--wa-line)!important;color:var(--wa-ink)!important}
html.crm-premium-trial[data-theme=light] body #myClients .mc-filter{background:#f8fafc!important;color:#43596b!important;border:1px solid #ccd7e0!important;font-weight:var(--fw-s,600)}
html.crm-premium-trial[data-theme=light] body #myClients .mc-filter:hover{background:var(--wa-section-hover)!important}
html.crm-premium-trial[data-theme=light] body #myClients .mc-filter:is([aria-pressed=true],[aria-expanded=true]){background:#dce9f3!important;border-color:#a7bdcf!important;color:#294d68!important}
/* Outrank the legacy :not(.completed) pink training rule; keep the same fill as the cheat sheet. */
html.crm-premium-trial[data-theme=light] body .prep-tools button#openVoiceTraining:not(:disabled){background:var(--wa-action)!important;border:1px solid #63c792!important;color:var(--wa-action-ink)!important}
html.crm-premium-trial[data-theme=light] body .prep-tools button#openVoiceTraining:hover:not(:disabled){background:var(--wa-hover)!important;border-color:#39ae72!important}
html.crm-premium-trial[data-theme=light] body .prep-tools #openVoiceTraining strong{color:var(--wa-action-ink)!important}
html.crm-premium-trial[data-theme=light] body #openVoiceTraining .tool-icon.purple{background:#edf8f1!important;color:#24714e!important}
html.crm-premium-trial[data-theme=light] body :is(.paper-note-saved,.mc-note){background:var(--wa-note)!important;color:var(--wa-note-ink)!important;border-color:color-mix(in srgb,var(--wa-note-ink) 25%,var(--wa-line))!important}
/* Semantic exceptions win over general action styling. */
html.crm-premium-trial[data-theme=light] body :is(button:disabled,button[aria-disabled=true]){background:var(--wa-soft)!important;color:var(--wa-muted)!important;border-color:var(--wa-line)!important;opacity:.55;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(#startCall,#ownDial,button.btn-green,button.btn-blue,button.mc-btn.primary):is(:disabled,[aria-disabled=true]){background:var(--wa-soft)!important;color:var(--wa-muted)!important;border-color:var(--wa-line)!important;box-shadow:none!important}
html.crm-premium-trial[data-theme=light] body :is(.client-fact-status.is-missing,.mc-status.red,.mc-error,.mc-alerts-box,.mc-strip.blocked,.mc-wait.late){background:var(--wa-danger-bg)!important;color:var(--wa-danger)!important;border-color:color-mix(in srgb,var(--wa-danger) 40%,var(--wa-line))!important}
html.crm-premium-trial[data-theme=light] body :is(button.btn-danger,button.end-call,button.office-end,button.crm-hangup-icon,button[data-mc=end-call],#finishCallMain,#endCall,#meetEnd,button.mc-btn.urgent){background:var(--wa-danger-bg)!important;color:var(--wa-danger)!important;border-color:var(--wa-danger)!important}
html.crm-premium-trial[data-theme=light] body .client-topic.topic-now.has-attention:not([open])>summary{background:var(--wa-danger-bg)!important;color:var(--wa-danger)!important;box-shadow:inset 3px 0 var(--wa-danger)!important}
html.crm-premium-trial[data-theme=light] body [data-batch-toggle=priority][aria-pressed=true]{background:var(--wa-danger-bg)!important;color:var(--wa-danger)!important;border-color:var(--wa-danger)!important}
html.crm-premium-trial[data-theme=light] body :is(.client-next.is-pending,.client-pending-note){background:var(--wa-selected)!important;color:var(--wa-action-ink)!important}
html.crm-premium-trial[data-theme=light] body :is(.mc-status.amber,.waiting-badge){background:var(--wa-warning-bg)!important;color:var(--wa-warning)!important}
@media(prefers-reduced-motion:reduce){html.crm-premium-trial[data-theme=light] body :is(button,.nav-item,summary){transition:none!important}}
/* Keep the notification glyph legible independently of unread/seen colours. */
html[data-theme=light] body .topbar #urgentCrmBell{
  color:#263d48!important;
  background:#eaf0f3!important;
  border:1px solid #bac9d0!important;
}
html[data-theme=light] body .topbar #urgentCrmBell:hover{
  background:#dce7ec!important;
}
html[data-theme=light] body .topbar #urgentCrmBell.message-attention:not(.attention-seen){
  background:#fce8ec!important;
  border-color:#d99aa5!important;
}
html[data-theme=light] body .topbar #urgentCrmBell .icon,
html[data-theme=light] body .topbar #urgentCrmBell .icon use{
  color:#263d48!important;
  stroke:#263d48!important;
  fill:none!important;
  opacity:1!important;
}
html[data-theme=light] body .topbar #urgentCrmBell .icon{
  width:21px;
  height:21px;
  stroke-width:1.8;
}
/* Appointment first; the shared process stage is quiet secondary metadata. */
#queueList .queue-item.queue-with-stage{grid-template-columns:78px minmax(0,1fr) 25px;gap:7px}
#queueList .queue-with-stage .queue-time{min-width:0;font-size:var(--fs-lg,14px);line-height:1.3}
#queueList .queue-with-stage .queue-time strong{font-size:var(--fs-lg,14px);line-height:1.3;font-variant-numeric:tabular-nums}
#queueList .queue-time .queue-stage-label{display:block;margin-top:4px;font-size:var(--fs-sm,12.5px);font-weight:var(--fw-n,400);line-height:1.3;white-space:nowrap;color:var(--wa-muted,var(--muted,#92999d))}
html[data-theme=light] body .topbar #urgentCrmBell::after{
  background:#ba263b!important;
  color:#fff!important;
  border:2px solid #fff!important;
}
