/* ── Campaign UI (plan 2026-09-24 reporting board + campaign page) ─────────────
   Shared by /{sub}/reporting, /campaigns/{id} and the progress bar component.
   One progress vocabulary: delivered · awaiting receipt · undelivered · waiting to send · not sent.
   Blue / orange palette with distinct lightness (colour-blind safe); every state also has a text label. */

:root {
    --color-border:  #E3E6EA;   /* used by ReportingView.razor.css; never defined before */
    --color-surface: #FFFFFF;

    --cx-surface:    #FFFFFF;
    --cx-surface-2:  #F8F9FA;
    --cx-ground:     #F4F5F7;
    --cx-border:     #E3E6EA;
    --cx-border-2:   #EEF0F3;
    --cx-text:       #111827;
    --cx-text-2:     #5B6472;
    --cx-text-3:     #3F4A57;
    --cx-link:       #1F5F8B;
    --cx-link-hover: #123F5E;

    --cx-delivered:  #1F5F8B;
    --cx-awaiting:   #8DBAD9;
    --cx-undelivered:#D9731F;
    --cx-waiting-a:  #AEB8C4;
    --cx-waiting-b:  #E4E9EE;
    --cx-notsent:    #CFCAC1;
    --cx-track:      #EEF1F4;

    --cx-warn-text:  #9A4A0E;
    --cx-warn-bg:    #FCEBDD;
    --cx-rate-warn:  #A34F0F;
    --cx-live-text:  #B42318;
    --cx-live-bg:    #FDECEA;
    --cx-info-text:  #1F5F8B;
    --cx-info-bg:    #E3EEF6;
    --cx-neutral-bg: #EEF1F4;
    --cx-done-bg:    #E5E7EB;

    --cx-radius:     12px;
    --cx-radius-sm:  8px;
}

.cx-num { font-variant-numeric: tabular-nums; }

/* ── Cards ─────────────────────────────────────────────── */
.cx-card {
    background: var(--cx-surface);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 16px 18px;
}
.cx-card-title { margin: 0 0 10px; font-size: .95rem; font-weight: 600; color: var(--cx-text); }
.cx-card-title .cx-muted { font-weight: 400; }
.cx-muted { color: var(--cx-text-2); }
.cx-small { font-size: .78rem; }
.cx-section { margin-bottom: 18px; }
.cx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cx-section-head h2 { margin: 0; font-size: .95rem; font-weight: 600; }
.cx-section-head h2 .cx-muted { font-weight: 400; }

/* ── KPI strip ─────────────────────────────────────────── */
.cx-kpis {
    display: grid;
    grid-template-columns: repeat(var(--cx-kpi-count, 6), minmax(0, 1fr));
    background: var(--cx-surface);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    font-variant-numeric: tabular-nums;
}
.cx-kpis.cx-kpis-flat { border-radius: 10px; border-color: var(--cx-border-2); }
.cx-kpi { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-right: 1px solid var(--cx-border-2); }
.cx-kpi:last-child { border-right: 0; }
.cx-kpi-label { font-size: .75rem; color: var(--cx-text-2); }
.cx-kpi-value { font-size: 1.45rem; font-weight: 600; color: var(--cx-text); line-height: 1.2; }
.cx-kpis-flat .cx-kpi-value { font-size: 1.15rem; }
.cx-kpi-value .cx-kpi-inline { font-size: .8rem; font-weight: 400; color: var(--cx-text-2); margin-left: .35em; }
.cx-kpi-sub { font-size: .75rem; color: var(--cx-text-2); }
.cx-kpi-warn { color: var(--cx-rate-warn); }

/* ── Progress bar ──────────────────────────────────────── */
.cx-bar { display: flex; flex-direction: column; gap: 6px; }
.cx-bar-track { display: flex; overflow: hidden; background: var(--cx-track); border-radius: 999px; height: 12px; }
.cx-bar-sm .cx-bar-track { height: 8px; }
.cx-bar-lg .cx-bar-track { height: 16px; }
.cx-seg { height: 100%; flex: 0 0 auto; }
.cx-seg-delivered   { background: var(--cx-delivered); }
.cx-seg-awaiting    { background: var(--cx-awaiting); }
.cx-seg-undelivered { background: var(--cx-undelivered); }
.cx-seg-notsent     { background: var(--cx-notsent); }
.cx-seg-waiting {
    background: repeating-linear-gradient(135deg, var(--cx-waiting-a) 0 3px, var(--cx-waiting-b) 3px 6px);
    background-size: 8.5px 8.5px;
}
.cx-seg-waiting.cx-seg-moving { animation: cx-march 1.2s linear infinite; }
@keyframes cx-march { from { background-position: 0 0; } to { background-position: 8.5px 0; } }
@media (prefers-reduced-motion: reduce) { .cx-seg-waiting.cx-seg-moving { animation: none; } }

.cx-bar-caption { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--cx-text-3); flex-wrap: wrap; }
.cx-bar-caption strong { color: var(--cx-text); }
.cx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--cx-text-3); }
.cx-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cx-legend-item strong { color: var(--cx-text); }
.cx-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.cx-swatch.cx-seg-waiting { background-size: 6px 6px; }

/* ── Chips and pills ───────────────────────────────────── */
.cx-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .72rem; font-weight: 600; line-height: 1.3;
    border-radius: 5px; padding: 3px 8px; white-space: nowrap;
}
.cx-chip-neutral { color: var(--cx-text-3); background: var(--cx-neutral-bg); }
.cx-chip-active  { color: #FFFFFF; background: var(--cx-delivered); }
.cx-chip-info    { color: var(--cx-info-text); background: var(--cx-info-bg); }
.cx-chip-done    { color: #1F2937; background: var(--cx-done-bg); }
.cx-chip-warn    { color: var(--cx-warn-text); background: var(--cx-warn-bg); }
.cx-chip-live    { color: var(--cx-live-text); background: var(--cx-live-bg); letter-spacing: .04em; font-weight: 700; }
.cx-chip-dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; display: inline-block; }
.cx-chip-active .cx-chip-dot { animation: hub-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cx-chip-active .cx-chip-dot { animation: none; } }

.cx-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-pill {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid #DDE1E6; border-radius: 999px; padding: 5px 12px;
    font-size: .8rem; color: var(--cx-text-3); background: var(--cx-surface);
    text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit;
}
.cx-pill:hover { border-color: var(--cx-link); color: var(--cx-link); text-decoration: none; }
.cx-pill-selected, .cx-pill-selected:hover { background: var(--cx-delivered); border-color: var(--cx-delivered); color: #FFFFFF; font-weight: 600; }
.cx-pill-dark, .cx-pill-dark:hover { background: #1F2937; border-color: #1F2937; color: #FFFFFF; font-weight: 600; }
.cx-pill[disabled] { opacity: .55; cursor: not-allowed; }

/* ── Segmented control ─────────────────────────────────── */
.cx-seg-control { display: inline-flex; background: var(--cx-surface); border: 1px solid #DDE1E6; border-radius: var(--cx-radius-sm); padding: 3px; }
.cx-seg-control button {
    font: inherit; font-size: .8rem; border: 0; border-radius: 6px; padding: 5px 12px;
    background: transparent; color: var(--cx-text-3); cursor: pointer;
}
.cx-seg-control button:hover { color: var(--cx-text); }
.cx-seg-control button.cx-on { background: #1F2937; color: #FFFFFF; font-weight: 600; }
.cx-seg-control.cx-seg-soft button.cx-on { background: var(--cx-info-bg); color: var(--cx-info-text); }
.cx-seg-control button:disabled { opacity: .55; cursor: not-allowed; }

/* ── Tabs ──────────────────────────────────────────────── */
.cx-tabs { display: flex; gap: 2px; border-bottom: 1px solid #DDE1E6; margin: 4px 0 16px; overflow-x: auto; overflow-y: hidden; }
.cx-tab {
    font-size: .88rem; color: var(--cx-text-3); padding: 9px 14px; text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.cx-tab:hover { color: var(--cx-text); text-decoration: none; }
.cx-tab-active { color: var(--cx-text); font-weight: 600; border-bottom-color: var(--cx-delivered); }
.cx-tab-count { color: var(--cx-text-2); font-weight: 400; margin-left: 3px; }

/* ── Grid table (reporting board) ──────────────────────── */
.cx-table { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); overflow: hidden; }
.cx-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--cx-border-2); flex-wrap: wrap; }
.cx-table-head h2 { margin: 0; font-size: .95rem; font-weight: 600; }
.cx-table-head h2 .cx-muted { font-weight: 400; }
.cx-row {
    display: grid;
    grid-template-columns: minmax(220px, 2.4fr) minmax(130px, 1fr) minmax(160px, 2fr) 84px 72px 72px 60px 32px;
    gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--cx-border-2);
    font-size: .84rem; font-variant-numeric: tabular-nums;
}
.cx-row:last-child { border-bottom: 0; }
.cx-row-header {
    font-size: .7rem; font-weight: 600; color: var(--cx-text-2); text-transform: uppercase; letter-spacing: .04em;
    background: var(--cx-surface-2); padding-top: 9px; padding-bottom: 9px;
}
.cx-row-open { background: #FBFCFD; border-bottom: 0; }
.cx-row-highlight { box-shadow: inset 3px 0 0 var(--cx-delivered); background: #F5F9FC; }
.cx-cell-num { text-align: right; }
.cx-cell-num .cx-sub { display: block; font-size: .75rem; color: var(--cx-text-2); }
.cx-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-name a { font-weight: 600; color: var(--cx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-name a:hover { color: var(--cx-link); }
.cx-name .cx-meta { font-size: .75rem; color: var(--cx-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-expand {
    font: inherit; border: 0; background: transparent; color: var(--cx-text-2); padding: 0;
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer;
}
.cx-expand:hover { background: var(--cx-neutral-bg); color: var(--cx-text); }
.cx-row-detail { padding: 2px 18px 16px; background: #FBFCFD; border-bottom: 1px solid var(--cx-border-2); }
.cx-detail-grid {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid var(--cx-border); border-radius: 10px; background: var(--cx-surface);
    font-variant-numeric: tabular-nums;
}
.cx-detail-cell { padding: 9px 13px; border-right: 1px solid var(--cx-border-2); min-width: 0; }
.cx-detail-cell:last-child { border-right: 0; }
.cx-detail-cell .cx-kpi-label, .cx-detail-cell .cx-kpi-sub { display: block; }
.cx-detail-cell strong { font-size: 1rem; }
.cx-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 18px; font-size: .78rem; color: var(--cx-text-2); flex-wrap: wrap; }

/* ── Live cards (reporting board "Sending now") ─────────── */
.cx-live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.cx-live-card { display: flex; flex-direction: column; gap: 12px; }
.cx-live-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cx-live-head .cx-name a { font-size: .92rem; }
.cx-live-chips { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.cx-live-foot {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
    font-size: .78rem; color: var(--cx-text-2); border-top: 1px solid var(--cx-border-2); padding-top: 10px;
    font-variant-numeric: tabular-nums;
}
.cx-live-foot strong { color: var(--cx-text); }
.cx-live-foot .cx-open { margin-left: auto; font-weight: 600; }
.cx-empty { padding: 14px 18px; border: 1px dashed #D5DAE0; border-radius: var(--cx-radius); color: var(--cx-text-2); font-size: .85rem; background: transparent; }

/* ── Campaign page header / hero ───────────────────────── */
.cx-crumbs { font-size: .8rem; color: var(--cx-text-2); margin-bottom: 10px; }
.cx-crumbs a { color: var(--cx-link); }
.cx-crumbs .cx-sep { padding: 0 6px; }
.cx-hero { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cx-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cx-hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-hero-title h1 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.cx-hero-meta { font-size: .8rem; color: var(--cx-text-2); margin-top: 6px; }
.cx-hero-meta code { font-size: .78rem; }
.cx-runs-label { font-size: .75rem; color: var(--cx-text-2); margin-right: 2px; }

.cx-stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cx-step { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cx-step-line { height: 4px; border-radius: 2px; background: #DDE1E6; overflow: hidden; }
.cx-step-fill { height: 100%; background: var(--cx-delivered); }
.cx-step-title { font-size: .8rem; font-weight: 600; color: var(--cx-text-2); }
.cx-step-sub { font-size: .75rem; color: var(--cx-text-2); overflow: hidden; text-overflow: ellipsis; }
.cx-step-done .cx-step-title { color: var(--cx-text); }
.cx-step-current .cx-step-title { color: var(--cx-delivered); }
.cx-step-warn .cx-step-title { color: var(--cx-warn-text); }
.cx-step-warn .cx-step-fill { background: var(--cx-undelivered); }

/* ── Overview columns / funnel / health ────────────────── */
.cx-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-stack { display: flex; flex-direction: column; gap: 16px; }
.cx-funnel-row {
    display: grid; grid-template-columns: 170px minmax(60px, 1fr) 72px 64px; gap: 12px; align-items: center;
    padding: 5px 0; font-size: .84rem; font-variant-numeric: tabular-nums;
}
.cx-funnel-row.cx-indent > :first-child { padding-left: 14px; color: var(--cx-text-2); }
.cx-funnel-row.cx-divider { border-top: 1px solid var(--cx-border-2); margin-top: 4px; padding-top: 9px; }
.cx-funnel-track { height: 8px; border-radius: 4px; background: var(--cx-track); overflow: hidden; }
.cx-funnel-fill { height: 100%; border-radius: 4px; background: var(--cx-text-3); }
.cx-health-row { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; padding: 3px 0; }
.cx-tag { font-size: .66rem; font-weight: 700; border-radius: 4px; padding: 2px 6px; flex-shrink: 0; letter-spacing: .03em; }
.cx-tag-ok    { color: #1F2937; background: var(--cx-done-bg); }
.cx-tag-check { color: var(--cx-warn-text); background: var(--cx-warn-bg); }
.cx-tag-alert { color: var(--cx-live-text); background: var(--cx-live-bg); }
.cx-tag-info  { color: var(--cx-info-text); background: var(--cx-info-bg); }
.cx-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); row-gap: 7px; column-gap: 10px; font-size: .8rem; margin: 0; }
.cx-dl dt { color: var(--cx-text-2); font-weight: 400; }
.cx-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cx-quote { background: var(--cx-ground); border-radius: var(--cx-radius-sm); padding: 10px 12px; font-size: .8rem; line-height: 1.5; color: #1F2937; white-space: pre-wrap; }
.cx-live-strip { font-size: .8rem; font-weight: 600; color: var(--cx-live-text); background: var(--cx-live-bg); border-radius: var(--cx-radius-sm); padding: 7px 12px; }

@media (max-width: 1100px) {
    .cx-columns { grid-template-columns: minmax(0, 1fr); }
    .cx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cx-kpi:nth-child(3n) { border-right: 0; }
    .cx-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cx-row { grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(140px, 1.6fr) 70px 64px 64px 52px 32px; }
}
@media (max-width: 760px) {
    .cx-live-grid { grid-template-columns: minmax(0, 1fr); }
    .cx-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-kpi { border-right: 0; border-bottom: 1px solid var(--cx-border-2); }
    .cx-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .cx-row > :nth-child(n+3):not(:last-child) { display: none; }
    .cx-row-header { display: none; }
    .cx-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-funnel-row { grid-template-columns: 120px minmax(40px, 1fr) 60px 52px; }
}

/* ── Reporting board (/{sub}/reporting, plan 2026-09-24 section 4) ── */
.cx-board { display: flex; flex-direction: column; gap: 18px; font-variant-numeric: tabular-nums; }
.cx-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cx-board-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-board-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-board-titlerow h1 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; color: var(--cx-text); }
.cx-sub-chip { font-size: .75rem; font-weight: 600; color: var(--cx-info-text); background: var(--cx-info-bg); border-radius: 999px; padding: 3px 10px; }
.cx-board-leads { font-size: .8rem; color: var(--cx-text-2); }
.cx-board-leads strong { color: var(--cx-text); font-weight: 600; }
.cx-board-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-board-live { display: flex; flex-direction: column; gap: 10px; }
.cx-board-live .cx-section-head { margin-bottom: 0; }
.cx-board-links { display: inline-flex; gap: 14px; font-size: .84rem; }
.cx-board-links a, .cx-empty a { color: var(--cx-link); }
.cx-notice { margin: 0; font-size: .8rem; color: var(--cx-text-3); background: var(--cx-neutral-bg); border-radius: var(--cx-radius-sm); padding: 7px 12px; }
.cx-card-note { margin: 0; font-size: .78rem; color: var(--cx-text-2); }
.cx-row > .cx-cell-stage { justify-self: start; min-width: 0; }
.cx-table-empty { margin: 0; padding: 14px 18px; font-size: .85rem; color: var(--cx-text-2); }
.cx-detail-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: .78rem; color: var(--cx-text-2); }
.cx-detail-foot a { color: var(--cx-link); }
.cx-pager { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 760px) {
    .cx-board-controls { width: 100%; }
    .cx-live-foot .cx-open { margin-left: 0; }
}

/* ── Campaign page (/campaigns/{id}, plan 2026-09-24 section 5; Phase C) ─────────────
   Appended block: scoped under .cx-page; never changes the shared classes above. */
.cx-page .cx-head-card { margin-bottom: 14px; }
.cx-head-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-page .cx-hero-title h1 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; color: var(--cx-text); }
.cx-hero-meta { overflow-wrap: anywhere; }

/* The action bar, compact inside the header card (CampaignActionBar markup untouched). */
.cx-page .cx-bar-compact { max-height: none; overflow: visible; background: transparent; padding: 0; margin: 0; }
.cx-page .cx-bar-compact .cab {
    margin: 0; padding: 8px 12px; gap: 6px;
    background: var(--cx-surface-2); border: 1px solid var(--cx-border-2); border-radius: var(--cx-radius-sm); box-shadow: none;
}
.cx-page .cx-bar-compact .cab-steps { font-size: .68rem; gap: .75rem; }
.cx-page .cx-bar-compact .hub-secondary { padding: 6px 0 0; }
.cx-page .cx-bar-compact .hub-status-sentence { margin: 4px 0 0; font-size: .78rem; color: var(--cx-text-2); }

/* Run switcher */
.cx-runs { gap: 6px 8px; }
.cx-runs .cx-pill-selected .cx-chip-dot { background: #FFFFFF; }
.cx-runs-more { font-size: .78rem; color: var(--cx-link); margin-left: 4px; }

/* Steppers (an <ol>): five send steps, or four lifecycle steps for a campaign with no run group */
.cx-steps-list { list-style: none; margin: 0; padding: 0; }
.cx-stepper.cx-stepper-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cx-step-flag { font-weight: 600; }
.cx-kpis-7 { --cx-kpi-count: 7; }

/* Overview */
.cx-overview { margin-bottom: 16px; }
.cx-page .cx-live-strip { margin-bottom: 12px; }
.cx-page .cx-notice { margin: 0 0 10px; }
.cx-page .cx-card > .cx-card-note { margin-top: 8px; }
.cx-health { display: flex; flex-direction: column; gap: 6px; }
.cx-health-link { color: var(--cx-link); font-weight: 600; white-space: nowrap; margin-left: 4px; }
.cx-details > summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--cx-text); }
.cx-details[open] > summary { margin-bottom: 12px; }
.cx-page .hub-tile { border-color: var(--cx-border); border-radius: var(--cx-radius-sm); }
.cx-page .hub-tile-value { font-variant-numeric: tabular-nums; }
.cx-dl.cx-dl-wide { grid-template-columns: 130px minmax(0, 1fr); row-gap: 10px; }

/* Funnel rows (FunnelTable): label | bar | count | % | source */
.cx-funnel { display: flex; flex-direction: column; }
.cx-funnel-row.cx-funnel-row-src { grid-template-columns: minmax(150px, 1.3fr) minmax(60px, 1fr) 72px 56px 64px; }
.cx-funnel-head { font-size: .68rem; font-weight: 600; color: var(--cx-text-2); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 2px; }
.cx-funnel-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cx-funnel-label a { color: var(--cx-link); }
.cx-funnel-top .cx-funnel-label > :first-child { font-weight: 600; }
.cx-funnel-note { font-size: .72rem; color: var(--cx-text-2); }
a.cx-funnel-note { color: var(--cx-link); }
.cx-funnel-value { text-align: right; font-weight: 600; }
.cx-funnel-pct { text-align: right; font-size: .78rem; color: var(--cx-text-2); }
.cx-funnel-src { font-size: .72rem; color: var(--cx-text-2); }
.cx-funnel-na .cx-funnel-value, .cx-funnel-na .cx-funnel-label > :first-child { color: var(--cx-text-2); font-weight: 400; }
.cx-funnel-hl { background: var(--cx-warn-bg); border-radius: 6px; }
.cx-funnel-hl-text { color: var(--cx-warn-text); font-weight: 600; }
.cx-funnel-fill.cx-fill-delivered   { background: var(--cx-delivered); }
.cx-funnel-fill.cx-fill-awaiting    { background: var(--cx-awaiting); }
.cx-funnel-fill.cx-fill-undelivered { background: var(--cx-undelivered); }
.cx-funnel-fill.cx-fill-notsent     { background: var(--cx-notsent); }
.cx-funnel-notice { margin-bottom: 8px; }

/* Recipients */
.cx-viewtabs { display: inline-flex; gap: 2px; background: var(--cx-surface); border: 1px solid #DDE1E6; border-radius: var(--cx-radius-sm); padding: 3px; margin-bottom: 10px; }
.cx-viewtab { font-size: .8rem; color: var(--cx-text-3); padding: 5px 12px; border-radius: 6px; text-decoration: none; }
.cx-viewtab:hover { color: var(--cx-text); text-decoration: none; }
.cx-viewtab-active, .cx-viewtab-active:hover { background: #1F2937; color: #FFFFFF; font-weight: 600; }
.cx-viewtab-active .hub-inside-note { color: #E5E7EB; }
.cx-rcontrols { gap: 8px 10px; }
.cx-page .hub-chips-row { margin: 4px 0 10px; }
.cx-rtable-wrap { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); overflow-x: auto; }
.cx-rtable { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.cx-rtable th {
    text-align: left; font-size: .7rem; font-weight: 600; color: var(--cx-text-2); text-transform: uppercase; letter-spacing: .04em;
    background: var(--cx-surface-2); padding: 8px 14px; border-bottom: 1px solid var(--cx-border-2); white-space: nowrap;
}
.cx-rtable td { padding: 8px 14px; border-bottom: 1px solid var(--cx-border-2); vertical-align: middle; }
.cx-rtable tbody tr:last-child td { border-bottom: 0; }
.cx-rtable .cx-num-col { text-align: right; }
.cx-rstatus { display: inline-flex; align-items: center; gap: 8px; }
.cx-swatch.cx-seg-neutral { background: var(--cx-done-bg); }
.cx-pager-row { margin: 4px 0 8px; }

@media (max-width: 760px) {
    .cx-stepper.cx-stepper-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cx-funnel-row.cx-funnel-row-src { grid-template-columns: 120px minmax(40px, 1fr) 60px 52px; }
    .cx-funnel-row.cx-funnel-row-src > .cx-funnel-src { display: none; }
    .cx-dl.cx-dl-wide { grid-template-columns: minmax(0, 1fr); }
}

/* Tests tab: TestResultsPanel's cards (its markup is untouched; global rules reach across the component boundary). */
.cx-page .cd-card { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); padding: 14px 16px; }
.cx-page .cd-card-title { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--cx-text); }
.cx-page .cd-muted { color: var(--cx-text-2); font-weight: 400; }
.cx-page .cd-msg { background: var(--cx-ground); border-radius: var(--cx-radius-sm); padding: 10px 12px; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: #1F2937; }
