/* Стили страницы settings. Общие компоненты — в css/panel.css, сюда только своё. */

/* Список групп слева (240, sticky), карточка группы справа (§5.4). */
.st { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
.st-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* Пункт — по образцу меню: 40, активный accent-soft. */
.st-nav__item {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 12px;
  border-radius: var(--radius-xs); color: var(--color-text); text-decoration: none; font-weight: 500;
}
.st-nav__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.st-nav__count { color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.st-nav__item[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent-ink); font-weight: 600; }
.st-nav__item[aria-current="page"] .st-nav__count { color: var(--color-accent-ink); }
@media (hover: hover) { .st-nav__item:not([aria-current]):hover { background: var(--color-surface-2); } }
.st-nav__item:focus-visible { outline-offset: -2px; }
.st-nav-m { display: none; align-self: flex-start; max-width: 100%; }

.st-card .card__body { display: flex; flex-direction: column; gap: 16px; }
.st-form { gap: 20px 16px; }
.st-long { min-height: 120px; }

/* Подвал карточки: индикатор правок слева, «Сохранить» справа. */
.st-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px;
  padding: 16px; border-top: 1px solid var(--color-border);
  background: var(--color-surface); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.st-foot .dirty { margin-right: auto; }

@media (max-width: 1023px) {
  .st { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 767px) {
  .st { grid-template-columns: minmax(0, 1fr); }
  .st-nav { display: none; }
  .st-nav-m { display: inline-flex; }
}
@media (forced-colors: active) { .st-nav__item[aria-current="page"] { outline: 2px solid Highlight; outline-offset: -2px; } }

/* Карточка группы и справочник под ней (категории заявок). */
.st-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tc-card .card__head { flex-wrap: wrap; }
.tc-modal { display: flex; flex-direction: column; gap: 16px; }

/* Область действия настройки (FLEX_CONTRACT.md §12.2): бейдж у подписи,
   при другом режиме графика — приглушённая подпись. Поле остаётся рабочим. */

/* Блок «Настройки страницы» под содержимым страницы (этап 3 переноса
   структуры, docs/STRUCTURE_MAP.md): Регламенты, Уведомления, ИИ… */
.st-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.st-section:empty { display: none; }
.st-section__title { margin: 0 0 16px; font-size: 18px; font-weight: 600; color: var(--color-text); }

/* «Дополнительно» — технические параметры группы, свёрнуты по умолчанию. */
.st-more { margin-top: 24px; border-top: 1px solid var(--color-border); padding-top: 16px; }
.st-more > summary { cursor: pointer; font-weight: 600; color: var(--color-text-2); min-height: 44px; display: flex; align-items: center; }
.st-more[open] > summary { color: var(--color-text); }
.st-more__note { margin: 0 0 16px; color: var(--color-text-2); }

/* Поиск по всем группам страницы («Тексты»). */
.st-search { width: 100%; max-width: 480px; margin-bottom: 16px; }
.st-reset { align-self: flex-start; }
