/* Promo Desk: диспетчерская консоль. Белый фон, нейтральный серый, чернильный текст,
   тёмные кнопки действий, один спокойный синий акцент для ссылок и фокуса,
   моноширинные цифры. Без бокового меню, без плоских «бутстрап»-карточек. */

:root {
  --bg: #f5f6f8;
  --bg-2: #fafbfc;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --surface-3: #eff1f4;
  --line: #e6e9ee;
  --line-2: #d2d7df;
  --text: #14171c;
  --text-2: #3a4150;
  --muted: #5f6674;
  --faint: #9aa3b2;

  --ink: #14171c;
  --ink-2: #2a3039;
  --accent: #2b5fd9;
  --accent-2: #3d74ee;
  --accent-ink: #ffffff;
  --accent-soft: rgba(43, 95, 217, 0.10);
  --accent-line: rgba(43, 95, 217, 0.40);

  --ok: #176f45;
  --ok-soft: rgba(23, 111, 69, 0.12);
  --bad: #b83838;
  --bad-soft: rgba(194, 61, 61, 0.10);
  --warn: #b5651d;
  --warn-soft: rgba(181, 101, 29, 0.12);
  --info: #2b5fd9;
  --info-soft: rgba(43, 95, 217, 0.10);
  --neutral-soft: rgba(107, 115, 130, 0.12);

  --control-h: 42px;
  --line-input: #8f97a6;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;

  --shadow-card: 0 1px 2px rgba(20, 23, 28, 0.04), 0 14px 30px -26px rgba(20, 23, 28, 0.35);
  --shadow-pop: 0 24px 60px -24px rgba(20, 23, 28, 0.35);

  --font: "Manrope", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  --z-noise: 1;
  --z-header: 20;
  --z-toast: 50;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0, var(--bg) 260px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* зерно: ломает цифровую плоскость, не мешает чтению */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-noise);
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.12  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-s); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius-s);
}
.skip-link:focus { left: 12px; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -28px rgba(20, 23, 28, 0.35);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 6px 14px -8px rgba(20, 23, 28, 0.6);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px 6px 6px 11px; border-radius: 2px; background: #ffffff; opacity: 0.9;
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0.02em; line-height: 1.1; }

.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 8px 12px; border-radius: var(--radius-s);
  color: var(--text-2); font-weight: 600; font-size: 14px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--ink);
}
.nav a.nav-cta { color: var(--accent); }

.topbar-right { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }

.mode {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-3);
  color: var(--text-2); font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em;
}
.mode.live { border-color: rgba(194, 61, 61, 0.45); background: var(--bad-soft); color: var(--bad); }
a.mode { text-decoration: none; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
a.mode:hover { border-color: var(--ink); text-decoration: none; }
.mode .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
.mode.live .dot { background: var(--bad); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
.mode .dot { color: var(--accent); }
.mode.live .dot { color: var(--bad); }

.clocks { display: flex; gap: 14px; font-family: var(--mono); font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.clock { display: inline-flex; align-items: baseline; gap: 6px; }
.clock-label { font-family: var(--font); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
.clock time { min-width: 8ch; display: inline-block; }

.user { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.user a { color: var(--text-2); }

/* ---------- каркас ---------- */
main { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 32px) 64px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h1 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 800; text-wrap: balance; }
h2 { font-size: 16px; letter-spacing: -0.01em; margin: 0; font-weight: 700; }
.lead { color: var(--muted); margin: 6px 0 0; max-width: 64ch; text-wrap: pretty; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head .count { font-family: var(--mono); color: var(--muted); font-size: 12.5px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-form { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .grid-form { grid-template-columns: 1fr; } }

/* ---------- сводка ---------- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); margin-bottom: 18px; }
.tile {
  grid-column: span 3; padding: 16px 18px 14px; border-radius: var(--radius-l);
  border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: 8px; min-height: 112px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tile:hover { border-color: var(--line-2); }
.tile.wide { grid-column: span 6; background: var(--surface); }
.tile.alert { border-color: rgba(194, 61, 61, 0.35); background: linear-gradient(135deg, rgba(194, 61, 61, 0.08), var(--surface) 65%); }
.tile > .num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-family: var(--mono); font-size: 34px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile > .num small { font-family: var(--font); font-size: 14px; color: var(--muted); margin-left: 0; font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.tile .list { display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.tile .list .row { justify-content: space-between; gap: 8px; }
.tile .list .num { font-size: 16px; }
.tile .sub { color: var(--muted); font-size: 13px; margin-top: auto; }
@media (max-width: 960px) { .tile { grid-column: span 6; } .tile.wide { grid-column: span 12; } }
@media (max-width: 560px) { .tile { grid-column: span 12; } }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 8px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th.num, td.num { text-align: right; }
th.num { font-family: var(--font); }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s var(--ease); }
tbody tr:hover { background: rgba(60, 45, 20, 0.035); }
td.num, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.when { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.when .d { color: var(--muted); margin-right: 6px; }
.id { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.cell-muted { color: var(--muted); font-size: 13px; }
.truncate { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.reason { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 22ch; line-height: 1.35; }
.grid-2 .table-compact { font-size: 13.5px; }
.table-tight th { white-space: normal; line-height: 1.25; }
.table-tight td { padding-top: 9px; padding-bottom: 9px; }
.table-tight .tag { white-space: normal; }
.table-tight .when { white-space: normal; display: inline-block; }
.table-tight .when .d { display: block; margin: 0; font-size: 11.5px; }
.table-compact td, .table-compact th { padding-left: 8px; padding-right: 8px; }

/* ---------- теги статусов ---------- */
.tag {
  --t: var(--muted); --ts: var(--neutral-soft);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 7px;
  border-radius: 5px; background: var(--ts); color: var(--t);
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--t); }
.tag[data-s="DONE"], .tag[data-s="ok"] { --t: var(--ok); --ts: var(--ok-soft); }
.tag[data-s="DRY_RUN_DONE"] { --t: var(--ok); --ts: var(--ok-soft); }
.tag[data-s="FAILED"], .tag[data-s="NEEDS_OPERATOR"], .tag[data-s="bad"] { --t: var(--bad); --ts: var(--bad-soft); }
.tag[data-s="NEEDS_CHECK"], .tag[data-s="warn"] { --t: var(--warn); --ts: var(--warn-soft); }
.tag[data-s="RUNNING"], .tag[data-s="PLANNED"], .tag[data-s="info"] { --t: var(--info); --ts: var(--info-soft); }
.tag[data-s="RUNNING"]::before { animation: blink 1s infinite alternate; }
@keyframes blink { from { opacity: 1; } to { opacity: 0.25; } }
.tag[data-s="CANCELLED"], .tag[data-s="SKIPPED_DUPLICATE"] { --t: var(--muted); --ts: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.tag-lg { font-size: 13px; padding: 5px 10px 5px 9px; border-radius: var(--radius-s); }
.tag.plain::before { display: none; }

/* ---------- кнопки ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: #c4b9a5; text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--ink); color: #ffffff; border-color: var(--ink); box-shadow: 0 8px 20px -14px rgba(20, 23, 28, 0.8); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--bad); border-color: rgba(194, 61, 61, 0.35); background: transparent; }
.btn-danger:hover { background: var(--bad-soft); border-color: rgba(194, 61, 61, 0.6); }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span.label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .error { font-size: 12.5px; color: var(--bad); display: none; }
.field.invalid .error { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: rgba(194, 61, 61, 0.7); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line-input); border-radius: 8px; min-height: var(--control-h);
  padding: 9px 11px; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
input:hover, select:hover, textarea:hover { border-color: #6f7887; }
input:disabled, select:disabled, textarea:disabled { background-color: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.field:has(:disabled) > .label { color: var(--muted); }
input[type=checkbox] { min-height: 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(--mono); font-size: 13px; line-height: 1.6; }
select { appearance: none; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.notice { border-radius: var(--radius); padding: 12px 14px; font-size: 14px; border: 1px solid var(--line-2); background: var(--surface-2); }
.notice.warn { border-color: rgba(181, 101, 29, 0.4); background: var(--warn-soft); color: #7a4413; }
.notice.bad { border-color: rgba(194, 61, 61, 0.4); background: var(--bad-soft); color: var(--bad); }
.notice.ok { border-color: rgba(31, 138, 87, 0.4); background: var(--ok-soft); color: var(--ok); }
.flash { margin-bottom: 16px; }

/* ---------- пустые состояния ---------- */
.empty { padding: 26px 18px; text-align: left; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); display: flex; gap: 14px; align-items: flex-start; }
.empty .glyph { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-3); flex: none; position: relative; }
.empty .glyph::after { content: ""; position: absolute; inset: 11px; border-radius: 3px; border: 2px solid var(--faint); border-right-color: transparent; }
.empty strong { color: var(--text-2); display: block; margin-bottom: 2px; }
.empty.calm { border-style: solid; border-color: var(--line); }
.empty.calm .glyph { background: var(--ok-soft); }
.empty.calm .glyph::after { inset: 9px 0 0 13px; width: 6px; height: 11px; border: solid var(--ok); border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); }
tbody tr[data-s="NEEDS_OPERATOR"] td:first-child { box-shadow: inset 3px 0 0 var(--bad); padding-left: 8px; }

/* ---------- кабинеты ---------- */
.cab-list { display: grid; gap: 12px; }
.cab {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) auto; gap: 14px 22px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
  transition: border-color 0.2s var(--ease);
}
.cab:hover { border-color: var(--line-2); }
.cab.paused { border-color: rgba(194, 61, 61, 0.35); }
.cab .name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.cab .login { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.cab .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cab .meta .tag, .page-head .tag { white-space: normal; max-width: 100%; }
.cab .balances { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.cab .balances .num { font-size: 14px; }
.cab .ops { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
@media (max-width: 900px) { .cab { grid-template-columns: 1fr; } .cab .ops { align-items: flex-start; } }

/* ---------- таймлайн ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.fact .k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fact .v { margin-top: 3px; font-size: 15px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1 .mono { font-weight: 500; letter-spacing: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .pt { position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); }
.timeline li[data-l="error"] .pt { border-color: var(--bad); background: var(--bad-soft); }
.timeline li[data-l="warn"] .pt { border-color: var(--warn); background: var(--warn-soft); }
.timeline .t { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.timeline .step { font-weight: 700; margin-left: 8px; }
.timeline .msg { color: var(--text-2); margin-top: 2px; text-wrap: pretty; }
.timeline li[data-l="error"] .msg { color: var(--bad); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #fff; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.shot:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.shot img { display: block; width: 100%; height: 170px; object-fit: cover; object-position: top; }
.shot figcaption { padding: 6px 10px; font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* ---------- вход ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 2; }
.login-card { width: min(420px, 100%); padding: 28px 28px 26px; }
.login-card .brand { margin-bottom: 20px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .lead { margin-bottom: 18px; font-size: 14px; }

/* ---------- утилиты ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
kbd { font-family: var(--mono); font-size: 12px; background: #fff; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

@media (max-width: 720px) {
  .topbar { position: static; box-shadow: none; }
  .brand small { display: none; }
  .topbar-right { width: 100%; justify-content: space-between; gap: 8px 12px; }
  .clocks { gap: 10px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- карточка кабинета ---------- */
.danger-zone { border-color: rgba(194, 61, 61, 0.35); }
.danger-zone h2 { color: var(--bad); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.cab .go { white-space: nowrap; }
.check { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; margin: 4px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }

/* ---------- просмотр скриншотов ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px 56px; background: rgba(20, 23, 28, 0.82); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-pop); }
.lb-figure figcaption { color: #e6e9ef; font-size: 13px; font-family: var(--mono); text-align: center; text-wrap: balance; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background 0.2s var(--ease); }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; }
@media (max-width: 720px) { .lightbox { padding: 16px 8px; } .lb-nav { display: none; } .lb-figure img { max-height: calc(100dvh - 60px); } }

/* ---------- расписания ---------- */
.sched-list { display: grid; gap: 12px; }
.sched {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.25fr) auto auto; gap: 14px 28px; align-items: center;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
  transition: border-color 0.2s var(--ease);
}
.sched:hover { border-color: var(--line-2); }
.sched.is-paused { border-color: rgba(181, 101, 29, 0.45); }
.sched.is-finished { background: var(--bg-2); }
.sched .name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; color: var(--text); }
.sched .name:hover { text-decoration: underline; }
.sched .login { font-family: var(--mono); color: var(--muted); font-size: 13px; margin-top: 4px; }
.sched-when { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.sched-when dt { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 3px; }
.sched-when dd { margin: 0; }
.sched-stats { display: flex; gap: 8px; }
.stat { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-3); color: var(--text-2); text-decoration: none; }
.stat:hover { text-decoration: none; background: #e8ebf0; }
.stat .num { font-size: 18px; line-height: 1.1; color: var(--text); }
.stat span:last-child { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat.bad .num { color: var(--bad); }
.sched-ops { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 130px; }
.sched-ops .btn { width: 100%; }
@media (max-width: 1100px) { .sched { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sched-stats { grid-column: 1; } .sched-ops { grid-column: 2; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 640px) { .sched { grid-template-columns: 1fr; } .sched-stats, .sched-ops { grid-column: 1; } }
