/* Impeccable Operate refinement. Existing product colors, handlers and roles remain authoritative. */
:root{--polish-ink:#29243a;--polish-muted:#6e657d;--polish-line:#e5dfed;--polish-brand:#7041df;--polish-soft:#f2ecfb;--polish-radius:10px}
/* Audit 4: readable navigation labels, not a clipped text fragment. */
body #app .shell.design-workspace .workspace-sidebar .tab{min-height:44px!important;height:auto!important;overflow:visible!important;white-space:normal!important}
body #app .shell.design-workspace .workspace-sidebar .tab>span{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;text-overflow:clip!important;line-height:1.35!important}
body #app .shell.design-workspace .workspace-sidebar .tab>svg{flex-shrink:0}
/* Audit 50: one primary-button treatment; disabled states and danger/call controls stay distinct. */
body #app .shell.design-workspace button.primary:not(.danger):not(.call),body #app .shell.design-workspace .primary:not(.danger):not(.call){background:var(--polish-brand)!important;background-image:none!important;color:#fff!important;border:1px solid var(--polish-brand)!important;border-radius:var(--polish-radius)!important;box-shadow:none!important;font-weight:600!important}
body #app .shell.design-workspace button.primary:hover:not(:disabled){background:#5e32c6!important;border-color:#5e32c6!important}
body #app .shell.design-workspace button.primary:disabled{background:#e9e4f0!important;border-color:#e9e4f0!important;color:#756a83!important;opacity:1!important;cursor:not-allowed!important}
body #app button:focus-visible,body #app summary:focus-visible{outline:2px solid var(--polish-brand);outline-offset:3px}
/* 5: floating actions do not cover sidebar navigation. */
body #app .design-workspace #quick-phone{left:auto!important;right:22px!important;bottom:76px!important}
@media(max-width:760px){body #app .design-workspace #quick-phone{right:14px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important}}
/* 6: currency remains whole at the smallest company-card width. */
body #app .company-card-metrics{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
body #app .company-card-metrics>div{min-width:0!important;border:0!important;padding:0!important;display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:12px!important}
body #app .company-card-metrics b{font-size:16px!important;font-variant-numeric:tabular-nums!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;min-width:0!important;text-align:right!important}
/* 7: reserve predictable heading/company space, without hiding long text. */
body #app .ps-projects .ps-card h2{min-height:2.8em!important;margin-bottom:10px!important;font-size:18px!important;line-height:1.4!important}
body #app .ps-projects .ps-card>p{min-height:3.2em!important;margin:12px 0!important}
body #app .ps-projects .ps-eyebrow{display:none!important}
/* 8: timetable, not decorative metrics, owns the first viewport. */
body #app .ws-schedule .wf-head{margin:0 0 12px!important}
body #app .ws-schedule .wf-head h1{margin:0 0 5px!important}
body #app .ws-schedule>.wf-toolbar{padding:9px 14px!important;margin-bottom:10px!important;min-height:52px!important}
body #app .ws-schedule>.wf-switch{margin-bottom:10px!important}
body #app .ws-schedule .wf-summary{gap:10px!important;margin:0 0 12px!important}
body #app .ws-schedule .wf-summary>div{padding:10px 14px!important;min-height:0!important;border-radius:10px!important}
body #app .ws-schedule .wf-summary b{font-size:22px!important;margin:4px 0!important}
body #app .ws-schedule .wf-summary small,body #app .ws-schedule .wf-summary span{font-size:12px!important;line-height:1.4!important}
body #app .ws-schedule .ws-planner-heading{margin-bottom:10px!important}
/* 10: a single initial state before selecting a knowledge-base company. */
body #app .okb-awaiting-company .okb-tree{display:none!important}
body #app .okb-awaiting-company .okb-workspace{display:block!important}
body #app .okb-awaiting-company .okb-article{max-width:760px;margin:auto}
body #app .okb-awaiting-company .okb-welcome{padding:30px 24px!important}
/* 11–15: one scroll region, compact selection, explicit empty/selection state, dates first. */
body .studio-filter-shade{overflow:hidden!important}
body .studio-filter-panel .studio-choice-list{max-height:none!important;overflow:visible!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px!important;padding:5px 8px!important}
body .studio-filter-panel .studio-choice-list label{min-height:36px!important;height:auto!important;padding:7px 2px!important;gap:8px!important;margin:0!important;align-items:center!important;line-height:1.35!important}
body .studio-filter-panel .studio-choice-list label[hidden]{display:none!important}
body .studio-filter-panel .studio-choice-list input[type=checkbox]{height:16px!important;min-height:16px!important;width:16px!important;min-width:16px!important;margin:0!important;padding:0!important;flex:0 0 16px!important}
body .studio-filter-panel .studio-choice-list label span{overflow-wrap:anywhere;min-width:0}
body .studio-filter-panel [data-studio-selected]{display:inline;color:#70647c;font-size:11px;margin-left:8px;font-weight:400}
body .studio-filter-panel .studio-search-empty{color:#6e657d;background:#f7f4fb;border-radius:8px;padding:12px;font-size:13px}
body .studio-filter-panel .studio-search-empty[hidden]{display:none!important}
body .studio-filter-panel .studio-period-field{padding-bottom:16px;border-bottom:1px solid var(--polish-line)}
@media(max-width:420px){body .studio-filter-panel .studio-choice-list{grid-template-columns:minmax(0,1fr)}}
/* 17–20: shared icon and side-panel vocabulary. */
body #app .shell.design-workspace.reference-crm-shell .approved-crm.crm-filter-studio .crm-reference-presentation-trigger:after{content:none!important;display:none!important}
body #app .shell.design-workspace.reference-crm-shell .approved-crm.crm-filter-studio .crm-reference-presentation-trigger svg{display:block!important;width:18px!important;height:18px!important}
body .crm-reference-presentation-shade{position:fixed!important;inset:0!important;padding:0!important;display:flex!important;align-items:stretch!important;justify-content:flex-end!important;background:#21163335!important;backdrop-filter:blur(2px)!important;overflow:hidden!important}
body .crm-reference-presentation-panel{position:relative!important;inset:auto!important;transform:none!important;width:460px!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;display:flex!important;flex-direction:column!important;box-shadow:-10px 0 50px #301b4420!important}
body .crm-reference-presentation-panel>header{padding:24px!important;flex-shrink:0!important;border-bottom:1px solid var(--polish-line)}
body .crm-reference-presentation-panel>header h2{font-size:23px!important;margin:0!important}
body .crm-reference-presentation-body{flex:1!important;min-height:0!important;overflow:auto!important;padding:22px 24px!important}
body .crm-reference-presentation-panel>footer{padding:16px 24px calc(16px + env(safe-area-inset-bottom))!important;display:flex!important;gap:8px!important;flex-shrink:0!important;border-top:1px solid var(--polish-line)}
body .crm-reference-presentation-panel>footer button{padding:10px 12px!important;min-height:42px!important;border-radius:9px!important}
body .crm-reference-presentation-panel>footer .primary{flex:1!important;background:var(--polish-brand)!important;background-image:none!important;box-shadow:none!important;color:white!important}
@media(max-width:760px){body .crm-reference-presentation-panel{width:100%!important}}
/* 21–25: explicit row navigation and task-centred contact hierarchy. */
body #app .crm-open-contact-label{cursor:pointer;text-decoration:underline;text-decoration-color:#cab9e7;text-underline-offset:3px}
body #app .crm-open-contact-label:hover,body #app .crm-open-contact-label:focus-visible{color:#5e32c6!important;text-decoration-color:currentColor;outline-offset:3px}
body .approved-crm-contact .crm-preview-phone-row,body .approved-crm-contact .crm-preview-phone-row button{font-size:16px!important;font-weight:600!important;color:#4f396c!important;font-variant-numeric:tabular-nums}
body .approved-crm-contact .crm-preview-identity h2{font-size:27px!important;letter-spacing:-.02em!important;line-height:1.3!important}
body .approved-crm-contact .crm-contact-schema-settings{background:#fff!important;border:1px solid var(--polish-line)!important;color:#6e657d!important;box-shadow:none!important}
body .approved-crm-contact [data-approved-task]{background:var(--polish-brand)!important;background-image:none!important;color:white!important;border:1px solid var(--polish-brand)!important;min-height:42px!important;border-radius:10px!important;font-weight:600!important;box-shadow:none!important}
body .approved-crm-contact .approved-crm-activity{min-height:0!important;align-self:start!important}
body .approved-crm-contact .approved-crm-contact-grid{align-items:start!important}

/* 26–30: secondary details are available on demand; actions remain legible. */
body .approved-crm-contact .approved-contact-technical summary{font-size:13px;color:#5e4779;cursor:pointer;padding:10px 0;min-height:38px}
body .approved-crm-contact .approved-contact-technical dd{overflow-wrap:anywhere}
body .approved-crm-contact .approved-section-edit{font-size:13px!important;color:#5e32c6!important;background:#f2ecfb!important;border:1px solid #d7c9ee!important;border-radius:8px!important;min-height:36px!important;padding:7px 10px!important;opacity:1!important}
body .approved-crm-contact #crm-preview-prev:not(:disabled),body .approved-crm-contact #crm-preview-next:not(:disabled){color:#4f2c8d!important;background:#f2ecfb!important;border:1px solid #cdbde6!important;opacity:1!important;min-width:40px;min-height:40px}
body .approved-crm-contact #crm-preview-prev:disabled,body .approved-crm-contact #crm-preview-next:disabled{color:#9d94a7!important;background:#f4f1f6!important;border:1px solid #e8e3ed!important;opacity:.6!important;cursor:not-allowed!important}
body #app .referral-link-cell{min-width:0!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important}
body #app .referral-link-cell input{width:100%!important;min-width:0!important;flex:1 1 100%!important}
body #app .referral-link-path{display:block!important;flex:1 1 100%!important;overflow-wrap:anywhere!important;color:#554268!important;font-size:12px!important}

/* 31–35: readable referral counts and explicitly chosen recipients. */
body #app .referral-visits{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#61536f;font-variant-numeric:tabular-nums}
body #app .referral-visits span{white-space:nowrap}
body #app .referral-visits b{display:inline;font-size:15px;color:#29243a}
body #referral-form select{min-height:44px}
body #app .crm-rights-project{min-width:0!important;max-width:100%!important}
body #app .crm-rights-project select{max-width:100%!important}

/* 36–40: clear action scope and semantic integration state. */
body #app .crm-rights-actions{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:16px!important}
body #app .crm-rights-project-action{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
body #app .crm-rights-actions button{width:auto!important;max-width:100%!important;min-height:44px!important;white-space:normal!important;line-height:1.4!important;padding:12px 18px!important}
body #app .crm-rights-global-action{padding-top:16px;border-top:1px solid var(--polish-line)}
body #app .crm-rights-global-action summary{cursor:pointer;color:#5f5070;min-height:36px}
body #app .crm-rights-global-action p,body #app .crm-rights-project-action small{color:#6e657d;font-size:13px}
body #app .ws-provider-status.is-active,body #app .ig-badge.is-active{background:#e5f5ee!important;color:#196343!important;border:1px solid #b0dac5!important}
body #app .ws-provider-status.is-off,body #app .ig-badge.is-off{background:#f0edf3!important;color:#62566f!important;border:1px solid #ded7e5!important}
body #app .ws-provider-status.is-paused,body #app .ig-badge.is-paused{background:#fff3db!important;color:#7b5314!important;border:1px solid #ead09b!important}
body #app .ws-provider-status.is-attention,body #app .ig-badge.is-attention{background:#fff0ed!important;color:#963c2e!important;border:1px solid #eac6bf!important}
body #app .ws-provider-header .ig-logo{width:48px!important;height:48px!important;flex:0 0 48px!important;display:grid!important;place-items:center!important;border-radius:10px!important;font-size:15px!important;font-weight:700!important;line-height:1!important}
body #app .ws-provider-header .ig-logo.amet{background:#edf0fb!important;color:#344984!important;border:1px solid #d9dfef!important}

/* 41–45: company context precedes configuration; project terms stay consistent. */
body #app .ig-company-context{display:flex;gap:8px 12px;align-items:center;flex-wrap:wrap;font-size:14px!important;color:#5f5070!important;margin:12px 0 0!important}
body #app .ig-company-context strong{color:#29243a;font-weight:650;overflow-wrap:anywhere}
body #app .ig-company-context button{font-size:13px;min-height:36px;padding:7px 12px}
body #app .ig-home-help{font-size:14px;color:#6e657d;line-height:1.5;margin:0 0 18px!important;max-width:70ch}
body #app .ws-integrations .ig-heading{margin-bottom:18px!important}

/* 1,46–49: consistent shell, accessible table actions and unobtrusive notices. */
body #app .project-base-table{overflow:auto!important;max-width:100%!important}
body #app .project-base-table table{width:100%!important;min-width:760px!important;table-layout:auto!important;font-variant-numeric:tabular-nums}
body #app .project-base-table th,body #app .project-base-table td{padding:10px 8px!important;white-space:normal!important}
body #app .project-base-table th:first-child,body #app .project-base-table td:first-child{min-width:130px;max-width:240px;overflow-wrap:anywhere}
body #app .project-base-table th:last-child,body #app .project-base-table td:last-child{position:sticky;right:0;background:#fff!important;z-index:1;min-width:100px;width:100px;box-shadow:-1px 0 0 #e5dfed}
body #app .project-base-actions{display:grid!important;grid-template-columns:repeat(2,36px)!important;gap:4px!important;justify-content:center!important}
body #app .project-base-actions button{width:36px!important;height:36px!important;min-height:36px!important;padding:8px!important}
body .bm-message-notices{width:300px!important;max-width:calc(100vw - 100px)!important;right:82px!important;bottom:18px!important;top:auto!important;max-height:240px!important;overflow:auto!important;pointer-events:none!important;gap:8px!important}
body .bm-message-notice{pointer-events:auto!important;border-radius:12px!important;padding:12px!important;box-shadow:0 6px 24px #29243a1c!important}
body .bm-message-open{padding:0!important;gap:8px!important}
body .bm-message-face{width:30px!important;height:30px!important;flex:0 0 30px!important}
body .bm-message-copy>small{font-size:10px!important}
body .bm-message-copy>strong{font-size:13px!important;padding-right:24px!important}
body .bm-message-preview{font-size:12px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
body .bm-message-link{display:none!important}
body .bm-message-reply-details summary{font-size:12px;color:#5e32c6;cursor:pointer;padding:8px 0;min-height:32px}
body .bm-message-notices:focus-within{max-height:min(65dvh,440px)!important}
body #app .shell.design-workspace .page-head h1,body #app .shell.design-workspace .wf-head h1,body #app .shell.design-workspace .ig-heading h1,body #app .shell.design-workspace .okb-head h1{font-size:28px!important;font-weight:700!important;line-height:1.25!important;letter-spacing:-.02em!important}
@media(max-width:760px){body #app .shell.design-workspace .page-head h1,body #app .shell.design-workspace .wf-head h1,body #app .shell.design-workspace .ig-heading h1,body #app .shell.design-workspace .okb-head h1{font-size:24px!important}body .bm-message-notices{right:70px!important;bottom:16px!important;max-height:180px!important}}
