/*
Режим тестирования. Результаты сверяйте с исходными данными.
ДЕКЛАРАЦИЯ ДЛЯ ИБ (восемь пунктов; сверяется с кодом проверкой proverka_koda.py)
  ВНЕШНИЕ ПОДКЛЮЧЕНИЯ: нет — в процессе нет обращений во внешнюю сеть
  ДАННЫЕ: читает и пишет только оформление страницы; персональные данные: нет
    макросы и скрипты входных файлов: не применимо — входных файлов нет
  ХРАНЕНИЕ В БРАУЗЕРЕ: нет
  УЧЁТНЫЕ ДАННЫЕ: нет
  ЗАПУСК ПРОГРАММ: нет
  ИЗМЕНЕНИЯ В СИСТЕМЕ: нет — установка, права администратора, реестр Windows, автозапуск и службы не требуются и не затрагиваются
  СТОРОННИЕ КОМПОНЕНТЫ: нет
  ЖУРНАЛ И ТЕЛЕМЕТРИЯ: нет

ТЕХНИЧЕСКОЕ ЗАДАНИЕ · редакция 01.12.2026
1. Назначение. Согласованное оформление пульта.
2. Вход. Разметка страницы и ширина окна.
3. Правила. Фирменные цвета, видимое состояние и отделение разрыва.
4. Допущения. Шрифты операционной системы.
5. Выход. Рабочие области для большого и малого окна.
6. Устройство. CSS Grid, адаптивные карточки и таблицы с прокруткой.
7. Что менять. Значения палитры и отступов менять в одном месте.
*/
:root {
  color-scheme: light;
  --navy: #203050;
  --text: #20314b;
  --muted: #51647d;
  --blue: #0050a0;
  --cyan: #00b0e0;
  --bg: #f2f6fa;
  --demand-fill: #07599c;
  --plan-fill: #178a9e;
  --line: #d7e1ee;
  --white: #ffffff;
  --warn: #835400;
  --warn-bg: #fff6db;
  --green: #245c51;
  --max: 1472px;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #0074b7; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.18; letter-spacing: -.025em; }
h3 { font-size: 1.1rem; line-height: 1.27; }
.test-banner {
  position: sticky; top: 0; z-index: 3;
  padding: .38rem 1rem; text-align: center;
  font-size: .82rem; font-weight: 700;
  background: #ffe79a; color: #553900; border-bottom: 1px solid #e8c35d;
}
.masthead { color: var(--white); background: var(--navy); border-bottom: 4px solid var(--cyan); }
.masthead-inner {
  max-width: var(--max); margin: auto; padding: 1.3rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 1rem; }
.brand-mark {
  width: 14px; height: 42px; flex: none; border-radius: 2px;
  background: linear-gradient(160deg, var(--cyan), #2a70d0);
}
.brand h1 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); line-height: 1.15; font-weight: 700; }
.brand p { margin-top: .22rem; color: #d2e0ed; font-size: .88rem; }
.support { color: #e2effd; font-size: .9rem; }
.layout {
  max-width: var(--max); margin: auto; padding: 1.75rem 2rem 2rem;
  display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: start; gap: 1.75rem;
}
.navigation {
  position: sticky; top: 3.2rem; display: grid; gap: .32rem; padding: .35rem 0;
}
.navigation a {
  font-size: .93rem; display: block; padding: .6rem .8rem;
  min-height: 42px; color: #425570; text-decoration: none; border-radius: 6px;
}
.navigation a:hover { background: #e5edf6; }
.navigation a.current { background: #dfeefa; color: #054b88; font-weight: 700; }
main { min-width: 0; }
section { scroll-margin-top: 3.75rem; }
.section-top, .card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem 1.2rem; flex-wrap: wrap;
}
.section-top p, .card-head p { margin-top: .42rem; color: var(--muted); font-size: .93rem; }
.segmented { display: inline-flex; gap: .22rem; padding: .21rem; background: #e7eef6; border-radius: 8px; }
.role-button {
  min-height: 36px; border: 1px solid transparent; background: transparent;
  border-radius: 6px; padding: .33rem .65rem; color: #385474; font-size: .88rem;
}
.role-button[aria-pressed="true"] { border-color: #bed4e5; background: #fff; color: #004b93; font-weight: 700; }
.filters, .request-grid, .thresholds {
  display: flex; gap: .65rem .8rem; align-items: end; flex-wrap: wrap; margin-top: 1rem;
}
.filters {
  padding: .85rem 1rem; background: #edf3fa; border: 1px solid var(--line); border-radius: 9px;
}
.filters label { flex: 1 1 9rem; min-width: 0; }
label { display: grid; gap: .27rem; font-size: .85rem; font-weight: 700; color: #3d5270; }
select {
  appearance: none; min-height: 40px; min-width: 0; max-width: 100%; padding: .45rem 1.9rem .45rem .63rem;
  border: 1px solid #b6c7d9; border-radius: 6px; background-color: var(--white); color: var(--text);
  background-image: linear-gradient(45deg, transparent 50%, #435a75 50%),
    linear-gradient(135deg, #435a75 50%, transparent 50%);
  background-position: calc(100% - 13px) 51%, calc(100% - 9px) 51%;
  background-size: 4px 4px; background-repeat: no-repeat;
  font-weight: 500;
}
select:disabled { background-color: #f4f7fa; color: #425570; opacity: 1; }
.button, .text-button, .reset-link { font-size: .88rem; font-weight: 700; line-height: 1.27; }
.button {
  display: inline-flex; min-height: 40px; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 6px; padding: .48rem .86rem; text-decoration: none;
}
.primary { background: var(--blue); color: var(--white); }
.primary:hover { background: #003e7b; color: var(--white); }
.outline { background: var(--white); border-color: #a9c5df; color: var(--blue); }
.outline:hover { background: #edf5fd; }
.text-button { border: 0; color: var(--blue); background: transparent; padding: .42rem 0; text-align: left; }
.text-button:disabled { color: #64758c; cursor: default; }
.text-button:not(:disabled):hover { text-decoration: underline; }
.reset-link { padding: .68rem 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .78rem; margin-top: 1rem; }
.kpi {
  min-width: 0; border: 1px solid var(--line); border-top: 3px solid #75b9de;
  border-radius: 8px; background: var(--white); padding: .82rem .95rem;
}
.kpi dt { font-size: .86rem; font-weight: 700; color: #405570; }
.kpi dd, .peak-value {
  margin-top: .16rem; font-size: clamp(1.44rem, 3vw, 2.06rem); line-height: 1.18;
  font-weight: 760; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--navy);
}
.kpi > span, .hint { margin-top: .32rem; color: var(--muted); font-size: .84rem; }
.kpi.gap { border-top-color: #e5ae38; }
.kpi.gap dd, .warning-text { color: var(--warn); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr); gap: .8rem; margin-top: 1rem; }
.card {
  min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.05rem 1.15rem; box-shadow: 0 1px 2px rgb(32 48 80 / 4%);
}
.content-section { margin-top: 1rem; }
.content-section h2 { font-size: 1.32rem; }
.legend { display: flex; gap: .65rem; flex-wrap: wrap; font-size: .84rem; color: #425570; }
.legend span { display: flex; align-items: center; gap: .3rem; }
.legend i { display: block; width: .68rem; height: .68rem; border-radius: 3px; background: var(--demand-fill); }
.legend .plan-key { background: var(--plan-fill); }
.chart-wrap { height: 231px; margin-top: .8rem; }
canvas { display: block; width: 100%; height: 100%; }
.focus-card { border-top: 3px solid #e5ae38; }
.peak-month { margin-top: 1.03rem; color: #405570; font-weight: 700; }
.peak-value { margin-top: .18rem; color: var(--warn); }
.peak-value small { font-size: 1rem; letter-spacing: 0; }
.focus-values { display: grid; gap: .45rem; margin: .85rem 0 .95rem; }
.focus-values div { display: flex; justify-content: space-between; gap: .35rem; }
.focus-values dt { color: var(--muted); }
.focus-values dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { padding: .65rem .8rem; margin-top: .9rem; background: #f2f6fa; border-radius: 6px; color: #405570; }
.month-details { margin-top: .35rem; font-size: .88rem; }
.month-details summary { color: var(--blue); font-weight: 700; }
summary { cursor: pointer; }
.detail-list { margin-top: .85rem; display: grid; gap: .42rem; }
.detail-row { min-width: 0; border: 1px solid var(--line); border-radius: 7px; }
.detail-row summary {
  display: grid; align-items: center; gap: .22rem .7rem; grid-template-columns: minmax(12rem, 1.35fr) repeat(3, minmax(7.5rem, .7fr));
  min-height: 47px; padding: .53rem .75rem; background: #f5f8fc; border-radius: 6px;
}
.detail-row summary:hover { background: #e9f2fb; }
.detail-row[open] > summary { border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.group-title { font-weight: 700; }
.group-title::before { content: "+"; color: var(--blue); margin-right: .55rem; }
.detail-row[open] .group-title::before { content: "−"; }
.group-title small { font-size: .76rem; margin-left: .33rem; color: var(--muted); }
.group-metric { justify-self: end; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-metric b { margin-left: .24rem; color: var(--text); }
.group-gap b { color: var(--warn); }
.table-wrap { overflow-x: auto; min-width: 0; margin-top: .5rem; }
.detail-row .table-wrap { margin-top: 0; }
table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: .87rem; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .62rem; border-bottom: 1px solid #e1e9f3; text-align: right; white-space: nowrap; }
th:first-child { text-align: left; }
thead th { color: #415671; background: #f1f5fa; font-weight: 700; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #f5f9fe; }
.annotation { font-weight: 600; color: #305972; font-size: .82rem; margin-left: .35rem; }
tfoot { font-weight: 700; color: var(--navy); background: #edf4fa; }
.client-toggle { margin-top: .75rem; }
.only-majors .group-metric, .only-majors .group-title small { visibility: hidden; }
.client-toggle[aria-pressed="true"] { background: #dfedfb; border-color: #487fb8; }
.count-label, .state-label { padding: .22rem .55rem; border-radius: 5px; background: #e8f0fa; color: #27537c; font-weight: 700; font-size: .85rem; }
.thresholds { margin-top: .8rem; }
.signals-list { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .45rem; }
.signal {
  display: grid; grid-template-columns: minmax(8.7rem, .5fr) minmax(12rem, 1.25fr) auto;
  align-items: center; gap: .5rem .85rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 6px;
}
.signal-kind { justify-self: start; font-size: .83rem; font-weight: 700; padding: .25rem .4rem; border-radius: 4px; }
.signal-kind.incoming { background: #e4f3f0; color: var(--green); }
.signal-kind.outgoing { background: var(--warn-bg); color: var(--warn); }
.signal-name, .signal-change { display: grid; gap: .08rem; min-width: 0; }
.signal-change { text-align: right; white-space: nowrap; }
.signal-name small, .signal-change small { color: var(--muted); font-size: .83rem; }
.request-grid label { flex: 1 1 9rem; min-width: 0; }
.workflow-steps { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: .95rem 0 .65rem; padding: 0; }
.workflow-steps li { padding: .27rem .54rem; color: #425570; border: 1px solid var(--line); border-radius: 5px; font-size: .85rem; }
.workflow-steps li[aria-current="step"] { border-color: #81b6e0; color: #004d92; background: #e6f3fd; font-weight: 700; }
.request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: .8rem; }
footer {
  max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); padding: 1rem 2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: .55rem 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: .85rem;
}
footer div { display: grid; gap: .12rem; }
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: .85rem; padding-top: 1rem; }
  .navigation { position: static; display: flex; overflow-x: auto; padding: 0; }
  .navigation a { white-space: nowrap; }
}
@media (max-width: 780px) {
  .layout, .masthead-inner, footer { padding-left: 1rem; padding-right: 1rem; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-wrap { height: 220px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-row summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .group-title { grid-column: 1 / -1; }
  .group-metric { justify-self: start; white-space: normal; }
}
@media (max-width: 480px) {
  .masthead-inner { padding-top: .9rem; padding-bottom: .9rem; flex-wrap: wrap; }
  .layout, .masthead-inner, footer { padding-left: .75rem; padding-right: .75rem; }
  .layout { padding-bottom: 1rem; }
  .card { padding: .8rem; }
  .signal { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .6rem; }
  .signal-kind { grid-column: 1 / -1; }
  .segmented { width: 100%; }
  .role-button { flex: 1; }
  .chart-wrap { height: 188px; }
  section { scroll-margin-top: 4.1rem; }
}
