/* ДОЧА — кабинет автоматизации Telegram.

   Неон на почти чёрном: розово-пурпурный акцент, стеклянные карточки, крупные
   радиусы, свечение вместо линеек. Палитра задана здесь и НЕ перебивается темой
   Telegram (см. applyTheme в app.js) — иначе на светлой теме клиента кабинет
   становился нечитаемым. */

:root {
  /* поверхности */
  --bg: #0A0510;
  --bg-soft: #150A1E;
  --card: #180C22;
  --card-hi: #21112E;
  --glass: rgba(255, 255, 255, 0.045);
  --text: #F8EDF7;
  /* Приглушённый текст: 7.1:1 на карточке — уровень AAA, а не «на глаз норм» */
  --muted: #B9A0C9;
  --line: rgba(255, 130, 205, 0.16);
  --line-hi: rgba(255, 130, 205, 0.34);

  /* акценты */
  --accent: #FF3D9A;
  --accent-2: #C31E9B;
  --accent-soft: rgba(255, 61, 154, 0.14);
  --accent-grad: linear-gradient(135deg, #FF4FA6 0%, #C31E9B 100%);
  --violet: #A855F7;
  --blue: #4C8DFF;
  --cyan: #22D3EE;
  --teal: #2DD4BF;

  --green: #34D399;
  --orange: #FBBF24;
  --red: #FB7185;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --nav-h: 64px;
  --glow: 0 0 26px rgba(255, 61, 154, 0.34);
  --glow-soft: 0 8px 26px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  overflow-x: clip;
  overscroll-behavior-y: none;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 61, 154, 0.22), transparent 62%),
    radial-gradient(90% 50% at 100% 8%, rgba(168, 85, 247, 0.16), transparent 60%),
    linear-gradient(180deg, #0F0618 0%, #0A0510 52%, #060309 100%);
  background-attachment: fixed;
}

/* Дымка по краям экрана: держит неон и не даёт фону выглядеть плоским */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70% 40% at 0% 100%, rgba(195, 30, 155, 0.16), transparent 70%),
    radial-gradient(60% 34% at 100% 92%, rgba(76, 141, 255, 0.10), transparent 70%);
}

.content, .header, .nav { position: relative; z-index: 1; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
.hidden { display: none !important; }
/* Атрибут hidden обязан прятать. Наши правила задают display (.btn —
   inline-flex, .picker__bulk — flex), а любое авторское правило сильнее
   браузерного [hidden] { display: none }: без этой строки элемент с hidden
   продолжал показываться — так на экране оставались «Оплатить на сайте» при
   выключенной оплате и «Готово» в выборе одного чата. */
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* SVG-иконки из спрайта: размер задаёт место, цвет наследуется от текста.
   Белые — только на градиентных плашках (.ico--*), везде иначе currentColor. */
.ic { width: 18px; height: 18px; flex: none; }
.tile__ico .ic, .cmd__ico .ic, .task__ico .ic { color: #fff; }
.tile__ico .ic { width: 19px; height: 19px; }
.cmd__ico .ic { width: 22px; height: 22px; }
.task__ico .ic { width: 20px; height: 20px; }
.nav__item .ic { width: 22px; height: 22px; opacity: 0.7; transition: opacity 0.16s ease; }
.nav__item.is-active .ic { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 61, 154, 0.55)); }
.icon-btn .ic { width: 17px; height: 17px; }
.btn .ic { width: 15px; height: 15px; }
.btn--sm .ic, .pick__x .ic { width: 12px; height: 12px; }
.prompt__go .ic { width: 17px; height: 17px; }
.chat__ico .ic { width: 20px; height: 20px; }
.lib__del .ic, .account__del .ic { width: 16px; height: 16px; }
.task__alert .ic { width: 14px; height: 14px; vertical-align: -2px; }
.lib__use .ic { width: 12px; height: 12px; vertical-align: -1px; }
.card--resume .ic { width: 16px; height: 16px; vertical-align: -3px; }
.sheet__title .ic { width: 19px; height: 19px; }
.empty__ico .ic { width: 28px; height: 28px; }


/* ═══════════════════════════ Заставка загрузки ═══════════════════════════ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #140720 0%, #0A0510 100%);
}

.boot__title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(255, 61, 154, 0.45);
}

.boot__sub { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }

/* Заставка уходит плавно: резкая подмена экрана выглядит как сбой загрузки */
.boot.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s linear 0.24s;
}

.boot__bar {
  width: 168px;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.boot__bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-grad);
  animation: bootRun 1.25s ease-in-out infinite;
}

@keyframes bootRun {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ДОЧА на заставке: фото приглушено вуалью, контент поверх */
.boot__bg {
  position: absolute;
  inset: 0;
  background: url("assets/hero.webp") 78% 30% / cover no-repeat;
  opacity: 0.3;
}

.boot__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 50% 42%, transparent 30%, rgba(10, 5, 16, 0.72) 78%),
    linear-gradient(180deg, rgba(10, 5, 16, 0.55) 0%, rgba(10, 5, 16, 0.82) 100%);
}

.boot > *:not(.boot__bg) { position: relative; z-index: 1; }

.boot__tip {
  min-height: 32px;
  max-width: 250px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

@keyframes bootFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ══════════════════════════ Корона: знак бренда ══════════════════════════ */

.mascot { display: block; width: 40px; height: 40px; }
.mascot--lg {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 0 26px rgba(255, 61, 154, 0.55));
  animation: bootFloat 3s ease-in-out infinite;
}
.mascot--md { width: 56px; height: 56px; }
.mascot--logo { width: 30px; height: 30px; }

.crown__glow { animation: crownGlow 3.2s ease-in-out infinite; transform-origin: 60px 62px; }
.crown__spark { animation: crownSpark 2.4s ease-in-out infinite; }

@keyframes crownGlow {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@keyframes crownSpark {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ═════════════════════════════════ Шапка ═════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(20, 8, 30, 0.96), rgba(10, 5, 16, 0.86));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header__left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.header__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFE3F2 0%, #FF6FB6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header__sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.icon-btn:active { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.14); }

/* ════════════════════════════ Контент и вкладки ═══════════════════════════ */

.content {
  max-width: 100%;
  overflow-x: clip;
  padding: 14px 14px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
}

/* Плавающая кнопка задач и панель выбранных чатов висят над контентом, поэтому
   последняя карточка списка уезжала под них. Высоту запаса считает
   syncFloatingPad (--float-h) — она зависит от переносов подписей в панели. */
.content--float {
  padding-bottom: calc(var(--nav-h) + 26px + var(--float-h, 0px) + env(safe-area-inset-bottom));
}

.tab { animation: tabIn 0.22s ease both; }

@keyframes tabIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section-label {
  margin: 20px 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: "◆";
  font-size: 8px;
  color: var(--accent);
}

.screen__title { margin: 2px 2px 2px; font-size: 25px; font-weight: 800; letter-spacing: -0.01em; }
.screen__sub { margin: 0 2px 14px; font-size: 13px; color: var(--muted); }

/* ═══════════════════════ Нижняя навигация с короной ═══════════════════════ */

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: end;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(18, 7, 27, 0.92), rgba(8, 4, 13, 0.99));
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.nav__item {
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  transition: color 0.16s ease;
}

.nav__item i { font-style: normal; font-size: 10.5px; letter-spacing: 0.02em; }
.nav__item.is-active { color: var(--accent); }

/* Корона: главная кнопка «создать задачу», приподнята над панелью */
.nav__crown {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--nav-h);
}

.nav__crown button {
  position: absolute;
  bottom: 12px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 5px rgba(10, 5, 16, 0.95), var(--glow);
  transition: transform 0.16s ease;
}

.nav__crown button:active { transform: scale(0.93); }
.nav__crown svg { width: 30px; height: 30px; }

/* ══════════════════════════ Главная: герой-блок ═══════════════════════════ */

/* Картинка лежит в webapp/assets/hero.jpg и включается двумя переменными:
   --hero-image (url) и, если нужно выше, --hero-h. Без файла блок живёт
   на градиентах: высота ровно под подпись, без пустого поля сверху. */
.hero {
  --hero-image: url("assets/hero.webp");
  --hero-h: 264px;
  position: relative;
  margin: -14px -14px 16px;
  min-height: var(--hero-h, 188px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 22px 18px 20px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 78% 22%, rgba(255, 61, 154, 0.30), transparent 68%),
    radial-gradient(70% 60% at 12% 84%, rgba(168, 85, 247, 0.26), transparent 70%),
    linear-gradient(165deg, #2A0C33 0%, #14061D 58%, #0A0510 100%);
}

.hero__art {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  /* Девушка справа: кадр держим на лице */
  background-position: 78% 30%;
  opacity: 0.95;
}

/* Тень снизу и вуаль слева: подпись читается поверх любой картинки,
   а текст слева не спорит с лицом справа */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 5, 16, 0.55) 0%, transparent 52%),
    linear-gradient(180deg, rgba(10, 5, 16, 0.12) 0%, rgba(10, 5, 16, 0.62) 62%, #0A0510 100%);
}

.hero__body { position: relative; z-index: 2; }

/* Полоса цифр под героем: три стеклянные ячейки, крупное число сверху */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.stat {
  padding: 10px 6px 9px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--glass);
}

.stat .ic { width: 15px; height: 15px; color: #FF8FC4; }
.stat__value { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.stat__label { margin-top: 1px; font-size: 10.5px; color: var(--muted); }

.hero__mark { display: flex; align-items: center; gap: 9px; }
.hero__mark svg { width: 34px; height: 34px; }

.hero__name {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.1em;
  /* Тень поверх фото: градиентный текст тонет в неоне без неё */
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
  background: linear-gradient(135deg, #FFFFFF 0%, #FF7DBE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tag {
  margin-top: 2px;
  font-size: 14px;
  font-style: italic;
  color: #FFC2E2;
  text-shadow: 0 0 18px rgba(255, 61, 154, 0.5);
}

.hero__online {
  align-self: flex-start;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(10, 5, 16, 0.62);
  backdrop-filter: blur(8px);
}

.hero__online b { font-weight: 600; }

.hero__online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ─────────────────────── Главная: строка-подсказка ───────────────────────- */

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: var(--glass);
  box-shadow: var(--glow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.prompt input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 14px; }
.prompt input::placeholder { color: var(--muted); }

.prompt__go {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: var(--glow);
  font-size: 16px;
  color: #fff;
}

.prompt__go:active { transform: scale(0.94); }

/* Живая выдача умного поиска: команды, найденные по фразе */
.prompt-hits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }

.prompt-hit {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.prompt-hit:active { border-color: var(--line-hi); }
.prompt-hit__title { font-size: 14px; font-weight: 600; }
.prompt-hit__why { font-size: 12px; color: var(--muted); }

/* ────────────────────── Главная: плитки быстрых команд ───────────────────- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 4px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.tile:active { transform: scale(0.96); border-color: var(--line-hi); }
.tile__ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 17px; }
.tile__name { font-size: 11px; letter-spacing: 0.01em; color: var(--muted); text-align: center; }

/* Хитовая команда: светится неоном и носит плашку «ХИТ» на верхней кромке.
   Класс общий для плитки на главной и ячейки в сетке «Что создаём». */
.tile--hit {
  position: relative;
  border-color: rgba(255, 61, 154, 0.6);
  box-shadow: 0 0 20px rgba(255, 61, 154, 0.32),
    inset 0 0 14px rgba(255, 61, 154, 0.07);
}
.tile--hit .tile__name, .tile--hit .create-cell__name { color: var(--text); font-weight: 700; }
.tile__hit {
  position: absolute;
  top: -8px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 12px rgba(255, 61, 154, 0.5);
}

/* Выбор «Что создаём»: сетка команд 3 в ряд, иконка + короткое имя */
.create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 4px 2px 8px;
}

.create-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 4px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--glass);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.create-cell:active { transform: scale(0.95); border-color: var(--line-hi); }
.create-cell.is-off { opacity: 0.45; }
.create-cell .tile__ico { width: 40px; height: 40px; border-radius: 13px; }
.create-cell .tile__ico .ic { width: 21px; height: 21px; }
.create-cell__name { font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; }

/* Цвета плиток и карточек команд: у каждой группы свой оттенок, чтобы список
   читался как набор инструментов, а не как одна простыня. */
.ico--pink { background: linear-gradient(135deg, #FF4FA6, #C31E9B); box-shadow: 0 6px 16px rgba(255, 61, 154, 0.28); }
.ico--blue { background: linear-gradient(135deg, #5C9CFF, #2E5BD8); box-shadow: 0 6px 16px rgba(76, 141, 255, 0.26); }
.ico--cyan { background: linear-gradient(135deg, #34E0F2, #1893C7); box-shadow: 0 6px 16px rgba(34, 211, 238, 0.24); }
.ico--violet { background: linear-gradient(135deg, #B575FF, #7A2BD8); box-shadow: 0 6px 16px rgba(168, 85, 247, 0.26); }
.ico--teal { background: linear-gradient(135deg, #3EE0C4, #12907C); box-shadow: 0 6px 16px rgba(45, 212, 191, 0.24); }
.ico--amber { background: linear-gradient(135deg, #FFD166, #E08A17); box-shadow: 0 6px 16px rgba(251, 191, 36, 0.24); }
.ico--accent { background: linear-gradient(135deg, #FF2D85, #8B5CF6); box-shadow: 0 6px 18px rgba(255, 45, 133, 0.35); }

/* ──────────────────── Главная: «Текущие задачи» и ссылка ─────────────────── */

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 2px 9px;
}

.row-head__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-head__link { font-size: 12px; color: var(--accent); }

/* ══════════════════════════════ Поиск ══════════════════════════════ */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

.search__icon { width: 15px; height: 15px; opacity: 0.7; }
.search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 14px; }
.search:focus-within { border-color: var(--line-hi); box-shadow: 0 0 0 3px rgba(255, 61, 154, 0.16); }
.search input::placeholder { color: var(--muted); }

/* ═══════════════════════ Чипсы-фильтры и переключатели ═══════════════════════ */

/* Ряд чипсов скроллится по горизонтали: на 390 px пять фильтров в строку не
   влезают, а переносить их на вторую строку — терять полэкрана. */
.chips {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chip.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--accent-grad);
  box-shadow: 0 4px 16px rgba(255, 61, 154, 0.3);
}

.chip b { font-weight: 700; opacity: 0.85; margin-left: 4px; }

/* Старый segmented оставлен для шторок: там он живёт как ряд равных кнопок */
.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

.seg {
  flex: 1;
  padding: 8px 6px;
  font-size: 12.5px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.seg.is-active { color: #fff; background: var(--accent-grad); box-shadow: 0 4px 14px rgba(255, 61, 154, 0.28); }
.segmented--sm .seg { padding: 6px 4px; font-size: 12px; }

/* ═════════════════════════════ Карточки ═════════════════════════════ */

/* Колонка обязана быть minmax(0, 1fr), а не по умолчанию auto: у auto-дорожки
   минимум равен min-content, и одна длинная строка внутри карточки (заголовок
   задачи «Рассылка: … → … (+2)» набран nowrap) растягивает всю сетку — вместе
   с ней уезжает вправо документ, и кабинет начинает скроллиться боком. На
   демо-данных этого не видно: там названия короткие. */
.cards, .list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card--row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.card__emoji {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.22), rgba(122, 43, 216, 0.22));
  border: 1px solid var(--line);
}

.card__body { min-width: 0; }
.card__title { font-size: 15px; font-weight: 650; }
.card__desc { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

.card--add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  color: var(--accent);
  border-radius: var(--radius);
  border: 1px dashed var(--line-hi);
  background: rgba(255, 61, 154, 0.07);
}

.card--resume { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.09); }

/* ─────────────────────────── Карточка команды ─────────────────────────── */

.card--cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.card--cmd:active { transform: scale(0.985); border-color: var(--line-hi); }
.card--cmd--locked { opacity: 0.55; }

.cmd__ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 19px;
  border-radius: 13px;
}

.cmd__main { flex: 1; min-width: 0; }
.cmd__title { font-size: 14.5px; font-weight: 650; }
.cmd__desc { margin-top: 2px; font-size: 12px; color: var(--muted); }
/* Подвал карточки: статус + метки отличий. Обязательно wrap — на 390 px три
   метки в строку не влезают, а обрезать их нельзя: именно они и объясняют,
   чем команда отличается от соседней. */
.cmd__foot { margin-top: 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.cmd__tag {
  padding: 2.5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
}
.cmd__chevron { flex: none; font-size: 20px; color: var(--muted); opacity: 0.75; }

/* ───────────────────────────── Статус-строка ───────────────────────────── */

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.status__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.status--ready { color: var(--green); }
.status--paused { color: var(--orange); }
.status--setup { color: var(--blue); }
.status--off { color: var(--muted); }

/* ═══════════════════════════ Карточка задачи ═══════════════════════════ */

.task {
  padding: 12px 13px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--glow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.task--archived { opacity: 0.6; }

/* Массовые действия под сегментом: тихие кнопки второго ряда. */
/* Мастер первой задачи: три чёрточки-шага. Текущий светится, пройденные
   залиты: где находишься — видно без подписей. */
.wsteps { display: flex; gap: 6px; margin-bottom: 12px; }
.wsteps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.wsteps span.is-done { background: var(--accent); }
.wsteps span.is-current { background: var(--accent-2); box-shadow: 0 0 8px var(--accent); }
.wiz-list { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; overflow-y: auto; }
.bulk { display: flex; gap: 8px; margin: 10px 0 2px; flex-wrap: wrap; }
.bulk[hidden] { display: none; }

/* Список встаёт каскадом: карточки появляются по очереди, а не все разом.
   backwards — чтобы после конца анимации карточка жила своими стилями
   (иначе fill «both» перебивал бы :hover). Кому анимации мешают — общий
   prefers-reduced-motion ниже всё равно всё гасит. */
#taskList > .task { animation: cardIn 0.32s ease backwards; }
#taskList > .task:nth-child(2) { animation-delay: 0.05s; }
#taskList > .task:nth-child(3) { animation-delay: 0.10s; }
#taskList > .task:nth-child(4) { animation-delay: 0.15s; }
#taskList > .task:nth-child(5) { animation-delay: 0.20s; }
#taskList > .task:nth-child(6) { animation-delay: 0.25s; }
#taskList > .task:nth-child(7) { animation-delay: 0.30s; }
#taskList > .task:nth-child(8) { animation-delay: 0.35s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
}

.task__top { display: flex; align-items: center; gap: 11px; }

.task__ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 17px;
  border-radius: 12px;
}

.task__head { flex: 1; min-width: 0; }
.task__title { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__meta { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.mailing-live { margin-top: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); font-size: 12px; }
.mailing-live p { margin: 6px 0 0; overflow-wrap: anywhere; }
.mailing-live__progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; font-variant-numeric: tabular-nums; }
.mailing-live__progress span, .mailing-live__muted { color: var(--muted); }
.mailing-live__warning { color: var(--orange); }
.mailing-live__details { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 8px; }
.mailing-live__details summary { cursor: pointer; min-height: 28px; padding: 3px 0; }
.mailing-live__details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mailing-live__details ul { margin: 3px 0 0; padding: 0; list-style: none; max-height: 300px; overflow: auto; }
.mailing-live__details li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.mailing-live__details li > span { flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.mailing-live__details small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.mailing-live__details .btn { min-height: 38px; white-space: normal; text-align: left; }
.journal-row__link { display: inline-block; margin-top: 5px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge::before { content: "●"; font-size: 7px; }
.badge--live { color: #7DF0C0; background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.35); }
.badge--paused { color: #FFD98A; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.35); }
.badge--plan { color: #A8CBFF; background: rgba(76, 141, 255, 0.14); border-color: rgba(76, 141, 255, 0.35); }
.badge--error { color: #FFB0BE; background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.38); }
.badge--done { color: var(--muted); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }

.task__progress {
  position: relative;
  height: 6px;
  margin: 11px 0 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.task__progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  /* Полоса — в цветах бренда: синий с голубым читался как чужой элемент. */
  background: linear-gradient(90deg, #FF3D9A, #A855F7);
  box-shadow: 0 0 12px rgba(255, 61, 154, 0.45);
  transition: width 0.4s ease;
}

/* Задача без обозримого конца (постоянная пересылка): вместо доли — бегунок,
   иначе пришлось бы выдумывать «сколько всего», которого не существует. */
.task__progress--endless span {
  width: 34%;
  animation: endlessRun 1.9s ease-in-out infinite;
}

@keyframes endlessRun {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.task__nums {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.task__nums b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.task__nums i { font-style: normal; font-variant-numeric: tabular-nums; }
.task__nums .task__pct { margin-left: auto; color: var(--text); font-weight: 700; }
/* «5 минут назад» — прижато вправо, но уступает место проценту, когда он есть:
   у задачи с долей выполнения справа стоит он. */
.task__nums .task__ago { margin-left: auto; font-size: 11px; }
.task__nums .task__ago + .task__pct { margin-left: 0; }

/* Сбой задачи прямо на карточке: раньше причину было видно только в логе службы
   на сервере — человек смотрел на бодрое «работает» и ждал сообщений, которых
   нет. Причина может быть длинной чужой ошибкой, поэтому строка переносится, а
   не растягивает карточку. */
.task__alert {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
  padding: 7px 9px;
  font-size: 11.5px;
  line-height: 1.35;
  border-radius: 10px;
  color: #FFB0BE;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.28);
}

.task__alert span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task__alert i { flex: none; font-style: normal; color: var(--muted); }

/* Сбой, после которого задача всё-таки работала: знать о нём надо, а красной
   тревогой на карточке он уже не является. */
.task__alert--past {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.task__actions { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.task__acts { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }

.btn--primary {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(255, 61, 154, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--danger { color: var(--red); border-color: rgba(251, 113, 133, 0.32); background: rgba(251, 113, 133, 0.09); }
.btn--block { width: 100%; padding: 13px 16px; font-size: 14.5px; }
.btn--big { padding: 15px 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }

/* Крупная кнопка «создать задачу» под списком: в макете она замыкает экран */
.cta { margin-top: 14px; }

/* ═══════════════════════ Плавающая кнопка и панель ═══════════════════════ */

/* Корона поднята на 6 px над панелью и обведена ореолом в 5 px, поэтому
   плавающие элементы отступают не от навигации, а от короны: иначе кнопка
   «Запустить задачу» ложится углом на неё. */
.fab {
  position: fixed;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  right: 16px;
  bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom));
  z-index: 25;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 61, 154, 0.38);
}

/* ══════════════════════════════ Чаты ══════════════════════════════ */

.chats-hint { margin: 10px 2px 2px; font-size: 12px; color: var(--muted); }

.chat {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.chat.is-selected { border-color: var(--line-hi); background: rgba(255, 61, 154, 0.1); }

.chat__ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #FFC2E2;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.24), rgba(76, 141, 255, 0.24));
  border: 1px solid var(--line);
}

.chat__body { flex: 1; min-width: 0; }
.chat__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Подпись строки не переносим: в шторке выбора там лежит текст сообщения, и
   без обрезки одна строка списка вырастала на пол-экрана. */
.chat__sub { margin-top: 1px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat__kind {
  flex: none;
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.chat__check {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border-radius: 7px;
  border: 1.5px solid var(--line-hi);
  color: transparent;
}

.chat.is-selected .chat__check {
  color: #fff;
  border-color: transparent;
  background: var(--accent-grad);
}

/* Шеврон вместо галочки: выбор одного чата закрывает шторку сразу */
.chat__go {
  flex: none;
  width: 22px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

/* Панель над выбранными чатами: `position: fixed`, поэтому живёт вне вкладки */
.chat-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
  z-index: 26;
  display: none;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-hi);
  background: rgba(24, 12, 34, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}

.chat-bar.is-visible { display: flex; }
.chat-bar__count { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); }
.chat-bar__count b { color: var(--text); font-size: 14px; }
.chat-bar__sum { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-bar__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-bar__clear { margin-left: auto; }

/* ═════════════════════════ Аккаунты и подписка ═════════════════════════ */

.account {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

/* Строка с номером и меткой. Причина беды идёт под ней отдельным блоком, а не в
   этот же ряд: длинный текст в ряду обрезался бы на узком экране. */
.account__row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.account__avatar {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 79, 166, 0.26), rgba(122, 43, 216, 0.26));
  border: 1px solid var(--line);
}

.account__body { flex: 1; min-width: 0; }
.account__phone { font-size: 14px; font-weight: 600; }
.account__id { margin-top: 1px; font-size: 11.5px; color: var(--muted); }
.account__del { flex: none; }

/* Аккаунт на связи или офлайн: без этой метки непонятно, почему задачи стоят.
   Текст короткий, поэтому метка не переносится и не ломает строку. */
.account__state {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.account__state--on { color: #7DF0C0; border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.12); }
.account__state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.account__state--off { color: #FFB0BE; border-color: rgba(251, 113, 133, 0.32); background: rgba(251, 113, 133, 0.12); }

/* Почему аккаунт офлайн и что с этим делать. Полоса внутри карточки: причина
   переносится по всей ширине (обрезать её нельзя — там сказано, чинить самому
   или ждать), кнопка под ней и по левому краю, чтобы не прыгала от длины текста. */
.account__trouble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.09);
}

.account__reason {
  font-size: 11.5px;
  line-height: 1.35;
  color: #FFB0BE;
  overflow-wrap: anywhere;
}

/* ─────────────────── Библиотека сообщений: строка текста ─────────────────- */

/* Своя строка, а не .chat: у сообщения нет типа и ника, зато есть текст в две
   строки — по нему его и узнают. Обрезаем именно двумя строками, иначе один
   длинный пост занимает весь экран и список перестаёт быть списком. */
.lib {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.lib__body { flex: 1; min-width: 0; }
.lib__title {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib__text {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib__del { flex: none; font-size: 15px; opacity: 0.75; }
.lib__del:active { opacity: 1; }
/* Правка и удаление — в один ряд справа: две иконки занимают около 50 px, а
   столбиком они растягивали строку вдвое и оставляли в ней пустоту. */
.lib__acts { flex: none; display: flex; align-items: flex-start; gap: 10px; }
/* «Эту запись рассылают» — предупреждение, а не украшение: по нему видно, что
   правка и удаление здесь меняют работающую задачу. */
.lib__use {
  margin-top: 5px;
  font-size: 11px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Отмена правки: второй кнопкой под основной, поэтому нужен отступ. */
.lib__cancel { margin-top: 8px; }
/* Запись, которую правят полем сверху. Без метки в списке не видно, чей текст
   лежит в поле: список длинный, поле уезжает за экран, и «сохранить правку»
   нажимают вслепую. */
.lib.is-editing {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.card--sub { position: relative; overflow: hidden; }

.card--sub::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -40px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 61, 154, 0.22), transparent 65%);
}

.sub__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sub__label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sub__value { margin-top: 3px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

.sub__badge {
  flex: none;
  padding: 5px 10px;
  font-size: 10.5px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

/* Класс ставит app.js (badge.classList.toggle('is-active', …)); --on оставлен
   для разметки, где состояние известно заранее. */
.sub__badge--on,
.sub__badge.is-active { color: #7DF0C0; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.13); }
.sub__note { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Кнопки подписки: главная во всю ширину, остальные — в две колонки. Раньше
   они лежали в одну строку и на 390 px обрезались по краю экрана. */
.sub__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.sub__actions .btn--primary { grid-column: 1 / -1; }
.sub__web { width: 100%; margin-top: 8px; }

/* ───────────────── Подарок за подписку на канал ───────────────── */

.card--bonus { position: relative; overflow: hidden; }

.card--bonus::after {
  content: "";
  position: absolute;
  top: -80px;
  left: -30px;
  width: 170px;
  height: 170px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 65%);
}

.bonus__row { display: flex; align-items: flex-start; gap: 12px; }

/* Кнопки в одну колонку: обе подписи длинные, и в два столбца на 390 px они
   обрезаются по краю. Перенос здесь — поведение по умолчанию, а не медиазапрос. */
.bonus__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.bonus__note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.bonus__note--done { color: #7DF0C0; }
.promo__input { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04);
  color: var(--text); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.promo__input:focus { border-color: var(--accent); outline: none; }
.promo__input::placeholder { color: var(--muted); letter-spacing: normal; text-transform: none; }
/* Редактор дат постинга: строки «дата + текст», в узком экране — столбиком. */
.sched { display: grid; gap: 8px; margin: 8px 0; }
.sched__row { display: grid; grid-template-columns: 168px minmax(0, 1fr) 32px; gap: 6px; align-items: center; }
.sched__row.is-sent { opacity: .55; }
.sched__at, .sched__text { width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04);
  color: var(--text); font-size: 14px; color-scheme: dark; }
.sched__at:focus, .sched__text:focus { border-color: var(--accent); outline: none; }
.sched__x { border: none; background: none; color: var(--muted); font-size: 14px;
  cursor: pointer; padding: 6px; border-radius: 8px; }
.sched__x:hover { color: var(--text); }

/* ══════════════════════════ Настройки в шторке ══════════════════════════ */

.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }

.setting {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.setting__ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--line); color: #FF8FC4; }
.setting__ico .ic { width: 19px; height: 19px; }
.setting__body { flex: 1; min-width: 0; }
.setting__title { font-size: 14px; font-weight: 600; }
.setting__desc { margin-top: 1px; font-size: 12px; color: var(--muted); }
.setting__chev { flex: none; color: var(--muted); font-size: 18px; }

/* ══════════════════════════════ Шторки ══════════════════════════════ */

.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.is-open { display: block; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(4, 2, 8, 0.72); backdrop-filter: blur(3px); }

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid var(--line-hi);
  background: linear-gradient(180deg, #1E0F2A 0%, #0E0716 100%);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(14%); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__title { font-size: 17px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.sheet__lead { margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

/* Поля задачи собираются скриптом в свой контейнер, а не прямо в .form —
   значит, grid-gap формы до них не доходил: между полями оставался ноль, и
   подпись читалась как продолжение предыдущего ввода, а не как заголовок
   своего. Повторяем тот же ритм здесь. */
#taskFields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }

.field input, .field textarea, .field select, .creds input {
  width: 100%;
  padding: 12px 13px;
  font-size: 14.5px;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
  transition: border-color 0.16s ease;
}

.field input:focus, .field textarea:focus, .creds input:focus { border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
/* Запертое поле должно выглядеть запертым. В форме настройки задачи так стоит
   аккаунт: сменить его нельзя (другой аккаунт — другие чаты и другая задача), и
   без этого вида человек нажимал на живой с виду список, а тот не открывался. */
.field input:disabled, .field textarea:disabled, .field select:disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  cursor: not-allowed;
}
.field__note { font-style: normal; font-size: 11.5px; color: var(--muted); opacity: 0.85; }

/* Галочка: подпись и сам квадрат стоят в одну строку — иначе поле выглядит
   как текстовое, у которого забыли инпут. Квадрат не растягиваем на всю
   ширину: ширина здесь читается как «сюда надо что-то ввести». */
.field--check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.field--check input {
  width: 20px;
  height: 20px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.field--check .field__note { grid-column: 1 / -1; }

/* Поле с кнопкой «выбрать чат». Кнопка не тянется и не переносится: на 390 px
   для ввода остаётся ~230 px — @username и id видно целиком. */
.field__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.btn--pick {
  padding: 11px 12px;
  font-size: 12.5px;
  white-space: nowrap;
  border-color: var(--line-hi);
  background: rgba(255, 61, 154, 0.12);
  color: var(--text);
}
.btn--pick:active { transform: scale(0.97); }

/* Кнопка под многострочным полем: тянуть её на всю ширину нельзя — она читалась
   бы как «отправить», а это всего лишь выбор готового текста. */
.field__aside { display: flex; justify-content: flex-start; }

/* Отмеченные сообщения библиотеки рядом с полем. Переносятся по строкам:
   на 390 px три названия в один ряд не встают. */
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 6px 5px 10px;
  font-size: 11.5px;
  color: var(--text);
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(255, 61, 154, 0.12);
  overflow: hidden;
}
.pick__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__x { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); background: rgba(255, 255, 255, 0.08); }
.pick__x:active { color: var(--text); background: rgba(255, 255, 255, 0.18); }

/* Сколько чатов набрано в поле-списке. Двести ссылок через запятую в поле не
   прочитать, поэтому под ним — счёт, первые названия и «очистить». */
.field__count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.field__count b { color: var(--text); font-weight: 600; }
.field__count span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field__count button {
  flex: none;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: transparent;
}
.field__count button:active { color: var(--text); }

/* Шторка выбора чата открывается ПОВЕРХ шторки задачи: обе .sheet лежат на
   z-index 60, и без этого форма перекрывала бы список чатов. Подложку делаем
   легче — под ней видно, в какое поле идёт выбор. */
.sheet--over { z-index: 70; }
.sheet--over .sheet__backdrop { background: rgba(4, 2, 8, 0.5); }
.sheet--over .sheet__panel { max-height: 84vh; }
#pickerList { max-height: 46vh; overflow-y: auto; }

/* Строка «выбрать все» над списком чатов. Живёт только в режиме нескольких
   чатов: на сотне чатов отмечать по одному нечестно. */
.picker__bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 -2px;
}
.picker__count { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.picker__count b { color: var(--text); font-weight: 600; }

/* ─────────────────── Шаги: номер в кружке + подпись снизу ─────────────────- */

.steps {
  counter-reset: step;
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.steps__item {
  counter-increment: step;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  text-align: center;
  color: var(--muted);
}

.steps__item::before {
  content: counter(step);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid var(--line-hi);
  background: var(--card);
  color: var(--muted);
}

/* Соединительная черта: рисуем у каждого шага, кроме первого */
.steps__item + .steps__item::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  left: -50%;
  height: 1px;
  background: var(--line-hi);
  z-index: -1;
}

.steps__item.is-current { color: var(--text); }

.steps__item.is-current::before {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--glow);
}

.steps__item.is-done::before { content: "✓"; border-color: rgba(52, 211, 153, 0.45); color: #7DF0C0; }

/* ──────────────── Режим отправки: две карточки на выбор ─────────────────- */

.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }

.mode {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}

.mode.is-active { border-color: transparent; background: linear-gradient(135deg, rgba(255, 79, 166, 0.24), rgba(195, 30, 155, 0.22)); box-shadow: var(--glow); }
.mode__name { font-size: 13.5px; font-weight: 650; }
.mode__hint { font-size: 11.5px; color: var(--muted); }

/* ─────────────────────────── Переключатели ─────────────────────────── */

.toggle { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 13px; }
.toggle__text { flex: 1; min-width: 0; }

.toggle input { position: absolute; opacity: 0; pointer-events: none; }

.toggle__track {
  flex: none;
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle input:checked + .toggle__track { border-color: transparent; background: var(--accent-grad); }
.toggle input:checked + .toggle__track::after { transform: translateX(17px); }

/* Ползунок задержки: значение показываем пилюлей справа */
.slider { display: flex; align-items: center; gap: 11px; }

.slider input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(255, 255, 255, 0.12) 100%);
}

.slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: var(--glow);
}

.slider__value {
  flex: none;
  min-width: 96px;
  padding: 7px 10px;
  text-align: center;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════ Мелочи: подсказки, ошибки, тост ═══════════════════ */

.hint { font-size: 12px; color: var(--muted); }
.error { font-size: 12.5px; color: var(--red); min-height: 1em; }
.login__aside { display: flex; gap: 8px; }
.login__aside .btn { flex: 1; }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.results__meta { font-size: 12px; color: var(--muted); }
.results__more { margin-top: 12px; }

/* В шапке результатов рядом с названием стоит кнопка выгрузки, и на узком
   экране длинный заголовок («Собранная аудитория») отжимал её за край.
   Заголовку разрешено сжиматься с многоточием, кнопке — нет. */
#resultsSheet .sheet__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#resultsExport { flex: none; }

/* Собранного бывают сотни строк, и шапка уезжала вверх вместе со списком: после
   «Показать ещё» до кнопки «⬇️ Файлом» и до крестика приходилось листать назад.
   Держим шапку сверху — отступы шторки повторяем сами, чтобы фон закрывал
   строки на всю её ширину. */
#resultsSheet .sheet__head {
  position: sticky;
  top: -16px;
  z-index: 2;
  margin: -16px -14px 14px;
  padding: 16px 14px 10px;
  background: #1E0F2A;
}

.result {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.result__title { font-size: 13.5px; font-weight: 600; }
.result__sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.result__badge { font-size: 11.5px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.chart { margin-top: 12px; padding: 12px 12px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.chart__svg { display: block; width: 100%; height: auto; }
.chart__ok { fill: var(--accent); opacity: 0.85; }
.chart__bad { fill: var(--red); }
.chart__x { fill: var(--muted); font-size: 8px; text-anchor: middle; }
.chart__foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.chart__errors { color: var(--red); font-weight: 600; }
.chart__top { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12.5px; }
.chart__top li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.chart__top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart__top li b { font-variant-numeric: tabular-nums; }
.templates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.template { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-align: left; cursor: pointer; }
.template:active { border-color: var(--line-hi); }
.template__emoji { font-size: 20px; }
.template__title { font-size: 13px; font-weight: 600; }
.template__desc { font-size: 11px; color: var(--muted); }
.wizard { margin-top: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line-hi); border-radius: 16px; }
.wizard__head { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.wizard__step { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; margin-top: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-align: left; cursor: pointer; }
.wizard__step.is-current { border-color: var(--line-hi); }
.wizard__step.is-done { opacity: 0.65; }
.wizard__num { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.wizard__step.is-done .wizard__num { background: var(--green); color: #06281c; }
.wizard__main { display: flex; flex-direction: column; gap: 1px; }
.wizard__title { font-size: 13px; font-weight: 600; }
.wizard__desc { font-size: 11px; color: var(--muted); }
.wizard__foot { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Тост всплывает над тем, что сейчас висит внизу: навигацией, плавающей кнопкой
   «Запустить задачу», панелью выбранных чатов, кнопкой открытой шторки. Подъём
   считает toastLift() и кладёт в --toast-lift; здесь — отступ для пустого низа
   (только навигация). Раньше подъёма не было, и сообщение об успехе ложилось
   ровно на кнопку, которую человек нажал: подписи было не прочитать. */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--toast-lift, calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)));
  z-index: 80;
  transform: translate(-50%, 14px);
  max-width: 86vw;
  padding: 11px 16px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--line-hi);
  background: rgba(30, 15, 42, 0.97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Тип сообщения виден цветом рамки: зелёный — успех, красный — ошибка. */
.toast--ok { border-color: #34d17b; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(52, 209, 123, 0.35); }
.toast--error { border-color: #ff5d7a; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 93, 122, 0.35); }

/* Кружок профиля в шапке: фото из Telegram или первая буква имени. */
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent, #ff4d8d), #8b2ff7);
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Полоса «демо-данные» вставляется первым элементом <body> (см. showDemoBar),
   поэтому никаких отрицательных отступов: они выталкивали её за 390 px, и весь
   документ становился шире экрана — появлялась горизонтальная прокрутка. */
.demo-bar {
  padding: 9px 14px;
  font-size: 12px;
  text-align: center;
  color: #FFD98A;
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

/* ═══════════════════ Пусто · загрузка · ошибка ═══════════════════ */

.empty {
  padding: 30px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-hi);
  background: var(--glass);
}

.empty__ico {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--line-hi);
  color: #FF8FC4;
  box-shadow: 0 0 24px rgba(255, 61, 154, 0.25);
}

/* Дремлющий кот в пустых экранах: круг со свечением, кадр на мордочке */
.empty__pic {
  width: 118px;
  height: 118px;
  object-fit: cover;
  object-position: 50% 56%;
  border-radius: 50%;
  border: 1px solid var(--line-hi);
  box-shadow: var(--glow), 0 8px 26px rgba(0, 0, 0, 0.45);
}

.empty__title {
  margin: 10px 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.state {
  padding: 26px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.state__title { margin-top: 8px; font-size: 15px; font-weight: 700; }
.state__text { margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); }
.state__retry { display: inline-flex; }

.sk-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.sk-card__body { flex: 1; display: grid; gap: 8px; }

.sk {
  border-radius: 8px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 130, 205, 0.16) 50%,
    rgba(255, 255, 255, 0.05) 80%
  );
  background-size: 220% 100%;
  animation: skRun 1.3s linear infinite;
}

.sk-dot { flex: none; width: 44px; height: 44px; border-radius: 14px; }
.sk-line { height: 13px; }
.sk-line--sm { height: 10px; width: 52%; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }

@keyframes skRun {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.btn.is-loading { color: transparent; position: relative; }

.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

/* ═══════════════════ Служебное ═══════════════════ */

.field select:focus { border-color: var(--accent); }
[hidden] { display: none !important; }

.chips::-webkit-scrollbar,
.content::-webkit-scrollbar { width: 0; height: 0; }

/* Тонкая линия-разделитель внутри карточек-списков */
.divider { height: 1px; background: var(--line); margin: 2px 0; }

/* Аккуратный фокус для клавиатуры, но не для мыши/тапа */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Кому анимации мешают — тому статичный кабинет. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* Совсем узкие экраны: плитки в три столбца, шрифты чуть меньше */
@media (max-width: 349px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .header__title { font-size: 16px; }
  .hero__name { font-size: 22px; }
}

/* QR-вход: белое поле — тихая зона, без неё камера код не возьмёт. */
.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 4px auto;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
}
/* Свои ключи — складной блок: большинству не нужен, глаза не мозолит. */
.creds { margin: 2px 0; }
.creds summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.creds input { margin-top: 8px; }
/* В шторке входа теперь четыре боковые кнопки — в ряд не влезут. */
.login__aside { flex-wrap: wrap; }
.login__aside .btn { flex: 1 1 40%; }

/* Telegram folders: fetched from the account, never hand-maintained in the app. */
.folder-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}
.folder-chips::-webkit-scrollbar { display: none; }
.folder-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--surface, #fff);
  color: var(--muted, #6b7280);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: .16s ease;
}
.folder-chip span { color: var(--accent, #6d5dfc); font-size: 14px; }
.folder-chip b { color: var(--text, #111827); font-size: 11px; font-weight: 700; }
.folder-chip.is-active,
.folder-chip.is-picked {
  color: var(--text, #111827);
  border-color: color-mix(in srgb, var(--accent, #6d5dfc) 55%, white);
  background: color-mix(in srgb, var(--accent, #6d5dfc) 10%, white);
}
.folder-chip.is-picked::after { content: '✓'; color: var(--accent, #6d5dfc); font-weight: 800; }


.preflight {
  display: flex; align-items: center; gap: 7px; margin-top: 7px;
  color: var(--muted, #6b7280); font-size: 11px; line-height: 1.35;
}
.preflight.is-warning { color: #9a6400; }
.preflight__dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #39a96b; }
.preflight.is-warning .preflight__dot { background: #d99520; }

/* ═══════════════════════════════════════════════════════════════════════
   VISUAL POLISH · DОЧА 2.0
   Спокойнее, чище и дороже: единый ритм, более матовые поверхности,
   аккуратные состояния наведения и нормальная desktop-композиция.
   Всё ниже — слой оформления поверх функциональных правил выше.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #080a12;
  --bg-soft: #0e1220;
  --card: #121726;
  --card-hi: #182036;
  --glass: rgba(255, 255, 255, 0.055);
  --text: #f7f8fc;
  --muted: #9ca7bd;
  --line: rgba(197, 210, 241, 0.13);
  --line-hi: rgba(239, 112, 177, 0.46);
  --accent: #f06cad;
  --accent-2: #9a78ff;
  --accent-soft: rgba(240, 108, 173, 0.13);
  --accent-grad: linear-gradient(135deg, #f47bb8 0%, #9a78ff 100%);
  --violet: #9a78ff;
  --blue: #6c9cff;
  --cyan: #55d8ef;
  --teal: #49d8bf;
  --green: #4ed7a1;
  --orange: #f5bd62;
  --red: #ff718a;
  --radius: 18px;
  --radius-sm: 13px;
  --radius-lg: 26px;
  --glow: 0 12px 32px rgba(240, 108, 173, 0.22);
  --glow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
}

html { background: var(--bg); }

body {
  background:
    radial-gradient(90% 48% at 50% -8%, rgba(154, 120, 255, 0.17), transparent 68%),
    radial-gradient(68% 42% at 100% 20%, rgba(240, 108, 173, 0.10), transparent 72%),
    linear-gradient(180deg, #0c0e19 0%, #080a12 58%, #06070d 100%);
  letter-spacing: 0.002em;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    radial-gradient(65% 35% at 4% 92%, rgba(154, 120, 255, 0.10), transparent 72%),
    radial-gradient(58% 34% at 100% 92%, rgba(240, 108, 173, 0.08), transparent 72%);
  background-size: 32px 32px, 32px 32px, auto, auto;
  opacity: 0.52;
}

/* На широком экране кабинет не растягивается в пустоту, а остаётся аккуратной
   рабочей колонкой. На телефоне эти ограничения не меняют поведение. */
.header,
.content {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.header {
  padding: 13px 18px;
  background: rgba(10, 12, 22, 0.78);
  border-bottom-color: rgba(197, 210, 241, 0.10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.header__left { gap: 11px; }
.header__title { letter-spacing: 0.19em; }
.header__sub { color: #8f9ab2; }
.header .avatar {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-color: rgba(197, 210, 241, 0.16);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.icon-btn:hover { border-color: var(--line-hi); background: rgba(240, 108, 173, 0.12); }

.content { padding-left: 18px; padding-right: 18px; }
.content--float { padding-left: 18px; padding-right: 18px; }

.screen__title { font-size: 28px; letter-spacing: -0.025em; }
.screen__sub { max-width: 620px; color: #96a1b8; line-height: 1.52; }
.section-label { margin-top: 24px; color: #8f9bb4; letter-spacing: 0.20em; }
.section-label::before { color: var(--accent); text-shadow: 0 0 10px rgba(240, 108, 173, 0.65); }

/* Герой стал заголовком раздела, а не отдельным рекламным экраном. */
.hero {
  --hero-h: 286px;
  margin: -14px -18px 18px;
  padding: 24px 22px 22px;
  background:
    radial-gradient(72% 75% at 76% 22%, rgba(240, 108, 173, 0.26), transparent 70%),
    linear-gradient(165deg, #24213b 0%, #151525 56%, #0b0d17 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero__art { opacity: 0.80; filter: saturate(0.88) contrast(1.03); }
.hero::after {
  background:
    linear-gradient(90deg, rgba(8, 10, 18, 0.76) 0%, rgba(8, 10, 18, 0.18) 64%, rgba(8, 10, 18, 0.08) 100%),
    linear-gradient(180deg, rgba(8, 10, 18, 0.04) 0%, rgba(8, 10, 18, 0.68) 70%, #080a12 100%);
}
.hero__mark svg { filter: drop-shadow(0 8px 22px rgba(240, 108, 173, 0.34)); }
.hero__name { font-size: 32px; letter-spacing: 0.12em; }
.hero__tag { color: #d7c3d7; text-shadow: none; }
.hero__online {
  margin-top: 14px;
  border-color: rgba(78, 215, 161, 0.32);
  background: rgba(7, 12, 16, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.stats { gap: 10px; margin-bottom: 18px; }
.stat {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 8px;
  border-color: rgba(197, 210, 241, 0.14);
  background: linear-gradient(180deg, rgba(24, 32, 54, 0.86), rgba(15, 20, 34, 0.86));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.stat__value { font-size: 19px; }
.stat__label { color: #8f9bb3; }

.prompt,
.search {
  min-height: 50px;
  border-color: rgba(197, 210, 241, 0.15);
  background: rgba(17, 22, 38, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.prompt:focus-within,
.search:focus-within {
  border-color: rgba(240, 108, 173, 0.62);
  box-shadow: 0 0 0 4px rgba(240, 108, 173, 0.10), 0 10px 24px rgba(0, 0, 0, 0.20);
}
.prompt__go { box-shadow: 0 8px 22px rgba(240, 108, 173, 0.26); }

.tile,
.card,
.card--cmd,
.task,
.chat,
.lib,
.account,
.setting,
.template,
.wizard,
.chart,
.empty,
.state {
  border-color: rgba(197, 210, 241, 0.13);
  background: linear-gradient(180deg, rgba(24, 32, 54, 0.88), rgba(15, 20, 34, 0.88));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.tile:hover,
.card--cmd:hover,
.template:hover,
.setting:hover,
.chat:hover,
.account:hover,
.lib:hover {
  border-color: rgba(240, 108, 173, 0.42);
  background: linear-gradient(180deg, rgba(31, 40, 67, 0.92), rgba(17, 23, 40, 0.92));
  transform: translateY(-1px);
}

.tile:active,
.card--cmd:active,
.template:active,
.setting:active,
.chat:active,
.account:active,
.lib:active { transform: translateY(0) scale(0.985); }

.tile { min-height: 96px; padding: 14px 5px 12px; }
.tile__ico { box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18); }
.tile__name { color: #b7c0d2; }
.tile--hit { box-shadow: 0 0 0 1px rgba(240, 108, 173, 0.18), 0 10px 28px rgba(240, 108, 173, 0.16); }

.chips { gap: 7px; margin-top: 14px; }
.chip {
  padding: 8px 14px;
  border-color: rgba(197, 210, 241, 0.14);
  background: rgba(18, 23, 39, 0.82);
}
.chip:hover { border-color: rgba(240, 108, 173, 0.42); color: var(--text); }
.chip.is-active { box-shadow: 0 7px 18px rgba(240, 108, 173, 0.22); }

.segmented {
  gap: 5px;
  border-color: rgba(197, 210, 241, 0.14);
  background: rgba(13, 17, 29, 0.86);
}
.seg.is-active { box-shadow: 0 6px 18px rgba(240, 108, 173, 0.22); }

/* Кнопки воспринимаются как один язык: высота, радиус и hover одинаковы. */
.btn {
  min-height: 42px;
  padding: 10px 15px;
  border-color: rgba(197, 210, 241, 0.15);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover { border-color: rgba(240, 108, 173, 0.50); background: rgba(240, 108, 173, 0.10); }
.btn--primary:hover { border-color: transparent; background: linear-gradient(135deg, #fb86c0 0%, #aa8aff 100%); box-shadow: 0 10px 26px rgba(240, 108, 173, 0.30); }
.btn--danger:hover { background: rgba(255, 113, 138, 0.16); }
.btn--block { min-height: 46px; }
.btn--big { min-height: 50px; letter-spacing: 0.08em; }

.cta {
  box-shadow: 0 14px 32px rgba(240, 108, 173, 0.20);
}

.task { padding: 14px 15px 13px; }
.task__ico { box-shadow: 0 7px 17px rgba(0, 0, 0, 0.18); }
.task__title, .cmd__title, .card__title { letter-spacing: -0.005em; }
.task__actions { padding-top: 2px; border-top: 1px solid rgba(197, 210, 241, 0.08); }

.chat { padding: 12px 13px; }
.chat.is-selected { border-color: rgba(240, 108, 173, 0.66); background: linear-gradient(90deg, rgba(240, 108, 173, 0.13), rgba(154, 120, 255, 0.08)); box-shadow: inset 0 0 0 1px rgba(240, 108, 173, 0.12); }
.chat__check { border-color: rgba(197, 210, 241, 0.34); }

.folder-chips { padding-top: 4px; padding-bottom: 12px; }
.folder-chip {
  padding: 8px 12px;
  border-color: rgba(197, 210, 241, 0.15);
  background: rgba(18, 23, 39, 0.82);
  color: #9ca7bd;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
}
.folder-chip span { color: #f08cbd; }
.folder-chip b { color: #dbe1ee; }
.folder-chip:hover { border-color: rgba(240, 108, 173, 0.45); color: var(--text); }
.folder-chip.is-active,
.folder-chip.is-picked {
  color: #fff;
  border-color: rgba(240, 108, 173, 0.62);
  background: linear-gradient(135deg, rgba(240, 108, 173, 0.18), rgba(154, 120, 255, 0.14));
  box-shadow: 0 7px 18px rgba(240, 108, 173, 0.14);
}
.folder-chip.is-picked::after { color: #ffc4df; }

.chat-bar {
  max-width: 740px;
  margin: 0 auto;
  border-color: rgba(240, 108, 173, 0.42);
  background: rgba(16, 20, 34, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(154, 120, 255, 0.08);
}

.fab { box-shadow: 0 12px 28px rgba(240, 108, 173, 0.30); }

/* Поля стали похожи на настоящую форму, а не на голые строки текста. */
.field input,
.field textarea,
.field select,
.creds input,
.sched__at,
.sched__text,
.promo__input {
  border-color: rgba(197, 210, 241, 0.16);
  background: rgba(8, 11, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.field input:hover,
.field textarea:hover,
.field select:hover,
.creds input:hover { border-color: rgba(240, 108, 173, 0.34); }
.field input:focus,
.field textarea:focus,
.field select:focus,
.creds input:focus { border-color: rgba(240, 108, 173, 0.75); box-shadow: 0 0 0 4px rgba(240, 108, 173, 0.09); }
.field__note { color: #8995ad; }
.field--check { padding: 10px 12px; border: 1px solid rgba(197, 210, 241, 0.12); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.035); }
.field--check .field__note { padding-left: 30px; }
.btn--pick { background: rgba(240, 108, 173, 0.10); }

.sheet__backdrop { background: rgba(3, 5, 11, 0.78); backdrop-filter: blur(8px); }
.sheet__panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  border-top-color: rgba(240, 108, 173, 0.40);
  background: linear-gradient(180deg, #171d31 0%, #0d111d 100%);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.58);
}
.sheet__panel::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: -4px auto 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.20);
}
.sheet__title { font-size: 18px; letter-spacing: -0.01em; }
.sheet__lead { color: #9ca7bd; line-height: 1.5; }

.steps__item { color: #7f8ba3; }
.steps__item.is-current { color: var(--text); }
.steps__item.is-current::before { box-shadow: 0 0 0 4px rgba(240, 108, 173, 0.10), 0 0 18px rgba(240, 108, 173, 0.30); }

.mode {
  border-color: rgba(197, 210, 241, 0.14);
  background: rgba(255, 255, 255, 0.045);
}
.mode:hover { border-color: rgba(240, 108, 173, 0.45); }
.mode.is-active { border-color: rgba(240, 108, 173, 0.62); box-shadow: 0 10px 28px rgba(240, 108, 173, 0.16); }

.picks .pick { background: linear-gradient(135deg, rgba(240, 108, 173, 0.16), rgba(154, 120, 255, 0.12)); }
.preflight { color: #96a1b8; }
.preflight.is-warning { color: #f2c16b; }
.preflight__dot { background: var(--green); box-shadow: 0 0 8px rgba(78, 215, 161, 0.55); }
.preflight.is-warning .preflight__dot { background: var(--orange); }

.nav {
  max-width: 760px;
  left: 50%;
  right: auto;
  width: 100%;
  transform: translateX(-50%);
  background: rgba(10, 13, 23, 0.88);
  border-top-color: rgba(197, 210, 241, 0.12);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.24);
}
.nav__item:hover { color: #e7b2d0; }
.nav__item.is-active { color: #f47bb8; }
.nav__crown button { box-shadow: 0 0 0 5px rgba(8, 10, 18, 0.96), 0 12px 30px rgba(240, 108, 173, 0.34); }

.toast {
  border-color: rgba(240, 108, 173, 0.46);
  background: rgba(20, 26, 43, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.empty,
.state { padding: 36px 22px; }
.empty__ico { box-shadow: 0 10px 28px rgba(240, 108, 173, 0.18); }

/* Больше воздуха на планшете и десктопе, но без потери плотности на телефоне. */
@media (min-width: 700px) {
  .content { padding-top: 22px; padding-bottom: calc(var(--nav-h) + 38px); }
  .content--float { padding-bottom: calc(var(--nav-h) + 38px + var(--float-h, 0px)); }
  .hero { margin-top: -22px; }
  .tiles { gap: 12px; }
  .cards, .list { gap: 12px; }
  .sheet__panel { left: 50%; right: auto; width: min(760px, 100%); transform: translateX(-50%); border-left: 1px solid rgba(197, 210, 241, 0.08); border-right: 1px solid rgba(197, 210, 241, 0.08); }
}

@media (max-width: 520px) {
  .content { padding-left: 14px; padding-right: 14px; }
  .content--float { padding-left: 14px; padding-right: 14px; }
  .hero { margin-left: -14px; margin-right: -14px; padding-left: 18px; padding-right: 18px; }
  .header { padding-left: 14px; padding-right: 14px; }
  .sheet__panel { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile:hover, .card--cmd:hover, .template:hover, .setting:hover, .chat:hover, .account:hover, .lib:hover { transform: none; }
}

@media (min-width: 700px) {
  /* У шторки есть своя анимация подъёма, поэтому центрирование задаём и в
     keyframes, иначе transform анимации временно сбрасывает translateX. */
  .sheet__panel { animation-name: sheetUpDesktop; }
}

@keyframes sheetUpDesktop {
  from { transform: translateX(-50%) translateY(14%); opacity: 0.4; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ═════════════════════════ Подключение аккаунта ═════════════════════════ */

/* На первом шаге мастера это уже не «ссылка в профиль», а явная кнопка
   запуска входа: справа сразу виден следующий шаг. */
.wizard__step[data-auth-start] {
  border-color: rgba(240, 108, 173, 0.56);
  background:
    linear-gradient(90deg, rgba(240, 108, 173, 0.13), rgba(154, 120, 255, 0.09)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 26px rgba(240, 108, 173, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.wizard__step[data-auth-start]::after {
  content: 'Открыть вход  →';
  flex: none;
  margin-left: auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: #ffd0e6;
  background: rgba(240, 108, 173, 0.14);
  border: 1px solid rgba(240, 108, 173, 0.24);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.wizard__step[data-auth-start]:hover {
  border-color: rgba(240, 108, 173, 0.82);
  transform: translateY(-1px);
}

.login__hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -2px 0 16px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(197, 210, 241, 0.12);
  background: linear-gradient(100deg, rgba(240, 108, 173, 0.10), rgba(154, 120, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.login__hero-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffe5f2;
  background: var(--accent-grad);
  box-shadow: 0 8px 20px rgba(240, 108, 173, 0.24);
}
.login__hero-icon .ic { width: 21px; height: 21px; }
.login__hero-title { font-size: 14px; font-weight: 700; color: var(--text); }
.login__hero-sub { margin-top: 3px; font-size: 11.5px; color: #aeb8cb; }
.login__hero-sub span { margin: 0 4px; color: #f39bc4; }

#loginSheet .form { gap: 14px; }
#loginSheet .sheet__lead { margin: -2px 0 0; line-height: 1.52; }
#loginSheet .field > span {
  color: #c6cede;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
#loginSheet #loginInput {
  min-height: 56px;
  font-size: 18px;
  letter-spacing: 0.025em;
  background: rgba(7, 10, 18, 0.54);
}
#loginSheet[data-login-stage="phone"] #loginInput { font-variant-numeric: tabular-nums; }
#loginSheet[data-login-stage="code"] #loginInput {
  text-align: center;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  font-variant-numeric: tabular-nums;
}
#loginSheet[data-login-stage="password"] #loginInput { letter-spacing: 0.08em; }
#loginSheet #loginNote {
  display: block;
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 11px;
  color: #aeb8cb;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(197, 210, 241, 0.10);
  line-height: 1.42;
}
#loginSheet #loginError:not(:empty) {
  min-height: auto;
  padding: 10px 11px;
  border-radius: 11px;
  color: #ffbdc8;
  background: rgba(255, 113, 138, 0.10);
  border: 1px solid rgba(255, 113, 138, 0.28);
}
#loginSheet #loginSubmit {
  min-height: 52px;
  font-size: 14.5px;
  box-shadow: 0 12px 28px rgba(240, 108, 173, 0.24);
}
#loginSheet .login__aside { margin-top: 1px; }
#loginSheet .login__aside .btn { min-height: 38px; padding: 8px 10px; font-size: 11.5px; }
#loginSheet .creds {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(197, 210, 241, 0.10);
  background: rgba(255, 255, 255, 0.025);
}
#loginSheet .creds summary { color: #aeb8cb; }

@media (max-width: 460px) {
  .wizard__step[data-auth-start]::after { padding: 6px 7px; font-size: 9.5px; }
  .wizard__step[data-auth-start] { gap: 8px; }
  .login__hero { padding: 11px; }
  #loginSheet .login__aside .btn { flex-basis: 46%; }
}

/* ═════════════════════ Библиотека сообщений · polish ═════════════════════ */
#tab-library > .screen__sub { max-width: 650px; }
#tab-library > .card {
  padding: 16px;
  border-color: rgba(240, 108, 173, 0.22);
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(154, 120, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(24, 32, 54, 0.92), rgba(15, 20, 34, 0.92));
}
#tab-library #libraryText {
  min-height: 132px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.55;
}
#tab-library #libraryAdd { margin-top: 2px; }
#tab-library #libraryList { gap: 10px; }
#tab-library .lib {
  min-width: 0;
  padding: 14px;
  align-items: center;
}
#tab-library .lib__body { min-width: 0; }
#tab-library .lib__title { font-size: 14px; line-height: 1.35; white-space: normal; }
#tab-library .lib__text { margin-top: 5px; color: #aab5c9; }
#tab-library .lib__acts { gap: 6px; }
#tab-library .lib__del {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(197, 210, 241, 0.15);
  border-radius: 11px;
  color: #aab5c9;
  opacity: 1;
  background: rgba(255, 255, 255, 0.045);
}
#tab-library .lib__del:hover { color: var(--text); border-color: rgba(240, 108, 173, 0.48); background: rgba(240, 108, 173, 0.12); }
#tab-library .lib__del[data-action="delete-library"] { color: #ff9aaa; border-color: rgba(255, 113, 138, 0.22); }
#tab-library .lib__del[data-action="delete-library"]:hover { color: #ffd2d9; border-color: rgba(255, 113, 138, 0.60); background: rgba(255, 113, 138, 0.14); }
#tab-library .lib__use { color: #e9a9cd; }
#tab-library .lib__cancel { margin-top: 9px; }
#tab-library .empty { padding-top: 42px; padding-bottom: 42px; }

@media (max-width: 390px) {
  #tab-library .lib { align-items: flex-start; }
  #tab-library .lib__acts { flex-direction: column; }
  #tab-library .lib__del { width: 36px; height: 36px; }
}

/* Подтверждение удаления/отключения — собственная компактная шторка. */
#confirmSheet { z-index: 95; }
#confirmSheet .confirm__panel {
  max-width: 520px;
  border-top-color: rgba(255, 113, 138, 0.42);
  background: linear-gradient(180deg, #1b2034 0%, #0f131f 100%);
}
.confirm__text {
  margin: 2px 0 18px;
  color: #b8c2d4;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.confirm__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.confirm__actions .btn { min-height: 46px; }
.confirm__actions .btn--danger { color: #ffd0d7; border-color: rgba(255, 113, 138, 0.42); background: rgba(255, 113, 138, 0.14); }
.confirm__actions .btn--danger:hover { color: #fff; border-color: rgba(255, 113, 138, 0.74); background: rgba(255, 113, 138, 0.24); }

/* Персональные функции выглядят как отдельные переключатели, а не как набор
   браузерных галочек. Это особенно важно для «без ограничений»: пользователь
   видит, что сам управляет режимом, а не получает его скрытым значением. */
#taskFields .field--check {
  position: relative;
  min-height: 54px;
  padding: 11px 12px;
  border-color: rgba(197, 210, 241, 0.13);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.045), rgba(154, 120, 255, 0.035));
}
#taskFields .field--check:hover { border-color: rgba(240, 108, 173, 0.42); }
#taskFields .field--check input {
  appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  flex: none;
  border: 1px solid rgba(197, 210, 241, 0.28);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.60);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22);
  transition: background 0.18s ease, border-color 0.18s ease;
}
#taskFields .field--check input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #aab5c9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}
#taskFields .field--check input:checked {
  border-color: transparent;
  background: var(--accent-grad);
  box-shadow: 0 5px 14px rgba(240, 108, 173, 0.22);
}
#taskFields .field--check input:checked::after {
  transform: translateX(18px);
  background: #fff;
}
#taskFields .field--check input:focus-visible { outline: 2px solid #f5a0c8; outline-offset: 3px; }
#taskFields .field--check input:disabled { opacity: 0.45; }
#taskFields .field--check:has(#task_repeat_forever) {
  border-color: rgba(240, 108, 173, 0.34);
  background: linear-gradient(100deg, rgba(240, 108, 173, 0.11), rgba(154, 120, 255, 0.07));
}
#taskFields .field--check:has(#task_repeat_forever) .field__note { color: #c3cada; }
#taskFields #task_repeats:disabled {
  opacity: 0.55;
  border-style: dashed;
  cursor: not-allowed;
}

/* Черновик формы: не теряем длинный текст, но и не навязываем восстановление. */
.task-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 2px;
  padding: 10px 11px;
  border-radius: 13px;
  border: 1px solid rgba(240, 108, 173, 0.32);
  background: linear-gradient(100deg, rgba(240, 108, 173, 0.11), rgba(154, 120, 255, 0.08));
}
.task-draft__copy { display: flex; align-items: center; gap: 8px; min-width: 0; color: #c9d0df; font-size: 12px; }
.task-draft__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #f4a3c9; box-shadow: 0 0 10px rgba(240, 108, 173, 0.75); }
.task-draft__actions { display: flex; gap: 6px; flex: none; }
.task-draft__actions .btn { min-height: 34px; padding: 6px 9px; font-size: 11px; }
@media (max-width: 390px) {
  .task-draft { align-items: flex-start; flex-direction: column; }
  .task-draft__actions { width: 100%; }
  .task-draft__actions .btn { flex: 1; }
}


.field__aside--library { align-items: center; flex-wrap: wrap; gap: 8px; }
.btn--library-select { opacity: .78; }
.btn--library-select:hover, .btn--library-select:focus-visible { opacity: 1; }
@media (max-width: 390px) {
  .field__aside--library .btn { flex: 1 1 auto; }
  .field__aside--library .btn--library-select { flex-basis: 100%; }
}


.state--loading { min-height: 190px; }
.state__spinner { width: 28px; height: 28px; margin: 18px auto 0; border: 3px solid rgba(164, 174, 202, .22); border-top-color: #df74d0; border-radius: 50%; animation: state-spin .8s linear infinite; }
@keyframes state-spin { to { transform: rotate(360deg); } }

.chat-refresh { margin: 0 0 10px; padding: 9px 12px; border: 1px solid rgba(137, 155, 214, .24); border-radius: 12px; color: var(--muted); font-size: 12px; background: rgba(103, 116, 171, .08); }
.chat-refresh--error { border-color: rgba(239, 137, 137, .38); color: #f0b1b1; background: rgba(180, 71, 93, .10); }


/* ────────────────────── Улучшения формы задачи ────────────────────── */

/* Заголовок формы не исчезает при длинной прокрутке: пользователь всегда
   понимает, какую задачу сейчас настраивает. */
#taskSheet .sheet__head {
  position: sticky;
  top: -16px;
  z-index: 8;
  margin: -16px -14px 14px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(15, 19, 31, .99) 72%, rgba(15, 19, 31, .88) 86%, transparent);
  backdrop-filter: blur(12px);
}
#taskSheet .sheet__lead { max-width: 680px; margin-bottom: 16px; line-height: 1.55; }
.task-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 -2px;
  color: #e9edf7;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.task-section-label::after { content: ''; height: 1px; flex: 1; background: rgba(197, 210, 241, .13); }

/* Необязательные параметры не должны выглядеть как обязательная анкета из
   двадцати полей. В новой задаче блок закрыт, в редактировании открыт, чтобы
   существующие настройки были видны сразу. */
.task-options {
  margin-top: 4px;
  border: 1px solid rgba(197, 210, 241, .14);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(255, 255, 255, .045), rgba(154, 120, 255, .035));
  overflow: hidden;
}
.task-options > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 11px 14px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.task-options > summary::-webkit-details-marker { display: none; }
.task-options > summary span { display: grid; gap: 3px; }
.task-options > summary b { font-size: 13px; }
.task-options > summary small { color: var(--muted); font-size: 11.5px; }
.task-options > summary i { color: var(--muted); font-size: 19px; font-style: normal; transition: transform .18s ease; }
.task-options[open] > summary { border-bottom: 1px solid rgba(197, 210, 241, .12); background: rgba(240, 108, 173, .045); }
.task-options[open] > summary i { transform: rotate(180deg); color: #f4a3c9; }
.task-options__body { display: grid; gap: 12px; padding: 13px; }

.field__label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #cfd7e8;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
.field__label::after { content: ''; flex: 1; height: 1px; background: rgba(197, 210, 241, .07); }
.field--check .field__label { display: block; color: var(--text); font-size: 13.5px; }
.field--check .field__label::after { display: none; }
.field__note { line-height: 1.4; }

/* Подсказки теперь выглядят как объяснение к форме, а не как случайная строка
   между полями. */
.task-hint {
  display: flex;
  gap: 9px;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(197, 210, 241, .13);
  border-radius: 13px;
  color: #aeb9cf;
  background: rgba(255, 255, 255, .035);
  line-height: 1.48;
}
.task-hint::before { content: 'i'; display: grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; color: #111522; background: #b9c5df; font-size: 12px; font-weight: 800; }

.activity-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(124, 208, 218, .24);
  border-radius: 13px;
  color: #c7eef0;
  background: linear-gradient(100deg, rgba(71, 190, 203, .10), rgba(125, 103, 232, .07));
  line-height: 1.45;
}
.activity-hint b { color: #fff; }

/* Действие всегда рядом с нижним краем шторки. Пользователь не теряет кнопку
   после длинного списка, но она не перекрывает последний текст. */
.task-submitbar {
  position: sticky;
  bottom: -20px;
  z-index: 7;
  display: grid;
  gap: 9px;
  margin: 3px -14px -20px;
  padding: 13px 14px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(197, 210, 241, .14);
  background: linear-gradient(180deg, rgba(15, 19, 31, .80), rgba(15, 19, 31, .99) 24%);
  backdrop-filter: blur(14px);
}
.task-submitbar__copy { display: grid; gap: 2px; color: #cbd4e5; font-size: 11.5px; line-height: 1.35; }
.task-submitbar__copy b { color: #f0f3fb; font-size: 12.5px; }
.task-submitbar__copy span { color: #8794ad; }
.task-submitbar .btn { min-height: 48px; font-size: 15px; }
.task-submitbar .error { margin: 0; }

@media (min-width: 700px) {
  #taskSheet .sheet__head { margin-left: -14px; margin-right: -14px; }
  .task-submitbar { margin-left: -14px; margin-right: -14px; }
}

.activity-hint__label { color: #9ae3e6; font-weight: 700; }
.activity-hint .btn { margin-left: auto; }
@media (max-width: 390px) { .activity-hint .btn { margin-left: 0; } }

/* ═══════════════════════ Единый визуальный слой кабинета ═══════════════════════
   Этот слой намеренно лежит в конце файла: все экраны — главная, команды,
   задачи, чаты, аккаунты, библиотека и шторки — получают один ритм, но их
   существующая логика и отдельные состояния не меняются. */

:root {
  --surface-0: #080b14;
  --surface-1: #101625;
  --surface-2: #172238;
  --surface-3: #1d2a43;
  --ink-soft: #a8b5ca;
  --ink-faint: #7f8da7;
  --border-calm: rgba(180, 198, 230, .15);
  --border-focus: rgba(244, 126, 187, .62);
}

::selection { color: #fff; background: rgba(240, 108, 173, .45); }

*:focus-visible {
  outline: 2px solid rgba(245, 160, 200, .92);
  outline-offset: 3px;
}

button, input, select, textarea { -webkit-font-smoothing: antialiased; }

/* На основных экранах заголовок теперь читается как начало страницы, а не как
   ещё одна строка среди карточек. */
.screen__title {
  position: relative;
  padding-bottom: 9px;
}
.screen__title::after {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f47bb8, rgba(154, 120, 255, .72));
  box-shadow: 0 0 14px rgba(240, 108, 173, .35);
}
.screen__sub { max-width: 650px; }

/* Десктопная навигация не должна выглядеть растянутой полосой во всю ширину
   браузера, а активный пункт должен считываться с первого взгляда. */
.nav__item { position: relative; }
.nav__item.is-active::after {
  content: '';
  position: absolute;
  left: 23%;
  right: 23%;
  bottom: 6px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent-grad);
  box-shadow: 0 0 12px rgba(240, 108, 173, .55);
}
.nav__crown button { border: 1px solid rgba(255, 255, 255, .24); }

/* В каталогах сначала читается название, затем объяснение, затем состояние.
   Чуть большая высота карточки даёт пальцу удобную область нажатия. */
.card--cmd {
  min-height: 92px;
  align-items: flex-start;
  padding: 14px;
}
.card--cmd .cmd__ico { margin-top: 1px; }
.cmd__title { line-height: 1.28; }
.cmd__desc { line-height: 1.42; }
.cmd__foot { min-height: 21px; }
.cmd__chevron { margin-top: 11px; }

/* Карточка задачи: основной контент и действие разделены воздухом. Состояние
   не конкурирует с названием, а прогресс не прилипает к краям. */
.task { padding: 15px; }
.task__top { align-items: flex-start; }
.task__title { line-height: 1.32; }
.task__meta { line-height: 1.42; }
.task__actions { margin-top: 13px; padding-top: 12px; }
.task__actions .btn { min-height: 38px; }
.task__alert { margin-top: 11px; border-radius: 12px; }

/* Аккаунт, библиотека и чат: одинаковые внутренние отступы и более явный
   интерактивный hover. */
.account, .lib, .chat { padding: 13px 14px; }
.account__phone, .lib__title, .chat__title { line-height: 1.35; }
.account__reason { line-height: 1.45; }
.lib__use { color: #eaa2c7; }
.chat__title { font-weight: 650; }
.chat__sub { color: #94a2bb; }
.chat__kind { color: #aebbd0; }

/* Пустые и ошибочные состояния — часть интерфейса, а не текстовый провал. */
.empty, .state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 18px;
}
.empty__title, .state__title { max-width: 460px; line-height: 1.3; }
.empty > div:last-child, .state__text { max-width: 460px; line-height: 1.5; }
.state__retry { min-width: 132px; }

/* У всех шторок одна шапка и один жест прокрутки: заголовок не теряется, а
   подложка поля остаётся видна при просмотре длинной формы. */
.sheet__panel { overscroll-behavior: contain; }
.sheet:not(#taskSheet) .sheet__head {
  position: sticky;
  top: -18px;
  z-index: 8;
  margin: -18px -18px 14px;
  padding: 15px 18px 12px;
  background: linear-gradient(180deg, rgba(23, 29, 49, .99) 72%, rgba(23, 29, 49, .88) 87%, transparent);
  backdrop-filter: blur(12px);
}
.sheet--over .sheet__head { margin-left: -14px; margin-right: -14px; }

/* Клавиатура на телефоне не должна закрывать основной action: у полей чуть
   больше высота нажатия, у вторичных кнопок — меньше визуальный вес. */
.field input, .field select, .field textarea { min-height: 46px; }
.field textarea { min-height: 108px; }
.btn--pick { min-height: 42px; }

/* Подписка и бонусные блоки: цифра — главный объект, кнопки — второй уровень. */
.card--sub, .card--bonus { padding: 17px; }
.sub__value { font-size: 29px; letter-spacing: -.03em; }
.sub__note, .bonus__note { line-height: 1.48; }

/* Доступное поведение на маленьком экране: не допускаем горизонтального
   переполнения длинных названий и оставляем touch-target не меньше 42 px. */
@media (max-width: 520px) {
  .screen__title { font-size: 26px; }
  .card--cmd { min-height: 88px; padding: 13px; }
  .cmd__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .task__top { gap: 9px; }
  .task__ico { width: 36px; height: 36px; }
  .badge { padding-left: 8px; padding-right: 8px; }
  .account__state { font-size: 10px; }
  .chat-bar__btns .btn { flex: 1 1 calc(50% - 8px); min-height: 42px; }
  .chat-bar__clear { flex: 0 0 42px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}


/* Поиск: крестик появляется только при тексте и позволяет одним нажатием
   вернуться к полному списку. */
.search { padding-right: 8px; }
.search__clear {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #aab7cc;
  font-size: 22px;
  line-height: 1;
  background: rgba(255,255,255,.06);
}
.search__clear:hover { color: #fff; background: rgba(240,108,173,.18); }

/* Вход по 2FA: пароль можно проверить, не стирая его и не покидая flow. */
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-wrap #loginInput { padding-right: 82px; }
.login-input-reveal {
  position: absolute;
  right: 10px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #e8aecf;
  font-size: 11px;
  background: rgba(240,108,173,.10);
}
.login-input-reveal:hover { background: rgba(240,108,173,.20); color: #fff; }

.task-submitbar__copy b.is-warning { color: #ffd38a; }


.segmented .seg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg__count {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 99px;
  color: #aebbd0;
  background: rgba(255,255,255,.07);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}
.seg.is-active .seg__count { color: #fff; background: rgba(255,255,255,.18); }


/* Выбор сценария: не просто сетка иконок, а маленькая понятная карточка —
   название, назначение и состояние. На телефоне две колонки сохраняют
   читаемость, на широком экране остаются три. */
.create-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.create-cell {
  position: relative;
  align-items: flex-start;
  min-height: 142px;
  padding: 14px;
  text-align: left;
  background: linear-gradient(145deg, rgba(28, 39, 64, .92), rgba(14, 19, 32, .94));
}
.create-cell .tile__ico { margin-bottom: 2px; }
.create-cell__body { display: grid; gap: 4px; min-width: 0; width: 100%; }
.create-cell__name { color: #f2f4fb; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: left; }
.create-cell__desc {
  display: -webkit-box;
  overflow: hidden;
  color: #a5b2c8;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.create-cell__state { margin-top: 3px; font-size: 10px; }
.create-cell__state .status__dot { width: 5px; height: 5px; }
.create-cell.is-off { filter: saturate(.55); opacity: .66; }
.create-cell.is-off .create-cell__state { color: #aab4c7; }

@media (max-width: 520px) {
  .create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .create-cell { min-height: 136px; padding: 12px; }
  .create-cell__name { font-size: 12.5px; }
}

.create-lead { margin: -2px 0 15px; max-width: 610px; line-height: 1.5; }

#loginSheet #loginResend:disabled { opacity: .72; cursor: wait; color: #aab8cf; background: rgba(255,255,255,.035); }

.task-account-note.is-online { color: #78dcb4; }
.task-account-note.is-offline { color: #f2b0bd; }


.picker-recent { margin: 4px 0 10px; padding: 10px 11px; border: 1px solid rgba(197,210,241,.12); border-radius: 13px; background: rgba(255,255,255,.03); }
.picker-recent__title { margin-bottom: 7px; color: #9aa8bf; font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.picker-recent__list { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.picker-recent__list::-webkit-scrollbar { display: none; }
.picker-recent__chip { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 210px; padding: 7px 9px; border: 1px solid rgba(197,210,241,.14); border-radius: 999px; color: #cbd5e5; background: rgba(17,22,38,.76); font-size: 11px; }
.picker-recent__chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-recent__chip b { color: #ee9ec5; font-size: 14px; font-weight: 500; }
.picker-recent__chip.is-selected { border-color: rgba(240,108,173,.58); background: rgba(240,108,173,.14); }

.task-preview { margin-top: 2px; border: 1px solid rgba(197,210,241,.14); border-radius: 14px; background: rgba(255,255,255,.03); overflow: hidden; }
.task-preview > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; color: #dce3f0; cursor: pointer; font-size: 12.5px; font-weight: 700; list-style: none; }
.task-preview > summary::-webkit-details-marker { display: none; }
.task-preview > summary i { color: #9daac0; font-size: 18px; font-style: normal; }
.task-preview[open] > summary { border-bottom: 1px solid rgba(197,210,241,.12); background: rgba(154,120,255,.06); }
.task-preview__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 8px 13px; border-bottom: 1px solid rgba(197,210,241,.07); font-size: 11.5px; }
.task-preview__row:last-child { border-bottom: 0; }
.task-preview__row span { color: #8f9db5; }
.task-preview__row b { max-width: 68%; overflow: hidden; color: #edf1f8; font-weight: 650; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.task-preview__empty { padding: 12px 13px; color: #8f9db5; font-size: 11.5px; line-height: 1.45; }

/* ─────────────────────── Performance & accessibility pass ─────────────────────
   Большой список чатов держит в DOM только окно вокруг scroll viewport-а.
   Остальные строки остаются в виртуальном треке, поэтому скроллбар честно
   показывает размер полного списка, но браузер не layout-ит тысячи кнопок. */
.virtual-list {
  position: relative;
  max-height: min(62vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.virtual-list__track { position: relative; width: 100%; }
.virtual-list__items { position: absolute; inset: 0 0 auto; width: 100%; }
.virtual-list__items > .chat {
  min-height: 76px;
  box-sizing: border-box;
}
#chatList > .virtual-list { margin-top: 2px; }
#pickerList > .virtual-list { max-height: 46vh; }

.account__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 9px 0 0 48px;
  color: #92a0b8;
  font-size: 11px;
  line-height: 1.4;
}
.account__meta span + span::before { content: '·'; margin-right: 12px; color: #59657c; }

/* В длинных карточках secondary-строка переносится, но основной статус и
   кнопки остаются видимыми. */
.account__body { overflow-wrap: anywhere; }
.account__reason { overflow-wrap: anywhere; }

@media (max-width: 390px) {
  .account__meta { margin-left: 0; }
  .account__meta span + span::before { margin-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .virtual-list, .sheet__panel, .toast, * { scroll-behavior: auto !important; }
}

/* Журнал доставки: успехи и ошибки различаются формой и цветом, а не только
   мелкой подписью — это легче читать в тёмной шторке и скринридеру. */
.journal-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(197, 210, 241, .09);
}
.journal-row:last-child { border-bottom: 0; }
.journal-row__mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}
.journal-row--ok { color: #7be3b4; }
.journal-row--info { color: #9ecbff; }
.journal-row--error { color: #ff9eb0; }
.journal-row__body { min-width: 0; flex: 1; }
.journal-row__title { color: #edf1f8; font-size: 12.5px; font-weight: 700; }
.journal-row__detail { margin-top: 3px; color: #98a6bd; font-size: 11.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.journal-row__time { flex: none; color: #7e8ba2; font-size: 10.5px; white-space: nowrap; }

/* Единый блок настроек отправки: сначала механика запуска, затем параметры,
   которые одинаковы для расписания и очереди. Это убирает ощущение, что часть
   возможностей «пропала» при переключении режима. */
.task-subsection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 -2px;
  color: #e9b5d1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.task-subsection-label::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(240, 108, 173, .18);
}
.send-mode-note {
  margin-top: 9px;
  color: #9ba8bf;
  font-size: 11px;
  line-height: 1.45;
}
.task-options__body > .task-subsection-label:not(:first-child) { margin-top: 12px; }

/* ═════════════════════ Вариант 2 · фирменная компактная форма отправки ═════════════════════
   Компоновка берёт идею второго макета, но использует палитру, радиусы,
   границы и градиентные акценты уже существующего кабинета. */
.task-options--compact {
  margin-top: 5px;
  border-radius: 19px;
  border-color: rgba(240, 108, 173, .28);
  background:
    radial-gradient(100% 45% at 100% 0%, rgba(154, 120, 255, .11), transparent 70%),
    linear-gradient(180deg, rgba(24, 32, 54, .92), rgba(12, 17, 30, .94));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.task-options--compact > summary {
  min-height: 54px;
  padding: 10px 14px;
  border-bottom-color: rgba(240, 108, 173, .16);
}
.task-options--compact > summary b { font-size: 14px; }
.task-options--compact > summary small { color: #a8b4c9; }
.task-options--compact[open] > summary { background: rgba(240, 108, 173, .055); }
.task-options--compact .task-options__body { gap: 16px; padding: 14px; }
.task-options--compact .task-subsection { display: grid; gap: 9px; }
.task-options--compact .task-subsection-label { margin: 0; color: #f0a8ca; font-size: 10px; letter-spacing: .11em; }
.task-options--compact .task-subsection-label::after { background: linear-gradient(90deg, rgba(240, 108, 173, .27), rgba(154, 120, 255, .08)); }
.task-options--compact .task-subsection-fields { display: grid; gap: 9px; }

/* Переключатель и поля расписания — самостоятельная верхняя карточка. */
.task-options--compact .task-subsection--mode {
  padding: 11px;
  border: 1px solid rgba(197, 210, 241, .13);
  border-radius: 15px;
  background: rgba(8, 13, 25, .34);
}
.task-options--compact .task-subsection--mode .task-subsection-label { padding: 0 1px; }
.task-options--compact .task-subsection--mode .task-subsection-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.task-options--compact .task-subsection--mode [data-field="send_mode"],
.task-options--compact .task-subsection--mode [data-field="schedule_only"],
.task-options--compact .task-subsection--mode [data-field="scheduled_posts"] { grid-column: 1 / -1; }
.task-options--compact .task-subsection--mode [data-field="send_mode"] {
  padding-bottom: 2px;
}
.task-options--compact .task-subsection--mode [data-field="send_mode"] .field__label { display: none; }
.task-options--compact .task-subsection--mode [data-field="send_mode"] .segmented { min-height: 44px; padding: 4px; }
.task-options--compact .task-subsection--mode [data-field="send_mode"] .seg { min-height: 34px; font-size: 12px; }
.task-options--compact .task-subsection--mode .field input,
.task-options--compact .task-subsection--mode .field select { min-height: 44px; }
.task-options--compact .task-subsection--mode .field__label { font-size: 11px; color: #9ba9c0; }
.task-options--compact .task-subsection--mode .send-mode-note {
  margin: 4px 1px 0;
  padding: 8px 9px;
  border-left: 2px solid rgba(240, 108, 173, .58);
  border-radius: 0 8px 8px 0;
  background: rgba(240, 108, 173, .055);
  color: #aebbd0;
  font-size: 11px;
  line-height: 1.42;
}

/* Общие параметры — фирменная сетка карточек, не длинный список галочек. */
.task-options--compact .task-subsection--common .task-subsection-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.task-options--compact .task-subsection--common .field {
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(197, 210, 241, .13);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .047), rgba(154, 120, 255, .035));
}
.task-options--compact .task-subsection--common .field:hover { border-color: rgba(240, 108, 173, .38); }
.task-options--compact .task-subsection--common .field__label { font-size: 11.5px; line-height: 1.25; }
.task-options--compact .task-subsection--common .field__label::after { display: none; }
.task-options--compact .task-subsection--common .field--check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  min-height: 62px;
  padding: 10px;
}
.task-options--compact .task-subsection--common .field--check .field__label { font-size: 12px; }
.task-options--compact .task-subsection--common .field--check .field__note { grid-column: 1 / -1; padding-left: 0; }
.task-options--compact .task-subsection--common .field input:not([type="checkbox"]),
.task-options--compact .task-subsection--common .field select { min-height: 36px; padding: 8px 9px; font-size: 13px; }
.task-options--compact .task-subsection--common .field__note { font-size: 10px; }

/* Остальные параметры не спорят с общими за внимание. */
.task-options--compact .task-subsection--other {
  padding-top: 2px;
  border-top: 1px solid rgba(197, 210, 241, .09);
}
.task-options--compact .task-subsection--other .task-subsection-fields { gap: 10px; }

@media (max-width: 380px) {
  .task-options--compact .task-subsection--common .task-subsection-fields { grid-template-columns: minmax(0, 1fr); }
  .task-options--compact .task-subsection--mode .task-subsection-fields { grid-template-columns: minmax(0, 1fr); }
  .task-options--compact .task-subsection--mode [data-field="send_mode"],
  .task-options--compact .task-subsection--mode [data-field="schedule_only"],
  .task-options--compact .task-subsection--mode [data-field="scheduled_posts"] { grid-column: auto; }
}

/* У постинга второй вариант — это не «закрытый аккордеон», а полноценная
   карточка настроек. Поэтому блок виден сразу и не маскирует возможности. */
.task-options--panel {
  display: block;
  margin-top: 5px;
  border-radius: 19px;
  border-color: rgba(240, 108, 173, .30);
  background:
    radial-gradient(100% 45% at 100% 0%, rgba(154, 120, 255, .12), transparent 70%),
    linear-gradient(180deg, rgba(24, 32, 54, .94), rgba(12, 17, 30, .96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .20), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.task-options--panel > .task-options__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 55px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(240, 108, 173, .17);
  background: rgba(240, 108, 173, .055);
}
.task-options--panel > .task-options__summary span { display: grid; gap: 3px; }
.task-options--panel > .task-options__summary b { color: #f5f7fc; font-size: 14px; }
.task-options--panel > .task-options__summary small { color: #a8b4c9; font-size: 11.5px; }
.task-options--panel > .task-options__summary i { color: #f4a3c9; font-size: 19px; font-style: normal; transform: rotate(180deg); }
.task-options--panel > .task-options__body { padding: 14px; }

/* ═════════════════════ ДОЧА GLAM-TECH · visual identity ═════════════════════
   Здесь не просто «ещё один тёмный блок»: шторка получает собственный язык
   бренда — глянцевый ультрафиолет, жидкий хром, неоновая фуксия и тонкая
   технологичная сетка. Логика формы и привычные размеры контролов не меняются. */
#taskSheet .sheet__panel {
  --docha-pink: #ff4fa8;
  --docha-violet: #9b6dff;
  --docha-cyan: #57e6ef;
  --docha-chrome: #f8e9f5;
  position: absolute;
  overflow-x: hidden;
  border-top-color: rgba(255, 119, 196, .62);
  background:
    radial-gradient(95% 38% at 8% 0%, rgba(255, 54, 159, .20), transparent 67%),
    radial-gradient(75% 40% at 100% 8%, rgba(87, 230, 239, .11), transparent 64%),
    radial-gradient(90% 65% at 50% 100%, rgba(117, 57, 214, .12), transparent 72%),
    linear-gradient(180deg, #171127 0%, #0d0c19 48%, #090b14 100%);
  box-shadow: 0 -22px 70px rgba(255, 41, 159, .15), 0 -16px 45px rgba(0, 0, 0, .68);
}
#taskSheet .sheet__panel::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 80%);
}
#taskSheet .sheet__panel > * { position: relative; z-index: 1; }
#taskSheet .sheet__panel::before {
  z-index: 3;
  background: linear-gradient(90deg, rgba(87, 230, 239, .65), rgba(255, 255, 255, .80) 48%, rgba(255, 79, 168, .85));
  box-shadow: 0 0 12px rgba(255, 79, 168, .55), 0 0 12px rgba(87, 230, 239, .35);
}
#taskSheet .sheet__head {
  position: sticky;
  top: -16px;
  z-index: 8;
  padding-top: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background:
    linear-gradient(180deg, rgba(18, 13, 34, .98) 66%, rgba(18, 13, 34, .86) 86%, transparent),
    radial-gradient(55% 100% at 0% 0%, rgba(255, 79, 168, .10), transparent 75%);
}
#taskSheet .sheet__title {
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding-top: 7px;
}
#taskSheet .sheet__title > .ic {
  width: 22px;
  height: 22px;
  margin-top: 8px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff4fa8 0%, #9b6dff 58%, #57e6ef 150%);
  box-shadow: 0 0 20px rgba(255, 79, 168, .32), inset 0 1px 0 rgba(255,255,255,.42);
}
.task-title__copy { display: grid; min-width: 0; gap: 2px; }
.task-title__copy small {
  color: rgba(87, 230, 239, .80);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .16em;
  line-height: 1.1;
}
.task-title__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 79, 168, .18);
}
#taskSheet .sheet__title + .icon-btn {
  margin-top: 8px;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 0 18px rgba(255, 79, 168, .08);
}
#taskSheet .sheet__lead {
  position: relative;
  margin-top: 4px;
  padding: 11px 13px 11px 15px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-left: 2px solid rgba(87, 230, 239, .70);
  border-radius: 13px;
  color: #bdc5d7;
  background: linear-gradient(100deg, rgba(255, 79, 168, .075), rgba(87, 230, 239, .045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
#taskSheet .task-section-label,
#taskSheet .task-subsection-label {
  color: #f6b9d8;
  font-weight: 850;
  letter-spacing: .14em;
}
#taskSheet .task-section-label::before,
#taskSheet .task-subsection-label::before {
  content: '✦';
  color: var(--accent);
  font-size: 12px;
  text-shadow: 0 0 10px rgba(255, 61, 154, .8);
}
#taskSheet .task-section-label::after,
#taskSheet .task-subsection-label::after {
  background: linear-gradient(90deg, rgba(255, 79, 168, .36), rgba(87, 230, 239, .06));
}

/* Глянцевый слой у главной карточки настроек. */
#taskSheet .task-options--compact {
  position: relative;
  isolation: isolate;
  border-color: rgba(255, 105, 189, .38);
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), transparent 22%),
    radial-gradient(90% 45% at 0% 0%, rgba(255, 79, 168, .13), transparent 70%),
    radial-gradient(70% 44% at 100% 2%, rgba(87, 230, 239, .10), transparent 70%),
    linear-gradient(180deg, rgba(24, 20, 48, .92), rgba(10, 14, 27, .96));
  box-shadow: 0 18px 42px rgba(0,0,0,.25), 0 0 0 1px rgba(155, 109, 255, .10), inset 0 1px 0 rgba(255,255,255,.10);
}
#taskSheet .task-options--compact::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 13% auto 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #57e6ef 28%, #ff4fa8 70%, transparent);
  box-shadow: 0 0 15px rgba(255,79,168,.65);
}
#taskSheet .task-options--compact > .task-options__summary {
  border-bottom-color: rgba(255, 255, 255, .09);
  background: linear-gradient(90deg, rgba(255, 79, 168, .10), rgba(155, 109, 255, .06) 52%, rgba(87, 230, 239, .06));
}
#taskSheet .task-options--compact > .task-options__summary b {
  background: linear-gradient(90deg, #fff 15%, #ffb8da 65%, #aeeef1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#taskSheet .task-options--compact > .task-options__summary i { color: #57e6ef; text-shadow: 0 0 9px rgba(87,230,239,.65); }
#taskSheet .task-options--compact .task-subsection--mode {
  border-color: rgba(87, 230, 239, .22);
  background: linear-gradient(135deg, rgba(87,230,239,.07), rgba(255,79,168,.045) 65%, rgba(0,0,0,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 22px rgba(0,0,0,.12);
}
#taskSheet .task-options--compact .task-subsection--mode .segmented {
  border-color: rgba(255, 111, 190, .28);
  background: rgba(6, 10, 21, .82);
  box-shadow: inset 0 0 16px rgba(155,109,255,.10);
}
#taskSheet .task-options--compact .task-subsection--mode .seg.is-active {
  background: linear-gradient(115deg, #ff4fa8 0%, #b25cf2 58%, #656dff 100%);
  box-shadow: 0 0 18px rgba(255,79,168,.34), inset 0 1px 0 rgba(255,255,255,.26);
}
#taskSheet .task-options--compact .send-mode-note {
  border-left-color: #57e6ef;
  background: linear-gradient(90deg, rgba(87,230,239,.08), transparent);
  color: #b8d9dd;
}
#taskSheet .task-options--compact .task-subsection--common .field {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .11);
  background:
    linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.018) 44%, rgba(155,109,255,.045)),
    rgba(11, 16, 29, .54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 8px 18px rgba(0,0,0,.10);
}
#taskSheet .task-options--compact .task-subsection--common .field::before {
  content: '';
  position: absolute;
  top: 0;
  left: 13px;
  right: 13px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,79,168,.75), rgba(87,230,239,.18), transparent);
  opacity: .72;
}
#taskSheet .task-options--compact .task-subsection--common .field:hover {
  border-color: rgba(255, 105, 189, .48);
  box-shadow: 0 0 17px rgba(255,79,168,.10), inset 0 1px 0 rgba(255,255,255,.09);
}
#taskSheet .task-options--compact .task-subsection--common .field--check input:checked {
  background: linear-gradient(135deg, #ff4fa8, #9b6dff 75%);
  box-shadow: 0 0 14px rgba(255,79,168,.50);
}
#taskSheet .task-options--compact .task-subsection--common .field--check input:not(:checked) {
  border-color: rgba(87,230,239,.34);
}
#taskSheet .task-options--compact .task-subsection--other {
  border-top-color: rgba(87, 230, 239, .14);
}
#taskSheet .task-submitbar {
  border-top-color: rgba(255, 102, 188, .22);
  background: linear-gradient(180deg, rgba(9, 12, 23, .72), rgba(7, 9, 17, .99) 26%);
}
#taskSheet .task-submitbar .btn--primary {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(115deg, #ff4fa8 0%, #b35bf3 58%, #6674ff 100%);
  box-shadow: 0 0 24px rgba(255,79,168,.24), inset 0 1px 0 rgba(255,255,255,.30);
}
#taskSheet .task-submitbar .btn--primary::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -18%;
  width: 24%;
  height: 180%;
  transform: rotate(22deg);
  background: rgba(255,255,255,.25);
  filter: blur(4px);
  pointer-events: none;
}
#taskSheet .task-submitbar .btn--primary:hover {
  box-shadow: 0 0 32px rgba(255,79,168,.38), 0 8px 28px rgba(102,116,255,.20), inset 0 1px 0 rgba(255,255,255,.36);
}

/* Закрытый блок остаётся компактным, но сразу считывается как фирменная
   глянцевая панель — лишние поля не занимают экран до клика. */
#taskSheet .task-options--compact {
  position: relative;
  isolation: isolate;
  border-color: rgba(255, 105, 189, .38);
  background:
    radial-gradient(85% 70% at 0% 0%, rgba(255, 79, 168, .12), transparent 72%),
    radial-gradient(70% 60% at 100% 0%, rgba(87, 230, 239, .09), transparent 72%),
    linear-gradient(180deg, rgba(24, 20, 48, .92), rgba(10, 14, 27, .96));
  box-shadow: 0 14px 36px rgba(0,0,0,.22), 0 0 0 1px rgba(155,109,255,.10), inset 0 1px 0 rgba(255,255,255,.09);
}
#taskSheet .task-options--compact::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  left: 13%;
  right: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #57e6ef 28%, #ff4fa8 72%, transparent);
  box-shadow: 0 0 15px rgba(255,79,168,.60);
  pointer-events: none;
}
#taskSheet .task-options--compact > summary {
  position: relative;
  z-index: 1;
  min-height: 58px;
  border-bottom-color: rgba(255,255,255,.09);
  background: linear-gradient(90deg, rgba(255,79,168,.10), rgba(155,109,255,.06) 52%, rgba(87,230,239,.06));
}
#taskSheet .task-options--compact > summary b {
  background: linear-gradient(90deg, #fff 15%, #ffb8da 65%, #aeeef1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#taskSheet .task-options--compact > summary small { color: #b5bfd2; }
#taskSheet .task-options--compact > summary i { color: #57e6ef; text-shadow: 0 0 9px rgba(87,230,239,.65); }
#taskSheet .task-options--compact[open] > summary { background: linear-gradient(90deg, rgba(255,79,168,.15), rgba(155,109,255,.09) 52%, rgba(87,230,239,.08)); }
#taskSheet .task-options--compact .task-subsection--mode {
  border-color: rgba(87,230,239,.23);
  background: linear-gradient(135deg, rgba(87,230,239,.07), rgba(255,79,168,.045) 65%, rgba(0,0,0,.12));
}
#taskSheet .task-options--compact .task-subsection--common .field {
  border-color: rgba(255,255,255,.11);
  background: linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.018) 44%, rgba(155,109,255,.045)), rgba(11,16,29,.54);
}
#taskSheet .task-options--compact .task-subsection--common .field:hover { border-color: rgba(255,105,189,.48); box-shadow: 0 0 17px rgba(255,79,168,.10), inset 0 1px 0 rgba(255,255,255,.09); }
#taskSheet .task-options--compact .task-subsection--common .field--check input:checked { background: linear-gradient(135deg, #ff4fa8, #9b6dff 75%); box-shadow: 0 0 14px rgba(255,79,168,.50); }
#taskSheet .task-options--compact .task-subsection--common .field--check input:not(:checked) { border-color: rgba(87,230,239,.34); }

/* ═════════════════════ Фирменная форма ДОЧИ · королева и неоновый город ═════════════════════
   У формы есть настоящая визуальная опора бренда, а не абстрактные слова:
   корона, ночной город и розовый свет из фирменного баннера. */
#taskSheet .sheet__panel {
  background:
    linear-gradient(180deg, rgba(7, 3, 11, .10) 0%, rgba(8, 4, 13, .56) 22%, #100c18 34%, #090a11 100%),
    url("assets/docha-queen.jpg") 50% 0 / 100% 300px no-repeat,
    radial-gradient(80% 34% at 0% 0%, rgba(255, 37, 143, .20), transparent 72%),
    radial-gradient(75% 42% at 100% 12%, rgba(76, 141, 255, .10), transparent 72%),
    linear-gradient(180deg, #17091d 0%, #0b0b13 45%, #08090f 100%);
  border-top-color: rgba(255, 101, 179, .72);
  box-shadow: 0 -24px 74px rgba(255, 35, 144, .18), 0 -16px 45px rgba(0, 0, 0, .70);
}
#taskSheet .sheet__panel::after {
  opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.5) 25%, rgba(0,0,0,.08) 42%, transparent 72%);
}
#taskSheet .sheet__head {
  min-height: 60px;
  margin-bottom: 10px;
  padding-top: 20px;
  background: linear-gradient(180deg, rgba(10, 4, 14, .78) 0%, rgba(10, 4, 14, .24) 86%, transparent 100%);
  border-bottom: 0;
}
#taskSheet .sheet__head::after { content: none; }
#taskSheet .sheet__title { padding-top: 9px; }
#taskSheet .task-title__copy small { color: #fff2fb; font-size: 10px; letter-spacing: .18em; text-shadow: 0 0 12px rgba(255,81,166,.65); }
#taskSheet .task-title__copy strong { font-size: 17px; text-shadow: 0 3px 15px rgba(0,0,0,.62); }
#taskSheet .sheet__title > .ic { margin-top: 10px; background: linear-gradient(135deg, #ff4fa8, #b44fdb); box-shadow: 0 0 24px rgba(255,79,168,.48), inset 0 1px 0 rgba(255,255,255,.42); }
#taskSheet .sheet__lead {
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.13);
  border-left: 2px solid rgba(255,95,177,.76);
  background: linear-gradient(100deg, rgba(8,6,14,.64), rgba(30,10,31,.45));
  box-shadow: 0 10px 24px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.07);
  color: #eee3ed;
}
/* Режим теперь находится до обязательных полей — он считывается как главный
   выбор, а «Настройки отправки» остаются ниже закрываемым блоком. */
#taskSheet #taskFields > .task-subsection--mode {
  position: relative;
  margin: 3px 0 4px;
  padding: 13px;
  border: 1px solid rgba(255, 103, 180, .42);
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), transparent 30%),
    radial-gradient(80% 80% at 0% 0%, rgba(255, 48, 148, .16), transparent 75%),
    linear-gradient(180deg, rgba(27, 15, 35, .90), rgba(13, 12, 21, .86));
  box-shadow: 0 15px 36px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
#taskSheet #taskFields > .task-subsection--mode::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff63ae 35%, #66dfe3 70%, transparent);
  box-shadow: 0 0 14px rgba(255,76,166,.70);
}
#taskSheet #taskFields > .task-subsection--mode .task-subsection-label { color: #ffc0dc; }
#taskSheet #taskFields > .task-subsection--mode .task-subsection-fields { gap: 10px; }
#taskSheet #taskFields > .task-subsection--mode [data-field="send_mode"] .field__label { display: none; }
#taskSheet #taskFields > .task-subsection--mode [data-field="send_mode"] .segmented { min-height: 46px; padding: 4px; border-color: rgba(255,112,185,.36); background: rgba(5,6,12,.74); }
#taskSheet #taskFields > .task-subsection--mode [data-field="send_mode"] .seg { min-height: 36px; font-size: 12px; }
#taskSheet #taskFields > .task-subsection--mode [data-field="send_mode"] .seg.is-active { background: linear-gradient(115deg, #ff4fa8 0%, #b550dc 62%, #6578eb 100%); box-shadow: 0 0 20px rgba(255,76,166,.42), inset 0 1px 0 rgba(255,255,255,.26); }
#taskSheet #taskFields > .task-subsection--mode [data-field="send_mode"],
#taskSheet #taskFields > .task-subsection--mode [data-field="schedule_only"],
#taskSheet #taskFields > .task-subsection--mode [data-field="scheduled_posts"] { grid-column: 1 / -1; }
/* Основные поля — спокойные стеклянные строки поверх фирменного изображения. */
#taskSheet #taskFields > .task-section-label { margin-top: 7px; }
#taskSheet #taskFields > .field:not(.field--check) {
  border-color: rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 10px 12px;
  background: linear-gradient(100deg, rgba(22,13,28,.82), rgba(11,13,20,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 9px 22px rgba(0,0,0,.14);
}
#taskSheet #taskFields > .field:not(.field--check) .field__label::after { background: linear-gradient(90deg, rgba(255,91,174,.18), transparent); }
#taskSheet #taskFields > .field:not(.field--check) input,
#taskSheet #taskFields > .field:not(.field--check) textarea,
#taskSheet #taskFields > .field:not(.field--check) select { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.11); }
/* Закрытая карточка настроек — главный глянцевый акцент ниже основных полей. */
#taskSheet .task-options--compact {
  margin-top: 5px;
  border-color: rgba(255,100,179,.56);
  background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 28%), linear-gradient(180deg, rgba(33,16,42,.92), rgba(13,11,20,.96));
  box-shadow: 0 16px 36px rgba(0,0,0,.26), 0 0 0 1px rgba(181,76,215,.12), inset 0 1px 0 rgba(255,255,255,.10);
}
#taskSheet .task-options--compact > summary { min-height: 68px; padding: 12px 14px; background: linear-gradient(90deg, rgba(255,74,165,.12), rgba(93,109,220,.08)); }
#taskSheet .task-options--compact > summary b { font-size: 14px; background: linear-gradient(90deg, #fff, #ffb7d9 68%, #a9e9e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
#taskSheet .task-options--compact > summary small { color: #c5b5c6; }
#taskSheet .task-options--compact > summary i { color: #9ee9ea; text-shadow: 0 0 10px rgba(87,230,239,.6); }
#taskSheet .task-options--compact[open] > summary { background: linear-gradient(90deg, rgba(255,74,165,.18), rgba(93,109,220,.12)); }
#taskSheet .task-submitbar { border-top-color: rgba(255,98,179,.24); background: linear-gradient(180deg, rgba(8,8,14,.72), rgba(7,8,12,.99) 28%); }
#taskSheet .task-submitbar .btn--primary { background: linear-gradient(115deg, #ff4fa8 0%, #b34fdd 58%, #6078e9 100%); box-shadow: 0 0 26px rgba(255,77,166,.30), inset 0 1px 0 rgba(255,255,255,.30); }

/* Финальная связка бренда: главная и заставка используют тот же фирменный
   кадр королевы, что и утверждённая шторка задачи. Так ДОЧА узнаётся сразу,
   а не только внутри одной формы. */
.boot__bg { background-image: url("assets/docha-queen.jpg"); background-position: 50% 22%; }
.hero { --hero-image: url("assets/docha-queen.jpg"); }
.hero__art { background-position: 50% 22%; }

/* Возврат главного экрана к прежнему оформлению: фирменный кадр королевы
   оставляем только в утверждённой шторке задачи, а hero кабинета снова
   использует прежнее кадрирование и не спорит с навигацией. */
.boot__bg { background-image: url("assets/hero.webp"); background-position: 78% 30%; }
.hero { --hero-image: url("assets/hero.webp"); }
.hero__art { background-position: 78% 30%; }

/* ═════════════════════ Финальная проверка интерфейса · компактность ═════════════════════
   Один ритм для всех вкладок: короткая сводка сверху, действие рядом с объектом,
   подробности — только там, где они действительно нужны. */
.content { padding-top: 12px; }
.screen__title { font-size: 23px; letter-spacing: -.025em; }
.screen__sub { max-width: 650px; margin-bottom: 11px; line-height: 1.42; }
.section-label { margin-top: 16px; margin-bottom: 8px; font-size: 10px; }
.cards, .list { gap: 8px; }

/* Каталог команд: название и различие видны сразу, длинное описание не растит
   карточку до размера отдельной страницы. */
.card--cmd { min-height: 78px; padding: 10px 11px; gap: 10px; border-radius: 15px; }
.cmd__ico { width: 38px; height: 38px; border-radius: 11px; }
.cmd__title { font-size: 14px; }
.cmd__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.3; }
.cmd__foot { margin-top: 5px; gap: 4px 6px; }
.cmd__tag { padding: 2px 7px; font-size: 10px; }
.cmd__chevron { font-size: 18px; }
.create-cell__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.3; }

/* Карточка задачи: заголовок, состояние и прогресс читаются до кнопок. */
.task { padding: 11px 12px 10px; border-radius: 15px; }
.task__top { gap: 9px; }
.task__ico { width: 35px; height: 35px; border-radius: 10px; }
.task__title { font-size: 13.5px; }
.task__meta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.35; }
.task__actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 7px; margin-top: 9px; padding-top: 9px; }
.task__acts { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.task__actions .btn { min-height: 35px; padding: 7px 9px; font-size: 11px; border-radius: 10px; }
.task__actions > .btn--danger { min-width: 35px; padding: 7px; }
.task__alert { max-height: 68px; overflow: auto; }

/* Чаты и библиотека — строки, а не большие карточки. Смысл остаётся в заголовке,
   счётчике и одном действии справа. */
.chat { min-height: 55px; padding: 8px 10px; gap: 9px; border-radius: 13px; }
.chat__ico { width: 34px; height: 34px; }
.chat__title { font-size: 13.5px; }
.chat__sub { font-size: 11px; }
.chat__kind { padding: 3px 7px; font-size: 9.5px; }
.lib { padding: 9px 10px; gap: 9px; border-radius: 13px; }
.lib__title { font-size: 13px; }
.lib__text { -webkit-line-clamp: 1; }
.lib__acts { gap: 7px; }
.lib__del { width: 31px; height: 31px; display: grid; place-items: center; }

/* Нижние панели не должны перекрывать смысловые кнопки на узких экранах. */
.chat-bar { left: 8px; right: 8px; padding: 10px; gap: 7px; border-radius: 15px; }
.chat-bar__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chat-bar__btns .btn { min-height: 36px; padding: 7px 8px; font-size: 10.5px; }
.chat-bar__clear { margin-left: 0; }

/* Подписка и аккаунты: сначала состояние и главное действие, вспомогательные
   операции — ниже, одинаковыми компактными кнопками. */
.account { gap: 7px; padding: 10px 11px; }
.account__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; line-height: 1.3; }
.card--sub, .card--bonus { padding: 13px; }
.sub__actions { gap: 6px; margin-top: 10px; }
.sub__actions .btn, .bonus__actions .btn { min-height: 38px; padding: 8px 10px; font-size: 11.5px; }

/* На широком экране плотность не превращается в пустоту: две колонки только
   там, где карточки действительно независимы. На телефоне остаётся одна. */
@media (min-width: 760px) {
  .content { max-width: 820px; margin: 0 auto; }
  #tab-commands .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-accounts .list, #tab-library .list { gap: 9px; }
  #tab-home .tiles { gap: 10px; }
}
@media (max-width: 390px) {
  .screen__title { font-size: 22px; }
  .cmd__tag:nth-of-type(n+3) { display: none; }
  .badge { padding-left: 7px; padding-right: 7px; font-size: 9.5px; }
  .task__actions { grid-template-columns: minmax(0, 1fr) 35px; }
  .chat-bar__btns .btn { font-size: 10px; }
}
/* Long launch summaries stay readable on a phone. */
.confirm__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm__panel { max-height: 90dvh; overflow-y: auto; }

/* Новый мастер использует те же поля и тот же снимок задачи, что обычная форма. */
#taskFields .is-guided-hidden { display: none !important; }
#taskFields.is-guided > .task-section-label { display: none; }
.mailing-guide { margin: 8px 0 18px; }
.mailing-guide__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.mailing-guide__steps li { min-width: 0; color: var(--muted); text-align: center; font-size: 11px; }
.mailing-guide__steps li > span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1.5px solid var(--line-hi); border-radius: 50%; margin: 0 auto 6px; font-size: 13px; font-weight: 700; transition: all 0.2s ease; }
.mailing-guide__steps small { display: block; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.mailing-guide__steps .is-current { color: var(--text); }
.mailing-guide__steps .is-current > span { background: var(--accent-grad); border-color: transparent; box-shadow: var(--glow-soft); transform: scale(1.08); color: #fff; }
.mailing-guide__steps .is-done > span { color: var(--green); border-color: var(--green); background: rgba(34, 197, 94, 0.12); }
.mailing-guide__heading { font-size: 18px; font-weight: 750; }
.mailing-guide__heading:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
.mailing-guide__note { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tempo-advanced-details { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 14px; }
.tempo-advanced-details summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); user-select: none; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.tempo-advanced-details summary::-webkit-details-marker { display: none; }
.tempo-advanced-details summary::after { content: '⌄'; font-size: 14px; transition: transform 0.2s; }
.tempo-advanced-details[open] summary::after { transform: rotate(180deg); }
.delivery-review { min-width: 0; padding: 5px 0; overflow-wrap: anywhere; }
#confirmPreview { padding: 0 20px 12px; }
.delivery-review__summary { display: grid; gap: 6px; margin-bottom: 14px; }
.delivery-review__summary b { font-size: 16px; }
.delivery-review__summary span, .delivery-review__summary small, .delivery-review__summary p { color: var(--muted); font-size: 12px; margin: 0; }
.delivery-post { margin: 12px 0; padding: 14px; border: 1px solid var(--line-hi); border-radius: 16px; background: linear-gradient(140deg, #27122f, #160b21); }
.delivery-post__label { color: var(--muted); font-size: 10px; margin-bottom: 9px; }
.delivery-post__via { font-size: 11px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.delivery-post__via .via-label { opacity: 0.85; }
.delivery-post__via a { color: #ffadd1; text-decoration: none; font-weight: 500; }
.delivery-post__via a:hover { text-decoration: underline; }
.delivery-post__text { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.delivery-post__media { display: block; width: 100%; max-height: 310px; object-fit: contain; border-radius: 10px; margin-bottom: 10px; background: #0a0510; }
.delivery-post__media-note { padding: 20px; text-align: center; background: var(--glass); border-radius: 10px; color: var(--muted); margin-bottom: 10px; }
.delivery-post__buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.delivery-post__buttons a, .delivery-post__buttons span { flex: 1; text-align: center; min-width: 0; padding: 10px 8px; color: var(--text); background: var(--accent-soft); border: 1px solid var(--line-hi); border-radius: 9px; font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.delivery-post__buttons a:focus-visible, .delivery-post__source:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.delivery-post__source { display: inline-block; margin-top: 10px; color: #ffadd1; font-size: 12px; }
.delivery-post__notice, .delivery-review__safe, .delivery-notes { color: var(--muted); font-size: 12px; line-height: 1.5; }
.delivery-review__safe { border-top: 1px solid var(--line); padding-top: 12px; }
.delivery-checks, .delivery-notes { padding-left: 18px; margin: 12px 0; }
.delivery-checks { list-style: none; padding: 0; }
.delivery-check { display: flex; gap: 9px; margin: 9px 0; font-size: 12px; }
.delivery-check > span { color: var(--green); }
.delivery-check.is-warning > span { color: var(--orange); }
.delivery-check small { display: block; margin-top: 3px; color: var(--muted); }
.delivery-recipients { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.delivery-recipients ul { padding-left: 17px; max-height: 180px; overflow-y: auto; }
.delivery-recipients summary { cursor: pointer; }
.delivery-spam-card { margin: 12px 0 16px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-hi); font-size: 13px; line-height: 1.45; }
.delivery-spam-card.is-warning { border-color: rgba(251, 191, 36, 0.5); background: linear-gradient(140deg, rgba(251, 191, 36, 0.12), rgba(255, 61, 154, 0.06)); }
.delivery-spam-card.is-safe { border-color: rgba(52, 211, 153, 0.45); background: linear-gradient(140deg, rgba(52, 211, 153, 0.12), rgba(21, 10, 30, 0.8)); }
.delivery-spam-card__header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.delivery-spam-card__header b { font-size: 14px; }
.delivery-spam-card__badge { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--card-hi); color: var(--orange); border: 1px solid rgba(251, 191, 36, 0.3); }
.delivery-spam-card.is-safe .delivery-spam-card__badge { color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.delivery-spam-card__text { margin: 0 0 10px; color: var(--text); font-size: 12px; }
.delivery-spam-card__action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.delivery-spam-card__rec { margin: 0; font-size: 12px; color: var(--orange); font-weight: 500; }
.delivery-spam-card__safe-note { margin: 0; font-size: 12px; color: var(--green); }
.btn--safe-on { border-color: rgba(52, 211, 153, 0.5) !important; color: var(--green) !important; }
.overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.overview-head > div { min-width: 0; }
.overview-head .btn { flex-shrink: 0; margin-top: 7px; }
.overview-stamp { font-size: 11px; color: var(--muted); margin: 5px 0 16px; }
.overview-section { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 15px; margin-bottom: 14px; min-width: 0; }
.overview-section h2 { margin: 0 0 13px; font-size: 16px; }
.overview-section h3 { margin: 19px 0 11px; font-size: 13px; }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.overview-metric { background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; min-width: 0; }
.overview-metric b { display: block; font-size: 22px; }
.overview-metric span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.overview-metric--warning b { color: var(--orange); }
.overview-list { list-style: none; padding: 0; margin: 13px 0 0; }
.overview-row { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); }
.overview-row > div { min-width: 0; }
.overview-row b { font-size: 13px; overflow-wrap: anywhere; }
.overview-row small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.overview-row p { margin: 7px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.overview-tag { flex-shrink: 0; align-self: flex-start; color: #ffadd1; font-size: 11px; padding: 4px 7px; border-radius: 7px; background: var(--accent-soft); }
.overview-caption, .overview-empty { color: var(--muted); font-size: 11px; margin: 10px 0 0; line-height: 1.5; }
.overview-money { color: var(--green); font-size: 17px; font-weight: 700; margin: 12px 0; overflow-wrap: anywhere; }
@media (min-width: 700px) { .overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Account setup and join progress */
.account__tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.warmup__birthday { display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:8px; }
.warmup__birthday input { width:100%; min-width:0; }
#warmupForm[hidden] { display:none; }
#warmupForm fieldset { border:0; padding:0; margin:0; min-width:0; }
#warmupStatus { white-space:pre-wrap; }
.queue__report { padding:12px; font-size:13px; overflow-wrap:anywhere; }
.queue__report details { max-height:260px; overflow:auto; }
.queue__report p { margin:6px 0; }
.queue__head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.queue__count { color:var(--muted); font-size:12px; }
.queue__bar { height:6px; border-radius:999px; background:var(--bg-soft); overflow:hidden; margin:0 0 8px; }
.queue__bar-fill { height:100%; background:var(--accent); border-radius:999px; transition:width .35s ease; }
.queue__next { color:var(--muted); }

#warmupForm[hidden], #warmupPreview[hidden], #warmupLaunchActions[hidden] { display:none; }
#warmupForm fieldset { border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:12px; margin:0; min-width:0; }
#warmupForm legend { font-weight:600; padding:0 6px; }
.warmup__row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.warmup__row input { min-width:0; width:100%; }
.warmup__check { display:flex; align-items:center; gap:10px; padding:10px 0; font-size:14px; }
.warmup__check input { width:20px; height:20px; flex-shrink:0; }
.warmup__preset { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); margin:10px 0; }
.warmup__preset img { width:64px; height:64px; object-fit:cover; border-radius:50%; }
.warmup__twofa { padding:10px 12px; border:1px solid rgba(255,200,80,.35); border-radius:10px; background:rgba(255,200,80,.08); }
.warmup__materials img { width:120px; border-radius:12px; margin:12px 0; }
.warmup__materials p { font-size:13px; }
.warmup__timeline { padding-left:24px; font-size:13px; }
.warmup__timeline li { margin:12px 0; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,.08); overflow-wrap:anywhere; }
.warmup__timeline p { margin:4px 0; color:var(--muted); }
#warmupPreview details { margin:14px 0; }
.warmup-journal { margin-bottom:18px; }
.warmup-journal > summary { margin:14px 0; font-weight:700; cursor:pointer; }
.journal__heading { margin:4px 0 10px; }
#warmupLaunchActions { display:grid; gap:8px; padding-top:12px; }

/* Task tools share the existing cards, type scale and brand accents. */
.task-tools {display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:16px 0;}
.task-tools label:first-child {flex:1;min-width:150px;font-size:12px;}
.task-tools select,.product-field select,.product-field input {display:block;width:100%;box-sizing:border-box;background:var(--card);color:var(--text,#fff);border:1px solid var(--line,rgba(255,255,255,.14));border-radius:12px;padding:12px;margin-top:6px;font:inherit;}
.tool-check {display:flex;gap:8px;align-items:center;font-size:13px;line-height:1.5;cursor:pointer;}
.tool-check input {width:18px;height:18px;accent-color:#ff92cd;flex:none;}
.task-select-all {margin:14px 0;}
.task-batch-select {margin:0 0 10px;}
.task-account-group {margin:20px 0 10px;font-size:14px;color:var(--muted,#bcb0c9);}
.product-form,.plan-card {padding:18px;margin:18px 0;}
.product-field {display:block;font-size:13px;margin:12px 0;}
.product-muted,.plan-card p {font-size:13px;line-height:1.6;color:var(--muted,#bcb0c9);}
.plan-card b {font-size:17px;}
.calendar-day {margin:22px 0 10px;font-size:15px;}
.calendar-event {padding:16px;margin:10px 0;border-radius:16px;background:var(--card);border:1px solid var(--line,rgba(255,255,255,.14));}
.calendar-event.is-conflict {border-color:#ddad5c;}
.calendar-event time {font-size:18px;font-weight:650;display:block;margin-bottom:8px;}
.calendar-event p {margin:6px 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
.calendar-warning {color:#efc174;}
.template-saved {padding:18px;}
.template-saved__actions {display:flex;gap:10px;margin-top:14px;flex-wrap:wrap;}
.product-field select:focus-visible,.product-field input:focus-visible,.task-tools select:focus-visible {outline:2px solid #ff92cd;outline-offset:3px;}
@media(max-width:430px) {.task-tools {gap:10px}.task-tools label:first-child {flex-basis:100%}}

.template-saved,.task-batch-select {overflow-wrap:anywhere;}

/* ═════════════════════ Мультиакк, автовход и ТЕМП (Multi-account) ═════════════════════ */

.field--account-pool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-pool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.account-pool-card:hover {
  border-color: rgba(255, 61, 154, 0.45);
  background: linear-gradient(135deg, rgba(255, 61, 154, 0.08), rgba(168, 85, 247, 0.06));
  box-shadow: 0 4px 18px rgba(255, 61, 154, 0.15);
}

.account-pool-card__avatars {
  display: flex;
  align-items: center;
}

.account-badge-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #140d1e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.account-pool-card__avatars .account-badge-circle:not(:first-child) {
  margin-left: -10px;
}

.account-badge-circle--extra {
  font-size: 10px;
  background: #2d1840;
  color: #e2d9eb;
  border-color: #140d1e;
}

.account-pool-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.account-pool-card__info b {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.account-pool-card__info span {
  font-size: 12px;
  color: var(--muted);
}

.account-pool-card__arrow {
  font-size: 18px;
  color: var(--muted);
  opacity: 0.7;
}

.account-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.account-picker-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.account-picker-row.is-selected {
  background: linear-gradient(135deg, rgba(255, 61, 154, 0.12), rgba(168, 85, 247, 0.08));
  border-color: rgba(255, 61, 154, 0.45);
}

.targets-distribution-note {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: #c5f2f9;
  font-size: 12.5px;
  line-height: 1.45;
}

.task-subsection--tempo {
  position: relative;
  margin: 12px 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(76, 141, 255, 0.35);
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(76, 141, 255, 0.12), transparent 75%),
    linear-gradient(180deg, rgba(16, 20, 36, 0.92), rgba(10, 12, 22, 0.88));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.task-subsection--tempo .task-subsection-label {
  color: #93c5fd;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.tempo-capacity-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tempo-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #7dd3fc;
}

.tempo-card__header .ic {
  width: 14px;
  height: 14px;
  color: #38bdf8;
}

.tempo-card__stat {
  font-size: 13.5px;
  color: #e2e8f0;
  margin-top: 2px;
}

.tempo-card__rate {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #38bdf8;
}

.tempo-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.tempo-badge--high {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.tempo-card__tip {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}



/* ═══════════════════ ПРЕМИАЛЬНЫЙ КАТАЛОГ ЧАТОВ (50 000+) ═══════════════════ */

/* Баннер на Главной */
.catalog-hero-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg, 20px);
  background:
    radial-gradient(130% 90% at 90% 10%, rgba(255, 61, 154, 0.22), transparent 70%),
    radial-gradient(100% 70% at 10% 90%, rgba(168, 85, 247, 0.18), transparent 60%),
    linear-gradient(145deg, rgba(32, 14, 46, 0.85) 0%, rgba(16, 8, 26, 0.92) 100%);
  border: 1px solid rgba(255, 110, 185, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.catalog-hero-card:active {
  transform: scale(0.985);
  border-color: rgba(255, 61, 154, 0.6);
  box-shadow: 0 4px 18px rgba(255, 61, 154, 0.35);
}

.catalog-hero-card__glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 61, 154, 0.4), transparent 70%);
  pointer-events: none;
}

.catalog-hero-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.catalog-hero-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff9ecf;
  background: rgba(255, 61, 154, 0.16);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 61, 154, 0.35);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-dot 1.8s infinite;
  display: inline-block;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.catalog-hero-card__count {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 9px;
  border-radius: 12px;
}

.catalog-hero-card__title {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 4px;
}

.catalog-hero-card__sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted, #b9a0c9);
  margin-bottom: 12px;
}

.catalog-hero-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cat-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1e6f5;
  transition: all 0.15s ease;
}

.cat-pill:hover, .cat-pill:active {
  background: rgba(255, 61, 154, 0.22);
  border-color: rgba(255, 61, 154, 0.5);
  color: #fff;
}

.catalog-hero-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.catalog-hero-card__btn {
  font-size: 12.5px;
  font-weight: 700;
  color: #ff68b5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Бейдж на вкладке Каталог в навигации */
.nav__badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 24px);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 61, 154, 0.6);
  line-height: 1.2;
}

.nav__item {
  position: relative;
}

/* Сегментный переключатель Мои чаты ⇄ Каталог */
.segmented--catalog {
  background: rgba(18, 10, 28, 0.95);
  border: 1px solid rgba(255, 110, 185, 0.28);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
  padding: 4px;
  border-radius: 14px;
}

.segmented--catalog .seg {
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 11px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.segmented--catalog .seg.is-active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 61, 154, 0.35);
}

/* Панель быстрого действия над списком (Toolbar) */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
  padding: 0 2px;
}

.catalog-toolbar__info {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #b9a0c9);
}

.btn--glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f3e8f8;
  border-radius: 10px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  min-height: 32px;
}

.btn--glass:hover, .btn--glass:active {
  background: rgba(255, 61, 154, 0.18);
  border-color: rgba(255, 61, 154, 0.4);
  color: #fff;
}

/* Карточка чата в каталоге */
.chat--catalog {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(22, 12, 34, 0.78);
  border: 1px solid rgba(255, 130, 205, 0.14);
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}

.chat--catalog:hover {
  background: rgba(29, 16, 44, 0.92);
  border-color: rgba(255, 130, 205, 0.28);
}

.chat--catalog.is-selected {
  background: rgba(255, 61, 154, 0.12);
  border-color: rgba(255, 61, 154, 0.55);
  box-shadow: 0 0 18px rgba(255, 61, 154, 0.2), inset 0 0 12px rgba(255, 61, 154, 0.08);
}

.chat__avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-ico--work { background: rgba(59, 130, 246, 0.18); border-color: rgba(59, 130, 246, 0.35); }
.chat-ico--pr { background: rgba(168, 85, 247, 0.18); border-color: rgba(168, 85, 247, 0.35); }
.chat-ico--crypto { background: rgba(34, 211, 238, 0.18); border-color: rgba(34, 211, 238, 0.35); }
.chat-ico--market { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.35); }
.chat-ico--games { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.35); }
.chat-ico--dating { background: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.35); }

.chat__top-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.chat__title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat__fire-badge {
  font-size: 10px;
  font-weight: 800;
  color: #f97316;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 1px 5px;
  border-radius: 6px;
  flex-shrink: 0;
}

.chat__verified-badge {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 5px;
  border-radius: 6px;
  flex-shrink: 0;
}

.chat__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.chat__uname {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.chat__members-pill {
  color: #d1d5db;
  font-size: 11.5px;
  font-weight: 600;
}

.chat__desc {
  font-size: 11.5px;
  color: var(--muted, #b9a0c9);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.chat__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.chat__cat-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.chat__check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  transition: all 0.18s ease;
}

.chat--catalog.is-selected .chat__check-circle {
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(255, 61, 154, 0.7);
}

/* ── Быстрый фильтр аудитории по размеру ── */
.chips--size {
  display: flex;
  gap: 6px;
}
.chips--size .chip {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.chips--size .chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.chips--size .chip.is-active {
  background: linear-gradient(135deg, rgba(255, 45, 133, 0.28), rgba(139, 92, 246, 0.28));
  border-color: rgba(255, 45, 133, 0.65);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 45, 133, 0.25);
}

/* ── Главная кнопка быстрого запуска в плавающей панели ── */
.chat-bar__main-btn {
  grid-column: 1 / -1;
  min-height: 42px;
  font-weight: 750;
  font-size: 13.5px;
  background: linear-gradient(135deg, #FF2D85, #8B5CF6) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(255, 45, 133, 0.45);
  letter-spacing: 0.2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-bar__main-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 45, 133, 0.65);
}
.chat-bar__main-btn:active {
  transform: scale(0.98);
}

/* ── Карточки сохраненных подборок (Мои подборки) ── */
.preset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  gap: 12px;
}
.preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 45, 133, 0.35);
  transform: translateY(-1px);
}
.preset-card__info {
  flex: 1;
  min-width: 0;
}
.preset-card__title {
  font-weight: 750;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.preset-card__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 45, 133, 0.2);
  color: #ff85be;
  border: 1px solid rgba(255, 45, 133, 0.35);
}
.preset-card__meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Тулбар действий каталога ── */
.catalog-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Live Auto-Join Tracker ── */
.auto-join-tracker {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(255, 61, 154, 0.08));
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

.auto-join-tracker__current {
  font-size: 12.5px;
  color: #38bdf8;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-join-tracker__done {
  font-size: 12.5px;
  color: #4ade80;
  margin-top: 6px;
}

/* ── Кнопка блокировки / исключения чата ── */
.chat__block-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}

.chat__block-btn:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.18);
  transform: scale(1.1);
}

.chat--blacklisted {
  opacity: 0.5;
  filter: grayscale(0.8);
  border-style: dashed;
}

/* ── Стили: Прокси, Автоответчик, Spintax ── */

.btn--proxy-set {
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
}

.btn--ar-on {
  border-color: rgba(236, 72, 153, 0.4) !important;
  color: #ec4899 !important;
  background: rgba(236, 72, 153, 0.08) !important;
}

/* iOS Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #ec4899, #d946ef);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Proxy Ping Result Badge */
.proxy-ping-badge {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.proxy-ping-badge--ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.proxy-ping-badge--err {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

/* Spintax Preview Styles */
.spintax-live-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.spintax-samples-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.spintax-sample-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-word;
}

/* ── Кнопка прямого перехода в чат Telegram ── */
.chat__open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
  line-height: 1.2;
}

.chat__open-btn:hover {
  background: rgba(56, 189, 248, 0.26);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.chat__open-btn:active {
  transform: scale(0.96);
}

/* ── Пресеты скорости (ТЕМП) ── */
.tempo-presets {
  margin-bottom: 12px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.tempo-presets__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tempo-presets__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.tempo-presets__hint {
  font-size: 11px;
  color: var(--accent);
}

.tempo-presets__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tempo-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  color: var(--text);
  min-height: 60px;
}

.tempo-preset-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.tempo-preset-btn.is-active {
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.tempo-preset-btn__icon {
  font-size: 16px;
  margin-bottom: 2px;
  line-height: 1;
}

.tempo-preset-btn__title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.tempo-preset-btn__sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* ── Предпросмотр чатов внутри карточки подборки ── */
.preset-card__details {
  margin-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.preset-card__details-summary {
  font-size: 11.5px;
  color: #38bdf8;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  padding: 2px 0;
}

.preset-card__details-summary:hover {
  text-decoration: underline;
}

.preset-card__chat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.preset-card__chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
}

.preset-card__chat-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f1f5f9;
  flex: 1;
}

/* ═══════════════════ ОРАКУЛ ОГРАНИЧЕНИЙ (ORACLE & RISK) ═══════════════════ */

.oracle-banner-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 14px;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg, 20px);
  background:
    radial-gradient(130% 90% at 90% 10%, rgba(139, 92, 246, 0.28), transparent 70%),
    radial-gradient(100% 70% at 10% 90%, rgba(59, 130, 246, 0.18), transparent 60%),
    linear-gradient(145deg, rgba(28, 16, 48, 0.88) 0%, rgba(15, 10, 30, 0.94) 100%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.oracle-banner-card:active {
  transform: scale(0.985);
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}

.oracle-banner-card__glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.oracle-banner-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.oracle-banner-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.oracle-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 8px #a78bfa;
  animation: oraclePulse 1.8s infinite;
}

@keyframes oraclePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.oracle-banner-card__badge-risk {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.oracle-banner-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  margin-bottom: 4px;
}

.oracle-banner-card__sub {
  font-size: 12px;
  line-height: 1.4;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.oracle-banner-card__meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.oracle-meter-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.oracle-meter-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  transition: width 0.4s ease, background 0.4s ease;
}

.oracle-meter-pct {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  min-width: 34px;
  text-align: right;
}

.oracle-banner-card__footer {
  display: flex;
  justify-content: flex-end;
}

.oracle-banner-card__btn {
  font-size: 12px;
  font-weight: 700;
  color: #c4b5fd;
  text-decoration: none;
}

/* ═══════════════════ ИИ + ДОЧА (MCP & API) ═══════════════════ */

.mcp-banner-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg, 20px);
  background:
    radial-gradient(120% 90% at 90% 10%, rgba(14, 165, 233, 0.25), transparent 70%),
    radial-gradient(100% 70% at 10% 90%, rgba(99, 102, 241, 0.18), transparent 60%),
    linear-gradient(145deg, rgba(14, 25, 48, 0.88) 0%, rgba(8, 14, 30, 0.94) 100%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mcp-banner-card:active {
  transform: scale(0.985);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
}

.mcp-banner-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mcp-banner-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.mcp-banner-card__chips {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.mcp-banner-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  margin-bottom: 4px;
}

.mcp-banner-card__sub {
  font-size: 12px;
  line-height: 1.4;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.mcp-banner-card__footer {
  display: flex;
  justify-content: flex-end;
}

.mcp-banner-card__btn {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}

/* ═══════════════════ ШТОРКА ОРАКУЛА ═══════════════════ */

.oracle-sheet-hero {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 14px;
}

.oracle-sheet-risk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.oracle-sheet-risk-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.oracle-sheet-risk-score {
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
}

.oracle-sheet-bar-wrap {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.oracle-sheet-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  transition: width 0.4s ease;
}

.oracle-sheet-risk-note {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.oracle-fix-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-bottom: 8px;
}

.oracle-fix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.oracle-fix-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.oracle-fromto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.oracle-fromto s {
  color: #ef4444;
  opacity: 0.85;
}

.oracle-fromto b {
  color: #10b981;
}

.oracle-fix-why {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.oracle-fix-action {
  font-size: 12px;
  font-weight: 600;
  color: #a78bfa;
}

/* ═══════════════════ ШТОРКА MCP ═══════════════════ */

.mcp-sheet-lead {
  font-size: 13px;
  line-height: 1.45;
  color: #94a3b8;
  margin-bottom: 14px;
}

.mcp-permissions-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 14px;
}

.mcp-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.mcp-perm-row:last-child {
  border-bottom: none;
}

.mcp-perm-info strong {
  display: block;
  font-size: 13px;
  color: #f8fafc;
}

.mcp-perm-info small {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.toggle-cb {
  width: 18px;
  height: 18px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.mcp-key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 12px;
}

.mcp-key-name {
  font-weight: 700;
  color: #f1f5f9;
}

.mcp-key-meta {
  color: #64748b;
  font-size: 11px;
}


/* ═══ WAVE 2: QUICK CONTROLS, SWITCHES & OWNER TICKETS ═══ */
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-acc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f5fb;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.header-acc-pill:active {
  transform: scale(0.96);
}
.header-acc-pill.is-active {
  border-color: rgba(255, 79, 168, 0.65);
  background: linear-gradient(135deg, rgba(255, 79, 168, 0.22), rgba(155, 109, 255, 0.22));
  box-shadow: 0 0 14px rgba(255, 79, 168, 0.24);
}
.header-acc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}
.header-acc-dot--on {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}
.header-acc-dot--warn {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.75);
}

.home-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.home-quick-bar[hidden] {
  display: none !important;
}
.home-quick-bar .btn {
  flex: 1 1 auto;
  justify-content: center;
  font-weight: 600;
}

.task__top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.task-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 3px 9px 3px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  user-select: none;
}
.task-switch:active {
  transform: scale(0.95);
}
.task-switch__thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}
.task-switch.is-on {
  flex-direction: row-reverse;
  padding: 3px 5px 3px 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(34, 197, 94, 0.36));
  border-color: rgba(34, 197, 94, 0.62);
  color: #dcfce7;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.22);
}
.task-switch.is-on .task-switch__thumb {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.85);
}
.task-switch.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.task-acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.task-acc-chip:hover,
.task-acc-chip:active {
  border-color: rgba(87, 230, 239, 0.55);
  background: rgba(87, 230, 239, 0.12);
  color: #f8fafc;
}

.btn--power-pause {
  border-color: rgba(245, 158, 11, 0.42) !important;
  background: rgba(245, 158, 11, 0.13) !important;
  color: #fde68a !important;
}
.btn--power-resume {
  border-color: rgba(34, 197, 94, 0.48) !important;
  background: rgba(34, 197, 94, 0.16) !important;
  color: #bbf7d0 !important;
}
.btn--toggle-off {
  opacity: 0.78;
}

.acc-switch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.acc-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.acc-switch-item.is-current {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.11);
}
.acc-switch-item__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}
.acc-switch-item__badge {
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  flex-shrink: 0;
}

.owner-tickets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  margin-bottom: 10px;
}
.ticket-card--open {
  border-color: rgba(255, 79, 168, 0.38);
}
.ticket-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.ticket-card__head small {
  color: #94a3b8;
  font-size: 11.5px;
}
.ticket-card__msg {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ticket-card__reply-prev {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid #22c55e;
  font-size: 12.5px;
  color: #d1fae5;
  white-space: pre-wrap;
}
.ticket-reply-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  font: inherit;
  font-size: 13px;
  resize: vertical;
  margin-bottom: 8px;
}
.ticket-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* ═══════════════════ Wave 3: Фикс горизонтального среза шторок, понятный вход и форма рассылки ═══════════════════ */

/* ВАЖНО: не ставим overflow-x: hidden на html, body — по спецификации CSS это
   превращает body в scroll-контейнер (overflow-y: auto) высотой в документ и
   блокирует прокрутку колёсиком/тачпадом в веб-версии Telegram (WebA/WebK). */
.sheet {
  overflow: hidden;
}

.sheet__panel {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .sheet:not(#taskSheet) .sheet__head {
    top: -16px;
    margin: -16px -14px 12px;
    padding: 14px 14px 11px;
  }
}

.sheet__title, .sheet__lead, .field > span, .field__label, .field__note {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Переключатель способа входа: Номер vs QR-код */
.login-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.login-method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.login-method:hover {
  border-color: rgba(255, 79, 168, 0.4);
  background: rgba(255, 79, 168, 0.07);
}

.login-method.is-active {
  border-color: rgba(255, 79, 168, 0.75);
  background: linear-gradient(135deg, rgba(255, 61, 154, 0.18), rgba(168, 85, 247, 0.14));
  box-shadow: 0 4px 16px rgba(255, 61, 154, 0.18);
}

.login-method__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.login-method__sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

/* Живой индикатор прогресса подключения к Telegram */
.login-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 79, 168, 0.35);
  background: rgba(255, 61, 154, 0.09);
  color: #f8fafc;
  font-size: 12.5px;
  line-height: 1.4;
}

.login-progress__spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ff6bb5;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

/* Кнопка с читаемой подписью во время загрузки (вместо немого пустого кружка) */
.btn.is-loading.is-loading--labeled {
  color: transparent !important;
}

.btn.is-loading.is-loading--labeled::before {
  content: attr(data-loading-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 24px;
  color: #ffffff;
  font-weight: 650;
  font-size: 14px;
  pointer-events: none;
}

.btn.is-loading.is-loading--labeled::after {
  position: relative;
  inset: auto;
  display: none;
}

.btn.is-loading.is-loading--labeled {
  position: relative;
}

.btn.is-loading.is-loading--labeled::after {
  display: block;
  position: absolute;
  top: 50%;
  left: calc(50% - 86px);
  margin: -7.5px 0 0 0;
}

/* Наглядные карточки выбора режима: Рассылка по очереди vs Постинг по расписанию */
.send-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

@media (max-width: 400px) {
  .send-mode-cards {
    grid-template-columns: 1fr;
  }
}

.send-mode-cards .seg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 11px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  text-align: left !important;
  white-space: normal !important;
  height: auto !important;
  min-height: 64px;
  transition: all 0.18s ease;
}

.send-mode-cards .seg:hover {
  border-color: rgba(255, 79, 168, 0.42) !important;
  background: rgba(255, 79, 168, 0.06) !important;
}

.send-mode-cards .seg.is-active {
  border-color: rgba(255, 79, 168, 0.85) !important;
  background: linear-gradient(135deg, rgba(255, 61, 154, 0.2), rgba(168, 85, 247, 0.15)) !important;
  box-shadow: 0 4px 16px rgba(255, 61, 154, 0.18) !important;
  color: #ffffff !important;
}

.send-mode-card__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.send-mode-card__desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
}

.send-mode-cards .seg.is-active .send-mode-card__desc {
  color: rgba(255, 255, 255, 0.82);
}

/* Аккуратные сворачиваемые блоки для ссылок авто-вступления и кнопок под постом */
.task-inline-details {
  border-radius: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.025);
  padding: 10px 12px;
}

.task-inline-details[open] {
  border-style: solid;
  border-color: rgba(255, 79, 168, 0.35);
  background: rgba(255, 61, 154, 0.045);
}

.task-inline-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  user-select: none;
}

.task-inline-details > summary::-webkit-details-marker {
  display: none;
}

.task-inline-details > summary small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.task-inline-details__body {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.task-inline-details.is-guided-hidden {
  display: none !important;
}


/* ── Wave 5: Главные функции, умный помощник шага и панель каталога ── */
.home-next-step {
  margin: 12px 0 14px;
  padding: 14px 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 61, 154, 0.18), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(255, 61, 154, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}
.home-next-step__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ff85c0;
  margin-bottom: 6px;
}
.home-next-step__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}
.home-next-step__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
  margin-bottom: 11px;
}
.home-next-step__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-next-step__actions .btn {
  flex: 1 1 140px;
  justify-content: center;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.core-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 13px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
  min-width: 0;
}
.core-card:active {
  transform: scale(0.98);
}
.core-card--primary {
  background: linear-gradient(145deg, rgba(255, 61, 154, 0.22), rgba(124, 58, 237, 0.16));
  border-color: rgba(255, 61, 154, 0.42);
}
.core-card--catalog {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(14, 116, 144, 0.15));
  border-color: rgba(52, 211, 153, 0.36);
}
.core-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
  margin-bottom: 8px;
}
.core-card__emoji {
  font-size: 22px;
  line-height: 1;
}
.core-card__badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.core-card__badge--hit {
  background: linear-gradient(90deg, #ff3d9a, #a855f7);
  color: #fff;
}
.core-card__badge--soft {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.core-card__title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 5px;
}
.core-card__desc {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.catalog-hero-card--compact {
  padding: 12px 14px !important;
  margin-bottom: 10px !important;
}
.catalog-hero-card--compact .catalog-hero-card__top {
  margin-bottom: 8px;
}

.core-quick-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.core-pill {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.core-pill:active {
  transform: scale(0.98);
}

.create-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  margin: 4px 0 8px;
}
.create-more {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}
.create-more > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 2px;
  list-style: none;
}
.create-more__grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.chat-bar__free-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 179, 64, 0.14);
  border: 1px solid rgba(255, 179, 64, 0.34);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.free-limit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 8px;
}


/* ── Wave 6: 1-Click Niche Packs, Delivery Badges, Prime-Time & Bio Sheet ── */
.preset-packs-card {
  margin: 0 0 12px;
  padding: 12px 13px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.11), rgba(20, 22, 34, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.preset-packs-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.preset-packs-card__badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6ee7b7;
}
.preset-packs-card__sub {
  font-size: 11px;
  color: var(--muted, #9ca3af);
}
.preset-packs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.preset-pack-btn {
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg, #f5f7ff);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.preset-pack-btn:active {
  transform: scale(0.98);
}
.preset-pack-btn:hover {
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(16, 185, 129, 0.14);
}
.chat__delivery-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.prime-time-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.bio-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
}


/* ═══ ДОЧИН СЕЙФ (ZERO-TRUST VAULT) ═══ */
.seif-hero-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 15px 16px; margin-bottom: 12px;
  border-radius: 18px; cursor: pointer; color: #f8fafc;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(15, 23, 42, 0.92) 65%, rgba(168, 85, 247, 0.14) 100%);
  border: 1px solid rgba(16, 185, 129, 0.42);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.12);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.seif-hero-card:active { transform: scale(0.985); }
.seif-hero-card__badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.22); color: #6ee7b7; margin-bottom: 5px;
}
.seif-hero-card__title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.seif-hero-card__desc { font-size: 12.5px; color: rgba(226, 232, 240, 0.8); line-height: 1.4; }
.seif-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: rgba(16, 185, 129, 0.16); color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.seif-guarantees {
  background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px; padding: 12px 14px; font-size: 12.5px; line-height: 1.48; margin-bottom: 14px;
}
.seif-guarantees div + div { margin-top: 6px; }
.seif-scope-grid { display: grid; gap: 8px; margin: 8px 0 14px; }
.seif-scope-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer;
}
.seif-scope-item input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #10b981; }
.seif-scope-item b { display: block; font-size: 13px; margin-bottom: 2px; }
.seif-scope-item span { display: block; font-size: 11.5px; opacity: 0.75; line-height: 1.35; }
.seif-cmd-box {
  background: #070a12; border: 1px solid rgba(16, 185, 129, 0.38); border-radius: 14px;
  padding: 12px; margin: 12px 0; font-size: 12px;
}
.seif-cmd-box pre {
  white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: #a7f3d0; background: rgba(255,255,255,0.03);
  padding: 10px; border-radius: 10px; margin: 8px 0; user-select: all;
}
.seif-node-card {
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.seif-node-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.seif-node-card__meta { font-size: 12px; opacity: 0.78; margin-bottom: 8px; }
.seif-node-scopes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.seif-node-chip {
  font-size: 11px; padding: 4px 8px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.65);
}
.seif-node-chip.is-on {
  background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; font-weight: 600;
}
.seif-code-viewer {
  max-height: 300px; overflow: auto; background: #060810; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.45; color: #e2e8f0; white-space: pre; margin-top: 8px;
}
