/* One status palette across the platform. Only elements resolved as states opt in. */
html body [data-msjd-status-tone="pending"]{--msjd-state-ink:#855005;--msjd-state-bg:#fff4dd;--msjd-state-line:#e4c483;--msjd-state-icon:"○";--msjd-state-bar:#b67b20}
html body [data-msjd-status-tone="running"]{--msjd-state-ink:#1d5596;--msjd-state-bg:#eaf2ff;--msjd-state-line:#aec7e9;--msjd-state-icon:"↻";--msjd-state-bar:#3975bc}
html body [data-msjd-status-tone="success"]{--msjd-state-ink:#166443;--msjd-state-bg:#eaf6ef;--msjd-state-line:#a8d4bb;--msjd-state-icon:"✓";--msjd-state-bar:#2d825b}
html body [data-msjd-status-tone="danger"]{--msjd-state-ink:#a32d36;--msjd-state-bg:#fff0f0;--msjd-state-line:#e7b4b8;--msjd-state-icon:"!";--msjd-state-bar:#c25159}
html body [data-msjd-status-tone="review"]{--msjd-state-ink:#6943a1;--msjd-state-bg:#f4edff;--msjd-state-line:#cdbbe8;--msjd-state-icon:"?";--msjd-state-bar:#8a66ba}
html body [data-msjd-status-tone="neutral"]{--msjd-state-ink:#586270;--msjd-state-bg:#f0f2f5;--msjd-state-line:#cdd3db;--msjd-state-icon:"–";--msjd-state-bar:#8994a3}
/* Compact labels stay in normal flow; constrained labels use ellipsis instead of covering adjacent content. */
html body [data-msjd-status-kind="badge"]{display:inline-block!important;position:static!important;inset:auto!important;float:none!important;transform:none!important;z-index:auto!important;flex:0 0 auto!important;align-self:center!important;min-width:0!important;width:max-content!important;max-width:100%!important;min-height:20px!important;height:20px!important;max-height:20px!important;padding:1px 5px!important;border:1px solid var(--msjd-state-line)!important;border-radius:4px;background:var(--msjd-state-bg)!important;color:var(--msjd-state-ink)!important;font-size:12px!important;font-weight:600;font-style:normal;line-height:16px!important;letter-spacing:0;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important;word-break:normal!important;vertical-align:middle;box-sizing:border-box!important;text-align:left}
html body [data-msjd-status-kind="badge"]::before{content:none!important;display:none!important}
/* Headings can move a label to the next line without placing it over titles or actions. */
html body :is(.task-hub-card-heading,.marketing-queue-job-head,.daily-refresh-stage-heading,.st-compact-heading,.si-notice-heading,.mp-role-heading){flex-wrap:wrap;gap:6px}
html body [data-msjd-status-kind="surface"]{color:var(--msjd-state-ink)!important;background:var(--msjd-state-bg)!important;border-color:var(--msjd-state-line)!important;overflow-wrap:anywhere}
html body [data-msjd-status-kind="field"]{color:var(--msjd-state-ink)!important}
html body [data-msjd-status-tone] :is(.store-analysis-status-dot,.health-indicator){background:var(--msjd-state-bar)!important}
html body .health-state[data-msjd-status-tone]{padding:4px 9px;border:1px solid var(--msjd-state-line);border-radius:6px}
/* Data-screen keeps its dark surface while sharing the same state meanings. */
html[data-screen-state] body [data-msjd-status-tone="pending"]{--msjd-state-ink:#f3cf87;--msjd-state-bg:#332a18;--msjd-state-line:#6d5730}
html[data-screen-state] body [data-msjd-status-tone="running"]{--msjd-state-ink:#a9ccff;--msjd-state-bg:#172d45;--msjd-state-line:#3d6289}
html[data-screen-state] body [data-msjd-status-tone="success"]{--msjd-state-ink:#98dfba;--msjd-state-bg:#173527;--msjd-state-line:#3b7454}
html[data-screen-state] body [data-msjd-status-tone="danger"]{--msjd-state-ink:#ffb8bf;--msjd-state-bg:#421f27;--msjd-state-line:#8b4a54}
html[data-screen-state] body [data-msjd-status-tone="review"]{--msjd-state-ink:#d3bbff;--msjd-state-bg:#302343;--msjd-state-line:#6e5294}
html[data-screen-state] body [data-msjd-status-tone="neutral"]{--msjd-state-ink:#c8d0da;--msjd-state-bg:#252e38;--msjd-state-line:#536170}
@media(max-width:650px){
 html body [data-msjd-status-kind="badge"]{min-height:20px;padding:1px 5px;line-height:16px}
 html body :is(.task-hub-card-heading,.marketing-queue-job-head){flex-wrap:wrap;gap:7px}
 html body .daily-refresh-stage-heading>[data-msjd-status-kind="badge"]{max-width:100%}
}

html body .daily-refresh-stage:has([data-msjd-status-tone="pending"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="pending"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="pending"])>.marketing-queue-job-status{background:#b67b20!important}

html body .daily-refresh-stage:has([data-msjd-status-tone="running"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="running"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="running"])>.marketing-queue-job-status{background:#3975bc!important}

html body .daily-refresh-stage:has([data-msjd-status-tone="success"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="success"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="success"])>.marketing-queue-job-status{background:#2d825b!important}

html body .daily-refresh-stage:has([data-msjd-status-tone="danger"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="danger"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="danger"])>.marketing-queue-job-status{background:#c25159!important}

html body .daily-refresh-stage:has([data-msjd-status-tone="review"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="review"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="review"])>.marketing-queue-job-status{background:#8a66ba!important}

html body .daily-refresh-stage:has([data-msjd-status-tone="neutral"]) .daily-refresh-stage-bar>span,html body .daily-refresh-table:has([data-msjd-status-tone="neutral"])>i,html body .marketing-queue-job:has(.marketing-queue-status[data-msjd-status-tone="neutral"])>.marketing-queue-job-status{background:#8994a3!important}

/* Keep short states readable beside long task/product titles, including mobile review headers. */
html body .task-work-head{flex-wrap:wrap}
html body .task-work-head>strong{flex:1 1 180px}
html body .mp .mp-toolbar:has(>[data-msjd-status-kind="badge"]){flex-wrap:wrap;align-items:flex-start}
html body .mp .mp-toolbar:has(>[data-msjd-status-kind="badge"])>div:first-child{min-width:0;flex:1 1 200px}
html body .mp .mp-toolbar:has(>[data-msjd-status-kind="badge"]) h2{overflow-wrap:anywhere}
html body :is(.task-work-head,.mp-toolbar,.si-notice-heading,.st-compact-heading)>[data-msjd-status-kind="badge"]{align-self:flex-start!important}
