/* ================================================================
   Pipeline Monitor — Page-specific styles
   Shared styles are in ../shared.css
   ================================================================ */

/* ── Header view toggle (pill inside header) ───────────────────── */
.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}
.view-toggle .view-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 18px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.view-toggle .view-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-color: transparent;
}
.view-toggle .view-btn.active {
    background: var(--white);
    color: var(--royal);
    font-weight: 700;
    border-color: transparent;
}

/* ── Detail view toggle (secondary, smaller than view-toggle) ─── */
.detail-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 2px;
    gap: 1px;
}
.detail-toggle .detail-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}
.detail-toggle .detail-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}
.detail-toggle .detail-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* ── Summary bar (pipeline-specific) ──────────────────────────── */
.summary-bar {
    display: none;
}
.summary-bar-inner {
    display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start;
}
.summary-section { flex: 1; min-width: 220px; }
.summary-section-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--slate); margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.summary-total {
    font-size: 11px; color: var(--slate);
    text-transform: none; letter-spacing: 0; font-weight: 300;
}
.summary-seg-bar {
    height: 10px; border-radius: 5px; overflow: hidden; background: var(--smoke);
    display: flex; margin-bottom: 8px;
}
.summary-seg { height: 100%; transition: width 0.3s ease; }
.summary-counts { display: flex; gap: 14px; flex-wrap: wrap; }
.summary-count-item {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 400; color: var(--charcoal); white-space: nowrap;
}
.summary-count-item .dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.summary-count-item .count-num { font-weight: 700; font-size: 13px; color: var(--navy); }
.summary-count-item.zero { opacity: 0.4; }
.summary-divider { width: 1px; background: var(--smoke); align-self: stretch; margin: 0 4px; flex-shrink: 0; }

/* ── Operations controls (pipeline filters section) ────────────── */
.operations-controls {
    background: var(--white);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Debug footer ──────────────────────────────────────────────── */
.debug-footer {
    display: none; flex-wrap: wrap; gap: 4px 12px;
    padding: 14px 4px 6px;
    font-size: 11px; color: var(--slate);
    border-top: 1px solid #e8edf2;
    margin-top: 16px;
}
.debug-footer.visible { display: flex; }
.debug-sep { color: #d0d8de; }

/* ── Data health section (hidden, future use) ──────────────────── */
.data-health-section {
    display: none;
    background: linear-gradient(135deg, var(--mist) 0%, #dde3ff 100%);
    border: 1px solid var(--indigo);
    border-radius: 10px; padding: 24px; margin-bottom: 16px;
}

/* ── Run-status colors ─────────────────────────────────────────── */
.dot-success { background: var(--jade); }
.dot-failed  { background: var(--error-1); }
.dot-running { background: var(--amber); }
.dot-waiting { background: var(--slate); }

.bar-success { background: var(--jade); }
.bar-failed  { background: var(--error-1); }
.bar-running { background: var(--amber); }
.bar-waiting { background: var(--smoke); }

.border-success { border-left-color: var(--jade); }
.border-failed  { border-left-color: var(--error-1); }
.border-running { border-left-color: var(--amber); }
.border-waiting { border-left-color: var(--smoke); }

/* ── SLA badges ────────────────────────────────────────────────── */
.sla-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.sla-on-time { background: var(--jade-light); color: var(--jade-dark); }
.sla-waiting { background: var(--ash); color: var(--slate); }
.sla-late    { background: var(--error-2); color: var(--error-1); }

/* ── Run-time (duration) SLA badge — beside the start-SLA badge, "Run Met"/"Run Breached" ── */
.run-sla-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.run-sla-badge.rsla-met      { background: var(--jade-light); color: var(--jade-dark); }
.run-sla-badge.rsla-breached { background: var(--error-2); color: var(--error-1); }
.run-sla-badge.rsla-waiting  { background: var(--ash); color: var(--slate); }
.run-sla-badge.rsla-running  { background: var(--amber-light); color: var(--amber-dark); }

/* ── Run badges ────────────────────────────────────────────────── */
.status-strip { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.run-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.run-badge .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.run-badge.rb-success { background: var(--jade-light); color: var(--jade-dark); }
.run-badge.rb-failed  { background: var(--error-2); color: var(--error-1); }
.run-badge.rb-running { background: var(--amber-light); color: var(--amber-dark); }
.run-badge.rb-waiting { background: var(--ash); color: var(--slate); }

/* ── Freshness inline ──────────────────────────────────────────── */
.freshness-inline {
    display: inline-flex; align-items: center;
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.freshness-inline.fi-fresh { background: var(--jade-light); color: var(--jade-dark); }
.freshness-inline.fi-stale { background: var(--error-2); color: var(--error-1); }
.freshness-inline.fi-none  { background: var(--ash); color: var(--slate); }

/* ── Pipeline cards ────────────────────────────────────────────── */
.pipeline-list { display: flex; flex-direction: column; gap: 10px; }
.pipeline-card {
    background: var(--white); border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: box-shadow 0.15s;
}
.pipeline-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* A bit more breathing room between the status row and the dropdown/search row (shared default is 12px). */
.controls { gap: 20px; }
/* Push a control group to the right edge of its row: Sort on the status row, Search on the filter row. */
.control-right { margin-left: auto; }

/* Row and the column-header above the list share one grid template so every column lines up.
   Tracks: name (flexes) · status badges · started · run time · SLA target · actions. */
.pipeline-row, .pipeline-list-header {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto 64px 64px 116px 196px;
    align-items: center; gap: 16px; padding: 14px 20px;
}
.pipeline-row { cursor: pointer; }

.pipeline-list-header {
    padding: 2px 20px 8px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--smoke);
}
.pipeline-list-header .status-strip { color: var(--smoke); }

/* Fixed-width slots keep the three status badges (and their headers) column-aligned even when a
   pipeline is missing one (e.g. no run-time SLA → no Run SLA badge). */
.ss-slot { display: inline-flex; align-items: center; }
.ss-run      { width: 78px; }
.ss-startsla { width: 76px; }
.ss-runsla   { width: 96px; }

.pipeline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
/* Start (clock) over Run (duration budget), stacked in the SLA-target column. */
.pipeline-sla-cell { display: flex; align-items: center; min-width: 0; }
.pipeline-name {
    font-weight: 500; font-size: 14px; flex: 1; min-width: 0;
    overflow: hidden; color: var(--navy);
    display: flex; flex-direction: column; gap: 2px;
}
.pipeline-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pipeline-feedtype-label { font-weight: 400; color: var(--slate); }
.feed-info { font-size: 11px; font-weight: 400; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-dur { font-size: 12px; color: var(--slate); font-weight: 500; min-width: 56px; text-align: left; white-space: nowrap; }
/* Run-time SLA on the duration cell: the budget suffix is muted; a breach turns the whole cell red. */
.pipeline-dur .dur-budget { color: var(--smoke); font-weight: 400; }
.pipeline-dur.dur-breached { color: var(--error-1); font-weight: 600; }
.pipeline-dur.dur-breached .dur-budget { color: var(--error-1); }
/* Still-running row: elapsed "~time" in the running (amber) tone. */
.pipeline-dur.dur-running { color: var(--amber-dark); font-weight: 600; }
/* Running rows carry a hover that explains the "~elapsed" is measured to the snapshot, not a final
   run time — CSS-only hover, same convention as .metadata-tooltip / .pipeline-summary-tooltip.
   Anchored right so it never clips off the right edge of the card. */
.pipeline-dur.has-runtip { position: relative; cursor: help; }
.runtime-tooltip {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--navy); color: #e2e8f0;
    padding: 10px 14px; border-radius: 8px; font-size: 11px; line-height: 1.6;
    white-space: nowrap; z-index: 100; text-transform: none; font-weight: 400; pointer-events: none;
}
.pipeline-dur.has-runtip:hover .runtime-tooltip { display: block; }
.runtime-tooltip b { color: #fff; font-weight: 600; }
/* Start time: --slate (not the fainter --smoke) so it stays legible in both light and dark themes. */
.pipeline-start-time { font-size: 12px; color: var(--slate); white-space: nowrap; }
/* Start and Run share a single box, stacked. */
.sla-box {
    display: inline-flex; flex-direction: column; gap: 2px;
    background: var(--ash); padding: 3px 9px; border-radius: 4px;
}
.sla-line { display: flex; align-items: baseline; font-size: 11px; color: var(--slate); font-weight: 500; white-space: nowrap; }
/* Fixed-width label so the "Start" and "Run" times line up on a common left edge, padded off the label.
   Uses --slate (not --smoke) so the labels read a touch darker in light mode and lighter in dark mode. */
.sla-line .sla-label {
    display: inline-block; min-width: 42px;
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    color: var(--slate); letter-spacing: 0.5px;
}
.pipeline-chevron {
    color: var(--slate); font-size: 12px; transition: all 0.2s; flex-shrink: 0;
    cursor: pointer; padding: 4px; border-radius: 3px;
}
.pipeline-chevron:hover { background: var(--ash); color: var(--charcoal); }
.pipeline-card.expanded .pipeline-chevron { transform: rotate(90deg); }

.pipeline-link {
    font-size: 11px; color: var(--indigo); text-decoration: none; flex-shrink: 0;
    padding: 2px 6px; border-radius: 4px; transition: background 0.15s; white-space: nowrap;
}
.pipeline-link:hover { background: var(--mist); }

.pipeline-details { display: none; padding: 0 20px 20px 20px; border-top: 1px solid var(--ash); }
.pipeline-card.expanded .pipeline-details { display: block; }

/* ── Pipeline hierarchy label ──────────────────────────────────── */
.pipeline-hierarchy-label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600; padding: 2px 6px;
    background: var(--ash); color: var(--slate); border-radius: 4px; margin-left: 8px;
}
.pipeline-hierarchy-label.parent-label { background: var(--mist); color: var(--royal); }

/* ── Detail header / fields ────────────────────────────────────── */
.detail-header {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--ash); margin-bottom: 16px;
}
.pipeline-summary-more {
    position: relative; cursor: pointer; color: var(--indigo);
    font-weight: 500; font-size: 11px;
    border: 1px solid #c0c9ff; background: var(--mist);
    border-radius: 4px; padding: 2px 8px; flex-shrink: 0;
}
.pipeline-summary-more:hover { background: #dde3ff; }
.pipeline-summary-tooltip {
    display: none; position: absolute; right: 0; bottom: 100%; margin-bottom: 6px;
    background: var(--navy); color: #e2e8f0;
    padding: 12px 16px; border-radius: 8px; font-size: 12px;
    line-height: 1.7; white-space: nowrap; z-index: 100; min-width: 280px;
}
.pipeline-summary-more:hover .pipeline-summary-tooltip { display: block; }
.pipeline-summary-tooltip .tt-label { color: var(--smoke); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.pipeline-summary-tooltip .tt-value { color: var(--ash); font-weight: 500; }
.detail-field-label { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--smoke); letter-spacing: 0.5px; margin-bottom: 2px; }
.detail-field-value { font-size: 13px; color: var(--charcoal); font-weight: 500; }
.detail-field-value a { color: var(--indigo); text-decoration: none; }
.detail-field-value a:hover { text-decoration: underline; }

/* ── Tags ──────────────────────────────────────────────────────── */
.tags-row { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }
.tag {
    display: inline-block; padding: 2px 8px;
    background: var(--mist); color: var(--indigo);
    border-radius: 10px; font-size: 11px; font-weight: 500;
}

/* ── Step rows ─────────────────────────────────────────────────── */
.steps-list { display: flex; flex-direction: column; gap: 8px; }
.step-card {
    background: var(--ash); border-left: 3px solid var(--smoke);
    border-radius: 6px; padding: 12px 14px; font-size: 13px;
}
.step-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-name { font-weight: 600; color: var(--navy); }
.step-type-badge {
    position: relative; font-size: 10px; background: #dce2e6; color: var(--charcoal);
    padding: 1px 7px; border-radius: 4px; font-weight: 600; text-transform: uppercase;
}
.step-type-badge.has-metadata { cursor: pointer; }
.step-type-badge.has-metadata:hover { background: var(--smoke); }
.metadata-tooltip {
    display: none; position: absolute; top: calc(100% + 6px); left: 0;
    background: var(--navy); color: #e2e8f0;
    padding: 10px 14px; border-radius: 8px; font-size: 11px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-all; z-index: 100;
    min-width: 300px; max-width: 520px; max-height: 320px; overflow-y: auto;
    text-transform: none; font-weight: 400; pointer-events: none;
}
.step-type-badge.has-metadata:hover .metadata-tooltip { display: block; }
.step-spacer { flex: 1; }
.step-dur { font-size: 12px; color: var(--slate); font-weight: 500; }
.step-link {
    font-size: 11px; color: var(--indigo); text-decoration: none;
    padding: 2px 6px; border-radius: 4px; transition: background 0.15s;
}
.step-link:hover { background: var(--mist); }

/* ── Step waterfall bar ────────────────────────────────────────── */
.step-waterfall {
    position: relative; height: 18px; background: #dce2e6;
    border-radius: 3px; margin-top: 8px; overflow: hidden;
}
.step-waterfall-fill {
    position: absolute; top: 0; height: 100%; border-radius: 3px;
    min-width: 4px; transition: opacity 0.15s;
}
.step-waterfall-fill:hover { opacity: 0.8; }
.step-waterfall-label {
    position: absolute; top: 0; height: 100%;
    display: flex; align-items: center;
    font-size: 10px; font-weight: 600; color: var(--white);
    padding: 0 6px; pointer-events: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-waterfall-label.outside { color: var(--slate); left: auto; }
.bar-running ~ .step-waterfall-label:not(.outside) { color: #713f12; }

.step-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--slate); margin-top: 6px; }
.step-meta-label { font-weight: 600; color: var(--smoke); }

/* ── Nested pipelines ──────────────────────────────────────────── */
.step-card.step-pipeline { cursor: default; }
.step-card.step-pipeline .step-top { cursor: pointer; }
.step-pipeline-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600; padding: 2px 8px;
    background: var(--mist); color: var(--royal); border-radius: 10px;
}
.step-pipeline-chevron {
    color: var(--indigo); font-size: 10px; transition: transform 0.2s; flex-shrink: 0; cursor: pointer;
}
.step-card.step-pipeline.step-pipeline-expanded > .step-top > .step-pipeline-chevron { transform: rotate(90deg); }
.step-pipeline-body { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--smoke); }
.step-card.step-pipeline.step-pipeline-expanded > .step-pipeline-body { display: block; }
.step-pipeline-body > .steps-list { padding-left: 12px; border-left: 2px solid var(--smoke); }
.step-pipeline-body > .steps-list > .step-card.step-pipeline > .step-pipeline-body > .steps-list { border-left-color: #c0c9ff; }

/* ── Pipelines-only detail mode ────────────────────────────────── */
#pipelineList.pipelines-only .step-card:not(.step-pipeline) { display: none; }
#pipelineList.pipelines-only .pipeline-card[data-has-children="false"] .pipeline-chevron { display: none; }

/* ── Freshness toggle ──────────────────────────────────────────── */
.freshness-section { margin-top: 8px; }
.freshness-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; background: var(--ash); border: 1px solid var(--smoke);
    border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--charcoal);
    cursor: pointer; transition: background 0.15s; font-family: inherit;
}
.freshness-toggle:hover { background: #e6eaec; }
.freshness-arrow {
    display: inline-block; width: 0; height: 0;
    border-top: 4px solid transparent; border-bottom: 4px solid transparent;
    border-left: 5px solid var(--slate); transition: transform 0.2s;
}
.freshness-toggle.open .freshness-arrow { transform: rotate(90deg); }
.freshness-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.badge-fresh   { background: var(--jade-light); color: var(--jade-dark); }
.badge-stale   { background: var(--error-2); color: var(--error-1); }
.badge-unknown { background: var(--ash); color: var(--slate); }
.freshness-panel {
    display: none; margin-top: 8px; padding: 10px 14px;
    background: var(--white); border: 1px solid var(--smoke); border-radius: 6px; font-size: 12px;
}
.freshness-panel.open { display: block; }
.freshness-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; flex-wrap: wrap; }
.freshness-row + .freshness-row { border-top: 1px solid var(--ash); }
.freshness-detail { color: var(--slate); font-size: 11px; }
.freshness-detail strong { color: var(--charcoal); font-weight: 600; }

/* ── Multiselect (pipeline-specific variant) ───────────────────── */
.multiselect { position: relative; min-width: 160px; }
.multiselect-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 6px 10px; background: var(--ash); border: 1px solid var(--smoke);
    border-radius: 6px; font-size: 12px; cursor: pointer; user-select: none;
    color: var(--charcoal); width: 100%; white-space: nowrap;
    font-family: inherit; font-weight: 300;
}
.multiselect-btn:hover { border-color: var(--slate); }
.multiselect-btn.has-selection { border-color: var(--indigo); background: var(--mist); color: var(--royal); font-weight: 600; }
.multiselect-arrow { font-size: 10px; color: var(--slate); flex-shrink: 0; }
.multiselect-dropdown {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 100%; max-height: 260px; overflow-y: auto;
    background: var(--white); border: 1px solid var(--smoke); border-radius: 6px;
    z-index: 50; padding: 4px 0;
}
.multiselect.open .multiselect-dropdown { display: block; }
.multiselect-option {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px;
    font-size: 12px; cursor: pointer; white-space: nowrap; transition: background 0.1s;
}
.multiselect-option:hover { background: var(--ash); }
.multiselect-option.selected { background: var(--mist); color: var(--royal); font-weight: 600; }
.multiselect-check {
    width: 14px; height: 14px; border: 1px solid var(--smoke); border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: transparent; flex-shrink: 0;
}
.multiselect-option.selected .multiselect-check { background: var(--indigo); border-color: var(--indigo); color: var(--white); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .detail-header { grid-template-columns: 1fr 1fr; }
    .summary-divider { display: none; }
    /* Header labels get cramped before the rows do; drop them but keep the aligned grid rows. */
    .pipeline-list-header { display: none; }
}
@media (max-width: 600px) {
    .pipeline-row { display: flex; grid-template-columns: none; flex-wrap: wrap; gap: 10px; }
    .pipeline-name { min-width: 0; flex: 1 1 100%; }
    .ss-run, .ss-startsla, .ss-runsla { width: auto; }
    .summary-section { min-width: 100%; }
}

/* ================================================================
   DARK THEME — Pipeline Monitor
   ================================================================ */
/* Header view pill: keep the active tab a white pill on the gradient.
   The shared dark rule (.view-btn.active { color: #fff }) is meant for its
   royal-filled active state; here the pill is white, so the text must be dark
   or it disappears. Re-assert dark text with enough specificity to win. */
html[data-theme="dark"] .view-toggle .view-btn:hover { color: #fff; }
html[data-theme="dark"] body:not(.dt-dark) .view-toggle .view-btn.active { background: #fff; color: var(--royal); }

/* Summary bar */
html[data-theme="dark"] .summary-count-item .count-num { color: var(--charcoal); }
html[data-theme="dark"] .summary-seg-bar { background: var(--dark-surface-3); }
html[data-theme="dark"] .summary-divider { background: var(--dark-border); }

/* Cards / panels */
html[data-theme="dark"] .pipeline-card,
html[data-theme="dark"] .operations-controls {
    border: 1px solid var(--dark-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .pipeline-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.55); }
html[data-theme="dark"] .pipeline-name,
html[data-theme="dark"] .step-name { color: var(--charcoal); }

/* Waiting/none badges that used the light page bg as their fill */
html[data-theme="dark"] .sla-waiting,
html[data-theme="dark"] .run-sla-badge.rsla-waiting,
html[data-theme="dark"] .run-badge.rb-waiting,
html[data-theme="dark"] .freshness-inline.fi-none,
html[data-theme="dark"] .badge-unknown,
html[data-theme="dark"] .sla-box,
html[data-theme="dark"] .pipeline-hierarchy-label { background: var(--dark-surface-3); }

/* Chevron / detail affordances */
html[data-theme="dark"] .pipeline-chevron:hover { background: var(--dark-surface-2); }
html[data-theme="dark"] .pipeline-details,
html[data-theme="dark"] .detail-header { border-color: var(--dark-border); }
html[data-theme="dark"] .pipeline-details { border-top-color: var(--dark-border); }

/* Accent text (links, tags, hierarchy) */
html[data-theme="dark"] .pipeline-link,
html[data-theme="dark"] .detail-field-value a,
html[data-theme="dark"] .step-link,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .step-pipeline-badge,
html[data-theme="dark"] .step-pipeline-chevron,
html[data-theme="dark"] .pipeline-hierarchy-label.parent-label { color: var(--accent-text); }

/* "More" pill + its tooltip */
html[data-theme="dark"] .pipeline-summary-more {
    color: var(--accent-text); border-color: #3A4478; background: var(--mist);
}
html[data-theme="dark"] .pipeline-summary-more:hover { background: #2E3658; }
html[data-theme="dark"] .pipeline-summary-tooltip,
html[data-theme="dark"] .metadata-tooltip,
html[data-theme="dark"] .runtime-tooltip { border: 1px solid var(--dark-border); }
html[data-theme="dark"] .pipeline-summary-tooltip .tt-value { color: var(--charcoal); }

/* Step cards + waterfall */
html[data-theme="dark"] .step-card { background: var(--dark-surface-2); }
html[data-theme="dark"] .step-type-badge { background: #2A3150; }
html[data-theme="dark"] .step-type-badge.has-metadata:hover { background: #3A4260; }
html[data-theme="dark"] .step-waterfall { background: #2A3150; }
html[data-theme="dark"] .step-waterfall-label { color: #fff; }
html[data-theme="dark"] .step-waterfall-label.outside { color: var(--slate); }
html[data-theme="dark"] .step-pipeline-body { border-top-color: var(--dark-border); }
html[data-theme="dark"] .step-pipeline-body > .steps-list { border-left-color: var(--dark-border); }
html[data-theme="dark"] .step-pipeline-body > .steps-list > .step-card.step-pipeline > .step-pipeline-body > .steps-list { border-left-color: #3A4478; }

/* Freshness toggle / panel */
html[data-theme="dark"] .freshness-toggle {
    background: var(--dark-surface-2); border-color: var(--dark-border);
}
html[data-theme="dark"] .freshness-toggle:hover { background: var(--dark-surface-3); }
html[data-theme="dark"] .badge-fresh { background: var(--jade-light); color: #5FE3A9; }
html[data-theme="dark"] .freshness-panel { border-color: var(--dark-border); }
html[data-theme="dark"] .freshness-row + .freshness-row { border-top-color: var(--dark-border-soft); }

/* Multiselect (pipeline variant) */
html[data-theme="dark"] .multiselect-btn {
    background: var(--dark-surface-2); border-color: var(--dark-border);
}
html[data-theme="dark"] .multiselect-btn.has-selection,
html[data-theme="dark"] .multiselect-option.selected { color: var(--accent-text); }
html[data-theme="dark"] .multiselect-dropdown {
    border-color: var(--dark-border); box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .multiselect-option:hover { background: var(--dark-surface-2); }
html[data-theme="dark"] .multiselect-check { border-color: var(--dark-border); }
html[data-theme="dark"] .multiselect-option.selected .multiselect-check { color: #fff; }

/* Debug footer */
html[data-theme="dark"] .debug-footer { border-top-color: var(--dark-border); }
html[data-theme="dark"] .debug-sep { color: var(--smoke); }
