@layer crm-actions {
/* One action vocabulary, all CRM roles. Late layer; no workflow or permission changes. */
html body{
 /* 30.10 (Dawid: „Wdrażaj wszystkie zmiany…”, spójność UI p. 2–3) */--crm-action-radius:10px;--crm-action-focus:var(--crm-field-focus,#a4b6c9);
 --crm-action-danger-bg:#482a30;--crm-action-danger-ink:#ffdce0;--crm-action-danger-line:#ba6472;
}
html[data-theme=light] body{--crm-action-danger-bg:#fbe7e9;--crm-action-danger-ink:#922c3e;--crm-action-danger-line:#d79aa4}
/* Identical semantics in embedded knowledge and Academy views. */
html:not(.crm-premium-trial) body{--crm-ready-bg:#f7deb4;--crm-ready-ink:#754609;--crm-ready-line:#E5A83D;--crm-sign-bg:#315f91;--crm-sign-ink:#fff;--crm-sign-line:#527eaf;--crm-confirm-bg:#dff0e5;--crm-confirm-ink:#215b40;--crm-confirm-line:#2FBF87;--crm-review-line:#E5A83D;--crm-review-surface:#fff3df;--crm-action-focus:#55789d;--crm-action-danger-bg:#fbe7e9;--crm-action-danger-ink:#922c3e;--crm-action-danger-line:#d79aa4}
html:not(.crm-premium-trial)[data-theme=dark] body{--crm-ready-bg:#E5A83D;--crm-ready-ink:#30210b;--crm-ready-line:#e7b977;--crm-sign-bg:#233e5a;--crm-sign-ink:#d8eaff;--crm-sign-line:#5d83b0;--crm-confirm-bg:#244d3c;--crm-confirm-ink:#cfefdf;--crm-confirm-line:#2FBF87;--crm-review-surface:#392f20;--crm-action-focus:#a4b6c9;--crm-action-danger-bg:#482a30;--crm-action-danger-ink:#ffdce0;--crm-action-danger-line:#ba6472}
/* Preserve small icon buttons, calendar cells, navigation and disclosure geometry. */
html body :is(button.btn,button.mc-btn,button.ops-btn,button.ac-btn,.document-signature-submit,[data-crm-action]:not([data-crm-action=neutral])){
 box-sizing:border-box!important;border-radius:var(--crm-action-radius)!important;
 min-width:0;max-width:100%;line-height:1.4!important;white-space:normal!important;overflow-wrap:anywhere;
 gap:8px;box-shadow:none!important;text-shadow:none!important;transition:background-color .12s,border-color .12s,color .12s!important;
}
html body button:not(.nav-item):hover{transform:none!important;text-shadow:none!important;filter:none!important}
html body :is(button,a.btn,[role=button]):focus-visible{
 outline:2px solid var(--crm-action-focus)!important;outline-offset:-3px!important;box-shadow:none!important;
}
html body [data-crm-action=pending]{
 background:var(--crm-ready-bg)!important;color:var(--crm-ready-ink)!important;border:1px solid var(--crm-ready-line)!important;
 box-shadow:none!important;font-weight:var(--fw-s,600)!important;
}
html body [data-crm-action=signature]{
 background:var(--crm-sign-bg)!important;color:var(--crm-sign-ink)!important;border:1px solid var(--crm-sign-line)!important;box-shadow:none!important;font-weight:var(--fw-s,600)!important;
}
html body :is([data-crm-action=call],[data-crm-action=success]){
 background:var(--crm-confirm-bg)!important;color:var(--crm-confirm-ink)!important;border:1px solid var(--crm-confirm-line)!important;box-shadow:none!important;font-weight:var(--fw-s,600)!important;
}
html body [data-crm-action=contact]{background:transparent!important;color:var(--premium-muted,var(--muted,#8b929b))!important;border-color:transparent!important;box-shadow:none!important}
html body [data-crm-action=danger]{background:var(--crm-action-danger-bg)!important;color:var(--crm-action-danger-ink)!important;border:1px solid var(--crm-action-danger-line)!important;box-shadow:none!important}
html body [data-crm-action]:not([data-crm-action=neutral]):hover:not(:disabled):not([aria-disabled=true]){background-image:linear-gradient(#ffffff0d,#ffffff0d)!important;border-color:currentColor!important}
html body [data-crm-action] :is(svg,small,span){color:inherit}
html body :is(button,a.btn):is(:disabled,[aria-disabled=true]){cursor:not-allowed!important;box-shadow:none!important;transform:none!important}
html body [data-crm-action]:disabled{opacity:.52!important}
html body .calendar-day.blank{visibility:hidden!important;pointer-events:none!important}
/* Focus sits inside controls. Footers reserve space and wrap instead of covering text. */
html body :is(dialog,.overlay) :is(footer,.modal-footer,.dialog-footer,.doc-footer,.ops-form-actions){gap:10px;flex-wrap:wrap;align-items:center}
html body :is(dialog,.overlay) footer{padding-top:14px}
html body [data-crm-notice]:not([data-crm-notice=""]){line-height:1.5;overflow-wrap:anywhere;border-radius:8px;padding:10px 12px;margin:10px 0;border:1px solid var(--premium-line,var(--line));color:var(--text);background:var(--premium-soft,var(--panel))}
html body [data-crm-notice=error]{border-color:var(--crm-action-danger-line)!important;color:var(--crm-action-danger-ink)!important;background:var(--crm-action-danger-bg)!important}
html body [data-crm-notice=pending]{border-color:var(--crm-review-line)!important;color:var(--text)!important;background:var(--crm-review-surface)!important}
html body [data-crm-notice=success]{border-color:var(--crm-confirm-line)!important;color:var(--crm-confirm-ink)!important;background:var(--crm-confirm-bg)!important}
html body :is([role=alert],.ops-error,[data-form-error],#wsError):empty{display:none!important}
@media(prefers-reduced-motion:reduce){html body [data-crm-action]{transition:none!important}}

/* Icon-only contact controls have one neutral presentation, including hover/focus. */
html body :is(button,a)[data-crm-action=contact],
html body :is(button,a)[data-crm-action=contact]:is(:hover,:focus-visible,:active){
 background:transparent!important;background-image:none!important;color:var(--premium-muted,var(--muted,#8b929b))!important;border-color:transparent!important;box-shadow:none!important;
}
html body :is(button,a)[data-crm-action=contact] :is(svg,span,use){color:inherit!important}

html body :is([data-crm-action=optional],[data-crm-action=outline]){
 background:var(--surface2,#292c30)!important;background-image:none!important;color:var(--text,#ddd)!important;border:1px solid var(--border,#666)!important;
}
html body [data-crm-action=outline]{border-color:var(--crm-ready-line)!important}
html body #outcomeForm.refusal-only .modal-body>*:not(#outcomeRoute):not(#contactPolicyOutcome){display:none!important}
html body #outcomeForm.refusal-only #outcomeRoute{background:var(--surface)!important;border:1px solid var(--border)!important;color:var(--text)!important}
html body #outcomeForm.refusal-only .modal-head p{display:none}
html body #outcomeForm.refusal-only #contactPolicyOutcome{background:var(--surface)!important;border:1px solid var(--border)!important}
html body #outcomeForm.refusal-only #contactPolicyOutcome p{display:none}
html body #salesLostHint{display:none!important}
html body .lost-moments{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
html body .lost-moments [aria-pressed=true]{border-color:var(--crm-sign-line)!important;background:var(--crm-sign-bg)!important;color:var(--crm-sign-ink)!important}
html body .service-no-date{display:flex;gap:8px;align-items:center;padding:8px 0}
html body .service-no-date input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;flex:0 0 16px!important;margin:0!important;padding:0!important}
html body #outcomeForm.refusal-only .modal-foot button:not(#saveOutcomeButton):not([data-close]),html body #outcomeForm.refusal-only #outcomeSaveFeedback{display:none!important}
html body #outcomeForm.refusal-only #lostReason{border:1px solid var(--border)!important;outline:none!important;box-shadow:none!important;background:var(--surface2)!important}
html body #outcomeForm.refusal-only #lostReason:focus{border-color:var(--crm-action-focus)!important}
/* 22.10 (Dawid: „nad »Podaj powód« jest pusta przestrzeń — podnieś do góry, wszędzie”): wybór momentu rezygnacji jest schowany we wszystkich podsumowaniach — bez odstępu 22 px i kreski */html body .refusal-reason-heading{margin-top:0!important;padding-top:0;border-top:0;font-size:var(--fs-lg,14px)}
html body .client-refusal-banner{border:1px solid var(--crm-action-danger-line);background:var(--crm-action-danger-bg);color:var(--crm-action-danger-ink);border-radius:8px;padding:14px;margin-bottom:12px}
html body .client-refusal-banner h3{color:inherit;margin:0 0 10px}
html body .client-refusal-banner p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
html body .mc-steps .refused-step{background:var(--crm-action-danger-bg)!important;color:var(--crm-action-danger-ink)!important;border:1px solid var(--crm-action-danger-line)!important;width:auto!important;min-width:32px;padding:5px 10px;border-radius:6px}
}

@layer crm-actions {
html body .flow-step.client-refused-step .step-num{color:var(--crm-action-danger-ink)!important;background:var(--crm-action-danger-bg)!important;border:1px solid var(--crm-action-danger-line)!important}
}

@layer crm-actions {
html body .flow-step.client-refused-step:disabled{opacity:1!important;filter:none!important}
}
/* 04.10.2026 (Dawid): ikona „Wiadomości” w górnym pasku tak samo jasna jak pozostałe ikony — nie szara jak akcja „kontakt”. W tej samej warstwie, bo !important w warstwie wygrywa z niewarstwowym. */
@layer crm-actions{
html body .topbar>.top-actions>#mcGlobalMessages,html body .topbar>.top-actions>#mcGlobalMessages:is(:hover,:focus-visible,:active),html body .topbar>.top-actions>#clientPortalMessages,html body .topbar>.top-actions>#mcGlobalMessages :is(svg,use),html body .topbar>.top-actions>#clientPortalMessages :is(svg,use){color:var(--text,#eef0f4)!important}
}
/* 06.10.2026 18:13 (Dawid): ikona Wiadomości (#globalCrmContacts) w górnym pasku nowej ramy biała jak pozostałe ikony — także po najechaniu */
@layer crm-actions{
html body:is(.ha-on,.aa-on,.rm-on) .topbar>.top-actions>#globalCrmContacts>button[data-crm-action=contact],html body:is(.ha-on,.aa-on,.rm-on) .topbar>.top-actions>#globalCrmContacts>button[data-crm-action=contact]:is(:hover,:focus-visible,:active),html body:is(.ha-on,.aa-on,.rm-on) .topbar>.top-actions>#globalCrmContacts>button[data-crm-action=contact] :is(svg,use){color:var(--text,#eef0f4)!important}
}
