/* JobFleet Console — one stylesheet, no build step, no external fonts (works offline, strict CSP). */

:root {
  --paper: #f5f6f8;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5b6675;
  --line: #dce1e8;
  --line-strong: #c3cbd6;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e6eefb;
  --ok: #1e7f4f;
  --ok-soft: #e3f3ea;
  --warn: #9a6512;
  --warn-soft: #fbf0dc;
  --bad: #b42318;
  --bad-soft: #fbe6e4;
  --idle: #6b7686;
  --idle-soft: #eceff3;
  --focus: #1f5fbf;
  --display: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --rail: 208px;
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11161d;
    --surface: #18202a;
    --ink: #e6eaf0;
    --muted: #97a3b4;
    --line: #2a3441;
    --line-strong: #3a4656;
    --accent: #6ea2f2;
    --accent-ink: #0d1520;
    --accent-soft: #1c2c45;
    --ok: #5cc98f;
    --ok-soft: #173326;
    --warn: #e2b155;
    --warn-soft: #3a2e17;
    --bad: #f08a80;
    --bad-soft: #3d1d1b;
    --idle: #97a3b4;
    --idle-soft: #232c38;
    --focus: #8ab6f7;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: 0.005em; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 16px; text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.brand b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.brand span { display: block; font-size: .78rem; color: var(--muted); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: .93rem;
}
.nav a:hover { background: var(--idle-soft); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: .85rem; }
.rail-foot form { margin-top: 6px; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; max-width: 1280px; }
.pagehead { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.pagehead p { margin: 4px 0 0; color: var(--muted); }
.topbar { display: none; }
.tabbar { display: none; }

/* ---------------------------------------------------------------- building blocks */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.grid-2 > .panel + .panel, .grid-3 > .panel + .panel, .grid-2 > * + *, .grid-3 > * + * { margin-top: 0; }
.panel h2 { font-size: 1.1rem; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mt { margin-top: 16px; }
.panel.fleet { margin-bottom: 18px; border-left: 4px solid var(--accent); }
.mt-s { margin-top: 12px; }
.mb { margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 .9rem/1.2 var(--body); cursor: pointer; text-decoration: none;
  min-height: 38px;
}
.btn:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: currentColor; }
.btn.ghost { border-color: transparent; background: transparent; padding-inline: 8px; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }

form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 15px/1.4 var(--body);
}
textarea { min-height: 140px; resize: vertical; }
textarea.code { font: 13px/1.5 var(--mono); min-height: 420px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: 18px; height: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }

.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; font-size: .93rem; }
.flash.info { background: var(--accent-soft); border-color: transparent; }
.flash.success { background: var(--ok-soft); border-color: transparent; color: var(--ink); }
.flash.error { background: var(--bad-soft); border-color: transparent; color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--idle-soft); color: var(--ink); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.badge.s-ready, .badge.good { background: var(--ok-soft); }
.badge.s-ready::before, .badge.good::before, .badge.s-offer::before, .badge.s-accepted::before { background: var(--ok); }
.badge.s-needs_review, .badge.warn, .badge.s-preparing { background: var(--warn-soft); }
.badge.s-needs_review::before, .badge.warn::before { background: var(--warn); }
.badge.s-preparing::before { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.badge.s-rejected, .badge.bad, .badge.s-withdrawn { background: var(--bad-soft); }
.badge.s-rejected::before, .badge.bad::before { background: var(--bad); }
.badge.s-submitted, .badge.s-screening, .badge.s-interview, .badge.s-offer, .badge.s-accepted { background: var(--accent-soft); }
.badge.s-submitted::before, .badge.s-screening::before, .badge.s-interview::before { background: var(--accent); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .badge.s-preparing::before { animation: none; } }

.chip { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--idle-soft); font-size: .8rem; margin: 0 4px 4px 0; }
.chip.ok { background: var(--ok-soft); }
.chip.miss { background: var(--warn-soft); }
.chip.no { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

.score { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; }
.score .num { font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1; grid-row: span 2; min-width: 2.4ch; }
.score .num small { font-size: .9rem; color: var(--muted); font-family: var(--body); }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--idle-soft); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--idle-soft); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
progress.ok::-webkit-progress-value { background: var(--ok); }
progress.ok::-moz-progress-bar { background: var(--ok); }
progress.warn::-webkit-progress-value { background: var(--warn); }
progress.warn::-moz-progress-bar { background: var(--warn); }
progress.bad::-webkit-progress-value { background: var(--bad); }
progress.bad::-moz-progress-bar { background: var(--bad); }
.minibar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.minibar b { min-width: 3ch; text-align: right; font-weight: 600; }
.minibar progress { height: 6px; }

/* ---------------------------------------------------------------- the pipeline board (dashboard signature) */
.board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; }
.board a { position: relative; display: block; padding: 16px 16px 14px; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); }
.board a:last-child { border-right: 0; }
.board a:hover { background: var(--idle-soft); }
.board .n { font-family: var(--display); font-size: 2.5rem; font-weight: 600; line-height: 1; display: block; }
.board .l { font-size: .85rem; color: var(--muted); }
.board a.hot .n { color: var(--accent); }
.board a.warm .n { color: var(--warn); }
.board a::after { content: ""; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.board a:last-child::after { display: none; }
.board a:hover::after { background: var(--idle-soft); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 14px; }
.kpis div { padding: 12px 4px 0; }
.kpis b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.kpis span { font-size: .82rem; color: var(--muted); }

.chart { width: 100%; height: auto; display: block; }
.chart rect.bar { fill: var(--accent); }
.chart rect.bar.zero { fill: var(--line); }
.chart text { fill: var(--muted); font: 11px var(--body); }
.chart text.v { fill: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .t { font-weight: 600; color: var(--ink); text-decoration: none; }
.list .t:hover { color: var(--accent); }
.list .s { font-size: .85rem; color: var(--muted); }
.empty { color: var(--muted); padding: 18px 0 6px; }
.empty a { font-weight: 600; }

.filterbox > summary { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; flex: 1 1 150px; }
.filters .field.wide { flex: 2 1 240px; }
.filters details { flex-basis: 100%; }
.filters summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
.statusbox { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 8px; }
.statusbox label { font-weight: 400; display: flex; gap: 6px; align-items: center; margin: 0; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th a { color: inherit; text-decoration: none; }
table.data th a[aria-sort] { color: var(--ink); }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--idle-soft); }
table.data .role a { font-weight: 600; color: var(--ink); text-decoration: none; }
table.data .role a:hover { color: var(--accent); }
table.data .role span { display: block; font-size: .84rem; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .9rem; }

/* ---------------------------------------------------------------- application detail */
.jobhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.meta b { color: var(--ink); font-weight: 600; }
.kit { border: 2px solid var(--accent); }
.kit ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.kit li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.kit li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .85rem; margin-top: 2px; }
.kit .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.working { display: flex; gap: 12px; align-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 0 0 10px; }
.checks { margin: 6px 0 0; padding-left: 1.2rem; }
.checks li { margin-bottom: 3px; }
.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.issues li { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--idle-soft); font-size: .9rem; }
.issues li.blocker { background: var(--bad-soft); }
.issues li.warning { background: var(--warn-soft); }
.issues q { display: block; color: var(--muted); font-size: .84rem; margin-top: 3px; quotes: "“" "”"; }
.doc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doc > summary { padding: 11px 14px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; list-style: none; }
.doc > summary::-webkit-details-marker { display: none; }
.doc > summary::after { content: "Show"; font-weight: 400; color: var(--accent); font-size: .85rem; }
.doc[open] > summary::after { content: "Hide"; }
.doc + .doc { margin-top: 8px; }
.prose { padding: 4px 18px 16px; max-width: 78ch; }
.prose h2, .prose h3, .prose h4 { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; margin: .3rem 0 .6rem; }
.prose li { margin-bottom: .25rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.timeline time { color: var(--muted); font-size: .84rem; }
pre.jd { white-space: pre-wrap; font: .9rem/1.55 var(--body); max-height: 520px; overflow: auto; margin: 0; padding: 4px 18px 16px; }
table.rounds td, table.rounds th { padding: 7px 10px; }

/* ---------------------------------------------------------------- sources */
.sources { display: grid; gap: 10px; }
.source { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.source .rank { font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: var(--muted); text-align: center; }
.source h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.source p { margin: 4px 0 0; font-size: .9rem; }
.source .terms { color: var(--muted); font-size: .84rem; }
.source .ops { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 140px; }
.source .boards { margin-top: 8px; font-size: .88rem; }
.source .boards form.row { margin-top: 6px; }
.source .boards .field { flex: 1 1 120px; }
.mode { font-size: .75rem; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--idle-soft); color: var(--muted); }
.mode.api, .mode.rss, .mode.public, .mode.browser { background: var(--ok-soft); color: var(--ok); }

/* ---------------------------------------------------------------- auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .panel { width: min(420px, 100%); padding: 28px; }
.auth .brand { padding: 0 0 18px; }
.token { font: 13px/1.5 var(--mono); padding: 10px 12px; background: var(--idle-soft); border-radius: var(--radius-sm); word-break: break-all; }

/* ---------------------------------------------------------------- responsive: tablets */
@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board a:nth-child(4) { border-right: 0; }
  .board a:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .board a:nth-child(4)::after { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- responsive: phones */
@media (max-width: 820px) {
  body { font-size: 15.5px; }
  .shell { display: block; }
  .rail { display: none; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .brand span { display: none; }
  .main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar summary { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: .72rem; color: var(--muted); text-decoration: none; cursor: pointer; list-style: none; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .tabbar .add svg { color: var(--accent); }
  .tabbar details { position: relative; }
  .more { position: absolute; right: 8px; bottom: calc(100% + 8px); width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 8px 28px rgba(15, 25, 40, .18); }
  .more a, .more button { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: .95rem; color: var(--ink); border-radius: var(--radius-sm); background: none; border: 0; font-family: inherit; }
  .more a:hover { background: var(--idle-soft); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board a { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .board a:nth-child(2n) { border-right: 0; }
  .board a::after { display: none; }
  .board .n { font-size: 2rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .kpis b { font-size: 1.3rem; }
  h1 { font-size: 1.45rem; }
  .pagehead { margin-bottom: 14px; }

  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  table.responsive td { border: 0; padding: 0; }
  table.responsive td.role { grid-column: 1 / -1; }
  table.responsive td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); }
  table.responsive td.hide-sm { display: none; }
  .source { grid-template-columns: 30px 1fr; }
  .source .ops { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .filters .field { flex: 1 1 100%; }
  .filterbox > summary.filter-toggle { display: block; cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
}

/* Add a job: links, the paste fallback, recent links */
details.paste { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
details.paste > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.paste[open] > summary { margin-bottom: 10px; }
.list .grow { flex: 1 1 auto; min-width: 0; }
.grid-2 > * { min-width: 0; }
.linkcut { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px/1.5 var(--mono); }

@media print {
  .rail, .topbar, .tabbar, .btn, form { display: none !important; }
  .shell { display: block; }
  .panel { border: 0; }
}

/* ---------------------------------------------------------------- agents: activities, approvals, sign-ins */
.nav a .count, .tabbar .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; }
.topbar-alert { font-weight: 700; color: var(--bad); text-decoration: none; background: var(--bad-soft); padding: 5px 10px; border-radius: 999px; font-size: .85rem; }
.panel.approve { border-left: 4px solid var(--warn); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--warn-soft); }
.panel.onboard { border-left: 4px solid var(--accent); }
.panel.narrow { max-width: 760px; }
.agent-apply { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; margin: 0 0 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.agent-apply.ok { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.agent-apply .muted { display: block; font-size: .88rem; }
.agent-runs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.runs { display: grid; gap: 8px; }
.run { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.run:hover { border-color: var(--line-strong); }
.run-main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-main .s { font-size: .84rem; color: var(--muted); }
.run-agent { font-size: .8rem; font-weight: 600; color: var(--muted); }
.run-agent.a-apply { color: var(--accent); }
.badge.r-done, .badge.r-submitted { background: var(--ok-soft); color: var(--ok); }
.badge.r-failed { background: var(--bad-soft); color: var(--bad); }
.badge.r-blocked, .badge.r-needs_you, .badge.r-awaiting_approval { background: var(--warn-soft); color: var(--warn); }
.badge.r-running, .badge.r-approved { background: var(--accent-soft); color: var(--accent); }
.badge.big { font-size: .95rem; padding: 6px 12px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.log { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.log li { display: grid; grid-template-columns: 70px 92px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.log time { color: var(--muted); font: 12px/1.4 var(--mono); }
.log .kind { font-weight: 600; font-size: .8rem; color: var(--muted); }
.log .what { min-width: 0; }
.log .msg { display: block; }
.log .code { font: 12px var(--mono); padding: 0 5px; border-radius: 3px; background: var(--idle-soft); }
.log .code.c2 { background: var(--ok-soft); color: var(--ok); }
.log .code.c4, .log .code.c5 { background: var(--bad-soft); color: var(--bad); }
.log li.k-sign_in .kind, .log li.k-sign_out_verified .kind { color: var(--ok); }
.log li.k-sign_out_unverified .kind, .log li.k-human_check .kind, .log li.k-error .kind, .log li.k-blocked .kind { color: var(--bad); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
img.shot { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); display: block; }
img.shot.big { max-width: 720px; }
.decide { gap: 12px; margin-top: 12px; }
.btn.big { padding: 12px 20px; font-size: 1rem; }
.install-hint { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 14px; background: var(--accent-soft); border-radius: var(--radius); font-size: .92rem; }
.install-hint[hidden] { display: none; }
.crumb { margin: 0 0 4px; font-size: .88rem; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.field legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.row .grow, .field.grow { flex: 1 1 220px; }

@media (max-width: 820px) {
  .run { grid-template-columns: 1fr auto; }
  .run-agent { grid-column: 1 / -1; }
  .log li { grid-template-columns: 62px 1fr; }
  .log .what { grid-column: 1 / -1; }
  .tabbar a.with-count { position: relative; }
  .tabbar .count { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
  .decide .btn.big { width: 100%; }
  .decide form { flex: 1 1 100%; }
  .agent-apply form, .agent-apply .btn { width: 100%; }
}
.run-main { min-width: 0; }
.list .grow > .s { display: block; }
@media (max-width: 820px) {
  .run { grid-template-columns: minmax(0, 1fr) auto; }
  .run-main b { white-space: normal; }
}
