/* FM WFM mock — full-screen grid, Bitrix-slider padding
 *
 * UI class canon (Смены accepted 2026-09-24):
 *   docs/product/THR_HUB_UI_CANON_CLASSES.md
 * Reuse: fm-filter-bar · fm-today-compact/fm-tc-m · fm-legend-strip ·
 *   fm-gear-* · fm-board-skel · fm-badge-* · fm-f-trig dropdowns
 */
* { box-sizing: border-box; }
html, body.fm-ts { height: 100%; max-height: 100%; }
body.fm-ts {
  margin: 0; font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
  background: #F7F7F8; color: #092131; font-size: 14px;
  display: flex; flex-direction: column; min-height: 100vh; height: 100%;
  overflow: hidden;
}
.fm-shell {
  flex: 1 1 auto; min-height: 0; height: 100%; max-height: 100%;
  display: flex; flex-direction: column;
  /* Без своего pad-x: ритм L1 как у Старт/Найм/Кадры (.app.hub-shell) —
     chrome и контент берут один --hub-chrome-pad-x, без двойного отступа */
  padding: 0 0 12px; max-width: 100%;
}
.fm-shell > .fm-filter-bar,
.fm-shell > .fm-hint,
.fm-shell > .fm-legend-strip,
.fm-shell > .fm-panel,
.fm-shell > .fm-pick,
.fm-shell > #fmToolbar {
  padding-left: var(--hub-chrome-pad-x, 16px);
  padding-right: var(--hub-chrome-pad-x, 16px);
  box-sizing: border-box;
}
.fm-shell > .fm-panel {
  /* панель уже имеет border — pad на внешней обёртке, внутри scroll на всю ширину */
  margin-left: var(--hub-chrome-pad-x, 16px);
  margin-right: var(--hub-chrome-pad-x, 16px);
  padding-left: 0;
  padding-right: 0;
  width: auto;
}
.fm-page-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  margin: 0 -24px; padding: 14px 24px 12px;
  background: #fff; border-bottom: 1px solid #E8ECF1; flex-shrink: 0;
}
/* новый хром Hub на WFM — без белой «отдельной» шапки */
.hub-shell-chrome + *,
.fm-shell > .hub-shell-chrome { /* marker */ }
body.fm-ts .fm-shell > .hub-shell-chrome ~ .ss-progress { margin-top: 0; }
.fm-page-titles { flex: 1; min-width: 0; }
.fm-page-title {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font: 600 18px/1.3 "Helvetica Neue", Arial, sans-serif; color: #1f2a37;
}
.fm-page-sub { font-size: 12px; color: #73737D; margin-top: 2px; }
.fm-object-switch {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; max-width: min(720px, 100%);
}
.fm-object-switch-lab {
  font-size: 11px; font-weight: 600; color: #73737D; text-transform: uppercase;
  letter-spacing: .04em;
}
.fm-object-select {
  /* та же высота, что у выбора Объекта на «Штатном расписании»: шапка и меню
     стоят на одной линии на всех вкладках WFM, при переходе ничего не прыгает */
  flex: 1 1 280px; min-width: 200px; max-width: 520px;
  height: 42px; padding: 0 10px; border: 1px solid #c6cdd3; border-radius: 8px;
  background: #fff; color: #1f2a37; font: 500 13px/1.2 "Helvetica Neue", Arial, sans-serif;
}
.fm-object-select:focus { outline: none; border-color: #2fc6f6; box-shadow: 0 0 0 2px rgba(47,198,246,.2); }
.fm-object-change {
  font-size: 12px; color: #2067b0; text-decoration: none; white-space: nowrap;
}
.fm-object-change:hover { text-decoration: underline; }

.fm-pick {
  flex: 1 1 auto; min-height: 0; overflow: auto; padding: 18px 0 28px;
}
.fm-pick-card {
  max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid #E8ECF1;
  border-radius: 12px; padding: 20px 22px 24px;
}
.fm-pick-title { margin: 0 0 6px; font: 600 20px/1.3 "Helvetica Neue", Arial, sans-serif; color: #1f2a37; }
.fm-pick-lead { margin: 0 0 14px; color: #73737D; font-size: 13px; line-height: 1.45; max-width: 62ch; }
.fm-pick-search { margin-bottom: 16px; }
.fm-pick-search .main-ui-square-search { width: 100%; max-width: 100%; }
.fm-pick-section { margin-top: 14px; }
.fm-pick-h {
  font-size: 11px; font-weight: 700; color: #73737D; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 8px;
}
.fm-pick-list { display: flex; flex-direction: column; gap: 6px; }
.fm-pick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 10px 12px; border: 1px solid #E8ECF1;
  border-radius: 10px; background: #fafbfc; cursor: pointer; font: inherit; color: inherit;
}
.fm-pick-item:hover { border-color: #2fc6f6; background: #f5fbfe; }
.fm-pick-item-title { font-weight: 600; color: #1f2a37; font-size: 14px; }
.fm-pick-item-meta { font-size: 12px; color: #73737D; margin-top: 2px; }
.fm-pick-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: #eef6ec; color: #2e7d32;
}
.fm-pick-badge.ws-in_progress { background: #fff6e0; color: #9a6b00; }
.fm-pick-badge.ws-demo { background: #e8f4ff; color: #1565c0; }
.fm-pick-item.is-demo { border-color: #90caf9; background: #f3f9ff; }
.fm-pick-item.is-demo:hover { border-color: #2fc6f6; background: #eaf6fc; }
.fm-pick-empty { color: #9aa3ad; font-size: 13px; padding: 8px 2px; }

body.fm-pick-mode { overflow: auto; }
body.fm-pick-mode .fm-toolbar,
body.fm-pick-mode .fm-filter-bar,
body.fm-pick-mode .fm-hint,
body.fm-pick-mode .fm-panel { display: none !important; }
body.fm-pick-mode #fmPick { display: block; }
body:not(.fm-pick-mode) #fmPick { display: none !important; }

.fm-page-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; }
.fm-help-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #9aa3ad; font-size: 11px; font-weight: 700;
  cursor: pointer; line-height: 1; flex: 0 0 auto; vertical-align: middle;
}
.fm-help-mini:hover { color: #535c69; background: #eef1f4; }
.fm-help-lg {
  width: 28px; height: 28px; font-size: 14px;
  border: 1px solid #c6cdd3; background: #fff; color: #525c69;
}
.fm-help-lg:hover { border-color: #2fc6f6; color: #2067b0; background: #f5fbfe; }
.fm-tip {
  display: none; position: absolute; z-index: 80; left: 0; top: calc(100% + 6px);
  width: min(340px, 82vw); padding: 10px 12px; border-radius: 8px;
  background: #2a3340; color: #fff; font-size: 12px; line-height: 1.45;
  box-shadow: 0 10px 24px rgba(20, 28, 40, .28); font-weight: 400;
}
.fm-tip.open { display: block; }
.fm-tip.fm-tip-portal { position: fixed; margin: 0; }
.fm-list-head h2 { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.fm-import {
  border: 1px solid #16638F; color: #16638F; background: #fff;
  border-radius: 6px; padding: 6px 12px; opacity: .5;
}
.fm-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 0 8px; background: transparent; margin: 0; border-bottom: 1px solid #DEDEDE;
  flex-shrink: 0; position: relative;
}
.fm-toolbar .fm-wfm-instr { margin-left: auto; font-size: 12px; font-weight: 500; }
.fm-month { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fm-nav {
  width: 28px; height: 28px; border: 1px solid #DEDEDE; border-radius: 6px; background: #fff;
}
.fm-btn-primary {
  background: #16638F; color: #fff; border: 0; border-radius: 6px;
  padding: 8px 14px; font-weight: 600; cursor: pointer;
}
.fm-btn-ghost {
  background: #fff; border: 1px solid #DEDEDE; border-radius: 6px;
  padding: 8px 14px; cursor: pointer;
}
.fm-btn-warn {
  background: #C45C26; color: #fff; border: 0; border-radius: 6px;
  padding: 8px 14px; font-weight: 600; cursor: pointer;
}
.fm-sel-count { font-size: 13px; color: #16638F; font-weight: 600; }
.fm-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; }
.fm-tab {
  border: 1px solid #DEDEDE; background: #fff; border-radius: 6px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: #5D5D5D;
}
.fm-tab.on { background: #16638F; color: #fff; border-color: #16638F; }

.fm-filter-tools {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 8px;
  flex: 0 0 auto; min-width: 0; margin-left: 0; order: 0;
}
.fm-filter-wrap {
  order: 1;
}
.fm-actions-drop {
  position: absolute; z-index: 70; top: calc(100% + 4px); left: 0; right: auto;
  min-width: 200px; padding: 4px;
  background: #fff; border: 1px solid #D6E2EC; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, .14);
}
.fm-filter-actions {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 8px;
  min-width: 0; flex-shrink: 1;
}
.fm-filter-cta {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 8px;
  flex-shrink: 0; position: relative;
}
.fm-filter-cta > .fm-btn-ghost,
.fm-filter-cta > .fm-sel-count,
.fm-filter-cta > .fm-help-mini {
  align-self: center;
  flex-shrink: 0;
}
.fm-filter-cta > .fm-help-mini {
  width: 22px; height: 22px; margin: 0;
}

/* Одна кнопка «Действия» вместо трёх */
.fm-actions-menu { position: relative; }
.fm-actions-btn {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.fm-actions-caret { font-size: 10px; opacity: .85; }
.fm-actions-drop[hidden] { display: none !important; }
.fm-actions-drop button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 6px;
  padding: 8px 10px; font: 500 13px/1.2 inherit; color: #1f2a37;
  cursor: pointer;
}
.fm-actions-drop button:hover { background: #EEF3F7; color: #16638F; }
.fm-actions-drop button.on { background: #E8F4FB; color: #16638F; font-weight: 600; }
.fm-actions-menu.is-open .fm-actions-btn { box-shadow: 0 0 0 2px rgba(22, 99, 143, .2); }
.fm-actions-row { position: relative; }
.fm-actions-row > button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left;
}
.fm-actions-caret-r { color: #8A9299; font-size: 12px; line-height: 1; flex: 0 0 auto; }
.fm-actions-row.is-open > button { background: #E8F4FB; color: #16638F; }
.fm-actions-sub {
  position: absolute; z-index: 71; left: calc(100% + 4px); top: 0;
  min-width: 260px; padding: 4px;
  background: #fff; border: 1px solid #D6E2EC; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, .14);
}
.fm-actions-sub[hidden] { display: none !important; }
.fm-actions-menu.sub-flip .fm-actions-sub {
  left: auto; right: calc(100% + 4px);
}
.fm-actions-sep {
  height: 1px; margin: 4px 6px; background: #E6ECF1; border: 0;
}

.fm-legend {
  margin-left: 0; display: flex; gap: 3px; flex-wrap: nowrap; align-items: center;
}
.fm-legend .fm-leg {
  width: 28px; height: 28px; border-radius: 4px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 11px;
  border: 1px solid #DEDEDE; font-style: normal; cursor: pointer; user-select: none;
  position: relative; z-index: 0;
}
.fm-legend .fm-leg:hover,
.fm-legend .fm-leg:focus-visible {
  z-index: 2;
  filter: brightness(0.97);
}
/* Tip перенесён в #fmLegFloatTip — без ::after, чтобы не было «групповой» подсветки */
.fm-leg-float-tip {
  position: fixed; z-index: 200; pointer-events: none;
  max-width: 240px; padding: 6px 9px; border-radius: 4px;
  background: #2a3340; color: #fff; font-size: 11px; font-weight: 500;
  line-height: 1.35; text-align: center;
  box-shadow: 0 6px 16px rgba(20, 28, 40, .28);
}
.fm-leg-float-tip[hidden] { display: none !important; }
.fm-legend .fm-leg.plan { width: auto; padding: 0 6px; background: #fff; color: #16638F; font-size: 9px; }
.fm-legend .fm-leg.ya { background: #EAF5F4; }
.fm-legend .fm-leg.rv { background: #C8E6C9; color: #0D3B12; }
.fm-legend .fm-leg.nn { background: #FFCACA; }
.fm-legend .fm-leg.ot { background: #EEE6F1; }
.fm-legend .fm-leg.og { background: #D7CCC8; color: #4E342E; }
.fm-legend .fm-leg.r { background: #F8BBD0; color: #880E4F; }
.fm-legend .fm-leg.ozh { background: #E1BEE7; color: #4A148C; }
.fm-legend .fm-leg.do { background: #ABC7D7; }
.fm-legend .fm-leg.b { background: #FFECD6; }
.fm-legend .fm-leg.u { background: #AEAEAE; color: #fff; }
.fm-legend .fm-leg.v { background: #F0F3F5; }
.fm-legend .fm-leg.cov-wait { background: #FFF8E8; color: #8A6D00; }
.fm-legend .fm-leg.cov-bad { background: #FFCACA; color: #B42318; }
.fm-legend .fm-leg.on {
  outline: 2px solid #16638F; outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(22, 99, 143, 0.18);
}
.fm-shift-legend {
  gap: 6px;
}
.fm-shift-legend .fm-leg.shift {
  width: auto; height: 28px; padding: 0 8px 0 6px; gap: 5px;
  font-size: 11px; font-weight: 600; background: #fff; color: #5D5D5D;
  border: 1px solid #DEDEDE; border-radius: 6px;
  font-family: inherit; line-height: 1;
  position: relative;
}
.fm-shift-legend .fm-leg.shift .fm-shi { width: 14px; height: 14px; }
.fm-shift-legend .fm-leg.shift.morning { color: #C45C26; background: #FFF3E8; border-color: #F0D7C0; }
.fm-shift-legend .fm-leg.shift.day { color: #9A6B00; background: #FFF6CC; border-color: #E6D48A; }
.fm-shift-legend .fm-leg.shift.evening { color: #6B3FA0; background: #F3ECFA; border-color: #DDD0EA; }
.fm-shift-legend .fm-leg.shift.night { color: #3A4A6B; background: #E8ECF4; border-color: #CDD3E0; }
.fm-shift-legend .fm-leg.shift.on {
  outline: 2px solid #16638F; outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(22, 99, 143, 0.18);
}

.fm-hint,
#fmHint {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  flex-shrink: 0;
}

.fm-panel {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid #DEDEDE; border-radius: 8px; overflow: hidden; background: #fff;
}
.fm-panel[hidden] { display: none !important; }
.fm-shell > .fm-legend-strip {
  flex-shrink: 0;
  margin-left: var(--hub-chrome-pad-x, 16px);
  margin-right: var(--hub-chrome-pad-x, 16px);
  width: auto;
  border: 1px solid #DEDEDE;
  border-radius: 8px;
  margin-bottom: 8px;
  padding-left: 10px;
  padding-right: 10px;
}
.fm-shell > .fm-legend-strip[hidden] { display: none !important; }

.fm-scroll {
  flex: 1 1 0; min-height: 0; margin: 0; overflow: auto; background: #fff;
  padding: 0; border: 0; position: relative;
  -webkit-overflow-scrolling: touch;
  /* запас справа: колонка «сегодня» в конце месяца может встать в центр viewport */
  scroll-padding-inline: 0;
}

.fm-table {
  --fm-name-w: clamp(300px, 38vw, 560px);
  border-collapse: separate; border-spacing: 0; table-layout: fixed;
  width: max-content; min-width: 100%;
}
.fm-table col.fm-col-name { width: var(--fm-name-w); }
.fm-table col.fm-col-stat { width: 64px; }
.fm-table col.fm-col-day { width: 44px; }
.fm-table th, .fm-table td {
  padding: 0; border: none; vertical-align: middle; text-align: center; overflow: hidden;
}
.fm-table thead {
  position: sticky; top: 0; z-index: 6;
}
.fm-table thead th {
  position: sticky; top: 0; z-index: 6; background: #fff;
  font-size: 11px; font-weight: 600; color: #5D5D5D; height: 34px;
  border-bottom: 1px solid #DEDEDE;
}
.fm-table thead th.fm-th-month {
  text-align: left; padding: 0 6px; z-index: 7;
  background: #fff; left: 0;
}
.fm-th-month-inner {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-width: 0;
  overflow: hidden;
  padding: 2px 4px;
}
/* Месяц ≈ ⅓ ширины sticky-колонки ФИО/должности */
.fm-th-month-inner .fm-month {
  flex: 0 1 auto;
  width: calc(var(--fm-name-w, 33vw) / 3);
  max-width: calc(var(--fm-name-w, 33vw) / 3);
  min-width: 0;
}
/* Контролы «Сегодня» / «На весь экран» — не слипаются */
.fm-th-month-tools {
  display: inline-flex; align-items: center; gap: 12px;
  flex: 0 0 auto; margin-left: auto;
  min-width: 0; padding-left: 8px;
}
.fm-th-month-inner .fm-today-switch,
.fm-th-month-inner .fm-board-focus-btn {
  flex: 0 0 auto;
}
.fm-th-month-inner .fm-today-switch {
  margin-left: 0;
  padding: 4px 6px;
  border-radius: 5px;
}
.fm-th-month-inner .fm-board-focus-btn {
  padding: 5px 10px;
}
.fm-today-switch:disabled {
  opacity: .45; cursor: not-allowed;
}
.fm-table thead th.fm-th-month .fm-month {
  font-size: 11px; gap: 2px; font-weight: 600; color: #1f2a37;
}
.fm-table thead th.fm-th-month .fm-nav {
  width: 20px; height: 20px; font-size: 13px; cursor: pointer;
  border-radius: 4px; padding: 0;
}
.fm-table thead th.fm-th-month .fm-nav:disabled {
  opacity: .4; cursor: default;
}
.fm-table thead th.fm-th-month .fm-month-lab {
  min-width: 0; flex: 1 1 auto;
  text-align: center; text-transform: lowercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; line-height: 1.2; padding: 0 2px;
}
.fm-table thead th.we { color: #F14A4A; }

/* Обводка «сегодня» — сплошная колонна, без разрывов по строкам */
.fm-table thead th.focus-col {
  color: #16638F;
  background: rgba(47, 198, 246, 0.06);
  box-shadow:
    inset 2px 0 0 #2fc6f6,
    inset -2px 0 0 #2fc6f6,
    inset 0 2px 0 #2fc6f6;
  border-radius: 6px 6px 0 0;
  position: sticky;
  top: 0;
  z-index: 6;
}
.fm-day-td.focus-col,
.fm-sec-day.focus-col {
  background: rgba(47, 198, 246, 0.04);
  box-shadow:
    inset 2px 0 0 #2fc6f6,
    inset -2px 0 0 #2fc6f6;
  border-radius: 0 !important;
  border-bottom-color: transparent !important;
  position: relative;
  z-index: 1;
}
.fm-data-row td.fm-day-td.focus-col {
  /* ряд не режет вертикаль колонны */
  border-bottom: 1px solid transparent !important;
}
/* дно колонны — только у последней data-строки всей таблицы */
.fm-table > tbody:last-of-type > tr.fm-data-row:last-child > td.fm-day-td.focus-col {
  box-shadow:
    inset 2px 0 0 #2fc6f6,
    inset -2px 0 0 #2fc6f6,
    inset 0 -2px 0 #2fc6f6;
  border-radius: 0 0 6px 6px !important;
}
/* внутренняя обводка ячейки в колонне «сегодня» убрана — иначе двойной контур */
.fm-day-td.focus-col .fm-cell.focus-day {
  box-shadow: none;
}
.fm-stat-h { font-size: 10px !important; color: #73737D !important; }

.fm-name {
  position: sticky; left: 0; z-index: 2; background: #fff;
  text-align: left !important;
  width: var(--fm-name-w, 33vw); max-width: var(--fm-name-w, 33vw);
  min-width: var(--fm-name-w, 33vw);
  padding: 10px 10px !important; border-right: 1px solid #EEEEEE;
  container-type: inline-size;
  container-name: fm-name;
}
.fm-table thead .fm-name { z-index: 8; background: #fff; left: 0; }
.fm-name-row { display: flex; align-items: flex-start; gap: 6px; }
.fm-name-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* Ровно 2 строки канона: ФИО+badges | роль+деньги+параметры */
.fm-name-body.fm-row-canon {
  gap: 3px;
}
.fm-name-body.fm-row-canon > .fm-name-line {
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}
/* row2 тянется в trail (alert+kebab), иначе meta не доезжает до лампочки */
.fm-name-body.fm-row-canon > .fm-role-line {
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  overflow: visible; /* ❄ sticker на чипе роли */
  max-width: none;
  width: calc(100% + 52px);
  padding-right: 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
/* Если остался legacy .fm-meta без roleLine — это и есть строка 2 (не 3-я) */
.fm-name-body.fm-row-canon > .fm-role-line + .fm-meta {
  display: none !important;
}
/* Row1: ФИО + параметры сразу после (канон badge-row · не фиксированный 118px-слот) */
.fm-name-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 8px;
  font-weight: 700; font-size: 13px; color: #092131;
  min-width: 0; white-space: nowrap; overflow: hidden;
}
.fm-fio-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(168px, 52%);
}
/* badge-row vertical: FIO + chips one baseline */
.fm-name-line[data-row="1"] {
  align-items: center;
}
.fm-name-badges {
  align-items: center;
}
.fm-fio-cluster .fm-name-link,
.fm-name-line .fm-name-link {
  min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Параметры сотрудника — сразу за ФИО (не margin-left:auto · не колонка 118px) */
.fm-name-badges {
  display: inline-grid;
  grid-template-columns: 78px 22px 22px;
  align-items: center; gap: 6px;
  flex: 0 0 auto; margin-left: 0;
}
.fm-name-badges .fm-badge-formal {
  min-width: 0; max-width: 78px;
  height: 22px; box-sizing: border-box;
  display: inline-flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  justify-self: start;
}
.fm-name-badges .fm-badge-stage,
.fm-name-badges .fm-badge-kind {
  width: 22px; justify-content: center; justify-self: center;
}
/* trail = alert-dot + kebab · правый край · фикс. 50px (канон · meta columns) */
.fm-name-trail {
  display: inline-flex; align-items: flex-start; justify-content: flex-end; gap: 2px;
  flex: 0 0 50px; width: 50px; min-width: 50px;
  margin-left: 2px; padding-top: 0;
  position: relative;
}
.fm-meta {
  color: #73737D; font-size: 10px; margin-top: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-drag-grip {
  flex-shrink: 0; width: 16px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center; cursor: grab;
  color: #A0A8B0; font-size: 12px; line-height: 1; user-select: none;
  border-radius: 3px;
}
.fm-drag-grip:hover { color: #16638F; background: #F0F7FA; }
.fm-drag-grip-off { visibility: hidden; cursor: default; }
.fm-kebab {
  flex-shrink: 0; width: 22px; height: 28px;
  border: 1px solid transparent; background: transparent;
  color: #8A9299; font-size: 18px; line-height: 1; cursor: pointer;
  border-radius: 4px; padding: 0;
}
.fm-kebab:hover,
.fm-name-row:hover .fm-kebab,
.fm-kebab:focus-visible {
  background: #F0F7FA; color: #16638F; border-color: #D6E2EC;
}
.fm-name-trail .fm-kebab { margin: 0; }

.fm-stat {
  font-size: 11px; font-weight: 600; color: #092131;
  border-right: 1px solid #F0F0F0; padding: 10px 4px !important; background: #FAFBFC;
}
.fm-pay { font-size: 10px; color: #16638F; font-weight: 600; }
.fm-sec-row td {
  /* фон/паддинг задают .fm-sec-head / .fm-sec-tail */
  text-align: left !important;
  font-weight: 700; font-size: 12px;
}

.fm-day-td { width: 48px; height: 58px; padding: 8px 2px !important; }
.fm-data-row td { border-bottom: 1px solid #F3F5F7; }

.fm-cell {
  width: 42px; height: 42px; border-radius: 4px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #092131; cursor: pointer;
  border: 1px solid transparent; user-select: none; flex-shrink: 0; position: relative;
  padding: 10px 1px 9px; box-sizing: border-box;
}
.fm-cell:hover { box-shadow: 0 2px 4px rgba(0,0,0,.12); }
.fm-cell.ya { background: #EAF5F4; }
.fm-cell.rv { background: #C8E6C9; color: #0D3B12; }
.fm-cell.nn { background: #FFCACA; }
.fm-cell.ot { background: #EEE6F1; }
.fm-cell.do { background: #ABC7D7; }
.fm-cell.og { background: #D7CCC8; color: #4E342E; }
.fm-cell.u { background: #AEAEAE; color: #fff; }
.fm-cell.b { background: #FFECD6; }
.fm-cell.v { background: #F0F3F5; color: #616161; }
.fm-cell.r { background: #F8BBD0; color: #880E4F; }
.fm-cell.ozh { background: #E1BEE7; color: #4A148C; }
.fm-cell.plan { background: #fff; border-color: #B8C4CE; font-size: 9px; font-weight: 600; color: #16638F; }
/* Hub-only TZ runtime marks (S1) + cell card layout (cell-ux)
 * Top: shift type (shi, no bg) + pencil (hover only, keep size)
 * Mid: Я/digit + time; OT on time row
 * Bottom corners: ! left · play/pause/done center · violation dot right
 */
.fm-cell-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-top: -3px; line-height: 1.05; z-index: 1; max-width: 100%;
  pointer-events: none;
}
.fm-cell-code { font-size: inherit; font-weight: inherit; line-height: 1.05; }
.fm-cell .t {
  font-size: 8px; font-weight: 500; margin-top: 1px; line-height: 1; color: #5D5D5D;
  position: relative; display: inline-block; max-width: 100%;
}
.fm-cell-marks {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 10px; pointer-events: none;
}
.fm-rt-warn {
  position: absolute; left: 2px; bottom: 1px; z-index: 2;
  font-size: 8px; line-height: 1; color: #C47A00;
  font-weight: 800; pointer-events: none;
}
.fm-rt-dot {
  position: absolute; right: 2px; bottom: 2px; z-index: 2;
  width: 5px; height: 5px; border-radius: 50%; background: #D92D20;
  pointer-events: none;
}
.fm-rt-icon {
  position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); z-index: 2;
  font-size: 8px; line-height: 1; color: #1B5E20; pointer-events: none;
}
.fm-rt-play::before { content: "▶"; font-size: 6px; }
.fm-rt-pause::before { content: "❚❚"; font-size: 5px; letter-spacing: -1px; }
.fm-rt-check { color: #1B5E20; font-weight: 700; }
/* S9 overtime — on time row; light overlap of time OK, keep digits readable */
.fm-rt-ot {
  position: absolute; right: -4px; top: -2px; transform: none;
  z-index: 2; font-size: 7px; font-weight: 700; line-height: 1.1; color: #7A4E00;
  background: #FFE8A3; border-radius: 2px; padding: 0 2px;
  pointer-events: none; white-space: nowrap;
}
.fm-cell.has-rt-ot .t { padding-right: 12px; min-width: 22px; }

/* S7 multi aggregate popover (1s delay) */
.fm-cell-multi { font-weight: 700; }
.fm-agg-pop {
  position: fixed; z-index: 80; min-width: 180px; max-width: 260px;
  background: #fff; border: 1px solid #D7DEE5; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9,33,49,.14); padding: 10px 12px;
  font-size: 12px; color: #092131; pointer-events: none;
}
.fm-agg-title { font-weight: 700; margin: 0 0 8px; font-size: 12px; }
.fm-agg-row {
  display: flex; gap: 8px; align-items: baseline; padding: 3px 0;
  border-top: 1px solid #F3F5F7;
}
.fm-agg-n { color: #73737D; width: 1.2em; }
.fm-agg-st { flex: 1; font-weight: 600; text-transform: lowercase; }
.fm-agg-t { color: #73737D; font-variant-numeric: tabular-nums; }
.fm-stat-h .fm-sd-i, .fm-stat .fm-sd-i {
  display: inline-flex; width: 12px; height: 12px; border-radius: 50%;
  background: #E8EEF2; color: #73737D; font-size: 9px; font-style: normal;
  font-weight: 700; align-items: center; justify-content: center;
  margin-left: 2px; vertical-align: middle; cursor: help;
}
.fm-cell.has-rt-warn { border-color: #E8A317; }
.fm-cell.fm-empty,
.fm-cell.empty {
  background: #DEDEDE !important;
  cursor: default;
  padding: 0 !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  color: inherit;
  font-size: 11px;
  text-align: center;
  margin: 0 auto;
}
.fm-cell.sel { outline: 2px solid #16638F; outline-offset: 1px; background: #D6EAF7 !important; }
.fm-cell.focus-day { box-shadow: inset 0 0 0 2px #16638F; }
.fm-cell.future-pick { cursor: cell; }
.fm-cell.future-pick:hover { border-color: #16638F; }
.fm-cell.pickable { cursor: pointer; position: relative; }
.fm-cell-check {
  position: absolute; top: 2px; left: 2px; z-index: 5;
  width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid #8A9299; background: #fff;
  box-sizing: border-box; pointer-events: none;
}
.fm-cell-check.on {
  border-color: #16638F; background: #16638F;
  box-shadow: inset 0 0 0 2px #fff;
}
body.fm-select-mode .fm-cell.pickable {
  box-shadow: inset 0 0 0 1px rgba(22, 99, 143, 0.22);
}
/* Select mode: checkbox left — hide cell pencil so it never covers the check */
body.fm-select-mode .fm-cell .fm-cell-edit {
  display: none !important;
}
#fmSelectMode.on {
  border-color: #16638F; color: #16638F; background: #eef6fc; font-weight: 700;
}
/* Shift slider codes — 2 строки: Я·НН (pri) | secondary равные в один ряд */
.fm-sd-codes { margin: 0 0 4px; }
.fm-sd-snap-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 4px;
}
.fm-sd-code-group { margin: 0; }
/* Secondary: ОТ·ДО·Б·ОГ·РВ·У·план·В·Р·ОЖ — равная ширина, nowrap */
.fm-sd-code-group.is-secondary .fm-sd-snap-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  width: 100%;
  overflow-x: visible;
  padding: 2px 0 4px;
  box-sizing: border-box;
}
.fm-sd-code-group.is-secondary .fm-sd-snap-rail-cell {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 4px 1px;
  gap: 2px;
}
.fm-sd-code-group.is-secondary .fm-sd-snap-face {
  width: 26px;
  height: 22px;
  font-size: 9px;
}
.fm-sd-code-group.is-secondary .fm-sd-snap-word {
  font-size: 7.5px;
  line-height: 1.1;
  max-width: 100%;
}
.fm-sd-code-wrap {
  flex-wrap: wrap;
}
.fm-sd-code-group.is-secondary .fm-sd-code-wrap {
  flex-wrap: nowrap;
}
.fm-sd-code-more {
  display: none !important; /* Р·ОЖ вынесены на secondary · Ещё не нужен */
}
.fm-sd-code-more > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #5A6168;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.fm-sd-code-more > summary::-webkit-details-marker { display: none; }
.fm-sd-code-more > summary::before {
  content: "▸ ";
  color: #8A95A1;
}
.fm-sd-code-more[open] > summary::before { content: "▾ "; }
.fm-sd-snap-pri {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fm-sd-snap-pri-cell {
  flex: 1 1 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-sizing: border-box;
  /* tint via fm-sd-cube-* (bg/fg) */
  background: #eee;
  color: #333;
}
.fm-sd-snap-pri-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(9,33,49,.1);
}
.fm-sd-snap-pri-cell.on {
  /* Canon: same 2px weight as is-current; solid = «после изменения» */
  border: 2px solid #092131;
  box-shadow: none;
}
.fm-sd-snap-pri-cell.is-current:not(.on),
.fm-sd-snap-rail-cell.is-current:not(.on) {
  /* Canon: same 2px weight as .on; dashed = «текущий» */
  border: 2px dashed #16638F;
  outline: none;
  box-shadow: none;
  opacity: 1;
}
.fm-sd-snap-pri-cell.is-dim,
.fm-sd-snap-rail-cell.is-dim {
  opacity: 0.36;
  filter: saturate(0.55);
}
.fm-sd-snap-pri-cell.is-dim:hover,
.fm-sd-snap-rail-cell.is-dim:hover {
  opacity: 0.72;
  filter: none;
}
.fm-sd-snap-rail-cell.on .fm-sd-snap-face {
  /* face tint only — ring is on the cell (equal weight with is-current) */
  box-shadow: none;
}
.fm-sd-rt-lab {
  font-size: 11px; font-weight: 700; color: #8A95A1;
  text-transform: uppercase; letter-spacing: .04em; margin-right: 4px;
}
.fm-sd-rt-btn {
  border: 1px solid #ABC7D7; background: #fff; color: #16638F;
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-sd-rt-btn:hover:not(:disabled) { border-color: #2fc6f6; background: #f3fbfe; }
.fm-sd-rt-btn:disabled { opacity: .45; cursor: default; }
.fm-sd-rt-btn.on { border-color: #16638F; background: #E8F4FB; }
/* Optical-balanced ▶/⏸/■ — equal hit-box, glyph centered */
.fm-sd-rt-ico {
  display: block; flex-shrink: 0; pointer-events: none; color: inherit;
}
.fm-sd-rt-ico-play {
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px; /* triangle optical center */
}
.fm-sd-rt-ico-pause {
  width: 12px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) left center / 4px 100% no-repeat,
    linear-gradient(currentColor, currentColor) right center / 4px 100% no-repeat;
}
.fm-sd-rt-ico-stop {
  width: 12px; height: 12px;
  background: currentColor;
  border-radius: 1.5px;
}
.fm-sd-ya-time {
  margin: 8px 0 0; padding: 10px 12px; border: 1px dashed #ABC7D7;
  border-radius: 8px; background: #F7FBFD;
}
.fm-sd-ya-time-lab {
  display: block; font-size: 12px; font-weight: 700; color: #092131; margin: 0 0 6px;
}
.fm-sd-ya-time-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fm-sd-ya-time-note { margin: 6px 0 0; font-size: 11px; color: #73737D; line-height: 1.35; }

/* Bitrix dual-col time popover — compact: cols filled, no giant white gap */
.fm-sd-ya-time-row,
.fm-sd-fact-row,
.fm-bx-time-wrap { position: relative; }
.fm-bx-time-pop {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 4px);
  min-width: 148px;
  background: #fff;
  border: 1px solid #C5CDD6;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(9,33,49,.14);
  padding: 6px 8px;
}
.fm-bx-time-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0 6px;
  height: 152px;
  align-items: stretch;
}
.fm-bx-time-colon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #16638F;
  line-height: 28px;
  height: 100%;
  z-index: 2;
  user-select: none;
  text-align: center;
}
.fm-bx-time-col {
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  /* compact pad: ~1 row above/below selected — колонки заполнены */
  padding: 12px 0;
  position: relative;
  z-index: 0;
  scrollbar-width: thin;
}
.fm-bx-time-col button {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  padding: 5px 4px;
  min-height: 28px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #092131;
  position: relative;
  z-index: 2;
  line-height: 1.2;
  box-sizing: border-box;
}
.fm-bx-time-col button:focus,
.fm-bx-time-col button:focus-visible {
  outline: 0;
  box-shadow: none;
}
.fm-bx-time-col button.on {
  background: #16638F;
  color: #fff;
  border-radius: 4px;
  outline: 0;
  box-shadow: none;
  border: 0;
}
.fm-bx-time-col button:hover:not(.on) { background: #E8F4FB; }
.fm-sd-fact-inp {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fm-sd-fact-inp[aria-expanded="true"] {
  border-color: #16638F;
  box-shadow: 0 0 0 2px rgba(22,99,143,.18);
}

/* —— v2: runtime after Я + Transfer swiper (зима/лето rail) + early reason —— */
.fm-sd-runtime {
  margin: 0 0 12px; padding: 12px; border: 1px solid #C9E2D0;
  border-radius: 10px; background: #F5FBF6;
}
.fm-sd-runtime-h {
  margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #092131;
}
.fm-sd-runtime-tag {
  display: inline-block; margin-left: 6px; padding: 2px 6px;
  font-size: 10px; font-weight: 700; border-radius: 4px;
  background: #e8f6ec; color: #1b7a6e; vertical-align: middle;
}
.fm-sd-runtime .fm-sd-ya-time {
  margin: 0 0 10px; border-color: #B7DCC0; background: #fff;
}
.fm-sd-rt-btns {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px;
}
.fm-sd-rt-btns .fm-sd-rt-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  padding: 0; border-radius: 12px;
  font-size: 0; line-height: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-sd-rt-btns .fm-sd-rt-lab {
  text-transform: none; letter-spacing: 0; font-weight: 600; color: #5B6470;
}
.fm-sd-ya-end {
  margin-top: 8px; padding: 10px 12px; border: 1px solid #ABC7D7;
  border-radius: 8px; background: #fff;
}
.fm-sd-ya-end.is-hidden { display: none !important; }
.fm-sd-early {
  margin-top: 10px; padding: 10px 12px; border: 1px solid #F0C14D;
  border-radius: 8px; background: #FFF8E8;
}
.fm-sd-early-lab {
  font-size: 12px; font-weight: 700; color: #8A6D00; margin: 0 0 8px;
}
.fm-sd-early-req {
  display: inline-block; margin-left: 4px; padding: 1px 5px;
  font-size: 10px; font-weight: 700; border-radius: 3px;
  background: #F0C14D; color: #5C4800;
}
.fm-sd-early-opts {
  display: flex; flex-direction: column; gap: 6px;
}
.fm-sd-early-opt {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: #1f2a37; cursor: pointer;
}
.fm-sd-early-opt input { margin-top: 2px; }
.fm-sd-early-text {
  width: 100%; margin-top: 8px; resize: vertical; min-height: 52px;
  font-family: inherit; font-size: 13px;
}
.fm-sd-early-err {
  margin: 8px 0 0; font-size: 12px; color: #B42318; font-weight: 600;
}

/* Transfer — iOS-style switch (принято). Full-width row: label + switch. */
.fm-sd-xfer-toggle {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #E4EAF0;
  border-radius: 10px;
  background: #fff;
}
.fm-sd-xfer-ios-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  margin-bottom: 6px;
}
.fm-sd-xfer-ios-lbl {
  font-size: 14px;
  font-weight: 650;
  color: #092131;
  line-height: 1.3;
}
.fm-sd-xfer-ios {
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #e9e9eb;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  transition: background .2s ease;
}
.fm-sd-xfer-ios::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 1px 1px rgba(0,0,0,.1);
  transition: transform .22s cubic-bezier(.4,.0,.2,1);
}
.fm-sd-xfer-ios.is-on { background: #34c759; }
.fm-sd-xfer-ios.is-on::after { transform: translateX(20px); }
.fm-sd-xfer-ios.is-locked,
.fm-sd-xfer-ios[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .92;
}
.fm-sd-xfer-ios.is-locked.is-on,
.fm-sd-xfer-ios[aria-disabled="true"].is-on {
  background: #2db350;
}
.fm-sd-xfer-ios:focus-visible {
  outline: 2px solid #2fc6f6;
  outline-offset: 3px;
}
/* Legacy sliding-pill kept for reference / rollback — unused in v2 */
.fm-sd-xfer-swiper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 3px;
  gap: 0;
  background: #EFF2F5;
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.fm-sd-xfer-swiper:focus-visible {
  outline: 2px solid #2fc6f6;
  outline-offset: 2px;
}
.fm-sd-xfer-swiper-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 8px;
  background: #FFF6E5;
  box-shadow: 0 1px 2px rgba(9,33,49,.12);
  transition: transform .2s ease, background .2s ease;
  pointer-events: none;
  z-index: 0;
}
.fm-sd-xfer-swiper.is-on .fm-sd-xfer-swiper-pill {
  transform: translateX(100%);
  background: #E8F4FB;
}
.fm-sd-xfer-swiper.is-dragging .fm-sd-xfer-swiper-pill {
  transition: none;
}
.fm-sd-xfer-swiper-opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6B7580;
  font-family: inherit;
  pointer-events: none;
  transition: color .15s ease;
}
.fm-sd-xfer-swiper-opt.is-active {
  color: #8A6D00;
}
.fm-sd-xfer-swiper.is-on .fm-sd-xfer-swiper-opt[data-xfer-on="1"].is-active {
  color: #16638F;
}
.fm-sd-xfer-toggle-hint {
  margin: 0; font-size: 11px; color: #73737D; line-height: 1.35;
}
.fm-sd-xfer-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.fm-sd-xfer-name { font-weight: 600; }
.fm-sd-xfer-mark {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .02em;
}
.fm-sd-xfer-mark.busy { background: #E8F3F9; color: #16638F; }
.fm-sd-xfer-mark.free { background: #E8F6EC; color: #1B7A6E; }

.fm-sd-info-edit {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 8px; border: 1px solid #D5DEE7; background: #fff;
  color: #16638F; border-radius: 8px; padding: 5px 10px;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.fm-sd-info-edit:hover { border-color: #2fc6f6; background: #f3fbfe; }
.fm-sd-bp-form-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
  margin-top: 12px;
}
.fm-sd-bp-form-actions .fm-btn-primary,
.fm-sd-bp-form-actions .fm-btn-ghost {
  min-height: 36px;
}
.fm-sd-bp-draft-hint {
  flex: 1 1 100%; margin: 0; font-size: 11px; color: #73737D; line-height: 1.35;
}
.fm-sd-snap-abbr {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.fm-sd-snap-w {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
/* Secondary: equal flex tiles, wrap if needed */
.fm-sd-snap-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  overflow-x: visible;
  padding: 2px 0 4px;
  margin: 0;
  box-sizing: border-box;
}
.fm-sd-snap-rail-cell {
  flex: 1 1 52px;
  min-width: 48px;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  gap: 3px;
  background: #fff;
  border: 2px solid #E4E7EB;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-sizing: border-box;
}
.fm-sd-snap-rail-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(9,33,49,.08);
}
.fm-sd-snap-rail-cell.on {
  border: 2px solid #092131;
  box-shadow: none;
}
.fm-sd-snap-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  flex: 0 0 auto;
}
.fm-sd-snap-word {
  font-size: 8px;
  font-weight: 500;
  color: #5A6168;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}
/* color tokens shared by primary cells + rail faces */
.fm-sd-cube-я { background: #C8E6C9; color: #1B5E20; }
/* РВ — зелень иначе (ярче/холоднее, чем Я) */
.fm-sd-cube-рв { background: #66BB6A; color: #0D3B12; }
.fm-sd-cube-нн { background: #F7C6CE; color: #8A1F2E; }
.fm-sd-cube-plan { background: #E8F6FC; color: #16638F; }
.fm-sd-cube-от { background: #EEE6F1; color: #6B3FA0; }
.fm-sd-cube-до { background: #ABC7D7; color: #1f2a37; }
.fm-sd-cube-б { background: #FFECD6; color: #8A4B12; }
.fm-sd-cube-ог { background: #D7CCC8; color: #4E342E; }
.fm-sd-cube-у { background: #AEAEAE; color: #fff; }
.fm-sd-cube-в { background: #ECEFF1; color: #455A64; }
.fm-sd-cube-р { background: #F8BBD0; color: #880E4F; }
.fm-sd-cube-ож { background: #E1BEE7; color: #4A148C; }
/* legacy cube/block classes kept for any residual markup / lab refs */
.fm-sd-code-block {
  background: #fff;
  border: 1px solid #E4E7EB;
  border-radius: 10px;
  padding: 10px 12px 8px;
  margin: 0 0 8px;
}
.fm-sd-code-block-lab {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #73737D;
  margin: 0 0 8px;
}
.fm-sd-cubes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.fm-sd-cube {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, box-shadow .12s ease;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.fm-sd-cube:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(9,33,49,.12); }
.fm-sd-cube.on { border-color: #092131; box-shadow: 0 0 0 2px rgba(9,33,49,.15); }
.fm-sd-cubes-hint { margin: 0 0 6px; font-size: 12px; color: #73737D; }
.fm-sd-cubes-leg { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-sd-cubes-leg-cur::before,
.fm-sd-cubes-leg-plan::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
  border-radius: 2px;
}
.fm-sd-cubes-leg-cur::before {
  border: 2px dashed #16638F;
  background: transparent;
}
.fm-sd-cubes-leg-plan::before {
  border: 2px solid #092131;
  background: #E8F4FB;
}
.fm-sd-cubes-tip {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #E4EAF0;
  background: #F7FBFD;
  font-size: 12.5px;
  line-height: 1.4;
  color: #535c69;
}
/* accept10: plan-alts button row removed (hover tip remains) */
.fm-sd-bp-process-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
}
/* Hub primary/danger pair — identical box (ui-btn height/padding) */
.fm-sd-bp-process-acts .fm-btn-process,
.fm-sd-bp-process-acts .fm-btn-defer {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  height: 36px;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  padding: 0 12px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}
/* Канон полной заявки: ui-btn-success / ui-btn-danger (app.css) */
.fm-sd-bp-process-acts .fm-btn-process {
  background: #bbed21;
  border-color: #bbed21;
  color: #535c69;
}
.fm-sd-bp-process-acts .fm-btn-process:hover {
  background: #a8d91c;
  border-color: #a8d91c;
  color: #333;
}
.fm-sd-bp-process-acts .fm-btn-defer {
  background: #ff5752;
  border-color: #ff5752;
  color: #fff;
}
.fm-sd-bp-process-acts .fm-btn-defer:hover {
  background: #e04843;
  border-color: #e04843;
}
.fm-sd-bp-process-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: #73737D;
  line-height: 1.35;
}
.fm-sd-bp-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.fm-sd-bp-help .fm-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: min(320px, 70vw);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d5dce4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, 0.12);
  font-size: 12px;
  color: #1f2a37;
  line-height: 1.4;
}
.fm-sd-bp-help .fm-tip p { margin: 0 0 8px; }
.fm-sd-bp-help .fm-tip p:last-child { margin: 0; }
.fm-sd-bp-file-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.fm-sd-bp-file-del,
.fm-sd-bp-docs .fm-sd-bp-file-del,
.fm-sd-bp-docs .ob-file-x {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #535c69 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1 !important;
  cursor: pointer;
  padding: 0;
  z-index: 3;
  box-shadow: 0 0 0 1.5px #fff;
  overflow: visible;
}
.fm-sd-bp-file-del:hover,
.fm-sd-bp-docs .fm-sd-bp-file-del:hover,
.fm-sd-bp-docs .ob-file-x:hover {
  background: #d52222 !important;
  color: #fff !important;
  border-color: transparent;
}
.fm-sd-bp-docs .fm-sd-bp-file-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  flex: 0 0 auto;
  padding: 4px 8px 0 2px;
  max-width: 56px;
  overflow: visible;
}
.fm-sd-bp-strip-cell.is-skip-off {
  opacity: 0.35;
  filter: grayscale(0.4);
  outline: 1px dashed #8A95A1;
}
.fm-sd-xfer-h {
  font-size: 12px;
  font-weight: 700;
  color: #092131;
  margin: 0 0 6px;
}
.fm-sd-xfer-howto {
  margin: 0 0 10px;
  font-size: 12px;
  color: #535c69;
  line-height: 1.4;
}
.fm-sd-xfer-acts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Status BP form (ОТ/ДО/Б/У) — контейнер прозрачный; врезки сами дают рамку */
.fm-sd-bp {
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.fm-sd-bp-block { margin: 0 0 10px; }
.fm-sd-bp-block + .fm-sd-bp-block { margin-top: 12px; }
.fm-sd-bp[data-code="У"] .fm-sd-bp-lab,
.fm-sd-bp[data-code="У"] .fm-sd-dismiss-note {
  padding-left: 2px;
}
.fm-sd-bp-lab {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #73737D;
  margin: 0 0 8px;
}
.fm-sd-bp-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}
.fm-sd-bp-range label { display: inline-flex; gap: 6px; align-items: center; }
.fm-sd-bp-range input[type="number"] { width: 56px; }

/* Calendar range — single dash · outline (no fog fill) */
.fm-sd-bp-range-field {
  position: relative;
  margin-bottom: 12px;
}
.fm-sd-bp-dash-lab {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #5c6b7a;
  margin-bottom: 6px;
}
.fm-sd-bp-dash-row {
  position: relative;
  border: 1px solid #C5CDD6;
  border-radius: 6px;
  background: #fff;
}
.fm-sd-bp-dash-inp {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 34px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #092131;
  background: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  text-align: center;
}
.fm-sd-bp-dash-inp:focus { outline: 0; }
.fm-sd-bp-dash-row:focus-within,
.fm-sd-bp-dash-row.is-half-from,
.fm-sd-bp-dash-row.is-half-to {
  border-color: #16638F;
  box-shadow: 0 0 0 2px rgba(22,99,143,.16);
}
.fm-sd-bp-dash-row.is-half-from::after,
.fm-sd-bp-dash-row.is-half-to::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 2px;
  background: #16638F;
  border-radius: 2px 2px 0 0;
  pointer-events: none;
}
.fm-sd-bp-dash-row.is-half-from::after {
  left: 8px;
  width: calc(50% - 18px);
}
.fm-sd-bp-dash-row.is-half-to::after {
  right: 8px;
  width: calc(50% - 18px);
}
.fm-sd-bp-dash-ph {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #B0B8C1;
  pointer-events: none;
  line-height: 1;
}
.fm-sd-bp-dash-ph--from { left: 10px; }
.fm-sd-bp-dash-ph--to { right: 10px; }
.fm-sd-bp-dash-row.is-half-from .fm-sd-bp-dash-ph--from,
.fm-sd-bp-dash-row.is-half-to .fm-sd-bp-dash-ph--to { color: #16638F; }
.fm-sd-bp-cal-pop {
  position: absolute;
  z-index: 20;
  left: 0; right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #D5DEE7;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(9,33,49,.12);
  padding: 12px;
}
.fm-sd-bp-bx-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.fm-sd-bp-bx-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #D5DEE7;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #455A64;
  font-family: inherit;
}
.fm-sd-bp-bx-nav-btn:hover { background: #f0f4f8; }
.fm-sd-bp-bx-title {
  flex: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #092131;
  text-transform: capitalize;
  padding: 6px 4px;
  border-radius: 6px;
}
.fm-sd-bp-bx-title:hover { background: #E8F4FB; color: #16638F; }
.fm-sd-bp-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.fm-sd-bp-cal-dow span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #9aa5b1;
  padding: 2px 0;
}
.fm-sd-bp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.fm-sd-bp-cal-empty { min-height: 40px; }
.fm-sd-bp-cal-day {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #092131;
}
.fm-sd-bp-cal-day .n {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.fm-sd-bp-cal-day .dots {
  display: flex;
  gap: 2px;
  min-height: 8px;
  align-items: center;
  justify-content: center;
}
.fm-sd-bp-cal-day .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}
.fm-sd-bp-cal-day .dots i.shi-morning { background: #F5A623; }
.fm-sd-bp-cal-day .dots i.shi-day { background: #2fc6f6; }
.fm-sd-bp-cal-day .dots i.shi-evening { background: #9B59B6; }
.fm-sd-bp-cal-day .dots i.shi-night { background: #34495E; }
.fm-sd-bp-cal-day:hover { background: #f0f4f8; }
.fm-sd-bp-cal-day.in-range { background: #E8F4FB; color: #16638F; }
.fm-sd-bp-cal-day.is-edge {
  background: #16638F;
  color: #fff;
}
.fm-sd-bp-cal-day.is-edge .dots i { box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.fm-sd-bp-cal-day.mute { color: #9aa5b1; }
.fm-sd-bp-cal-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #73737D;
}
.fm-sd-bp-bx-months,
.fm-sd-bp-bx-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fm-sd-bp-bx-months button,
.fm-sd-bp-bx-years button {
  border: 1px solid #E4EAF0;
  background: #fff;
  border-radius: 8px;
  padding: 14px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  color: #092131;
}
.fm-sd-bp-bx-months button:hover,
.fm-sd-bp-bx-years button:hover {
  background: #E8F4FB;
  border-color: #2fc6f6;
}
.fm-sd-bp-bx-months button.is-cur,
.fm-sd-bp-bx-years button.is-cur {
  background: #16638F;
  color: #fff;
  border-color: #16638F;
}

.fm-sd-bp-shift-range {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #F7F9FB;
  border: 1px solid #E4EAF0;
  border-radius: 8px;
}
.fm-sd-bp-shift-range-lab {
  font-size: 12px;
  font-weight: 650;
  color: #092131;
  margin: 0 0 8px;
}
.fm-sd-bp-count-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  justify-content: flex-start;
}
.fm-sd-bp-count-bar .fm-tc-m,
#fmSdBpCount.fm-tc-m {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #E4EAF0;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: #73737D;
  font-weight: 600;
}
.fm-sd-bp-count-bar .fm-tc-m b,
#fmSdBpCount.fm-tc-m b {
  font-size: 15px;
  color: #092131;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* Шахматка диапазона: даты сверху · плашки влево · fm-cell (не растягивать) */
.fm-sd-bp-chess {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
}
.fm-sd-bp-chess-days {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-start;
  align-items: flex-start;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}
.fm-sd-bp-chess-day {
  flex: 0 0 44px;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fm-sd-bp-chess-dow {
  font-size: 9px;
  font-weight: 650;
  color: #828b95;
  line-height: 1;
  text-transform: capitalize;
}
.fm-sd-bp-chess-num {
  font-size: 10px;
  font-weight: 700;
  color: #525C69;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.fm-sd-bp-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
  justify-content: flex-start; /* Павел: прижаты влево, не размазывать */
  align-items: flex-start;
  width: auto;
  max-width: 100%;
}
.fm-sd-bp-strip-cell.fm-cell {
  flex: 0 0 44px;
  width: 44px;
  max-width: 44px;
  min-height: 40px;
  padding: 3px 2px;
  cursor: pointer;
  font-family: inherit;
  margin: 0; /* не auto — иначе «размазывает» */
}
.fm-sd-bp-strip-cell.fm-cell .fm-cell-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}
.fm-sd-bp-strip-cell.fm-cell .fm-cell-code {
  font-size: 10px;
  font-weight: 700;
}
.fm-sd-bp-strip-cell.fm-cell .t {
  font-size: 8px;
  color: #455A64;
  font-weight: 600;
  margin-top: 1px;
}
/* in-range / will-skip — чистый fm-cell табеля, без «paint»-обводки */
.fm-sd-bp-strip-cell.fm-cell.in-range,
.fm-sd-bp-strip-cell.fm-cell.will-skip {
  outline: none;
  box-shadow: none;
  /* лёгкий акцент без красной/толстой рамки */
  filter: none;
}
.fm-sd-bp-strip-cell.fm-cell.plan.in-range,
.fm-sd-bp-strip-cell.fm-cell.plan.will-skip {
  background: #fff;
  border-color: #B8C4CE;
}
.fm-sd-bp-strip-cell.fm-cell.is-cur {
  box-shadow: none;
}
.fm-sd-bp-chess-empty-cell {
  flex: 0 0 44px;
  width: 44px;
  height: 40px;
  border: 1px dashed #D0D7DE;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}
.fm-sd-bp-empty { font-size: 12px; color: #73737D; }
.fm-sd-bp-force { display: none !important; } /* removed — Павел */
.fm-sd-bp-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 140px;
  height: 34px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid #8a94a0;
  border-radius: 6px;
  background: #fff;
  color: #1f2a37;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.fm-sd-bp-file-btn:hover { border-color: #535c69; background: #f5f7fa; }
.fm-sd-bp-file-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex: 0 0 auto;
}
.fm-sd-bp-file .fm-sd-bp-file-inp {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.fm-sd-bp-file { position: relative; }
.fm-sd-bp-process {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.fm-sd-bp-process-note {
  margin: 0;
  font-size: 12px;
  color: #5A6168;
  line-height: 1.4;
}
.fm-sd-bp-process-ctx {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fm-sd-bp-process-ctx .fm-ctx-pill {
  display: inline-flex;
  background: #e8eef3;
  border: 1px solid #cfd6de;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  color: #1f2a37;
}
.fm-sd-bp-process-ctx .fm-ctx-note {
  flex: 1 1 100%;
  font-size: 11px;
  color: #73737D;
  margin: 0;
}

/* Врезка процесса (У / ОТ / ДО / Б) — hub-pulpit / inset канон */
.fm-sd-bp-inset,
.fm-sd-apps-shell,
.fm-sd-xfer-shell {
  margin: 0 0 12px;
  border: 1px solid #cfd6de;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.fm-sd-bp-inset-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  color: #1f2a37;
  background: #eaf6fb;
  border-bottom: 1px solid #e0e4ea;
}
.fm-sd-bp-inset-n {
  width: 22px; height: 22px; border-radius: 50%;
  background: #2fc6f6; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
/* legacy — У FS = .fm-board-focus-btn (канон таблицы); не ↗ pill */
.fm-sd-u-focus-btn { display: none !important; }
.fm-sd-bp-inset-h .fm-board-focus-btn {
  margin-left: auto;
  flex: 0 0 auto;
}
.fm-sd-bp-inset-body {
  padding: 12px 14px 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* accept11: chips must not eat left inset */
}
.fm-sd-bp-frame {
  display: block;
  width: 100%;
  min-height: 420px;
  height: min(62vh, 560px);
  border: 0;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}
/* Даты отсутствия — та же врезка, что У */
.fm-sd-bp > .fm-sd-bp-inset { margin-bottom: 0; }
.fm-sd-bp-dates-inset .fm-sd-bp-inset-h .fm-help-mini { margin-left: auto; }
/* Запуск заявки / Transfer — один контейнер: шапка-тумблер = inset-h */
.fm-sd-apps-shell.is-on,
.fm-sd-xfer-shell.is-on {
  border-color: #b7d3e4;
  box-shadow: 0 0 0 1px rgba(22, 99, 143, 0.06);
}
.fm-sd-bp-apps-toggle,
.fm-sd-apps-toggle,
.fm-sd-xfer-shell > .fm-sd-xfer-toggle {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #eaf6fb;
}
.fm-sd-apps-shell .fm-sd-apps-toggle,
.fm-sd-xfer-shell > .fm-sd-xfer-toggle {
  border-bottom: 1px solid transparent;
}
.fm-sd-apps-shell.is-on .fm-sd-apps-toggle,
.fm-sd-xfer-shell.is-on > .fm-sd-xfer-toggle {
  border-bottom-color: #e0e4ea;
}
.fm-sd-apps-shell .fm-sd-xfer-ios-row,
.fm-sd-xfer-shell .fm-sd-xfer-ios-row {
  margin-bottom: 4px;
}
.fm-sd-apps-shell .fm-sd-xfer-ios-lbl,
.fm-sd-xfer-shell .fm-sd-xfer-ios-lbl {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a37;
}
.fm-sd-bp-apps-panel[hidden],
.fm-sd-apps-panel[hidden],
.fm-sd-xfer-panel[hidden] { display: none !important; }
.fm-sd-bp-apps-panel,
.fm-sd-apps-panel,
.fm-sd-xfer-panel {
  margin: 0;
  padding: 12px 14px 14px;
  background: #fff;
}
/* Внутри apps-shell контент без второй шапки-врезки (тумблер = шапка) */
.fm-sd-apps-shell .fm-sd-bp-inset {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}
.fm-sd-apps-shell .fm-sd-bp-inset-h { display: none; }
/* У/НН fire: тумблер apps ≠ заголовок «1.Заявка» — inset-h + FS оставляем */
.fm-sd-apps-shell[data-fire-apps="1"] .fm-sd-bp-inset-h {
  display: flex;
  background: #f5f7f9;
  border-bottom-color: #e0e4ea;
}
.fm-sd-apps-shell[data-recruit-apps="1"] .fm-sd-bp-inset-h {
  display: flex;
  background: #f5f7f9;
  border-bottom-color: #e0e4ea;
}
.fm-sd-apps-shell[data-recruit-apps="1"] .fm-sd-bp-inset-body {
  padding: 10px 14px 12px;
}
.fm-sd-apps-shell[data-fire-apps="1"] .fm-sd-bp-inset {
  border-top: 1px solid #e0e4ea;
}
.fm-sd-apps-shell .fm-sd-bp-inset-body { padding: 0; }
/* Transfer — без отдельной рамки у списка; панель внутри shell */
.fm-sd-xfer-shell .fm-sd-xfer {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.fm-sd-xfer-toggle {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfd6de;
  border-radius: 10px;
  background: #fff;
}
.fm-sd-xfer-shell > .fm-sd-xfer-toggle {
  margin: 0;
  border: 0;
  border-radius: 0;
}
/* Два native date · lab #03 принято */
.fm-sd-bp-native-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fm-sd-bp-native-half {
  flex: 1 1 120px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fm-sd-bp-native-ph {
  font-size: 11px;
  font-weight: 700;
  color: #73737D;
  letter-spacing: 0.02em;
}
.fm-sd-bp-native-inp {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #C6CDD3;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}
.fm-sd-bp-native-inp:focus {
  outline: 0;
  border-color: #2fc6f6;
  box-shadow: 0 0 0 2px rgba(47, 198, 246, 0.2);
}
.fm-sd-bp-native-dash {
  flex: 0 0 auto;
  color: #8A9299;
  font-weight: 700;
  padding-top: 16px;
}

/* Блок заданий сотрудника — правая колонка layout B */
.fm-sd-tasks-block {
  border-color: #F0C14D;
  background: linear-gradient(180deg, #FFFBF0 0%, #fff 48%);
  box-shadow: 0 0 0 1px rgba(240, 193, 77, .22);
}
.fm-sd-tasks-block .fm-sd-ob-ctx-h {
  color: #8A6D00;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 0;
}
.fm-sd-tasks-block .fm-sd-ob-ctx-h-lab {
  flex: 0 0 auto;
}
.fm-sd-tasks-block .fm-help-mini {
  flex: 0 0 auto;
  position: static;
}
.fm-sd-tasks-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto; /* правый край шапки «Задания» */
  border-radius: 9px;
  background: #F0C14D;
  color: #5C4800;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
.fm-sd-tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fm-sd-tasks-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #E8D49A;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.fm-sd-tasks-item:hover { border-color: #16638F; background: #F0F7FA; }
.fm-sd-tasks-item.is-overdue {
  border-color: #F0A8A8;
  background: #FFF5F5;
}
.fm-sd-tasks-item:disabled,
.fm-sd-tasks-item.is-disabled {
  opacity: .62;
  cursor: default;
  pointer-events: none;
  border-color: #E0E4EA;
  background: #F5F7F9;
  color: #8A9299;
  filter: grayscale(.35);
}
/* accept11·6 / cosmetics: черновик в Заданиях — плотный серый (не бледный, не красный) */
.fm-sd-tasks-item.is-draft-live {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  border-color: #C5CAD3;
  background: #E8EAEE;
  color: #525C69;
  filter: none;
  box-shadow: none;
}
.fm-sd-tasks-item.is-draft-live:hover {
  border-color: #A8AEB8;
  background: #DEE1E6;
}
.fm-sd-tasks-item.is-draft-live .fm-sd-tasks-item-title {
  color: #3F474F;
  font-weight: 650;
}
.fm-sd-tasks-draft-chip {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #B0B6C0;
  color: #2F363E;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.4;
  vertical-align: middle;
}
.fm-sd-tasks-item.is-disabled .fm-sd-tasks-item-title {
  color: #8A9299;
  font-weight: 600;
}
/* accept11·1: бейдж черновика — серый disabled (как Success), без обводки */
.fm-sd-bp-draft-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #E0E4EA;
  color: #828B95;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  border: 1px solid #D5DCE4;
}
.fm-sd-bp-inset.is-draft {
  position: relative;
  outline: none;
  border-radius: 10px;
}
/* Рабочая зона под заголовком — overlay не перекрывает inset-h */
.fm-sd-bp-inset-work {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
}
.fm-sd-bp-inset.is-draft .fm-sd-bp-frame,
.fm-sd-bp-inset.is-draft .fm-sd-bp-inset-body {
  opacity: .55;
  pointer-events: none;
  filter: grayscale(.2);
}
.fm-sd-bp-inset.is-draft .fm-sd-bp-frame {
  min-height: 140px;
  height: 168px;
}
/* Черновик: заглушка-прототип вместо iframe */
.fm-sd-bp-draft-stub {
  position: relative;
  min-height: 200px;
  height: 220px;
  margin: 0;
  background: #F5F7F9;
  border-top: 1px solid #E8ECF1;
  pointer-events: none;
  overflow: hidden;
}
.fm-sd-bp-draft-stub-chrome {
  padding: 18px 20px;
  opacity: .55;
  filter: grayscale(.15);
}
.fm-sd-bp-draft-stub-bar {
  height: 10px;
  width: 42%;
  border-radius: 4px;
  background: #D5DCE4;
  margin-bottom: 14px;
}
.fm-sd-bp-draft-stub-line {
  height: 8px;
  width: 78%;
  border-radius: 4px;
  background: #E0E4EA;
  margin-bottom: 10px;
}
.fm-sd-bp-draft-stub-line.is-short { width: 48%; }
.fm-sd-bp-draft-stub-line.is-mid { width: 62%; margin-bottom: 0; }
.fm-sd-bp-draft-stub-block {
  height: 56px;
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
  background: #E8ECF1;
  border: 1px solid #D5DCE4;
  margin: 4px 0 12px;
}
/* Плашка черновика — по центру заглушки, читаемо */
.fm-sd-bp-draft-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  right: auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(300px, calc(100% - 28px));
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(245, 247, 249, 0.98);
  border: 1px solid #D5DCE4;
  box-shadow: 0 2px 10px rgba(20, 28, 40, 0.08);
  pointer-events: auto;
  text-align: center;
  box-sizing: border-box;
}
.fm-sd-bp-draft-overlay-lab {
  font-size: 13px;
  font-weight: 700;
  color: #525C69;
  letter-spacing: .02em;
}
.fm-sd-bp-draft-overlay-txt {
  flex: 0 1 auto;
  font-size: 12px;
  color: #6A737C;
  line-height: 1.4;
  max-width: 26em;
}
.fm-sd-bp-draft-overlay .fm-sd-bp-continue {
  margin-top: 2px;
}
/* A: formal_none — плашка по центру stub (как черновик) */
.fm-sd-bp-draft-overlay.is-formal {
  background: rgba(245, 247, 249, 0.98);
}
.fm-sd-bp-draft-overlay.is-formal .fm-sd-bp-draft-overlay-txt {
  font-size: 13px;
  font-weight: 600;
  color: #535C69;
  max-width: 22em;
}
.fm-sd-bp-inset.is-formal-blocked {
  pointer-events: none;
}
.fm-sd-bp-inset.is-formal-blocked .fm-board-focus-btn {
  display: none;
}
/* B: loader в месте запуска У (врезка / FS) — сразу, не пустой экран */
.fm-sd-bp-frame-wrap,
.fm-term-frame-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}
.fm-sd-bp-frame-wrap .fm-sd-bp-frame {
  flex: 1 1 auto;
}
.fm-term-frame-wrap .fm-term-frame {
  flex: 1 1 auto;
  min-height: 0;
}
.fm-sd-bp-frame-wait {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #F5F7F9;
  color: #535C69;
  font-size: 14px;
  box-sizing: border-box;
}
.fm-sd-bp-frame-wrap.is-loading .fm-sd-bp-frame-wait,
.fm-term-frame-wrap.is-loading .fm-sd-bp-frame-wait {
  display: flex;
}
.fm-sd-bp-frame-wrap.is-loading .fm-sd-bp-frame,
.fm-term-frame-wrap.is-loading .fm-term-frame {
  opacity: 0;
}
/* legacy strip — не использовать для У; оставлен muted на случай OT */
.fm-sd-bp-draft-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #EEF0F3;
  border: 1px solid #D5D8DE;
}
.fm-sd-bp-draft-strip-lab {
  font-size: 12px;
  font-weight: 800;
  color: #6B737C;
}
.fm-sd-bp-draft-strip-txt {
  flex: 1 1 160px;
  font-size: 12px;
  color: #8A9299;
}
.fm-sd-tasks-item.is-submitted {
  border-color: #B7DCC8;
  background: #F3FAF5;
}
.fm-sd-tasks-item-title {
  font-size: 12px;
  font-weight: 650;
  color: #092131;
  line-height: 1.3;
}
.fm-sd-tasks-item.is-overdue .fm-sd-tasks-item-title { color: #B42318; }
.fm-sd-tasks-item-meta {
  font-size: 10px;
  color: #8A9299;
  font-weight: 600;
}
.fm-sd-tasks-empty {
  margin: 0;
  font-size: 12px;
  color: #828b95;
  line-height: 1.35;
}
.fm-sd-tasks-hint {
  margin: 8px 0 0;
  font-size: 10px;
  color: #A0A8B0;
  line-height: 1.3;
}
.fm-sd-bp-note,
.fm-sd-bp-stub,
.fm-sd-bp-gate {
  margin: 6px 0 0;
  font-size: 12px;
  color: #73737D;
  line-height: 1.35;
}
.fm-sd-bp-gate { color: #8A4B12; }
.fm-sd-bp-draft-lamp {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 650;
  color: #6B3FA0;
}
.fm-badge-bp-draft {
  background: #F3ECF8;
  color: #6B3FA0;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
.fm-badge-bp-draft.is-queued {
  background: #E8F4FB;
  color: #16638F;
}
.fm-badge-bp-draft.is-due {
  background: #FFF1F0;
  color: #B42318;
}

/* п.7 файл · одна линия как Кадры/termination (.ob-ws-row) · chip влезает без clip */
.fm-sd-bp-docs {
  margin: 0 0 10px;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  overflow: hidden; /* accept11: contain chips, keep left inset */
  background: #fff;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 2px 0;
}
.fm-sd-bp-docs.is-err {
  border-color: #F14A4A;
  box-shadow: inset 0 0 0 1px rgba(241,74,74,.25);
}
.fm-sd-bp-docs .ob-ws-row {
  grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.25fr);
  padding: 8px 12px 10px !important; /* accept11: keep L/R inset with chips */
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.fm-sd-bp-docs .ob-ws-arch-cell { display: none; }
.fm-sd-bp-docs .ob-ws-files-cell { min-width: 0; max-width: 100%; overflow: hidden; }
.fm-sd-bp-docs .ob-ws-files-row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 8px;
  overflow: hidden;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
}
.fm-sd-bp-docs .ob-ws-files-row.is-empty { overflow: visible; flex-wrap: wrap; }
.fm-sd-bp-docs .ob-ws-files {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 8px;
  align-items: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 2px 2px 0 0;
}
.fm-sd-bp-docs .ob-ws-comment-wrap { min-width: 0; }
.fm-sd-bp-docs .ob-ws-comment { width: 100%; }
.fm-sd-bp-file { /* legacy alias */ }
.fm-sd-bp-file.is-err,
.fm-sd-bp-docs.is-err .ob-ws-row { background: #FFF8F7; }
.fm-sd-bp-file-lab { display: none; }
.fm-sd-bp-docs .fm-sd-bp-file-item {
  /* visibility of × — see shared .fm-sd-bp-file-del rules above */
}
.fm-sd-bp-docs .fm-sd-bp-file-del {
  /* kept for specificity; styles unified above */
}
.fm-sd-bp-docs .ob-ws-filechip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 0 0 auto; width: 40px; min-width: 40px; max-width: 40px;
  padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit;
}
.fm-sd-bp-docs .ob-ws-filechip:hover .ob-ws-fname { color: #2067b0; }
.fm-sd-bp-docs .ob-ws-fico {
  position: relative; width: 24px; height: 28px; display: block; flex-shrink: 0;
}
.fm-sd-bp-docs .ob-ws-fico-sheet {
  position: absolute; inset: 0 2px 1px 0; border-radius: 2px;
  background: #e8eaed; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.fm-sd-bp-docs .ob-ws-fico-sheet::before {
  content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 7px;
  background: linear-gradient(135deg, #cfd4da 50%, transparent 50%);
  border-radius: 0 2px 0 0;
}
.fm-sd-bp-docs .ob-ws-fico-lines {
  position: absolute; left: 4px; right: 5px; top: 7px; height: 7px;
  background: repeating-linear-gradient(to bottom, #b0b6be 0 1.5px, transparent 1.5px 3.5px);
  opacity: .55;
}
.fm-sd-bp-docs .ob-ws-fico-badge {
  position: absolute; left: -1px; right: 1px; bottom: 3px; height: 10px; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6.5px; font-weight: 800; letter-spacing: .03em; color: #fff; line-height: 1;
}
.fm-sd-bp-docs .ob-ws-fname {
  font-size: 9px; line-height: 1.15; color: #525C69; max-width: 40px; width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}
.fm-sd-bp-docs .ob-ws-fico.pdf .ob-ws-fico-sheet { background: #f5b8a8; }
.fm-sd-bp-docs .ob-ws-fico.pdf .ob-ws-fico-badge { background: #c62828; }
.fm-sd-bp-docs .ob-ws-fico.img .ob-ws-fico-sheet { background: #dde3f7; }
.fm-sd-bp-docs .ob-ws-fico.img .ob-ws-fico-badge { background: #5c6bc0; }
.fm-sd-bp-docs .ob-ws-fico.img .ob-ws-fico-lines { display: none; }
.fm-sd-bp-docs .ob-ws-fico.word .ob-ws-fico-sheet { background: #d6e4f5; }
.fm-sd-bp-docs .ob-ws-fico.word .ob-ws-fico-badge { background: #2b579a; }
.fm-sd-bp-docs .ob-ws-fico.file .ob-ws-fico-sheet { background: #e8eaed; }
.fm-sd-bp-docs .ob-ws-fico.file .ob-ws-fico-badge { background: #607d8b; }
.fm-sd-bp-docs .ob-ws-fico.excel .ob-ws-fico-sheet { background: #d4edda; }
.fm-sd-bp-docs .ob-ws-fico.excel .ob-ws-fico-badge { background: #1d6f42; }
.fm-sd-bp-docs .fm-sd-bp-file-inp {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  overflow: hidden; clip: rect(0,0,0,0); pointer-events: none;
}
.fm-sd-bp-file-row {
  display: contents;
}
.fm-sd-bp-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  min-width: 0;
}
.fm-sd-bp-file .ob-ws-upload-ico,
.fm-sd-bp-file-plus,
.fm-sd-bp-docs .fm-sd-bp-file-plus {
  width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: #2fc6f6; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(47,198,246,.3); flex: 0 0 auto;
}
.fm-sd-bp-file .ob-ws-upload-ico:hover,
.fm-sd-bp-file-plus:hover,
.fm-sd-bp-docs .fm-sd-bp-file-plus:hover { background: #1eb5e5; }
.fm-sd-bp-file .ob-ws-upload-ico svg,
.fm-sd-bp-file-plus svg,
.fm-sd-bp-docs .fm-sd-bp-file-plus svg { width: 14px; height: 14px; display: block; fill: currentColor; }
.fm-sd-bp-file-inp,
.fm-sd-bp-file .fm-sd-bp-file-inp {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}
.fm-sd-bp-file-empty {
  font-size: 12px;
  color: #8A9299;
  align-self: center;
}
.fm-sd-bp-file-name { display: none; }
/* legacy .fm-sd-bp-file chip tokens (kept for older markup) */
.fm-sd-bp-file .ob-ws-filechip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 0 0 auto; width: 40px; min-width: 40px;
  padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit;
}
.fm-sd-bp-file .ob-ws-filechip:hover .ob-ws-fname { color: #2067b0; }
.fm-sd-bp-file .ob-ws-fname {
  font-size: 9px; line-height: 1.15; color: #525C69; max-width: 40px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}
.fm-sd-bp-file .ob-ws-fico {
  position: relative; width: 24px; height: 28px; display: block; flex-shrink: 0;
}
.fm-sd-bp-file .ob-ws-fico-sheet {
  position: absolute; inset: 0 2px 1px 0; border-radius: 2px;
  background: #e8eaed; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.fm-sd-bp-file .ob-ws-fico-sheet::before {
  content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 7px;
  background: linear-gradient(135deg, #cfd4da 50%, transparent 50%);
  border-radius: 0 2px 0 0;
}
.fm-sd-bp-file .ob-ws-fico-lines {
  position: absolute; left: 4px; right: 5px; top: 7px; height: 7px;
  background: repeating-linear-gradient(to bottom, #b0b6be 0 1.5px, transparent 1.5px 3.5px);
  opacity: .55;
}
.fm-sd-bp-file .ob-ws-fico-badge {
  position: absolute; left: -1px; right: 1px; bottom: 3px; height: 10px; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6.5px; font-weight: 800; letter-spacing: .03em; color: #fff; line-height: 1;
}
.fm-sd-bp-file .ob-ws-fico.pdf .ob-ws-fico-sheet { background: #f5b8a8; }
.fm-sd-bp-file .ob-ws-fico.pdf .ob-ws-fico-badge { background: #c62828; }
.fm-sd-bp-file .ob-ws-fico.img .ob-ws-fico-sheet { background: #dde3f7; }
.fm-sd-bp-file .ob-ws-fico.img .ob-ws-fico-badge { background: #5c6bc0; }
.fm-sd-bp-file .ob-ws-fico.img .ob-ws-fico-lines { display: none; }
.fm-sd-bp-file .ob-ws-fico.word .ob-ws-fico-sheet { background: #d6e4f5; }
.fm-sd-bp-file .ob-ws-fico.word .ob-ws-fico-badge { background: #2b579a; }
.fm-sd-bp-file .ob-ws-fico.file .ob-ws-fico-sheet { background: #e8eaed; }
.fm-sd-bp-file .ob-ws-fico.file .ob-ws-fico-badge { background: #607d8b; }
.fm-sd-bp-file .ob-ws-fico.excel .ob-ws-fico-sheet { background: #d4edda; }
.fm-sd-bp-file .ob-ws-fico.excel .ob-ws-fico-badge { background: #1d6f42; }
.fm-sd-bp-comment-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.fm-sd-bp-comment {
  flex: 1;
  min-width: 0;
  border: 1px solid #d5dce4;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}
.fm-sd-bp-lab {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fm-sd-bp-lab .fm-tip {
  position: absolute;
  z-index: 30;
  max-width: 280px;
  margin-top: 28px;
}
.fm-sd-xfer-ios-row .fm-help-mini {
  margin-left: auto;
  margin-right: 8px;
}
/* R14 Инструкции: chrome как shift/R10a + edge close/link/FS; фон белый; ширина уже */
.fm-sd-help-drawer {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.fm-sd-help-drawer[hidden] { display: none !important; }
.fm-sd-help-drawer:not([hidden]) {
  pointer-events: none; /* клики только shell/edge/panel */
}
.fm-sd-help-drawer-bg {
  display: none;
}
.fm-sd-help-shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: stretch;
  max-width: 100%;
  pointer-events: auto;
}
.fm-sd-help-edge {
  /* тот же .fm-slider-edge — вертикальный блок close / link / FS */
  align-self: flex-start;
}
.fm-sd-help-drawer-panel {
  position: relative;
  z-index: 1;
  /* R10a: min(1100px,96vw) · R14 уже (размерный diff): */
  width: min(440px, 94vw);
  max-width: 94vw;
  height: 100%;
  background: #fff;
  border-radius: 16px 0 0 16px;
  border: 1px solid #d5dee7;
  border-right: 0;
  overflow: hidden;
  box-shadow: -10px 0 36px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  animation: fmSdHelpIn .18s ease-out;
}
.fm-sd-help-drawer-panel.is-help-fs {
  width: min(1100px, 96vw); /* edge «на весь экран» — временно как R10a */
}
@keyframes fmSdHelpIn {
  from { transform: translateX(16px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.fm-sd-help-drawer-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #E0E4EA;
  font-size: 15px;
  background: #fff;
  flex-shrink: 0;
}
.fm-sd-help-drawer-body {
  padding: 14px 16px 24px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2a37;
  background: #fff; /* белый · не путать с process FS R10a (#F0F2F5) */
}
.fm-sd-help-drawer-body .fm-tip-src,
.fm-tip .fm-tip-src {
  margin-top: 8px;
  font-size: 11px;
  color: #828B95;
}
.fm-sd-ob-ctx-lbl .fm-help-mini {
  vertical-align: middle;
  margin-left: 2px;
}
.fm-sd-ot .fm-sd-ob-ctx-h {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 18px;
}
.fm-sd-ot .fm-sd-ob-ctx-h-lab { flex: 0 0 auto; }
.fm-sd-ot .fm-help-mini { position: static; flex: 0 0 auto; }
/* «?» шапки карточки смены — правый край top */
.fm-sd-shift-actions {
  flex: 0 0 auto;
  margin-left: auto;
  order: 1;
  position: relative;
}
.fm-sd-shift-actions .fm-actions-btn {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 28px;
}
.fm-sd-shift-actions .fm-actions-drop {
  right: 0;
  left: auto;
  min-width: 220px;
  z-index: 40;
}
.fm-sd-shift-card-help {
  flex: 0 0 auto;
  margin-left: 6px;
  order: 2;
}
.fm-sd-help-drawer-body h4 {
  margin: 14px 0 6px;
  font-size: 13px;
  color: #092131;
}
.fm-sd-help-drawer-body p { margin: 0 0 8px; }
.fm-sd-help-drawer-body ol,
.fm-sd-help-drawer-body ul { margin: 0 0 8px; padding-left: 18px; }
.fm-sd-help-drawer-body li { margin: 0 0 6px; }
.fm-sd-help-fig {
  margin: 8px 0 12px;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f9fb;
}
.fm-sd-help-fig img,
.fm-sd-help-fig video {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}
.fm-sd-help-fig figcaption {
  padding: 6px 10px 8px;
  font-size: 11px;
  line-height: 1.35;
  color: #73737d;
  border-top: 1px solid #e8ecf1;
}
body.fm-sd-help-open .fm-slider,
body.fm-sd-help-open .fm-slider-panel {
  filter: none !important;
  opacity: 1 !important;
}
/* Multi-select: все ячейки одного дизайна; выкл = приглушение, без «выделенного» look */
.fm-sd-bp-strip-cell.is-skip-off {
  opacity: 0.38;
  filter: grayscale(0.25);
}
.fm-sd-bp-strip-cell.is-skip-on,
.fm-sd-bp-strip-cell.will-skip {
  box-shadow: none;
  outline: none;
}
.fm-sd-bp-strip-cell.fm-cell.is-cur {
  /* не выделять «текущую» смену в шахматке ОТ — тот же канон ячейки */
  box-shadow: none;
}
/* Docs preview · centered popup over full page (not iframe inset). */
.ob-preview-backdrop,
.fm-sd-file-preview-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  background: rgba(20,28,40,.55) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}
.ob-preview-panel,
.fm-sd-file-preview-panel {
  background: #fff; border-radius: 12px;
  width: min(960px, 96vw); height: min(88vh, 920px);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.25);
  flex: 0 1 auto;
}
.ob-preview-head,
.fm-sd-file-preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid #e8ecf1; font-weight: 650;
  flex: 0 0 auto;
}
.ob-preview-body,
.fm-sd-file-preview-body {
  position: relative;
  flex: 1; min-height: 0; background: #f0f2f5;
}
.ob-preview-body iframe,
.ob-preview-body img,
.ob-preview-body embed,
.fm-sd-file-preview-body iframe,
.fm-sd-file-preview-body img {
  width: 100%; height: 100%; border: 0; object-fit: contain; background: #fff;
}
.fm-sd-preview-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff;
}
.ob-preview-body .ob-ws-preview-wait,
.fm-sd-file-preview-body .ob-ws-preview-wait {
  position: absolute; inset: 0; z-index: 2; background: #f0f2f5;
}
/* как termination/onboarding · dosбор */
.ob-ws-preview-wait {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 100%; color: #535c69; font-size: 14px; padding: 16px; box-sizing: border-box;
}
.ob-ws-preview-spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #cfd6de; border-top-color: #2fc6f6;
  animation: fmSdPreviewSpin .7s linear infinite; flex: 0 0 auto;
}
@keyframes fmSdPreviewSpin { to { transform: rotate(360deg); } }
/* accept10: attach wait — same spin language as preview */
.fm-sd-bp-docs {
  position: relative;
}
.fm-sd-bp-upload-wait {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(240, 242, 245, 0.92);
  color: #535c69;
  font-size: 13px;
  box-sizing: border-box;
}
.fm-sd-bp-docs.is-uploading .fm-sd-bp-upload-wait {
  display: flex;
}
.fm-sd-bp-plaque {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #E6E9ED;
}
/* accept11·1: Черновик plaque (ОТ/ДО) = как Успех, но серый disabled; текст/кнопка поверх */
.fm-sd-bp-plaque.is-draft {
  position: relative;
  background: #EEF0F3;
  border-color: #D5D8DE;
  color: #525C69;
}
.fm-sd-bp-plaque.is-draft .fm-sd-bp-plaque-title {
  color: #8A9299;
  font-weight: 800;
  letter-spacing: .02em;
}
.fm-sd-bp-plaque.is-draft .fm-sd-bp-plaque-text,
.fm-sd-bp-plaque.is-draft .fm-sd-bp-plaque-file {
  color: #6B737C;
}
.fm-sd-bp-plaque.is-draft .fm-sd-bp-continue {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}
.fm-sd-bp-plaque.is-submitted {
  background: #E8F4FB;
  border-color: #B7D7EA;
}
.fm-sd-bp-plaque.is-success {
  background: #E8F6EE;
  border-color: #A8D5B5;
}
.fm-sd-bp-plaque.is-success .fm-sd-bp-plaque-title {
  color: #1B6B3A;
}
/* legacy blocked plaque — prefer .fm-sd-bp-formal-block */
.fm-sd-bp-plaque.is-blocked-formal {
  background: #F5F7F9;
  border-color: #E0E4EA;
}
.fm-sd-bp-plaque.is-blocked-formal .fm-sd-bp-plaque-title {
  color: #8A9299;
}
.fm-sd-bp-plaque.is-blocked-formal .fm-sd-bp-plaque-text {
  color: #6B737C;
}
.fm-sd-bp-inset.is-blocked-formal {
  opacity: .72;
  pointer-events: none;
  filter: grayscale(.35);
  background: #F5F7F9;
}
.fm-sd-bp-plaque.is-stub {
  background: #F5F0FA;
  border-color: #D4C4E8;
}
.fm-sd-bp-plaque.is-stub .fm-sd-bp-plaque-title {
  color: #5E35B1;
}
.fm-sd-bp-plaque-title {
  font-size: 13px;
  font-weight: 700;
  color: #092131;
  margin: 0 0 4px;
}
.fm-sd-bp-plaque-text,
.fm-sd-bp-plaque-file {
  margin: 0;
  font-size: 12px;
  color: #455A64;
  line-height: 1.4;
}
.fm-sd-bp-plaque-file { margin-top: 4px; color: #73737D; }
.fm-ctx button[hidden] { display: none !important; }
.fm-ctx-sel { border-top: 1px solid #EEEEEE !important; margin-top: 4px; color: #16638F !important; }
.fm-cell.hole, .fm-cell.cov-bad {
  background: #FFF1F0; border: 1px dashed #F14A4A; color: #B42318;
  font-size: 14px; font-weight: 700; cursor: grab;
}
.fm-cell.cov-wait { background: #FFF8E8; color: #8A6D00; cursor: default; font-size: 12px; }
.fm-cell-kebab {
  position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
  border: 0; background: #fff; color: #8A9299; font-size: 10px; line-height: 1;
  border-radius: 3px; cursor: pointer; padding: 0; opacity: 0;
  box-shadow: 0 0 0 1px #DEDEDE;
}
.fm-cell.hole:hover .fm-cell-kebab { opacity: 1; }
.fm-cell-kebab:hover { color: #16638F; }
/* Выходной: кебаб менее заметный, чем «+» на пустом слоте */
.fm-cell.v { position: relative; }
.fm-cell.v .fm-cell-dayoff-kebab { opacity: 0; }
.fm-cell.v:hover .fm-cell-dayoff-kebab { opacity: 0.45; }
.fm-cell.v .fm-cell-dayoff-kebab:hover { opacity: 1; color: #16638F; }

/* Create-shift · R10 chrome, narrow (≠ edit 920px) · R14-like width · v01 stack */
.fm-slider-panel.fm-slider-shift.is-create {
  width: min(440px, 94vw);
  position: relative;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-layout {
  grid-template-columns: 1fr;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-side {
  position: static !important;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-snap-pri {
  flex-wrap: wrap;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-h {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 22px;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-h-lab {
  flex: 0 0 auto;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-h .fm-help-mini {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
}
.fm-cs-fact-block { margin-top: 2px; }
.fm-cs-date-row,
.fm-cs-time-row {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  white-space: nowrap; min-width: 0;
}
.fm-cs-date-row .fm-sd-bp-native-inp {
  max-width: 160px;
  flex: 0 0 auto;
  min-width: 132px;
}
.fm-cs-now-link {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-row {
  flex-wrap: nowrap;
  align-items: center;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-val {
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-date-row {
  width: 100%;
  justify-content: flex-end;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips.fm-legend.fm-shift-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift {
  width: auto; height: 28px; padding: 0 8px 0 6px; gap: 5px;
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  background: #fff; color: #5D5D5D;
  border: 1px solid #DEDEDE; border-radius: 6px;
  font-family: inherit; line-height: 1;
  cursor: pointer; user-select: none;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift .fm-shi {
  width: 14px; height: 14px; display: block; flex-shrink: 0;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift.morning {
  color: #C45C26; background: #FFF3E8; border-color: #F0D7C0;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift.day {
  color: #9A6B00; background: #FFF6CC; border-color: #E6D48A;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift.evening {
  color: #6B3FA0; background: #F3ECFA; border-color: #DDD0EA;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift.night {
  color: #3A4A6B; background: #E8ECF4; border-color: #CDD3E0;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-cs-shift-chips .fm-leg.shift.on {
  outline: 2px solid #16638F; outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(22, 99, 143, 0.18);
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-ctx-val:has(.ob-pick-bar) {
  text-align: left;
  font-weight: 400;
  max-width: none;
  width: 100%;
}
.fm-slider-panel.fm-slider-shift.is-create .ob-pick-bar {
  width: 100%;
  display: flex;
  align-items: stretch;
}
.fm-slider-panel.fm-slider-shift.is-create .ob-pick-bar .main-ui-filter-chip {
  cursor: pointer;
}
.fm-slider-panel.fm-slider-shift.is-create .ob-pick-bar .main-ui-filter-chip button[data-cs-who-clear],
.fm-slider-panel.fm-slider-shift.is-create .ob-pick-bar .main-ui-filter-chip button[data-cs-pos-clear] {
  cursor: pointer;
}
.fm-slider-panel.fm-slider-shift.is-create #fmCsRate {
  -moz-appearance: textfield;
  appearance: textfield;
}
.fm-slider-panel.fm-slider-shift.is-create #fmCsRate::-webkit-outer-spin-button,
.fm-slider-panel.fm-slider-shift.is-create #fmCsRate::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.fm-cs-rate-mode-row {
  display: block;
  padding-top: 4px;
  padding-bottom: 2px;
}
.fm-cs-rate-mode-wrap { width: 100%; }
.fm-cs-rate-mode {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
  min-height: 22px;
}
.fm-cs-rate-mode .fm-sd-xfer-ios-lbl {
  font-size: 12px;
  font-weight: 400;
  color: #1f2a37;
  line-height: 1.25;
}
.fm-cs-rate-mode .fm-sd-xfer-ios {
  width: 36px;
  height: 20px;
}
.fm-cs-rate-mode .fm-sd-xfer-ios::after {
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
}
.fm-cs-rate-mode .fm-sd-xfer-ios.is-on::after {
  transform: translateX(16px);
}
.fm-cs-rate-hint {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 400;
}
.fm-cs-rate-hint.is-off { color: #d32f2f; }
.fm-cs-rate-hint.is-on { color: #8a96a3; }
.fm-cs-time-status { margin-top: 0; }
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-snap-pri-cell {
  flex: 0 1 calc(50% - 4px);
  max-width: calc(50% - 4px);
  min-width: 120px;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-cube-plan .fm-sd-snap-w {
  font-size: 14px;
}
/* Create-shift «Выбрать сотрудника»: chrome слайдера + тело как xfer-list без «Передать / Кому» */
.fm-cs-who-pick {
  position: fixed; inset: 0; z-index: 2147483005;
  display: flex; align-items: stretch; justify-content: flex-end;
  pointer-events: none;
}
.fm-cs-who-pick-backdrop {
  position: absolute; inset: 0; background: rgba(33, 43, 54, .35);
  pointer-events: auto;
}
.fm-cs-who-pick-shell {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: stretch; max-width: 100%;
  pointer-events: auto;
}
.fm-cs-who-pick-shell > .fm-slider-edge {
  display: flex; flex-direction: column; gap: 6px;
  align-self: flex-start; margin-top: 52px; margin-right: 6px;
  z-index: 3; flex: 0 0 auto;
}
.fm-cs-who-pick-panel {
  position: relative; z-index: 1;
  width: min(440px, 94vw); max-width: 94vw; height: 100%;
  background: #fff; border-radius: 16px 0 0 16px;
  border: 1px solid #d5dee7; border-right: 0;
  box-shadow: -10px 0 36px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; overflow: hidden;
}
.fm-cs-who-pick-panel.is-r14-fs { width: min(1100px, 96vw); }
.fm-cs-who-pick-h {
  padding: 12px 14px; border-bottom: 1px solid #E0E4EA;
  background: #fff; flex-shrink: 0;
}
.fm-cs-who-pick-title {
  font-size: 16px; font-weight: 700; color: #1f2a37;
}
.fm-cs-who-pick-body {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  padding: 12px 14px 16px;
  display: flex; flex-direction: column;
}
.fm-cs-who-pick-body .fm-sd-xfer-seg { margin: 0 0 8px; }
.fm-cs-who-pick-body > .fm-inp { width: 100%; margin: 0 0 8px; }
.fm-cs-who-list {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 8px;
}
.fm-cs-who-list .fm-sd-xfer-item { width: 100%; }
.fm-cs-who-empty {
  padding: 12px 4px; font-size: 13px; color: #828b95;
}
.fm-slider-panel.fm-slider-shift.is-create .fm-sd-ob-main {
  display: flex; flex-direction: column; gap: 12px;
}

.fm-ctx {
  position: fixed; z-index: 100; min-width: 200px;
  background: #fff; border: 1px solid #DEDEDE; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, 0.18);
  padding: 6px 0; display: flex; flex-direction: column;
}
.fm-ctx[hidden] { display: none !important; }
.fm-ctx button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 14px; font-size: 13px; color: #092131; cursor: pointer;
}
.fm-ctx button:hover { background: #F0F7FA; }
.fm-ctx-sep { border-top: 1px solid #EEEEEE !important; margin-top: 4px; }
.fm-ctx-abs { border-top: 1px solid #EEEEEE !important; margin-top: 4px; font-weight: 600 !important; color: #C45C26 !important; }

.fm-modal {
  position: fixed; inset: 0; background: rgba(9,33,49,.45);
  display: flex; align-items: center; justify-content: center;
  /* Above busy overlay so reason prompt is clickable */
  z-index: 280;
}
.fm-tree-busy {
  /* Full viewport — not clipped to #fmTreeRoot height (~¾ screen). */
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: center; justify-content: center;
  background: rgba(247, 249, 251, .72);
  backdrop-filter: blur(1px);
  pointer-events: all;
}
.fm-tree-busy[hidden] { display: none !important; }
.fm-tree-busy-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  background: #fff; border: 1px solid #9bc4da;
  box-shadow: 0 8px 24px rgba(22, 99, 143, .16);
  font-size: 13px; font-weight: 650; color: #16638F;
  min-width: min(320px, 86vw);
}
.fm-tree-busy-row {
  display: flex; align-items: center; gap: 10px;
}
.fm-tree-busy-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #c5d9e6; border-top-color: #16638F;
  animation: fm-tree-spin .7s linear infinite;
  flex: 0 0 auto;
}
.fm-tree-busy-stub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1.1fr);
  gap: 6px;
  align-items: stretch;
}
.fm-tree-busy-stub .fm-tree-node {
  min-height: 56px;
  padding: 8px;
  box-shadow: none;
}
.fm-tree-busy-stub-link {
  display: flex; align-items: center; justify-content: center;
  color: #9bc4da; font-size: 14px;
}
@keyframes fm-tree-spin { to { transform: rotate(360deg); } }
.fm-tree-root { position: relative; }
.fm-modal[hidden] { display: none !important; }
.fm-modal-card { background: #fff; border-radius: 8px; padding: 20px; width: min(400px, 92vw); }
.fm-modal-wide { width: min(520px, 94vw); }
.fm-modal-card h3 { margin: 0 0 8px; }
.fm-modal-meta { color: #5D5D5D; font-size: 13px; margin: 0 0 12px; }
.fm-modal-card label { display: block; font-size: 12px; color: #73737D; margin: 8px 0 4px; }
.fm-modal-card select, .fm-inp {
  width: 100%; padding: 8px; border: 1px solid #DEDEDE; border-radius: 6px;
  font-size: 14px; color: #092131; background: #fff;
}
.fm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.fm-form-grid label { margin: 0; }
.fm-form-grid label .req { color: #B42318; }
.fm-modal-acts { display: flex; gap: 8px; margin-top: 16px; }

.fm-list-solo { margin: 0; flex: 1; overflow: auto; padding: 16px 20px; background: #fff; }
.fm-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.fm-list-head h2 { margin: 0; font-size: 15px; }
#fmPanelTs .fm-list-head {
  justify-content: flex-start;
  gap: 12px;
}
#fmPanelTs .fm-list-head .fm-today-switch {
  margin-left: 0;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 5px;
}
.fm-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-filters select { font-size: 12px; padding: 4px 8px; border: 1px solid #DEDEDE; border-radius: 6px; }
.fm-emp-row, .fm-ts-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid #F0F2F4; font-size: 13px;
}
.fm-emp-acts { display: flex; gap: 8px; }
.fm-link { border: 0; background: none; color: #16638F; cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.fm-ts-row { display: grid; grid-template-columns: 70px 1fr 1fr 110px; gap: 6px; }
.fm-ts-st.done { color: #1B7A6E; font-weight: 600; }
.fm-ts-st.wait { color: #8A6D00; font-weight: 600; }

.fm-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 600; padding: 2px 6px;
  border-radius: 3px; margin: 2px 3px 0 0; line-height: 1.35;
  vertical-align: middle;
}
.fm-badge.stage { background: #E8F1F8; color: #16638F; }
.fm-badge.kind { background: #F0F2F4; color: #525C69; }
.fm-badge.formal { background: #F5F5F5; color: #73737D; }
.fm-badge.f-done { background: #EAF5F4; color: #1B7A6E; }
.fm-badge.f-pending { background: #FFCACA; color: #B42318; }
.fm-badge.f-none { background: #FFCACA; color: #B42318; }
.fm-badge.f-fire_pending { background: #FFF3D6; color: #8A6D00; border: 1px solid #E8D49A; }
.fm-badge.f-fired { background: #EBEBEF; color: #525C69; }
.fm-badge-ico {
  display: inline-block; font-style: normal; font-weight: 700;
  font-size: 13px; line-height: 1; opacity: .95;
}
.fm-badge-formal.is-done { background: #EAF5F4; color: #1B7A6E; }
/* Не оформлен — важный, красный (полный текст) */
.fm-badge-formal.is-none {
  background: #FFCACA; color: #B42318; border: 1px solid #F0A8A8;
}
/* Увольнение — мягче, amber (напомнить про процессы) */
.fm-badge-formal.is-fire {
  background: #FFF3D6; color: #8A6D00; border: 1px solid #E8D49A;
}
.fm-badge-formal.is-fired {
  background: #ececf1; color: #6b6b76;
  text-decoration: line-through; text-decoration-thickness: 1px; opacity: .92;
}
.fm-badge-formal.is-icon,
.fm-badge-stage.is-icon,
.fm-badge-kind.is-icon { padding: 2px 5px; margin: 0; }
.fm-badge-stage.is-first { background: #fff0d6; color: #8a5200; box-shadow: 0 0 0 1px rgba(138, 82, 0, .14); }
.fm-badge-stage.is-intern { background: #ebe4f7; color: #5a3d8a; box-shadow: 0 0 0 1px rgba(90, 61, 138, .12); }
.fm-badge-stage.is-probation { background: #E8F1F8; color: #16638F; box-shadow: 0 0 0 1px rgba(22, 99, 143, .12); }
.fm-badge-stage.is-work {
  background: #f4faf7; color: #6f8f7e;
  border: 1px solid #e4efe8; opacity: .92; font-weight: 500;
}
/* ▶/▸ · ∞ — glyph крупнее ВНУТРИ чипа; сам чип 22×22 не раздувать (Павел) */
.fm-badge-stage.is-work .fm-badge-ico {
  opacity: .92; font-weight: 800; font-size: 16px; line-height: 1;
  transform: none; /* не scale — раздувает визуальный бокс чипа · канон 22×22 */
}
.fm-badge-stage.is-first .fm-badge-ico {
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.fm-badge-stage.is-intern .fm-badge-ico { font-size: 12px; }
.fm-badge-eye {
  display: block; width: 13px; height: 13px; flex-shrink: 0;
}
.fm-badge-kind.is-perm { background: #eef2f6; color: #3d4a57; }
.fm-badge-kind.is-perm .fm-badge-ico {
  font-size: 16px; font-weight: 800; line-height: 1; opacity: 1;
}
.fm-badge-kind.is-temp { background: #eef6f8; color: #2a5f6e; }
.fm-badge-kind.is-temp .fm-badge-ico { font-size: 13px; }
.fm-badge-kind.is-sub { background: #f7efe6; color: #7a4e1e; }
.fm-badge-kind.is-sub .fm-badge-ico { font-size: 13px; }
/* Канон badge-row: formal 78 · stage/kind 22 — чип фикс, glyph не раздувает */
.fm-name-badges .fm-badge-stage.is-icon,
.fm-name-badges .fm-badge-kind.is-icon {
  width: 22px; height: 22px; min-width: 22px; max-width: 22px;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; overflow: hidden; flex: 0 0 22px;
}
.fm-name-line .fm-badge.formal,
.fm-name-line .fm-badge-formal {
  margin: 0; font-weight: 600;
}
.fm-name-line .fm-badge-formal .fm-badge-ico { display: none; }
.fm-name-line .fm-badge-stage,
.fm-name-line .fm-badge-kind {
  width: 22px; justify-content: center;
}

/* Alert / overdue count — у kebab справа (утверждённый макет · meta right / alert у kebab) */
.fm-row-alert {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  align-self: center;
  width: 18px; height: 28px; flex: 0 0 auto;
  margin: 0; padding: 0 2px;
  border: 0; background: transparent;
  cursor: pointer; vertical-align: middle;
  border-radius: 4px;
  box-sizing: border-box;
}
.fm-row-alert:not(.has-alert) {
  display: none;
}
.fm-row-alert.has-alert {
  width: auto; min-width: 16px; height: 28px; gap: 2px;
  align-items: center;
  background: transparent;
}
.fm-row-alert.has-alert:hover,
.fm-row-alert.has-alert:focus-visible {
  background: #FDECEC;
}
.fm-row-alert-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d92d20; box-shadow: 0 0 0 2px rgba(217, 45, 32, .18);
  flex-shrink: 0;
}
.fm-row-alert-count {
  font-size: 10px; font-weight: 700; color: #d92d20;
  line-height: 1; font-variant-numeric: tabular-nums;
  min-width: 0.6em;
}
.fm-tasks-pop {
  position: fixed; z-index: 250;
  min-width: 220px; max-width: min(320px, 92vw);
  background: #fff; border: 1px solid #DEDEDE; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, 0.18);
  padding: 6px 0; display: flex; flex-direction: column;
}
.fm-tasks-pop[hidden] { display: none !important; }
.fm-tasks-pop-h {
  padding: 6px 12px 4px; font-size: 11px; font-weight: 700;
  color: #73737D; letter-spacing: .02em; text-transform: uppercase;
}
.fm-tasks-pop-item {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 14px; font-size: 13px; color: #092131; cursor: pointer;
}
.fm-tasks-pop-item:hover { background: #F0F7FA; }
.fm-tasks-pop-item.is-overdue .fm-tasks-pop-title { color: #B42318; font-weight: 650; }
.fm-tasks-pop-title { font-weight: 600; line-height: 1.3; }
.fm-tasks-pop-due { font-size: 11px; color: #8A9299; }
.fm-tasks-pop-empty {
  padding: 12px 14px; font-size: 13px; color: #73737D;
}
.fm-tasks-pop-foot {
  border-top: 1px solid #EEEEEE; margin-top: 4px;
  padding: 6px 12px; font-size: 11px; color: #A0A8B0;
}

.fm-role-line {
  /* строка 2: слева compact роль·title·₽ | справа meta у края (уровень alert-dot) */
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
  /* body + trail(alert+kebab ~50) — meta доходит до вертикали точки */
  width: calc(100% + 52px);
  max-width: none;
  box-sizing: border-box;
  padding-right: 4px;
  position: relative;
}
/* Левый блок — как ФИО: inline, без 1fr-дыр */
.fm-role-main {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 6px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible; /* ❄ sticker на чипе должности */
}
.fm-role-main .fm-chip-role {
  flex: 0 0 auto;
  width: auto;
  max-width: 88px;
  box-sizing: border-box;
  justify-content: center;
  position: relative;
  overflow: visible; /* sticker ❄ */
  text-overflow: ellipsis; white-space: nowrap;
}
.fm-role-main .fm-pos-title,
.fm-role-main .fm-pos-link,
.fm-role-main .fm-pos-link.fm-pos-title {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important;
}
.fm-role-main .fm-pos-rate {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; font-variant-numeric: tabular-nums;
}
/* ❄ lives as separate season chip next to role (not sticker on role chip) */
.fm-role-main > .fm-season-row,
.fm-role-main > .fm-chip-season {
  display: inline-flex !important;
  flex: 0 0 auto;
  margin: 0;
}
.fm-role-line .fm-chip-role { flex: 0 0 auto; white-space: nowrap; }
.fm-role-line .fm-pos-title,
.fm-role-line .fm-pos-link,
.fm-role-line .fm-pos-link.fm-pos-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important;
}
.fm-role-line .fm-pos-rate { white-space: nowrap; }
/* Правый кластер — только график · время · смена, у правого края (лампочка) */
.fm-role-meta {
  position: static; transform: none;
  display: inline-flex; align-items: center; flex-wrap: nowrap !important;
  gap: 3px; margin-left: auto; min-width: 0;
  width: auto; max-width: none;
  flex: 0 0 auto;
  overflow: hidden; white-space: nowrap;
}
/* Preview: ?meta=inline — meta сразу за left-блоком */
body.fm-meta-inline .fm-role-line {
  width: 100%;
  max-width: 100%;
  padding-right: 0;
}
body.fm-meta-inline .fm-role-meta {
  position: static; transform: none; width: auto; max-width: none;
  margin-left: 0;
}
/* Жёсткие слоты meta: график · время · смена — без ❄ */
.fm-role-meta .fm-sched-chips {
  margin: 0; gap: 3px; flex-wrap: nowrap; overflow: hidden;
  display: inline-grid;
  grid-template-columns: 46px 78px 52px;
  align-items: center;
  justify-items: stretch;
}
.fm-role-meta .fm-sched-chip {
  height: 18px; padding: 0 5px; border-radius: 4px;
  font-size: 9px; font-weight: 600; background: #f3f5f7; color: #6a7380;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  width: 100%; box-sizing: border-box; min-width: 0;
}
.fm-role-meta .fm-sched-chip b {
  font-weight: 650; color: #525c69; font-size: 9px;
}
.fm-role-meta .fm-ui-ico { width: 10px; height: 10px; opacity: .75; flex-shrink: 0; }
.fm-role-meta .fm-sched-chips .fm-shift-badge {
  margin: 0; height: 18px; padding: 0 4px; border-radius: 4px;
  font-size: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  width: 100%; box-sizing: border-box;
}
.fm-role-meta .fm-shi { width: 11px; height: 11px; flex-shrink: 0; }
.fm-role-meta .fm-shift-lbl { font-size: 9px; }
/* season не в правом meta */
.fm-role-meta .fm-chip-season,
.fm-role-meta .fm-season-row { display: none !important; }
.fm-pos-title {
  font-size: 12px; font-weight: 600; color: #3d4a57; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-pos-link.fm-pos-title {
  font: inherit; font-size: 12px; font-weight: 600; color: #3d4a57;
  text-decoration-color: #c5d0d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-pos-link.fm-pos-title:hover { color: #16638F; }
.fm-pos-rate { font-size: 11px; color: #73737D; font-weight: 500; }
.fm-chip-role,
.fm-role-chip.fm-chip-role {
  display: inline-flex; align-items: center;
  position: relative;
  border-radius: 5px; background: #eef1f4; color: #5a6570;
  border: 1px solid #d8dee4; font-size: 10px; font-weight: 500;
  padding: 1px 6px; line-height: 1.3; max-width: 100%;
  white-space: nowrap; overflow: visible; text-overflow: ellipsis;
}
/* Legacy sticker on role chip — disabled (Pavel: ❄ only as separate season chip) */
.fm-chip-role.has-winter { padding-right: 6px; }
.fm-chip-winter-sticker { display: none !important; }
.fm-role-main > .fm-season-row {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}
.fm-chip-role.is-strong {
  /* legacy — calm chip is default; strong no longer used on board */
  font-size: 10px; padding: 1px 6px; letter-spacing: 0;
  background: #eef1f4; color: #5a6570; border-color: #d8dee4;
}
.fm-chip-season {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid #d5dbe0; border-radius: 6px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; line-height: 1.35;
  margin: 0;
}
.fm-chip-season-winter {
  color: #2a4a62; background: #e4eef5; border-color: #9bb6c9;
}
.fm-chip-season-summer {
  color: #3d6b2e; background: #eaf5e4; border-color: #9bc48a;
}
.fm-chip-season.is-icon {
  padding: 2px 6px; min-width: 22px; justify-content: center;
}
.fm-name-link {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; font-weight: 700; color: #092131; cursor: pointer;
  text-align: left; text-decoration: underline; text-decoration-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.fm-name-link:hover { color: #16638F; text-decoration-color: #8fd4ea; }
.fm-pos-link {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: #c5d0d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.fm-pos-link:hover { color: #16638F; }
.fm-board-pos-t[data-pos-open] {
  cursor: pointer; text-decoration: underline; text-decoration-color: transparent;
}
.fm-board-pos-t[data-pos-open]:hover { color: #16638F; text-decoration-color: #8fd4ea; }
.fm-sec-bar {
  display: flex; align-items: center; gap: 6px; width: 100%;
  min-width: 0;
}
.fm-sec-end {
  display: inline-flex; align-items: center; gap: 4px;
  flex: 0 0 auto; margin-left: auto;
}
.fm-sec-btn {
  display: flex; align-items: center; gap: 8px; width: auto;
  border: 0; background: transparent; padding: 8px 10px; cursor: pointer;
  text-align: left; font: inherit; color: #1f2a37; font-weight: 700;
  min-width: 0; flex: 1 1 auto;
}
.fm-sec-bar .fm-sec-btn { flex: 1 1 auto; min-width: 0; }
.fm-sec-act {
  flex-shrink: 0; border: 1px solid #16638F; background: #fff; color: #16638F;
  border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.fm-sec-act:hover { background: #e8f4fa; }
.fm-sec-head {
  text-align: left !important; vertical-align: middle !important;
  background: #f3f5f8 !important; z-index: 3;
  border-top: 1px solid #DEDEDE; border-bottom: 1px solid #e0e4ea;
  overflow: visible !important;
}
.fm-sec-row.open .fm-sec-head { background: #eaf6fb !important; }
.fm-sec-tail {
  background: #f3f5f8 !important;
  border-top: 1px solid #DEDEDE; border-bottom: 1px solid #e0e4ea;
  padding: 0 !important;
}
.fm-sec-row.open .fm-sec-tail { background: #eaf6fb !important; }
.fm-sec-day {
  background: #f3f5f8 !important;
  border-top: 1px solid #DEDEDE; border-bottom: 1px solid #e0e4ea;
  padding: 0 !important; height: 1px;
}
.fm-sec-row.open .fm-sec-day { background: #eaf6fb !important; }
.fm-sec-day.focus-col {
  background: rgba(47, 198, 246, 0.08) !important;
}
.fm-sec-metrics {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  margin-left: 4px;
}
.fm-sec-m {
  font-size: 11px; font-weight: 500; color: #73737D; white-space: nowrap;
  background: #fff; border: 1px solid #E0E4EA; border-radius: 4px; padding: 1px 6px;
}
.fm-sec-m b { font-weight: 700; color: #1f2a37; font-variant-numeric: tabular-nums; }
.fm-sec-m.ok b { color: #1B7A6E; }
.fm-sec-m.warn b { color: #B54708; }
.fm-sec-btn .fm-sec-title { flex: 0 1 auto; }
.fm-sec-btn .fm-sec-count { margin-left: auto; }
.fm-inp-inline {
  width: 110px; height: 32px; display: inline-block; vertical-align: middle;
}
.fm-info-card { margin-bottom: 12px; }
.fm-info-h { margin: 14px 0 6px; font-size: 13px; color: #092131; }
.fm-info-list { margin: 0; padding-left: 18px; font-size: 13px; }
.fm-info-list li { margin: 4px 0; }
.fm-info-acts {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
/* п.11: CTA оформления в блоке инфо сотрудника (не на строке ФИО). */
.fm-info-formal-cta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #E6E9ED;
}
.fm-info-formal-cta .fm-formal-start {
  width: 100%;
}
.fm-sd-person-info .fm-info-formal-cta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.fm-badge-formal.is-hire-tap {
  cursor: pointer;
  border: 0;
  font: inherit;
}
.fm-badge-formal.is-overdue,
.fm-badge-formal.is-none.is-hire-tap {
  box-shadow: 0 0 0 1px #F97066;
}
.fm-sd-ob-pos-row {
  justify-content: flex-start;
  border-bottom: 0;
  padding-bottom: 2px;
}
.fm-sd-ob-pos-name {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #1f2a37;
  font-size: 13px;
  padding: 0 0 6px;
  border-bottom: 1px solid #e8ecf1;
}
.fm-sd-ob-pos-name .sc-open-link {
  display: inline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  color: #0b4f72;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.fm-sd-ya-penalty {
  margin-top: 8px;
}

.fm-drag-src {
  outline: 2px solid #16638F !important; outline-offset: 2px;
  box-shadow: 0 6px 18px rgba(22,99,143,.28) !important; z-index: 5; position: relative;
}
.fm-drag-pinned {
  outline: 2px dashed #16638F !important;
  outline-offset: -2px;
  background: #e8f4fa !important;
  box-shadow: inset 3px 0 0 #16638F;
  opacity: 0.92;
}
.fm-data-row.fm-drag-pinned .fm-name { background: #e8f4fa !important; }
.fm-drag-ghost {
  position: fixed; z-index: 99999; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  min-width: 180px; max-width: 280px;
  padding: 10px 12px; border-radius: 8px;
  background: #092131; color: #fff;
  font-size: 13px; line-height: 1.25;
  box-shadow: 0 10px 28px rgba(9, 33, 49, 0.35);
}
.fm-drag-ghost[hidden] { display: none !important; }
.fm-drag-ghost b { color: #fff; }
.fm-drag-bang, .fm-drag-who {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; background: #F14A4A; color: #fff;
}
.fm-drag-who { background: #2FC6F6; color: #092131; }
body.fm-dnd-hole .fm-name { cursor: copy; }
body.fm-dnd-person .fm-cell.hole { cursor: copy; }

body.fm-dnd .fm-data-row.fm-drop-target {
  background: #e8f4fa !important; box-shadow: inset 3px 0 0 #16638F;
}
body.fm-dnd .fm-data-row.fm-drop-target .fm-name { background: #e8f4fa; }
td.fm-col-hot, th.fm-col-hot { background: rgba(47, 198, 246, 0.12) !important; }
.fm-cell.fm-slot-hot {
  outline: 2px solid #16638F !important; outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(22,99,143,.25); transform: scale(1.08); z-index: 3; position: relative;
}
.fm-name.fm-name-hot {
  outline: 2px solid #2FC6F6; outline-offset: -2px; background: #f0fbff !important;
}

/* —— distribution board —— */
.fm-board {
  display: grid; grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px; align-items: stretch; min-height: 420px;
}
.fm-board.fm-board-swap {
  grid-template-columns: minmax(420px, 1.35fr) minmax(220px, 0.65fr);
}
@media (max-width: 900px) {
  .fm-board, .fm-board.fm-board-swap { grid-template-columns: 1fr; }
}
.fm-board-col {
  border: 1px solid #DEDEDE; border-radius: 10px; background: #F7F9FA;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.fm-board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; background: #fff; border-bottom: 1px solid #E8EBEE;
}
.fm-board-head h3 { margin: 0; font-size: 14px; color: #092131; font-weight: 700; }
.fm-board-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: #E8F6FC; color: #16638F; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-board-body { padding: 12px; overflow: auto; flex: 1 1 auto; }
.fm-board-pos-list { display: flex; flex-direction: column; gap: 8px; }
.fm-board-pos {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 12px 12px; border-radius: 8px; border: 1px solid #DEDEDE;
  background: #fff; color: #1f2a37; position: relative;
}
.fm-board-pos:hover { border-color: #2FC6F6; background: #f3fbfe; }
.fm-board-pos.on {
  border-color: #16638F; background: #e8f4fa;
  box-shadow: inset 3px 0 0 #16638F;
}
.fm-board-pos.has-hole {
  background: #FFF1F0; border: 1px dashed #F14A4A; color: #1f2a37;
}
.fm-board-pos.has-hole:hover { background: #ffe8e6; border-color: #F14A4A; }
.fm-board-pos.has-hole.on {
  border-color: #B42318; background: #ffe3e0;
  box-shadow: inset 3px 0 0 #B42318;
}
.fm-board-bang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 4px; background: #FFCACA; color: #B42318;
  border: 1px solid #F5A8A8; font-size: 14px; font-weight: 800;
  line-height: 1; flex: 0 0 auto;
}
.fm-board-bang.mini {
  min-width: 16px; height: 16px; font-size: 11px; padding: 0 3px;
}
.fm-board-pos-t { font-weight: 700; font-size: 13px; }
.fm-board-pos-m { width: 100%; font-size: 11px; color: #73737D; margin-left: 22px; }
.fm-board-pos.has-hole .fm-board-pos-m { margin-left: 0; color: #B42318; }
.fm-board-empty { margin: 8px 0; font-size: 13px; color: #8A9299; }
.fm-board-head-pos {
  flex-wrap: wrap; align-items: flex-start;
}
.fm-board-head-pos > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-board-hole-hint {
  font-size: 11px; font-weight: 600; color: #B42318;
}
.fm-board-head-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.fm-board-filter {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #F5A8A8; background: #fff; color: #B42318;
  border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.fm-board-filter:hover { background: #FFF1F0; }
.fm-board-filter.on {
  background: #FFCACA; border-color: #B42318;
}
.fm-emp-table { display: flex; flex-direction: column; gap: 0; }
.fm-emp-head, .fm-emp-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(72px, 0.55fr) minmax(80px, 0.55fr) minmax(220px, 1.5fr);
  gap: 10px; align-items: start;
}
.fm-emp-col { display: flex; align-items: center; min-width: 0; }
.fm-emp-head {
  padding: 0 10px 8px; font-size: 11px; font-weight: 700; color: #73737D;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #E4E7EB;
}
.fm-emp-row {
  padding: 10px; border-bottom: 1px solid #F0F2F4; background: #fff;
  border-radius: 0; border-left: 1px solid transparent; border-right: 1px solid transparent;
  text-align: left; width: 100%; font: inherit; color: inherit;
}
.fm-emp-row.is-active { background: #fff; }
.fm-emp-row.is-idle {
  background: #F0F2F4; color: #8A9299; opacity: 0.82; border-style: none none dashed;
  cursor: default;
}
.fm-emp-row.is-idle .fm-emp-fio b { color: #8A9299; font-weight: 600; }
.fm-emp-row.is-idle.can-take {
  cursor: pointer; opacity: 1; background: #f3fbfe; color: #1f2a37;
  box-shadow: inset 3px 0 0 #2FC6F6;
}
.fm-emp-row.is-idle.can-take .fm-emp-fio b { color: #092131; }
.fm-emp-row.is-idle.can-take:hover { background: #e8f4fa; }
.fm-emp-fio {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0;
}
.fm-emp-fio b { font-size: 13px; color: #092131; }
.fm-emp-fio .fm-badge.formal { margin: 0; }
.fm-emp-multi {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: #16638F; background: #E8F6FC; border-radius: 4px; padding: 1px 6px;
  vertical-align: middle;
}
.fm-emp-status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fm-emp-pos { display: flex; align-items: center; min-width: 0; }
.fm-emp-pos-multi {
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  flex-direction: column;
}
.fm-emp-pos .fm-board-pos.is-assigned-card {
  margin: 0;
}
.fm-board-pos.is-assigned-card {
  background: #EAF5F4;
  border-color: #A8D5CC;
  color: #092131;
  cursor: default;
}
.fm-board-pos.is-assigned-card:hover {
  background: #e0f0ee;
  border-color: #7fbfb2;
}
.fm-board-pos.is-assigned-card .fm-board-pos-m {
  margin-left: 0;
  color: #3d6b63;
}
.fm-board-pos.is-assigned-card .fm-board-x {
  position: absolute;
  top: 8px;
  right: 8px;
}
.fm-emp-row.can-take {
  cursor: pointer; box-shadow: inset 3px 0 0 #2FC6F6; background: #f7fcfe;
}
body.fm-dnd-xfer .fm-emp-row { cursor: copy; }
/* Inset drop cue — outer outline/ring clipped by .fm-board-col overflow (Pavel) */
.fm-emp-row.fm-drop-hot,
.fm-emp-row.can-take:hover {
  outline: none !important;
  box-shadow: inset 0 0 0 1.5px #8fd4ea;
  background: #e8f4fa !important;
  border-radius: 8px;
}
body.fm-dnd-xfer .fm-emp-row.fm-drop-hot,
body.fm-dnd-xfer-emp .fm-board-pos.fm-drop-hot {
  outline: none !important;
  outline-offset: 0 !important;
  background: rgba(232, 247, 252, 0.85) !important;
  box-shadow: inset 0 0 0 2.5px #2fc6f6 !important;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}
.fm-board-pos.fm-drag-src,
.fm-emp-row.fm-drag-src,
.fm-board-pos.is-dragging {
  opacity: 1;
  transform: none;
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: inset 0 0 0 2px #16638F, 0 8px 20px rgba(9, 33, 49, 0.18) !important;
  z-index: 6;
  position: relative;
  border-radius: 8px;
}

/* —— Transfer split scroll (same idea as TREE absolute board) ——
   Pavel: left Сотрудники / right Штатки must scroll independently;
   .fm-list-solo { overflow:auto } was scrolling the whole screen. */
body.fm-tab-transfer .fm-shell {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
body.fm-tab-transfer #fmPanelTransfer {
  overflow: hidden !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column;
  position: relative;
}
body.fm-tab-transfer .fm-list-solo.fm-xfer-card {
  overflow: hidden !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column;
  position: relative;
  padding-bottom: 8px;
}
body.fm-tab-transfer .fm-xfer-card > .fm-list-head {
  flex: 0 0 auto;
}
body.fm-tab-transfer .fm-xfer-root {
  position: relative !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: block !important;
}
body.fm-tab-transfer #fmTransfer > .fm-board {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(420px, 1.35fr) minmax(220px, 0.65fr);
  /* head | search | subhead(ФИО‖Смена…) | body — shared heights */
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
  align-items: stretch !important;
  column-gap: 12px;
  row-gap: 0;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
}
body.fm-tab-transfer #fmTransfer > .fm-board.fm-board-by-emp {
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}
body.fm-tab-transfer .fm-board-col {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: subgrid;
  grid-row: span 4;
  position: relative;
}
body.fm-tab-transfer .fm-board-col > .fm-board-head,
body.fm-tab-transfer .fm-board-col > .fm-xfer-pane-filters,
body.fm-tab-transfer .fm-board-col > .fm-xfer-col-subhead {
  min-height: 0;
  align-self: stretch;
}
body.fm-tab-transfer .fm-board-col > .fm-board-body {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 8px;
  box-sizing: border-box;
}
/* Fallback when subgrid unsupported: equal chrome via shared min-heights */
@supports not (grid-template-rows: subgrid) {
  body.fm-tab-transfer .fm-board-col {
    display: flex !important;
    flex-direction: column;
    grid-row: auto;
  }
  body.fm-tab-transfer #fmTransfer > .fm-board {
    grid-template-rows: minmax(0, 1fr) !important;
  }
  body.fm-tab-transfer .fm-board-col > .fm-board-head {
    flex: 0 0 auto;
    min-height: 48px;
  }
  body.fm-tab-transfer .fm-board-col > .fm-xfer-pane-filters {
    flex: 0 0 auto;
    min-height: 52px;
  }
  body.fm-tab-transfer .fm-board-col > .fm-xfer-col-subhead {
    flex: 0 0 auto;
    min-height: 40px;
  }
  body.fm-tab-transfer .fm-board-col > .fm-board-body {
    flex: 1 1 0% !important;
  }
}
@media (max-width: 900px) {
  body.fm-tab-transfer #fmTransfer > .fm-board,
  body.fm-tab-transfer #fmTransfer > .fm-board.fm-board-by-emp {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.15fr) minmax(0, 0.85fr) !important;
  }
  body.fm-tab-transfer .fm-board-col {
    display: flex !important;
    flex-direction: column;
    grid-row: auto;
  }
  body.fm-tab-transfer .fm-board-col > .fm-board-body {
    flex: 1 1 0% !important;
  }
}
.fm-xfer-skel .fm-board { min-height: 360px; }

/* X1: no custom card chrome — .fm-board-pos* from pre-XFER1 (c3e8d38).
   X6: reuse R7 .fm-drag-grip as first flex child (no absolute/padding redesign). */

/* Equal pane headers: «N свободных» same row as «Штатки» + count */
#fmTransfer .fm-board-head {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 48px;
  box-sizing: border-box;
}
#fmTransfer .fm-board-head h3 {
  flex: 0 0 auto;
  white-space: nowrap;
}
#fmTransfer .fm-board-head .fm-board-hole-hint {
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 600;
  color: #B42318;
}
#fmTransfer .fm-board-head .fm-board-count {
  flex: 0 0 auto;
  margin-left: 0;
}
#fmTransfer .fm-board-col-people .fm-board-head .fm-board-count {
  margin-left: auto;
}

/* Emp match table: ФИО (2 rows) | Должность — head lives in .fm-xfer-col-subhead */
#fmTransfer .fm-emp-head {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(240px, 1.4fr);
  width: 100%;
  box-sizing: border-box;
}
#fmTransfer .fm-emp-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(240px, 1.4fr);
  gap: 10px;
  align-items: start;
}
#fmTransfer .fm-emp-col {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}
#fmTransfer .fm-emp-main {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  overflow: hidden;
}
#fmTransfer .fm-emp-r1,
#fmTransfer .fm-emp-r2 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
#fmTransfer .fm-emp-r1 .fm-name-link {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fmTransfer .fm-emp-r1 .fm-name-trail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
#fmTransfer .fm-emp-r1 .fm-kebab { margin-left: 0; flex: 0 0 auto; }
#fmTransfer .fm-xfer-card-actions .fm-row-alert {
  flex: 0 0 auto;
}
#fmTransfer .fm-emp-r2 .fm-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fmTransfer .fm-emp-pos {
  align-items: stretch;
}
#fmTransfer .fm-emp-pos-multi {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
}

/* Compact slot card: 4 fixed nowrap rows */
#fmTransfer .fm-board-pos.fm-xfer-slot-card,
#fmTransfer .fm-board-pos.is-assigned-card,
#fmTransfer .fm-board-pos.is-xfer-vacant {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  min-height: 118px;
  padding: 8px 10px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}
/* Assigned: same min-height; slightly roomier (+~10% padding) + denser kebab/× */
#fmTransfer .fm-emp-pos .fm-board-pos.is-assigned-card {
  width: 100%;
  max-width: 100%;
  min-height: 118px;
  padding: 9px 12px;
}
#fmTransfer .fm-board-pos.is-assigned-card .fm-board-x {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  margin-left: 0;
}
#fmTransfer .fm-xfer-card-r1,
#fmTransfer .fm-xfer-card-r2,
#fmTransfer .fm-xfer-card-r3,
#fmTransfer .fm-xfer-card-r4 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
#fmTransfer .fm-xfer-card-r1 .fm-sched-chips {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
#fmTransfer .fm-xfer-card-r1 .fm-sched-chip,
#fmTransfer .fm-xfer-card-r1 .fm-shift-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fmTransfer .fm-xfer-card-r1 .fm-drag-grip,
#fmTransfer .fm-xfer-card-r1 .fm-board-bang {
  flex: 0 0 auto;
}
#fmTransfer .fm-xfer-card-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;
}
#fmTransfer .fm-xfer-card-actions .fm-kebab,
#fmTransfer .fm-xfer-card-actions .fm-board-x {
  flex: 0 0 auto;
  width: 20px;
  height: 24px;
  margin: 0;
}
#fmTransfer .fm-xfer-card-r2 .fm-board-pos-t {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
}
#fmTransfer .fm-xfer-card-r3 .fm-chip-role,
#fmTransfer .fm-xfer-card-r3 .fm-role-chip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* no room for sticker / season glyph inside the pill */
  padding-right: 6px;
}
#fmTransfer .fm-xfer-card-r3 .fm-season-row,
#fmTransfer .fm-xfer-card-r3 .fm-chip-season {
  flex: 0 0 auto;
  margin: 0;
  /* clear gap so ❄ never looks glued into the role pill */
  margin-left: 2px;
}
#fmTransfer .fm-xfer-card-r3 .fm-board-pos-m {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fmTransfer .fm-xfer-card-r4.fm-xfer-assign-foot,
#fmTransfer .fm-xfer-assign-foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 0;
  min-width: 0;
  overflow: hidden;
}
#fmTransfer .fm-xfer-card-r4 .fm-xfer-card-fio {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #092131;
  min-width: 0;
}
#fmTransfer .fm-xfer-assign-foot .fm-tree-pool-pick {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
#fmTransfer .fm-xfer-assign-foot .fm-tree-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* R4/R9 pane search + Shifts .popup-filter.open
   Keep .fm-board-col overflow:hidden (rounded contour).
   Popup MUST be fixed overlay — static/in-flow pushed the board down (Pavel). */
.fm-xfer-pane-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
/* Search row (both panes): same chrome height via subgrid */
#fmTransfer .fm-xfer-pane-filters.is-inline-quick,
#fmTransfer .fm-xfer-pane-filters.is-search-row {
  gap: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  min-height: 52px;
  justify-content: center;
  background: #F7F9FA;
  border-bottom: 1px solid #E8EBEE;
}
#fmTransfer .fm-xfer-pane-filters.is-inline-quick .fm-xfer-pane-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  min-height: 36px;
}
#fmTransfer .fm-xfer-pane-filters.is-inline-quick .fm-xfer-pane-search-wrap {
  flex: 1 1 auto;
  min-width: 72px;
  width: auto;
  max-width: 100%;
}
#fmTransfer .fm-xfer-pane-filters.is-inline-quick .fm-xfer-quick {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: visible;
}
#fmTransfer .fm-xfer-pane-filters.is-search-row .fm-xfer-pane-search-wrap {
  width: 100%;
}
/* 2nd chrome row: ФИО|Должность ‖ Смена|График|Тип должности — equal height */
#fmTransfer .fm-xfer-col-subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  box-sizing: border-box;
  background: #F7F9FA;
  border-bottom: 1px solid #E8EBEE;
}
#fmTransfer .fm-xfer-col-subhead .fm-emp-head {
  padding: 0;
  border-bottom: none;
  align-items: center;
}
#fmTransfer .fm-xfer-col-subhead .fm-xfer-quick {
  width: 100%;
  flex-wrap: nowrap;
  min-width: 0;
  padding: 0;
  overflow: visible;
}
#fmTransfer .fm-board-col {
  overflow: hidden; /* restore radius clip — no corner gaps */
}
#fmTransfer .fm-board-body {
  overflow: auto;
}
.fm-xfer-pane-search-wrap {
  position: relative;
  width: 100%;
  z-index: 6;
}
.fm-xfer-pane-search {
  width: 100%;
}
#fmTransfer .popup-filter.fm-xfer-pane-popup {
  /* closed: app.css .popup-filter { display:none }; open → fixed via JS */
  position: fixed !important;
  left: 0;
  top: 0;
  right: auto;
  width: min(420px, calc(100vw - 24px));
  margin: 0;
  z-index: 250;
  padding: 0;
  min-height: 0;
  max-height: min(50vh, 420px);
  box-shadow: 0 8px 24px rgba(9, 33, 49, 0.12);
}
#fmTransfer .popup-filter.fm-xfer-pane-popup.open {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  max-height: min(50vh, 420px);
  overflow: hidden;
}
/* Canon .popup-fields: 2-col grid + .field (app.css / Shifts) */
#fmTransfer .fm-xfer-pane-popup .popup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  padding: 18px 20px 12px;
  overflow: visible;
  align-content: start;
}
#fmTransfer .fm-xfer-pane-popup .field {
  margin-bottom: 4px;
  min-width: 0;
}
#fmTransfer .fm-xfer-pane-popup .fm-f-lab {
  display: block;
  font-size: 12px;
  color: #73737D;
  margin-bottom: 6px;
}
#fmTransfer .fm-xfer-pane-popup .popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #E8EBEE;
  background: #fff;
}
/* Quick = Shifts is-leg-compact facets (btn → statuses in dropdown); no italic */
.fm-xfer-quick.fm-legend-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0 2px;
  font-style: normal;
  overflow: visible;
}
.fm-xfer-quick,
.fm-xfer-quick button,
.fm-xfer-quick .fm-badge,
.fm-xfer-quick .fm-leg,
.fm-xfer-quick .fm-sched-chip,
.fm-xfer-quick .main-ui-filter-chip,
.fm-xfer-quick .fm-facet-btn {
  font-style: normal !important;
}
/* No layout jump on open: lock facet chrome, surface always fixed */
#fmTransfer .fm-xfer-quick .fm-xfer-facet,
#fmTransfer .fm-xfer-quick .fm-leg-adaptive {
  flex: 0 0 auto;
  gap: 0 !important;
  padding: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-right: 0 !important;
  position: relative;
  overflow: visible;
}
#fmTransfer .fm-xfer-quick .fm-facet-btn {
  height: 28px;
  box-sizing: border-box;
  border-width: 1px;
}
#fmTransfer .fm-xfer-quick .fm-leg-surface {
  position: fixed !important;
  /* never contribute to flex row height/width when open */
  margin: 0 !important;
  inset: auto;
  flex: 0 0 auto !important;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  pointer-events: auto;
}
#fmTransfer .fm-xfer-quick .fm-leg-surface[hidden] {
  display: none !important;
  position: fixed !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.fm-xfer-quick .fm-xfer-facet.is-on .fm-facet-btn,
.fm-xfer-quick .fm-facet-btn.is-on {
  border-color: #16638F;
  color: #16638F;
  background: #E8F4FA;
}
.fm-xfer-quick .fm-leg-surface .fm-badge,
.fm-xfer-quick .fm-leg-surface .fm-leg,
.fm-xfer-quick .fm-leg-surface .fm-sched-chip,
.fm-xfer-quick .fm-leg-surface .main-ui-filter-chip {
  cursor: pointer;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-style: normal !important;
  box-sizing: border-box;
}
.fm-xfer-quick .fm-leg-surface button.fm-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
  width: 100%;
  justify-content: flex-start;
}
.fm-xfer-quick .fm-leg-surface .main-ui-filter-chip,
.fm-xfer-quick .fm-leg-surface .fm-sched-chip {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: #fff;
  color: #525c69;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}
.fm-xfer-quick .fm-leg-surface .fm-badge.on,
.fm-xfer-quick .fm-leg-surface .fm-leg.on,
.fm-xfer-quick .fm-leg-surface .fm-sched-chip.on,
.fm-xfer-quick .fm-leg-surface .main-ui-filter-chip.on {
  border-color: #16638F;
  box-shadow: 0 0 0 1px #16638F;
  font-weight: 700;
}
.fm-xfer-pick-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.fm-xfer-pick-badges .fm-badge.is-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
body > .fm-f-list.fm-xfer-pick-list,
.fm-xfer-pick-list {
  min-width: 280px !important;
  max-width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.fm-xfer-pick-search {
  padding: 8px 10px;
  border-bottom: 1px solid #E8EBEE;
  flex: 0 0 auto;
}
.fm-xfer-pick-search .main-ui-square-search { width: 100%; }
.fm-xfer-pick-opts {
  overflow: auto;
  max-height: 220px;
  padding: 4px 0;
}
.fm-xfer-stage-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #16638F;
}
.fm-xfer-pick-list .fm-f-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-board-pos-chip {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px 6px 10px; border-radius: 6px;
  background: #EAF5F4; border: 1px solid #C5E3DC; color: #092131; font-size: 12px;
}
.fm-board-pos-chip.has-hole {
  background: #FFF1F0; border: 1px dashed #F14A4A;
}
.fm-board-pos-chip b { font-size: 13px; }
.fm-board-x {
  margin-left: 4px; width: 22px; height: 22px; border: 0; border-radius: 4px;
  background: transparent; color: #8A9299; font-size: 18px; line-height: 1; cursor: pointer;
}
.fm-board-x:hover { background: #FFCACA; color: #B42318; }
.fm-board-idle-lab { font-size: 12px; color: #A8ADB4; font-style: italic; }
.fm-board-banner {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 8px;
  background: #e8f4fa; border: 1px solid #B8D8EA; color: #092131; font-size: 13px;
}
.fm-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; font-size: 12px; color: #73737D; }
.fm-inp {
  border: 1px solid #DEDEDE; border-radius: 6px; padding: 8px 10px; font-size: 13px; color: #1f2a37; background: #fff;
}

.fm-mini-wfm {
  margin-top: 14px; border: 1px solid #DEDEDE; border-radius: 8px; background: #F7F7F8; padding: 10px;
}
.fm-mini-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.fm-mini-today { border: 1px solid #DEDEDE; background: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; color: #16638F; }
.fm-mini-sum { margin: 0 0 8px; font-size: 13px; color: #5D5D5D; }
.fm-mini-scroll { overflow-x: auto; padding-bottom: 6px; }
.fm-mini-track { min-width: max-content; }
.fm-mini-days { display: flex; padding-left: 36px; }
.fm-mini-day { width: 88px; flex-shrink: 0; text-align: center; font-size: 10px; color: #73737D; padding-bottom: 4px; }
.fm-mini-day.today { color: #16638F; font-weight: 700; }
.fm-mini-day.we { color: #F14A4A; }
.fm-mini-row { display: flex; align-items: flex-start; }
.fm-mini-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #16638F; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  margin-right: 8px; margin-top: 8px; flex-shrink: 0;
}
.fm-mini-slots { display: flex; }
.fm-mini-col { width: 88px; flex-shrink: 0; min-height: 52px; padding: 4px; border-left: 1px solid #E6E8EB; }
.fm-mini-col.today { background: rgba(238,246,252,.7); }
.fm-mini-empty-slot { height: 44px; background: #DEDEDE; border-radius: 4px; opacity: .45; }
.fm-mini-block {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 44px;
  padding: 4px 6px; margin-bottom: 4px; border: 1px solid #B8C4CE; border-radius: 4px;
  background: #fff; cursor: pointer; text-align: left; position: relative;
}
.fm-mini-block:hover { border-color: #16638F; }
.fm-mini-block.on { background: #D6EAF7; border-color: #2fc6f6; box-shadow: 0 0 0 2px rgba(47,198,246,.35); }
.fm-mini-pos { font-size: 9px; font-weight: 700; color: #092131; line-height: 1.2; }
.fm-mini-t { font-size: 9px; color: #5D5D5D; }
.fm-mini-arr { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #16638F; }

.fm-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #092131; color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 13px; z-index: 200; max-width: 90vw;
}
.fm-toast[hidden] { display: none !important; }

.fm-slider { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end; }
.fm-slider[hidden] { display: none !important; }
.fm-slider-backdrop { position: absolute; inset: 0; background: rgba(9, 33, 49, 0.35); }
/* Bitrix shell: edge tabs + rounded left panel */
.fm-slider-shell {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: stretch; max-width: 100%;
}
.fm-slider-edge {
  display: flex; flex-direction: column; gap: 6px;
  align-self: flex-start; margin-top: 52px;
  margin-right: 6px; z-index: 3; flex: 0 0 auto;
}
.fm-slider-edge[hidden] { display: none !important; }
/* Bitrix edge · white line-art on blue pill-tabs (link chain · open external) */
.fm-slider-edge-btn {
  width: 34px; height: 34px; padding: 0; margin: 0;
  border: 0; background: #2fc6f6; color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  border-radius: 17px;
  box-shadow: -2px 1px 8px rgba(15, 96, 140, .22);
  font-family: inherit;
}
.fm-slider-edge-btn + .fm-slider-edge-btn { border-top: 0; }
.fm-slider-edge-btn:first-child { border-radius: 17px; }
.fm-slider-edge-btn:last-child { border-radius: 17px; }
.fm-slider-edge-btn:hover { background: #1bb1e0; color: #fff; }
.fm-slider-edge-btn.is-on,
.fm-slider-edge-btn.on {
  background: #0f8fbf; color: #fff;
}
.fm-slider-edge-ico {
  width: 16px; height: 16px; display: block;
  pointer-events: none;
}
.fm-slider-panel {
  position: relative; z-index: 1; width: min(480px, 100vw); height: 100%;
  background: #fff; box-shadow: -8px 0 32px rgba(0,0,0,.18);
  display: flex; flex-direction: column; animation: fmSlideIn .2s ease;
}
@keyframes fmSlideIn {
  from { transform: translateX(24px); opacity: .6; }
  to { transform: translateX(0); opacity: 1; }
}
.fm-slider-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid #E8ECF1; flex-shrink: 0;
}
.fm-slider-title { font-size: 16px; font-weight: 700; color: #092131; }
.fm-slider-sub { font-size: 12px; color: #73737D; margin-top: 2px; }
.fm-slider-x { border: 0; background: transparent; font-size: 24px; cursor: pointer; color: #73737D; }
.fm-slider-body { flex: 1; overflow: auto; padding: 16px; }
.fm-slider-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid #E8ECF1; flex-shrink: 0;
}
.fm-sl-block { margin-bottom: 14px; }
.fm-sl-block > label { display: block; font-size: 12px; color: #73737D; margin-bottom: 4px; }
.fm-sl-val { font-size: 14px; font-weight: 600; padding: 8px 10px; background: #F7F7F8; border-radius: 6px; }
.fm-check { display: flex !important; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0 !important; }
body.fm-slider-open { overflow: hidden; }

/* —— staff-slot schedule pictograms (calendar / clock / shift) —— */
.fm-sched-chips {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin: 2px 0 0; vertical-align: middle;
}
.fm-sched-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px;
  border-radius: 6px; background: #F0F2F4; color: #525C69;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.fm-sched-chip b { font-weight: 700; color: #1f2a37; font-variant-numeric: tabular-nums; }
.fm-ui-ico { display: block; flex-shrink: 0; }
.fm-sched-chips .fm-shift-badge {
  margin: 0; height: 22px; padding: 0 6px; border-radius: 6px;
  background: #F0F2F4;
}
.fm-board-pos .fm-sched-chips,
.fm-board-pos-chip .fm-sched-chips { margin: 0; }

/* —— shift types —— */
.fm-shi { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.fm-shift-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; margin: 2px 3px 0 0;
  padding: 1px 5px; border-radius: 4px; line-height: 1.3; vertical-align: middle;
}
.fm-shift-lbl { font-size: 10px; }
.fm-shift-morning { color: #C45C26; background: #FFF3E8; }
/* День = жёлтый sun · сезон Лето — отдельная палитра (.fm-chip-season-summer) */
.fm-shift-day { color: #9A6B00; background: #FFF6CC; }
.fm-shift-evening { color: #6B3FA0; background: #F3ECFA; }
.fm-shift-night { color: #3A4A6B; background: #E8ECF4; }
.fm-shift-badge.is-icon { padding: 2px 4px; }
.fm-sched-chip.fm-baseline { /* Baseline: график + время — не сжимать */ }
.fm-cell-shi {
  position: absolute; top: 2px; left: 2px; line-height: 0; opacity: .95;
  z-index: 3; pointer-events: none;
  /* icon only — no chip background / button look on the cell */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.fm-cell-shi.fm-shift-morning,
.fm-cell-shi.fm-shift-day,
.fm-cell-shi.fm-shift-evening,
.fm-cell-shi.fm-shift-night {
  background: transparent !important;
}
.fm-cell-shi .fm-shi { width: 10px; height: 10px; display: block; }
.fm-cell.has-shi { /* padding already reserved on .fm-cell */ }
.fm-cell.has-shi > .fm-cell-main { margin-top: -2px; }

/* —— filter bar (Hub-like) —— */
.fm-shift-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-chip {
  border: 1px solid #d5dbe0; background: #fff; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; color: #1f2a37;
}
.fm-chip.on { background: #e8f6fc; border-color: #8fd4ea; color: #16638F; font-weight: 600; }
/* Сезон ≠ день: после .fm-chip, иначе белый фон перебивает */
.fm-chip.fm-chip-season {
  display: inline-flex; align-items: center; gap: 3px;
  border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600;
  line-height: 1.35; margin: 0; cursor: default;
}
.fm-chip.fm-chip-season-winter {
  color: #2a4a62; background: #e4eef5; border-color: #9bb6c9;
}
.fm-chip.fm-chip-season-summer {
  color: #3d6b2e; background: #eaf5e4; border-color: #9bc48a;
}
.fm-chip.fm-chip-season.is-icon {
  padding: 2px 6px; min-width: 22px; justify-content: center;
}
.fm-search-wrap { flex: 1; min-width: 220px; max-width: 520px; position: relative; }
.fm-search-bar {
  display: flex; align-items: stretch; background: #535c69; border-radius: 6px;
  overflow: hidden; min-height: 36px;
}
.fm-search-bar.open, .fm-search-bar.has-chips { border-radius: 6px 6px 0 0; }
.fm-search-inner {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 4px 8px; min-width: 0;
}
.fm-chips { display: contents; }
.fm-filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.14); color: #fff; border-radius: 4px;
  padding: 2px 6px; font-size: 11px;
}
.fm-filter-chip button {
  border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
}
.fm-search-inp {
  flex: 1 1 120px; min-width: 80px; border: 0; background: transparent;
  color: #fff; font-size: 13px; outline: none; padding: 4px 0;
}
.fm-search-inp::placeholder { color: rgba(255,255,255,.55); }
.fm-search-filter-btn {
  width: 40px; border: 0; background: transparent; color: rgba(255,255,255,.75);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.fm-search-filter-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.fm-search-filter-btn svg { width: 18px; height: 18px; fill: currentColor; }
.fm-popup-filter {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: #fff; border: 1px solid #d5dbe0; border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(9,33,49,.16); padding: 12px 14px;
}
.fm-popup-filter[hidden] { display: none !important; }
.fm-popup-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
}
.fm-popup-fields label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #73737D;
}
.fm-popup-fields select {
  padding: 7px 8px; border: 1px solid #DEDEDE; border-radius: 6px; font-size: 13px; color: #092131;
}
.fm-popup-foot { display: flex; gap: 8px; margin-top: 12px; }

/* —— collapsible sections (ob-acc canon) —— */
.fm-sec-row .fm-sec-head,
.fm-sec-row .fm-sec-tail {
  font-weight: 700; font-size: 12px; padding: 0 !important;
}
.fm-sec-note { font-weight: 500; color: #73737D; margin-left: 4px; font-size: 11px; white-space: nowrap; }
.fm-acc-n {
  width: 22px; height: 22px; border-radius: 50%; background: #535c69; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.fm-sec-row.open .fm-acc-n { background: #2fc6f6; }
.fm-sec-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-sec-count {
  font-size: 11px; font-weight: 600; color: #73737D; background: #fff;
  border: 1px solid #DEDEDE; border-radius: 999px; padding: 1px 8px; flex-shrink: 0;
}
.fm-sec-chev { opacity: .45; font-size: 12px; margin-left: 2px; flex-shrink: 0; }
.fm-sec-body.collapsed .fm-data-row { display: none; }

/* —— timesheet list · jr-table (Заявки на подбор, без expand/group) —— */
.fm-ts-jr.jr-table-wrap {
  overflow-x: auto; border: 1px solid #e0e4e8; border-radius: 4px; background: #fff;
}
.fm-ts-jr .jr-table {
  width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1780px;
}
.fm-ts-jr .jr-table th {
  text-align: left; font-weight: 600; color: #525c69; font-size: 11px;
  padding: 8px 8px; border-bottom: 1px solid #e0e4e8; background: #f7f9fa;
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.fm-ts-jr .jr-table td {
  padding: 8px; border-bottom: 1px solid #edeef0; vertical-align: middle;
  color: #333; max-width: 180px;
}
.fm-ts-jr .jr-tr { cursor: pointer; }
.fm-ts-jr .jr-tr:hover { background: #f5f9ec; }
.fm-ts-jr .jr-td-title,
.fm-ts-jr th.fm-ts-fio-th {
  min-width: 280px;
  max-width: 360px;
  width: 280px;
}
.fm-ts-fio {
  display: flex; align-items: flex-start; gap: 8px; min-width: 260px;
}
.fm-ts-fio-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.fm-ts-fio-main .ec-open-link,
.fm-ts-fio-main .jr-title-link {
  display: inline; width: auto; text-align: left;
}
.fm-ts-jr .fm-name-trail { flex: 0 0 auto; margin-left: auto; }
.fm-ts-jr .fm-kebab {
  border: 0; background: transparent; cursor: pointer; color: #828b95;
  font-size: 16px; line-height: 1; padding: 2px 4px;
}
.fm-ts-jr .fm-kebab:hover { color: #1f2a37; background: #eef1f4; border-radius: 4px; }
.fm-ts-jr td.fm-ts-code-cell {
  text-align: center;
  vertical-align: middle;
  width: 72px;
  min-width: 72px;
  max-width: 88px;
}
.fm-ts-code-tile {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px; width: 52px; min-height: 42px; vertical-align: top;
}
.fm-ts-code-tile .fm-sd-snap-face {
  width: 30px; height: 26px; flex: 0 0 26px;
}
.fm-ts-code-tile .fm-sd-snap-word {
  display: block; width: 52px; min-height: 14px;
  text-align: center; line-height: 1.15;
}
.fm-ts-jr .fm-ts-leg {
  width: auto; min-width: 36px; height: 22px; padding: 0 8px;
  border-radius: 4px; border: 1px solid #DEDEDE;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; font-style: normal; gap: 4px;
  white-space: nowrap; vertical-align: middle; margin: 0 2px 0 0;
}
.fm-ts-jr .fm-ts-leg.play { background: #EAF5F4; color: #1B5E20; }
.fm-ts-jr .fm-ts-leg.pause { background: #FFF8E8; color: #8A6D00; }
.fm-ts-jr .fm-ts-leg.done { background: #EAF5F4; color: #1B5E20; }
.fm-ts-jr .fm-ts-leg.wait { background: #FFF8E8; color: #8A6D00; }
.fm-ts-jr .fm-ts-leg.late,
.fm-ts-jr .fm-ts-leg.early { background: #FDECEC; color: #B42318; }
.fm-ts-jr .fm-ts-leg.system { background: #F3F5F7; color: #475467; }
.fm-ts-jr .jr-title-link, .fm-ts-jr .ec-open-link, .fm-ts-jr .sc-open-link {
  color: #2067b0; text-decoration: none; font-weight: 600; font-size: 13px;
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.fm-ts-jr .ec-open-link:hover, .fm-ts-jr .sc-open-link:hover { text-decoration: underline; }
.fm-ts-date, .fm-ts-time, .fm-ts-rate {
  font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap;
}
.fm-ts-time.is-empty { font-weight: 400; color: #828b95; }
.fm-ts-money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.fm-ts-money.is-penalty { color: #d52222; }
.fm-ts-money.is-bonus { color: #1B7A6E; }
.fm-ts-st.abs { color: #6B3FA0; font-weight: 600; }
.fm-ts-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 18px; padding: 0 5px; border-radius: 4px;
  font: 700 11px/18px inherit; background: #eef2f4; color: #525c69;
}
.fm-ts-chip.ya { background: #E3F2E9; color: #1B7A6E; }
.fm-ts-chip.plan { background: #E8F4FB; color: #16638F; }
.fm-ts-chip.nn { background: #FDECEC; color: #C21F3A; }
.fm-ts-chip.ot, .fm-ts-chip.do { background: #F3EEF8; color: #6B3FA0; }
.fm-ts-chip.b { background: #FFF4DC; color: #8A6D00; }
.fm-ts-chip.u { background: #F0F2F4; color: #525c69; }
.ss-money-inp.fm-sd-money {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px;
  border: 1px solid #D5DCE4; border-radius: 6px; background: #fff;
}
.ss-money-inp.fm-sd-money:focus-within { border-color: #2FC6F6; box-shadow: 0 0 0 2px rgba(47,198,246,.18); }
.ss-money-inp.fm-sd-money input {
  width: 88px; border: 0; outline: 0; text-align: right; background: transparent;
  font: 600 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.ss-money-inp.fm-sd-money .ss-money-cur { color: #8C97A3; font-size: 12px; }
.ss-money-inp.fm-sd-money .ss-money-sign { font-weight: 700; font-size: 14px; }
.ss-money-inp.fm-sd-money.is-penalty .ss-money-sign,
.ss-money-inp.fm-sd-money.is-penalty input { color: #d52222; }
.ss-money-inp.fm-sd-money.is-bonus .ss-money-sign,
.ss-money-inp.fm-sd-money.is-bonus input { color: #1B7A6E; }

/* —— dashboard (BI patterns) —— */
.fm-dash { padding: 16px 18px; overflow: auto; flex: 1; background: #F0F2F5; }
.fm-dash-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; margin-top: 12px;
}
.fm-dash-block {
  background: #fff; border: 1px solid #E0E4EA; border-radius: 10px; padding: 14px 16px;
}
.fm-dash-wide { grid-column: 1 / -1; }
.fm-dash-block h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #1f2a37; }
.fm-dash-block h4 {
  margin: 14px 0 8px; font-size: 11px; color: #73737D;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
}

/* Scorecard triad — one card, 3 cells (Power BI / Superset) */
.fm-scorecard {
  background: #fff; border: 1px solid #E0E4EA; border-radius: 10px; overflow: hidden;
}
.fm-sc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid #EEF1F4;
}
.fm-sc-head h3 { margin: 0; font-size: 14px; }
.fm-sc-cov { font-size: 12px; color: #73737D; }
.fm-sc-cov b { color: #16638F; font-size: 14px; }
.fm-sc-tri { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.fm-sc-cell {
  padding: 16px 18px; border-right: 1px solid #EEF1F4;
  position: relative;
}
.fm-sc-cell:last-child { border-right: 0; }
.fm-sc-cell.on { background: linear-gradient(180deg, #f3fbfe 0%, #fff 70%); }
.fm-sc-cell.warn { background: linear-gradient(180deg, #fff8f7 0%, #fff 70%); }
.fm-sc-cell.on::before,
.fm-sc-cell.warn::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px;
}
.fm-sc-cell.on::before { background: #2fc6f6; }
.fm-sc-cell.warn::before { background: #F14A4A; }
.fm-sc-k { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #73737D; }
.fm-sc-v { font-size: 32px; font-weight: 700; color: #1f2a37; line-height: 1.15; margin: 4px 0; font-variant-numeric: tabular-nums; }
.fm-sc-s { font-size: 12px; color: #8A9299; }

.fm-metric-row {
  display: flex; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 10px;
}
.fm-metric-row b { font-size: 18px; font-variant-numeric: tabular-nums; }
.fm-pct { color: #16638F; font-style: normal; font-weight: 700; font-size: 13px; margin-left: 4px; }
.fm-leg-inline { font-size: 11px; color: #73737D; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.fm-leg-inline i {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle;
}
.fm-leg-inline i.plan { background: #C5D0D8; }
.fm-leg-inline i.fact { background: #2fc6f6; }

/* Column chart plan/fact by day */
.fm-colchart {
  display: flex; align-items: flex-end; gap: 2px; height: 120px;
  padding: 4px 0 0; border-bottom: 1px solid #EEF1F4; overflow-x: auto;
}
.fm-colchart-col {
  flex: 1 0 14px; min-width: 12px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.fm-colchart-col.today { background: rgba(47,198,246,.08); border-radius: 3px 3px 0 0; }
.fm-colchart-bars {
  display: flex; align-items: flex-end; gap: 1px; height: 100px; width: 100%; justify-content: center;
}
.fm-colchart-bars i {
  display: block; width: 5px; min-height: 2px; border-radius: 2px 2px 0 0;
}
.fm-colchart-bars i.plan { background: #C5D0D8; }
.fm-colchart-bars i.fact { background: #2fc6f6; }
.fm-colchart-col em {
  font-style: normal; font-size: 9px; color: #A0A8B0; margin-top: 2px; line-height: 1;
}
.fm-colchart-col.we em { color: #F14A4A; }

/* Horizontal dual bars by position */
.fm-hbar-row { margin-bottom: 10px; }
.fm-hbar-lab { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.fm-hbar-track {
  position: relative; height: 10px; background: #F0F2F4; border-radius: 999px; overflow: hidden;
}
.fm-hbar-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.fm-hbar-track i.plan { background: #C5D0D8; z-index: 1; }
.fm-hbar-track i.fact { background: #2fc6f6; z-index: 2; }
.fm-hbar-num { font-size: 11px; color: #73737D; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Unworked shifts (MTD) on dashboard */
.fm-miss-row { margin-bottom: 10px; }
.fm-miss-lab {
  font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.fm-miss-track {
  height: 10px; background: #F0F2F4; border-radius: 999px; overflow: hidden;
}
.fm-miss-track i {
  display: block; height: 100%; background: #F14A4A; border-radius: 999px; min-width: 2px;
}
.fm-miss-num {
  font-size: 11px; color: #73737D; margin-top: 2px; font-variant-numeric: tabular-nums;
}
.fm-pct.bad { color: #B42318; }

/* FOT bullet chart */
.fm-fot-hero { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-fot-main { flex: 1; min-width: 160px; }
.fm-fot-big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fm-fot-big.ok, .fm-fot-var.ok, .fm-ok { color: #1B7A6E; }
.fm-fot-big.bad, .fm-fot-var.bad, .fm-bad { color: #B42318; }
.fm-fot-var { font-size: 13px; font-weight: 600; margin-top: 4px; }
.fm-fot-side {
  display: grid; gap: 6px; font-size: 12px; min-width: 140px;
}
.fm-fot-side div { display: flex; justify-content: space-between; gap: 12px; }
.fm-fot-side span { color: #73737D; }
.fm-fot-side b { font-variant-numeric: tabular-nums; }
.fm-bullet { margin: 8px 0; }
.fm-bullet-track {
  position: relative; height: 16px; background: #EEF1F4; border-radius: 4px; overflow: visible;
}
.fm-bullet-plan {
  position: absolute; left: 0; top: 3px; bottom: 3px; background: #C5D0D8; border-radius: 3px;
}
.fm-bullet-fact {
  position: absolute; left: 0; top: 5px; bottom: 5px; background: #2fc6f6; border-radius: 2px;
}
.fm-bullet-mark {
  position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px;
  background: #1f2a37; border-radius: 1px; z-index: 3;
}
.fm-bullet-scale {
  display: flex; justify-content: space-between; font-size: 10px; color: #A0A8B0; margin-top: 4px;
}
.fm-fot-verdict {
  font-size: 13px; margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; line-height: 1.35;
}
.fm-fot-verdict.ok { background: #EAF5F4; color: #1B7A6E; }
.fm-fot-verdict.bad { background: #FFF1F0; color: #B42318; }

/* Ranking bars */
.fm-rank-list { display: flex; flex-direction: column; gap: 10px; }
.fm-rank-row { display: grid; grid-template-columns: 22px 1fr 56px; gap: 8px; align-items: center; }
.fm-rank-n {
  width: 22px; height: 22px; border-radius: 50%; background: #F0F2F4; color: #5D5D5D;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.fm-rank-body b { font-size: 13px; display: block; }
.fm-rank-bar { height: 8px; background: #F0F2F4; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.fm-rank-bar i { display: block; height: 100%; background: #F14A4A; border-radius: 999px; }
.fm-rank-stat { text-align: right; font-size: 11px; color: #73737D; line-height: 1.3; }
.fm-rank-stat b { display: block; color: #B42318; font-size: 15px; font-variant-numeric: tabular-nums; }
.fm-rank-stat em { font-style: normal; color: #8A9299; }

/* Absence timeline — interview-slot lanes */
.fm-tl-leg { display: flex; gap: 12px; align-items: center; font-size: 11px; color: #73737D; margin: 0 0 8px; }
.fm-tl-leg i {
  display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: middle;
}
.fm-tl-leg i.ot { background: #EEE6F1; box-shadow: inset 0 0 0 1px #c4a8d4; }
.fm-tl-leg i.do { background: #ABC7D7; }
.fm-tl-leg i.b { background: #FFECD6; box-shadow: inset 0 0 0 1px #e0b87a; }
.fm-tl-leg i.u { background: #AEAEAE; }
.fm-tl { overflow-x: auto; border: 1px solid #E0E4EA; border-radius: 8px; background: #fff; }
.fm-tl-head, .fm-tl-row {
  display: flex; align-items: stretch; width: max-content; min-width: 100%;
}
.fm-tl-label {
  width: 148px; flex: 0 0 148px; padding: 6px 10px; font-size: 12px;
  position: sticky; left: 0; z-index: 3; background: #fff;
  border-right: 1px solid #c9d1db; box-sizing: border-box;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 2px 0 4px -2px rgba(20,28,40,.12);
}
.fm-tl-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fm-tl-days {
  display: flex; flex: 0 0 auto; border-bottom: 1px solid #EEF1F4;
}
.fm-tl-days span {
  flex: 0 0 28px; width: 28px; text-align: center; font-size: 10px; color: #8A9299;
  padding: 6px 0; box-sizing: border-box; border-left: 1px solid #EEF1F4;
}
.fm-tl-days span.today { color: #16638F; font-weight: 700; background: #eef6fc; }
.fm-tl-days span.we { color: #F14A4A; }
.fm-tl-track {
  position: relative; flex: 0 0 auto; height: 40px;
  border-bottom: 1px solid #F0F2F4;
  background-image: repeating-linear-gradient(90deg, #eceff2 0 1px, transparent 1px var(--fm-dayw, 28px));
  box-sizing: border-box;
}
.fm-tl-today {
  position: absolute; top: 0; bottom: 0; background: rgba(47,198,246,.1); pointer-events: none; z-index: 0;
}
.fm-tl-slot {
  position: absolute; top: 6px; bottom: 6px; border-radius: 4px; z-index: 2;
  display: flex; align-items: center; padding: 0 6px;
  font-size: 10px; font-weight: 700; color: #1f2a37; white-space: nowrap; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.fm-tl-slot.fm-tl-ot { background: #EEE6F1; box-shadow: inset 0 0 0 1.5px #9b6fb5; }
.fm-tl-slot.fm-tl-do { background: #ABC7D7; box-shadow: inset 0 0 0 1.5px #5a8aa0; }
.fm-tl-slot.fm-tl-b { background: #FFECD6; box-shadow: inset 0 0 0 1.5px #d4923a; }
.fm-tl-slot.fm-tl-u { background: #AEAEAE; color: #fff; }

.fm-bar {
  height: 8px; background: #EEF1F4; border-radius: 999px; overflow: hidden; margin: 6px 0 8px;
}
.fm-bar i { display: block; height: 100%; background: #2fc6f6; border-radius: 999px; }
.fm-bar i.ok { background: #1B7A6E; }
.fm-bar i.mid { background: #E0A800; }
.fm-bar i.bad { background: #B42318; }

@media (max-width: 900px) {
  .fm-dash-grid { grid-template-columns: 1fr; }
  .fm-sc-tri { grid-template-columns: 1fr; }
  .fm-sc-cell { border-right: 0; border-bottom: 1px solid #EEF1F4; }
  .fm-sc-cell:last-child { border-bottom: 0; }
}

/* —— add / hub slider —— */
.fm-slider-panel.fm-slider-wide { width: min(920px, 96vw); }
.fm-slider-panel.fm-slider-hub { width: min(1100px, 98vw); }
.fm-slider-panel.fm-slider-hub .fm-slider-body { padding: 0; display: flex; flex-direction: column; }
.fm-hub-frame {
  flex: 1; width: 100%; min-height: calc(100vh - 140px); border: 0; background: #fff;
}
.fm-slider-ctx {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 16px; background: #e8f6fc; border-bottom: 1px solid #b6e2f2; flex-shrink: 0;
}
.fm-slider-ctx[hidden] { display: none !important; }
.fm-ctx-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #b6e2f2; border-radius: 999px;
  padding: 3px 10px; font-size: 12px; color: #0b6e99;
}
.fm-ctx-pill b { color: #1f2a37; font-weight: 700; }
.fm-ctx-note { font-size: 11px; color: #0b6e99; margin-left: 4px; }

.fm-add-chess { margin-top: 12px; }
.fm-add-chess-scroll { overflow-x: auto; padding-bottom: 8px; }
.fm-add-board { min-width: max-content; }
.fm-add-days { display: flex; gap: 4px; }
.fm-add-day {
  width: 108px; flex-shrink: 0; border: 1px solid #E8ECF1; border-radius: 8px;
  background: #F7F7F8; padding: 6px;
}
.fm-add-day.today { background: #eef6fc; border-color: #8fd4ea; }
.fm-add-day.we .fm-add-dlab { color: #F14A4A; }
.fm-add-dlab { font-size: 10px; font-weight: 600; color: #73737D; text-align: center; margin-bottom: 6px; }
.fm-add-slots { display: flex; flex-direction: column; gap: 4px; min-height: 72px; }
.fm-add-empty {
  flex: 1; min-height: 56px; background: #DEDEDE; border-radius: 6px; opacity: .4;
}
.fm-add-slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; min-height: 56px; padding: 6px; text-align: left;
  border: 1px dashed #F14A4A; border-radius: 6px; background: #FFF1F0;
  cursor: pointer; position: relative;
}
.fm-add-slot:hover { border-style: solid; box-shadow: 0 0 0 2px rgba(241,74,74,.2); }
.fm-add-slot.on {
  background: #D6EAF7; border-color: #2fc6f6; border-style: solid;
  box-shadow: 0 0 0 2px rgba(47,198,246,.35);
}
.fm-add-bang { position: absolute; top: 4px; right: 6px; color: #B42318; font-weight: 800; }
.fm-add-pos { font-size: 10px; font-weight: 700; color: #092131; line-height: 1.2; padding-right: 14px; }
.fm-add-t { font-size: 9px; color: #5D5D5D; }
.fm-slider-body .fm-form-grid { margin-top: 8px; }

/* —— Hub filter canon on WFM (wizard staff pick) —— */
.fm-filter-bar {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  padding: 6px 0 4px; flex-shrink: 0; position: relative; z-index: 40;
  overflow: visible;
  --fm-ctrl-h: 36px;
}
.fm-filter-wrap {
  flex: 1 1 auto; min-width: 200px; max-width: min(50%, 520px);
  position: relative; z-index: 40; padding: 0;
}
.fm-filter-end {
  display: inline-flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
  order: 2; /* после поиска — у правого края строки */
  margin-left: auto;
}
/* Шестерёнка справа в строке поиска → История / Экспорт */
.fm-gear-menu { position: relative; flex: 0 0 auto; }
.fm-gear-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--fm-ctrl-h, 36px); height: var(--fm-ctrl-h, 36px);
  padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #525c69; cursor: pointer;
}
.fm-gear-btn svg { width: 20px; height: 20px; fill: currentColor; }
.fm-gear-btn:hover,
.fm-gear-menu.is-open .fm-gear-btn {
  color: #16638F; background: #E8F4FA;
}
.fm-gear-drop {
  position: absolute; z-index: 90; top: calc(100% + 10px); right: 0;
  min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid #D6E2EC; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(9, 33, 49, .16);
}
.fm-gear-drop[hidden] { display: none !important; }
/* хвост/указатель к кнопке */
.fm-gear-drop::before,
.fm-gear-drop::after {
  content: ""; position: absolute; right: 12px;
  width: 0; height: 0; pointer-events: none;
}
.fm-gear-drop::before {
  top: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #D6E2EC;
}
.fm-gear-drop::after {
  top: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
}
.fm-gear-drop > button,
.fm-gear-parent,
.fm-gear-sub button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 6px;
  padding: 8px 10px; font: 500 13px/1.25 inherit; color: #1f2a37;
  cursor: pointer; box-sizing: border-box;
}
.fm-gear-drop > button:hover,
.fm-gear-parent:hover,
.fm-gear-sub button:hover:not(:disabled) {
  background: #EEF3F7; color: #16638F;
}
.fm-gear-sep {
  height: 1px; margin: 4px 6px; background: #E6ECF1; border: 0;
}
.fm-gear-chev { color: #8A9299; font-size: 14px; line-height: 1; }
.fm-gear-export.is-open .fm-gear-chev { transform: rotate(90deg); display: inline-block; }
.fm-gear-sub {
  margin: 2px 0 0; padding: 2px 0 0;
  border-top: 1px solid #E6ECF1;
}
.fm-gear-sub[hidden] { display: none !important; }
.fm-gear-sub button { padding-left: 18px; font-weight: 500; }
.fm-gear-sub button:disabled,
.fm-gear-drop button:disabled {
  color: #A0A8B0; cursor: not-allowed; background: transparent;
}

/* Тумблер «Сегодня» — в строке месяца (sticky name), не в легенде */
.fm-today-switch {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; padding: 0;
  font: 600 11px/1 inherit; color: #525c69;
  cursor: pointer; user-select: none; white-space: nowrap; flex: 0 0 auto;
}
.fm-today-switch-track {
  position: relative; width: 28px; height: 16px;
  border-radius: 999px; background: #C6CDD3;
  transition: background .15s ease; flex-shrink: 0;
}
.fm-today-switch-track i {
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(9, 33, 49, .25);
  transition: transform .15s ease;
}
.fm-today-switch[aria-checked="true"] { color: #16638F; }
.fm-today-switch[aria-checked="true"] .fm-today-switch-track { background: #16638F; }
.fm-today-switch[aria-checked="true"] .fm-today-switch-track i { transform: translateX(12px); }

/* Board focus (?boardFocus=1): без Hub L1/L2/L3, секции 2/3 свёрнуты.
 * Query-mode надёжнее Fullscreen API внутри Bitrix iframe. */
.fm-board-focus-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #DEDEDE; background: #fff; border-radius: 5px;
  padding: 4px 9px; font: 600 10px/1.2 inherit; color: #525c69;
  cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.fm-board-focus-btn:hover { border-color: #16638F; color: #16638F; }
.fm-board-focus-btn.is-on,
.fm-board-focus-btn[aria-pressed="true"] {
  border-color: #16638F; color: #16638F; background: #E8F4FA;
}
.fm-board-focus-ico { font-size: 11px; line-height: 1; }
.fm-board-focus-exit {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 8px 12px;
  border: 1px solid #9bc4da;
  border-radius: 8px;
  background: #E8F4FA;
}
.fm-board-focus-exit[hidden] { display: none !important; }
.fm-board-focus-exit-lab {
  font-size: 12px; font-weight: 600; color: #16638F;
}
body.fm-board-focus .hub-shell-chrome,
body.fm-board-focus #hubShellChrome,
body.fm-board-focus .hub-topbar,
body.fm-board-focus .hub-shell-l3,
body.fm-board-focus .hub-shell-l4 {
  display: none !important;
}
body.fm-board-focus .fm-shell {
  padding-top: 6px;
  padding-bottom: 4px;
  min-height: 100vh;
  box-sizing: border-box;
}
body.fm-board-focus .fm-legend-strip {
  padding-top: 4px; padding-bottom: 4px; min-height: 0;
}
body.fm-board-focus tbody[data-sec="holes"] .fm-data-row,
body.fm-board-focus tbody[data-sec="pool"] .fm-data-row {
  /* секции 2/3 свёрнуты через secOpen; строки скрыты collapsed на tbody */
}

/* У focus (?uFocus=1): полная форма увольнения без Hub L1/L2/L3 — аналог boardFocus */
.fm-u-focus-exit {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 8px 12px;
  border: 1px solid #9bc4da;
  border-radius: 8px;
  background: #E8F4FA;
}
.fm-u-focus-exit[hidden] { display: none !important; }
body.fm-u-focus .hub-shell-chrome,
body.fm-u-focus #hubShellChrome,
body.fm-u-focus .hub-topbar,
body.fm-u-focus .hub-shell-l3,
body.fm-u-focus .hub-shell-l4,
body.fm-u-focus .hub-prod-menu,
body.fm-u-focus .hub-nav-l2,
body.fm-u-focus .hub-nav-l3,
body.fm-u-focus .hub-nav-l4 {
  display: none !important;
}
body.fm-u-focus .fm-slider {
  z-index: 80;
}
body.fm-u-focus .fm-slider-backdrop {
  background: rgba(9, 33, 49, 0.55);
}
body.fm-u-focus .fm-slider-panel.fm-slider-shift {
  width: min(1100px, 98vw) !important;
  max-width: 98vw;
  border-radius: 0 !important;
}
body.fm-u-focus .fm-sd-bp-frame {
  min-height: min(72vh, 720px);
  height: min(72vh, 720px);
}
body.fm-u-focus .fm-slider-edge-btn#fmSliderEdgeExt {
  background: #0f8fbf;
}

/* Нарушения / Runtime — facet; Оформление/Этап/Тип/Дела/Тип смены/Узлы — adaptive */
.fm-leg-facet { position: relative; gap: 0; }
.fm-facet-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #DEDEDE; background: #fff; border-radius: 6px;
  padding: 5px 10px; font: 600 12px/1 inherit; color: #525c69;
  cursor: pointer; white-space: nowrap;
}
.fm-facet-btn:hover { border-color: #16638F; color: #16638F; }
.fm-facet-btn.is-on,
.fm-leg-facet.is-open .fm-facet-btn,
.fm-leg-adaptive.is-open .fm-facet-btn {
  border-color: #16638F; color: #16638F; background: #E8F4FA;
}
.fm-facet-pop {
  position: absolute; z-index: 80; top: calc(100% + 4px); left: 0;
  min-width: 168px; padding: 8px;
  background: #fff; border: 1px solid #D6E2EC; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, .14);
}
/* JS places open pops as fixed — escape overflow clip on legend strip */
.fm-facet-pop.is-leg-pop-fixed,
.fm-leg-surface.is-leg-pop-fixed {
  position: fixed !important;
  z-index: 240 !important;
  right: auto;
  bottom: auto;
  box-sizing: border-box;
}
.fm-facet-pop[hidden] { display: none !important; }
.fm-facet-pop .fm-legend {
  flex-direction: column; align-items: stretch; gap: 4px; flex-wrap: nowrap;
}
.fm-facet-pop .fm-badge {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  width: 100%; margin: 0; padding: 6px 8px; font-size: 11px;
  border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  font-style: normal; box-sizing: border-box;
}
.fm-facet-pop .fm-badge .fm-badge-ico { font-size: 12px; }
.fm-facet-pop .fm-badge .fm-txt { font-style: normal; }
.fm-facet-pop .fm-badge:hover,
.fm-facet-pop .fm-badge:focus-visible {
  border-color: #C6CDD3; outline: none;
}
.fm-facet-pop .fm-badge.on {
  border-color: #16638F; box-shadow: 0 0 0 1px #16638F;
  font-weight: 700;
}
.fm-facet-pop .fm-legend .fm-leg,
.fm-facet-pop .fm-shift-legend .fm-leg {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  width: 100%; margin: 0; padding: 6px 8px; font-size: 11px;
  border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  font-style: normal; box-sizing: border-box;
}
.fm-facet-pop .fm-legend .fm-leg:hover,
.fm-facet-pop .fm-legend .fm-leg:focus-visible,
.fm-facet-pop .fm-shift-legend .fm-leg:hover {
  border-color: #C6CDD3; outline: none;
}
.fm-facet-pop .fm-legend .fm-leg.on,
.fm-facet-pop .fm-shift-legend .fm-leg.on {
  border-color: #16638F; box-shadow: 0 0 0 1px #16638F;
  font-weight: 700;
}
.fm-facet-pop .fm-shift-legend {
  flex-direction: column; align-items: stretch; gap: 4px;
}
.fm-facet-pop .fm-shift-legend .fm-leg {
  background: #fff;
}

/* Adaptive: inline chips by default */
.fm-leg-adaptive { position: relative; gap: 6px; padding-right: 12px; border-right: 1px solid #E0E4EA; }
.fm-leg-adaptive .fm-leg-surface {
  display: inline-flex; align-items: center; gap: 6px;
  position: static; padding: 0; margin: 0;
  background: transparent; border: 0; box-shadow: none; min-width: 0;
}
.fm-leg-adaptive .fm-leg-surface .fm-legend {
  flex-direction: row; align-items: center; gap: 3px; flex-wrap: nowrap;
}
.fm-leg-adaptive .fm-leg-surface .fm-legend .fm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0; cursor: pointer; font-style: normal; white-space: nowrap;
}
.fm-leg-adaptive .fm-facet-btn[hidden] { display: none !important; }

/* Compact: chips under facet buttons (strip would wrap) */
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive {
  gap: 0; padding-right: 0; border-right: 0;
  position: relative;
  overflow: visible;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-leg-block-lab { display: none; }
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-leg-surface {
  /* Prefer fixed via JS (.is-leg-pop-fixed); absolute is fallback only */
  position: absolute; z-index: 80; top: calc(100% + 4px); left: 0;
  min-width: 168px; max-width: min(320px, calc(100vw - 16px)); padding: 8px;
  background: #fff; border: 1px solid #D6E2EC; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, .14);
  flex-direction: column; align-items: stretch;
  display: flex;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-leg-surface[hidden] {
  display: none !important;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-leg-surface .fm-legend,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-leg-surface .fm-shift-legend {
  flex-direction: column; align-items: stretch; gap: 4px; flex-wrap: nowrap;
  width: 100%;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-leg,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-shift-legend .fm-leg {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  width: 100%; margin: 0; padding: 6px 8px; font-size: 11px;
  border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  font-style: normal; box-sizing: border-box;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-leg:hover,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-leg:focus-visible,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-shift-legend .fm-leg:hover {
  border-color: #C6CDD3; outline: none;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-leg.on,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-shift-legend .fm-leg.on {
  border-color: #16638F; box-shadow: 0 0 0 1px #16638F; font-weight: 700;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-badge {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  width: 100%; margin: 0; padding: 6px 8px; font-size: 11px;
  border-radius: 4px; cursor: pointer; border: 1px solid transparent;
  font-style: normal; box-sizing: border-box;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-badge:hover,
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-badge:focus-visible {
  border-color: #C6CDD3; outline: none;
}
.fm-legend-blocks.is-leg-compact .fm-leg-adaptive .fm-legend .fm-badge.on {
  border-color: #16638F; box-shadow: 0 0 0 1px #16638F; font-weight: 700;
}
.fm-legend-strip,
.fm-today-metrics {
  overflow: visible;
}

/* Режим «Сегодня»: все дни на месте; остальные колонки disabled */
body.fm-today-focus .fm-table thead th[data-col]:not(.focus-col),
body.fm-today-focus .fm-table td[data-col]:not(.focus-col) {
  opacity: 0.38;
  filter: grayscale(0.35);
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}
body.fm-today-focus .fm-table thead th[data-col]:not(.focus-col) {
  color: #9aa3ad;
}
body.fm-today-focus .fm-table td[data-col]:not(.focus-col) .fm-cell,
body.fm-today-focus .fm-table td[data-col]:not(.focus-col) .fm-skel {
  pointer-events: none;
}
.fm-hist-mask {
  position: fixed; inset: 0; background: rgba(9, 33, 49, 0.28);
  z-index: 1200;
}
.fm-hist-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: #fff; z-index: 1201; box-shadow: -8px 0 24px rgba(9, 33, 49, 0.12);
  display: flex; flex-direction: column; padding: 16px 18px;
}
.fm-hist-mask[hidden],
.fm-hist-drawer[hidden] {
  display: none !important;
}
.fm-hist-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.fm-hist-head h3 {
  margin: 0; font-size: 16px; font-weight: 700; color: #092131;
}
.fm-hist-lead {
  margin: 0 0 12px; font-size: 12px; color: #73737D; line-height: 1.4;
}
.fm-hist-list {
  flex: 1 1 auto; overflow: auto; min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.fm-hist-item {
  border: 1px solid #E8ECF1; border-radius: 8px; padding: 10px 12px;
  background: #FAFBFC;
}
.fm-hist-meta {
  font-size: 11px; color: #8A95A1; margin-bottom: 4px;
}
.fm-hist-diff {
  font-size: 13px; color: #1f2a37; line-height: 1.35;
}
.fm-hist-empty { font-size: 13px; color: #73737D; padding: 12px 0; }
.fm-filter-bar .fm-btn-primary,
.fm-filter-bar .fm-btn-ghost,
.fm-filter-bar .fm-btn-warn,
.fm-filter-bar .fm-actions-btn {
  height: var(--fm-ctrl-h);
  min-height: var(--fm-ctrl-h);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fm-filter-bar .main-ui-filter-search.light {
  height: var(--fm-ctrl-h);
  min-height: var(--fm-ctrl-h);
  max-height: var(--fm-ctrl-h);
  overflow: hidden;
  border-radius: 18px;
}
.fm-filter-bar .main-ui-filter-search-filter {
  flex-wrap: nowrap; overflow: hidden; align-items: center;
  min-height: var(--fm-ctrl-h);
}
.fm-filter-bar .main-ui-filter-search-icon {
  width: var(--fm-ctrl-h);
  height: var(--fm-ctrl-h);
  flex: 0 0 var(--fm-ctrl-h);
  border-radius: 0 18px 18px 0;
}
.fm-filter-bar .main-ui-filter-chip {
  flex: 0 0 auto; max-width: 140px;
  height: 24px;
  border-radius: 12px;
}
.fm-filter-bar .main-ui-square-search {
  min-width: 72px; flex: 1 1 auto; height: 28px;
}
.fm-filter-wrap .popup-filter.open {
  grid-template-columns: 168px 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 280px;
  max-height: min(70vh, 480px);
  overflow: visible; /* dd lists escape; override app.css overflow:hidden */
}
.fm-filter-wrap .popup-fields {
  grid-column: 2; grid-row: 1;
  grid-template-columns: 1fr 1fr;
  padding: 12px 14px 10px;
  gap: 10px 14px;
  overflow: visible; /* dropdowns escape */
  align-content: start;
}
.fm-filter-wrap .popup-fields .field.field-span {
  grid-column: 1 / -1;
}
.fm-filter-wrap .popup-presets {
  grid-column: 1; grid-row: 1;
}
.fm-filter-wrap .popup-footer {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.fm-filter-wrap .field label,
.fm-filter-wrap .fm-f-lab {
  display: block; font-size: 11px; font-weight: 700; color: #525c69;
  margin-bottom: 5px; letter-spacing: .01em;
}
.fm-filter-wrap .field .inp {
  width: 100%; height: 36px; box-sizing: border-box;
}
/* Compact dropdowns — свёрнуты по умолчанию; list = gear/facet menu */
.fm-f-dd {
  position: relative;
  z-index: 1;
}
.fm-f-dd.is-open {
  z-index: 20;
}
.fm-f-trig {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 34px; margin: 0; padding: 0 10px;
  border: 1px solid #D6E2EC; border-radius: 8px;
  background: #fff; color: #525c69;
  font: 500 13px/1.2 inherit;
  text-align: left; cursor: pointer;
  box-sizing: border-box;
}
.fm-f-trig:hover {
  border-color: #16638F; color: #16638F;
}
.fm-f-trig.has-val {
  color: #1f2a37; font-weight: 600;
}
.fm-f-dd.is-open .fm-f-trig {
  border-color: #16638F;
  box-shadow: 0 0 0 1px rgba(22, 99, 143, .2);
  color: #16638F;
}
.fm-f-trig-txt {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-f-trig-caret {
  flex: 0 0 auto; font-size: 11px; opacity: .7; line-height: 1;
}
.fm-f-dd.is-open .fm-f-trig-caret { transform: rotate(180deg); }
.fm-f-list {
  display: flex; flex-direction: column; gap: 1px;
  position: absolute; z-index: 60;
  top: calc(100% + 4px); left: 0; right: 0;
  max-height: 220px; overflow: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid #D6E2EC;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 33, 49, .14);
  box-sizing: border-box;
}
.fm-f-list[hidden] { display: none !important; }
.fm-f-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin: 0; padding: 6px 8px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: #1f2a37;
  font: 500 12px/1.25 inherit;
  text-align: left; cursor: pointer;
  box-sizing: border-box;
}
.fm-f-opt:hover,
.fm-f-opt:focus-visible {
  background: #F0F7FA;
  color: #16638F;
  outline: none;
}
.fm-f-opt.on {
  background: #E8F4FA;
  color: #16638F;
  font-weight: 650;
}
.fm-f-radio {
  flex: 0 0 14px; width: 14px; height: 14px;
  border: 1.5px solid #C6CDD3; border-radius: 50%;
  background: #fff; box-sizing: border-box;
  position: relative;
}
.fm-f-opt.on .fm-f-radio {
  border-color: #16638F;
}
.fm-f-opt.on .fm-f-radio::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%; background: #16638F;
}
.fm-f-opt-txt {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fm-f-date-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fm-f-date-row .fm-f-dd {
  flex: 0 0 160px; min-width: 140px;
}
.fm-f-date-range {
  display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0;
}
.fm-f-date-range[hidden] { display: none !important; }
.fm-f-date-dash { color: #a0a8b4; font-weight: 600; flex: 0 0 auto; }
.fm-f-date-cal {
  position: relative; flex: 1 1 0; min-width: 0; margin: 0;
}
.fm-f-date-inp {
  width: 100%; height: 34px; box-sizing: border-box;
  padding: 0 8px 0 10px;
  border: 1px solid #D6E2EC; border-radius: 8px;
  background: #fff; color: #1f2a37;
  font: 500 13px/1.2 inherit;
}
.fm-f-date-inp:focus {
  border-color: #16638F;
  box-shadow: 0 0 0 1px rgba(22, 99, 143, .2);
  outline: none;
}
.fm-legend .fm-leg-tasks {
  width: auto; min-width: 36px; padding: 0 8px; font-size: 10px;
  background: #F0F7FA; color: #16638F;
}
.fm-legend .fm-leg-tasks.no { background: #F3F5F7; color: #6a7380; }
.fm-legend .fm-leg-tasks.on {
  box-shadow: 0 0 0 2px rgba(22, 99, 143, .28);
}
/* Hub-only runtime mark facets (Нарушения / Статус multi) */
.fm-legend .fm-leg-mark {
  width: auto; min-width: 36px; padding: 0 8px; font-size: 10px;
  background: #F0F7FA; color: #16638F; gap: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-legend .fm-leg-mark.late { background: #FDECEC; color: #B42318; }
.fm-legend .fm-leg-mark.early { background: #FDECEC; color: #B42318; }
.fm-legend .fm-leg-mark.system { background: #F3F5F7; color: #475467; }
.fm-legend .fm-leg-mark.late-warn { background: #FFF8E8; color: #B54708; }
.fm-legend .fm-leg-mark.play { background: #EAF5F4; color: #1B5E20; }
.fm-legend .fm-leg-mark.pause { background: #FFF8E8; color: #8A6D00; }
.fm-legend .fm-leg-mark.done { background: #EAF5F4; color: #1B5E20; }
.fm-legend .fm-leg-mark.wait { background: #FFF8E8; color: #8A6D00; }
.fm-legend .fm-leg-mark.on {
  box-shadow: 0 0 0 2px rgba(22, 99, 143, .28);
}
.fm-legend.fm-legend-multi .fm-leg-mark[aria-checked="true"],
.fm-legend.fm-legend-multi .fm-leg-mark.on {
  box-shadow: 0 0 0 2px rgba(22, 99, 143, .35);
}
.fm-legend .fm-leg-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #D92D20;
  display: inline-block; flex: 0 0 auto;
}
.fm-filter-bar .main-ui-filter-search.light.open {
  border-radius: 8px 8px 0 0;
}

/* —— легенда: метрики + inline chips (absence/status/shift) + facets (formal/stage/kind) —— */
.fm-legend-strip {
  flex-shrink: 0; padding: 6px 10px; border-bottom: 1px solid #E8ECF1;
  background: #FAFBFC; display: flex; align-items: center; gap: 8px 10px;
  min-height: 40px; flex-wrap: nowrap;
}
.fm-today-metrics { flex: 0 0 auto; }
.fm-today-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  background: transparent; border: 0; border-radius: 0; padding: 0;
}
.fm-tc-cov {
  font-size: 11px; color: #73737D; margin-left: 2px; white-space: nowrap;
}
.fm-tc-cov b { color: #16638F; font-weight: 700; }
.fm-legend-toggle { display: none !important; } /* legacy mega-toggle — снят */
.fm-legend-blocks {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 10px;
  min-width: 0; flex: 1 1 auto; overflow: visible;
}
.fm-leg-block {
  display: inline-flex; align-items: center; gap: 0;
  flex: 0 0 auto; padding-right: 0; border-right: 0;
}
.fm-leg-block-lab {
  font-size: 10px; font-weight: 700; color: #8A95A1; text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap;
}
.fm-leg-facet .fm-leg-block-lab { display: none; }
/* Create-slot modal: type pick + inline create */
.fm-type-pick { display: flex; flex-direction: column; gap: 6px; }
.fm-type-create {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px; background: #f5f8fb; border: 1px dashed #c5d3de; border-radius: 6px;
}
.fm-type-create .fm-inp { flex: 1 1 160px; min-width: 0; }
.fm-type-create[hidden] { display: none !important; }

.fm-legend-blocks.is-leg-compact {
  /* Keep buttons on one scrollable row. Open pops use position:fixed
     (see .is-leg-pop-fixed) so overflow-x:auto does not clip them. */
  gap: 6px; overflow-x: auto; overflow-y: visible; scrollbar-width: thin;
  flex-wrap: nowrap;
}
@media (max-width: 720px) {
  .fm-facet-btn { padding: 4px 8px; font-size: 11px; }
}

/* legacy today metrics (дашборд) — оставляем классы */
.fm-today-strip { flex-shrink: 0; padding: 0 0 8px; }
.fm-today-compact {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  background: #fff; border: 1px solid #E0E4EA; border-radius: 8px;
  padding: 8px 12px;
}
.fm-tc-title {
  font-size: 13px; font-weight: 700; color: #1f2a37; margin-right: auto;
}
.fm-tc-title em {
  font-style: normal; font-weight: 600; color: #16638F; margin-left: 8px; font-size: 12px;
}
.fm-tc-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-tc-m {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 11px; color: #73737D; background: #F5F7F9;
  border-radius: 6px; padding: 4px 8px;
  border: 1px solid transparent; cursor: pointer; font: inherit;
}
.fm-tc-m:hover { border-color: #C6CDD3; }
.fm-tc-m b { font-size: 15px; color: #092131; font-variant-numeric: tabular-nums; }
.fm-tc-m.on { background: #EAF5F4; }
.fm-tc-m.on b { color: #1B7A6E; }
.fm-tc-m.warn { background: #FFF8E8; }
.fm-tc-m.warn b { color: #B54708; }
.fm-tc-m.bad { background: #FFF1F0; }
.fm-tc-m.bad b { color: #B42318; }
.fm-tc-m.viol {
  background: #F5C4C0;
  border-color: #D4544C;
}
.fm-tc-m.viol b { color: #6B0505; }
.fm-tc-m.on-filter {
  outline: 2px solid #16638F; outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(22, 99, 143, 0.15);
}

/* —— shift detail slider · layout B (onboarding .ob-layout) ——
   Шире: secondary-кубы (8 шт) влезают в один ряд без wrap. */
.fm-slider-panel.fm-slider-shift {
  width: min(920px, 98vw);
  background: #F0F2F5;
  border-radius: 16px 0 0 16px;
  border: 1px solid #d5dee7;
  border-right: 0;
  overflow: hidden;
  box-shadow: -10px 0 36px rgba(0,0,0,.18);
}
.fm-slider-panel.fm-slider-shift .fm-slider-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid #E0E4EA;
}
.fm-slider-panel.fm-slider-shift .fm-slider-top > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.fm-slider-panel.fm-slider-shift .fm-slider-sub {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 13px; color: #1f2a37; font-weight: 600;
}
.fm-slider-panel.fm-slider-shift .fm-slider-body {
  background: #F0F2F5;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.fm-slider-panel.fm-slider-shift .fm-slider-foot[hidden] { display: none !important; }
/* cosmetics-polish / R10a: FS У = тот же shell, что shift (скругление слева)
   cosmetics hire-FS / R10b: FS Оформление = тот же shell */
.fm-slider-panel.fm-slider-fire,
.fm-slider-panel.fm-slider-hire,
.fm-slider-panel.fm-slider-recruit {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  width: min(1100px, 96vw);
  max-width: 96vw;
  background: #fff;
  border-radius: 16px 0 0 16px;
  border: 1px solid #d5dee7;
  border-right: 0;
  overflow: hidden;
  box-shadow: -10px 0 36px rgba(0,0,0,.18);
}
.fm-slider-panel.fm-slider-fire .fm-board-focus-exit,
.fm-slider-panel.fm-slider-hire .fm-board-focus-exit,
.fm-slider-panel.fm-slider-recruit .fm-board-focus-exit {
  flex-shrink: 0;
  margin: 8px 12px 0;
}
.fm-slider-panel.fm-slider-fire .fm-slider-top,
.fm-slider-panel.fm-slider-hire .fm-slider-top,
.fm-slider-panel.fm-slider-recruit .fm-slider-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* recruit7: без полоски сразу под «Заявка на подбор» */
.fm-slider-panel.fm-slider-recruit .fm-slider-top {
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.fm-slider-panel.fm-slider-fire .fm-slider-top > div:not(.fm-board-focus-btn):not(.fm-slider-back),
.fm-slider-panel.fm-slider-hire .fm-slider-top > div:not(.fm-board-focus-btn):not(.fm-slider-back),
.fm-slider-panel.fm-slider-recruit .fm-slider-top > div:not(.fm-board-focus-btn):not(.fm-slider-back) {
  flex: 1 1 auto;
  min-width: 0;
}
/* Только кнопка в exit-bar FS — не трогать ⛶ в inset-h после return */
.fm-slider-panel.fm-slider-fire .fm-board-focus-exit .fm-board-focus-btn,
.fm-slider-panel.fm-slider-hire .fm-board-focus-exit .fm-board-focus-btn,
.fm-slider-panel.fm-slider-recruit .fm-board-focus-exit .fm-board-focus-btn {
  flex: 0 0 auto;
  margin: 0;
}
body.fm-fire-fs .hub-shell-chrome,
body.fm-fire-fs #hubShellChrome,
body.fm-fire-fs .hub-topbar,
body.fm-fire-fs .hub-shell-l3,
body.fm-fire-fs .hub-shell-l4 {
  display: none !important;
}
.fm-slider-panel.fm-slider-fire .fm-slider-body,
.fm-slider-panel.fm-slider-hire .fm-slider-body,
.fm-slider-panel.fm-slider-recruit .fm-slider-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.fm-slider-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid #DEDEDE;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font: 600 13px/1.2 inherit;
  color: #16638F;
  cursor: pointer;
}
.fm-slider-back[hidden] { display: none !important; }
.fm-slider-back:hover { border-color: #16638F; background: #E8F4FA; }
.fm-slider-back-ico { font-size: 15px; line-height: 1; }
.fm-sd-bp-continue {
  margin-top: 8px;
  display: inline-flex;
}
.fm-term-frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
/* Дубль ✕ в шапке слайдера скрыт — закрытие только Bitrix edge ✕ / Вернуться */
.fm-slider-shell:has(.fm-slider-panel.fm-slider-shift) .fm-slider-x,
.fm-slider-panel.fm-slider-shift .fm-slider-x,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-fire) .fm-slider-x,
.fm-slider-panel.fm-slider-fire .fm-slider-x,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-hire) .fm-slider-x,
.fm-slider-panel.fm-slider-hire .fm-slider-x,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-recruit) .fm-slider-x,
.fm-slider-panel.fm-slider-recruit .fm-slider-x {
  display: none !important;
}
/* Process btns (Отложить / Подать) — внутри блока заявки; footer только Save/Cancel */
.fm-slider-foot .fm-btn-process {
  order: 0;
}
.fm-slider-foot #fmSliderDraft { order: -1; }
.fm-slider-foot #fmSliderSubmit { order: 0; }
.fm-slider-foot #fmSliderSave { order: 1; }
.fm-slider-foot #fmSliderCancel { order: 2; }
/* FS У footer: Подать · Отложить · Отмена (Save скрыт) */
.fm-slider-foot.is-fire-fs #fmSliderSubmit { order: 0; }
.fm-slider-foot.is-fire-fs #fmSliderDraft { order: 1; }
.fm-slider-foot.is-fire-fs #fmSliderCancel { order: 2; }
.fm-slider-foot.is-fire-fs #fmSliderSave { display: none !important; }
/* recruit-FS / R10d footer: Подать · Отложить · Отмена (= fire-fs / У, fm-btn-primary) */
.fm-slider-foot.is-recruit-fs #fmSliderSubmit { order: 0; }
.fm-slider-foot.is-recruit-fs #fmSliderDraft { order: 1; }
.fm-slider-foot.is-recruit-fs #fmSliderCancel { order: 2; }
.fm-slider-foot.is-recruit-fs #fmSliderSave { display: none !important; }
.fm-slider-foot.is-recruit-fs #fmSliderHub { display: none !important; }
/* hire-FS footer: Отправить · Сохранить черновик · Делегировать · Отмена
   цвета = канон У (ui-btn-success / ui-btn-danger / серый) */
.fm-slider-foot.is-hire-fs #fmSliderSubmit { order: 0; }
.fm-slider-foot.is-hire-fs #fmSliderDraft { order: 1; }
.fm-slider-foot.is-hire-fs #fmSliderSave { order: 2; display: inline-flex !important; }
.fm-slider-foot.is-hire-fs #fmSliderCancel { order: 3; }
.fm-slider-foot.is-hire-fs #fmSliderHub { display: none !important; }
.fm-slider-foot.is-hire-fs #fmSliderSubmit {
  background: #bbed21;
  border: 0;
  color: #535c69;
}
.fm-slider-foot.is-hire-fs #fmSliderSubmit:hover {
  background: #a8d91c;
  color: #333;
}
.fm-slider-foot.is-hire-fs #fmSliderDraft {
  background: #ff5752;
  border: 0;
  color: #fff;
}
.fm-slider-foot.is-hire-fs #fmSliderDraft:hover {
  background: #e04843;
  color: #fff;
}
.fm-slider-foot.is-hire-fs #fmSliderSave {
  background: #535c69;
  border: 0;
  color: #fff;
}
.fm-slider-foot.is-hire-fs #fmSliderSave:hover {
  background: #3f4754;
  color: #fff;
}
.fm-slider-panel.fm-slider-fire .fm-slider-foot,
.fm-slider-panel.fm-slider-hire .fm-slider-foot,
.fm-slider-panel.fm-slider-recruit .fm-slider-foot {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #E0E4EA;
}
/* Show Bitrix edge on shift + fire/hire FS */
.fm-slider-shell:has(.fm-slider-panel.fm-slider-shift) .fm-slider-edge,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-fire) .fm-slider-edge,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-hire) .fm-slider-edge,
.fm-slider-shell:has(.fm-slider-panel.fm-slider-recruit) .fm-slider-edge {
  display: flex;
}
.fm-slider-shell:has(.fm-slider-panel.fm-slider-shift) .fm-slider-edge[hidden],
.fm-slider-shell:has(.fm-slider-panel.fm-slider-fire) .fm-slider-edge[hidden],
.fm-slider-shell:has(.fm-slider-panel.fm-slider-hire) .fm-slider-edge[hidden],
.fm-slider-shell:has(.fm-slider-panel.fm-slider-recruit) .fm-slider-edge[hidden] {
  display: flex !important;
}
.fm-sd { display: flex; flex-direction: column; gap: 10px; }
.fm-sd-ob-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(240px, 34%);
  gap: 12px;
  align-items: start;
  max-width: 100%;
  min-height: 0;
}
/* У / process-inset: полная ширина · без правого блока контекста формы */
.fm-sd-ob-layout.is-process-inset {
  grid-template-columns: 1fr;
}
.fm-sd-ob-layout.is-process-inset .fm-sd-ob-side {
  display: none !important;
}
.fm-sd-ob-main {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fm-sd-ob-side {
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
  touch-action: pan-y;
}
.fm-sd-ob-ctx {
  position: relative;
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(20, 28, 40, 0.04);
}
.fm-sd-ob-ctx-h {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #828b95;
  margin: 0 0 8px;
  padding-right: 18px;
}
/* Block pencil · same design language as .fm-cell-edit (always visible on cards) */
.fm-sd-block-edit {
  position: absolute; top: -1px; right: -2px; z-index: 2;
  width: 14px; height: 14px; padding: 0; margin: 0;
  border: 0; border-radius: 2px;
  background: rgba(255,255,255,.92); color: #16638F;
  font-size: 11px; line-height: 14px; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(22,99,143,.18);
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.fm-sd-block-edit:hover { background: #E8F4FB; }
.fm-sd-ob-ctx.is-editing .fm-sd-block-edit {
  background: #E8F4FB;
  box-shadow: 0 0 0 1px #2fc6f6;
  color: #0b4f72;
}
.fm-sd-ob-ctx:not(.is-editing) [data-block-field][disabled],
.fm-sd-ob-ctx:not(.is-editing) input[data-block-field]:disabled {
  opacity: .85; cursor: default; background: #F7F8FA;
}
.fm-sd-ob-ctx.is-editing [data-block-field]:not(:disabled) {
  background: #fff; box-shadow: 0 0 0 1px #2fc6f6;
}
.fm-sd-ob-ctx-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #e8ecf1;
  font-size: 13px;
}
.fm-sd-ob-ctx-row:last-child { border-bottom: 0; }
.fm-sd-ob-ctx-lbl {
  color: #828b95;
  flex-shrink: 0;
}
.fm-sd-ob-ctx-val {
  font-weight: 600;
  color: #1f2a37;
  text-align: right;
  word-break: break-word;
  max-width: 62%;
}
.fm-sd-ob-fio-row {
  border-bottom: 0;
  padding-bottom: 2px;
  align-items: center;
}
.fm-sd-ob-fio-chips {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex-wrap: nowrap;
  max-width: 70%;
}
.fm-sd-ob-fio-chips .fm-badge {
  flex: 0 0 auto;
}
.fm-sd-ob-fio-chips .fm-badge-stage.is-icon,
.fm-sd-ob-fio-chips .fm-badge-kind.is-icon {
  width: 22px; height: 22px; min-width: 22px; max-width: 22px;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; overflow: hidden; flex: 0 0 22px; margin: 0;
}
.fm-sd-ob-fio-name {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #1f2a37;
  font-size: 13px;
  padding: 0 0 6px;
  border-bottom: 1px solid #e8ecf1;
  text-align: left;
}
.fm-sd-ob-fio-name .ec-open-link {
  display: inline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  color: #0b4f72;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.fm-sd-ob-fio-alert {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}
.fm-sd-runtime-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid #d5dee7;
  background: #f0f2f4;
  color: #525c69;
}
/* Canon S1 icons inside status chip (not cell absolute marks) */
.fm-sd-runtime-chip .fm-rt-icon {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  color: inherit;
}
.fm-sd-runtime-chip .fm-rt-play::before { content: "▶"; font-size: 8px; }
.fm-sd-runtime-chip .fm-rt-pause::before { content: "❚❚"; font-size: 7px; letter-spacing: -1px; }
.fm-sd-runtime-chip .fm-rt-wait::before { content: "·"; font-size: 14px; font-weight: 800; line-height: 1; }
.fm-sd-runtime-chip .fm-rt-check { font-size: 11px; font-weight: 700; }
.fm-rt-wait::before { content: "·"; font-size: 10px; font-weight: 800; }
.fm-sd-runtime-chip.is-ongoing {
  background: #e8f6ec;
  border-color: #c6e6d0;
  color: #1b7a6e;
}
.fm-sd-runtime-chip.is-paused {
  background: #fff6e5;
  border-color: #f3d9a4;
  color: #8a6d00;
}
.fm-sd-runtime-chip.is-completed {
  background: #eaf5f4;
  border-color: #c6e0dc;
  color: #1b7a6e;
}
.fm-sd-runtime-chip.is-transferred {
  background: #e8f1f8;
  border-color: #c5d8e8;
  color: #16638f;
}
.fm-sd-runtime-chip.is-planned {
  background: #e8f6fc;
  border-color: #c5e4f2;
  color: #16638f;
}
.fm-sd-formal-drop {
  min-width: 220px;
  background: #fff;
  border: 1px solid #d5dee7;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(33, 43, 54, 0.18);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.fm-sd-formal-drop button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font: 500 13px/1.3 inherit;
  cursor: pointer;
  color: #1f2a37;
}
.fm-sd-formal-drop button:hover { background: #eaf6fb; }
.fm-sd-ob-viol-row {
  border-bottom: 0;
  padding-bottom: 2px;
  justify-content: flex-start;
}
.fm-sd-ob-viol-tiles {
  width: 100%;
  padding: 0 0 6px;
  border-bottom: 1px solid #e8ecf1;
}
.fm-sd-ob-viol-tiles .fm-sd-viol-chips {
  justify-content: flex-start;
  gap: 4px;
}
.fm-sd-ob-viol-tiles .fm-sd-viol-chip {
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 6px;
}
.fm-sd-ob-fio .fm-row-alert.has-alert {
  display: inline-flex !important;
  height: 18px;
  background: #FDECEC;
  padding: 1px 4px;
}
.fm-sd-ob-ctx-chip {
  display: inline-flex;
  background: #e8eef3;
  border: 1px solid #cfd6de;
  color: #333;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
.fm-sd-ob-note {
  margin: 0;
  font-size: 11px;
  color: #828b95;
  line-height: 1.35;
}
.fm-sd-ob-side .fm-info-formal-cta { margin-top: 8px; }
.fm-sd-ob-side .fm-sd-cta { width: 100%; margin-top: 6px; }
@media (max-width: 720px) {
  .fm-sd-ob-layout { grid-template-columns: 1fr; }
  .fm-sd-ob-side { position: static !important; }
  .fm-slider-panel.fm-slider-shift { width: min(400px, 96vw); }
  .fm-sd-code-group.is-secondary .fm-sd-snap-rail,
  .fm-sd-code-group.is-secondary .fm-sd-code-wrap { flex-wrap: wrap; }
}
.fm-sd-card {
  background: #fff; border-radius: 10px; padding: 12px 14px;
  border: 1px solid #E8ECF1;
}
.fm-sd-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 0; font-size: 13px;
}
.fm-sd-row + .fm-sd-row { border-top: 1px solid #F3F5F7; }
.fm-sd-k {
  color: #8A9299; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
}
.fm-sd-i {
  width: 14px; height: 14px; border-radius: 50%; border: 1px solid #C5CCD3;
  color: #8A9299; font-size: 10px; font-style: normal; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  cursor: help;
}
.fm-sd-dots {
  flex: 1; min-width: 12px; border-bottom: 1px dotted #D5DBE0; transform: translateY(-4px);
}
.fm-sd-v { color: #092131; font-weight: 600; text-align: right; max-width: 58%; }
.fm-sd-code {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 800; margin-right: 4px; vertical-align: baseline;
}
.fm-sd-code-нн { background: #F7C6CE; color: #8A1F2E; }
.fm-sd-code-я { background: #C8E6C9; color: #1B5E20; }
.fm-sd-code-от { background: #EEE6F1; color: #6B3FA0; }
.fm-sd-code-до { background: #ABC7D7; color: #1f2a37; }
.fm-sd-code-б { background: #FFECD6; color: #8A4B12; }
.fm-sd-code-у { background: #AEAEAE; color: #fff; }
.fm-sd-code-в { background: #ECEFF1; color: #455A64; }
.fm-sd-code-plan { background: #E8F6FC; color: #16638F; }
.fm-sd-bad { color: #B42318; font-weight: 700; }
.fm-sd-viol { list-style: none; margin: 0; padding: 0; text-align: right; }
.fm-sd-viol li { margin: 0 0 2px; }
.fm-sd-viol-m { font-weight: 500; color: #73737D; font-size: 12px; }
/* Violations · multi chips */
.fm-sd-viol-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: flex-start; align-items: center;
  max-width: 100%;
}
.fm-sd-viol-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px;
  background: #FDECEC; color: #B42318;
  border: 1px solid #F5C2C0;
  font-size: 11px; font-weight: 700; line-height: 1.3;
  font-family: inherit; cursor: default;
}
.fm-sd-viol-chip .fm-sd-viol-m { color: #8A3A32; font-weight: 600; }
.fm-sd-ob-ctx.is-editing .fm-sd-viol-chip { cursor: pointer; }
.fm-sd-ob-ctx.is-editing .fm-sd-viol-chip.is-off {
  background: #F5F7F9; color: #8A9299; border-color: #E0E4EA;
  font-weight: 600;
}
.fm-sd-ob-ctx.is-editing .fm-sd-viol-chip.is-off .fm-sd-viol-m { color: #8A9299; }
.fm-sd-viol-empty { color: #8A9299; font-weight: 600; }
/* legacy .fm-sd-actions chip CTAs removed — Transfer/runtime/edit via canon UX */
.fm-sd-xfer {
  margin: 0 0 14px; padding: 12px; border: 1px solid #E4E7EB;
  border-radius: 8px; background: #fafbfc;
}
.fm-sd-xfer-lab {
  display: block; font-size: 12px; font-weight: 700; color: #092131; margin-bottom: 6px;
}
.fm-sd-xfer-hint { font-weight: 500; color: #73737D; margin-left: 6px; }
.fm-sd-xfer-seg {
  display: inline-flex; align-items: stretch; gap: 0;
  margin: 0 0 8px; padding: 2px;
  background: #EFF2F5; border-radius: 8px;
}
.fm-sd-xfer-seg-btn {
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 650; color: #5B6470;
  padding: 6px 10px; border-radius: 6px; line-height: 1.2;
}
.fm-sd-xfer-seg-btn:hover { color: #092131; }
.fm-sd-xfer-seg-btn.on {
  background: #fff; color: #16638F;
  box-shadow: 0 1px 2px rgba(9,33,49,.08);
}
.fm-sd-xfer-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 220px; overflow: auto; margin-top: 8px;
}
.fm-sd-xfer-item {
  text-align: left; padding: 8px 10px; border: 1px solid #E4E7EB;
  border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; color: #1f2a37;
}
.fm-sd-xfer-item:hover { border-color: #2fc6f6; background: #f3fbfe; }
.fm-sd-xfer-item.on {
  border-color: #2FC6F6; background: #f0fbff; box-shadow: inset 0 0 0 1px #2FC6F6;
}
.fm-sd-xfer-note { margin: 8px 0 0; font-size: 11px; color: #73737D; line-height: 1.35; }
.fm-sd-fact {
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #D7E3EA;
  border-radius: 10px; background: #F7FBFD;
}
.fm-sd-fact-lab {
  display: block; font-size: 12px; font-weight: 700; color: #092131; margin: 0 0 8px;
}
.fm-sd-fact-row { display: flex; gap: 8px; align-items: center; }
.fm-sd-fact-inp { max-width: 140px; text-align: center; }
.fm-sd-fact-now {
  border: 1px solid #ABC7D7; background: #fff; color: #16638F;
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fm-sd-fact-now:hover { border-color: #2fc6f6; background: #f3fbfe; }
.fm-sd-fact-note { margin: 8px 0 0; font-size: 11px; color: #73737D; line-height: 1.35; }
.fm-sd-fact-err { margin: 6px 0 0; font-size: 12px; color: #B42318; font-weight: 600; }
/* S8/S9 side: dismissal note + overtime card */
.fm-sd-dismiss-note {
  margin: 10px 0 0; padding: 8px 10px; border-radius: 8px;
  background: #F0F2F5; color: #525C69; font-size: 12px; line-height: 1.4;
}
/* п.7·В: day-off remove hint (no hole; доп.смена later as Я/РВ) */
.fm-sd-v-note,
.fm-sd-rv-note,
.fm-sd-night-note {
  margin: 8px 0 0; padding: 8px 10px; border-radius: 8px;
  background: #F0F2F5; color: #525C69; font-size: 12px; line-height: 1.4;
}
.fm-sd-rv-note {
  background: #E8F5E9;
  color: #1B5E20;
}
.fm-sd-night-note {
  background: #E8EAF6;
  color: #283593;
}
.fm-sd-ot { margin-top: 10px; }
.fm-sd-ot-hint { margin: 6px 0 8px; font-size: 11px; color: #73737D; line-height: 1.35; }
.fm-sd-cube-u.on, .fm-sd-cube.fm-sd-cube-u.on { box-shadow: 0 0 0 2px #AEAEAE; }
.fm-sd-cta {
  width: 100%; margin-top: 4px; padding: 12px 14px;
  border: 1px solid #C9D1DB; border-radius: 8px; background: #fff;
  font-size: 14px; font-weight: 600; color: #1f2a37; cursor: pointer;
}
.fm-sd-cta:hover:not(:disabled) { border-color: #2fc6f6; background: #f3fbfe; }
.fm-sd-cta:disabled { opacity: .55; cursor: default; }
.fm-sd-cta-ghost { color: #16638F; }

/* —— dash stack + negative NN chart —— */
.fm-dash-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fm-nn-block { padding-top: 12px; }
.fm-nn-neg { margin-top: 8px; }
.fm-nn-axis {
  border-bottom: 2px solid #525C69; position: relative; height: 18px;
  margin: 0 4px 0;
}
.fm-nn-axis span {
  position: absolute; right: 0; bottom: 4px;
  font-size: 10px; color: #73737D; font-weight: 600;
}
.fm-nn-cols {
  display: flex; gap: 8px; align-items: flex-start;
  overflow-x: auto; padding: 0 4px 8px; min-height: 160px;
}
.fm-nn-col {
  flex: 0 0 72px; width: 72px; display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.fm-nn-above { height: 8px; width: 100%; }
.fm-nn-zero-lab { font-size: 9px; color: #A8ADB4; }
.fm-nn-below {
  width: 100%; height: 100px; display: flex; align-items: flex-start; justify-content: center;
  background: linear-gradient(180deg, rgba(241,74,74,.06), transparent 70%);
}
.fm-nn-below i {
  display: block; width: 28px; border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #F14A4A, #B42318);
  min-height: 4px;
}
.fm-nn-name {
  margin-top: 6px; font-size: 11px; font-style: normal; font-weight: 700;
  color: #1f2a37; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-nn-pct { font-size: 12px; color: #B42318; font-variant-numeric: tabular-nums; }
.fm-nn-cnt { font-size: 10px; color: #8A9299; }
.fm-nn-pos {
  font-size: 9px; color: #A8ADB4; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* —— assign / reshuffle slider —— */
.fm-radio {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin: 0 0 8px; border: 1px solid #E4E7EB;
  border-radius: 8px; cursor: pointer; background: #fff;
}
.fm-radio:hover { border-color: #B8C0C8; background: #f7fafc; }
.fm-radio:has(input:checked) {
  border-color: #2FC6F6; background: #f0fbff; box-shadow: inset 0 0 0 1px #2FC6F6;
}
.fm-radio input { margin-top: 3px; flex: 0 0 auto; }
.fm-radio span { font-size: 13px; color: #1f2a37; line-height: 1.35; }
.fm-radio em { font-style: normal; color: #73737D; font-size: 12px; }
.fm-radio:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.fm-reshuffle-modes, .fm-assign-pos-list { margin: 8px 0 14px; }
.fm-name-drop.fm-name-hot,
.fm-name.fm-drop-target {
  outline: 2px solid #2FC6F6;
  outline-offset: -2px;
  background: #f0fbff !important;
}
body.fm-dnd .fm-name-drop { cursor: copy; }

.fm-tl-label-wide { width: 176px; flex: 0 0 176px; }
.fm-tl-who {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1;
}
.fm-tl-pos {
  font-size: 12px; font-weight: 700; color: #092131;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fm-tl-who span {
  font-size: 11px; font-weight: 500; color: #73737D;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* —— positions tab (R29 · ШР classes) —— */
.fm-pos-table { display: flex; flex-direction: column; }
.fm-pos-st { font-size: 12px; font-weight: 600; }
.fm-pos-st.ok { color: #1B7A6E; }
.fm-pos-st.wait { color: #B54708; }
.fm-pos-st.bad { color: #B42318; }
body.fm-tab-pos #fmPanelPos {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
}
body.fm-tab-pos .fm-pos-card {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
  overflow: hidden;
}
body.fm-tab-pos .fm-pos-list-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: #F7FBFD; border-bottom: 1px solid #E3EDF4;
}
body.fm-tab-pos .fm-pos-list-head .fm-tree-title-row {
  width: 100%; align-items: center; gap: 8px;
}
body.fm-tab-pos #fmPosList {
  flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 0 12px;
}
body.fm-tab-pos #fmTodayMetrics { display: block; }
.fm-pos-skel { padding: 8px 0 16px; }
.fm-pos-ss.jr-table-wrap,
.fm-pos-ss.ss-table-host {
  overflow-x: auto; border: 1px solid #e0e4e8; border-radius: 0; background: #fff;
}
.fm-pos-ss .ss-table > tbody > tr.fm-pos-row-vacant > td { background: #FBFCFD; }
.fm-pos-ss .ss-table > tbody > tr.fm-pos-row-noshift > td.ss-name {
  border-left: 3px solid #9AA3AD;
}
.fm-pos-ss .ss-name-line.fm-pos-name-line {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.fm-pos-ss .fm-pos-name-btn {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; font-weight: 600; color: #092131; cursor: pointer;
  text-align: left; max-width: 100%;
}
.fm-pos-ss .fm-pos-name-btn:hover { color: #16638F; }
.fm-pos-ss .ss-kebab.fm-kebab { margin-left: auto; flex: 0 0 auto; }
.fm-pos-ss .fm-pos-sched-td .fm-sched-chips { flex-wrap: wrap; }
.fm-pos-empty { margin: 16px; color: #73737D; }

@media (max-width: 800px) {
  .fm-filter-wrap .popup-filter.open { grid-template-columns: 1fr; }
  .fm-filter-wrap .popup-fields { grid-column: 1; grid-template-columns: 1fr; }
}

/* beat hub-slider-page popup overrides */
body.hub-slider-page .fm-filter-wrap .popup-filter.open {
  grid-template-columns: 168px 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 240px;
}
body.hub-slider-page .fm-filter-wrap .popup-fields {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: 1fr 1fr;
  padding: 16px 18px 10px;
  gap: 12px 18px;
  max-height: none;
}
body.hub-slider-page .fm-filter-wrap .popup-presets {
  grid-column: 1;
  grid-row: 1;
}
@media (max-width: 800px) {
  body.hub-slider-page .fm-filter-wrap .popup-filter.open { grid-template-columns: 1fr; }
  body.hub-slider-page .fm-filter-wrap .popup-fields {
    grid-column: 1; grid-template-columns: 1fr;
  }
}

/* Transfer board: filters + role/season chips + roster meta */
.fm-board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  align-items: center;
}
.fm-filter-input,
.fm-filter-select {
  font: inherit;
  font-size: 12px;
  border: 1px solid #DCE3E8;
  border-radius: 8px;
  background: #fff;
  color: #092131;
  padding: 6px 8px;
  min-height: 32px;
}
.fm-filter-input {
  flex: 1 1 140px;
  min-width: 120px;
}
.fm-filter-select {
  flex: 0 1 auto;
  max-width: 160px;
}
.fm-board-pos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  width: 100%;
  margin: 2px 0 0 22px;
}
.fm-board-pos.has-hole .fm-board-pos-chips { margin-left: 0; }
.fm-role-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  background: #0f2a3d;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-season-row {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  vertical-align: middle;
  flex-wrap: wrap;
}
.fm-season {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
}
.fm-season-summer { color: #3d6b2e; background: #eaf5e4; }
.fm-season-winter { color: #2a4a62; background: #e4eef5; }
.fm-season-ico { display: block; }
.fm-emp-meta {
  margin-top: 2px;
  font-size: 11px;
  color: #73737D;
  line-height: 1.3;
}
.fm-emp-fio .fm-season-row { margin-left: 4px; }

/* —— Link tree: fan Type → slots → people; pools right —— */
/* R4/R5 chrome = shell #fmFilterBar + #fmLegendStrip (класс Смены) */
.fm-tree-card,
body.fm-tab-tree .fm-list-solo.fm-tree-card {
  overflow: hidden; /* split scroll lives in .fm-fan-main / .fm-fan-pools */
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.fm-tree-card > .fm-list-head {
  margin-bottom: 8px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: flex-start;
}
/* Title + ⛶/Компакт glued (R7 · like .fm-th-month-tools); Reload to the right */
.fm-tree-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}
.fm-tree-title-row h2 {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}
.fm-tree-card > .fm-list-head #fmTreeReload { margin-left: auto; flex: 0 0 auto; }
.fm-tree-card > .fm-list-head #fmTreeBoardFocus,
.fm-tree-card > .fm-list-head #fmTreeCompact,
.fm-emp-card > .fm-list-head #fmEmpBoardFocus,
.fm-pos-card > .fm-list-head #fmPosBoardFocus,
.fm-xfer-card > .fm-list-head #fmXferBoardFocus {
  flex: 0 0 auto;
  padding: 5px 10px;
}
body.fm-board-focus .fm-fan-pools { max-height: none; }

/* Split scroll: absolute board fill — panes get a definite height so
   overflow-y:auto works independently (flex-only still grew with content
   → outer card scrolled both columns together — Pavel). */
body.fm-tab-tree .fm-shell {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
body.fm-tab-tree #fmPanelTree {
  overflow: hidden !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column;
  position: relative;
}
body.fm-tab-tree .fm-list-solo.fm-tree-card {
  overflow: hidden !important; /* kill .fm-list-solo { overflow:auto } */
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column;
  position: relative;
  padding-bottom: 8px;
}
body.fm-tab-tree .fm-tree-card > .fm-list-head {
  flex: 0 0 auto;
}
body.fm-tab-tree .fm-tree-root {
  position: relative !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  display: block !important; /* absolute board fills this box */
  padding-bottom: 0;
}
body.fm-tab-tree .fm-fan-board {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.55fr);
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  align-content: stretch !important;
  gap: 12px;
  overflow: hidden !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
}
body.fm-tab-tree .fm-fan-main,
body.fm-tab-tree .fm-fan-pools {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  align-self: stretch !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative !important; /* kill sticky */
  scrollbar-gutter: stable;
  /* padding so inset drop cue is not flush-clipped at pane edges */
  padding: 6px;
  box-sizing: border-box;
}
body.fm-tab-tree .fm-fan-main {
  box-shadow: inset -2px 0 0 #b8eaf8;
}
body.fm-tab-tree .fm-fan-pools {
  position: relative !important;
  top: auto !important;
  box-shadow: inset 2px 0 0 #b8eaf8;
}

/* TREE compact: one-line cards — more drop targets on short screens */
body.fm-tree-compact .fm-tree-node.kind-slot,
body.fm-tree-compact .fm-tree-node.kind-person,
body.fm-tree-compact .fm-tree-pool-card {
  padding: 4px 8px;
  min-height: 0;
  gap: 2px;
}
/* Compact hides slot/person chrome; type keeps plan/stat/schedule for orientation */
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-tree-stat,
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-tree-sched-line,
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-tree-shift-line,
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-tree-hood,
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-drag-badge,
body.fm-tree-compact .fm-tree-pool-card .fm-drag-badge,
body.fm-tree-compact .fm-tree-pool-card .fm-tree-sched-line,
body.fm-tree-compact .fm-tree-pool-card .fm-tree-stat,
body.fm-tree-compact .fm-tree-node:not(.kind-type) .fm-tree-actions,
body.fm-tree-compact .fm-tree-node .fm-tree-contact,
body.fm-tree-compact .fm-tree-pool-card .fm-tree-contact,
body.fm-tree-compact .fm-tree-kind-mark {
  display: none !important;
}
/* Pool pickers stay visible in compact (small) — needed for attach/assign */
body.fm-tree-compact .fm-tree-pool-foot {
  margin-top: 2px;
  gap: 4px;
}
body.fm-tree-compact .fm-tree-pool-foot .fm-f-trig {
  height: 28px;
  font-size: 12px;
}
body.fm-tree-compact .fm-tree-pool-foot .fm-tree-btn {
  height: 28px;
  font-size: 12px;
  padding: 0 10px;
}
body.fm-tree-compact .fm-tree-node-head,
body.fm-tree-compact .fm-tree-drag-row {
  margin: 0;
  min-height: 24px;
  cursor: grab;
}
body.fm-tree-compact .fm-tree-name {
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.fm-tree-compact .fm-fan-branch {
  gap: 6px;
  min-height: 0;
}
body.fm-tree-compact .fm-fan-row {
  gap: 8px;
  margin-bottom: 6px;
}
body.fm-tree-compact .fm-tree-node.kind-type {
  padding: 6px 8px;
  min-height: 0;
}
body.fm-tree-compact .fm-tree-pool-hint { display: none; }
body.fm-tree-compact .fm-fan-pools .fm-tree-pool-grid {
  gap: 6px;
}

/* Hub sync · quiet admin cue (dot + tiny Hub), not a hero pill */
.fm-tree-pill.hub-sync {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px 0 3px;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: #8a949e;
  background: transparent;
  border: 1px solid #e4e8ee;
  border-radius: 999px;
  opacity: 0.85;
  vertical-align: middle;
}
.fm-hub-sync-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #c9a04a;
  box-shadow: none;
}
.fm-tree-pill.hub-sync.is-ok .fm-hub-sync-dot {
  background: #1b7a45;
  box-shadow: none;
}
.fm-tree-pill.hub-sync.is-pending .fm-hub-sync-dot {
  background: #c9a04a;
  box-shadow: none;
}
.fm-tree-pill.hub-sync.is-ok { color: #6a7a70; border-color: #d5e4da; }
.fm-tree-pill.hub-sync.is-pending { color: #8a8070; border-color: #e8dfc8; }

/* Pool footer: picker + CTA; kind-mark clears the buttons */
.fm-tree-pool-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin-top: 2px;
  padding-right: 22px; /* room for kind-mark */
  position: relative;
  z-index: 2;
}
.fm-tree-pool-foot .fm-tree-pool-pick {
  flex: 1 1 140px;
  min-width: 0;
}
.fm-tree-pool-foot .fm-tree-pool-pick .fm-f-lab { display: none; }
.fm-tree-pool-foot .fm-f-dd { width: 100%; }
.fm-tree-pool-foot .fm-f-trig {
  width: 100%;
  height: 34px;
  justify-content: space-between;
}
.fm-tree-pool-foot .fm-tree-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.fm-tree-pool-card .fm-tree-kind-mark {
  bottom: 10px;
  right: 8px;
  z-index: 0;
  opacity: 0.28;
}
.fm-tree-drag-row {
  cursor: grab;
  user-select: none;
}
.fm-tree-drag-row:active { cursor: grabbing; }
.fm-f-opt .fm-f-opt-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}
.fm-f-opt .fm-f-opt-title {
  font-weight: 600;
  font-size: 13px;
  color: #1f2a37;
}
.fm-f-opt .fm-f-opt-meta {
  font-size: 11px;
  color: #73737D;
}
.fm-f-opt .fm-tree-pill {
  flex: 0 0 auto;
  margin-left: 8px;
}
.fm-f-opt.is-disabled,
.fm-f-opt[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.fm-f-opt.is-empty {
  pointer-events: none;
  color: #9aa3ad;
  font-size: 13px;
  padding: 8px 12px;
}
/* TREE: панель всегда видна при body.fm-tab-tree — не белый экран из-за [hidden] */
body.fm-tab-tree #fmPanelTree {
  display: flex !important;
  flex: 1 1 0;
  min-height: 240px;
}
body.fm-tab-tree #fmPanelWfm[hidden] {
  display: none !important;
}

/* TREE tab: only named facets hidden; rest stay (display:flex beats UA [hidden]) */
#fmLegendBlocks .fm-leg-block.is-tree-chrome-hide,
#fmTodayMetrics[hidden] {
  display: none !important;
}
body.fm-tab-tree #fmLegendStrip {
  justify-content: flex-start;
  flex-wrap: nowrap !important;
  align-items: center;
  overflow: hidden; /* одна линия высоты; picker — position:fixed */
  min-width: 0;
  min-height: 40px;
  max-height: 52px;
}
#fmTreeLegendHost {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 8px;
  /* как #fmTodayMetrics на Сменах: не растягивать — иначе чипы уезжают вправо */
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  order: -1;
  margin-right: 8px;
  overflow: hidden;
}
#fmTreeLegendHost[hidden] { display: none !important; }
#fmTreeLegendHost .fm-today-metrics {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
/* Подложка как Смены (.fm-today-compact), не снимать через .fm-today-inline */
#fmTreeLegendHost .fm-today-compact.fm-today-inline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 8px;
  overflow: hidden;
  max-width: 100%;
  background: #fff;
  border: 1px solid #E0E4EA;
  border-radius: 8px;
  padding: 6px 10px;
}
/* Режем подписи метрик, не переносим → высота строки легенды стабильна */
#fmTreeMeta {
  flex-wrap: nowrap !important;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
#fmTreeLegendHost .fm-tc-m {
  cursor: default;
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap !important;
  overflow: hidden;
  align-items: baseline;
  /* фон/бордер как .fm-tc-m Смены; tone-классы ниже */
  background: #F5F7F9;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
}
#fmTreeLegendHost .fm-tc-m[data-tree-node] {
  cursor: pointer;
  user-select: none;
}
#fmTreeLegendHost .fm-tc-m[data-tree-node]:hover {
  border-color: #c5d0db;
}
#fmTreeLegendHost .fm-tc-m[data-tree-node].is-filter-on,
#fmTreeLegendHost .fm-tc-m[data-tree-node][aria-pressed="true"] {
  outline: 2px solid currentColor;
  outline-offset: 0;
  font-weight: 700;
}
#fmTreeLegendHost .fm-tc-m.on { background: #EAF5F4; }
#fmTreeLegendHost .fm-tc-m.warn { background: #FFF8E8; }
#fmTreeLegendHost .fm-tc-m.bad { background: #FFF1F0; }
#fmTreeLegendHost .fm-tc-m.muted-hole { background: #F0F2F5; color: #5B6470; }
#fmTreeLegendHost .fm-tc-m b {
  flex: 0 0 auto;
}
#fmTreeLegendHost .fm-tc-m .fm-tc-lab {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* TREE: как Смены — блоки слева после метрик (flex:1, content start) */
body.fm-tab-tree #fmLegendBlocks {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  overflow: visible; /* picker dropdowns */
}
/* Узлы: одна строка без переноса; в compact — кнопка+picker как Этап */
#fmTreeLegendBar,
.fm-tree-nodes-legend {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
#fmTreeLegendBar .fm-leg {
  width: auto;
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: default;
  flex: 0 0 auto;
  white-space: nowrap;
  box-sizing: border-box;
  font-style: normal;
}
/* Inline Узлы while strip is compact: NEVER absolute dropdown / column stack */
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-nodes-inline
  .fm-leg-surface {
  position: static !important;
  z-index: auto !important;
  top: auto !important;
  left: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  flex-direction: row !important;
  align-items: center !important;
  display: inline-flex !important;
}
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-nodes-inline
  .fm-leg-block-lab {
  display: none !important;
}
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-nodes-inline
  #fmTreeLegendBar,
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-nodes-inline
  .fm-tree-nodes-legend {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: auto !important;
  gap: 3px !important;
  white-space: nowrap !important;
}
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-nodes-inline
  #fmTreeLegendBar
  .fm-leg {
  display: inline-flex !important;
  width: auto !important;
  height: 22px !important;
  min-height: 0 !important;
  padding: 0 8px !important;
  margin: 0 !important;
  border-radius: 6px !important;
}
/* Picker (▾ only): плашки на всю ширину — рецепт Этап; z выше таблицы */
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"]:not(.is-nodes-inline)
  .fm-leg-surface {
  z-index: 240;
}
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"]:not(.is-nodes-inline)
  #fmTreeLegendBar,
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"]:not(.is-nodes-inline)
  .fm-tree-nodes-legend,
.fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-open:not(.is-nodes-inline)
  #fmTreeLegendBar,
.fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-open:not(.is-nodes-inline)
  .fm-tree-nodes-legend {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  width: 100%;
  gap: 4px;
  white-space: normal;
}
.fm-legend-blocks.is-leg-compact
  .fm-leg-adaptive[data-leg-adaptive="tree-nodes"]:not(.is-nodes-inline)
  #fmTreeLegendBar
  .fm-leg,
.fm-leg-adaptive[data-leg-adaptive="tree-nodes"].is-open:not(.is-nodes-inline)
  #fmTreeLegendBar
  .fm-leg {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  height: auto;
  min-height: 28px;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 4px;
  cursor: default;
  box-sizing: border-box;
}
#fmTreeLegendBar .fm-leg.lg-type { background: #d6ebff; color: #2067b0; }
#fmTreeLegendBar .fm-leg.lg-slot { background: #e8e0ff; color: #6b4fbf; }
#fmTreeLegendBar .fm-leg.lg-person { background: #d9f2e3; color: #1b7a45; }
#fmTreeLegendBar .fm-leg.lg-empty { background: #f0f2f5; color: #6a7380; border-style: dashed; border-color: #b8c1cc; }
#fmTreeLegendBar .fm-leg.lg-extra { background: #ffe3e0; color: #a33a32; border-color: #f0a39c; }
#fmTreeLegendBar .fm-leg.lg-mismatch { background: #fff3bf; color: #8a6d00; border-color: #e0a52d; }
.fm-tree-node.kind-type .fm-tree-name,
.fm-tree-node.kind-slot .fm-tree-name,
.fm-tree-node.kind-person .fm-tree-name,
.fm-tree-pool-card.kind-person .fm-tree-name {
  min-width: 0;
}
.fm-tree-node.kind-type .fm-tree-open-link,
.fm-tree-node.kind-type .fm-tree-name-text,
.fm-tree-node.kind-slot .fm-tree-open-link,
.fm-tree-node.kind-slot .fm-tree-name-text,
.fm-tree-node.kind-person .fm-tree-open-link,
.fm-tree-node.kind-person .fm-tree-name-text,
.fm-tree-pool-card.kind-person .fm-tree-open-link,
.fm-tree-pool-card.kind-person .fm-tree-name-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-tree-name-trail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0;
}
.fm-tree-name-trail .fm-row-alert {
  margin: 0;
}
.fm-tree-name-trail .fm-kebab {
  margin: 0;
}
/* Смена по рецепту легенды — на строке графика и в stat */
.fm-tree-node .fm-tree-stat .fm-leg.shift,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid transparent;
  font-style: normal;
  font-family: inherit;
  line-height: 1;
}
.fm-tree-node .fm-tree-stat .fm-leg.shift .fm-shi,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift .fm-shi,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift .fm-shi,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift .fm-shi { width: 12px; height: 12px; }
.fm-tree-node .fm-tree-stat .fm-leg.shift.morning,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift.morning,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift.morning,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift.morning { color: #C45C26; background: #FFF3E8; border-color: #F0D7C0; }
.fm-tree-node .fm-tree-stat .fm-leg.shift.day,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift.day,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift.day,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift.day { color: #9A6B00; background: #FFF6CC; border-color: #E6D48A; }
.fm-tree-node .fm-tree-stat .fm-leg.shift.evening,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift.evening,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift.evening,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift.evening { color: #6B3FA0; background: #F3ECFA; border-color: #DDD0EA; }
.fm-tree-node .fm-tree-stat .fm-leg.shift.night,
.fm-tree-node .fm-tree-sched-line .fm-leg.shift.night,
.fm-tree-node .fm-tree-shift-line .fm-leg.shift.night,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift.night { color: #3A4A6B; background: #E8ECF4; border-color: #CDD3E0; }
.fm-tree-node .fm-tree-sched-line .fm-leg.shift.is-ico,
.fm-tree-node .fm-tree-shift-on-sched .fm-leg.shift.is-ico {
  padding: 0 4px; gap: 0;
}
.fm-tree-plain-id {
  font-size: 11px;
  font-weight: 650;
  color: #7a8794;
  font-variant-numeric: tabular-nums;
}

.fm-tree-filter-hint {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #7a8794;
  font-weight: 500;
  line-height: 1.35;
  padding: 0 2px 4px;
}

.fm-tree-root {
  padding-bottom: 32px;
  flex: 1 1 auto;
  min-height: 200px;
  color: #1f2a37;
}
.fm-tree-empty {
  color: #5B6470 !important;
  font-size: 15px;
  padding: 28px 16px !important;
  text-align: center;
  line-height: 1.45;
}
/* CANON §6: reuse fm-board-skel tokens; layout mirrors fan tree */
.fm-board-skel.fm-tree-skel {
  padding: 4px 0 12px;
  background: transparent;
}
.fm-tree-skel .fm-tree-node { min-height: 72px; pointer-events: none; }
.fm-tree-open-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.fm-tree-open-link:hover { color: #2067b0; text-decoration: underline; }

/* legacy */
.fm-tree-legend { display: none; }
.fm-tree-filters { display: none !important; }
.fm-tree-chip {
  background: #fff; border: 1px solid #E8ECF1; border-radius: 10px;
  padding: 6px 12px; font-size: 13px; color: #535c69;
}

.fm-tree-node.kind-slot.is-mismatch {
  border-color: #e0a52d;
  background: #fff8e8; /* solid — no gradient */
  box-shadow: inset 0 0 0 1px rgba(224,165,45,.35);
}

.fm-fan-board {
  display: grid;
  /* дерево + пулы растут пропорционально (не только персонал) */
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.55fr);
  gap: 12px;
  align-items: stretch; /* was start — panes sized to content, killed split scroll */
}
.fm-fan-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fm-fan-row {
  display: grid;
  /* Тип — узкая фиксированная колонка; ветки штатка→персонал забирают остаток */
  grid-template-columns: minmax(148px, 196px) 14px minmax(0, 1fr);
  gap: 0 4px;
  padding: 10px;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  background: #f7f9fb;
}
.fm-fan-row.is-reduced { opacity: .72; }
.fm-fan-type-col {
  display: flex;
  min-width: 0;
  max-width: 196px;
  width: 100%;
}
.fm-fan-spine {
  position: relative;
  align-self: stretch;
  min-height: 48px;
}
.fm-fan-spine::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: #9eb6c9;
  transform: translateX(-50%);
  border-radius: 1px;
}
.fm-fan-spine.has-one::before {
  top: 50%;
  bottom: auto;
  height: 2px;
  width: 2px;
}
.fm-fan-branches { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fm-fan-branch {
  display: grid;
  /* rail | штатка | link | персонал */
  grid-template-columns: 12px minmax(200px, 0.85fr) 28px minmax(240px, 1.15fr);
  column-gap: 10px;
  row-gap: 0;
  /* stretch rails/links to branch height; cards keep natural height via align-self */
  align-items: stretch;
  position: relative;
}
.fm-fan-branch > .fm-tree-node.kind-slot,
.fm-fan-branch > .fm-fan-people {
  align-self: start; /* карточки не растягиваются и не «магнитятся» */
  margin: 0;
}
.fm-fan-branch-rail {
  position: relative;
  min-width: 0;
  min-height: 56px;
  align-self: stretch;
  pointer-events: none;
}
.fm-fan-branch-rail::before {
  content: "";
  position: absolute;
  left: -8px;
  right: 2px;
  top: 28px; /* линия к центру типичной карточки штатки, не 50% пустой колонки */
  height: 2px;
  background: #9eb6c9;
  border-radius: 1px;
}
/* одна линия штатка→сотрудник + стрелка */
.fm-fan-link {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22px; /* стрелка на высоте центра карточки */
  pointer-events: none;
  min-width: 0;
  min-height: 56px;
  align-self: stretch;
}
.fm-fan-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  height: 2px;
  background: #9eb6c9;
}
.fm-fan-link-arrow {
  position: relative;
  z-index: 1;
  padding: 0 3px;
  background: #f7f9fb;
  color: #5a6b7a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.fm-fan-arrow {
  display: flex; align-items: center; justify-content: center;
  color: #5a6b7a; font-size: 14px; font-weight: 700; user-select: none;
}
.fm-fan-people {
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
/* Красная зона «Расщепление»: ветки были без gap — H81/H82 слипались */
.fm-fan-extra {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px dashed #e08a82;
  background: #fff6f5;
}
.fm-fan-extra-head {
  font-size: 13px; font-weight: 700; color: #a33a32; margin: 0 0 2px;
}
.fm-fan-extra .fm-fan-branch-rail::before,
.fm-fan-extra .fm-fan-link::before { background: #e08a82; }
.fm-fan-extra .fm-fan-link-arrow { background: #fff6f5; }
.fm-fan-empty-hint {
  color: #9aa3ad; font-size: 14px; padding: 12px 8px;
}

.fm-tree-node {
  border-radius: 8px; border: 1px solid #d7dee7; background: #fff;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: none; min-width: 0;
  transition: box-shadow .12s ease, border-color .12s ease, outline-color .12s ease;
}
/* Kind mark: small icon bottom-right — containing card must be position:relative */
.fm-tree-node.kind-type,
.fm-tree-node.kind-slot,
.fm-tree-node.kind-person,
.fm-tree-pool-card.kind-person,
.fm-tree-pool-card.kind-slot {
  position: relative;
}
.fm-tree-kind-mark {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.38;
  pointer-events: none;
  color: inherit;
  z-index: 1;
}
.fm-tree-node.kind-slot .fm-tree-kind-mark,
.fm-tree-pool-card.kind-slot .fm-tree-kind-mark { color: #6b4fbf; }
.fm-tree-node.kind-person .fm-tree-kind-mark,
.fm-tree-pool-card.kind-person .fm-tree-kind-mark { color: #1b7a45; }
.fm-tree-node.kind-type .fm-tree-kind-mark { color: #2067b0; }
.fm-tree-node.kind-person.is-empty .fm-tree-kind-mark { opacity: 0.22; }
.fm-tree-kind-mark svg { width: 16px; height: 16px; display: block; }
.fm-tree-kind-mark.is-cascade {
  width: 26px; height: 22px;
  opacity: 1; /* mark itself solid — layers have no per-icon opacity */
  filter: none !important;
  box-shadow: none !important;
  background: none !important;
}
.fm-tree-kind-mark.is-cascade svg {
  width: 26px; height: 22px;
  filter: none !important;
}
.fm-tree-kind-mark.is-cascade g { opacity: 1 !important; }

/* Create-in-progress stub (динамическая заглушка в веере) */
.fm-tree-node.is-creating {
  border-style: dashed;
  border-color: #9bc4da;
  background: linear-gradient(110deg, #f3f7fb 0%, #e8f2f8 45%, #f3f7fb 90%);
  background-size: 200% 100%;
  animation: fm-create-stub-shine 1.2s ease-in-out infinite;
  pointer-events: none;
  min-height: 72px;
}
.fm-tree-node.is-creating .fm-tree-kind { color: #16638F; }
.fm-tree-node.is-creating .fm-tree-name { color: #16638F; font-weight: 650; }
.fm-tree-node.is-creating .fm-skel {
  margin-top: 4px;
}
@keyframes fm-create-stub-shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Узлы-фильтр: несовпавшие узлы гасятся */
.fm-tree-root.is-node-filter .fm-tree-node.is-node-dim,
.fm-tree-root.is-node-filter .fm-tree-pool-card.is-node-dim,
.fm-tree-root.is-node-filter .fm-fan-branch.is-node-dim,
.fm-tree-root.is-node-filter .fm-fan-extra.is-node-dim {
  opacity: 0.28;
  filter: grayscale(0.35);
  pointer-events: none;
}

/* R20v season-ico · colored lights on TREE type cards */
.fm-tree-season {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.fm-tree-node .season-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
}
.fm-tree-node .season-ico.winter {
  color: #2b6cb0;
  background: #e4eef5;
  border: 1px solid #9bb6c9;
}
.fm-tree-node .season-ico.summer {
  color: #dd6b20;
  background: #fff1e0;
  border: 1px solid #f0c48a;
}
.fm-tree-root.is-node-filter .fm-tree-node.is-node-dim .fm-tree-open-link,
.fm-tree-root.is-node-filter .fm-tree-node.is-node-dim button {
  pointer-events: none;
}
#fmTreeLegendBar .fm-leg[data-tree-node] {
  cursor: pointer;
  user-select: none;
}
#fmTreeLegendBar .fm-leg[data-tree-node].on {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  font-weight: 700;
}

.fm-tree-node.kind-type {
  border-color: #c5d3e0;
  border-left: 3px solid #2067b0; /* match Тип label color */
  background: #fff;
  width: 100%;
  max-width: 196px;
  box-sizing: border-box;
  overflow: hidden; /* keep cascade mark inside the type card */
  padding-bottom: 22px; /* room for bottom-right cascade glyph */
}
.fm-tree-node.kind-type[data-drop-type],
.fm-fan-row[data-drop-type] {
  /* drop target for orphan slots */
}
.fm-tree-node.kind-slot {
  border-color: #d0d5dd;
  border-left: 3px solid #6b4fbf; /* match Штатка label color */
  background: #fff;
  max-width: none;
  box-sizing: border-box;
}
/* Drop cue: inset-only (outer ring/outline clipped by .fm-fan-main overflow) */
.fm-fan-branch.is-drop-target {
  position: relative;
  z-index: 6;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2.5px #2fc6f6;
  background: rgba(232, 247, 252, 0.78);
  outline: none;
}
.fm-fan-branch.is-drop-target::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(47, 198, 246, 0.35);
}
.fm-tree-node.is-drop-ok,
.fm-fan-row.is-drop-ok {
  outline: none !important;
  position: relative;
  z-index: 4;
  box-shadow: inset 0 0 0 2px #2fc6f6 !important;
  background: #e8f7fc;
}
/* Soft type-row only — inset, no outer outline under next row */
.fm-fan-row.is-drop-type {
  outline: none !important;
  box-shadow: inset 0 0 0 2px rgba(47, 198, 246, 0.65) !important;
  background: rgba(47, 198, 246, 0.08);
}
.fm-tree-node.kind-slot.is-drop-slot,
.fm-tree-node.kind-slot.is-drop-ok.is-drop-slot {
  outline: none;
  position: relative;
  z-index: 4;
  box-shadow: inset 0 0 0 2px #1aa3d1;
  background: #e8f7fc !important;
}
.fm-tree-node.kind-person.is-empty.is-drop-hole,
.fm-tree-node.kind-slot.is-ph.is-drop-hole,
.fm-tree-node.is-drop-hole {
  outline: none;
  position: relative;
  z-index: 4;
  box-shadow: inset 0 0 0 2px #0b8f6a;
  background: #e8f8f2 !important;
}
.fm-tree-node.is-drop-bad {
  outline: none;
  position: relative;
  z-index: 4;
  box-shadow: inset 0 0 0 2px #e08a82;
  background: #fff5f4;
}
.fm-tree-pool-block.is-drop-ok {
  outline: none;
  box-shadow: inset 0 0 0 2px #2fc6f6;
}
.fm-tree-node.kind-slot.is-vacant { border-style: dashed; background: #fafbfc; }
.fm-tree-node.kind-slot.is-ph {
  border-style: dashed; border-color: #c5d0db; background: #f5f7fa; color: #73737D;
}
.fm-tree-node.kind-slot.is-extra {
  border-color: #e0a8a8; border-left-color: #a32020; background: #fffafa;
}
.fm-tree-node.kind-person {
  border-color: #c9d6ce; border-left: 3px solid #1b7a45; /* match Персонал label color */
  background: #fff;
  min-width: 0;
  box-sizing: border-box;
}
.fm-tree-node.kind-person.is-empty {
  border-style: dashed; border-color: #c5d0db; border-left-color: #9aa3ad; background: #f8f9fb; color: #8b97a5;
}
.fm-tree-node.kind-person.is-hole {
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
}
.fm-tree-node .fm-tree-name.is-muted,
.fm-tree-node.kind-person.is-empty .fm-tree-name {
  color: #8b97a5;
  font-weight: 600;
  font-size: 13px;
}
.fm-tree-node.kind-person.is-overflow {
  border-color: #e08a82; background: #fff8f7;
}

.fm-tree-hc {
  display: flex; align-items: baseline; gap: 8px; margin: 2px 0 4px;
}
/* BI-кластер: большая ячейка план + столбец факт/занято/лишн. */
.fm-tree-hc-cluster {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 2px 0 4px;
  min-width: 0;
}
.fm-tree-hc-plan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border: 1px solid #c5d3e0;
  border-radius: 8px;
  background: #f3f8fc;
  flex: 0 0 auto;
}
.fm-tree-hc-num {
  font-size: 36px; font-weight: 800; line-height: 1; color: #1760a8; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fm-tree-hc-lab {
  font-size: 10px; font-weight: 700; color: #5a6b7a; text-transform: uppercase; letter-spacing: .04em;
  line-height: 1.2; margin-top: 2px;
}
.fm-tree-hc-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}
.fm-tree-hc-side-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 7px;
  border: 1px solid #E0E4EA;
  border-radius: 5px;
  background: #F5F7F9;
  font-size: 11px;
  color: #5a6b7a;
  line-height: 1.2;
}
.fm-tree-hc-side-cell b {
  font-size: 13px;
  font-weight: 800;
  color: #092131;
  font-variant-numeric: tabular-nums;
}
.fm-tree-hc-side-lab { font-weight: 650; }
.fm-tree-hc-side-cell.on { background: #EAF5F4; border-color: #c5ddd8; }
.fm-tree-hc-side-cell.warn { background: #FFF8E8; border-color: #ecd9a8; }
.fm-tree-hc-side-cell.bad { background: #FFF1F0; border-color: #efc4c0; }
.fm-tree-hc-side-cell.bad b { color: #a32020; }
.fm-tree-hc-side-cell.warn b { color: #9a5b00; }
.fm-tree-hc-fact {
  font-size: 13px; color: #535c69; line-height: 1.35;
}
.fm-tree-hc-fact b { color: #1f2a37; }
/* legacy inline metrics (если остались вызовы) */
.fm-tree-hc-metrics {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 2px 0 4px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #E0E4EA;
  border-radius: 8px;
}
.fm-tree-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12px; color: #1f2a37;
}
.fm-tree-sched-line .fm-sched-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px; background: #eef2f6;
  font-size: 11px; font-weight: 650;
}
.fm-tree-sched-line .fm-sched-chip b { font-weight: 700; }
.fm-tree-shift-on-sched {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.fm-tree-hours-line {
  color: #5a6b7a; font-weight: 650;
}
.fm-tree-hours-line b { color: #1f2a37; font-variant-numeric: tabular-nums; }
.fm-tree-shift-line { gap: 4px; }
.fm-tree-shift-fav { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.fm-tree-contact.is-compact {
  padding: 5px 8px;
  gap: 4px 10px;
  background: #f4f7fa;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
}

.fm-tree-kind {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #73737D; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.fm-bx-id-link { text-decoration: none; }
.fm-bx-id {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: .02em; text-transform: none;
  padding: 2px 7px; border-radius: 6px;
  background: #1f2a37; color: #fff;
}
.fm-bx-id-link:hover .fm-bx-id { background: #2fc6f6; }
.fm-tree-node.kind-type .fm-tree-kind { color: #2067b0; }
.fm-tree-node.kind-slot .fm-tree-kind { color: #6b4fbf; }
.fm-tree-node.kind-slot.is-extra .fm-tree-kind { color: #a33a32; }
.fm-tree-node.kind-person .fm-tree-kind { color: #1b7a45; }

.fm-tree-name {
  font-size: 15px; font-weight: 650; line-height: 1.3; color: #1f2a37; word-break: break-word;
}
.fm-tree-stat { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-tree-pill {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px;
  background: #eef2f6; color: #1f2a37;
}
.fm-tree-pill.warn { background: #fff1e0; color: #9a5b00; }
.fm-tree-pill.ok { background: #e6f6ec; color: #1b7a45; }
.fm-tree-pill.danger { background: #ffe8e5; color: #a33a32; }
.fm-tree-pill.muted { background: #f0f2f5; color: #73737D; font-weight: 500; }

.fm-tree-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 2px; }
.fm-tree-link {
  font-size: 13px; color: #2067b0; text-decoration: none; font-weight: 600;
}
.fm-tree-link:hover { text-decoration: underline; }

.fm-fan-pools {
  position: sticky; top: 8px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.fm-tree-pool-block {
  padding: 10px 12px; border-radius: 10px; border: 1.5px dashed #e0a52d; background: #fffbf2;
}
.fm-tree-pool-block.is-slots { border-color: #b9a8f0; background: #faf8ff; }
.fm-tree-pool-block.is-people { border-color: #7dcea0; background: #f4fbf7; }
.fm-tree-pool-block.is-archive { border-color: #b8c1cc; background: #f4f5f7; }
.fm-tree-pool-block.is-empty {
  padding: 8px 10px;
  opacity: .88;
}
.fm-tree-pool-block.is-collapsed {
  padding-bottom: 8px;
}
.fm-tree-pool-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  min-width: 0;
}
.fm-tree-pool-block.is-empty .fm-tree-pool-head { margin-bottom: 2px; }
.fm-tree-pool-block.is-collapsed .fm-tree-pool-head { margin-bottom: 0; }
.fm-tree-pool-head h3 {
  margin: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
}
.fm-pool-collapse {
  appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #d0d7e0;
  border-radius: 6px;
  background: #fff;
  color: #5a6b7a;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fm-pool-collapse:hover {
  border-color: #2fc6f6;
  color: #16638F;
}
.fm-tree-pool-block.is-collapsed .fm-pool-body {
  display: none !important;
}
.fm-tree-node-head .fm-drag-grip {
  width: 18px;
  height: 22px;
  flex: 0 0 auto;
  margin: 0;
}
.fm-tree-pool-block h3 {
  margin: 0 0 6px; font-size: 12px; font-weight: 700; line-height: 1.3;
}
.fm-tree-pool-block.is-empty h3 { margin: 0 0 2px; }
.fm-tree-pool-block.is-slots h3 { color: #5a3fb0; }
.fm-tree-pool-block.is-people h3 { color: #1b7a45; }
.fm-tree-pool-block.is-archive h3 { color: #535c69; }
.fm-tree-pool-block .fm-pool-body { min-width: 0; }
.fm-tree-pool-block .fm-pool-empty {
  font-size: 11px; color: #9aa3ad; padding: 0; line-height: 1.3;
}
.fm-tree-pool-grid { display: flex; flex-direction: column; gap: 8px; }
.fm-tree-pool-hint {
  font-size: 11px; color: #7a8794; margin: 0 0 8px; line-height: 1.3;
}
.fm-tree-pool-card {
  position: relative;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 14px;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(9, 33, 49, 0.04);
}
.fm-tree-pool-block.is-slots .fm-tree-pool-card {
  border-color: #ddd0f5;
  border-left: 4px solid #6b4fbf;
}
.fm-tree-pool-block.is-people .fm-tree-pool-card {
  border-color: #cfe8d8;
  border-left: 4px solid #1b7a45;
}
.fm-tree-pool-block.is-archive .fm-tree-pool-card {
  border-color: #d5dae2;
  border-left: 4px solid #7a8490;
  background: #fafbfc;
}
.fm-tree-pool-card[draggable="true"],
.fm-tree-pool-card:has(.fm-drag-grip) {
  cursor: default;
}
.fm-tree-pool-card.is-dragging { opacity: .45; }
.fm-tree-pool-card .fm-tree-name { font-size: 14px; }
.fm-tree-pool-card select {
  width: 100%; height: 34px; font-size: 13px; border: 1px solid #c6cdd3; border-radius: 10px; padding: 0 10px;
}
.fm-tree-pool-card .fm-drag-badge {
  font-size: 11px;
  font-weight: 600;
  color: #5a6b7a;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f3f6f9;
  border: 1px dashed #c5d0da;
}
.fm-tree-btn {
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #c6cdd3;
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: #1f2a37;
}
.fm-tree-btn:hover { border-color: #2fc6f6; }
.fm-tree-btn.primary { background: #2fc6f6; border-color: #2fc6f6; color: #fff; }
.fm-tree-btn.danger { color: #b42318; border-color: #f3b4b0; }
.fm-tree-btn.warn {
  height: 28px; padding: 0 10px; font-size: 12px;
  border-color: #e0c48a; color: #9a5b00; background: #fff8e8;
}
.fm-tree-btn.warn:hover { border-color: #c9a04a; }
.fm-tree-node.kind-slot.is-ph .fm-tree-actions {
  margin-top: 2px; padding-top: 0;
}
.fm-tree-meta-line {
  font-size: 12px; color: #5a6b7a; line-height: 1.35;
}
.fm-tree-id-row {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 4px;
}
.fm-id-chip {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 750; padding: 4px 9px; border-radius: 8px;
  letter-spacing: .01em; line-height: 1.2;
}
.fm-id-chip.tone-created { background: #1f2a37; color: #fff; }
.fm-id-chip.tone-hire { background: #1760a8; color: #fff; }
.fm-id-chip.tone-snils { background: #5b3cc4; color: #fff; }
.fm-id-chip.tone-inn { background: #0f766e; color: #fff; }
.fm-id-chip.tone-phone { background: #eef2f6; color: #1f2a37; }
.fm-id-chip.tone-dup { background: #ffe8e5; color: #a33a32; }
.fm-id-chip.tone-missing { background: #f0f2f5; color: #9aa3ad; border: 1px dashed #c5d0db; }

.fm-tree-procs {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 100%;
}
.fm-proc-link { text-decoration: none; }
.fm-proc {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 999px;
  background: #eef2f6; color: #1f2a37; white-space: nowrap;
}
.fm-proc small { font-weight: 500; opacity: .85; }
.fm-proc.tone-ok { background: #e6f6ec; color: #1b7a45; }
.fm-proc.tone-warn { background: #fff1e0; color: #9a5b00; }
.fm-proc.tone-bad { background: #ffe8e5; color: #a33a32; }
.fm-proc.tone-muted { background: #f0f2f5; color: #73737D; }

.fm-contact-card { display: flex; flex-direction: column; gap: 14px; }
.fm-contact-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-contact-dl {
  margin: 0; display: grid; gap: 8px;
  background: #fff; border: 1px solid #e5eaf0; border-radius: 12px; padding: 12px 14px;
}
.fm-contact-dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: baseline; }
.fm-contact-dl dt { margin: 0; font-size: 12px; font-weight: 700; color: #7a8794; text-transform: uppercase; letter-spacing: .04em; }
.fm-contact-dl dd { margin: 0; font-size: 15px; font-weight: 650; color: #1f2a37; word-break: break-word; }
.fm-contact-h { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: #1f2a37; }
.fm-contact-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* Select mode (Выделить): checkboxes only when body.fm-tree-select-mode */
.fm-merge-check {
  display: none;
  align-items: center;
  gap: 0;
  margin: 0 0 4px;
  cursor: pointer;
  user-select: none;
  width: 18px;
  height: 18px;
}
.fm-merge-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
body.fm-tree-select-mode .fm-merge-check { display: flex; }
.fm-tree-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
  flex-wrap: nowrap;
}
.fm-tree-node-head .fm-tree-kind {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-tree-node-head .fm-tree-name-trail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
}
.fm-tree-node .fm-kebab,
.fm-tree-pool-card .fm-kebab {
  flex: 0 0 auto;
  margin: 0;
  opacity: 0.55;
}
.fm-tree-node:hover .fm-kebab,
.fm-tree-pool-card:hover .fm-kebab,
.fm-kebab:focus-visible {
  opacity: 1;
}
#fmTreeCtx .fm-ctx-st.is-danger .fm-ctx-meta b { color: #B42318; }

.fm-tree-node.kind-person.is-dup,
.fm-tree-pool-card.is-dup {
  border-color: #e0a52d;
  box-shadow: inset 0 0 0 1px rgba(224,165,45,.35);
}
.fm-tree-pool-card.is-archived {
  opacity: .92;
  border-style: dashed;
}

/* Person card rebuild: contact · params · EJM fold · dup banner · Bitrix ext */
.fm-tree-bx-ext {
  appearance: none;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #1f2a37;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.fm-tree-bx-ext:hover {
  border-color: #2fc6f6;
  color: #1760a8;
  background: #f0f9fc;
}
.fm-tree-plain-id.is-contact {
  color: #5a6b7a;
  font-weight: 600;
}
.fm-tree-plain-id.is-contact::before {
  content: "· ";
  color: #c5d0db;
}
.fm-tree-dup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #fff3bf;
  border: 1px solid #e0a52d;
  font-size: 12px;
  line-height: 1.25;
}
.fm-tree-dup-mark {
  font-weight: 800;
  color: #8a6d00;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 11px;
}
.fm-tree-dup-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: #5a6b7a;
  font-weight: 600;
}
.fm-tree-dup-id {
  appearance: none;
  border: 0;
  background: #fff;
  color: #a33a32;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid #f0c9a0;
}
.fm-tree-dup-id:hover { background: #ffe8e5; }
.fm-tree-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f4f7fa;
  border: 1px solid #e5eaf0;
}
.fm-tree-c-item {
  font-size: 11px;
  font-weight: 650;
  color: #1f2a37;
  line-height: 1.25;
}
.fm-tree-c-item.is-miss { color: #9aa3ad; font-weight: 500; }
.fm-tree-c-item.is-muted { color: #7a8794; font-weight: 500; }
.fm-tree-c-item.is-hire { color: #1760a8; }
.fm-tree-hood {
  border: 0; background: transparent; margin: 0; padding: 0;
}
.fm-tree-hood > summary {
  list-style: none; cursor: pointer; font-size: 11px; font-weight: 700;
  color: #8A95A1; padding: 2px 2px; user-select: none;
}
.fm-tree-hood > summary::-webkit-details-marker { display: none; }
.fm-tree-hood > summary::before {
  content: "▸ "; font-size: 10px;
}
.fm-tree-hood[open] > summary::before { content: "▾ "; }
.fm-tree-hood-body {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  padding: 6px 8px; margin-top: 3px;
  border-radius: 6px; background: #f8fafc; border: 1px dashed #e5eaf0;
}
.fm-tree-hood-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-width: 0;
}
.fm-tree-hood-lab {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #8A95A1;
}
.fm-tree-hood-row .fm-tree-ejm-now,
.fm-tree-hood-row .fm-tree-pill,
.fm-tree-hood-row .fm-badge {
  max-width: 100%;
}
.fm-tree-params {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.fm-tree-params .fm-badge {
  font-size: 11px;
}
.fm-tree-ejm {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #fff;
  padding: 0;
}
.fm-tree-ejm > summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  color: #5a6b7a;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 8px;
  user-select: none;
}
.fm-tree-ejm > summary::-webkit-details-marker { display: none; }
.fm-tree-ejm > summary::before {
  content: "▸ ";
  color: #9aa3ad;
}
.fm-tree-ejm[open] > summary::before { content: "▾ "; }
.fm-tree-ejm > summary b {
  color: #1f2a37;
  font-variant-numeric: tabular-nums;
}
.fm-tree-ejm .fm-tree-procs {
  padding: 0 8px 8px;
}
.fm-proc.is-key {
  outline: 1px solid rgba(32, 103, 176, 0.35);
  font-weight: 750;
}
.fm-tree-node.kind-person,
.fm-tree-pool-card.kind-person {
  gap: 6px;
}

@media (max-width: 1400px) {
  .fm-fan-board {
    grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.5fr);
  }
}
@media (max-width: 980px) {
  .fm-fan-board { grid-template-columns: 1fr; }
  .fm-fan-pools { position: static; }
  /* Stacked: keep absolute fill; two rows each scroll */
  body.fm-tab-tree .fm-fan-board {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.2fr) minmax(0, 0.8fr);
    position: absolute !important;
    inset: 0 !important;
    height: auto !important;
  }
  body.fm-tab-tree .fm-fan-main,
  body.fm-tab-tree .fm-fan-pools {
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
}
@media (max-width: 720px) {
  .fm-fan-row { grid-template-columns: 1fr; }
  .fm-fan-spine { display: none; }
  .fm-fan-branch {
    grid-template-columns: 1fr;
    row-gap: 12px;
    column-gap: 0;
  }
  .fm-fan-branch > .fm-tree-node.kind-slot,
  .fm-fan-branch > .fm-fan-people {
    align-self: stretch;
  }
  .fm-fan-branch-rail,
  .fm-fan-link { display: none; }
  .fm-fan-extra { gap: 16px; }
}


/* —— cell pencil (✎) —— hover only; size/style kept from cell-ux —— */
.fm-cell { position: relative; }
.fm-cell .fm-cell-edit {
  position: absolute; top: 1px; right: 1px; z-index: 4;
  width: 11px; height: 11px; padding: 0; margin: 0;
  border: 0; border-radius: 2px;
  background: rgba(255,255,255,.92); color: #16638F;
  font-size: 9px; line-height: 11px; cursor: pointer;
  opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(22,99,143,.18);
}
.fm-cell:hover .fm-cell-edit,
.fm-cell:focus-within .fm-cell-edit {
  opacity: 1; pointer-events: auto;
}
.fm-cell-edit:hover { background: #E8F4FB; }

/* multi pick row: time → status; ✎ → side edit */
.fm-ctx-shift-row {
  display: flex; align-items: stretch; gap: 4px;
}
.fm-ctx-shift-row > .fm-ctx-st {
  flex: 1; min-width: 0;
}
.fm-ctx-shift-edit {
  flex: 0 0 auto;
  width: 32px; min-width: 32px;
  border: 1px solid transparent; border-radius: 8px;
  background: #fff; color: #16638F;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 0 !important; width: 32px !important;
}
.fm-ctx-shift-edit:hover {
  border-color: #D5DEE7 !important; background: #F7FAFC !important;
}

/* —— colored status ctx —— */
.fm-ctx.fm-ctx-status {
  min-width: 220px; padding: 8px; gap: 0;
}
.fm-ctx-head {
  font-size: 11px; font-weight: 700; color: #8A95A1;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px 8px;
}
.fm-ctx-status-list {
  display: flex; flex-direction: column; gap: 4px;
}
.fm-ctx-st {
  display: flex !important; align-items: center; gap: 10px;
  width: 100%; text-align: left !important;
  padding: 7px 8px !important; border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: #fff !important;
}
.fm-ctx-st:hover { border-color: #D5DEE7 !important; background: #F7FAFC !important; }
.fm-ctx-sw {
  width: 32px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 800; font-size: 12px;
  border: 1px solid #DEDEDE; flex: 0 0 auto;
}
.fm-ctx-st.ya .fm-ctx-sw { background: #EAF5F4; color: #1B7A6E; }
.fm-ctx-st.rv .fm-ctx-sw { background: #66BB6A; color: #0D3B12; }
.fm-ctx-st.nn .fm-ctx-sw { background: #FFCACA; color: #B42318; }
.fm-ctx-st.ot .fm-ctx-sw { background: #EEE6F1; color: #6B3FA0; }
.fm-ctx-st.do .fm-ctx-sw { background: #ABC7D7; color: #16638F; }
.fm-ctx-st.og .fm-ctx-sw { background: #D7CCC8; color: #4E342E; }
.fm-ctx-st.b .fm-ctx-sw { background: #FFECD6; color: #C45C26; }
.fm-ctx-st.u .fm-ctx-sw { background: #AEAEAE; color: #fff; }
.fm-ctx-st.v .fm-ctx-sw { background: #ECEFF1; color: #455A64; }
.fm-ctx-st.r .fm-ctx-sw { background: #F8BBD0; color: #880E4F; }
.fm-ctx-st.ozh .fm-ctx-sw { background: #E1BEE7; color: #4A148C; }
.fm-ctx-st.plan .fm-ctx-sw { background: #fff; color: #16638F; font-size: 10px; }
.fm-ctx-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fm-ctx-meta b { font-size: 13px; font-weight: 700; color: #1f2a37; }
.fm-ctx-meta small { font-size: 11px; color: #73737D; }

/* —— card ctx (⋮ emp/pos/hole) — same language as status menu —— */
.fm-ctx.fm-ctx-card {
  min-width: 240px; padding: 8px; gap: 0;
}
.fm-ctx-card-list {
  display: flex; flex-direction: column; gap: 4px;
}
.fm-ctx-card .fm-ctx-sw {
  background: #F0F7FA; color: #16638F; border-color: #D6E2EC;
  font-size: 11px;
}


/* —— board loading skeleton (#fmRoot) —— */
.fm-board-skel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  user-select: none;
}
.fm-skel-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5B6470;
  background: linear-gradient(180deg, #F7FAFC 0%, #fff 100%);
  border-bottom: 1px solid #EEF2F5;
  position: sticky;
  top: 0;
  z-index: 9;
}
.fm-skel-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2FC6F6;
  box-shadow: 0 0 0 0 rgba(47, 198, 246, 0.45);
  animation: fm-skel-pulse 1.2s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes fm-skel-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 198, 246, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(47, 198, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 198, 246, 0); }
}
.fm-skel {
  display: inline-block; height: 12px; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(90deg, #EDF1F5 0%, #F6F8FA 40%, #EDF1F5 80%);
  background-size: 220% 100%;
  animation: fm-skel-move 1.15s ease-in-out infinite;
}
@keyframes fm-skel-move {
  0% { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}
.fm-skel.line { height: 12px; display: block; }
.fm-skel.thin { height: 8px; margin-top: 5px; display: block; }
.fm-skel.num { height: 14px; border-radius: 4px; width: 32px; }
.fm-skel.sq { height: 14px; width: 18px; border-radius: 3px; }
.fm-skel.cell { height: 26px; border-radius: 4px; width: 100% !important; display: block; }
.fm-table-skel .fm-skel-row > td { height: 52px; vertical-align: middle; }
.fm-table-skel .fm-skel-sec .fm-sec-head {
  background: #F3F7FA !important;
  padding: 8px 10px !important;
}
.fm-table-skel .fm-skel-sec .fm-sec-bar {
  display: flex; align-items: center; gap: 8px;
}
.fm-table-skel .fm-name-body { display: flex; flex-direction: column; gap: 0; }
body.fm-board-loading #fmFilterTools,
body.fm-board-loading #fmActionsBtn,
body.fm-board-loading #fmSelectMode {
  opacity: .55;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .fm-skel { animation: none; }
  .fm-skel-pulse { animation: none; }
}

/* —— Badge canon accepted: responsive compress (container query) ——
 * ≥900px: secondary full (shift/season labels).
 * <900px: .fm-resp → icon-only; .fm-baseline (график+время) stays full.
 * Person row: formal_done always full; stage/kind/non-done formal already icon.
 */
.fm-resp .fm-txt { display: inline; }

@container fm-name (max-width: 899px) {
  .fm-row-canon .fm-resp .fm-txt {
    display: none;
  }
  .fm-row-canon .fm-resp.fm-shift-badge {
    padding: 2px 4px;
  }
  .fm-row-canon .fm-resp.fm-chip-season {
    padding: 2px 6px;
    min-width: 22px;
    justify-content: center;
  }
  .fm-row-canon .fm-sched-chip.fm-baseline b {
    display: inline;
  }
}

@media (max-width: 1100px) {
  .fm-row-canon .fm-resp.fm-shift-badge .fm-txt,
  .fm-row-canon .fm-resp.fm-chip-season .fm-txt {
    display: none;
  }
  .fm-row-canon .fm-resp.fm-shift-badge { padding: 2px 4px; }
  .fm-row-canon .fm-resp.fm-chip-season {
    padding: 2px 6px; min-width: 22px; justify-content: center;
  }
}

/* Hover tip · название должности (полное + параметры) */
.fm-pos-tip {
  position: fixed; z-index: 260;
  min-width: 220px; max-width: min(360px, 92vw);
  padding: 10px 12px;
  background: #2a3340; color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 28, 40, .28);
  font-size: 12px; line-height: 1.4;
  pointer-events: auto;
}
.fm-pos-tip[hidden] { display: none !important; }
.fm-pos-tip-title {
  font-weight: 700; font-size: 13px; color: #fff;
  margin: 0 0 8px; word-break: break-word; white-space: normal;
}
.fm-pos-tip-chips {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
.fm-pos-tip-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 5px;
  background: rgba(255,255,255,.12); color: #e8eef3;
  font-size: 11px; font-weight: 600;
}
.fm-pos-tip-chip b { font-weight: 650; color: #fff; }
.fm-pos-tip-chip .fm-ui-ico,
.fm-pos-tip-chip .fm-shi {
  width: 12px; height: 12px; opacity: .9; flex-shrink: 0;
}
.fm-pos-tip-season { background: rgba(155, 182, 201, .28); color: #d4e6f2; }



/* —— EMP · Сотрудники · jr-table (R28 / R24 density) —— */
/* Legend must stay visible on emp even if [hidden] races with renderTodayStrip */
body.fm-tab-emp #fmLegendStrip {
  display: flex !important;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}
body.fm-tab-emp #fmLegendStrip[hidden] {
  display: flex !important;
}
/* EMP analytics chips live in #fmTodayMetrics (План / Факт / Нет штатки) */
body.fm-tab-emp #fmTodayMetrics {
  display: block;
}
body.fm-tab-emp .fm-list-solo {
  min-height: 0;
}
.fm-emp-skel { padding: 8px 0 16px; }
.fm-emp-jr.jr-table-wrap {
  overflow-x: auto; border: 1px solid #e0e4e8; border-radius: 4px; background: #fff;
}
.fm-emp-jr .jr-table {
  width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1100px;
}
.fm-emp-jr .jr-table th {
  text-align: left; font-weight: 600; color: #525c69; font-size: 11px;
  padding: 8px 8px; border-bottom: 1px solid #e0e4e8; background: #f7f9fa;
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.fm-emp-jr .jr-table td {
  padding: 8px; border-bottom: 1px solid #edeef0; vertical-align: middle;
  color: #333; max-width: 220px;
}
.fm-emp-jr .jr-tr { cursor: pointer; }
.fm-emp-jr .jr-tr:hover { background: #f5f9ec; }
.fm-emp-jr .jr-td-title,
.fm-emp-jr th.fm-emp-fio-th {
  min-width: 260px; max-width: 360px; width: 280px;
}
.fm-emp-jr th.fm-emp-id-th { width: 72px; min-width: 64px; }
.fm-emp-fio-cell {
  display: flex; align-items: flex-start; gap: 8px; min-width: 240px;
}
.fm-emp-fio-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.fm-emp-fio-main .ec-open-link,
.fm-emp-fio-main .jr-title-link {
  display: inline; width: auto; text-align: left;
  color: #2067b0; text-decoration: none; font-weight: 600; font-size: 13px;
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.fm-emp-fio-main .ec-open-link:hover { text-decoration: underline; }
.fm-emp-jr .fm-name-badges {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.fm-emp-jr .fm-name-trail {
  flex: 0 0 auto; margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
}
.fm-emp-jr .fm-kebab {
  border: 0; background: transparent; cursor: pointer; color: #828b95;
  font-size: 16px; line-height: 1; padding: 2px 4px;
}
.fm-emp-jr .fm-kebab:hover { color: #1f2a37; background: #eef1f4; border-radius: 4px; }
.fm-emp-jr .sc-open-link,
.fm-emp-jr .fm-emp-pos-assign {
  color: #2067b0; text-decoration: none; font-weight: 600; font-size: 12px;
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left;
}
.fm-emp-jr .sc-open-link:hover,
.fm-emp-jr .fm-emp-pos-assign:hover { text-decoration: underline; }
.fm-emp-jr .fm-emp-pos-assign.is-empty {
  color: #828b95; font-weight: 500; font-style: normal;
  text-decoration: none;
  border-bottom: 1px dashed #c6cdd3;
}
.fm-emp-jr .fm-emp-pos-assign.is-empty:hover {
  color: #2067b0; border-bottom-color: #2067b0;
}
.fm-emp-done-chk {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border-radius: 6px;
  border: 1px solid #d5dbe0; background: #f7f9fa; color: #828b95;
  cursor: pointer;
}
.fm-emp-done-chk:hover { border-color: #9bb8c9; background: #eef5f9; }
.fm-emp-done-chk .fm-emp-done-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 3px;
  border: 1.5px solid #a8b2bc; background: #fff; color: #fff;
  font-size: 11px; line-height: 1; box-sizing: border-box;
}
.fm-emp-done-chk.is-on {
  border-color: #1b7a6e; background: #eaf5f4;
}
.fm-emp-done-chk.is-on .fm-emp-done-box {
  border-color: #1b7a6e; background: #1b7a6e; color: #fff;
}
.fm-emp-empty.jr-table-empty {
  margin: 16px 0; color: #667085; font-size: 13px;
}
