/* CRM operational meaning: explicit server state codes and named metric roles. */
.erp-body{--crm-tone-info:#245d92;--crm-surface-info:#f0f6fc;--crm-line-info:#c5d9ec;--crm-tone-attention:#865b13;--crm-surface-attention:#fcf7eb;--crm-line-attention:#e6d6b2;--crm-tone-danger:#a43c4e;--crm-surface-danger:#fcf1f3;--crm-line-danger:#e9c8d0;--crm-tone-success:#226f5c;--crm-surface-success:#edf7f2;--crm-line-success:#bedecf;--crm-tone-neutral:#52637a;--crm-surface-neutral:#f7f9fc;--crm-line-neutral:#dce4ee}
.erp-body :is([data-stat-tone],[data-state-tone]){--stat-ink:var(--crm-tone-neutral);--stat-bg:var(--crm-surface-neutral);--stat-line:var(--crm-line-neutral)}
.erp-body :is([data-stat-tone=info],[data-state-tone=info]){--stat-ink:var(--crm-tone-info);--stat-bg:var(--crm-surface-info);--stat-line:var(--crm-line-info)}
.erp-body :is([data-stat-tone=attention],[data-state-tone=attention]){--stat-ink:var(--crm-tone-attention);--stat-bg:var(--crm-surface-attention);--stat-line:var(--crm-line-attention)}
.erp-body :is([data-stat-tone=danger],[data-state-tone=danger]){--stat-ink:var(--crm-tone-danger);--stat-bg:var(--crm-surface-danger);--stat-line:var(--crm-line-danger)}
.erp-body :is([data-stat-tone=success],[data-state-tone=success]){--stat-ink:var(--crm-tone-success);--stat-bg:var(--crm-surface-success);--stat-line:var(--crm-line-success)}
/* Existing, unannotated metrics stay neutral. Values are never interpreted by CSS. */
.erp-body #main-content :is(.metrics>article,.campaign-summary>div){position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:5px 12px;padding:16px 18px;min-height:108px;border:1px solid var(--stat-line,var(--crm-line-neutral));border-radius:13px;background:var(--stat-bg,#fff);background-image:none;box-shadow:none;min-width:0}
.erp-body #main-content .metrics>article::before{content:none}
.erp-body #main-content :is(.metrics>article,.campaign-summary>div)>:is(span,small){grid-column:1;color:var(--stat-ink,var(--crm-tone-neutral));font-size:.8125rem;line-height:1.6;overflow-wrap:anywhere}
.erp-body #main-content :is(.metrics>article>b,.campaign-summary>div>strong){grid-column:1;font-size:1.45rem;line-height:1.35;font-weight:750;color:var(--stat-ink,var(--erp-ink));font-variant-numeric:tabular-nums;white-space:nowrap;overflow-x:auto;min-width:0;max-width:100%}
.erp-body #main-content :is(.metrics>article,.campaign-summary>div)>small{font-size:.72rem}
.erp-body #main-content .crm-stat-icon{grid-column:2;grid-row:1/4;align-self:start;display:grid;place-items:center;width:36px;height:36px;background:#fff;border:1px solid var(--stat-line);border-radius:10px;color:var(--stat-ink);font-size:1rem}
.erp-body #main-content .metrics{background:none;border:0;box-shadow:none;padding:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px}
.erp-body #main-content .campaign-summary{padding:0;border:0;background:none;box-shadow:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
/* Personal task counts are also filters. An explicit selected treatment adds a second cue. */
.erp-body #main-content .task-overview>a{background:var(--stat-bg);border:1px solid var(--stat-line);color:var(--stat-ink);box-shadow:none;border-radius:12px;min-height:76px;gap:12px;transition:background-color .16s,border-color .16s}
.erp-body #main-content .task-overview>a>span{color:inherit;font-size:.8125rem;font-weight:650;display:flex;align-items:center;gap:9px}
.erp-body #main-content .task-overview>a>span>i{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:9px;background:white;color:inherit;border:1px solid var(--stat-line);font-size:.95rem}
.erp-body #main-content .task-overview>a>strong{color:inherit;font-size:1.45rem;font-weight:750;font-variant-numeric:tabular-nums}
.erp-body #main-content .task-overview>a[aria-current]{border-color:var(--stat-ink);outline:1px solid var(--stat-ink);outline-offset:-2px;background:var(--stat-bg)}
.erp-body #main-content .task-overview>a:hover{border-color:var(--stat-ink)}
.erp-body #main-content .task-row.is-overdue{box-shadow:none;background:#fffbfc}
.erp-body #main-content .task-row.is-overdue .task-row__when>time{font-weight:700;color:var(--crm-tone-danger)}
/* Status copy always remains visible; the dot supplements it, never replaces it. */
.erp-body #main-content .crm-state[data-state-tone]{display:inline-flex;align-items:center;gap:6px;color:var(--stat-ink);background:var(--stat-bg);border:1px solid var(--stat-line);border-radius:7px;padding:4px 8px;font-size:.75rem;font-weight:650;line-height:1.45;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.erp-body #main-content .crm-state::before{content:"";width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:currentColor}
/* Linked reports have a distinct directory treatment, while the product shell stays intact. */
.erp-body #main-content .report-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;overflow:visible;border:0;background:none;box-shadow:none}
.erp-body #main-content .report-directory>a{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;gap:8px 15px;min-height:136px;padding:19px 20px;border:1px solid var(--crm-line-neutral);border-radius:14px;background:linear-gradient(115deg,#fff 35%,#f5f9fd);color:#253c55;box-shadow:none;transition:border-color .16s,background-color .16s;text-decoration:none;min-width:0}
.erp-body #main-content .report-directory>a>i{grid-row:1/3;display:grid;align-self:start;place-items:center;width:42px;height:42px;border:1px solid #d1e1f0;background:#edf5fd;border-radius:12px;color:var(--crm-tone-info);font-size:1.15rem}
.erp-body #main-content .report-directory strong{font-size:.95rem;line-height:1.5;font-weight:750;color:#253c55}.erp-body #main-content .report-directory small{font-size:.8rem;line-height:1.7;color:#596c82;overflow-wrap:anywhere}.erp-body #main-content .report-directory em{grid-column:2;font-size:.76rem;color:var(--crm-tone-info);font-weight:650}.erp-body #main-content .report-directory>a:hover{border-color:#88abc9;background:#f6faff}
.erp-body #main-content :is(.task-overview>a,.report-directory>a):focus-visible{outline:3px solid #3977ae;outline-offset:3px}
/* Reading hierarchy for ordinary sections/tables throughout CRM, without repainting inputs or charts. */
.erp-body #main-content .panel:not(.form-panel):not(.task-quick)>header{background-image:none;background-color:#f7fafd}
.erp-body #main-content :is(.responsive-table,.campaign-table) thead th{background:#f4f7fb;color:#53667e;font-weight:700}
.erp-body #main-content :is(.responsive-table,.campaign-table) tbody tr:hover{background:#f8fbfe}
@media(max-width:700px){.erp-body #main-content .campaign-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-body #main-content .report-directory{grid-template-columns:1fr}.erp-body #main-content .report-directory>a{min-height:128px;padding:16px}.erp-body #main-content .task-overview>a{min-height:70px;padding:12px}.erp-body #main-content .task-overview>a>span{font-size:.76rem}.erp-body #main-content .task-overview>a>span>i{flex-basis:25px;height:25px}.erp-body #main-content :is(.metrics>article,.campaign-summary>div){min-height:105px;padding:14px}.erp-body #main-content .crm-stat-icon{width:30px;height:30px}.erp-body #main-content .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.erp-body #main-content .task-overview>a>span>i{display:none}}
@media(prefers-reduced-motion:reduce){.erp-body #main-content :is(.task-overview>a,.report-directory>a){transition:none}}
@media print{.erp-body #main-content :is([data-stat-tone],.report-directory>a,.crm-state){background:#fff!important;box-shadow:none!important;print-color-adjust:exact}}

.erp-body #main-content .service-row--risk td:first-child{box-shadow:none}.erp-body #main-content .service-row--risk{background:#fffbfc}
.erp-body #main-content .report-directory>:is(a)>span{min-width:0}.erp-body #main-content .report-directory :is(strong,small){display:block}
