/* ============================================================================
   RM Data Export Admin — "Ground Station"
   Aerospace-instrument console. Themed via [data-theme] on <html>.
   ============================================================================ */

:root {
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
    --display: 'Space Grotesk', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;
}
/* DARK (default) — dark cool slate, lifted well off near-black */
:root, :root[data-theme="dark"] {
    --void: #1B2027; --panel: #232932; --panel-2: #202632;
    --line: #313945; --line-2: #3E4855;
    /* ink-2 lifted from #657286 (~3.8:1 on --void, below AA) to clear ~4.5:1 for data-bearing
       micro-labels and timestamps, while staying clearly subordinate to ink-1/ink-0. */
    --ink-0: #F3F6F9; --ink-1: #9EA9B8; --ink-2: #7E8B9E;
    --signal: #4DA3FF; --signal-dim: #294a68; --signal-ink: #06121f;
    --chan-self: #93A9C4; --chan-self-dim: rgba(147,169,196,.18);
    --ok: #4CC08A; --warn: #E0AC4C; --fail: #F0575C;
    --fail-glow: rgba(240,87,92,.16);
    --signal-pulse: rgba(77,163,255,.45);
    --warn-pulse: rgba(224,172,76,.5);
    --hover-row: rgba(255,255,255,.03);
    --page-glow: rgba(77,163,255,.07);
    --field-bg: var(--panel);
    --shadow: rgba(0,0,0,.4);
}
/* LIGHT — cool-gray console, not stark white */
:root[data-theme="light"] {
    --void: #EEF1F5; --panel: #FFFFFF; --panel-2: #F5F7FA;
    --line: #DDE3EA; --line-2: #CBD3DD;
    --ink-0: #111721; --ink-1: #586274; --ink-2: #737E8D;
    --signal: #1E6FD6; --signal-dim: #D6E6FA; --signal-ink: #FFFFFF;
    --chan-self: #5E7796; --chan-self-dim: rgba(94,119,150,.15);
    --ok: #1E9E68; --warn: #B67C15; --fail: #D23539;
    --fail-glow: rgba(210,53,57,.14);
    --signal-pulse: rgba(30,111,214,.4);
    --warn-pulse: rgba(182,124,21,.4);
    --hover-row: rgba(17,23,33,.03);
    --page-glow: rgba(30,111,214,.05);
    --field-bg: #FFFFFF;
    --shadow: rgba(17,23,33,.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--void); color: var(--ink-0);
    font-family: var(--body); font-size: 14px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(1200px 600px at 78% -10%, var(--page-glow), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    transition: background-color .2s, color .2s;
}
h1, h2, h3 { font-family: var(--display); }
h1:focus { outline: none; }
.micro { font-family: var(--display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-1); }
.error { color: var(--fail); }
a { color: var(--signal); text-decoration: none; }

/* ---- Blazor framework: validation + error boundary (kept) ---- */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--ok); }
.invalid { outline: 1px solid var(--fail); }
.validation-message { color: var(--fail); }
.blazor-error-boundary {
    background: #b32121; padding: 1rem; color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* ---- app shell + header ---- */
.shell { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
header.top {
    display: flex; align-items: center; gap: 36px;
    padding: 22px 0 20px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .name { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .01em; color: var(--ink-0); }
/* environment badge — shown only outside prod (prod = no badge), always orange */
.env { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--warn); color: var(--warn); background: transparent; }
nav.main { display: flex; gap: 4px; }
nav.main a {
    position: relative;
    font-family: var(--display); font-size: 12.5px; font-weight: 500; letter-spacing: .03em;
    color: var(--ink-1); padding: 7px 13px; border-radius: 6px;
}
nav.main a:hover { color: var(--ink-0); background: var(--panel); }
/* active tab: stronger fill + a signal-accent underline so current location is unmistakable */
nav.main a.active { color: var(--ink-0); font-weight: 600; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
nav.main a.active::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px;
    border-radius: 2px; background: var(--signal);
}
.op { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.op .who { color: var(--ink-1); font-size: 12.5px; }
.op .who b { color: var(--ink-0); font-weight: 500; }
.op .out { color: var(--ink-2); font-size: 12px; }
.op .out:hover { color: var(--ink-1); }
main.app-main { padding: 4px 0 0; }

.themetoggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 7px; cursor: pointer;
    background: transparent; border: 1px solid var(--line-2); color: var(--ink-1);
    transition: color .15s, border-color .15s, background .15s;
}
.themetoggle:hover { color: var(--ink-0); background: var(--panel); }
.themetoggle:focus-visible { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.themetoggle .i-sun { display: none; }
:root[data-theme="light"] .themetoggle .i-sun { display: block; }
:root[data-theme="light"] .themetoggle .i-moon { display: none; }

/* ---- readout ribbon: totals | today's status breakdown (four sum to "today") ----
   Each group is a stacked unit: an eyebrow header over a row of gauges. A single divider
   separates the two groups; the breakdown group flexes to fill so there's no dead gap. */
.ribbon { display: flex; align-items: stretch; gap: 40px; padding: 26px 0 30px; }
.ribbon .group { display: flex; flex-direction: column; }
.ribbon .group.totals { padding-right: 40px; border-right: 1px solid var(--line); flex: 0 0 auto; }
.ribbon .group.breakdown { flex: 1 1 auto; min-width: 0; }
.grp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.grp-head .asof { color: var(--ink-2); letter-spacing: .1em; font-weight: 500; text-transform: none; font-size: 11px; }
.ribbon .gauges { display: flex; align-items: flex-end; flex: 1; }
.ribbon .group.breakdown .gauges .gauge { flex: 1 1 0; min-width: 0; }
.ribbon .group.totals .gauges .gauge { flex: 0 0 auto; }
.gauge { padding-left: 26px; position: relative; }
.ribbon .group.totals .gauge { padding-left: 40px; }
.ribbon .group.totals .gauge:first-child { padding-left: 0; }
.gauge .n { font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gauge .l { margin-top: 9px; }
.gauge.today .n { color: var(--ink-0); }
.gauge.total .n { color: var(--ink-1); }
/* status counts read as a subordinate breakdown */
.gauge.st .n { display: flex; align-items: center; gap: 10px; font-size: 30px; }
.gauge .tick { width: 8px; height: 8px; border-radius: 2px; align-self: center; margin-top: -3px; }
.st-ok .tick { background: var(--ok); } .st-ok .n { color: var(--ok); }
.st-run .tick { background: var(--warn); } .st-run .n { color: var(--warn); }
.st-fail .tick { background: var(--fail); box-shadow: 0 0 12px var(--fail-glow); } .st-fail .n { color: var(--fail); }
.st-q .tick { background: var(--ink-1); } .st-q .n { color: var(--ink-1); }

/* ---- controls / filter bar ---- */
.controls { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 6px 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .micro { padding-left: 2px; }
.field input, .field select, .field textarea {
    background: var(--field-bg); border: 1px solid var(--line-2); color: var(--ink-0);
    font-family: var(--body); font-size: 13px; padding: 8px 11px; border-radius: 7px; min-width: 150px;
    outline: none;
}
.field input.mono { font-family: var(--mono); font-size: 12.5px; min-width: 290px; }
/* native datetime picker follows the theme (dark calendar in dark mode) */
.field input[type="datetime-local"] { min-width: 190px; }
:root[data-theme="dark"] .field input[type="datetime-local"] { color-scheme: dark; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.field select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }

.btn {
    font-family: var(--display); font-weight: 500; font-size: 12.5px; letter-spacing: .03em;
    padding: 9px 16px; border-radius: 7px; border: 1px solid var(--line-2);
    background: var(--panel); color: var(--ink-0); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
/* Primary CTA: solid signal fill + soft glow so it reads unambiguously live and clickable. */
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); font-weight: 600; box-shadow: 0 1px 10px var(--signal-dim); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 2px 14px var(--signal-pulse); }
.btn.primary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--signal-dim); }
/* Disabled primary must NOT look like a dimmed-blue enabled button — go fully inert grey. */
.btn.primary:disabled { background: var(--panel-2); border-color: var(--line-2); color: var(--ink-2); box-shadow: none; opacity: 1; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-1); padding: 6px 10px; }
.btn.ghost:hover { color: var(--ink-0); background: var(--panel); }
.status-msg { color: var(--ink-1); font-size: 12.5px; }

/* ---- telemetry table ---- */
/* bounded scroll region: long lists scroll internally so the ribbon/filters/pager stay put.
   The header row sticks to the top of the scroll box while rows scroll under it. */
.log-scroll { max-height: 620px; overflow-y: auto; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; }
.log-scroll .log thead th { position: sticky; top: 0; z-index: 1; background: var(--void); padding-top: 14px; }
.log { width: 100%; border-collapse: collapse; }
.log thead th {
    text-align: left; padding: 0 16px 11px; border-bottom: 1px solid var(--line);
    font-family: var(--display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2);
}
.log thead th.r { text-align: right; }
.log tbody tr { border-bottom: 1px solid var(--line); transition: background .12s; }
.log tbody tr:hover { background: var(--hover-row); }
.log td { padding: 11px 16px; vertical-align: middle; }

/* status edge bar — always the same color as this row's status dot */
.chan { width: 0; padding: 0 !important; position: relative; }
.chan i { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--ink-2); }
.log tbody tr.row-succeeded .chan i { background: var(--ok); }
.log tbody tr.row-queued .chan i { background: var(--ink-1); }
.log tbody tr.row-running .chan i { background: var(--warn); }
.log tbody tr.row-failed .chan i { background: var(--fail); box-shadow: 0 0 9px var(--fail-glow); }
/* MigrationRequestStatus row markers: Pending ~= Queued (neutral), Initiated ~= Running (in flight). */
.log tbody tr.row-pending .chan i { background: var(--ink-1); }
.log tbody tr.row-initiated .chan i { background: var(--warn); }
/* trigger results: edge bar matches the outcome dot */
.log tbody tr.row-accepted .chan i { background: var(--ok); }
.log tbody tr.row-rejected .chan i { background: var(--fail); box-shadow: 0 0 9px var(--fail-glow); }

/* user cell: member name as the primary line, the id a subordinate mono line beneath */
.usercell { display: flex; flex-direction: column; gap: 2px; }
.usercell .uname { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--ink-0); }
.uid { font-family: var(--mono); font-size: 12.5px; color: var(--ink-0); display: inline-flex; align-items: center; gap: 8px; }
.uid.sub { font-size: 11.5px; color: var(--ink-1); }
.uid .frag { color: var(--ink-2); }
.uid .copy {
    border: none; background: transparent; color: var(--ink-2); cursor: pointer; padding: 2px;
    display: inline-flex; opacity: 0; transition: opacity .12s, color .12s;
}
.log tbody tr:hover .uid .copy { opacity: 1; }
.uid .copy:hover { color: var(--ink-0); }
.uid .copy.copied { color: var(--ok); opacity: 1; }
/* correlation-id variant: show the full value in muted mono, copy reveals on row hover like the uid */
.uid.corr { color: var(--ink-2); }
.uid.corr .frag { color: var(--ink-2); }

.surface { display: inline-flex; align-items: center; gap: 8px; }
.surface .sdot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.surface.s-ire .sdot { background: var(--signal); }
.surface.s-self .sdot { background: var(--chan-self); box-shadow: 0 0 0 2px var(--chan-self-dim); }
.surface .lbl { font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .04em; color: var(--ink-1); }

.stat { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.stat .d { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.stat.s-succeeded { color: var(--ok); } .stat.s-succeeded .d { background: var(--ok); }
.stat.s-queued { color: var(--ink-1); } .stat.s-queued .d { background: var(--ink-1); }
.stat.s-running { color: var(--warn); } .stat.s-running .d { background: var(--warn); animation: runpulse 1.6s infinite; }
.stat.s-failed { color: var(--fail); } .stat.s-failed .d { background: var(--fail); box-shadow: 0 0 0 3px var(--fail-glow); }
/* MigrationRequestStatus reuses this pill: Pending ~= Queued (waiting), Initiated ~= Running (in flight). */
.stat.s-pending { color: var(--ink-1); } .stat.s-pending .d { background: var(--ink-1); }
.stat.s-initiated { color: var(--warn); } .stat.s-initiated .d { background: var(--warn); animation: runpulse 1.6s infinite; }
@keyframes runpulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--warn-pulse); } 50% { opacity: .55; box-shadow: 0 0 0 4px transparent; } }

.by { color: var(--ink-1); font-size: 13px; }
.when { font-family: var(--mono); font-size: 12px; color: var(--ink-1); }
.when.none { color: var(--ink-2); }

/* whole-row-clickable: the entire job row navigates to detail; a chevron marks the affordance */
.log tbody tr.clickable { cursor: pointer; }
.rowact { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }
.rowact .go { display: inline-flex; color: var(--ink-2); transition: color .12s, transform .12s; }
.log tbody tr.clickable:hover .go { color: var(--signal); transform: translateX(2px); }
/* .act = the one blue-outlined action button. Standalone so it styles the same in a row or a header. */
.act {
    font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .03em;
    padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
    border: 1px solid var(--signal); background: var(--signal-dim); color: var(--signal);
}
.act:hover { background: var(--signal); color: var(--signal-ink); }
.act:disabled { opacity: .5; cursor: default; }
/* in a row, hold a fixed slot so Detail links stay column-aligned even with no primary action */
.rowact .act { min-width: 104px; text-align: center; }
.rowact .act.none { border-color: transparent; background: transparent; cursor: default; pointer-events: none; }

/* ---- empty state ---- */
.empty { text-align: center; padding: 80px 0 90px; }
.empty .scope { width: 44px; height: 44px; margin: 0 auto 20px; border: 1.5px solid var(--line-2); border-radius: 50%; position: relative; }
.empty .scope::before { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: var(--signal); animation: spin 3s linear infinite; }
.empty .scope::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.empty h3 { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--ink-0); margin: 0 0 6px; }
.empty p { color: var(--ink-1); margin: 0; font-size: 13px; }

/* ---- pager ---- */
.pager { display: flex; align-items: center; gap: 18px; padding: 22px 16px 4px; }
.btn.loadmore { color: var(--signal); border-color: var(--signal-dim); background: transparent; }
.btn.loadmore:hover { background: var(--signal-dim); filter: none; }
.btn.loadmore:disabled { color: var(--ink-2); border-color: var(--line); cursor: default; opacity: 1; }
.pager-meta { color: var(--ink-2); }

footer.ft { padding: 34px 0 40px; color: var(--ink-2); font-size: 11px; font-family: var(--mono); }

/* ---- login ---- */
.login-shell { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--panel); padding: 30px; border-radius: 12px; box-shadow: 0 8px 30px var(--shadow); width: 340px; border: 1px solid var(--line); }
.login-card h1 { font-size: 18px; margin: 0 0 4px; color: var(--ink-0); }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-1); }
.login-card input { background: var(--field-bg); border: 1px solid var(--line-2); color: var(--ink-0); padding: 9px 11px; border-radius: 7px; font-family: var(--body); font-size: 13px; outline: none; }
.login-card input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.login-card button { font-family: var(--display); font-weight: 600; font-size: 13px; padding: 10px; border-radius: 7px; border: 1px solid var(--signal); background: var(--signal); color: var(--signal-ink); cursor: pointer; }
.login-card button:hover { filter: brightness(1.1); }

/* ---- shared page header (title + subtitle + optional back) ---- */
.pagehead { padding: 26px 0 8px; }
.pagehead .back { font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .04em; color: var(--ink-1); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.pagehead .back:hover { color: var(--ink-0); }
.pagehead h1 { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -.01em; margin: 0; color: var(--ink-0); }
.pagehead .sub { color: var(--ink-1); font-size: 13px; margin: 7px 0 0; max-width: 720px; }

/* ---- job detail ---- */
.detail-top { display: flex; align-items: center; gap: 18px; padding: 24px 0 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.detail-top .jobid { font-family: var(--mono); font-size: 15px; color: var(--ink-0); }
.detail-top .jobid .lbl { display: block; font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 5px; }
.detail-top .spacer { flex: 1; }

/* spec strip — key facts as instrument readouts */
.spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 34px; padding: 26px 0 30px; }
.spec .item .k { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.spec .item .v { margin-top: 7px; font-size: 14px; color: var(--ink-0); }
.spec .item .v.mono { font-family: var(--mono); font-size: 13px; }
.spec .item .v.none { color: var(--ink-2); }
.spec .item .v.copyable { display: inline-flex; align-items: center; gap: 8px; }
.spec .item .v.copyable .copy { border: none; background: transparent; color: var(--ink-2); cursor: pointer; padding: 2px; display: inline-flex; transition: color .12s; }
.spec .item .v.copyable .copy:hover { color: var(--ink-0); }

/* technical refs — copyable monospace rows */
.refs { border-top: 1px solid var(--line); padding: 22px 0 6px; display: flex; flex-direction: column; gap: 14px; }
.ref { display: flex; align-items: center; gap: 14px; }
.ref .k { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); width: 130px; flex: 0 0 auto; }
.ref .v { font-family: var(--mono); font-size: 12.5px; color: var(--ink-1); word-break: break-all; }
.ref a.blob-link { color: var(--signal); text-decoration: none; }
.ref a.blob-link:hover { text-decoration: underline; }
.ref .ref-note { font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.ref .copy { border: none; background: transparent; color: var(--ink-2); cursor: pointer; padding: 2px; display: inline-flex; }
.ref .copy:hover { color: var(--ink-0); }
.ref .copy.copied { color: var(--ok); }

/* failure callout */
.failure { margin: 24px 0 4px; padding: 14px 16px; border-radius: 9px; border: 1px solid var(--fail); background: var(--fail-glow); display: flex; gap: 12px; align-items: flex-start; }
.failure .icon { color: var(--fail); flex: 0 0 auto; margin-top: 1px; }
.failure .msg .t { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fail); }
.failure .msg .d { margin-top: 4px; font-size: 13px; color: var(--ink-0); }

/* related activity — member's export events, grouped by flow; order + node color carry meaning */
.sec-label { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 34px 0 4px; }
.sec-note { color: var(--ink-1); font-size: 12.5px; margin: 0 0 8px; max-width: 640px; }
/* bounded scroll for a long related-activity history; keeps the page from growing without limit */
.timeline-scroll { max-height: 460px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px 8px; margin-top: 8px; }
.timeline-scroll .tl-group:first-child { margin-top: 12px; }
.tl-group { margin-top: 18px; }
.tl-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tl-group-head .lbl { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-1); }
.tl-group-head .this-job { font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); border: 1px solid var(--signal-dim); background: var(--signal-dim); padding: 2px 7px; border-radius: 4px; }
/* a flow that maps to another job navigates to it on click */
.tl-group-head.linkable { cursor: pointer; }
.tl-group-head.linkable:hover .lbl { color: var(--ink-0); }
.tl-group-head .open-flow { display: inline-flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); transition: color .12s, transform .12s; }
.tl-group-head.linkable:hover .open-flow { color: var(--signal); transform: translateX(2px); }
.timeline { position: relative; margin: 0 0 4px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 14px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; padding: 0 0 18px; }
/* the node is a real element (not ::before) so it can carry a tooltip explaining its color */
.tl-dot { position: absolute; left: -24px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--void); border: 2px solid var(--signal); cursor: help; }
/* semantic node tints — reuse the status palette, no new hues */
.tl-item.k-done .tl-dot { border-color: var(--ok); background: var(--ok); }
.tl-item.k-fail .tl-dot { border-color: var(--fail); background: var(--fail); box-shadow: 0 0 8px var(--fail-glow); }
.tl-item.k-pull .tl-dot { border-color: var(--signal); }
.tl-item.k-self .tl-dot { border-color: var(--chan-self); }
.tl-item.k-req .tl-dot { border-color: var(--signal); }
.tl-item .tl-act { font-family: var(--display); font-size: 13px; font-weight: 500; color: var(--ink-0); display: inline-flex; align-items: center; gap: 9px; }
.tl-item .tl-act .delta { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink-1); background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; letter-spacing: 0; }
.tl-item .meta { margin-top: 3px; font-size: 12px; color: var(--ink-1); display: flex; gap: 14px; flex-wrap: wrap; }
.tl-item .meta .mono { font-family: var(--mono); color: var(--ink-1); }

/* ---- trigger ---- */
.trigger-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 22px; }
.results-col .results-empty { color: var(--ink-2); font-size: 13px; padding: 2px 0; }
.form-col { max-width: 560px; }
.segment { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 3px; background: var(--panel); }
.segment button { font-family: var(--display); font-size: 12.5px; font-weight: 500; letter-spacing: .03em; color: var(--ink-1); background: transparent; border: none; padding: 7px 16px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.segment button .sdot { width: 7px; height: 7px; border-radius: 2px; }
.segment button.on { color: var(--ink-0); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.segment button.ire .sdot { background: var(--signal); }
.segment button.self .sdot { background: var(--chan-self); box-shadow: 0 0 0 2px var(--chan-self-dim); }
.ta-wrap { margin-top: 22px; }
.ta-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.ta-count { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.ta-count.over { color: var(--fail); }
textarea.ids { width: 100%; background: var(--field-bg); border: 1px solid var(--line-2); color: var(--ink-0); font-family: var(--mono); font-size: 12.5px; padding: 12px 13px; border-radius: 8px; outline: none; resize: vertical; line-height: 1.7; }
textarea.ids:focus { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }

/* member confirm card (single id) */
.member { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--panel); display: flex; align-items: center; gap: 16px; }
.member .avatar { width: 38px; height: 38px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: var(--ink-1); flex: 0 0 auto; }
.member .name { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--ink-0); }
.member .email { font-size: 12.5px; color: var(--ink-1); margin-top: 2px; }
.member .spacer { flex: 1; }
.member .access { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .03em; }
.member .access .d { width: 7px; height: 7px; border-radius: 50%; }
.member .access.yes { color: var(--ok); } .member .access.yes .d { background: var(--ok); }
.member .access.no { color: var(--fail); } .member .access.no .d { background: var(--fail); }
.member.notfound { color: var(--fail); font-family: var(--display); font-size: 13px; }

.run-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; }

/* confirmation bar before firing */
.confirm { margin-top: 18px; border: 1px solid var(--signal-dim); background: var(--signal-dim); border-radius: 10px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.confirm .txt { font-size: 13px; color: var(--ink-0); } .confirm .txt b { font-family: var(--display); }
.confirm .spacer { flex: 1; }

/* results table reuses .log; outcome marks */
.outcome { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 12px; font-weight: 500; }
.outcome .d { width: 8px; height: 8px; border-radius: 50%; }
.outcome.ok { color: var(--ok); } .outcome.ok .d { background: var(--ok); }
.outcome.no { color: var(--fail); } .outcome.no .d { background: var(--fail); }
.result-detail { color: var(--ink-1); font-size: 12.5px; }
.result-detail.mono { font-family: var(--mono); font-size: 12px; }

/* ---- timezone-resolving spinner (see ViewerTimeZone/TimeSpinner) ---- */
.ts-spin {
    display: inline-block; width: 11px; height: 11px;
    border: 2px solid var(--line-2); border-top-color: var(--signal);
    border-radius: 50%;
    animation: ts-spin .7s linear infinite;
    vertical-align: -1px;
}
@keyframes ts-spin { to { transform: rotate(360deg); } }

/* ---- responsive ---- */
@media (max-width: 1080px) {
    .ribbon { flex-direction: column; gap: 26px; }
    .ribbon .group.totals { padding-right: 0; margin-right: 0; border-right: none; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
    .ribbon .group { width: 100%; }
}
@media (max-width: 960px) {
    .trigger-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 820px) {
    .spec { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .shell { padding: 0 20px; }
    nav.main { display: none; }
    .log thead { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
