/* VulnScan — operations console.
   Dense, dark, keyboard-friendly. Optimised for reading a lot of rows. */

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2128;
  --border: #30363d;
  --border-soft: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --dim: #6e7681;
  --accent: #58a6ff;
  --accent-dim: #1f6feb;
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --purple: #bc8cff;

  --sev-critical: #f85149;
  --sev-high: #fd7e14;
  --sev-medium: #d29922;
  --sev-low: #58a6ff;
  --sev-info: #8b949e;
  /* Text set ON a saturated fill (severity badges, risk scores, grades):
     dark on the bright dark-theme fills, white on the deeper light-theme ones. */
  --on-fill: #0d1117;

  --radius: 6px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* Light theme, the default (index.html / login.html set it before first
   paint unless the viewer chose dark, persisted per-browser). Only the tokens
   are redefined -- every component reads them. GitHub's light palette, a
   sibling of the dark one the console was designed from. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f6f8fa;
  --panel-2: #eaeef2;
  --border: #d0d7de;
  --border-soft: #e4e8ec;
  --text: #1f2328;
  --muted: #59636e;
  --dim: #818b98;
  --accent: #0969da;
  --accent-dim: #0969da;
  --green: #1a7f37;
  --amber: #9a6700;
  --red: #cf222e;
  --purple: #8250df;

  --sev-critical: #cf222e;
  --sev-high: #bc4c00;
  --sev-medium: #9a6700;
  --sev-low: #0969da;
  --sev-info: #59636e;
  --on-fill: #ffffff;

  color-scheme: light;
}

/* The scan console keeps its black terminal ground in both themes, so its
   line colours keep the dark palette too (light-theme tokens are too deep
   to read on black). */
:root[data-theme="light"] .console {
  --accent: #58a6ff;
  --purple: #bc8cff;
  --red: #f85149;
  --amber: #d29922;
  --green: #3fb950;
  --dim: #6e7681;
  --sev-high: #fd7e14;
}

/* --- risk score breakdown (finding drawer) ------------------------------- */
.risk-panel .risk-top { display: flex; align-items: center; gap: 16px; margin: 4px 0 12px; }
.risk-score {
  font-size: 30px; font-weight: 700; line-height: 1; padding: 10px 14px;
  border-radius: var(--radius); min-width: 64px; text-align: center;
  border: 1px solid var(--border); font-variant-numeric: tabular-nums;
}
.risk-score.b-critical { color: var(--sev-critical); border-color: var(--sev-critical); }
.risk-score.b-high     { color: var(--sev-high);     border-color: var(--sev-high); }
.risk-score.b-medium   { color: var(--sev-medium);   border-color: var(--sev-medium); }
.risk-score.b-low      { color: var(--green);        border-color: var(--green); }
.risk-score.b-info     { color: var(--muted); }
.risk-facs { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.risk-facs b { color: var(--text); font-variant-numeric: tabular-nums; }
.risk-band { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.risk-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.risk-reasons li { display: flex; gap: 9px; align-items: baseline; font-size: 13px; }
.risk-reasons .rz-mk { flex: none; width: 14px; text-align: center; font-size: 11px; }
.rz-raise .rz-mk { color: var(--sev-high); }
.rz-lower .rz-mk { color: var(--green); }
.rz-floor .rz-mk { color: var(--accent); }
.rz-info  .rz-mk { color: var(--dim); }
.rz-lower { color: var(--muted); }

.accepted-note { font-size: 12px; color: var(--muted); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12px; }

/* ---------- layout ---------- */

#app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }

aside {
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.brand h1 { margin: 0; font-size: 15px; letter-spacing: .3px; }
.brand .chain {
  margin-top: 4px;
  font-size: 10px;
  color: var(--dim);
  font-family: var(--mono);
}

nav { padding: 8px; flex: 1; overflow-y: auto; }
nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
}
nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
nav a.active { background: var(--accent-dim); color: #fff; }
nav a .badge { margin-left: auto; }
nav .group-label {
  padding: 14px 10px 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--dim);
}

.sidebar-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--dim);
}
.sidebar-foot .dot { margin-right: 6px; }
.live-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.live-row #live-updated { font-size: 10.5px; }
/* Theme toggle sits at the far end of the live row. */
.live-row .theme-toggle { margin-left: auto; padding: 2px 7px; line-height: 1.2; }
button.live-on {
  border-color: #23553a;
  color: var(--green);
  position: relative;
  padding-left: 20px;
}
button.live-on::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  margin-top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.6s infinite;
}
button.live-off { color: var(--muted); padding-left: 20px; position: relative; }
button.live-off::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  margin-top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

main { padding: 20px 24px 60px; min-width: 0; }

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.page-head .sub { color: var(--muted); font-size: 12px; }
.page-head .spacer { flex: 1; }

/* ---------- primitives ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 600;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid.cols-4, .grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}

button, .btn {
  font: inherit;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--dim); text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }
button.primary:hover, .btn.primary:hover { background: #2b7ef7; }
button.danger { color: var(--red); border-color: #5c2b2b; }
button.danger:hover { background: #2d1416; }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { background: var(--panel-2); color: var(--text); }
button.sm, .btn.sm { padding: 3px 8px; font-size: 12px; }

input[type=text], input[type=number], input[type=password], input[type=search],
select, textarea {
  font: inherit;
  width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, .18);
}
textarea { font-family: var(--mono); font-size: 12px; resize: vertical; min-height: 80px; }
label.field { display: block; margin-bottom: 12px; }
label.field > span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
label.field .hint { color: var(--dim); font-weight: 400; }
label.check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  cursor: pointer;
}
label.check input { width: auto; }

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; min-width: 120px; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
tbody tr:hover { background: var(--panel-2); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable .finding-name { color: var(--accent); }
tbody tr.clickable:hover .finding-name { text-decoration: underline; }
td.pick-cell { cursor: default; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap, th.nowrap { white-space: nowrap; }
.truncate { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--dim);
  background: var(--panel);
}
.empty strong { display: block; color: var(--muted); margin-bottom: 6px; }

/* ---------- badges & stats ---------- */

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.sev { text-transform: uppercase; font-size: 10px; letter-spacing: .4px; border: none; color: var(--on-fill); }
.sev-critical { background: var(--sev-critical); }
.sev-high { background: var(--sev-high); }
.sev-medium { background: var(--sev-medium); }
.sev-low { background: var(--sev-low); }
.sev-info { background: var(--sev-info); }
.sev-unknown { background: var(--sev-info); }

.status-queued { color: var(--muted); }
.status-running { color: var(--accent); }
.status-done { color: var(--green); }
.status-failed { color: var(--red); }
.status-cancelled { color: var(--dim); }
.status-skipped { color: var(--dim); }
.status-pending { color: var(--dim); }

/* Target ownership: has the tenant proven it controls this target? */
.own { background: transparent; border-color: currentColor; }
.own-verified { color: var(--green); }
.own-legacy { color: var(--muted); }
.own-pending { color: var(--sev-medium); }
.own-revoked { color: var(--red); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }
.dot.live { background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .value { font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .delta { font-size: 11px; color: var(--dim); }

.sevbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.sevbar span { display: block; height: 100%; }
.sev-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.sev-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- log console ---------- */

.console {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  height: 420px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
}
.console .line { display: flex; gap: 9px; white-space: pre-wrap; word-break: break-word; }
.console .ts { color: #484f58; flex-shrink: 0; }
.console .lv-cmd { color: var(--purple); }
.console .lv-stage { color: var(--accent); font-weight: 600; }
.console .lv-error { color: var(--red); }
.console .lv-warn { color: var(--amber); }
.console .lv-finding { color: var(--sev-high); font-weight: 600; }
.console .lv-tool { color: var(--dim); }
.console .lv-progress { color: var(--green); }
.console .lv-info, .console .lv-system { color: #adbac7; }

/* ---------- stages ---------- */

.stages { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-chip {
  flex: 1 1 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: var(--panel-2);
}
.stage-chip .name { font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.stage-chip .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.stage-chip.running { border-color: var(--accent); }
.stage-chip.done { border-color: #23553a; }
.stage-chip.failed { border-color: #5c2b2b; }

/* ---------- drawer ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, .6);
  z-index: 40;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(720px, 94vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 41;
  overflow-y: auto;
  padding: 18px 22px 60px;
  box-shadow: -18px 0 40px rgba(1, 4, 9, .5);
}
.drawer .drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.drawer .drawer-head h3 { margin: 0; font-size: 16px; flex: 1; }
.drawer section { margin-bottom: 20px; }
.drawer section > h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
}
.drawer pre {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  overflow-x: auto;
  max-height: 320px;
  margin: 0;
}

/* ---------- misc ---------- */

.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 12px; }
.pager .spacer { flex: 1; }

.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
a.chip { text-decoration: none; }
.chip.active { color: var(--accent); border-color: var(--accent); }
.chip.warn { color: var(--amber); border-color: var(--amber); white-space: nowrap; }

.toast-host { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 240px;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(1, 4, 9, .6);
}
.toast.error { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--muted);
}
.callout.danger { border-left-color: var(--red); }
.callout strong { color: var(--text); }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 44px; }
.spark span {
  flex: 1;
  min-width: 3px;
  background: var(--accent-dim);
  border-radius: 1px 1px 0 0;
  min-height: 2px;
}
.spark span.hi { background: var(--sev-high); }

/* ---------- tree view ---------- */
:root { --s-httpx: #6a4bd0; --s-naabu: #0e8a7d; }
.tree {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 6px;
  font-size: 13px;
}
.t-root { margin-bottom: 2px; }
.t-branch { position: relative; }
.t-node {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  min-height: 28px;
}
.t-node:hover { background: var(--panel-2); }
.t-rootnode { font-weight: 600; font-size: 13.5px; }
.t-leaf { cursor: default; }
.t-leaf:hover { background: transparent; }
.t-node.t-dim { opacity: .5; }
.t-node.t-dim:hover { opacity: 1; }
.t-caret {
  width: 14px; flex-shrink: 0; color: var(--muted); font-size: 10px; text-align: center;
}
.t-caret.blank { visibility: hidden; }
.t-ico { flex-shrink: 0; font-size: 11px; }
.t-label { min-width: 0; }
a.t-label:hover { text-decoration: underline; }
.t-children {
  margin-left: 15px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.t-ports, .t-sevs { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.t-sevs { margin-left: auto; }
.t-sev {
  font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px;
  color: var(--on-fill); font-family: var(--mono);
}
.t-leaf.muted { color: var(--dim); }

.row-actions { display: flex; gap: 5px; }
.muted { color: var(--muted); }
.dimmed { color: var(--dim); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- sections, grades, insights, exposures ---------- */
.sect { margin: 26px 0 10px; font-size: 14px; font-weight: 600; }
.cards { display: flex; flex-wrap: wrap; gap: 12px; }
.cards .card { flex: 1 1 150px; }

.grade-A { --gc: var(--green); }
.grade-B { --gc: #5a9d3a; }
.grade-C { --gc: var(--amber); }
.grade-D { --gc: var(--sev-high); }
.grade-F { --gc: var(--sev-critical); }

.grade-badge {
  width: 92px; height: 92px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px; font-weight: 800; color: var(--on-fill);
  background: var(--gc, var(--dim));
}
.grade-pill {
  display: inline-block; min-width: 20px; text-align: center;
  padding: 1px 7px; border-radius: 10px; font-weight: 700; font-size: 11px;
  color: var(--on-fill); background: var(--gc, var(--dim));
}

.insight {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--text);
  padding: 7px 10px; background: var(--panel); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--dim); border-radius: 5px;
}
.insight.critical { border-left-color: var(--sev-critical); }
.insight.high { border-left-color: var(--sev-high); }
.insight.medium { border-left-color: var(--sev-medium); }

.exposure {
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius);
  padding: 12px 14px; background: var(--panel);
}
.exp-critical { border-left-color: var(--sev-critical); }
.exp-high { border-left-color: var(--sev-high); }
.exp-medium { border-left-color: var(--sev-medium); }
.exp-low { border-left-color: var(--sev-low); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* confidence badges */
.conf {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border);
}
.conf-high { color: var(--green); border-color: var(--green); }
.conf-medium { color: var(--amber); border-color: var(--amber); }
.conf-low { color: var(--dim); border-color: var(--border); }

/* ---------- read-only (role viewer) ---------- */
/* Every control that changes something. The API refuses them for a viewer
   whatever the page shows; hiding them keeps the page honest. */
body.read-only :is(
  [data-action="launch"], [data-action="scan-now"], [data-action="cancel"],
  [data-action="triage"], [data-action="bulk"], [data-action="verify"],
  [data-action="create"], [data-action="new"], [data-action="edit"],
  [data-action="save"], [data-action="delete"], [data-action="duplicate"],
  [data-action="check"], [data-action="prove"], [data-action="refresh"],
  [data-action="test"], [data-action="create-channel"],
  [data-action="update-templates"], .pick, .admin-only
) { display: none !important; }

/* ---------- operator acting as a tenant (admin console, /tenant/{id}) ---------- */
/* The user console, driven from the admin console: an amber edge on every
   page and a box naming the tenant, so nobody forgets whose data this is. */
body.acting main { border-top: 3px solid var(--amber); }
.acting-box {
  margin: 10px 12px 4px; padding: 8px 10px; border: 1px solid var(--amber);
  border-radius: 6px; font-size: 11.5px; color: var(--muted);
}
.acting-box .acting-label { color: var(--amber); font-weight: 600; text-transform: uppercase;
                            letter-spacing: .04em; font-size: 10.5px; }
.acting-box .acting-tenant { color: var(--text); font-weight: 600; font-size: 13px; margin: 2px 0; }
.acting-box .acting-slug { font-size: 11px; margin-bottom: 4px; }

/* ---------- dense Temporal view (operator console) ---------- */
/* One row per workflow: workers and schedules in a strip, the stage and
   activity ledgers as chips. Status colouring reuses the .status-* classes;
   only the chip edge differs per state. Tokens only. */
.wfd-strip {
  display: flex; flex-direction: column; gap: 8px;
  padding: 9px 14px; margin-bottom: 14px; font-size: 11.5px; color: var(--muted);
}
.wfd-strip b { color: var(--text); font-weight: 600; }
.wfd-workers { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.wfd-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.wfd-dot.on { background: var(--green); }
.wfd-dot.off { background: var(--red); }
.wfd-flow { display: flex; flex-direction: column; }
.wfd-row {
  display: grid; grid-template-columns: 210px 140px minmax(0, 1fr); gap: 14px;
  align-items: center; padding: 8px 2px; border-top: 1px solid var(--border-soft);
}
.wfd-row:first-child { border-top: 0; }
.wfd-id .t { font: 600 12.5px var(--mono); display: block; color: var(--text); }
.wfd-id .s { font-size: 11px; color: var(--dim); }
.wfd-status { font-size: 11.5px; white-space: nowrap; }
.wfd-status .dur { display: block; font: 10.5px var(--mono); color: var(--dim); }
.wfd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wfd-stage {
  font: 10.5px var(--mono); padding: 2px 7px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted);
  display: inline-flex; gap: 5px; align-items: baseline;
}
.wfd-stage i { font-style: normal; color: var(--dim); }
.wfd-stage.done { border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.wfd-stage.run { border-color: var(--accent); }
.wfd-stage.fail { border-color: var(--red); }
.wfd-stage.skip { border-style: dashed; opacity: .55; }
.wfd-ferr { grid-column: 2 / -1; font-size: 11px; color: var(--red); }
.wfd-note { grid-column: 2 / -1; font-size: 11px; color: var(--muted); }
