/* Layout: fixed left rail (navigation) + top context bar (table · data freshness · tasks)
   + scrolling work area; details open in a right-hand drawer, confirmations in a centered dialog.
   Real site (sheet_agent/web/app): a copy of prototype/app.css; additions for stage 1 are at the end of this file.
   The server's CSP has style-src 'self' without 'unsafe-inline': style="…" attributes and injected <style> elements
   are blocked. Use classes from this file (utilities at the end) or Z.css(id, text) for screen-local CSS. */
:root {
  --bg: #f2f3f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --sunken: #e9ebf0;
  --hover: #eef0f5;
  --fg: #141720;
  --fg-2: #485064;
  --fg-3: #687086;
  --line: #e0e3ea;
  --media-fg: #ffffff;
  --line-2: #cbd0db;
  --accent: #2a43d4;
  --accent-hover: #2338b8;
  --accent-fg: #ffffff;
  --accent-soft: #e7eafc;
  --accent-line: #b9c2f4;

  --ok: #1b8549;
  --ok-soft: #e1f3e8;
  --warn: #a96400;
  --warn-soft: #fbefd9;
  --bad: #c42d29;
  --bad-soft: #fbe4e3;
  --info: #08799e;
  --info-soft: #ddf1f7;

  /* sheet statuses 1..7 */
  --st-active: #1b8549;
  --st-moder: #08799e;
  --st-problem: #a96400;
  --st-queue: #6b5fc7;
  --st-ban: #c42d29;
  --st-stopped: #767e92;
  --st-reject: #b63a78;

  --font-ui: "Golos Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-display: "Unbounded", "Golos Text", "Segoe UI", system-ui, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.875rem;
  --fs-lg: 1rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.625rem;

  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 14px;
  --shadow-pop: 0 12px 32px rgba(18, 22, 40, 0.16), 0 2px 6px rgba(18, 22, 40, 0.08);
  --shadow-card: 0 1px 2px rgba(18, 22, 40, 0.05);
  --rail-w: 232px;
  --bar-h: 56px;
  --overlay: rgba(14, 17, 28, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f15;
    --surface: #151821;
    --surface-2: #191c26;
    --sunken: #10131a;
    --hover: #1e2230;
    --fg: #e6e8ef;
    --fg-2: #aeb4c4;
    --fg-3: #7c8396;
    --line: #252a37;
    --line-2: #343a4a;
    --accent: #7d8cff;
    --accent-hover: #95a1ff;
    --accent-fg: #0d0f15;
    --accent-soft: #1d2340;
    --accent-line: #3a4482;
    --ok: #4cc27f;
    --ok-soft: #13291d;
    --warn: #e4a23c;
    --warn-soft: #2e2311;
    --bad: #f0645f;
    --bad-soft: #341716;
    --info: #3cb6dc;
    --info-soft: #102a33;
    --st-active: #4cc27f;
    --st-moder: #3cb6dc;
    --st-problem: #e4a23c;
    --st-queue: #a197f0;
    --st-ban: #f0645f;
    --st-stopped: #8b92a5;
    --st-reject: #e070a8;
    --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-card: none;
    --overlay: rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f15;
  --surface: #151821;
  --surface-2: #191c26;
  --sunken: #10131a;
  --hover: #1e2230;
  --fg: #e6e8ef;
  --fg-2: #aeb4c4;
  --fg-3: #7c8396;
  --line: #252a37;
  --line-2: #343a4a;
  --accent: #7d8cff;
  --accent-hover: #95a1ff;
  --accent-fg: #0d0f15;
  --accent-soft: #1d2340;
  --accent-line: #3a4482;
  --ok: #4cc27f;
  --ok-soft: #13291d;
  --warn: #e4a23c;
  --warn-soft: #2e2311;
  --bad: #f0645f;
  --bad-soft: #341716;
  --info: #3cb6dc;
  --info-soft: #102a33;
  --st-active: #4cc27f;
  --st-moder: #3cb6dc;
  --st-problem: #e4a23c;
  --st-queue: #a197f0;
  --st-ban: #f0645f;
  --st-stopped: #8b92a5;
  --st-reject: #e070a8;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-card: none;
  --overlay: rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* icons never take the click: it always lands on the button/link around them */
svg.lucide, svg.lucide * { pointer-events: none; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.9; flex: none; vertical-align: -3px; }

/* ───────── app shell ───────── */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100%; }
.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 10px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.brand-sub { font-size: var(--fs-xs); color: var(--fg-3); }
.nav-group { display: flex; flex-direction: column; gap: 1px; padding-block: 6px; }
.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3);
  padding: 6px 10px 4px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--fg-2); background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
  font-weight: 500;
}
.nav-item:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-item .badge { margin-left: auto; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--sunken); color: var(--fg-2);
  display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none;
}
.me-name { font-weight: 600; font-size: var(--fs-sm); }
.me-sub { font-size: var(--fs-xs); color: var(--fg-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  height: var(--bar-h); display: flex; align-items: center; gap: 10px;
  padding-inline: 20px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar .spacer { flex: 1; }
/* the rail's burger: phones and tablets only (≤ 980 px, see «responsive»). Two classes: the button is also an
   .icon-btn, whose display: inline-grid comes later in this file and would show it on desktop too */
.menu-btn.icon-btn, .menu-btn { display: none; }
.table-switch {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; max-width: 340px; min-width: 0;
}
.table-switch:hover { border-color: var(--line-2); }
.table-switch .ts-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-switch .ts-sheet { color: var(--fg-3); font-size: var(--fs-sm); white-space: nowrap; }
.fresh { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.fresh-item {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--fg-2);
  padding: 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap;
}
.fresh-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.fresh-item.stale .dot { background: var(--warn); }
.fresh-item.bad .dot { background: var(--bad); }
.cmdk-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; min-width: 200px; white-space: nowrap; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--fg-3); cursor: pointer;
}
.table-switch .ts-name { min-width: 60px; }
.topbar .fresh { min-width: 0; flex: 0 1 auto; }
.cmdk-btn kbd, kbd {
  font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg-2);
}
.cmdk-btn kbd { margin-left: auto; }

.content { padding: 22px 24px 48px; min-width: 0; }
/* "acting as user" — impossible to miss on any screen */
.act-banner {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 19;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 24px; background: var(--accent); color: var(--accent-fg); font-size: var(--fs-sm);
}
.act-banner .act-text { flex: 1; min-width: 0; }
.act-banner .chip { background: color-mix(in srgb, var(--accent-fg) 18%, transparent); color: var(--accent-fg); }
.act-banner .btn { background: var(--accent-fg); color: var(--accent); border-color: var(--accent-fg); }
.act-banner .btn:hover { background: color-mix(in srgb, var(--accent-fg) 88%, var(--accent)); }
.acting-box { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.avatar.acting { background: var(--accent); color: var(--accent-fg); }
.me-role { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-left: 4px; }
.act-banner .act-short { display: none; }
:root { --act-h: 0px; }
[id] { scroll-margin-top: calc(var(--bar-h) + var(--act-h) + 12px); }
@media (max-width: 640px) {
  .act-banner { padding: 6px 12px 6px 16px; flex-wrap: nowrap; }
  .act-banner .act-long { display: none; }
  .act-banner .act-short { display: inline; }
  .act-banner .act-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .act-banner .act-exit-label { display: none; }
  .act-banner .btn { min-width: 36px; min-height: 32px; padding: 4px 8px; }
}
.proto-banner {
  display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--warn);
  background: var(--warn-soft); padding: 6px 24px; border-bottom: 1px solid var(--line);
}

/* ───────── page header ───────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); letter-spacing: 0.005em; }
.page-sub { color: var(--fg-2); margin-top: 4px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.section-title { font-size: var(--fs-lg); font-weight: 600; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); font-weight: 600; }

/* ───────── surfaces ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-title { font-weight: 600; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.divider { height: 1px; background: var(--line); margin-block: 12px; }

/* KPI */
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: var(--fs-sm); color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: var(--fs-2xl); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-delta { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.kpi-src { font-size: var(--fs-xs); color: var(--fg-3); }
.kpi .diff { white-space: normal; flex-wrap: wrap; row-gap: 0; }
.up { color: var(--ok); }
.down { color: var(--bad); }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--fg); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); background: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--hover); color: var(--fg); }
.btn-sm { padding: 4px 9px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-lg { padding: 10px 18px; font-size: var(--fs-lg); }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--fg-2); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--fg); }

/* ───────── chips, pills, badges ───────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--sunken); color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.badge.accent { background: var(--accent); color: var(--accent-fg); }
.badge.bad { background: var(--bad); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; background: var(--sunken); color: var(--fg-2); white-space: nowrap;
  border: 1px solid transparent;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.outline { background: transparent; border-color: var(--line-2); }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--line-2); }
button.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status.s1 { color: var(--st-active); }
.status.s2 { color: var(--st-moder); }
.status.s3 { color: var(--st-problem); }
.status.s4 { color: var(--st-queue); }
.status.s5 { color: var(--st-ban); }
.status.s6 { color: var(--st-stopped); }
.status.s7 { color: var(--st-reject); }
.status.s1::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-active) 22%, transparent); }

/* provenance: value with a source/time tooltip */
.src { position: relative; border-bottom: 1px dotted var(--line-2); cursor: help; }
.tip {
  position: fixed; z-index: 90; max-width: 320px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--fg); color: var(--bg); font-size: var(--fs-xs); line-height: 1.4; pointer-events: none;
  box-shadow: var(--shadow-pop);
}

/* severity stripe for alert rows */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
}
.alert.bad { border-left-color: var(--bad); }
.alert.warn { border-left-color: var(--warn); }
.alert.info { border-left-color: var(--info); }
.alert.ok { border-left-color: var(--ok); }
.alert .alert-ico { margin-top: 1px; }
.alert.bad .alert-ico { color: var(--bad); }
.alert.warn .alert-ico { color: var(--warn); }
.alert.info .alert-ico { color: var(--info); }
.alert.ok .alert-ico { color: var(--ok); }
.alert-title { font-weight: 600; }
.alert-body { min-width: 0; flex: 1; }

/* ───────── forms ───────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 500; color: var(--fg-2); }
.hint { font-size: var(--fs-xs); color: var(--fg-3); }
.input, .select, .textarea {
  width: 100%; padding: 7px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--fg); min-width: 0;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.55; }
.input.mono { font-family: var(--font-mono); }
.search { position: relative; display: flex; align-items: center; min-width: 0; }
.search svg { position: absolute; left: 10px; color: var(--fg-3); }
.search .input { padding-left: 32px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); margin: 0; cursor: pointer; transition: background 0.15s; position: relative; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--sunken); }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--fg-2); font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--fg-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
@media (max-width: 640px) { .tabs button { padding: 9px 9px; } }
input[type="range"] { accent-color: var(--accent); width: 100%; }

/* ───────── tables ───────── */
.table-wrap { overflow-x: auto; min-width: 0; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.tbl th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--fg-2); font-weight: 600;
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tbody tr.selected td { background: var(--accent-soft); }
.tbl tbody tr.anomaly td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tbody tr.critical td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.focused td { box-shadow: inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
.tbl .col-check { width: 34px; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
.tbl-compact td, .tbl-compact th { padding: 6px 8px; }

/* diff "было → станет" */
.diff { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* without strikethrough (user): the grey colour and the arrow already mark the old value */
.diff .was { color: var(--fg-3); }
.diff .arrow { color: var(--fg-3); }
.diff .now { font-weight: 600; }

/* ───────── selection / action bar ───────── */
.action-bar {
  position: sticky; bottom: 14px; z-index: 15; margin-top: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--r-lg); background: var(--fg); color: var(--bg);
  box-shadow: var(--shadow-pop);
}
.action-bar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.action-bar .btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.action-bar .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.action-bar .count { font-weight: 600; margin-right: 6px; }

/* ───────── overlays ───────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--overlay); animation: fade 0.15s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(640px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: slide 0.18s ease;
}
.drawer.wide { width: min(920px, 100%); }
.modal .tbl td:last-child { min-width: 140px; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-title { font-weight: 600; font-size: var(--fs-lg); }
.drawer-sub { color: var(--fg-2); font-size: var(--fs-sm); margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal {
  position: fixed; z-index: 70; left: 50%; top: 8vh; transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px)); max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  animation: pop 0.16s ease;
}
.modal.narrow { width: min(480px, calc(100vw - 32px)); }
.modal-head { padding: 16px 18px 10px; }
.modal-title { font-weight: 600; font-size: var(--fs-lg); }
.modal-body { padding: 4px 18px 16px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.modal-foot .left { margin-right: auto; color: var(--fg-3); font-size: var(--fs-xs); }
.toasts { position: fixed; z-index: 95; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
/* an open drawer keeps its foot buttons (bottom right) clear of a notice («ID кабинета скопирован» over «Карточка кампании») */
@media (min-width: 641px) { body:has(.drawer .drawer-foot) .toasts { bottom: 76px; } }
/* 25.10 (stage 37): the upload form's action bar («Скопировать для бота», «Залить N») keeps clear of a notice — the
   «В форму» / «Все строки в форму» toast lands right on it otherwise (the bar is 49–86 px tall, 14 px off the bottom) */
@media (min-width: 641px) { body:has(.scr-upload .action-bar):not(:has(.modal)) .toasts { bottom: 112px; } }
/* 22.10 (user): an open window keeps its foot buttons (bottom right: «Залить», «Скопировать…», «Отмена») clear of a
   notice — while a window is open, notices sit bottom left (behind the backdrop there is nothing to press) */
@media (min-width: 641px) { body:has(.modal) .toasts { right: auto; left: 16px; bottom: 16px; } }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--fg); color: var(--bg); box-shadow: var(--shadow-pop); animation: pop 0.16s ease; font-size: var(--fs-sm);
}
.toast-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.toast-btn { border: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); background: transparent; color: var(--bg); border-radius: var(--r-sm); padding: 3px 9px; cursor: pointer; font-size: var(--fs-xs); font-weight: 600; }
.toast-btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.toast-x { border: 0; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; padding: 0; width: 32px; height: 32px; margin: -6px -6px -6px 0; border-radius: var(--r-sm); display: inline-grid; place-items: center; flex: none; }
.task-line.clickable { cursor: pointer; }
.task-line.clickable:hover { background: var(--hover); }
.toast-x:hover { opacity: 1; }
.toast a { color: inherit; text-decoration: underline; }
.toast.ok svg { color: var(--ok); }
.toast.bad svg { color: var(--bad); }
.toast.warn svg { color: var(--warn); }

/* command palette */
.cmdk { top: 12vh; width: min(640px, calc(100vw - 32px)); }
.cmdk-input { border: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 14px 16px; font-size: var(--fs-lg); width: 100%; background: transparent; font-family: var(--font-mono); }
.cmdk-input:focus { outline: none; }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.cmdk-item[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.cmdk-item .hint { margin-left: auto; }
.cmdk-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding: 8px 10px 4px; font-weight: 600; }

/* task tray */
.tray { width: min(420px, calc(100vw - 24px)); position: fixed; z-index: 65; top: calc(var(--bar-h) + 6px); right: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); max-height: 70vh; overflow-y: auto; animation: pop 0.14s ease; }
.task-line { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.task-line:last-child { border-bottom: 0; }
.progress { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.4s ease; }
.progress.ok > span { background: var(--ok); }
.progress.bad > span { background: var(--bad); }
.progress.warn > span { background: var(--warn); }
.spin { animation: spin 1s linear infinite; }

/* checklist (preflight) */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); }
.check-row .ci { margin-top: 2px; }
.check-row.ok .ci { color: var(--ok); }
.check-row.warn { background: var(--warn-soft); }
.check-row.warn .ci { color: var(--warn); }
.check-row.bad { background: var(--bad-soft); }
.check-row.bad .ci { color: var(--bad); }
.check-row.wait .ci { color: var(--fg-3); }

/* key-value lists */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; font-size: var(--fs-sm); }
.kv dt { color: var(--fg-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--fg-2); }
.empty svg { width: 28px; height: 28px; color: var(--fg-3); }
.empty-title { font-weight: 600; color: var(--fg); }

/* code / log */
.log { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--sunken); border-radius: var(--r-md); padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; color: var(--fg-2); }

/* creative tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; min-width: 0; }
.tile:hover { border-color: var(--line-2); }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.thumb { aspect-ratio: 9 / 16; max-height: 220px; width: 100%; position: relative; display: grid; place-items: center; color: var(--media-fg); font-family: var(--font-mono); font-size: 11px; overflow: hidden; }
.thumb.square { aspect-ratio: 1 / 1; }
.thumb .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 4px; }
.thumb .play { width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; }
.tile-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-name { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0.6; } }
@keyframes pop { from { transform: translateY(6px) scale(0.99); opacity: 0; } }
.modal { --tx: -50%; }
.modal { animation-name: popc; }
@keyframes popc { from { transform: translate(-50%, 6px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ───────── responsive ───────── */
@media (max-width: 1360px) {
  .cmdk-btn { min-width: 0; }
  .cmdk-btn span { display: none; }
}
@media (max-width: 1180px) {
  .fresh .fresh-item:nth-child(n+3) { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 80; width: min(280px, 86vw); transform: translateX(-102%); transition: transform 0.18s ease; box-shadow: var(--shadow-pop); }
  .app.nav-open .rail { transform: none; }
  .app.nav-open::before { content: ""; position: fixed; inset: 0; z-index: 79; background: var(--overlay); }
  .menu-btn.icon-btn, .menu-btn { display: inline-grid; }
  .split, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .fresh { display: none; }
  .cmdk-btn { min-width: 0; }
  .cmdk-btn span, .cmdk-btn kbd { display: none; }
}
@media (max-width: 640px) {
  /* on phones notices sit at the top, so they never cover the action buttons at the bottom — and below the «от имени»
     banner (--act-h, access.js), so they never cover its «Выйти из пользователя» either */
  .toasts { top: calc(var(--bar-h) + var(--act-h) + 8px + env(safe-area-inset-top, 0px)); bottom: auto; left: 12px; right: 12px; max-width: none; }
  .content { padding: 16px 16px 40px; }
  .topbar { padding-inline: 12px; gap: 6px; }
  .proto-banner { padding-inline: 16px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-switch .ts-sheet { display: none; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 6px; }
  /* a full-width bottom sheet — the narrow modal too (.modal.narrow is more specific than .modal: without it here a
     narrow window kept its 480 px / 100vw − 32 px width at left 0 and left a gap on the right) */
  .modal, .modal.narrow { top: auto; bottom: 0; left: 0; transform: none; width: 100vw; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; animation-name: pop; }
}

/* ═════════════════ stage 1 additions (real site, read-only) ═════════════════ */
/* «Сайт: этап 1 — просмотр» strip under the top bar */
.stage-banner {
  display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--info);
  background: var(--info-soft); padding: 6px 24px; border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) { .stage-banner { padding-inline: 16px; } }

/* boot / sign-in / error screens */
.splash { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; color: var(--fg-2); }
.splash-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.loader { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.brand.flush { padding: 0; }
.login-title { font-size: var(--fs-xl); font-weight: 600; }
.login-sub { margin-top: 6px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); }
.steps li::marker { color: var(--fg-3); font-weight: 600; }
.login-msg { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); font-size: var(--fs-sm); background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); }
.login-msg.bad { border-left-color: var(--bad); }
.login-msg.warn { border-left-color: var(--warn); }
.login-msg.ok { border-left-color: var(--ok); }
.login-msg.info { border-left-color: var(--info); }
.login-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login-actions .btn { flex: 1 1 auto; }
/* login.html renders title, message, buttons and note inside #login-body: give them the same breathing room as the
   card itself, so the text never sits on the button; the focus ring of the auto-focused «Войти» keeps clear of it too */
#login-body { display: flex; flex-direction: column; gap: 18px; }
#login-body > p, #login-body .login-sub { margin: 0; }
#login-body .login-sub { margin-top: 8px; line-height: 1.5; }
#login-body .hint { line-height: 1.5; }
.login-card { gap: 20px; }
.login-actions .btn:focus-visible { outline-offset: 3px; }

/* rail: screens that are still Telegram-only */
.nav-soon { margin-left: auto; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); }
.nav-item[aria-current="page"] .nav-soon { color: var(--accent); }
.rail-foot .acting-box .btn { width: 100%; }
.rail-tools { display: flex; align-items: center; justify-content: space-between; padding-inline: 4px; }
.me-text { min-width: 0; }
.me-sub { overflow-wrap: anywhere; }

/* «Загрузка идёт дольше обычного» — shown by CSS alone after 10 s, so it works even when no script runs.
   A 0 s animation is not motion: it is kept for reduced-motion users (the global rule below would remove it). */
.splash-late { max-width: 340px; font-size: var(--fs-sm); color: var(--fg-3); opacity: 0; visibility: hidden; animation: zal-late 0s linear 10s forwards; }
.splash-late a { color: var(--accent); }
@keyframes zal-late { to { opacity: 1; visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .splash-late { animation: zal-late 0s linear 10s forwards !important; } }
/* «Сайт загрузился не полностью»: the files that are missing */
.partial-list { overflow-wrap: anywhere; }

/* top bar */
.fresh-item.unknown .dot, .fresh-item.loading .dot { background: var(--line-2); }
.fresh-item.loading { color: var(--fg-3); }
/* a fact, not a missing value: e.g. «MCP» — the table has no Dolphin sync at all */
.fresh-item.neutral .dot { background: var(--info); }
.tray-btn { position: relative; }
.tray-btn .badge { position: absolute; top: -4px; right: -6px; }
.net-chip { flex: none; }
/* small tables of cabinets in a window (the overflow request, «Прикинуть раскладку»): on a phone the agent goes under
   the id, the headers wrap, and the overflow table switches to its two-column form (domain.js overflowView) — the ids
   stay whole and no number column hides behind a sideways scroll */
.ovf-narrow { display: none; }
@media (max-width: 640px) {
  .ovf-wide { display: none; }
  .ovf-narrow { display: block; }
  .tbl-narrowable th { white-space: normal; }
  .modal .tbl-narrowable td:last-child { min-width: 0; }
  .tbl-narrowable .cab-sub { display: block; }
  .tbl-narrowable .cab-sep { display: none; }
}
/* the narrowest phones: the chip keeps its icon (and its tooltip / label), so the table name keeps its room */
@media (max-width: 360px) { .net-chip .net-text { display: none; } }
.ts-opt { justify-content: flex-start; text-align: left; padding: 10px 12px; }
.ts-opt.current { border-color: var(--accent); background: var(--accent-soft); }
.ts-opt-text { display: flex; flex-direction: column; min-width: 0; }
.ts-opt-sub { color: var(--fg-3); font-size: var(--fs-xs); white-space: normal; }

/* task tray / dashboards: one task line */
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.tl-title { min-width: 0; overflow-wrap: anywhere; }
.tl-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.tl-step { min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-xs); color: var(--fg-3); }

/* command palette */
.cmdk .modal-body { padding: 0; }
.cmdk-foot { padding: 8px 12px; border-top: 1px solid var(--line); }
.cmdk-empty { padding: 12px; }

/* overlays and toasts written by core.js without inline styles */
.drawer-headtext, .toast-text { min-width: 0; flex: 1; }
.confirm-table { max-height: 44vh; border: 1px solid var(--line); border-radius: var(--r-md); }
.copy-manual-note { margin-bottom: 8px; }

/* «Скоро на сайте» screens */
.soon { max-width: 760px; }
.soon-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.soon-head { display: flex; align-items: center; gap: 12px; }
.soon-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.soon-ico svg.lucide { width: 20px; height: 20px; }
.soon-cmds { display: flex; flex-direction: column; gap: 6px; }
.soon-cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.soon-cmd .mono { overflow-wrap: anywhere; min-width: 0; }
.soon-cmd-desc { color: var(--fg-3); font-size: var(--fs-xs); }

/* read-only hint next to hidden mutation controls: «Это пока делается в Telegram» */
.tg-hint { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--fg-3); }
/* a value that is unknown (null), never shown as 0 */
.unknown { color: var(--fg-3); }
/* data shown while the bot does not answer */
.is-stale { opacity: 0.72; }

/* cabinet ids (Z.cab, core.js): in full, ONE colour — the primary text colour (white in the dark theme), never a grey
   head and a bold tail; it stays primary inside muted / faint / hint text. Z.fitCids swaps in «12345…» (.cid-cut,
   full id in data-tip) only where the full id does not fit. Nested in .mono it keeps the parent's size. */
.cid { font-family: var(--font-mono); font-size: 0.92em; color: var(--fg); white-space: nowrap; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.cid.cid-strong { font-weight: 600; }
.cid.cid-cut { cursor: help; }
.mono .cid, .cid .cid, .mono .pixel-id { font-size: inherit; }
/* the pixel: always in full, wraps anywhere rather than pushing the page sideways */
.pixel-id { font-family: var(--font-mono); font-size: 0.92em; color: var(--fg); white-space: normal; overflow-wrap: anywhere; }
/* inverted or coloured surfaces: the id takes the surface's own text colour so it never disappears */
.tip .cid, .toast .cid, .action-bar .cid, .btn-primary .cid, .btn-danger .cid, .badge .cid,
.tip .pixel-id, .toast .pixel-id, .action-bar .pixel-id, .btn-primary .pixel-id, .btn-danger .pixel-id { color: inherit; }
/* the command palette: a long label wraps; an id that still does not fit is shortened by Z.fitCids */
.cmdk-label { min-width: 0; overflow-wrap: anywhere; }

/* utilities — use instead of style="…" (blocked by the CSP) */
.mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; }
.mb-6 { margin-bottom: 6px; } .mb-8 { margin-bottom: 8px; } .mb-10 { margin-bottom: 10px; } .mb-12 { margin-bottom: 12px; } .mb-14 { margin-bottom: 14px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.nowrap-row { flex-wrap: nowrap; } .between { justify-content: space-between; } .items-start { align-items: flex-start; }
.grow { flex: 1; min-width: 0; } .min0 { min-width: 0; } .wrap-any { overflow-wrap: anywhere; } .ws-normal { white-space: normal; }
/* .tbl th { white-space: nowrap } is more specific than .ws-normal: table cells need their own rule */
.tbl th.ws-normal, .tbl td.ws-normal { white-space: normal; }
.fs-xs { font-size: var(--fs-xs); } .fs-sm { font-size: var(--fs-sm); } .d-block { display: block; } .va-top { vertical-align: top; }
.w-100 { width: 100%; } .p-0 { padding: 0; } .text-left { justify-content: flex-start; text-align: left; }

/* ═════════════════ stage 1c additions (kit: domain.js «STAGE 1c») ═════════════════ */
/* sheet statuses the bot reads without a 1..7 code («Другой статус», «Нет статуса»): a grey dot, the sheet's own text */
.status.s-none { color: var(--fg-3); }
/* Q / F text of a campaign (TextLines): plain lines, monospace, wrapped — never HTML, never markdown */
.text-lines {
  font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.55; color: var(--fg-2);
  background: var(--sunken); border-radius: var(--r-md); padding: 8px 10px; max-height: 320px; overflow-y: auto; min-width: 0;
}
.text-lines .tl-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-lines .tl-line + .tl-line { margin-top: 2px; }
.text-lines.is-log .tl-line { color: var(--fg-3); }
/* an id with its copy button (domain.js Z.cabIdHtml: a cabinet, Z.idCopyHtml: the pixel). Only the layout of the id and
   the button: the id is the kit's own .cid (Z.cab) or .pixel-id (Z.pixel), its colour, weight and size stay theirs
   (one rule for every cabinet id on the site). As a flex item the cabinet id may shrink and clip — Z.fitCids reads
   that as «does not fit» and shows «12345…» (the full id in the tooltip), so the button never leaves the box; the
   pixel wraps instead. NOT .cab-id: that class is stage 1 «Кабинеты». */
.cab-full { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; vertical-align: middle; }
.cab-full > .cid { min-width: 0; overflow: hidden; }
.cab-full > .pixel-id { min-width: 0; }
.tbl .cab-full { white-space: nowrap; }
.copy-btn {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; padding: 0; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--fg-3); cursor: pointer;
}
.copy-btn:hover { background: var(--hover); color: var(--fg); }
.copy-btn svg.lucide { width: 14px; height: 14px; }
@media (pointer: coarse) { .copy-btn { width: 32px; height: 32px; } }
/* a stopped (❌) offer's name */
.offer-stopped { color: var(--bad); }
