/* ======================================================================
   Vuldozer News - админка. Оформление по макетам портала.

   Правила, которые держат вид цельным:
   - цвета, отступы и радиусы берутся из переменных ниже, а не вписываются
     в правила: поменять оттенок кнопок - одна строка;
   - синий и фиолетовый обозначают действия и навигацию; яркие
     розовый и бирюзовый используются дозированно, рабочие поверхности светлые;
   - кнопки и поля высотой 40 px, на телефоне 44 px: палец не промахнётся;
   - статус всегда написан словом, цвет - только подсказка.
   ====================================================================== */

:root {
  /* Brand palette supplied by the product owner. */
  --neon-pink: #f72585ff;
  --indigo-bloom: #7209b7ff;
  --vivid-royal: #3a0ca3ff;
  --electric-sapphire: #4361eeff;
  --sky-aqua: #4cc9f0ff;
  --brand-gradient: linear-gradient(135deg, var(--neon-pink), var(--indigo-bloom), var(--vivid-royal), var(--electric-sapphire), var(--sky-aqua));
  --indigo-soft: #F5EFFA;
  --aqua-soft: #EFFBFE;
  --aqua-ink: #15566B;

  /* подложка и карточки */
  --bg: #F6F6FA;
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --surface-3: #F3F4F8;
  --surface-4: #EEEFF5;
  --line: #E6E7EF;
  --line-soft: #F0F1F5;
  --line-field: #E1E3EC;
  --line-hover: #B9BDD0;

  /* текст */
  --ink: #10111A;
  --ink-2: #3D4055;
  --muted: #5B5E72;
  --muted-2: #6B6E82;
  --faint: #9A9DB0;

  /* действие */
  --accent: var(--electric-sapphire);
  --accent-dark: var(--vivid-royal);
  --accent-soft: #F2F4FF;
  --accent-line: #CCD4FB;
  --accent-2: var(--indigo-bloom);

  /* состояния */
  --warn-ink: #8A4B00;
  --warn-bg: #FFF1DC;
  --ok-ink: #0B6B43;
  --ok-bg: #E5F6EE;
  --bad-ink: #AA1458;
  --bad-bg: #FEE9F2;
  --bad-line: #F9A8CC;
  --bad-wash: #FFF5F9;

  --r: 10px;
  --r-card: 14px;
  --ctl: 40px;
  --shadow: 0 1px 2px rgba(16, 17, 26, .08);
  --sidebar: 264px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 Onest, "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* иконки: один набор обводкой, цвет наследуется от кнопки или ссылки */
.ic {
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* ======================================================================
   Оболочка: меню сбоку, страница справа
   ====================================================================== */

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }

.side {
  flex: 1 1 var(--sidebar);
  max-width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 10px; padding: 2px 8px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-gradient);
}
.brand-mark .ic { stroke: #FFFFFF; stroke-width: 2.2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 700; }
.brand-text span { font-size: 12px; color: var(--muted); }

/* переключатель разделов: новости, круизы, финансы */
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(72px, 100%), 1fr));
  gap: 2px; padding: 3px;
  background: #ECEDF3; border-radius: var(--r);
}
.section-tab {
  min-height: 34px; padding: 0 6px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center;
}
.section-tab:hover { color: var(--ink); background: transparent; }
.section-tab.on {
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

/* строка канала под переключателем */
.side-channel {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r);
  background: var(--bg); color: var(--ink); font-size: 13px;
}
.side-channel:hover { color: var(--ink); background: var(--surface-4); }
.side-channel .ic { color: var(--accent); }
.side-channel span {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.side-channel.none { color: var(--bad-ink); background: var(--bad-bg); }
.side-channel.none .ic { color: var(--bad-ink); }

.side nav { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.menu-group.help { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.menu-group { display: flex; flex-direction: column; gap: 2px; }
.menu-title {
  font-size: 11px; font-weight: 600; color: var(--muted-2);
  padding: 0 12px 6px; text-transform: uppercase; letter-spacing: .08em;
}

.nav {
  display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: var(--r);
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.nav:hover { background: var(--surface-4); color: var(--ink); }
.nav.on { background: var(--accent-soft); color: var(--accent); }
.nav span.label { flex: 1; min-width: 0; }

.cnt {
  font-size: 12px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cnt.hot {
  background: var(--accent); color: #FFFFFF;
  border-radius: 999px; padding: 2px 8px;
}
.cnt.warn {
  background: var(--bad-bg); color: var(--bad-ink);
  border-radius: 999px; padding: 2px 8px;
}
.nav.on .cnt { color: var(--accent); }
.nav.on .cnt.hot { color: #FFFFFF; }

.side-foot { display: flex; flex-direction: column; gap: 2px; }
.who {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 0 12px; margin: 0;
}
.who-face {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
}
.who-name {
  flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* правая часть: шапка страницы и её содержимое */
.page { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }

.page-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 32px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em;
}
.head-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.head-text p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.head-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-note {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  font-size: 12px; color: var(--muted); line-height: 1.35; text-align: right;
}

main {
  padding: 24px 32px 48px;
  display: flex; flex-direction: column; gap: 18px;
  /* ширина макета: дальше строка становится слишком длинной для чтения */
  max-width: 1440px; width: 100%;
}
main.wide { max-width: none; }

/* кнопка меню и подпись раздела в меню: видны только на узком экране */
.side-block { display: flex; flex-direction: column; gap: 8px; }
.page-head .side-open { display: none; }
.menu-switch { position: absolute; opacity: 0; pointer-events: none; }
.hide-narrow { white-space: pre; }

/* ======================================================================
   Кнопки
   ====================================================================== */

button, .btn, input[type="submit"] {
  min-height: var(--ctl); padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line-field); background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--line-hover); color: var(--ink); }
button:disabled, .btn.off { opacity: .45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line-field); }

/* главное действие страницы */
button.secondary, button.approve, .btn.primary, input[type="submit"] {
  background: var(--accent); border-color: var(--accent); color: #FFFFFF;
  font-weight: 600; padding: 0 16px;
}
button.secondary:hover, button.approve:hover, .btn.primary:hover {
  background: var(--accent-dark); border-color: var(--accent-dark); color: #FFFFFF;
}

/* отказ, удаление, сброс */
button.reject, button.danger, .btn.danger { color: var(--bad-ink); }
button.reject:hover, button.danger:hover, .btn.danger:hover {
  border-color: var(--bad-line); background: var(--bad-wash); color: var(--bad-ink);
}

/* кнопка-ссылка и мелкая кнопка в строке */
button.plain, .plain {
  border-color: transparent; background: transparent; color: var(--ink-2);
  padding: 0 10px;
}
button.plain:hover, .plain:hover {
  background: var(--surface-4); border-color: transparent; color: var(--ink);
}
button.plain.reject:hover, .plain.reject:hover {
  background: var(--bad-bg); color: var(--bad-ink);
}
button.mini, .mini {
  min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px;
}
button.wide { width: 100%; }

/* кнопка только с иконкой */
.ib {
  width: 40px; height: 40px; min-height: 40px; padding: 0;
  border-radius: var(--r); border: 0; background: transparent;
  color: var(--ink-2); display: inline-grid; place-items: center;
  cursor: pointer; flex: none;
}
.ib:hover { background: var(--surface-4); color: var(--ink); border: 0; }
.ib.reject:hover, .ib.danger:hover { background: var(--bad-bg); color: var(--bad-ink); }

/* выбор из нескольких: длина текста, период, порядок */
.segs {
  display: inline-flex; gap: 2px; padding: 3px; flex-wrap: wrap;
  background: #ECEDF3; border-radius: var(--r);
}
.segs button, .segs .seg {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: #4A4D63; font-size: 14px; font-weight: 500;
}
.segs button:hover, .segs .seg:hover { color: var(--ink); border: 0; }
.segs button.chosen, .segs button.on, .segs .seg.on, .segs a.on {
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

/* ======================================================================
   Поля
   ====================================================================== */

input[type="text"], input[type="search"], input[type="password"],
input[type="number"], input[type="url"], input[type="datetime-local"],
input[type="date"], input[type="time"], select, textarea {
  min-height: var(--ctl); padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line-field); background: var(--surface);
  color: var(--ink); font-size: 14px; outline: none; max-width: 100%;
}
select {
  padding-right: 32px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B5E72' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  background-size: 18px 18px;
}
textarea {
  padding: 10px 12px; line-height: 1.55; resize: vertical; width: 100%;
  min-height: 80px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .12);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
/* выбор файла шире телефона: у него своя ширина по умолчанию, а в строке
   он ещё и отказывается сжиматься */
input[type="file"] { max-width: 100%; min-width: 0; flex: 1 1 160px; font-size: 13px; }

label { display: block; }
.lbl, .settings-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.hint {
  display: block; font-size: 12px; font-weight: 400; color: var(--muted);
  line-height: 1.45;
}
/* галочка и подпись в строку: без flex-direction строка настроек брала
   столбик от .settings-form label и вставала по центру */
label.checkbox, .checkbox {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 400; color: var(--ink);
}
label.checkbox .hint { margin-left: 28px; }
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; min-height: 0; margin: 0; flex: none;
  accent-color: var(--accent); cursor: pointer;
}
/* выключатель: там, где настройка включается одним движением */
input[type="checkbox"].sw {
  appearance: none; -webkit-appearance: none;
  width: 36px; height: 22px; border-radius: 999px; background: #C9CCDA;
  position: relative; border: 0;
}
input[type="checkbox"].sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s;
}
input[type="checkbox"].sw:checked { background: var(--accent); }
input[type="checkbox"].sw:checked::after { transform: translateX(14px); }

/* поиск с иконкой внутри рамки */
.search {
  flex: 1 1 280px; max-width: 420px; display: flex; align-items: center;
  gap: 8px; height: var(--ctl); padding: 0 12px;
  border: 1px solid var(--line-field); border-radius: var(--r);
  background: var(--surface); color: var(--muted-2);
}
.search input {
  flex: 1; min-width: 0; border: 0; outline: none; padding: 0;
  background: transparent; font-size: 14px; min-height: 0;
}
.search input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, .12); }

/* подпись к полю в строке отбора: «Страна [выбор]» */
.pick-inline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
}

/* ======================================================================
   Карточки, метки, таблицы
   ====================================================================== */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.card.dashed { border-style: dashed; }
.card.accent { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(67, 97, 238, .06); }

/* строка про новость: категория, страна, источник, время */
.meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.meta b, .meta .src { color: var(--ink-2); font-weight: 500; }
/* в источнике иногда лежит длинный адрес ленты: он не должен уводить
   карточку за край экрана */
.meta .src, .meta a { overflow-wrap: anywhere; min-width: 0; }
.meta time { white-space: nowrap; }

/* метка состояния: слово плюс цвет-подсказка */
.badge, .pill, .status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px;
  background: var(--surface-4); color: var(--ink-2); white-space: nowrap;
}
.badge.blue, .pill.blue, .status.blue { background: var(--accent-soft); color: var(--accent); }
.badge.ok, .pill.ok, .status.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn, .pill.warn, .status.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad, .pill.bad, .status.bad, .pill.off { background: var(--bad-bg); color: var(--bad-ink); }

/* нейтральная метка: категория, хэштег, страна - их десятки, цвета им не нужно */
.tag, .cat, .country, .channel-tag, .hashtag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  background: var(--surface-3); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}

code, .mono { overflow-wrap: anywhere; }
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; color: #4A4D63;
  background: var(--surface-3); border-radius: 4px; padding: 0 5px;
}

table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden;
}
th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface-2);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
.table-scroll { overflow-x: auto; }

/* ряды с полями прямо в таблице: добавить источник, переименовать тему */
.row-form, .row-actions, .actions, .length-row, .compose-row,
.image-form, .time-form, .kind-form, .move-form, .age-form, .picks-write {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.row-actions, .actions { gap: 6px; }
.add-source, .bulk-import { display: flex; flex-direction: column; gap: 10px; }

/* полоса действий над списком: прилипает к верху, пока листаешь */
.bulk, .filters-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.bulk.on { background: var(--accent-soft); border-color: var(--accent-line); }
.bulk .sep { width: 1px; height: 24px; background: #D9DBE6; }
.bulk .right { margin-left: auto; font-size: 13px; color: var(--muted); }
.bulk.shift, .bulk.plain-row { position: static; }

/* отбор чипсами: категории, страны, повторы */
.filters, .pills, .picks { display: flex; gap: 8px; flex-wrap: wrap; }
.chip, .pick {
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-field); background: var(--surface);
  color: var(--ink-2); font-size: 13px; font-weight: 400;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip:hover, .pick:hover { border-color: var(--line-hover); color: var(--ink); }
.chip.on, .pick.on, .chip.chosen {
  background: var(--ink); border-color: var(--ink); color: #FFFFFF;
}
.chip.on .cnt, .pick.on .cnt { color: #C9CCDA; }

/* перелистывание */
.pager {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; flex-wrap: wrap;
}
.pager a, .pager .pager-info {
  min-height: var(--ctl); padding: 0 14px; border-radius: var(--r);
  display: inline-flex; align-items: center; font-size: 14px;
}
.pager a {
  border: 1px solid var(--line-field); background: var(--surface); color: var(--ink);
}
.pager a:hover { border-color: var(--line-hover); }
.pager .pager-info { color: var(--muted); }

/* сообщения после действия */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flashes p {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: #FFFFFF; font-size: 14px;
}
.flashes.done p { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

.empty:not(.heat-cell) {
  border: 1px dashed var(--line); border-radius: var(--r-card);
  background: var(--surface); padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; color: var(--muted); font-size: 15px;
}

.info, .page-help, .query-note {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 16px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.page-help p + p { margin-top: 8px; }
.warn { color: var(--bad-ink); }
.off { color: var(--muted); }

/* раздел внутри страницы */
.block { display: flex; flex-direction: column; gap: 12px; }
.block > h3, .section-title, .h2 { font-size: 17px; font-weight: 600; }
.block > h3 .hint, .section-title .hint { display: inline; font-weight: 400; margin-left: 6px; }
.section-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  justify-content: space-between;
}
.settings-form h3.section {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line);
}
.settings-form h3.section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* подразделы одной темы: «Сторис · План · Библиотека · Своя новость» */
.subtabs {
  display: inline-flex; gap: 2px; padding: 3px; flex-wrap: wrap;
  background: #ECEDF3; border-radius: var(--r);
}
.subtabs a {
  min-height: 34px; padding: 0 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  color: #4A4D63; font-size: 14px; font-weight: 500;
}
.subtabs a:hover { color: var(--ink); }
.subtabs a.on {
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

/* плитки «путь поста» и числа сверху страницы */
.stat-row, .steps, .best-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 10px;
}
.best-row { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.stat-card, .step, .best {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.step.on { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(67, 97, 238, .06); }
.stat-label, .step-name {
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.step-name.q { color: var(--accent); }
.step-name.r { color: var(--warn-ink); }
.step-name.s { color: var(--accent); }
.step-name.p { color: var(--ok-ink); }
.stat-value, .step b {
  font-size: 24px; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-note { font-size: 12px; color: var(--muted); line-height: 1.45; }
a.step:hover, a.stat-card:hover { border-color: var(--line-hover); color: var(--ink); }

/* ======================================================================
   Карточка новости: галочка, превью, текст, действия справа
   ====================================================================== */

.item-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.item-top > input[type="checkbox"] { margin-top: 4px; }
.item-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item-body h3 { font-size: 16px; line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.item-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none;
}
.item-side .length-row { gap: 6px; justify-content: flex-end; }
.item-side .row-actions { gap: 2px; }

/* превью новости: картинка или подпись, почему её нет */
.thumb {
  width: 88px; height: 64px; border-radius: var(--r); flex: none;
  background: var(--surface-3); color: var(--muted);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; padding: 4px; overflow: hidden;
  font-size: 11px; line-height: 1.2; text-align: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
td.thumb { width: 100px; }

/* заголовок оригинала под переводом: язык отдельной плашкой */
.original-title {
  font-size: 13px; line-height: 1.45; color: var(--muted);
  display: flex; gap: 8px; align-items: baseline;
}
.original-title span.text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

/* раскрывающиеся части карточки */
details > summary {
  cursor: pointer; list-style: none; display: inline-flex;
  align-items: center; gap: 8px; font-size: 13px;
  font-weight: 500; color: var(--ink-2); min-height: 32px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary:hover { color: var(--accent); }
.own-body, .art-prompt, .bulk-import { display: flex; flex-direction: column; gap: 8px; }
.item-more {
  border-top: 1px solid var(--line-soft); padding-top: 12px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px;
}

/* готовый пост в проверке */
.post-headline { font-size: 16px; font-weight: 600; line-height: 1.4; }
.post-text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.headline-input { font-size: 16px; font-weight: 600; width: 100%; }
.image-box { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.image-box form, .image-form { max-width: 100%; }
/* превью картинки: вертикальный кадр иначе занимал пол-экрана */
img.post-image {
  max-width: 320px; max-height: 300px; width: auto; height: auto;
  border-radius: 12px; border: 1px solid var(--line);
}
.char-count { font-size: 13px; color: var(--accent); font-weight: 500; }

/* замечания к посту и предупреждения */
.review, .paywall, .needs-check {
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5;
}
.review { background: var(--bad-bg); color: var(--bad-ink); }
.review ul { margin: 6px 0 0; padding-left: 18px; }
.review strong { font-weight: 600; }
.paywall { background: var(--warn-bg); color: var(--warn-ink); }
.needs-check { background: var(--accent-soft); color: var(--accent); }
.card.from-channel { border-color: var(--accent-line); }

/* хэштеги */
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tags-row input { flex: 1 1 260px; }
.tag-hints { display: flex; gap: 6px; flex-wrap: wrap; }
button.tag-chip {
  min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface-3); border-color: transparent; color: var(--ink-2);
}
button.tag-chip:hover { border-color: var(--line-hover); }
button.tag-chip.used { background: var(--accent-soft); color: var(--accent); }

/* панель повторов: чипсы вместо списка сбоку */
.trends { display: flex; flex-direction: column; gap: 10px; }
.trends ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.trends li { display: inline-flex; }
.trends a.chip { gap: 8px; }
.trend-roundup { display: inline-flex; }
.trend-roundup button { min-height: 34px; }

/* сторис: вертикальный кадр, как его увидят читатели */
.story-layout { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.story-preview {
  width: 220px; flex: none; border-radius: 16px; overflow: hidden;
  background: #DCE4EE; padding: 10px;
}
.story-card { background: var(--surface); border-radius: 12px; overflow: hidden; }
.story-card img { width: 100%; display: block; aspect-ratio: 9 / 16; object-fit: cover; }
.story-caption { padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.story-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.story-input { width: 100%; }

/* своя новость: форма в одну колонку, парные поля - в две */
form.compose, .settings-form {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 20px 22px;
}
.compose-row { gap: 14px; }
.compose-row > label { flex: 1 1 220px; min-width: 0; }
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px;
}

/* инструкция: текст слева, содержание сбоку */
.manual-layout { display: flex; gap: 24px; align-items: flex-start; }
.manual-toc {
  position: sticky; top: 24px; flex: 0 0 240px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px 16px; font-size: 13px;
}
.manual-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.manual {
  flex: 1; min-width: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 8px 28px 24px; line-height: 1.65;
}
.manual h2, .manual h3 { margin: 24px 0 10px; }
.manual p, .manual li { font-size: 14px; }
.manual code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
  background: var(--surface-3); border-radius: 4px; padding: 1px 5px;
}
.manual pre {
  background: var(--surface-3); border-radius: 10px; padding: 12px 14px;
  overflow-x: auto; font-size: 12px;
}
.manual blockquote {
  margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--accent-line);
  background: var(--accent-soft); border-radius: 0 10px 10px 0;
}

/* пока работает модель */
button.busy, button.waiting { opacity: .6; cursor: progress; }
.async-note { font-size: 13px; color: var(--ok-ink); }
.async-note.bad { color: var(--bad-ink); }
article.removed { display: none; }

/* ======================================================================
   Аналитика
   ====================================================================== */

.channel-line {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px 16px;
}
.channel-line p { font-size: 14px; }

/* сетка «день недели - час»: насыщенность клетки - доля от лучшего слота */
.heat {
  display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr));
  gap: 2px; align-items: center; max-width: 860px;
}
.heat-hour { font-size: 10px; color: var(--faint); text-align: center; }
.heat-day { font-size: 11px; color: var(--muted); }
.heat-day.tg { color: var(--accent); font-weight: 600; }
.heat-cell {
  height: 18px; border-radius: 4px;
  background: rgba(67, 97, 238, calc(0.06 + var(--heat, 0) * 0.94));
}
.heat-cell.blank { background: var(--surface-3); }

.advice-list { list-style: none; margin: 0; padding: 0; max-width: 620px; }
.advice-list li {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.advice-list li:last-child { border-bottom: 0; }
.advice-when { font-weight: 600; min-width: 170px; }
.advice-views { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

.chart { display: block; width: 100%; max-width: 760px; height: auto; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-mark { font-size: 10px; fill: var(--faint); }
.chart-area { fill: rgba(67, 97, 238, .08); stroke: none; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; }

.cuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.cut { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cut h4 { font-size: 13px; color: var(--muted); font-weight: 600; }
table.cut-table { background: transparent; border: 0; font-size: 13px; }
table.cut-table td { padding: 6px 2px; border-bottom: 1px solid var(--line-soft); }
table.cut-table tbody tr:hover td { background: transparent; }
.cut-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cut-bar { width: 40%; }
.cut-bar .bar {
  display: block; height: 8px; min-width: 2px; border-radius: 4px;
  background: var(--accent);
}
.cut-num { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cut-posts { color: var(--muted); white-space: nowrap; text-align: right; }

.spark-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px; border-bottom: 1px solid var(--line-soft);
}
.spark-row:last-child { border-bottom: 0; }
.spark-name { font-size: 13px; color: var(--ink-2); flex: 0 0 38%; }
.spark { flex: 1; height: 28px; min-width: 60px; }
.spark-value {
  font-size: 13px; font-weight: 600; min-width: 42px; text-align: right;
  font-variant-numeric: tabular-nums;
}

table.posts td.num { white-space: nowrap; }
table.posts td.when-cell { white-space: nowrap; color: var(--muted); }
table.posts .post-name { min-width: 280px; }
/* в ячейке с заголовком текст не должен растягивать таблицу шире экрана */
.post-name .cell { max-width: 560px; }
table.posts .post-name a { font-weight: 500; line-height: 1.35; color: var(--ink); }
table.posts .post-name a:hover { color: var(--accent); }
table.by-day td, table.by-day th { white-space: nowrap; }

/* источники: имя со ссылкой и состояние ленты */
.source-name a.url {
  display: block; max-width: 280px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted);
}

/* ======================================================================
   Страница входа: одна карточка посередине
   ====================================================================== */

body.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; background: var(--bg);
}
.login-box {
  width: 100%; max-width: 360px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px 26px;
  display: flex; flex-direction: column; gap: 4px;
}
.login-box .brand { padding: 0 0 14px; }
.login-box h1 { font-size: 20px; font-weight: 700; }
.login-about { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form input { width: 100%; }
.login-form button { width: 100%; }
.login-problem {
  font-size: 13px; color: var(--bad-ink); background: var(--bad-bg);
  border-radius: var(--r); padding: 10px 12px; line-height: 1.45;
}

/* ======================================================================
   Узкий экран. Меню уезжает под кнопку, кнопки растут до 44 px, таблицы
   прокручиваются внутри себя, а не тянут вбок всю страницу.
   ====================================================================== */

@media (max-width: 1000px) {
  .shell { display: block; }
  .side {
    display: none; max-width: none; width: 100%;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .menu-switch:checked ~ .shell .side { display: flex; }
  .page-head .side-open { display: inline-grid; }
  .side { order: -1; }
  .page-head { padding: 14px 16px; }
  .page-head h1 { font-size: 21px; }
  main { padding: 16px 16px 48px; }
}

@media (max-width: 700px) {
  /* в кнопке обхода на телефоне остаётся только «Проверить» */
  .hide-narrow { display: none; }
  .head-note { display: none; }

  /* мельче 16px Safari увеличивает всю страницу, стоит коснуться поля */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  button, .btn { min-height: 44px; }
  button.mini, .mini, .segs button, .subtabs a { min-height: 38px; }
  .ib { width: 44px; height: 44px; min-height: 44px; }

  .item-top { flex-wrap: wrap; }
  .item-side { flex-direction: row; align-items: center; width: 100%; flex-wrap: wrap; }
  .item-side .length-row, .item-side .row-actions { flex: 1 1 100%; justify-content: flex-start; }
  .thumb { width: 72px; height: 54px; }

  /* длинные названия тем на телефоне переносятся, а не уезжают за край */
  .chip, .pick { white-space: normal; max-width: 100%; text-align: left; }
  .trends ul { flex-direction: column; align-items: stretch; }
  .trends li { justify-content: space-between; }
  .meta { row-gap: 4px; }

  .bulk { padding: 12px; }
  .bulk button, .picks-write, .picks-write button, .picks-write select { width: 100%; }
  .actions button, .row-actions button, .length-row button { flex: 1 1 auto; }
  .row-form input, .row-form button, .row-form select { width: 100%; }

  /* таблица шире экрана прокручивается внутри себя */
  table { display: block; overflow-x: auto; scrollbar-width: thin; }
  table.sources, table.by-day { min-width: 760px; }

  /* источники и посты на телефоне - карточками, а не таблицей в пять столбцов;
     обёртка остаётся прокручиваемой: в ней живёт широкая таблица по дням */
  table.sources, table.posts { display: block; min-width: 0; border: 0; }
  table.sources thead, table.posts thead { display: none; }
  table.sources tbody, table.sources tr, table.sources td,
  table.posts tbody, table.posts tr, table.posts td { display: block; }
  table.sources tr, table.posts tr {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-card); padding: 10px 2px 12px; margin-bottom: 10px;
  }
  table.sources td, table.posts td { border: 0; padding: 5px 12px; }
  table.sources td[data-label]::before, table.posts td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11px;
    text-transform: uppercase; letter-spacing: .04em; color: var(--faint);
    margin-bottom: 3px;
  }
  table.sources td.source-name::before, table.posts td.post-name::before { display: none; }
  .source-name a.url { max-width: 100%; }

  .manual-layout { flex-direction: column; }
  .manual-toc { position: static; flex: 1 1 auto; width: 100%; }
  .manual { padding: 6px 16px 18px; }
  form.compose, .settings-form { padding: 14px; }
  .story-preview { width: 100%; }

  .stat-row, .steps { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
  .stat-value, .step b { font-size: 20px; }
  .cut-name { max-width: 40vw; }
  /* 24 клетки в 375 пикселей влезают, если ужать их и промежутки */
  .heat { grid-template-columns: 22px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .heat-cell { height: 14px; border-radius: 2px; }
  .heat-hour { font-size: 8px; }
  .advice-when { min-width: 0; flex: 1 1 100%; }
  .pager .pager-info { flex: 1 0 100%; order: -1; text-align: left; }
}

/* длина поста: число, полоска и подсказка про предел Telegram */
.post-form { display: flex; flex-direction: column; gap: 14px; }
.chars { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.char-line { font-size: 13px; color: var(--accent); font-weight: 500; }
.char-bar { display: block; height: 6px; border-radius: 3px; background: var(--line-soft); }
.char-bar > span {
  display: block; height: 6px; border-radius: 3px; background: var(--accent);
}
.char-bar.over > span { background: var(--bad-ink); }
.actions .sep, .bulk .sep { width: 1px; height: 24px; background: #D9DBE6; flex: none; }
.actions { gap: 8px; }

/* ======================================================================
   Страница с боковой колонкой: список слева, советы и числа справа
   ====================================================================== */

.with-aside { display: flex; gap: 18px; align-items: flex-start; }
.col-main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.col-side { flex: 0 1 300px; display: flex; flex-direction: column; gap: 14px; }

.facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.facts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.facts-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.facts-list li:last-child { border-bottom: 0; }

/* Расписание: время слева, карточка справа. Время в отдельном столбце
   читается как лента дня: видно, где посты идут кучей, а где пауза. */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline > li { display: flex; gap: 14px; align-items: flex-start; }
.timeline .at {
  flex: 0 0 76px; display: flex; flex-direction: column; gap: 2px;
  padding-top: 12px; text-align: right; font-variant-numeric: tabular-nums;
}
.timeline .at b { font-size: 17px; font-weight: 700; }
.timeline .at span { font-size: 12px; color: var(--muted); }
.timeline .at.overdue b { color: var(--bad-ink); }
.timeline .card { flex: 1; min-width: 0; }

@media (max-width: 1000px) {
  /* колонка в столбик: без ширины она растягивается по содержимому и
     уводит страницу вбок */
  .with-aside { flex-direction: column; align-items: stretch; }
  .col-main, .col-side { flex: 1 1 auto; width: 100%; min-width: 0; }
}
@media (max-width: 700px) {
  .timeline > li { gap: 8px; }
  .timeline .at { flex: 0 0 58px; padding-top: 10px; }
  .timeline .at b { font-size: 15px; }
}

/* ======================================================================
   Источники: широкая таблица с состоянием лент
   ====================================================================== */

/* имя источника не должно растягивать таблицу: ширина ячейки ограничена */
.source-name .cell { max-width: 420px; }
.source-name .name { margin-bottom: 4px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }

/* отметка о последних новостях: цвет сразу показывает, жива ли лента */
td.health { white-space: nowrap; font-size: 13px; }
td.health .hint { margin-top: 2px; }
td.health.ok { color: var(--ok-ink); }
td.health.warn { color: var(--warn-ink); }
td.health.bad { color: var(--bad-ink); }
td.health.unknown { color: var(--muted); }

.kind-form select, .move-form select { max-width: 170px; font-size: 13px; }
.age-form input { width: 92px; }
.row-actions form { margin: 0; }
/* кнопки строки не должны вставать столбиком: столбец таблицы иначе
   растягивает строку на треть экрана по высоте */
table.sources .row-actions { flex-wrap: nowrap; }
table.sources td:last-child { display: flex; flex-direction: column; gap: 4px; }
table.sources .move-form select { max-width: 140px; }
table.sources td { padding: 8px 10px; }
table.sources .age-form { min-width: 130px; flex-wrap: nowrap; }

.page-help { display: flex; flex-direction: column; gap: 10px; }
.page-help p { max-width: 820px; color: var(--ink-2); }
.page-help summary { font-size: 14px; }

/* выключенная строка: видно, что источник не собирается */
tr.off td, article.off { opacity: .6; }
.heat-corner { display: block; }
.channel-line.card { flex-direction: row; }

/* ======================================================================
   Настройки: карточка на тему, кнопка сохранения прилипает снизу
   ====================================================================== */

.settings-form {
  background: transparent; border: 0; padding: 0; gap: 18px;
}
.settings-form section.card { gap: 14px; }
.settings-form label.lbl { max-width: 560px; }
.settings-form label.wide { max-width: none; }
.settings-form fieldset {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px 16px; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.settings-form legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.settings-form .impartial { background: var(--surface-2); }
.settings-form .hours { display: inline-flex; align-items: center; gap: 8px; }
.settings-form .hours input { width: 92px; }
.bulk.save-row { position: sticky; bottom: 0; top: auto; }
label.checkbox.inline { display: inline-flex; margin-right: 14px; }
.impartial label.checkbox.inline { flex: 0 1 auto; }
tr.total td { background: var(--surface-2); }
td.url, .url { font-size: 12px; color: var(--muted); }

/* Как пост увидят в канале: его показ повторяет поля при наборе */
.tg-preview { display: flex; flex-direction: column; gap: 8px; }
.tg-card {
  max-width: 420px; background: #DCE4EE; border-radius: 16px; padding: 10px;
}
.tg-card > * { display: block; }
.tg-card .tg-channel,
.tg-card .post-headline,
.tg-card .post-text,
.tg-card a,
.tg-card .preview-tags {
  background: var(--surface); padding: 2px 12px; font-size: 14px; line-height: 1.5;
}
.tg-card > :first-child { border-radius: 12px 12px 0 0; padding-top: 10px; }
.tg-card > :last-child { border-radius: 0 0 12px 12px; padding-bottom: 10px; }
.tg-card .tg-channel { font-weight: 700; }
.tg-card .post-headline { font-weight: 600; }
.tg-card .preview-tags { color: var(--accent); font-size: 13px; }
.tg-card .preview-tags:empty { display: none; }

/* Расписание: время и кнопки одной строкой под новостью */
.when-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.when-row .time-form { gap: 8px; }
/* кнопки-значки держатся вместе и прижаты вправо */
.when-acts { display: flex; gap: 2px; margin-left: auto; }

/* ======================================================================
   Зоны страницы. Блоки одного назначения красятся одинаково во всех
   разделах, и по цвету видно, что это за блок, не читая заголовка:

   синий   - подсказки и то, чем отбирают (повторы, периоды);
   серый   - ввод: добавить источник, тему, слово;
   янтарный - действия над выделенным;
   розовый - действия над всем списком и уборка.

   Цвета бледные: на странице и так есть синие кнопки и цветные метки,
   и насыщенные подложки с ними спорят.
   ====================================================================== */

.card.zone-pick { background: #ECF0FE; border-color: #C7D1FB; }
.card.zone-add, form.compose.zone-add { background: #F1F2F7; border-color: #DEE0EA; }
.card.zone-bulk { background: #FFF3E0; border-color: #EDD6B2; }
.card.zone-all { background: #FBEFF5; border-color: #EDCBDC; }

/* заголовок зоны в её же цвете: так зона читается и без цвета подложки.
   Красным - только то, что удаляет: «всё в расписание» не опасно. */
.zone-pick > .section-head .section-title, .zone-pick > .section-title { color: var(--accent); }
.section-title.danger { color: var(--bad-ink); }

/* полоса действий над выделенным - та же янтарная зона; как только
   что-то отмечено, она синеет: видно, что кнопки заряжены */
.bulk { background: #FFF3E0; border-color: #EDD6B2; }
.bulk.plain-row { background: var(--surface); border-color: var(--line); }
.bulk.zone-all { background: #FBEFF5; border-color: #EDCBDC; }
.info.zone-pick { background: #ECF0FE; border-color: #C7D1FB; color: var(--ink-2); }
.bulk.on { background: var(--accent-soft); border-color: var(--accent-line); }
.bulk.save-row { background: var(--surface); border-color: var(--line); }

/* поля внутри цветной зоны остаются белыми, иначе их не видно */
.compose.zone-add input, .compose.zone-add select, .compose.zone-add textarea,
.card.zone-pick input, .card.zone-pick select, .card.zone-pick textarea,
.card.zone-add input, .card.zone-add select, .card.zone-add textarea,
.card.zone-bulk input, .card.zone-bulk select, .card.zone-bulk textarea,
.card.zone-all input, .card.zone-all select, .card.zone-all textarea,
.bulk input, .bulk select { background: var(--surface); }

/* ссылки-кнопки внутри переключателя: выгрузка в Excel и CSV */
.segs a {
  min-height: 34px; padding: 0 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  color: #4A4D63; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.segs a:hover { color: var(--ink); background: var(--surface); }

/* сравнение каналов: лидер столбца и прирост подписчиков */
.top { color: var(--accent); }
.up { color: var(--ok-ink); }
.down { color: var(--bad-ink); }
table.posts td.num .hint { white-space: normal; }

/* Shared workspace and editorial channel selection, above page content. */
.channel-picker {display:flex;align-items:end;flex-wrap:wrap;gap:16px;padding:20px 32px;background:#fff;border-bottom:1px solid #e4e8f1}
.channel-picker label {display:flex;flex-direction:column;gap:6px;min-width:200px;font-size:13px;font-weight:600}
.channel-picker select {min-height:44px;max-width:100%;padding:9px 36px 9px 12px;border:1px solid #cbd5e1;border-radius:9px;background:#f8faff;font:inherit;color:#18233b}
.channel-picker [hidden] {display:none!important}
.channel-picker p {font-size:13px;color:#64748b}
@media(max-width:600px){.channel-picker {padding:16px}.channel-picker label {width:100%;min-width:0}.channel-picker select {width:100%}}

.channel-picker-help {flex:1 1 260px;min-width:0}.channel-picker-help p {margin:0 0 6px}.channel-picker-help a {display:inline-block;margin:4px 12px 0 0}.channel-picker label {min-width:0;max-width:100%;flex:0 1 340px}
