/* LS Guard — стили по макету ls_guard_3.html (вариант «Windows 11 / Нативный»).
   Тема — по системной (светлая/тёмная). Только системные шрифты: окно работает офлайн. */
:root {
  --font-sans: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "Courier New", monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;

  --brand-primary: #e04338;
  --brand-primary-hover: #c9342a;
  --brand-primary-soft: rgba(224, 67, 56, 0.12);
  --brand-primary-border: rgba(224, 67, 56, 0.32);

  --status-ok: #15803d; --status-ok-bg: #dcfce7; --status-ok-border: #86efac;
  --status-warn: #b45309; --status-warn-bg: #fef3c7; --status-warn-border: #fcd34d;
  --status-danger: #b91c1c; --status-danger-bg: #fee2e2; --status-danger-border: #fca5a5;
  --status-info: #1d4ed8; --status-info-bg: #dbeafe; --status-info-border: #93c5fd;

  --bg-window: #f7f8fa; --bg-sidebar: #f0f2f6; --bg-surface: #ffffff;
  --bg-surface-subtle: #f4f6f9; --bg-hover: #eaedf2;
  --text-primary: #111827; --text-secondary: #4b5563; --text-muted: #6b7280; --text-on-brand: #ffffff;
  --border-subtle: #e2e6ed; --border-strong: #cbd2df;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-toast: 0 18px 40px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-window: #14171f; --bg-sidebar: #101319; --bg-surface: #1b1f29;
    --bg-surface-subtle: #222734; --bg-hover: #282e3d;
    --text-primary: #f3f4f6; --text-secondary: #b0b7c3; --text-muted: #848d9c;
    --border-subtle: #2a303f; --border-strong: #3c4459;
    --brand-primary: #f2574c; --brand-primary-hover: #ff6b61;
    --brand-primary-soft: rgba(242, 87, 76, 0.16); --brand-primary-border: rgba(242, 87, 76, 0.38);
    --status-ok: #4ade80; --status-ok-bg: rgba(34, 197, 94, 0.15); --status-ok-border: rgba(74, 222, 128, 0.35);
    --status-warn: #fbbf24; --status-warn-bg: rgba(245, 158, 11, 0.16); --status-warn-border: rgba(251, 191, 36, 0.35);
    --status-danger: #f87171; --status-danger-bg: rgba(239, 68, 68, 0.18); --status-danger-border: rgba(248, 113, 113, 0.4);
    --status-info: #60a5fa; --status-info-bg: rgba(59, 130, 246, 0.16); --status-info-border: rgba(96, 165, 250, 0.35);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-toast: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* ---------------------------------------------------------------- база */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-window);
  color: var(--text-primary);
  font: 14px/1.45 var(--font-sans);
}
button, input, select { font: inherit; font-size: 13px; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.sprite { display: none; }
.ico { width: 16px; height: 16px; flex: none; }
.ico--26 { width: 26px; height: 26px; }

.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }

/* --------------------------------------------------------- боковая панель */
.sidebar {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) var(--space-3);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
}
.brand-box { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-1) var(--space-2) var(--space-3); }
.brand-logo { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-box__title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.brand-box__subtitle { font-size: 12px; color: var(--text-muted); }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__section {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); padding: var(--space-3) var(--space-3) var(--space-1);
}
.nav__item {
  min-height: 36px; padding: 0 var(--space-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
  color: var(--text-secondary); font-weight: 500; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav__item--active { background: var(--brand-primary-soft); color: var(--brand-primary); font-weight: 600; }
.nav__item-left { display: flex; align-items: center; gap: var(--space-2); }
.nav__count { font-size: 11px; color: var(--text-muted); }
.nav__badge {
  font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; min-width: 20px; text-align: center;
  border-radius: var(--radius-pill);
  background: var(--status-warn-bg); color: var(--status-warn); border: 1px solid var(--status-warn-border);
}
.nav__badge--danger { background: var(--status-danger-bg); color: var(--status-danger); border-color: var(--status-danger-border); }

.sidebar-footer {
  border-top: 1px solid var(--border-subtle); padding-top: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.role-card {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.role-card__ico { color: var(--text-muted); }
.role-card__text { flex: 1; min-width: 0; }
.role-card__title { font-size: 12px; font-weight: 600; }
.role-card__hint { font-size: 11px; color: var(--text-muted); }
.role-card--admin { border-color: var(--status-ok-border); }
.role-card--admin .role-card__ico, .role-card--admin .role-card__title { color: var(--status-ok); }

.pill {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 5px 10px; border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.pill .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--status-ok); background: var(--status-ok-bg); border-color: var(--status-ok-border); }
.pill--attention { color: var(--status-warn); background: var(--status-warn-bg); border-color: var(--status-warn-border); }
.pill--danger { color: var(--status-danger); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.pill--muted { color: var(--text-muted); background: var(--bg-surface-subtle); border-color: var(--border-subtle); }

/* ------------------------------------------------------- рабочая область */
.main { overflow: auto; padding: var(--space-6); }
.screen { display: none; flex-direction: column; gap: var(--space-5); }
.screen--active { display: flex; }
.screen__head, .page-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
h1, .page-header__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-header__desc { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.screen > p { margin: 0; }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Баннер статуса защиты */
.status-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-left: 4px solid var(--status-ok);
  border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-card);
}
.status-hero__info { display: flex; align-items: center; gap: var(--space-4); min-width: 0; flex: 1 1 320px; }
.status-hero__icon {
  width: 48px; height: 48px; flex: none; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--status-ok-bg); color: var(--status-ok);
}
.status-hero--warn { border-left-color: var(--status-warn); }
.status-hero--warn .status-hero__icon { background: var(--status-warn-bg); color: var(--status-warn); }
.status-hero--danger { border-left-color: var(--status-danger); }
.status-hero--danger .status-hero__icon { background: var(--status-danger-bg); color: var(--status-danger); }
.status-hero__title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.status-hero__sub { margin: 3px 0 0; font-size: 13px; color: var(--text-secondary); }
.mode-switcher { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mode-switcher__label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.pill-tabs, .segmented {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-surface-subtle); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.pill-tabs__btn, .segmented__item {
  min-height: 32px; padding: 0 var(--space-3); border: 0; background: transparent; cursor: pointer;
  border-radius: calc(var(--radius-md) - 2px); color: var(--text-secondary); font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.pill-tabs__btn:hover, .segmented__item:hover { color: var(--text-primary); }
.pill-tabs__btn--active, .segmented__item--active {
  background: var(--bg-surface); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Счётчики */
/* minmax(0, …): колонки сжимаются, а не распираются длинным текстом */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.kpi-card {
  display: flex; flex-direction: column; gap: var(--space-2); text-align: left; cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-4); box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}
.kpi-card:hover { border-color: var(--border-strong); }
.kpi-card__top { display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.kpi-card__val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.kpi-card__val--warn { color: var(--status-warn); }
.kpi-card__val--danger { color: var(--status-danger); }
.kpi-card__foot { font-size: 12px; color: var(--text-muted); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.content-grid > *, .kpi-grid > * { min-width: 0; }

/* Карточки */
.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-4);
}
.card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.card__title { margin: 0; font-size: 15px; font-weight: 700; }
.card__foot { display: flex; gap: var(--space-2); }
.card__foot .btn { flex: 1; }
.card__label { font-size: 15px; font-weight: 700; }
.card__value { font-size: 22px; font-weight: 600; }
.card__value--ok { color: var(--status-ok); }
.card__value--danger { color: var(--status-danger); }
.card__note { font-size: 13px; color: var(--text-secondary); }
.card--wide { gap: var(--space-3); }

.info-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px;
}
.info-item:last-child { border-bottom: 0; }
.info-item > span { color: var(--text-secondary); min-width: 0; }
.info-item > strong { text-align: right; font-weight: 600; }
.text-danger { color: var(--status-danger); }

.event-list { display: flex; flex-direction: column; gap: var(--space-2); }
.event-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  background: var(--bg-surface-subtle); border: 1px solid var(--border-subtle);
}
.event-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.event-row__title { font-size: 13px; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.event-row__obj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.event-row__meta { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-row__time { font-size: 12px; color: var(--text-muted); flex: none; }

/* Баннеры */
.banner { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid; font-weight: 500; }
.banner--danger { color: var(--status-danger); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.banner--warn { color: var(--status-warn); background: var(--status-warn-bg); border-color: var(--status-warn-border); }
.banner--top { margin-bottom: var(--space-5); }
.banner--ok { color: var(--status-ok); background: var(--status-ok-bg); border-color: var(--status-ok-border); }
.alerts__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.alerts__list { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
.alerts__list li { margin: 2px 0; }

/* Кнопки (≥ 32 px) */
.btn {
  min-height: 34px; padding: 0 var(--space-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-surface); color: var(--text-primary); font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--sm, .btn--small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn--primary { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--text-on-brand); }
.btn--primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); }
.btn--danger { color: var(--status-danger); border-color: var(--status-danger-border); }
.btn--danger:hover { background: var(--status-danger-bg); }
.btn--danger-solid { background: var(--status-danger); border-color: var(--status-danger); color: #fff; }
.btn--danger-solid:hover { background: var(--status-danger); filter: brightness(0.92); }
.link { border: 0; background: none; padding: 0; color: var(--brand-primary); cursor: pointer; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* Бейджи (иконка/текст, не только цвет) */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; border: 1px solid transparent;
  white-space: nowrap; line-height: 1.45;
}
.badge:empty { display: none; }
.badge--ok { background: var(--status-ok-bg); color: var(--status-ok); border-color: var(--status-ok-border); }
.badge--warn { background: var(--status-warn-bg); color: var(--status-warn); border-color: var(--status-warn-border); }
.badge--danger { background: var(--status-danger-bg); color: var(--status-danger); border-color: var(--status-danger-border); }
.badge--info { background: var(--status-info-bg); color: var(--status-info); border-color: var(--status-info-border); }
.badge--muted { background: var(--bg-surface-subtle); color: var(--text-muted); border-color: var(--border-subtle); }
.tag { font-size: 12px; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); white-space: nowrap; }
.tag--allow { color: var(--status-ok); border-color: var(--status-ok-border); background: var(--status-ok-bg); }
.tag--block { color: var(--status-danger); border-color: var(--status-danger-border); background: var(--status-danger-bg); }

/* Поля и фильтры */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.input {
  min-height: 34px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-surface);
}
input[type="search"].input, #sc-path { min-width: 280px; flex: 1 1 280px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; }
.check input { accent-color: var(--brand-primary); }

/* Таблицы */
.table-wrap {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-surface-subtle); padding: 9px 12px; border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.table td { padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tr.is-closed td { color: var(--text-muted); }
.table tr.is-danger td { background: var(--status-danger-bg); }
.table--journal td:nth-child(6) { max-width: 420px; word-break: break-word; }
.table--inv { table-layout: fixed; }
.table--inv td { overflow-wrap: anywhere; }
.table--inv .col-prog { min-width: 0; max-width: none; }
.table--inv th:first-child { width: 108px; }
.table--inv th:last-child { width: 90px; }
.table--autostart th:nth-child(3) { width: 22%; }
.table--autostart th:nth-child(4) { width: 16%; }
.table--autostart th:nth-child(5) { width: 104px; }
.table--services th:nth-child(3) { width: 124px; }
.table--services th:nth-child(4) { width: 116px; }
.table--services th:nth-child(5) { width: 15%; }
.table--services th:nth-child(6) { width: 13%; }
.prog__name { font-weight: 600; }
.prog__path { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.prog__sig { margin: 1px 0 2px; font-size: 13px; }
.col-prog { min-width: 220px; max-width: 360px; }
.col-where { min-width: 170px; max-width: 280px; overflow-wrap: anywhere; }
.where__domain { font-weight: 500; }
.where__geo { color: var(--text-muted); font-size: 12px; }
.col-actions { white-space: nowrap; margin-top: 2px; }
.col-actions:empty { display: none; }
.col-actions .link + .link { margin-left: var(--space-2); }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.signer { color: var(--text-secondary); }

.mono { font-family: var(--font-mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.empty { padding: var(--space-6); text-align: center; color: var(--text-muted); }
.pager { display: flex; justify-content: center; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.pre { white-space: pre-line; }
.attribution { margin: 0; }

/* Всплывающее сообщение в окне */
.toast {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 40; max-width: 520px;
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-toast);
  padding: var(--space-3) var(--space-4); word-break: break-word;
}

/* Настройки */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); }
.mode {
  display: flex; gap: var(--space-2); align-items: flex-start; cursor: pointer;
  padding: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.mode input { accent-color: var(--brand-primary); }
.mode:has(input:checked) { border-color: var(--brand-primary-border); background: var(--brand-primary-soft); }
.pin-form { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pin-form .input { width: 200px; }
.settings-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.settings-row label { min-width: 80px; font-weight: 600; }

/* Модальные окна: PIN, мастер */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgb(0 0 0 / 0.4); }
.modal__card {
  width: min(360px, 92vw); display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-toast);
}
.modal__card h2 { margin: 0; font-size: 18px; }
.modal__card p { margin: 0; }
#pin-input { font-size: 20px; letter-spacing: .3em; text-align: center; min-height: 44px; }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.modal__card--wide { width: min(560px, 94vw); max-height: 92vh; overflow: auto; }
.wz-step { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-3); margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.wz-step legend { font-weight: 600; padding: 0 4px; }
.wz-step p { margin: 0; }
#pin-modal { z-index: 30; }

/* Прогресс: спиннер и бегущая полоса (сколько осталось — скрипт аудита не сообщает) */
.spinner {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--brand-primary);
  animation: lsg-spin .8s linear infinite;
}
.spinner--sm { width: 12px; height: 12px; }
@keyframes lsg-spin { to { transform: rotate(360deg); } }
.progress-bar { position: relative; height: 4px; overflow: hidden; border-radius: 99px; background: var(--border-subtle); }
.progress-bar__fill {
  position: absolute; top: 0; bottom: 0; left: -35%; width: 35%;
  border-radius: 99px; background: var(--brand-primary);
  animation: lsg-indeterminate 1.4s ease-in-out infinite;
}
@keyframes lsg-indeterminate { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .spinner, .progress-bar__fill { animation-duration: 3s; }
}
.progress-card {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--status-info-bg); border: 1px solid var(--status-info-border);
}
.progress-card .spinner { margin-top: 2px; border-top-color: var(--status-info); }
.progress-card .progress-bar__fill { background: var(--status-info); }
.progress-card__body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.progress-card__title { font-weight: 600; }
.progress-card__sub { font-size: 12px; color: var(--text-secondary); }

.scan-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.scan-card--never { background: var(--brand-primary-soft); border-color: var(--brand-primary-border); }
.scan-card__head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.scan-card__head .spinner { margin-left: auto; }
.scan-card__text { font-size: 11px; line-height: 1.35; color: var(--text-secondary); }

/* Узкое окно */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .mode-switcher { align-items: flex-start; }
}
