/*
 * Раздел «Сотрудники» (макеты bsVlh «Сотрудники список», UJtEj «Карточка · Сессии и увольнение»,
 * ByaNi «Заявки на доступ», N2Zyli «Роли и права», IA3SX «Показатели», ohn9W «Продажи VPN по дням»).
 * Префикс своих классов — stf-.
 */

/* Список: фильтры «Салон», «Роль» строкой над таблицей, без заголовка «Фильтры» */
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn { padding: 12px 16px 0; border: 0; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn .fi-ta-filters { padding: 0; gap: 0; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn .fi-ta-filters-header { display: none; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn .fi-sc { display: flex !important; flex-wrap: wrap; gap: 10px; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn .fi-sc > * { width: 220px; flex: none; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-filters-above-content-ctn .fi-fo-field-label-col { display: none; }

/* Аватар с инициалами (шапка карточки) */
.stf-ava { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ive-pink-soft); color: var(--ive-pink); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.stf-ava--sm { width: 32px; height: 32px; font-size: 12px; }
.stf-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.stf-who__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--ive-ink-2); }
.stf-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ive-ink-2) !important; }
.stf-back svg { width: 16px; height: 16px; }
.stf-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ive-bg-2); color: var(--ive-ink-2); }
.stf-pill--pink { background: var(--ive-pink-soft); color: var(--ive-pink); }
.stf-pill--ok { background: var(--ive-green-soft); color: var(--ive-green-dark); }
.stf-pill--warn { background: var(--ive-late-soft); color: var(--ive-warn-text); }
.stf-pill--bad { background: var(--ive-bad-soft); color: var(--ive-bad-text); }

/* Карточка: окно «Уволить» — что произойдёт сразу */
.stf-dismiss { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stf-dismiss li { display: flex; gap: 10px; align-items: flex-start; }
.stf-dismiss__ico { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ive-bad-soft); color: var(--ive-bad-text); display: flex; align-items: center; justify-content: center; }
.stf-dismiss__ico svg { width: 15px; height: 15px; }
.stf-dismiss li.is-kept .stf-dismiss__ico { background: var(--ive-green-soft); color: var(--ive-green-dark); }
.stf-dismiss b { display: block; font-size: 13px; font-weight: 600; color: var(--ive-ink); }
.stf-dismiss small { display: block; font-size: 12px; line-height: 1.4; color: var(--ive-ink-3); }

/* Карточка: геопозиция строками «подпись — значение» */
.stf-geo { gap: 9px; }
.stf-geo dd span { font-weight: 500; }

/* «Роли и права»: таблица «право × роль» */
.stf-matrix__wrap { overflow-x: auto; }
.stf-matrix table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stf-matrix thead th { background: var(--ive-bg-2); padding: 9px 10px; font-size: 12px; font-weight: 700; color: var(--ive-ink-3); text-align: left; white-space: nowrap; }
.stf-matrix thead th:first-child { border-radius: 10px 0 0 10px; }
.stf-matrix thead th:last-child { border-radius: 0 10px 10px 0; }
.stf-matrix th.c, .stf-matrix td.c { text-align: center; width: 160px; }
.stf-matrix tbody td { padding: 8px 10px; border-bottom: 1px solid var(--ive-line); color: var(--ive-ink); }
.stf-matrix__group td { padding: 14px 10px 6px !important; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ive-ink-3) !important; border-bottom: 0 !important; }
.stf-check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--ive-line); background: var(--ive-bg); cursor: pointer; vertical-align: middle; display: inline-grid; place-content: center; }
.stf-check:checked { background: var(--ive-pink); border-color: var(--ive-pink); }
.stf-check:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.stf-check:disabled { cursor: default; }
.stf-check:disabled:checked { background: var(--ive-ink-3); border-color: var(--ive-ink-3); }
.stf-check:focus-visible { outline: 2px solid var(--ive-pink); outline-offset: 2px; }
.stf-matrix__note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; background: var(--ive-late-soft); border-color: transparent; color: var(--ive-warn-text); }
.stf-matrix__note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* «Показатели»: плитки и таблица «сотрудник × показатель» */
.stf-date { gap: 6px; padding: 0 10px; color: var(--ive-ink-2); font-weight: 500; }
.stf-date input { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ive-ink); padding: 0; }
.stf-check--sm { width: 16px; height: 16px; border-radius: 5px; }
.stf-check--sm:checked::after { width: 8px; height: 5px; }
.stf-muted { font-size: 13px; color: var(--ive-ink-3); }
.stf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stf-kpi { background: var(--ive-bg); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stf-kpi__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ive-ink-2); }
.stf-kpi__label svg { width: 16px; height: 16px; color: var(--ive-pink); }
.stf-kpi b { font-size: 28px; line-height: 1.1; font-weight: 800; color: var(--ive-ink); }
.stf-kpi small { font-size: 13px; color: var(--ive-ink-3); }
.stf-mx { overflow-x: auto; }
.stf-mx table { border-collapse: collapse; width: 100%; min-width: max-content; font-size: 13px; }
.stf-mx thead th { background: var(--ive-bg-2); padding: 9px 10px; font-size: 12px; font-weight: 700; color: var(--ive-ink-3); text-align: right; vertical-align: bottom; max-width: 120px; white-space: normal; line-height: 1.25; }
.stf-mx thead th:first-child { border-radius: 10px 0 0 10px; }
.stf-mx thead th:last-child { border-radius: 0 10px 10px 0; }
.stf-mx td { padding: 10px; border-bottom: 1px solid var(--ive-line); text-align: right; white-space: nowrap; color: var(--ive-ink); }
.stf-mx .who { text-align: left; position: sticky; left: 0; background: var(--ive-bg); z-index: 1; min-width: 220px; }
.stf-mx thead .who { background: var(--ive-bg-2); }
.stf-who--row { gap: 10px; }
.stf-who--row b { display: block; font-size: 14px; font-weight: 700; }
.stf-who--row small { display: block; font-size: 12px; color: var(--ive-ink-3); }
.stf-mx tfoot td { border-bottom: 0; font-weight: 700; padding-top: 12px; }

/* «VPN»: матрица «сотрудник × день» */
.stf-date select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ive-ink); padding: 0 18px 0 0; }
.stf-note--bad { background: var(--ive-bad-soft); border-color: transparent; color: var(--ive-bad-text); }
.stf-vpn .vpn-wrap { overflow: auto; max-height: 72vh; }
.stf-vpn .vpn-table { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.stf-vpn .vpn-table th, .stf-vpn .vpn-table td { padding: 9px 10px; border-bottom: 1px solid var(--ive-line); text-align: center; white-space: nowrap; color: var(--ive-ink); }
.stf-vpn .vpn-table thead th { position: sticky; top: 0; z-index: 2; background: var(--ive-bg-2); border-bottom: 0; font-size: 12px; font-weight: 700; color: var(--ive-ink-3); }
.stf-vpn .vpn-table thead th small { display: block; font-size: 10px; font-weight: 500; }
.stf-vpn .vpn-table thead th:first-child { border-radius: 10px 0 0 10px; }
.stf-vpn .vpn-table thead th:last-child { border-radius: 0 10px 10px 0; }
.stf-vpn .vpn-table td { color: var(--ive-ink-3); }
.stf-vpn .vpn-table .vpn-name { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--ive-bg); font-weight: 600; color: var(--ive-ink); min-width: 180px; }
.stf-vpn .vpn-table thead .vpn-name { z-index: 3; background: var(--ive-bg-2); }
.stf-vpn .vpn-table td.vpn-has { color: var(--ive-ink); font-weight: 700; }
.stf-vpn .vpn-table .vpn-total { font-weight: 800; color: var(--ive-ink); }
.stf-vpn .vpn-table thead .vpn-total { color: var(--ive-ink-3); font-weight: 700; }
.stf-vpn .vpn-table .vpn-weekend { color: var(--ive-pink); }
.stf-vpn .vpn-table .vpn-unlinked { color: var(--ive-ink-3); font-style: italic; font-weight: 500; }
.stf-vpn .vpn-table tfoot td { border-bottom: 0; font-weight: 700; color: var(--ive-ink); }
.stf-vpn__note { display: flex; gap: 10px; align-items: flex-start; background: var(--ive-blue-soft); border-color: transparent; color: var(--ive-blue); }
.stf-vpn__note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* Список: 8 столбцов + «Открыть» помещаются в 1440 без прокрутки */
.fi-resource-staff.fi-resource-list-records-page .fi-ta-cell, .fi-resource-staff.fi-resource-list-records-page .fi-ta-header-cell { padding-inline: 4px !important; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-cell:first-child, .fi-resource-staff.fi-resource-list-records-page .fi-ta-header-cell:first-child { padding-left: 10px !important; }
.fi-resource-staff.fi-resource-list-records-page .fi-ta-text { padding-inline: 8px !important; }
