/* Реестр нарушений поверх каркаса screen_frame.css (ADR-0364): шапку даёт карточка функции,
   здесь — одна строка вкладок, область раздела, строки фильтров и таблицы каркаса. */
.ov-working.sf-screen { height: auto; min-height: 0; padding: 0; overflow: visible; background: transparent; }
.ov-working-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-working .ov-table-wrap { overflow: auto; }
.ov-working .ov-table { min-width: 850px; }
.ov-working .ov-cell-label { display: none; }
.ov-working .ov-form > p, .ov-working .ov-form > div, .ov-working .ov-form > section { grid-column: 1 / -1; min-width: 0; }
.ov-working .ov-form > div { display: grid; gap: 12px; }
.ov-working section { min-width: 0; overflow-wrap: anywhere; }
.ov-working .ov-notice { overflow-wrap: anywhere; margin: 0; }
.ov-working .ov-filters, .ov-working .ov-form { margin: 0; }
.ov-working-content > .ov-button { align-self: flex-start; margin: 0; }

/* Журнал: фильтры и «Добавить…» одной строкой каркаса, таблица с закреплённой колонкой «Сотрудник». */
.ov-journal-bar { align-items: flex-end; }
.ov-journal-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; flex: 1 1 360px; min-width: 0; }
.ov-journal-filters > .ov-field { flex: 0 1 240px; }
.ov-journal-filters select { min-height: 36px; padding: 6px 10px; }
.ov-journal-bar .sf-filters-side .sf-btn { margin: 0; }
.ov-journal { min-width: 1000px; table-layout: fixed; }
.ov-journal th, .ov-journal th.sf-num { white-space: normal; }
.ov-journal th:nth-child(1) { width: 190px; }
.ov-journal th:nth-child(2) { width: 96px; }
.ov-journal th:nth-child(3) { width: 130px; }
.ov-journal th:nth-child(4) { width: 140px; }
.ov-journal th:nth-child(6) { width: 110px; }
.ov-journal th:nth-child(7), .ov-journal th:nth-child(8) { width: 96px; }
.ov-journal th:nth-child(9) { width: 96px; }
.ov-journal td { overflow-wrap: anywhere; }
.ov-journal.sf-sticky td:first-child { font-weight: 600; min-width: 0; max-width: none; }
.ov-journal-total { margin: 0; }

/* Аналитика: ключевые цифры, короткий список остального, таблицы каркаса. */
.ov-working-content section:not(.sf-kpis) { display: flex; flex-direction: column; gap: 12px; }
.ov-working-content section:empty { display: none; }
.ov-working-content section > h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.35; }
.ov-working-content section > .ov-muted { margin: 0; font-size: 13px; }
.ov-metrics-more { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--ink-2); }
.ov-metrics-more p { margin: 0; }
.ov-metrics-more strong { color: var(--ink); }
.ov-analytics-table { min-width: 720px; }
.ov-analytics-table th { white-space: normal; }
.ov-analytics-table td:last-child .sf-btn { white-space: normal; }
.ov-working-content section > .ov-field { max-width: 280px; }
.ov-working-content section > .ov-button { align-self: flex-start; margin: 0; }

@media (max-width: 700px) {
  .ov-working .ov-table { min-width: 0; }
  .ov-working .ov-cell-label { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; }
  .ov-working .ov-form { padding: 14px; }
  .ov-journal-filters > .ov-field { flex: 1 1 100%; }
  .ov-journal-bar .sf-filters-side .sf-btn { flex: 1 1 100%; }
  .ov-journal { min-width: 1080px; }
  .ov-journal th:nth-child(1) { width: 132px; }
}

/* «Виды и исключения», «Финансовые права»: группы с заголовком, «Сохранить» внизу формы. */
.ov-working .ov-form > .ov-group { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: end; border: 1px solid var(--border); border-radius: 10px; }
.ov-working .ov-group > legend { padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ov-working .ov-group > .ov-button, .ov-working .ov-group-row > .ov-button { justify-self: start; margin: 0; }
.ov-working .ov-group-row, .ov-working .ov-kind-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: end; min-width: 0; }
.ov-working .ov-group-row > .ov-button { grid-column: 1 / -1; }
.ov-working .ov-kind-row { padding-bottom: 12px; border-bottom: 1px solid var(--divider); }
.ov-working .ov-kind-row:last-child { padding-bottom: 0; border-bottom: 0; }
.ov-working .ov-rules { grid-column: 1 / -1; display: grid; gap: 4px; }
.ov-working .ov-rules:empty { display: none; }
.ov-working .ov-rules p { margin: 0; font-size: 13px; }
.ov-working .ov-group .ov-button:not(.ov-link) { background: var(--surface); color: var(--blue-deep); border-color: var(--border-2); }
.ov-working .ov-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ov-working .ov-form-actions > .ov-save { order: -1; margin: 0; background: var(--blue); border-color: var(--blue); color: var(--surface); }
.ov-working .ov-notice:empty { display: none; }
@media (max-width: 700px) {
  .ov-working .ov-form > .ov-group, .ov-working .ov-group-row, .ov-working .ov-kind-row { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ov-working .ov-group-row, .ov-working .ov-kind-row { padding: 0 0 12px; }
  .ov-working .ov-group > .ov-button:not(.ov-link), .ov-working .ov-group-row > .ov-button, .ov-working .ov-form-actions > .ov-save { width: 100%; }
}
