/* Дашборд роликов. Цвета — роли (переменные), отдельно для светлой и тёмной темы. */
:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --surface-3: #e9e8e2;
  --border: rgba(11, 11, 11, 0.10);
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --accent: #2a78d6;
  --accent-wash: rgba(42, 120, 214, 0.10);
  /* что вышло: категориальные слоты 1–3 + серый для «без состава» */
  --new: #2a78d6;
  --re: #eb6834;
  --mixed: #1baf7a;
  --empty: #b5b3ab;
  /* статусы (всегда с подписью) */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --neutral: #a3a19a;
  --good-text: #006300;
  --bad-text: #b02a2a;
  --today: rgba(42, 120, 214, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
    --border: rgba(255, 255, 255, 0.10); --grid: #2c2c2a; --axis: #383835;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --accent: #3987e5; --accent-wash: rgba(57, 135, 229, 0.16);
    --new: #3987e5; --re: #d95926; --mixed: #199e70; --empty: #5a5955;
    --good-text: #0ca30c; --bad-text: #e66767; --today: rgba(57, 135, 229, 0.14);
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2c2c2a;
  --border: rgba(255, 255, 255, 0.10); --grid: #2c2c2a; --axis: #383835;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --accent: #3987e5; --accent-wash: rgba(57, 135, 229, 0.16);
  --new: #3987e5; --re: #d95926; --mixed: #199e70; --empty: #5a5955;
  --good-text: #0ca30c; --bad-text: #e66767; --today: rgba(57, 135, 229, 0.14);
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* --- Шапка и меню --- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 54px; max-width: 1600px; margin: 0 auto; }
.brand { font-weight: 700; color: var(--ink); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
/* Логотип — одна SVG-картинка везде (core/templates/core/_logo.html = favicon.svg): play ровно по центру */
.logo { width: 28px; height: 28px; flex: none; display: block; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--ink-2); padding: 7px 11px; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--accent-wash); color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search input { width: 220px; }
.stamp { font-size: 11.5px; color: var(--muted); line-height: 1.25; text-align: right; white-space: nowrap; }
.theme-btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 8px; height: 32px; width: 32px; cursor: pointer; }

.page { max-width: 1600px; margin: 0 auto; padding: 22px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; color: var(--ink-2); }

/* --- Карточки и сетки --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .cols-2, .cols-3, .cols-main { grid-template-columns: 1fr; } }

/* Плитки с числами */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; color: inherit; }
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile-label { color: var(--ink-2); font-size: 13px; }
.tile-value { font-size: 28px; font-weight: 650; margin-top: 4px; letter-spacing: -0.01em; }
.tile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.delta-up { color: var(--good-text); }
.delta-down { color: var(--bad-text); }

/* --- Значки, чипы --- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; white-space: nowrap; line-height: 18px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); flex: none; }
.badge.good::before { background: var(--good); }
.badge.warning::before { background: var(--warning); }
.badge.serious::before { background: var(--serious); }
.badge.critical::before { background: var(--critical); }
.badge.plain::before { display: none; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 12px; border-left: 3px solid var(--empty); white-space: nowrap; line-height: 18px; }
a.chip:hover { text-decoration: none; background: var(--surface-3); }
.chip.first, .chip.k-new { border-left-color: var(--new); }
.chip.re, .chip.k-re { border-left-color: var(--re); }
.chip.k-mixed { border-left-color: var(--mixed); }
.chip.k-empty { border-left-style: dashed; color: var(--ink-2); }
.chip .n { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key.s-new { background: var(--new); }
.key.s-re { background: var(--re); }
.key.s-mixed { background: var(--mixed); }
.key.s-empty { background: var(--empty); }

.state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.state.reserve::before { background: var(--neutral); }
.state.live::before { background: var(--good); }
.state.removed::before { background: var(--warning); }

.ext { font-size: 11px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; line-height: 17px; display: inline-block; }
a.ext:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* --- Плашки типа ролика и хрона (как в Notion) --- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 12px; line-height: 18px;
  font-weight: 600; color: var(--ink); background: var(--tag-bg, var(--surface-3)); white-space: nowrap; margin-right: 3px; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tag-dot, var(--neutral)); }
.tag.dur { font-weight: 700; font-variant-numeric: tabular-nums; }
.tag.dur::before { display: none; }
.tag.dur.none { color: var(--muted); font-weight: 500; }
.t-epic    { --tag-dot: #e87ba4; --tag-bg: rgba(232, 123, 164, .16); }
.t-trial   { --tag-dot: #eda100; --tag-bg: rgba(237, 161, 0, .16); }
.t-kids    { --tag-dot: #2a78d6; --tag-bg: rgba(42, 120, 214, .14); }
.t-flat    { --tag-dot: #eb6834; --tag-bg: rgba(235, 104, 52, .14); }
.t-fun     { --tag-dot: #6250d6; --tag-bg: rgba(98, 80, 214, .14); }
.t-hill    { --tag-dot: #1baf7a; --tag-bg: rgba(27, 175, 122, .14); }
.t-monster { --tag-dot: #e34948; --tag-bg: rgba(227, 73, 72, .14); }
.vtags { margin-top: 6px; }
.ext.none { color: var(--warning); border-color: transparent; }

/* --- Ресурсы --- */
.res-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 16px; }
@media (max-width: 1100px) { .res-grid { grid-template-columns: 1fr; } }
.res-head { font-weight: 650; margin-bottom: 8px; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 800px) { .tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }
.tile.ready { background: var(--accent-wash); }
.tile.wait .tile-value { color: var(--ink-2); }

/* --- План выпуска --- */
.sched td.cell { position: relative; cursor: default; }
.cell-add { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 5px; display: none;
  align-items: center; justify-content: center; color: var(--accent); background: var(--accent-wash); font-weight: 700; }
.sched td.cell:hover .cell-add { display: inline-flex; }
a.cell-add:hover { text-decoration: none; }
.rel.k-plan { border-left-color: var(--accent); border-left-style: dotted; background: var(--accent-wash); }
.key.s-plan { background: var(--accent-wash); outline: 1px dotted var(--accent); }
.modal-box.wide { width: min(1100px, 100%); }
.plan h3 { font-size: 13px; margin: 12px 0 6px; }
.plan-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
@media (max-width: 900px) { .plan-cols { grid-template-columns: 1fr; } }
.filters.compact { margin-bottom: 8px; gap: 6px; }
.filters.compact input[type=search] { width: 140px; }
.pick-list { max-height: 330px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.pick-list.old { max-height: 220px; margin-top: 6px; }
.pick-list.old .pick { flex-wrap: nowrap; }
.pick-list.old .pick-name { min-width: 0; flex: 1; }
.pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 7px; border-radius: 6px; cursor: pointer;
  width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; }
.pick:hover { background: var(--surface-2); }
.pick:has(input:checked) { background: var(--accent-wash); }
.pick-name { font-weight: 600; min-width: 150px; }
.old-item.used { opacity: .4; }
.fixed-list { margin: 0 0 6px; padding-left: 22px; min-height: 4px; }
.fixed-list li { padding: 2px 0; }
.fixed-list .x { border: 0; background: none; color: var(--muted); cursor: pointer; }
.plan-result { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.seq { margin: 0; padding-left: 24px; columns: 2; column-gap: 24px; }
@media (max-width: 800px) { .seq { columns: 1; } }
.seq li { padding: 2px 0; break-inside: avoid; }
.seq li.is-main b { color: var(--accent); }
.row-btns { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.row-btns.sticky { position: sticky; bottom: -20px; background: var(--surface); padding: 10px 0 4px; border-top: 1px solid var(--grid); }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.danger { color: var(--bad-text); }
.settings-form { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.settings-form .btn { align-self: flex-start; }

/* --- Правка записей --- */
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.notice.success { border-left-color: var(--good); }
.notice.warn, .notice.warning { border-left-color: var(--warning); }
.notice.error { border-left-color: var(--critical); }
.edit-form { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.edit-form .field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.edit-form .field.check label { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.edit-form input[type=text], .edit-form input[type=number], .edit-form input[type=url], .edit-form input[type=date],
.edit-form select, .edit-form textarea { width: 100%; max-width: 480px; }
.edit-form textarea { height: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.edit-form .field > div:not(.help):not(.err) { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.edit-form .field > div label { font-weight: 400; display: flex; gap: 5px; align-items: center; margin: 0; }
.edit-form .help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.edit-form .err { font-size: 12px; color: var(--bad-text); margin-top: 3px; }
.edit-form .has-error input, .edit-form .has-error select { border-color: var(--critical); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-2); gap: 3px; }
.small-btn { height: 26px; padding: 0 8px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Формы и фильтры --- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
input[type=search], input[type=text], input[type=number], input[type=url], input[type=date], select {
  height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink);
  padding: 0 10px; font: inherit; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent-wash); border-color: var(--accent); }
.btn { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.on { background: var(--accent-wash); color: var(--accent); border-color: transparent; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg a { padding: 0 12px; height: 32px; display: inline-flex; align-items: center; color: var(--ink-2); }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.on { background: var(--accent-wash); color: var(--accent); }
.seg a:hover { text-decoration: none; background: var(--surface-2); }

/* --- Таблицы --- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.t tr:last-child td { border-bottom: none; }
.t tbody tr:hover td { background: var(--surface-2); }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Ролики --- */
.vlist { display: flex; flex-direction: column; gap: 10px; }
.vrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
@media (max-width: 800px) { .vrow { grid-template-columns: 1fr; } }
.vtitle { font-weight: 650; font-size: 15px; color: var(--ink); }
.vmeta { color: var(--ink-2); font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.vers { display: flex; flex-direction: column; gap: 6px; }
.ver { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 10px; align-items: start; }
@media (max-width: 800px) { .ver { grid-template-columns: 1fr; } }
.ver-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ver-name b { font-weight: 600; }

/* --- Выкладка (календарь) --- */
.sched-wrap { overflow: auto; max-height: calc(100vh - 200px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.sched { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.sched th, .sched td { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.sched thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); vertical-align: top; text-align: left; padding: 8px; min-width: 150px; max-width: 170px; font-weight: 400; }
.sched thead th.corner { left: 0; z-index: 4; min-width: 74px; }
.sched td.date { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 4px 8px; white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sched td.cell { padding: 3px 4px; vertical-align: top; height: 30px; }
.sched tr.weekend td.date { color: var(--muted); }
.sched tr.today td { background: var(--today); }
.sched tr.today td.date { color: var(--accent); font-weight: 650; }
.sched tr.empty-row td.date { color: var(--muted); }
.colhead-name { font-weight: 650; font-size: 13px; color: var(--ink); display: block; margin-bottom: 4px; }
.colhead-meta { color: var(--ink-2); line-height: 1.35; }
.colhead-meta div { margin-top: 2px; }
.rel { display: block; border-radius: 5px; padding: 3px 6px; background: var(--surface-2); border-left: 3px solid var(--empty); color: var(--ink); line-height: 1.3; }
.rel + .rel { margin-top: 2px; }
a.rel:hover { text-decoration: none; background: var(--surface-3); }
.rel.k-new { border-left-color: var(--new); }
.rel.k-re { border-left-color: var(--re); }
.rel.k-mixed { border-left-color: var(--mixed); }
.rel.k-empty { border-left-style: dashed; color: var(--ink-2); }
.rel .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rel .parts { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.rel.future { opacity: 0.75; }
.cell-note { display: block; font-size: 11px; color: var(--ink-2); padding: 1px 4px; font-style: italic; }
.slist { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.scol { flex: 0 0 190px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.scol .rel { margin-top: 3px; }

/* Состояние по частоте выкладки */
.due { font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
.due::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); }
.due.overdue::before { background: var(--critical); }
.due.today::before { background: var(--warning); }
.due.ok::before, .due.planned::before { background: var(--good); }
.due.paused::before { background: var(--neutral); }
.due.stopped::before { background: var(--serious); }

/* --- График --- */
.chart svg { width: 100%; height: auto; display: block; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .s-new { fill: var(--new); }
.chart .s-re { fill: var(--re); }
.chart .s-mixed { fill: var(--mixed); }
.chart .s-empty { fill: var(--empty); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + g path, .chart g.bar:hover path { opacity: 0.85; }
.chart .total { fill: var(--ink-2); font-size: 11px; text-anchor: middle; font-variant-numeric: tabular-nums; }
details.table-view { margin-top: 8px; }
details.table-view summary { cursor: pointer; color: var(--ink-2); font-size: 12px; }

/* --- Всплывающая подсказка и окно --- */
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 6px; max-width: 320px; opacity: 0; transition: opacity .08s; }
.tip.show { opacity: 1; }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.35); display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 14px; width: min(760px, 100%); max-height: 86vh; overflow: auto; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.plan { margin: 0; padding-left: 18px; }
.plan li { margin: 2px 0; }
.empty-state { color: var(--muted); padding: 18px 0; text-align: center; }
.pager { display: flex; gap: 6px; align-items: center; margin-top: 16px; justify-content: center; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.section-title h2 { margin: 0; }
.warn-line { font-size: 12px; color: var(--ink-2); }
.warn-line::before { content: "⚠ "; color: var(--warning); }

/* --- Сборка видео и файлы на сервере (15.11.2026) --- */
.ok-text { color: var(--good-text); }
.bad-text { color: var(--bad-text); }
.nav-badge { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #e5322d; color: #fff;
  font-size: 11px; line-height: 16px; text-align: center; margin-left: 2px; }
.render-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; padding: 10px 12px;
  border-radius: 8px; background: var(--surface-2); }
.btn.render { background: #e5322d; border-color: #e5322d; color: #fff; font-weight: 600; }
.btn.render:hover { filter: brightness(1.08); }
.btn.big { padding: 10px 18px; font-size: 15px; }
.copy-row { display: flex; gap: 8px; }
.copy-input { flex: 1; min-width: 0; font: inherit; padding: 6px 10px; border: 1px solid var(--grid); border-radius: 6px;
  background: var(--surface); color: inherit; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 4px 0; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.progress.done > span { background: var(--good); }
.progress.failed > span { background: var(--critical); width: 100% !important; }
.progress.expired > span { background: var(--grid); }
.public-job { max-width: 560px; margin: 8vh auto; padding: 0 16px; }
.public-job .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 18px; }
.public-job h1 { margin: 0 0 12px; }
.public-job .progress { height: 12px; border-radius: 6px; }
.purge-ask form { margin-bottom: 0; }
details > summary { cursor: pointer; margin: 8px 0; }

/* --- Страница входа: карточка ровно по центру экрана --- */
.auth-page { margin: 0; }
.auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.auth-card { width: 100%; max-width: 360px; box-sizing: border-box; padding: 44px 32px 36px; text-align: center;
  background: var(--surface); border: 1px solid var(--grid); border-radius: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .10); }
.auth-card .logo { width: 72px; height: 72px; margin: 0 auto 14px; }
.auth-card h1 { margin: 0 0 30px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.auth-note { margin: -16px 0 24px; color: var(--ink-2, inherit); font-size: 14px; word-break: break-word; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; box-sizing: border-box;
  padding: 12px 18px; border: 1px solid #dadce0; border-radius: 10px; background: #fff; color: #1f1f1f;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; transition: box-shadow .15s, background .15s; }
.g-btn:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60, 64, 67, .3), 0 2px 8px rgba(60, 64, 67, .15); text-decoration: none; }
.g-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-logo { width: 20px; height: 20px; flex: none; }
