/* ============================================================
   Главная «Кабинеты и сигналы», панель проблем и страница кабинета
   (SPEC-redesign §3, §4; README дизайнера §1–§3). Токены — styles.css.
   ============================================================ */

/* ---------- Главная: заголовок, «с прошлого визита» ---------- */

.home { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.home-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-sub { color: var(--ink3); }

.since { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; color: var(--ink2); font-size: 13px; }
.since-label { color: var(--ink3); }
.since-new { font-weight: 600; }
.since-new.is-up { color: var(--warn); }
.since-sep { color: var(--ink3); }

/* ---------- Панель инструментов ---------- */

.home-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home-search { width: 240px; max-width: 100%; padding: 8px 10px; }
.toolbar-gap { flex: 1 1 auto; }
.home-count { font-size: 13px; color: var(--ink3); white-space: nowrap; }

.quick { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.quick-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  cursor: pointer; padding: 7px 11px; border-radius: 6px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink2);
  transition: background 0.14s ease-out, border-color 0.14s ease-out, color 0.14s ease-out;
}
.quick-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.quick-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.quick-count { font-family: var(--font-num); font-variant-numeric: tabular-nums; opacity: 0.8; }

.col-chip {
  cursor: pointer; padding: 7px 11px; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent-bg); color: var(--accent);
}

.group-control { position: relative; display: inline-flex; }
.group-btn { color: var(--ink2); font-weight: 400; }
.group-btn.is-on { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--accent); }
.group-btn .chev { font-size: 10px; color: var(--ink3); }
.group-menu { min-width: 210px; }
.cols-btn { color: var(--ink2); font-weight: 400; }
.cols-btn .chev { font-size: 10px; color: var(--ink3); }

/* Панель «Столбцы» (разметка — та же, что у Отчётов) */
.cols-control { position: relative; display: inline-flex; }

/* ---------- Матрица ---------- */

.mx-card { overflow: hidden; }
.mx-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  /* Контейнер для ширин столбцов (100cqi = ширина карточки), см. colWidth в home.js */
  container-type: inline-size;
}

table.mx {
  width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
  font-size: 14px;
}
/* Сброс без веса (:where): у ячеек свои отступы ниже. */
:where(.mx) th, :where(.mx) td { padding: 0; text-align: left; font-weight: 400; vertical-align: middle; }
.mx .mono, .mx-num.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* Заголовок: «Кабинет», плитки сигналов, деньги */
.mx thead th, .mx thead .mx-fill { border-bottom: 1px solid var(--line); vertical-align: bottom; }
.mx-th-name { padding: 12px 16px; font-size: 12px; color: var(--ink3); }
.mx-th-num { padding: 12px 10px; font-size: 12px; color: var(--ink3); text-align: right; white-space: normal; line-height: 1.3; }
.mx-th-num.is-first { border-left: 1px solid var(--line); }
.mx-th-spent { text-align: left; }
.mx-th-num.sortable { padding: 0; }
.mx-sort {
  display: flex; align-items: flex-end; justify-content: flex-end; width: 100%; height: 100%;
  padding: 12px 10px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12px; color: inherit; text-align: right; line-height: 1.3;
}
.mx-th-spent .mx-sort { justify-content: flex-start; padding-left: 12px; }
.mx-sort:hover { color: var(--ink); }
.mx-th-num[aria-sort="descending"] .mx-sort, .mx-th-num[aria-sort="ascending"] .mx-sort { color: var(--ink); font-weight: 600; }
.mx-sort:focus-visible { outline-offset: -2px; }

/* Плитка-заголовок сигнала */
.mx-tile {
  position: relative; border-left: 1px solid var(--line2);
  border-top: 3px solid transparent;
  transition: background 0.14s ease-out;
}
.mx-tile.sev-critical { border-top-color: var(--crit); }
.mx-tile.sev-warning { border-top-color: var(--warn); }
.mx-tile.sev-info { border-top-color: var(--info); }
.mx-tile.is-on { background: var(--accent-bg); }
.mx-tile-main {
  display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 104px;
  padding: 10px 10px 10px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit;
  font: inherit;
}
.mx-tile-main:hover { background: color-mix(in srgb, var(--surface2) 70%, transparent); }
.mx-tile.is-on .mx-tile-main:hover { background: none; }
.mx-tile-main:focus-visible { outline-offset: -2px; }
.mx-tile-num { font-family: var(--font-num); font-size: 28px; line-height: 1; font-weight: 500; color: var(--ink3); font-variant-numeric: tabular-nums; }
.mx-tile.sev-critical .mx-tile-num { color: var(--crit); }
.mx-tile.sev-warning .mx-tile-num { color: var(--warn); }
.mx-tile.sev-info .mx-tile-num { color: var(--info); }
.mx-tile-label { font-size: 12px; line-height: 1.25; font-weight: 600; color: var(--ink3); padding-right: 2px; }
.mx-tile:not(.is-zero) .mx-tile-label { color: var(--ink); }
.mx-tile-note { font-size: 11px; line-height: 1.3; color: var(--ink3); overflow-wrap: anywhere; }
.mx-tile-all {
  position: absolute; top: 8px; right: 6px;
  border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 4px;
  font-size: 11px; font-weight: 500; color: var(--accent); white-space: nowrap;
  opacity: 0.85;
}
.mx-tile-all:hover { opacity: 1; text-decoration: underline; }

/* Строки */
.mx tbody tr > * { border-bottom: 1px solid var(--line2); }
.mx tbody tr:last-child > * { border-bottom: 0; }
.mx-row { height: 40px; }
.mx-name { padding: 0; }
.mx-cab {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  min-height: 40px; padding: 3px 16px; color: inherit; min-width: 0;
  border-radius: 0;
}
.mx-cab:hover { text-decoration: none; background: var(--surface2); }
.mx-cab:hover .mx-cab-name { text-decoration: underline; text-underline-offset: 2px; }
.mx-cab:focus-visible { outline-offset: -2px; }
.mx-cab-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mx-cab-sub { font-size: 11px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mx-cab-sub.is-warn { color: var(--warn); }
.mx-cab-sub.is-crit { color: var(--crit); }
.mx-row.is-noaccess .mx-num, .mx-row.is-noaccess .mx-num .mono { color: var(--ink3); }

/* Ячейка сигнала */
.mx-cell { border-left: 1px solid var(--line2); padding: 5px; height: 40px; }
.mx-cell.is-col { background: var(--accent-bg); }
.mx-chip {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 28px; padding: 0 4px; border-radius: 4px;
  border: 1px solid transparent; background: transparent;
  font-family: var(--font-num); font-size: 12px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: filter 0.12s ease-out;
}
button.mx-chip:hover { filter: brightness(0.97); }
.mx-chip-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mx-chip.sev-critical { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-line); }
.mx-chip.sev-warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.mx-chip.sev-info { background: var(--info-bg); color: var(--info); border-color: var(--line); }
.mx-chip.is-muted { border: 1px dashed var(--ink3); color: var(--ink3); background: transparent; font-weight: 500; }
.mx-chip.is-nodata { background: var(--surface2); color: var(--ink3); cursor: default; font-weight: 500; }
.mx-count {
  flex: none; min-width: 15px; padding: 0 4px; border-radius: 6px; font-size: 10px; line-height: 15px; text-align: center;
  background: currentColor;
}
/* Число в бейдже: цвет фона ячейки на цвете уровня */
.mx-chip.sev-critical .mx-count { background: var(--crit); color: var(--surface); }
.mx-chip.sev-warning .mx-count { background: var(--warn); color: var(--surface); }
.mx-chip.sev-info .mx-count { background: var(--info); color: var(--surface); }

/* Деньги за период */
.mx-num { padding: 0 10px; text-align: right; white-space: nowrap; font-size: 12px; }
.mx-num.mono { font-size: 12px; }
td.mx-num:first-of-type { }
.mx-spend-cell { display: table-cell; padding: 0 12px; border-left: 1px solid var(--line); }
.mx-spend-cell > .mx-bar, .mx-spend-cell > .mx-spend { vertical-align: middle; }
.mx-bar {
  display: inline-block; width: calc(100% - 78px); height: 6px; border-radius: 3px;
  background: var(--line2); overflow: hidden; margin-right: 8px;
}
.mx-bar-fill { display: block; height: 100%; background: var(--bar); border-radius: 3px; }
.mx-spend { display: inline-block; width: 70px; text-align: right; font-size: 12px; }
.mx-cpl { line-height: 1.15; }
.mx-cpl > .mono { display: block; font-size: 12px; }
.mx-dev { display: block; font-size: 10px; color: var(--ink3); font-family: var(--font-num); }
.mx-dev.is-crit { color: var(--crit); }
.mx-dev.is-warn { color: var(--warn); }
.mx-dev.is-ok { color: var(--ok); }
.mx-trend { padding: 4px 10px; }
.mx-trend .row-spark { margin-left: auto; width: 116px; }
.mx-trend .row-spark svg { display: block; }

/* Группы */
.mx-group { height: 36px; background: var(--surface2); cursor: pointer; }
.mx-group > * { border-bottom: 1px solid var(--line) !important; }
.mx-group-head { padding: 0; }
.mx-group-toggle {
  display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 36px; padding: 8px 16px;
  border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.mx-group-toggle:focus-visible { outline-offset: -2px; }
.mx-group-toggle .caret { color: var(--ink3); width: 10px; flex: none; font-size: 11px; }
.mx-group-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-group-count { color: var(--ink3); white-space: nowrap; font-size: 13px; }
.mx-group-sig { padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--ink3); border-left: 1px solid var(--line2); }
.mx-group-sig.sev-critical { color: var(--crit); }
.mx-group-sig.sev-warning { color: var(--warn); }
.mx-group .mx-num { font-size: 12px; }

/* Заглушки и пустые состояния */
.mx-skel { height: 38px; }
.skel-bar { display: block; height: 10px; border-radius: 5px; background: var(--skel); margin: 0 16px; }
.skel-bar.is-short { height: 8px; margin: 0 0 0 auto; width: 60%; }
.skel-chip { display: block; height: 22px; margin: 0 3px; border-radius: 4px; background: var(--skel); opacity: 0.5; }
.mx-empty-row > td { padding: 0; }
.mx-empty {
  padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.mx-empty-title { font-size: 16px; font-weight: 600; }
.mx-empty-text { color: var(--ink3); }
.mx-reset { margin-top: 6px; color: var(--accent); }

/* Легенда */
.mx-legend { display: flex; gap: 8px 18px; font-size: 12px; color: var(--ink3); align-items: center; flex-wrap: wrap; }
.mx-legend .lg { display: inline-flex; gap: 6px; align-items: center; }
.lg-sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.lg-sw.is-crit { background: var(--crit-bg); border: 1px solid var(--crit-line); }
.lg-sw.is-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.lg-sw.is-muted { border: 1px dashed var(--ink3); }
.lg-sw.is-nodata { background: var(--surface2); }
.lg-sw.is-bar { width: 10px; height: 10px; border-radius: 2px; background: var(--bar); }
.lg-sw.is-bar2 { width: 10px; height: 10px; border-radius: 2px; background: var(--bar2); }

/* ---------- «Динамика за период» ---------- */

.dyn-card { display: flex; flex-direction: column; }
.dyn-head {
  display: flex; gap: 8px 22px; align-items: baseline; flex-wrap: wrap;
  padding: 14px 16px; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit;
  border-radius: var(--radius);
}
.dyn-head:focus-visible { outline-offset: -2px; }
.dyn-title { font-size: 15px; font-weight: 600; }
.dyn-totals { display: contents; }
.dyn-totals .tot { color: var(--ink3); white-space: nowrap; }
.dyn-totals .tot b { font-weight: 500; color: var(--ink); }
.dyn-totals .tot-note { font-size: 12px; }
.dyn-more { color: var(--accent); font-weight: 500; white-space: nowrap; }
.dyn-body { padding: 0 16px 16px; }
.dyn-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink3); margin-bottom: 8px; }
.dyn-legend .lg { display: inline-flex; gap: 6px; align-items: center; }
/* Столбики фиксированной ширины по центру своего дня (не во всю ширину дня),
   лиды — вплотную к расходу; общая линия основания под всеми днями. На узком
   месте (30 дней) столбики сжимаются пропорционально. */
.dyn-bars {
  display: grid; gap: 10px;
  background: linear-gradient(var(--line), var(--line)) 0 90px / 100% 1px no-repeat;
}
.dyn-bars.is-dense { gap: 4px; }
.dyn-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dyn-cols { height: 90px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.dyn-bar { flex: 0 1 36px; min-width: 3px; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--bar); }
.dyn-bar2 { flex: 0 1 14px; min-width: 2px; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--bar2); }
.dyn-label {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 11px; line-height: 1.35; color: var(--ink3); white-space: nowrap; overflow: hidden; text-align: center;
}
.dyn-label > :first-child { color: var(--ink2); }
.dyn-empty { color: var(--ink3); padding: 8px 0 4px; }

/* ---------- Панель проблем (drawer) ---------- */

.drawer {
  --drawer-top: 57px;
  position: fixed; top: var(--drawer-top); right: 0; bottom: 0; z-index: 45;
  width: 560px; max-width: 100vw;
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -16px 0 32px -18px oklch(0.3 0.03 260 / 0.28);
  animation: drawer-in 0.16s ease-out;
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 10px 20px; border-bottom: 1px solid var(--line2);
}
.drawer-heading { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.drawer-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; overflow-wrap: anywhere; }
.drawer-title:focus { outline: none; }
.drawer-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drawer-sub { color: var(--ink3); font-size: 13px; }
.drawer-close {
  flex: none; width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink2); cursor: pointer; font-size: 14px; line-height: 1;
}
.drawer-close:hover { background: var(--surface2); color: var(--ink); }
.drawer-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 20px; border-bottom: 1px solid var(--line);
}
.drawer-tools .filter-check { font-size: 13px; color: var(--ink2); padding: 0; }
.drawer-tools-gap { flex: 1 1 auto; }
.drawer-cab-link { font-size: 13px; font-weight: 500; white-space: nowrap; }
.drawer-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.drawer-note-host:empty { display: none; }
.drawer-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 20px 0; padding: 9px 12px; border-radius: 8px;
  background: var(--surface2); color: var(--ink2); font-size: 13px; line-height: 1.45;
}
.drawer-note.is-muted { background: transparent; border: 1px dashed var(--ink3); }
.mute-swatch { display: none; }
.drawer-body { padding-bottom: 24px; }
.drawer-skel { padding: 20px; }
.drawer-empty {
  padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.ok-circle {
  width: 40px; height: 40px; border-radius: 20px; background: var(--ok-bg); color: var(--ok);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.drawer-empty-title { font-size: 15px; font-weight: 600; }
.drawer-empty-text { color: var(--ink3); max-width: 420px; line-height: 1.45; }
.drawer-link { font-size: 13px; font-weight: 500; }

.drawer-block + .drawer-block { border-top: 8px solid var(--surface2); }
.drawer-block-head {
  display: flex; align-items: baseline; gap: 8px 10px; flex-wrap: wrap;
  padding: 12px 20px 10px; border-bottom: 1px solid var(--line2);
}
.drawer-block-name { font-size: 15px; font-weight: 600; }
.drawer-block-count { color: var(--ink3); font-size: 13px; }
.drawer-block-pills { display: inline-flex; gap: 6px; }
.drawer-block-dmg { font-family: var(--font-num); font-size: 13px; }
.drawer-block-dmg.sev-critical { color: var(--crit); }
.drawer-block-dmg.sev-warning { color: var(--warn); }

/* ---------- Строка проблемы ---------- */

.problem-row, .nt-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 20px; border-bottom: 1px solid var(--line2);
}
.problem-row:last-child, .nt-item:last-child { border-bottom: 0; }
.problem-row.problem-closed { opacity: 0.8; }
.problem-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.problem-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.problem-reopened {
  font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--ink2); white-space: nowrap; cursor: help;
}
.sev-pill {
  display: inline-flex; align-items: center; align-self: center;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
  border: 1px solid transparent;
}
.sev-pill.sev-critical { background: var(--crit-bg); color: var(--crit); }
.sev-pill.sev-warning { background: var(--warn-bg); color: var(--warn); }
.sev-pill.sev-info { background: var(--info-bg); color: var(--info); }
.sev-pill.is-closed { background: transparent; color: var(--ink3); border: 1px dashed var(--line-strong); }
.problem-entity { display: flex; gap: 4px 6px; align-items: baseline; font-size: 13px; min-width: 0; flex-wrap: wrap; }
.problem-level { color: var(--ink3); }
.problem-link { font-weight: 500; overflow-wrap: anywhere; }
.problem-link .ext { font-weight: 400; }
.problem-link-text { font-weight: 500; color: var(--ink2); }
.problem-camp { color: var(--ink3); overflow-wrap: anywhere; }
.problem-msg { margin: 0; color: var(--ink2); line-height: 1.5; font-size: 14px; }
.problem-facts { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.problem-fact {
  font-family: var(--font-num); font-size: 12px; padding: 2px 7px; border-radius: 4px;
  background: var(--surface2); color: var(--ink2);
}
.problem-foot { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 2px; }
.problem-dmg { display: flex; align-items: baseline; gap: 6px; cursor: help; }
.problem-damage { font-family: var(--font-num); font-size: 15px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.problem-damage.sev-critical { color: var(--crit); }
.problem-damage.sev-warning { color: var(--warn); }
.problem-damage.sev-info { color: var(--info); }
.problem-damage:not(.is-loss) { color: var(--ink2); }
.nt-item .problem-damage.sev-warning { color: var(--warn); }
.problem-dmg-note { font-size: 11px; color: var(--ink3); }
.problem-when { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink2); flex: 1 1 auto; }
.problem-age { white-space: nowrap; }
.problem-closed-meta { font-size: 12px; color: var(--ink3); }
.problem-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; position: relative; margin-left: auto; }
.problem-actions .btn { font-weight: 500; }
.problem-menu { position: relative; display: inline-flex; }
.problem-menu .chev { font-size: 9px; color: var(--ink3); }
.mute-menu { top: calc(100% + 4px); right: 0; min-width: 230px; display: flex; flex-direction: column; }
.mute-menu-note { padding: 6px 10px 8px; font-size: 12px; color: var(--ink3); line-height: 1.4; }
.problem-stub { color: var(--ink2); }

/* ---------- Страница кабинета (этап A) ---------- */

.cab-page { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.crumbs { display: flex; gap: 6px; font-size: 13px; color: var(--ink3); flex-wrap: wrap; }
.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; }
.cab-titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cab-title { font-size: 28px; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.cab-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--ink3); }
.cab-meta b { font-weight: 500; color: var(--ink2); }
.cab-meta b.is-warn { color: var(--warn); }
.cab-src { font-size: 12px; }
.cab-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cab-actions .btn:hover { text-decoration: none; }
.cab-signals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cab-signal {
  display: flex; flex-direction: column; gap: 4px; min-height: 74px; padding: 12px 14px;
  border-radius: var(--radius-tile); border: 1px solid var(--line); background: var(--surface); color: inherit;
}
a.cab-signal:hover { text-decoration: none; filter: brightness(0.98); }
.cab-signal-label { font-size: 12px; font-weight: 600; color: var(--ink3); }
.cab-signal-val { font-size: 18px; font-weight: 600; color: var(--ink3); }
.cab-signal-note { font-size: 12px; color: var(--ink3); }
.cab-signal.sev-critical { background: var(--crit-bg); border-color: var(--crit-line); }
.cab-signal.sev-critical .cab-signal-val { color: var(--crit); }
.cab-signal.sev-warning { background: var(--warn-bg); border-color: var(--warn-line); }
.cab-signal.sev-warning .cab-signal-val { color: var(--warn); }
.cab-signal.sev-info { background: var(--info-bg); }
.cab-signal.sev-info .cab-signal-val { color: var(--info); }
.cab-signal.is-muted { border-style: dashed; border-color: var(--ink3); }
.cab-signal.is-nodata { background: var(--surface2); border-color: transparent; }
.cab-problems { overflow: visible; }
.cab-problems-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.cab-h2 { font-size: 16px; font-weight: 600; }
.cab-problems-sub { padding: 10px 20px 0; color: var(--ink3); font-size: 13px; }

/* ---------- Узкие окна ---------- */

@media (max-width: 900px) {
  .drawer { top: 0; width: 100%; z-index: 70; border-left: 0; }
  .cab-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .home-search { width: 100%; }
  .toolbar-gap { display: none; }
  .home-count { width: 100%; }
}
