/* PinCard — operations console for turning feed articles into Google Sites cards.
   Layout: fixed sidebar + one working column; the dashboard leads with the
   four-stage pipeline strip (the one bold element), everything else stays quiet.
   Accent = the paprika red of the recipe card's own "Jump to recipe" button. */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #edf0f4;
  --line: #dce1e8;
  --fg: #141922;
  --fg-2: #586273;
  --accent: #c9361d;
  --accent-soft: #fbe7e2;
  --on-accent: #ffffff;
  --ok: #15803d;   --ok-soft: #dcf3e4;
  --warn: #9a5b00; --warn-soft: #fcefd3;
  --err: #bf2430;  --err-soft: #fde2e3;
  --info: #1f58c7; --info-soft: #e0e9fb;
  --focus: #1f58c7;
  --shadow: 0 1px 2px rgba(20, 25, 34, .06), 0 4px 16px rgba(20, 25, 34, .05);
  --font: "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Fira Code", Consolas, "Cascadia Mono", monospace;
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1016; --surface: #151a22; --surface-2: #1c222d; --line: #283040;
    --fg: #e8ecf2; --fg-2: #97a2b4;
    --accent: #ec5a38; --accent-soft: #3a1c15; --on-accent: #ffffff;
    --ok: #4ccf8a; --ok-soft: #13301f; --warn: #f2b440; --warn-soft: #33270e;
    --err: #f47373; --err-soft: #3b1719; --info: #7fb0ff; --info-soft: #172642;
    --focus: #7fb0ff; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1016; --surface: #151a22; --surface-2: #1c222d; --line: #283040;
  --fg: #e8ecf2; --fg-2: #97a2b4;
  --accent: #ec5a38; --accent-soft: #3a1c15; --on-accent: #ffffff;
  --ok: #4ccf8a; --ok-soft: #13301f; --warn: #f2b440; --warn-soft: #33270e;
  --err: #f47373; --err-soft: #3b1719; --info: #7fb0ff; --info-soft: #172642;
  --focus: #7fb0ff; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code, .mono { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent);
  padding: 10px 14px; border-radius: var(--r-md); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.main:focus { outline: none; }
dialog { overscroll-behavior: contain; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; font-size: 18px; }
.mark { width: 28px; height: 28px; flex: none; }
.mark rect { fill: var(--surface-2); stroke: var(--line); }
.mark .mark-img { fill: var(--fg-2); stroke: none; opacity: .5; }
.mark .mark-btn { fill: var(--accent); stroke: none; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav button, .theme-btn {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  background: none; border: 0; border-radius: var(--r-md); color: var(--fg-2); font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
nav button svg, .theme-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav button:hover, .theme-btn:hover { background: var(--surface-2); color: var(--fg); }
nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
nav em { margin-left: auto; font: 500 12px/1 var(--mono); font-style: normal; color: var(--fg-2); }
nav em.alert:not(:empty) { background: var(--err); color: #fff; padding: 4px 7px; border-radius: 99px; }
.theme-btn { margin-top: auto; }

.main { min-width: 0; padding: 28px clamp(16px, 3.5vw, 44px) 64px; max-width: 1320px; width: 100%; }
.tab { display: none; }
.tab.on { display: block; }
.page-h { margin-bottom: 22px; }
.page-h h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.page-h .sub { color: var(--fg-2); margin: 4px 0 0; }
.row-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand b, .theme-btn span { display: none; }
  nav { flex-direction: row; }
  nav button { padding: 0 10px; white-space: nowrap; }
  nav button span { display: none; }
  nav button.on span { display: inline; }
  .theme-btn { margin: 0 0 0 auto; }
}

/* ── Surfaces ──────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-h h2 { font-size: 16px; font-weight: 600; margin: 0; }
.card-h .link { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.muted { color: var(--fg-2); }
.hint { color: var(--fg-2); font-size: 13.5px; margin: 10px 0 0; }

/* ── Buttons & inputs ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 600;
  transition: background .15s, border-color .15s, filter .15s; white-space: nowrap; text-decoration: none; color: var(--fg);
}
.btn:hover { border-color: var(--fg-2); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--err-soft); border-color: transparent; color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.ghost { background: none; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.big { width: 100%; min-height: 50px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.link:hover { text-decoration: underline; }
input, select {
  min-height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s;
}
input:hover, select:hover { border-color: var(--fg-2); }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--info-soft); }
input::placeholder { color: var(--fg-2); opacity: .7; }
.field-l { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  min-height: 34px; padding: 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  color: var(--fg-2); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px;
}
.chips button:hover { color: var(--fg); border-color: var(--fg-2); }
.chips button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chips button b { font: 500 12px var(--mono); opacity: .8; }

/* ── Status pills ──────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-ok { background: var(--ok-soft); color: var(--ok); }
.p-warn { background: var(--warn-soft); color: var(--warn); }
.p-err { background: var(--err-soft); color: var(--err); }
.p-info { background: var(--info-soft); color: var(--info); }
.p-mute { background: var(--surface-2); color: var(--fg-2); }
.p-info.live::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ── Pipeline strip (the dashboard's lead element) ─────────────────────── */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stage { position: relative; padding: 18px 22px 18px 30px; min-width: 0; }
.stage:first-child { padding-left: 22px; }
/* Each stage points into the next one: a rotated square in the stage's own
   colour, half of it overlapping the neighbour on the right. */
.stage:not(:last-child)::after {
  content: ""; position: absolute; right: -12px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%) rotate(45deg);
  background: inherit; border-top: 1px solid var(--line); border-right: 1px solid var(--line);
}
.stage:nth-child(1) { z-index: 3; } .stage:nth-child(2) { z-index: 2; } .stage:nth-child(3) { z-index: 1; }
.stage:nth-child(odd) { background: var(--surface); }
.stage:nth-child(even) { background: var(--surface-2); }
.stage .k { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: 13.5px; font-weight: 500; }
.stage .k svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage .n { font: 600 30px/1.15 var(--mono); letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stage .d { color: var(--fg-2); font-size: 13px; }
.stage .d b { color: var(--fg); font-weight: 600; }
.stage.hot .n { color: var(--accent); }
.stage .d b.bad { color: var(--err); }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:not(:last-child)::after { display: none; }
  .stage, .stage:first-child { padding: 16px 18px; }
  .stage:nth-child(2), .stage:nth-child(3) { background: var(--surface-2); }
  .stage:nth-child(4) { background: var(--surface); }
}

/* ── Dashboard grid & run form ─────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  color: var(--fg-2); font: 600 13px var(--mono); }
.step-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; margin: 3px 0 10px; }
.links { display: flex; gap: 10px; }
.checks { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; }
.checks label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); cursor: pointer; }
.checks label:hover { background: var(--surface-2); }
.checks input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); margin: 0; }
.checks .dom { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks .meta { margin-left: auto; color: var(--fg-2); font-size: 13px; white-space: nowrap; }
.checks .lang { font: 500 11.5px var(--mono); padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--fg-2); }
.empty { color: var(--fg-2); padding: 14px 4px; }
.empty button { margin-top: 10px; }
.stepper { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.stepper button { width: 44px; min-height: 42px; border: 0; background: var(--surface-2); font-size: 18px; }
.stepper button:hover { background: var(--line); }
.stepper input { width: 64px; border: 0; border-radius: 0; text-align: center; font: 600 16px var(--mono); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.dates { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dates label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg-2); flex: 1 1 150px; }
.dates input { color: var(--fg); }
.run-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.estimate { margin: 0 0 12px; color: var(--fg-2); font-size: 14px; }
.estimate b { color: var(--fg); font-family: var(--mono); font-weight: 600; }
.blocker { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 500; }
.blocker .link { color: inherit; text-decoration: underline; padding: 0; font-size: inherit; }

/* ── Live batch ────────────────────────────────────────────────────────── */
.live { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.live .card-h .btn { margin-left: auto; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 0 0 14px; counter-reset: s; }
.stages li { counter-increment: s; font-size: 13px; color: var(--fg-2); padding-top: 10px; border-top: 3px solid var(--line); }
.stages li::before { content: counter(s) "  "; font-family: var(--mono); }
.stages li.done { border-color: var(--ok); color: var(--fg); }
.stages li.now { border-color: var(--accent); color: var(--fg); font-weight: 600; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .4s ease-out; }
.live-nums { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 14px; color: var(--fg-2); }
.live-nums b { font: 600 15px var(--mono); color: var(--fg); margin-right: 4px; }
.live-nums .bad b { color: var(--err); }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.logbox { margin-top: 12px; }
.logbox summary { cursor: pointer; color: var(--fg-2); font-size: 13.5px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.log { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin: 6px 0 0;
  font: 12.5px/1.6 var(--mono); max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.log .t { color: var(--fg-2); }
.log .warn { color: var(--warn); }
.log .error { color: var(--err); }
.log .ok { color: var(--ok); }

.mini { display: flex; flex-direction: column; }
.mini-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.mini-row:first-child { border-top: 0; padding-top: 0; }
.mini-row .id { font: 500 13px var(--mono); color: var(--fg-2); }
.mini-row .when { font-size: 13px; color: var(--fg-2); }
.mini-row .what { font-size: 14px; }
.mini-row .what b { font-family: var(--mono); font-weight: 600; }

/* ── Add bars ──────────────────────────────────────────────────────────── */
.addbar { margin-bottom: 18px; }
.addbar-in { display: flex; gap: 10px; flex-wrap: wrap; }
.addbar-in input { flex: 1 1 260px; min-height: 44px; font-size: 15px; }
.addbar-in .btn { min-height: 44px; }
.adv { margin-top: 12px; }
.adv summary { cursor: pointer; color: var(--fg-2); font-size: 13.5px; font-weight: 500; min-height: 30px; display: flex; align-items: center; }
.adv input { width: 100%; margin-top: 4px; }
.adv .field-l { margin-top: 10px; font-size: 13px; }
.result { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.result.ok { background: var(--ok-soft); color: var(--fg); }
.result.bad { background: var(--err-soft); color: var(--fg); }
.result .warnline { display: block; color: var(--warn); margin-top: 4px; }

/* ── Website cards ─────────────────────────────────────────────────────── */
.site { padding: 0; overflow: hidden; }
.site-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.site-h .dom { font-weight: 700; font-size: 16px; }
.site-h .facts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--fg-2); font-size: 13.5px; }
.site-h .facts b { color: var(--fg); font-family: var(--mono); font-weight: 500; }
.site-h .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.site.paused .site-h .dom { color: var(--fg-2); }
.site .err-line { margin: 0; padding: 10px 18px; background: var(--err-soft); color: var(--err); font-size: 13.5px; }
.site .warn-line { margin: 0; padding: 10px 18px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--fg-2); padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.tbl .mono { color: var(--fg-2); white-space: nowrap; }
.tbl input.board { width: 100%; min-width: 150px; min-height: 36px; }
.tbl input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; }
.site .tbl th { background: transparent; border-top: 1px solid var(--line); }
.title-cell { max-width: 360px; }
.title-cell a { color: var(--fg); text-decoration: none; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-cell a:hover { color: var(--accent); }
.title-cell .src { color: var(--fg-2); font-size: 12.5px; }
.gs { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.err-sm { color: var(--err); font-size: 12.5px; margin-top: 3px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed a { font-family: var(--mono); font-size: 12.5px; color: var(--fg-2); }
.feed a:hover { color: var(--accent); }
.cnt0 { color: var(--fg-2); }
.tbl-empty { padding: 36px 20px; text-align: center; color: var(--fg-2); }
.tbl-empty b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }
.mini-bar { width: 90px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.mini-bar i { display: block; height: 100%; background: var(--ok); }
.filelink { display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--mono); text-decoration: none;
  padding: 4px 10px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.filelink:hover { text-decoration: underline; }
.filelink svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Accounts ──────────────────────────────────────────────────────────── */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.acc { display: flex; flex-direction: column; gap: 14px; }
.acc-top { display: flex; align-items: flex-start; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--fg-2); font-weight: 700; font-size: 16px; text-transform: uppercase; }
.acc-top .who { min-width: 0; flex: 1; }
.acc-top .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-top .who span { font-size: 13px; color: var(--fg-2); }
.meter-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--fg-2); margin-bottom: 6px; }
.meter-l b { font-family: var(--mono); color: var(--fg); font-weight: 500; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.cap { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--fg-2); }
.cap input { width: 84px; min-height: 36px; font-family: var(--mono); }
.acc-actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.acc-actions .btn.danger { margin-left: auto; }
.acc-note { font-size: 13px; color: var(--info); background: var(--info-soft); padding: 8px 10px; border-radius: var(--r-sm); }

/* ── Articles filters ──────────────────────────────────────────────────── */
.filters { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.filters-r { display: flex; gap: 8px; flex-wrap: wrap; }
.filters-r input { width: 240px; }

/* ── Dialog & toasts ───────────────────────────────────────────────────── */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--fg);
  padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(8, 10, 14, .55); }
dialog h3 { margin: 0 0 8px; font-size: 18px; }
#dlgBody { color: var(--fg-2); font-size: 14.5px; }
#dlgBody .dates { margin-top: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); animation: tin .2s ease-out; }
.toast.bad { background: var(--err); color: #fff; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

/* ── Roles, user menu, team ────────────────────────────────────────────── */
body.role-va .admin-only { display: none !important; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.side-foot .theme-btn { margin: 0; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 8px 6px; min-width: 0; }
.me .who { min-width: 0; }
.me .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12.5px; color: var(--fg-2); }
.me-actions { display: flex; flex-direction: column; gap: 2px; }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.assign { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg-2); }
.assign select { min-height: 34px; min-width: 150px; }
.facts-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--fg-2); }
.facts-row b { font-family: var(--mono); color: var(--fg); font-weight: 500; }
.small { font-size: 13px; }
.card.paused { opacity: .65; }
.pw-form { display: flex; flex-direction: column; margin-top: 12px; }
.pw-form input { width: 100%; margin-bottom: 12px; }
.user-form input { flex: 1 1 180px; }
.user-form select { min-height: 44px; }
.assign-list { margin-top: 12px; max-height: 340px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; }
.queue-note { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--info-soft); color: var(--info); font-size: 14px; font-weight: 500; }
@media (max-width: 860px) {
  .side-foot { margin: 0 0 0 auto; flex-direction: row; border: 0; padding: 0; }
  .me { display: none; }
  .me-actions { flex-direction: row; }
  .me-actions .theme-btn span { display: none; }
}
