/* ── Админка Tezeris ─────────────────────────────────────────────────────────
   ⚠️ ОТДЕЛЬНЫЙ БАНДЛ. Ни одна строка отсюда не попадает в клиентский сайт:
   папка своя, стили свои, раздаётся только с админского хоста. Смысл не в
   аккуратности — в том, что найденная в клиентском коде ссылка на админку
   становится приглашением её поискать.

   Токены повторяют кабинет продавца намеренно: два интерфейса одного продукта
   не должны выглядеть чужими друг другу. Но живут они здесь своей копией —
   зависеть от файла с другого хоста админка не может. */
:root {
  --bg:            #e4eaf1;
  --surface:       #f8fafc;
  --surface2:      #f3f6fa;
  --surface3:      #eaeff5;
  --surface-hover: #dfe6ef;
  --border:        #d5dde7;
  --border-strong: #b9c5d4;

  --text:    #0f172a;
  --text-2:  #4a5568;
  --text-3:  #5c6471;

  --accent:      #0b7a52;
  --accent-text: #0a7450;
  --accent-weak: rgba(15,157,88,.10);
  --accent-ink:  #ffffff;

  --red:      #bd2c29;
  --red-weak: rgba(200,50,47,.09);
  --amber:      #a94e08;
  --amber-weak: rgba(245,158,11,.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08);

  --t-fast: .16s;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* Тёмная тема по настройке системы: админку открывают ночью чаще, чем днём. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0b1120;
    --surface:       #131a2a;
    --surface2:      #182034;
    --surface3:      #1f2940;
    --surface-hover: #26314b;
    --border:        #263149;
    --border-strong: #35425f;

    --text:    #e8edf5;
    --text-2:  #a9b4c7;
    --text-3:  #8b95ad;

    --accent:      #17b871;
    --accent-text: #4ade9b;
    --accent-weak: rgba(23,184,113,.16);
    --accent-ink:  #04210f;

    --red:      #ff8098;
    --red-weak: rgba(255,107,133,.14);
    --amber:      #ffc54b;
    --amber-weak: rgba(255,197,75,.14);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.24);
    --shadow-md: 0 6px 18px rgba(0,0,0,.32);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Вход ─────────────────────────────────────────────────────────────────── */
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.gate-card {
  width: 100%; max-width: 360px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md);
}
.gate-card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.gate-card p.sub { margin: 0 0 20px; color: var(--text-2); font-size: 13px; }

.fld { margin-bottom: 14px; }
.fld label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.fld input {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.fld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

.btn {
  width: 100%; padding: 12px; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: none;
  border-radius: var(--radius-sm);
  transition: opacity var(--t-fast) var(--ease);
}
.btn:hover:not(:disabled) { opacity: .92; }
.btn:disabled { opacity: .55; cursor: default; }

.err {
  margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--red-weak); color: var(--red); font-size: 13px; font-weight: 500;
}

/* ── Панель ───────────────────────────────────────────────────────────────── */
.app { display: none; min-height: 100vh; grid-template-columns: 220px 1fr; }
.app.is-on { display: grid; }

.side {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 4px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 0 10px 18px; font-weight: 800; letter-spacing: -.02em;
}
.brand img { height: 22px; width: auto; }
/* Метка «админка» обязательна: два интерфейса выглядят похоже, и понимать,
   где ты сейчас, надо без раздумий — здесь удаляют людей и кабинеты. */
.brand .tag {
  margin-left: auto; padding: 2px 7px; border-radius: 999px;
  background: var(--red-weak); color: var(--red);
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
}

.nav-btn {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: none; cursor: pointer;
  font: inherit; color: var(--text-2); border-radius: var(--radius-sm);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-btn:hover { background: var(--surface3); color: var(--text); }
.nav-btn.is-on { background: var(--accent-weak); color: var(--accent-text); font-weight: 600; }

.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.who { padding: 0 12px 10px; font-size: 12px; color: var(--text-3); word-break: break-all; }
.link-btn {
  border: none; background: none; padding: 8px 12px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text-2); border-radius: var(--radius-sm);
}
.link-btn:hover { background: var(--surface3); color: var(--text); }

.main { padding: 26px 30px; min-width: 0; overflow-x: auto; }
.main h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.main .sub { margin: 0 0 22px; color: var(--text-2); font-size: 13px; }

/* ── Плитки сводки ────────────────────────────────────────────────────────── */
.tiles {
  display: grid; gap: 12px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.tile-label {
  font-size: 12px; color: var(--text-2); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.tile-num {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.tile-note { margin-top: 5px; font-size: 12px; color: var(--text-3); }
/* Тревожная плитка — только когда есть о чём тревожиться. Постоянно красное
   перестают замечать через день. */
/* Кликабельная плитка. Отличается от обычной курсором и откликом на
   наведение: без этого непонятно, что на неё можно нажать, и не нажимают. */
button.tile.is-link {
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
button.tile.is-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
button.tile.is-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile.is-warn { border-color: var(--amber); }
.tile.is-warn .tile-num { color: var(--amber); }
.tile.is-bad { border-color: var(--red); }
.tile.is-bad .tile-num { color: var(--red); }

/* Заголовок группы плиток. Разбивка по смыслу — не украшение: двадцать
   плиток подряд читаются как таблица чисел, а сгруппированные — как ответы
   на четыре вопроса. */
.group-title {
  margin: 4px 0 10px; font-size: 12px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase; color: var(--text-3);
}
.group-title:not(:first-of-type) { margin-top: 22px; }

/* Две карточки в ряд на широком экране, одна — на узком. */
.two {
  display: grid; gap: 12px; margin-top: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}
.two table td { font-size: 12.5px; padding: 9px 18px; }

/* ── Таблица ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.search {
  margin-left: auto; min-width: 200px;
  padding: 8px 12px; font: inherit; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); outline: none;
}
.search:focus { border-color: var(--accent); }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 18px;
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-3); background: var(--surface2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.dim { color: var(--text-3); }

.pill {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pill-ok   { background: var(--accent-weak); color: var(--accent-text); }
.pill-warn { background: var(--amber-weak);  color: var(--amber); }
.pill-bad  { background: var(--red-weak);    color: var(--red); }

.empty { padding: 30px 18px; text-align: center; color: var(--text-3); font-size: 13px; }

.pager { display: flex; gap: 8px; align-items: center; padding: 12px 18px; }
.pager button {
  padding: 7px 12px; min-width: 34px; min-height: 34px;
  border: 1px solid var(--border); background: var(--surface2);
  border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: var(--text);
}
.pager button:hover:not(:disabled) { background: var(--surface-hover); }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .of { margin-left: auto; color: var(--text-3); font-size: 12px; }

@media (max-width: 800px) {
  .app.is-on { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 10px; }
  .brand { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: none; display: flex; align-items: center; }
  .who { display: none; }
  .main { padding: 18px 14px; }
}

/* Движение здесь и так почти отсутствует, но настройку уважаем. */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Журнал ошибок ────────────────────────────────────────────────────────── */
.chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Подробности последнего случая — мельче и тусклее самой ошибки: их читают,
   только когда уже поняли, ЧТО сломалось. */
.detail { font-size: 11.5px; margin-top: 3px; word-break: break-word; max-width: 60ch; }

/* Разобранная строка тускнеет, но остаётся читаемой: по ней видно, что уже
   случалось, а вычёркивать её совсем — значит терять эту память. */
tr.is-done td { opacity: .5; }

select.search {
  cursor: pointer;
  /* Стрелка родная: рисовать свою ради единообразия — лишний код там, где
     системный элемент справляется. */
  appearance: auto;
}

/* ── Кабинеты по аккаунтам ───────────────────────────────────────────────────
   Свёрнутая группа отвечает на «сколько и всё ли работает» одной строкой;
   раскрытая — на «какие именно». В плоской таблице почта повторялась бы в
   каждой строке, а на первый вопрос всё равно пришлось бы считать глазами. */
.acc { border-bottom: 1px solid var(--border); position: relative; }
.acc:last-child { border-bottom: none; }

.acc-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: 100%; padding: 13px 18px;
  border: none; background: none; cursor: pointer; font: inherit;
  color: var(--text); text-align: left;
  transition: background var(--t-fast) var(--ease);
}
.acc-head:hover { background: var(--surface2); }
.acc-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Уголок поворачивается — это единственное, что говорит «здесь можно
   раскрыть», до того как человек нажал. */
.acc-chev {
  width: 0; height: 0; flex: none;
  border-left: 5px solid var(--text-3);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform var(--t-fast) var(--ease);
}
.acc.is-open .acc-chev { transform: rotate(90deg); }

.acc-mail { font-weight: 600; }
.acc-stat { font-size: 12px; color: var(--text-3); }
/* Первый показатель отодвигаем вправо: почта и метки слева, счёт справа —
   так строка читается как «кто» и «сколько», а не одной кашей. */
.acc-stat:first-of-type { margin-left: auto; }

.acc-body {
  background: var(--surface2);
  /* Таблица шире окна на узком экране. Пусть прокручивается ВНУТРИ себя:
     иначе либо она обрежется и правые столбцы просто исчезнут, либо поедет
     вбок вся страница. Ни то ни другое не нужно. */
  overflow-x: auto;
}
.acc-body table { width: 100%; }
.acc-body th { background: transparent; padding-top: 6px; padding-bottom: 6px; }
.acc-body td { font-size: 12.5px; }
.acc-body tbody tr:hover td { background: var(--surface3); }

/* Кнопка «Войти» лежит поверх шапки группы, а не внутри неё: кнопка внутри
   кнопки — недопустимая разметка, и с клавиатуры до неё не добраться.
   Шапке справа оставлен запас, чтобы длинная почта под неё не заезжала. */
.acc-head { padding-right: 92px; }
.acc-enter {
  position: absolute; top: 8px; right: 14px;
  padding: 6px 13px; min-height: 30px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 12.5px; cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.acc-enter:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.acc-enter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Нагрузка и выключатели ────────────────────────────────────────────────
 *
 * ⚠️ Строки «ключ — значение», а не таблица: здесь нет колонок, которые надо
 * сравнивать между строками. Таблица из двух колонок — это список, которому
 * зачем-то нарисовали рамку.
 */
.rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; border-radius: 8px; background: var(--surface2);
  font-size: 14px;
}
.row > span { color: var(--text-2); min-width: 90px; }
.row > b { font-variant-numeric: tabular-nums; }
.row > b.bad { color: var(--red); }
.row .note { margin-left: auto; font-style: normal; }

/* Карточка выключателя. Три состояния в ряд — это и есть лестница выкатки:
   выключено → этим кабинетам → всем. Без средней ступени выкатка становится
   прыжком. */
.flag { margin-bottom: 14px; }
.flag-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.flag-modes { display: flex; gap: 4px; flex: none; }
.mode {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); border-radius: 8px; padding: 6px 12px;
  font: inherit; font-size: 13px; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.mode:hover { border-color: var(--accent); }
/* Включённое состояние видно цветом, а не только рамкой: выключатель, у
   которого непонятно текущее положение, — это не выключатель. */
.mode.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.flag-cabs {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.flag-cabs[hidden] { display: none; }

/* ── Чаты поддержки ──────────────────────────────────────────────────────────
   Список слева, переписка справа. Высота — по окну: длинная переписка
   прокручивается внутри, а поле ответа всегда на виду. */
.note { font-size: 12px; color: var(--text-3); }
.nav-badge {
  display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 6px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 16px;
}
.nav-badge[hidden] { display: none; }

.chat-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; height: calc(100vh - 140px); min-height: 480px; }
.chat-list-card, .chat-view { display: flex; flex-direction: column; min-height: 0; }
.chat-filters { gap: 4px; flex-wrap: nowrap; padding: 12px 14px; }
.chat-filters .mode { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.chat-list { overflow-y: auto; flex: 1; }
.chat-item {
  display: block; width: 100%; padding: 11px 16px; text-align: left;
  font: inherit; color: var(--text); background: none; border: 0;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.chat-item:hover { background: var(--surface2); }
.chat-item.is-on { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
.chat-item-top { display: flex; gap: 8px; align-items: baseline; }
.chat-item-top b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.chat-item-sub { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-last { display: flex; gap: 8px; align-items: center; margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
.chat-item-last span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.is-new .chat-item-last span:first-child { color: var(--text); font-weight: 600; }
.chat-count {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}
.chat-item .pill { margin-top: 6px; }

.chat-head { align-items: flex-start; }
.chat-head h3 { margin-bottom: 2px; }
.chat-head .chat-status { margin-left: auto; }
.chat-feed { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; }
.msg-user { align-self: flex-start; background: var(--surface3); border-bottom-left-radius: 4px; }
.msg-us { align-self: flex-end; background: var(--accent-weak); border-bottom-right-radius: 4px; }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-imgs img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.msg-meta { margin-top: 4px; font-size: 11px; color: var(--text-3); }
.msg-us .msg-meta { text-align: right; }

.chat-reply { border-top: 1px solid var(--border); padding: 12px 18px; display: grid; gap: 8px; }
.chat-reply textarea {
  width: 100%; resize: vertical; padding: 9px 12px; font: inherit; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none;
}
.chat-reply textarea:focus { border-color: var(--accent); }
.chat-reply-bar { display: flex; align-items: center; gap: 12px; }
.chat-reply-bar .btn { margin-left: auto; width: auto; padding-inline: 20px; }
.chat-file { cursor: pointer; }
.chat-attach { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-attach:empty { display: none; }
.chat-thumb { position: relative; }
.chat-thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.chat-thumb button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: var(--red); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer;
}

@media (max-width: 900px) {
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 260px; }
  .chat-view { min-height: 460px; }
}

/* ── Подчаты: темы, «+N», группировка по человеку ───────────────────────── */
.chat-topics { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chat-topics .mode { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.chat-plus {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px;
}
.mode.is-on .chat-plus { background: #fff; color: var(--accent); }
.chat-person { border-bottom: 1px solid var(--border); }
.chat-person-head { padding: 10px 16px 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.chat-person-head b { font-size: 13.5px; }
.chat-person-head .chat-item-sub { flex-basis: 100%; }
.chat-person .chat-item { border-bottom: 0; padding: 8px 16px 8px 26px; }
.chat-person .chat-item:last-child { padding-bottom: 12px; }
.chat-topic {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface3); color: var(--text-2);
}
.chat-topic-feedback { background: var(--amber-weak); color: var(--amber); }
.chat-topic-bug { background: var(--red-weak); color: var(--red); }
.chat-topic-chat { background: var(--accent-weak); color: var(--accent-text); }
.chat-head h3 .chat-topic { margin-left: 6px; vertical-align: middle; }
.chat-count { white-space: nowrap; }

/* ── Тарифы ────────────────────────────────────────────────────────────────
   Поля в сетке по ширине содержимого: «Дней» и «Кабинетов» — короткие числа,
   растягивать их на всю строку значит заставлять глаз ходить туда-сюда. */
.plan { display: grid; gap: 14px; }
.plan-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.plan-grid label, .plan-features { display: grid; gap: 5px; font-size: 12px; color: var(--text-2); }
.plan input, .plan textarea {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font: inherit; font-size: 14px; width: 100%;
}
.plan textarea { resize: vertical; }
.plan input:focus, .plan textarea:focus { outline: none; border-color: var(--accent); }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.plan-foot .btn { margin-left: auto; }
.plan-msg { min-width: 90px; }
/* Кнопка в общем стиле тянется на всю ширину карточки — здесь она одна из
   нескольких деталей строки, поэтому ширина по содержимому. */
.plan-foot .btn { width: auto; padding: 9px 22px; }
.plan-foot .chk { white-space: nowrap; }

/* Строка выдачи тарифа раскрывается прямо под человеком: так видно, кому
   именно выдаём, и не нужно держать почту в голове. */
.give { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 6px 2px; }
.give label { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.give select, .give input {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font: inherit; font-size: 14px;
}
.give input { width: 90px; }
.give .btn { width: auto; padding: 8px 18px; margin-left: auto; }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent-text); font: inherit; font-size: 13px; text-decoration: underline;
}

/* Документы: строка «что это — когда заменён — кнопка». */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.doc-row:first-of-type { border-top: 0; }
.doc-row .note { margin-left: auto; }
.doc-btn { width: auto; padding: 8px 16px; font-size: 13px; cursor: pointer; }

/* Поля вне карточек тарифа — тот же вид. */
.card textarea, .card input[data-foot] {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font: inherit; font-size: 14px; width: 100%;
}
.card textarea { resize: vertical; }

/* Поля лендинга: между ними нужен воздух — подписи «что это» и «ключ»
   стоят вплотную и без отступа читаются как один абзац. */
.card > .plan-features { margin: 0 0 18px; }
.card > .plan-features:last-child { margin-bottom: 4px; }
.card > .plan-features > .note { font-size: 11px; opacity: .75; }

/* Кто применил код — вложенная таблица под строкой самого кода. */
.usage-row > td { background: var(--surface2); }
.usages { width: 100%; font-size: 13px; }
.usages th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.usages td, .usages th { padding: 6px 10px; text-align: left; }
.link-btn + .link-btn { margin-left: 12px; }
