/* Локальные исправления административных экранов по списку от 09.09.2026.
   С W11 (#71720631) цвета, фоны и вид кнопок отсюда сняты: строки — кит
   `.item-list > .item-card` (тон — `--success`/`--warning`), пусто —
   `.empty-state--compact`, кнопки блока — `.form-actions`, отметки —
   `.check-option`, ссылки — `.link-accent`. Осталась только раскладка. */

/* Строка готовности ТД: подпись | статус | действие. */
.agreement-readiness-row {
  display: grid;
  grid-template-columns: minmax(0, auto) max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.agreement-readiness-label { min-width: 0; }

/* Kaiten #71011843, п. 8: кнопки готовности — одной ширины, по правому краю. */
.agreement-readiness-action {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  width: 248px;
  max-width: 100%;
}

.agreement-readiness-action .btn {
  width: 100%;
  justify-content: center;
}

/* Kaiten #71011843, п. 9–11: кнопки блока — у правого края карточки. */
.agreement-card-actions { justify-content: flex-end; }

.agreement-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agreement-template-row .btn { flex-shrink: 0; }

.agreement-template-row__identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agreement-template-row__identity strong { overflow-wrap: anywhere; }

.agreement-template-row__identity span { color: var(--text-muted); font-size: 12px; }

/* Нативный треугольник `summary` заменён шевроном реестра (`expand`). */
.agreement-template-variables summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.agreement-template-variables summary::-webkit-details-marker { display: none; }

.agreement-template-variables__chevron { display: inline-flex; transform: rotate(-90deg); transition: transform .15s ease; }

.agreement-template-variables[open] .agreement-template-variables__chevron { transform: none; }

.agreement-template-variables code {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

body:has(.admin-promotions-page) { background-attachment: fixed; }

#app:has(.admin-promotions-page) { min-height: calc(100vh - 70px); }

.kb-reader-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root:not([data-theme="dark"]) .kb-reader-link {
  color: var(--bl);
}
:root[data-theme="dark"] .kb-reader-link {
  color: var(--accent);
}

.earnings-filter-panel { font-family: var(--font-sans); }

.earnings-filter-title { font-size: 15px; }

.earnings-filter-label {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.earnings-filter-panel .inp,
.earnings-filter-panel .sel { font-size: 14px; font-weight: 500; }

.earnings-filter-subfield span { font-size: 12px; }

@media (max-width: 700px) {
  .agreement-readiness-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .agreement-readiness-action { grid-column: 1 / -1; justify-self: stretch; width: auto; }
  .agreement-readiness-action:empty { display: none; }
  .agreement-template-row { flex-wrap: wrap; }
  .agreement-card-actions > .btn { flex: 1 1 auto; }
}

/* Дата и время в формах «Новая акция» и «Запланировать техработы»: дата —
   календарь кита (`.vdate` поверх `input[type=date]`), время — поле кита
   `type=time`, парой в одной клетке ряда. Дате — больше места (подпись
   «07.10.2026» и кнопка календаря), времени — ровно под «12:00» с часами. */
.field-row.admin-datetime { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
/* На телефоне ряд с парами «дата + время» — столбиком: в половине ширины
   390 px пара не помещается. */
@media (max-width: 600px) {
  .field-row.admin-datetime-row { grid-template-columns: minmax(0, 1fr); }
}
