/* ============================================================================
   Reporter Runs — the reporting audit (aug-12 cleanup §3.4).

   Two views over the same data: runs (the container, where a *gap* is visible) and by-tenant (the
   question people arrive with). Everything below is layout and emphasis; the semantics live in the
   component, which picks the colours from the shared accent tokens.
   ============================================================================ */

/* ── Tabs ─────────────────────────────────────────────────── */
.rrun-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-left: auto;
}

/* ── Notes and filters ────────────────────────────────────── */
.rrun-note {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
    line-height: 1.5;
    max-width: 90ch;
}

.rrun-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.rrun-control {
    padding: 6px 8px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-default);
    color: var(--text-primary);
    font-size: var(--font-size-body-xs);
}

.rrun-filter-note {
    color: var(--text-muted);
    font-size: var(--font-size-body-xs);
}

/* ── Rows ─────────────────────────────────────────────────── */
.rrun-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

.rrun-row {
    cursor: pointer;
}

.rrun-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rrun-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: var(--spacing-sm);
    font-size: var(--font-size-body-xs);
    white-space: nowrap;
}

/* A gap row is an ABSENCE given space on the page. It is deliberately loud — a list that closes over
   its own holes reads as complete, which is the failure this whole screen exists to prevent. */
.rrun-gap-row td {
    background: color-mix(in srgb, var(--accent-danger) 8%, transparent);
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
    line-height: 1.5;
}

.rrun-gap-row strong {
    color: var(--accent-danger);
}

/* The gap row carries its own fix. The button sits at the end of the row rather than in a toolbar
   somewhere, because the window it needs is the window the row is describing. */
.rrun-gap-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.rrun-redrive {
    flex: 0 0 auto;
    white-space: nowrap;
}

.rrun-summary__note {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-default);
    color: var(--text-muted);
    font-size: var(--font-size-body-xs);
    line-height: 1.5;
    max-width: 90ch;
}

.rrun-fatal {
    margin-top: 2px;
    color: var(--accent-danger);
    font-size: var(--font-size-body-xs);
}

.rrun-error {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--font-size-body-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60ch;
}

.rrun-held {
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
}

/* The failure classification, which is the whole point of classifying: a task reads differently from
   noise at a glance, without anyone having to read the message. */
.rrun-kind {
    display: inline-block;
    padding: 1px 6px;
    margin-right: 4px;
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: var(--font-size-body-xs);
    font-weight: 600;
}

.rrun-kind--task {
    background: color-mix(in srgb, var(--accent-caution) 18%, transparent);
    color: var(--accent-caution);
}

.rrun-op {
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
    font-size: var(--font-size-body-xs);
}

.rrun-null {
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--font-size-body-xs);
}

/* ── Run detail summary ───────────────────────────────────── */
.rrun-summary {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
}

.rrun-summary__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--spacing-sm);
}

.rrun-summary__title {
    font-weight: 600;
    color: var(--text-primary);
}

.rrun-summary__when,
.rrun-summary__tallies {
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
}

.rrun-summary__tallies {
    margin-top: var(--spacing-xs);
}

.rrun-summary__id {
    margin-top: var(--spacing-xs);
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
    font-size: var(--font-size-body-xs);
}

/* ── Transient states ─────────────────────────────────────── */
.rrun-loading {
    padding: var(--spacing-md);
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
}

.rrun-problem {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border: 1px solid var(--accent-danger);
    border-radius: var(--radius-md);
    color: var(--accent-danger);
    font-size: var(--font-size-body-xs);
}
