/* Единый стиль элементов управления во всех разделах (образец — раздел «График») */
:root{--ctl-h:34px;--ctl-r:6px;--ctl-border:#b3c5c9;--panel-border:#ccd7db;--accent:#146753;--focus:#348db5;--ink:#183743;--muted:#496876}
/* Элементы управления — только в панелях инструментов, чтобы не затрагивать кнопки внутри таблиц */
#page>.bar :is(button:not(.calendar-button,.month-popup *),input:not([type=checkbox],[type=radio],[type=range],[type=file]),select){min-height:var(--ctl-h);border-radius:var(--ctl-r);font-size:15px;line-height:1.2}
#page>.bar :is(input:not([type=checkbox],[type=radio],[type=range],[type=file]),select){border:1px solid var(--ctl-border);padding:5px 9px;background:#fff}
#page>.bar select{padding-right:28px;text-overflow:ellipsis}
#page>.bar button:not(.calendar-button,.month-popup *){padding:5px 13px;border:1px solid var(--ctl-border);background:#fff;color:var(--ink);font-weight:550;white-space:nowrap}
#page>.bar button:not(.calendar-button,.month-popup *):hover:not(:disabled){background:#eef5f3;border-color:#8fb0b0}
#page>.bar button:not(.calendar-button,.month-popup *):disabled{opacity:.55;cursor:default}
#page>.bar button:not(.calendar-button,.month-popup *).primary{background:var(--accent);border-color:var(--accent);color:#fff}
#page>.bar button:not(.calendar-button,.month-popup *).primary:hover:not(:disabled){background:#0f5342;border-color:#0f5342}
#page :is(button,input,select,textarea):focus-visible{outline:3px solid var(--focus);outline-offset:1px}
#page input[type=checkbox],#page input[type=radio]{accent-color:var(--accent)}
/* Панель управления модуля: белая карточка, подписи слева от полей, один размер элементов */
#page>.bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 12px;padding:10px 14px;background:#fff;border:1px solid var(--panel-border);border-radius:10px}
#page>.bar+.bar{margin-top:-13px;border-top-color:#e3ebec;border-top-left-radius:0;border-top-right-radius:0}
#page>.bar:has(+.bar){margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
#page>.bar>label,#page>.bar>div>label{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;color:var(--muted);font-size:14px}
#page>.bar>label>:is(select,input),#page>.bar label :is(select,input){color:var(--ink)}
#page>.bar select{min-width:120px;max-width:min(300px,70vw)}
#page>.bar input[type=search],#page>.bar input[type=text]{width:min(270px,100%)}
#page>.bar .month-picker{margin:0}
#page>.bar .spacer,#page>.bar #fullscreen,#page>.bar [id$=Fullscreen]{margin-inline-start:auto}
#page>h1{font-size:26px;margin:0 0 14px}
#page>.bar .month-picker>button{min-width:var(--ctl-h);padding:5px 9px}
/* Таблицы и панели */
#page .wrap,#page .panel{border:1px solid var(--panel-border);border-radius:10px;background:#fff}
#page .wrap{overflow:auto}
#page .wrap table{border-radius:10px}
#page small.hint,#page .dim{font-size:13px;color:var(--muted)}
/* Подсказка о режиме просмотра */
.view-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:#eef2f3;color:#496876;font-size:13px;font-weight:600}
@media(max-width:740px){
 #page>.bar{padding:10px;gap:8px}
 #page>.bar>label,#page>.bar>div>label{flex:1 1 100%;justify-content:space-between}
 #page>.bar select,#page>.bar input[type=search],#page>.bar input[type=text]{flex:1;min-width:0;max-width:none;width:100%}
}
@media print{#page>.bar{display:none!important}}
/* Кнопка «на весь экран» — в правом верхнем углу панели, того же размера, что и остальные элементы */
#page>.bar.has-fullscreen{position:relative;padding-inline-end:58px;min-height:0}
#page>.bar.has-fullscreen>.fullscreen-toggle{position:absolute;inset-block-start:10px;inset-inline-end:12px;display:grid;place-items:center;width:var(--ctl-h);height:var(--ctl-h);min-height:0;padding:0}
/* Главная */
.home-hello{margin:0 0 12px;color:var(--muted)}
.home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.home-card{display:flex;flex-direction:column;gap:6px;padding:16px 18px;background:#fff;border:1px solid var(--panel-border);border-left:4px solid #9eb4ba;border-radius:10px}
.home-card.ok{border-left-color:#28705f}.home-card.warn{border-left-color:#d98a1c}
.home-card h2{margin:0;font-size:15px;font-weight:600;color:var(--muted)}
.home-card strong{font-size:28px;line-height:1.2;font-variant-numeric:tabular-nums}
.home-card p{margin:0;flex:1;font-size:14px;color:var(--muted);overflow-wrap:anywhere}
.home-card button{align-self:flex-start;min-height:var(--ctl-h);padding:5px 13px;border:1px solid var(--ctl-border);border-radius:var(--ctl-r);background:#fff;font-weight:550}
.home-card button:hover{background:#eef5f3}
/* Тёмная тема: см. dark.css (генерируется gen-dark.mjs) */
#themeToggle{padding:4px 10px;font-size:17px;line-height:1;margin-inline-end:6px}
header #themeToggle{background:transparent;color:#fff}
/* Печать: только содержимое раздела */
@media print{
 header,#menuDrawer,#themeToggle,#saveBar,.bar button,.fullscreen-toggle{display:none!important}
 body{background:#fff}
 #page{padding:0}
 .wrap,.dash-heat-scroll{max-height:none!important;overflow:visible!important}
}

/* Поле даты с кнопкой календаря: место под кнопку справа */
#page>.bar .calendar-native.calendar-has-button:not(.calendar-native-compact) input{padding-inline-end:40px}
#page>.bar .calendar-native .calendar-button{min-height:0;width:32px}
/* Доступ к графику: сетка месяцев */
.access-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin:0 0 14px}
.access-month{display:flex;align-items:center;gap:12px;padding:12px 14px;text-align:left;border:1px solid var(--ctl-border);border-radius:10px;background:#fff;min-height:64px;cursor:pointer}
.access-month span{display:grid;gap:1px}
.access-month small{font-size:12px;color:var(--muted)}
.access-month.is-closed .month-access-icon{color:#b3322a}
.access-month.is-open .month-access-icon{color:#28705f}
.access-month.is-closed{background:#fbf3f2}
.access-month.is-current{box-shadow:inset 0 0 0 2px #62b493}
.access-month.is-selected{background:#dceee8;border-color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent)}
.access-month:hover{border-color:#8fb0b0}
/* Статистика по проектам: панель в общем стиле, списки без обрезки текста */
#page>.statistics-toolbar{flex-wrap:wrap;overflow:visible;font-size:inherit;padding:10px 14px;gap:8px 14px}
#page>.statistics-toolbar :is(#statisticsGrouping,#statisticsMetric,#statisticsProject,#statisticsTeam){width:auto;min-width:130px}
#page>.statistics-toolbar :is(button,select):not(.month-popup *){font-size:15px;min-height:var(--ctl-h);padding:5px 9px}
#page>.statistics-toolbar>button:not(.month-popup *){padding:5px 13px}
#page>.statistics-toolbar #statisticsFullscreen{margin-left:0}

/* Статус месяца */
.month-state{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:14px;font-weight:650}
.month-state::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.state-planning{background:#fff3d6;color:#8a5a00}.state-published{background:#dcf1e6;color:#175735}.state-closed{background:#f8e0dd;color:#a52d23}
.home-card.wide{grid-column:1/-1}
.home-changes{margin:0;padding:0;list-style:none;display:grid;gap:4px}
.home-changes li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid #e3ebec;font-size:14px}
.home-changes span{color:var(--muted);white-space:nowrap}
.closed-banner{display:flex;gap:10px;align-items:center;margin:0 0 12px;padding:10px 14px;border:1px solid #e3b4ae;border-left:4px solid #b3322a;border-radius:10px;background:#fbf3f2;color:#6b1f19;font-size:15px}
/* Архив */
.archive-table td,.archive-table th{white-space:nowrap}
.archive-table td:nth-child(2){white-space:normal;min-width:260px}
.archive-table td:nth-child(n+3):nth-child(-n+5){text-align:right;font-variant-numeric:tabular-nums}
.archive-table .archived-row{background:#fbf3f2}
.archive-table input[type=checkbox]{width:18px;height:18px}

/* Кадровый таймлайн */
.staff-timeline-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
.staff-chip-total{color:var(--muted);margin-inline-end:6px}
button.staff-chip{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid currentColor;border-radius:999px;font-size:14px;font-weight:550;cursor:pointer}
button.staff-chip b{font-variant-numeric:tabular-nums;font-size:15px}
button.staff-chip.is-on{background:currentColor}
button.staff-chip.is-on{box-shadow:0 0 0 2px #fff,0 0 0 4px currentColor}
button.staff-chip.is-on>*{filter:invert(1)}
button.staff-chip-warn{color:#8a550e;background:#fff3d9}
.staff-nohire{display:inline-block;margin-inline-start:6px;padding:0 6px;border-radius:999px;background:#fff3d9;color:#8a550e;font-size:11px;font-weight:600}
.staff-timeline-help{margin:0 0 10px;color:var(--muted);font-size:14px}
.staff-timeline-help summary{cursor:pointer;color:#145844;font-weight:600}
.staff-timeline-help ul{margin:6px 0 0;padding-left:20px;display:grid;gap:3px}
.staff-timeline-today{position:absolute;inset-block:0;border-inline-start:2px solid #176a9c;z-index:1;pointer-events:none}
.staff-timeline-tenure{height:8px!important;top:13px!important;background:#5fa08a!important;border-radius:4px}
.staff-timeline-inferred{background:repeating-linear-gradient(135deg,#bcd5cc 0 4px,#e3eeea 4px 8px)!important;border:0!important}
.staff-timeline-interval{background:#f0c869!important}
.staff-timeline tbody tr:not(.staff-timeline-group):hover>*{background:#f1f7f5}
#page .calendar-year-field select,#page>.bar .calendar-year-field select,#page>.statistics-toolbar .calendar-year-field select{padding-left:30px}
/* Производительность прокрутки: fixed-фон у ячеек заставляет перерисовывать всю сетку при скролле */
.planner .matrix td,.planner .matrix th,.absence-grid td{background-attachment:scroll!important}
/* Группы меню и постоянная боковая панель на широких экранах */
.navGroup{margin:12px 8px 2px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700}
.navGroup:first-child{margin-top:2px}
#menuDrawer nav button.active{background:#dceee8;font-weight:650;box-shadow:inset 3px 0 var(--accent)}
body.with-sidebar #menuToggle,body.with-sidebar #menuClose{display:none}
body.with-sidebar #menuDrawer .menuHead{display:none}
:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
@media print{#menuDrawer{display:none!important}}
/* Бейдж «не опубликован», коды документов и названия в графике */
.matrix .project-unpublished{display:inline-block;margin-left:8px;padding:1px 8px;border:1px solid #e3b8b3;border-radius:999px;background:#fdf1ef;color:#a52d23;font-size:11px;font-weight:600;white-space:nowrap;vertical-align:middle}
.matrix .project-unpublished::before{content:none}
/* Производительность: мягкие заливки групп */
:is(#productivityTable,#statisticsTable) .productivity-group{background:color-mix(in srgb,var(--team-background,#edf5f2) 75%,#fff)}
/* Отсутствия: компактные строки, липкая шапка */
.absence-grid td,.absence-grid th{height:28px}
/* Контраст подписей фильтров */
.bar label,.filters label,.extra-tools label,.staffBar label{color:#32505d}
/* Таблицы пользователей: ярлык «уволен» спокойнее */
.staffTerminatedBadge{display:inline-block;padding:0 7px;border-radius:999px;background:#e8eced;color:#5a6b70;font-weight:500;font-size:12px}
.matrix.doc-titles .task-title .doc-code{display:block;font:11px/1.3 Consolas,"Courier New",monospace;color:#6a7d84;letter-spacing:.01em}
.matrix.doc-titles .task-title .doc-rest{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.matrix.doc-titles .node:has(.task-title) .ref{display:block;margin-bottom:1px}
.matrix.doc-titles .node:has(.task-title) .task-title{display:block}
#menuDrawer nav button{white-space:nowrap}
/* Отчёт сотрудника: компактная кнопка возврата */
#back{display:inline-flex;align-items:center;gap:6px;width:auto;align-self:flex-start;margin:6px 0 0;padding:4px 12px;font-size:13px;color:var(--accent);background:transparent;border:1px solid transparent;border-radius:6px}
#back:hover{background:#e6f1ee;border-color:#b8d3cc}

/* Подзадачи (задача внутри задачи): линия слева и значок «└» */
.matrix tr.subtask td.first .line{box-shadow:inset 3px 0 #7fb3a5}
.matrix tr.subtask .ref::before{content:"└ ";color:#6f9f92;font-weight:400}
.matrix tr.subtask td.first{background:#f8fbfa}
#menuDrawer nav button{font-size:14px;padding-inline:10px;gap:8px}
#taskTitles{min-width:200px}

/* Архив: недоступные действия видно сразу */
#archiveDo:disabled,#archiveRestore:disabled,#archiveClear:disabled{opacity:.45;cursor:not-allowed}


/* Пустые состояния */
:is(#dashboardStatus,#statisticsStatus,#divisionStatus,#productivityStatus):not(:empty){margin:12px 0;padding:22px 16px;border:1px dashed var(--ctl-border);border-radius:10px;background:#f7faf9;color:var(--muted);text-align:center;font-size:15px}
:is(#dashboardStatus,#statisticsStatus,#divisionStatus,#productivityStatus):not(:empty)::before{content:"ⓘ ";font-weight:700;color:var(--accent)}
#dashboardBody.dash-nodata .dash-kpis{display:none}
.staffFoldAll{margin-left:6px}

.auditChangesLabel{display:inline-flex;align-items:center;gap:6px}
tr.auditRow{cursor:pointer}tr.auditRow:hover{background:#eef6f3}
td.auditChevron{width:28px;text-align:center;color:var(--muted);font-size:18px}

.accessCount{margin-left:8px;font-weight:600;color:var(--muted);font-size:14px}
#accessOpen:disabled,#accessClose:disabled,#accessClear:disabled{opacity:.45;cursor:not-allowed}
#page .wrap:has(#extraTable){overflow-x:scroll;scrollbar-width:auto}
#extraTable{min-width:1100px}

/* Боковая панель: узкая полоса, по наведению выплывает поверх страницы, кнопка-булавка закрепляет */
body.with-sidebar>main{position:relative}
body.with-sidebar #menuDrawer{position:absolute;inset:0 auto 0 0;z-index:30;width:56px;height:auto;max-height:none;margin:0;padding:10px 8px;border:0;border-right:1px solid var(--panel-border);box-shadow:none;animation:none;background:#f6faf9;color:inherit;overflow:hidden;transition:width .16s ease,box-shadow .16s ease}
body.with-sidebar #menuDrawer .menuHead{display:none}
body.with-sidebar #page{min-width:0;margin-left:56px}
body.with-sidebar #menuDrawer:hover,body.with-sidebar #menuDrawer:has(:focus-visible){width:252px;box-shadow:6px 0 24px rgba(10,30,40,.22);overflow-y:auto}
body.with-sidebar.menu-pinned #menuDrawer{position:static;flex:none;width:252px;box-shadow:none;overflow-y:auto}
body.with-sidebar.menu-pinned #page{margin-left:0;flex:1}
body.with-sidebar:not(.menu-pinned) #menuDrawer:not(:hover):not(:has(:focus-visible)) nav button{font-size:0;gap:0;justify-content:center;padding-inline:0}
body.with-sidebar:not(.menu-pinned) #menuDrawer:not(:hover):not(:has(:focus-visible)) .navGroup{color:transparent;overflow:hidden;white-space:nowrap}
#menuDrawer nav button .menu-icon{flex:none;width:22px;height:22px}
#menuPin{display:none;align-items:center;justify-content:center;gap:8px;width:100%;margin:0 0 6px;padding:5px 10px;font-size:13px;color:var(--muted);background:transparent;border:1px solid transparent;border-radius:6px;cursor:pointer;white-space:nowrap}
#menuPin:hover{background:#edf5f2;color:var(--fg)}
#menuPin svg{flex:none;transition:transform .15s}
#menuPin[aria-pressed=true]{color:var(--accent);font-weight:650}
#menuPin[aria-pressed=true] svg{transform:rotate(-45deg)}
body.with-sidebar #menuPin{display:flex}
body.with-sidebar:not(.menu-pinned) #menuDrawer:not(:hover):not(:has(:focus-visible)) #menuPin{visibility:hidden}

/* График: те же боковые поля, что у остальных вкладок */
.planner main{padding-inline:24px}
html:fullscreen .planner main{padding-inline:12px}
/* График: без строки пояснений и ползунка прокрутки календаря */
.planner .calendarbar b,.planner .calendarbar .absenceLegend,.planner .calendarbar .slider{display:none}
.planner .calendarbar:not(:has(#graphSearchStatus:not(:empty))){display:none}

/* Единая шапка вкладок */
.pageHead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin-bottom:4px}
.pageHead h1{margin:0}
.pageHeadRight{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;justify-content:flex-end;margin-left:auto}
.bar .barTools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-left:auto}
.home-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(220px,1fr);overflow-x:auto;padding-bottom:4px}
.bar:not(:has(*)){display:none!important}

/* График: заголовок слева, статус и месяц справа; кнопки публикации в строке инструментов */
.planner .heading{justify-content:space-between;align-items:center}
.planner .heading .pageTitle{font-size:clamp(22px,2vw,28px);font-weight:700;margin-right:auto;line-height:1.2}
.planner .heading .month-state{order:1}.planner .heading .period{order:2}
.planner .graph-actions{flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
.planner .graph-actions .actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.planner .graph-actions .actions[hidden]{display:none}

/* График: выбор проекта в самом названии, кнопки сохранения только при изменениях */
.planner .project-heading{align-items:center;gap:8px 14px}
.planner .titlePicker{position:relative;display:inline-flex;align-items:center;gap:8px;border-radius:8px;padding:0 6px;margin-left:-6px}
.planner .titlePicker h1{margin:0}
.planner .titlePicker .caret{font-size:20px;color:var(--muted)}
.planner .titlePicker select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;font-size:16px}
.planner .titlePicker:hover{background:#e9f2ef}
.planner .titlePicker:has(select:focus-visible){outline:2px solid var(--focus)}
.planner .saveActions{display:flex;gap:8px;margin-left:auto}
.planner .saveActions[hidden]{display:none}
.planner .saveActions+#status{margin-left:0}
.srOnly{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Единый масштаб элементов управления (как в «Графике») */
#page .bar :is(select,input:not([type=checkbox]):not([type=radio]),button:not(.month-picker button),label,.dim){font-size:13px}
#page .bar :is(select,input:not([type=checkbox]):not([type=radio])){height:28px;padding:3px 8px}
#page .bar button:not(.month-picker button){padding:4px 10px;line-height:1.3}
#page .bar .barTools button{padding:4px 10px}
/* Одинаковый отступ и высота шапки на всех вкладках */
#page:has(#productivityTable){padding-top:24px}
html:not(:fullscreen) .planner main{padding-block:24px 12px}
.planner .heading{min-height:42px;margin-bottom:4px}
.planner .heading .pageTitle{line-height:1.5}

/* Переключатель месяца: фиксированная ширина, не зависит от названия месяца */
.month-picker>button[data-month]{box-sizing:border-box;width:184px;min-width:184px;justify-content:center;white-space:nowrap}
.planner .project-heading .graph-search{display:flex;align-items:center;gap:6px;margin-left:12px}
.planner .project-heading .graph-search input{width:240px;max-width:100%}
.planner .project-heading .graph-search svg{color:var(--muted)}
.viewSwitch{display:inline-flex;border:1px solid var(--ctl-border);border-radius:8px;overflow:hidden}
#page>.statistics-toolbar .viewSwitch button{border:0;border-radius:0;background:#fff;padding:5px 14px}
#page>.statistics-toolbar .viewSwitch button+button{border-left:1px solid var(--ctl-border)}
#page>.statistics-toolbar .viewSwitch button[aria-pressed=true]{background:var(--accent)!important;color:#fff!important;font-weight:650}
.statChart{margin-top:12px;padding:20px 22px;background:#fff;border:1px solid var(--panel-border);border-radius:12px}
.statLegend{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 16px;padding:0;list-style:none;font-size:15px;color:var(--muted)}
.statLegend i{display:inline-block;width:14px;height:14px;border-radius:3px;margin-right:8px;vertical-align:-2px}
.statLegend .k-fact{background:#28705f}.statLegend .k-extra{background:#6699bf}.statLegend .k-plan{background:#d3e0e3;box-shadow:inset 0 0 0 1px #9eb4ba}
.statBars{margin:0;padding:0;list-style:none;display:grid;gap:16px}
.statBars li{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(220px,3fr) 170px;gap:16px;align-items:center;font-size:16px}
.statBars .n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.statBars .b{display:grid;gap:4px;min-width:0}
.statBars .b>i{display:block;height:20px;border-radius:3px}
.statBars .b em{font-style:normal;font-size:12px;line-height:20px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;display:block;padding:0 7px}
.statBars .plan em{color:#33505a;text-align:right}
.statBars .facts b em{color:#fff;text-align:right}
.statBars .plan{background:#d3e0e3;box-shadow:inset 0 0 0 1px #9eb4ba}
.statBars .facts{display:flex!important}
.statBars .facts b{display:block;height:100%;background:#28705f;min-width:0;overflow:hidden}
.statBars .facts b.x{background:#6699bf}
.statLegend .k-ind{background:#d19a2e}
.statBars .facts b.ind{background:#d19a2e}
.statBars li[data-project]{cursor:pointer;border-radius:6px;padding:4px 6px;margin:-4px -6px}
.statBars li[data-project]:hover,.statBars li[data-project]:focus-visible{background:rgba(40,112,95,.08);outline:none}
.statBars li[data-project][aria-expanded=true]{background:rgba(40,112,95,.12)}
.statIndirectRow th,.statIndirectRow td{color:#8a6215}
#statisticsTaxField[hidden],#statisticsIndirectField[hidden]{display:none}
.statBars .v{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap;font-size:15px}
#statChartMore{margin-top:18px}
@media(max-width:700px){.statBars li{grid-template-columns:1fr 150px}.statBars .b{grid-column:1/-1;order:3}}
.statNote{margin:10px 2px 0;font-size:14px;color:var(--muted)}
.salaryField input{font-variant-numeric:tabular-nums}
.carryBadge{display:inline-block!important;width:auto!important;margin-top:3px;padding:1px 8px;border-radius:999px;background:#fff3d6;color:#7a4b00;font-size:12px;font-weight:650;border:1px solid #e7c982}
.planBaseEdit{margin-left:6px;padding:0 6px;min-height:24px;font-size:13px;border:1px solid transparent;background:none;color:var(--muted);border-radius:6px;cursor:pointer;opacity:.0}
tr:hover .planBaseEdit,.planBaseEdit:focus-visible{opacity:1;border-color:var(--ctl-border)}
.baseAdjusted{margin-left:6px;color:var(--muted);font-size:12px}
.salaryField button{display:block;margin-top:4px;min-height:var(--ctl-h);padding:5px 14px;border:1px solid var(--ctl-border);border-radius:var(--ctl-r);background:#fff;font-weight:550;cursor:pointer}
.salaryNote{margin:0 0 12px;font-size:14px;color:var(--muted)}
#salaryDialog{width:min(640px,calc(100vw - 32px))}
#salaryDialog .staffForm{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}
#salaryDialog label{display:grid;gap:4px;align-content:start}
.salaryHistory{margin:14px 0 4px;font-size:14px}.salaryHistory ul{margin:6px 0 0;padding:0;list-style:none;display:grid;gap:4px}
.salaryHistoryItem{border:0;background:none;color:var(--accent);padding:2px 0;cursor:pointer;text-align:left;text-decoration:underline dotted}
#salaryDialog .wide{grid-column:1/-1}
.statBars .b{grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:8px}
.statBars .b .t{font-size:12px;color:var(--muted);line-height:20px;min-width:34px}

.statBars li.statDetail{display:block;cursor:default;padding:10px 6px 6px;margin:-8px -6px 0;background:none}
.statDetailGrid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(420px,1.4fr);gap:20px;align-items:start}
.sdCard{border:1px solid var(--line,#d9e1e3);border-radius:10px;padding:14px 16px 12px;background:var(--panel,#fff);min-width:0;font-variant-numeric:tabular-nums}
.sdCard h3{margin:0 0 6px;font-size:15px;font-weight:600;display:flex;gap:8px;align-items:baseline}
.sdCard h3 span{font-weight:400;color:var(--muted)}
.sdCard h4{margin:14px 0 2px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.sdRow{display:flex;justify-content:space-between;gap:16px;align-items:baseline;padding:7px 0;border-bottom:1px solid var(--line,#e3e9eb);font-size:15px}
.sdLabel{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;min-width:0}
.sdLabel small{flex-basis:100%;color:var(--muted);font-size:12px}
.sdRow b{font-weight:600;white-space:nowrap}
.sw{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:2px;align-self:center}
.sw-fact{background:#28705f}.sw-extra{background:#6699bf}.sw-ind{background:#d19a2e}.sw-plan{background:#b9cbd0}
.sdSub{padding:4px 0 4px 20px;font-size:13px;color:var(--muted)}
.sdSub b{font-weight:500}
.sdTotal{border-bottom:0;border-top:2px solid currentColor;margin-top:6px;padding-top:10px;font-size:17px}
.sdTotal b{font-weight:700;font-size:19px}
.sdTotalPlan{font-size:15px}.sdTotalPlan b{font-size:16px}
.sdDelta{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:14px;padding:9px 12px;border-radius:8px;font-size:14px}
.sdDelta.over{background:rgba(196,86,43,.12);color:#9a3f1a}
.sdDelta.ok{background:rgba(40,112,95,.12);color:#1f6050}
.sdPeople .sdScroll{overflow-x:auto}
.statPeople{width:100%;border-collapse:collapse;font-size:14px}
.statPeople th,.statPeople td{padding:7px 10px;border-bottom:1px solid var(--line,#e3e9eb);background:none;height:auto;position:static;font-weight:400}
.statPeople tbody th{text-align:left;white-space:nowrap}
.statPeople tbody th small{display:block;color:var(--muted);font-size:11px}
.statPeople .num{text-align:center;white-space:nowrap}
.statPeople thead th{padding:0;font-size:12px;color:var(--muted);vertical-align:bottom}
.statPeople thead th:first-child button{justify-content:flex-start;text-align:left}
.statPeople thead button{all:unset;box-sizing:border-box;display:flex;gap:4px;justify-content:center;align-items:center;width:100%;padding:8px 10px;cursor:pointer;text-align:center;line-height:1.2;font-weight:600}
.statPeople thead button:hover,.statPeople thead button:focus-visible{color:inherit;background:rgba(40,112,95,.08)}
.statPeople thead i{display:inline-block;width:8px;height:12px;flex:none}
.statPeople th[aria-sort=ascending] i::before{content:"▲";font-size:9px}
.statPeople th[aria-sort=descending] i::before{content:"▼";font-size:9px}
.statPeople th[aria-sort=ascending],.statPeople th[aria-sort=descending]{color:inherit}
@media(max-width:900px){.statDetailGrid{grid-template-columns:1fr}}
/* Таблица «Статистика по проектам»: спокойная иерархия, без насыщенных заливок и тяжёлых линий */
#statisticsTable .project-statistics-table{--statistics-total:112px;font-size:14.5px;font-variant-numeric:tabular-nums}
#statisticsTable .productivity-role-gip{--team-background:#ede6f6}
#statisticsTable .productivity-role-lead{--team-background:#e6f0f9}
#statisticsTable .productivity-role-specialist{--team-background:#e7f3ec}
#statisticsTable .project-statistics-table :is(th,td){padding-block:9px;padding-inline-end:12px;border-bottom:1px solid #e5ebeb}
#statisticsTable .project-statistics-table :is(th,td):not(:first-child){padding-inline-start:12px}
#statisticsTable .project-statistics-table thead th{background:#f0f5f4;color:#3a5558;font-size:12.5px;font-weight:650;line-height:1.3;vertical-align:bottom;border-bottom:2px solid #c6d4d4}
#statisticsTable .project-statistics-table thead :is(th,td):nth-child(-n+2){background:#e8f0ef}
#statisticsTable .project-statistics-table .statistics-project-start{border-inline-start:1px solid #e0e8e8}
#statisticsTable .project-statistics-table tbody :is(th,td):nth-child(2){font-weight:650;background:#f7faf9}
#statisticsTable .project-statistics-table .productivity-group :is(th,td){font-weight:650}
#statisticsTable .project-statistics-table .productivity-group.productivity-role-gip :is(th,td){font-weight:700}
#statisticsTable .project-statistics-table .productivity-group :is(th,td):nth-child(-n+2){background:var(--team-background)}
#statisticsTable .project-statistics-table .productivity-group>:first-child{box-shadow:inset 3px 0 var(--tree-color,#7aa)}
#statisticsTable .project-statistics-table tbody tr:not(.productivity-group):hover :is(th,td){background:#f1f7f6}
#statisticsTable .project-statistics-table tbody tr:not(.productivity-group):hover td:nth-child(2){background:#eaf3f1}
#statisticsTable .project-statistics-table tfoot :is(th,td){height:40px;padding-block:0;white-space:nowrap;background:#e9f1ef;border-top:1px solid #cddad9;border-bottom:0;font-weight:650}
#statisticsTable .project-statistics-table tfoot tr:nth-last-child(1) :is(th,td){bottom:0}
#statisticsTable .project-statistics-table tfoot tr:nth-last-child(2) :is(th,td){bottom:40px}
#statisticsTable .project-statistics-table tfoot tr:nth-last-child(3) :is(th,td){bottom:80px}
#statisticsTable .project-statistics-table tfoot tr:nth-last-child(4) :is(th,td){bottom:120px}
#statisticsTable .project-statistics-table tfoot tr.statIndirectRow :is(th,td){background:#fbf4e2;color:#7a5712;font-weight:500}
#statisticsTable .project-statistics-table tfoot tr.productivity-total:last-child :is(th,td){background:#d6e7e2;border-top:2px solid #2f6f60;font-weight:750;font-size:15px}
#statisticsTable .project-statistics-table tfoot tr:only-child :is(th,td){border-top:2px solid #2f6f60}
#statisticsTable .project-statistics-table tfoot :is(th,td):first-child{overflow:hidden;text-overflow:ellipsis}
#statisticsTable .project-statistics-table tfoot td{padding-inline:4px}
