/**
 * VNK DRIVE — дизайн-система панели.
 *
 * Одна система на все разделы: раньше каждая страница несла свою копию
 * переменных и кнопок, и они разъезжались — где-то радиус 8, где-то 14, тени
 * все разные. Здесь единственный источник: токены, типографика, кнопки,
 * карточки, таблицы, ящик справа, выпадающие списки и тайминги.
 *
 * 17.09.2026 оформление переведено на лавандовую тему: тот же язык, что в
 * макете ABI RENT и в разделе /v2. Правило цвета: фиолетовый отвечает за
 * навигацию и активность, зелёный, красный и оранжевый — только за состояние
 * данных. Если цвет ничего не сообщает, его в интерфейсе нет.
 *
 * Имена классов оставлены прежними намеренно. Их используют двадцать девять
 * страниц; переименовать значило бы переписать каждую, а разъехалась бы всё
 * равно одна забытая. Поэтому меняется вид, а не разметка.
 */

/* ── Шрифт ──────────────────────────────────────────────────────────────────
   Лежит у нас же: политика безопасности пускает font-src только 'self' и data:,
   внешние хосты не работают. Кириллица и латиница раздельно — на связи
   Абиджана лишние 38 КБ заметны. */

@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap;
  src: url('/fonts/GolosText-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap;
  src: url('/fonts/GolosText-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap;
  src: url('/fonts/GolosText-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap;
  src: url('/fonts/GolosText-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap;
  src: url('/fonts/GolosText-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap;
  src: url('/fonts/GolosText-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Golos Text'; font-weight: 700; font-display: swap;
  src: url('/fonts/GolosText-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 700; font-display: swap;
  src: url('/fonts/GolosText-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Golos Text'; font-weight: 800; font-display: swap;
  src: url('/fonts/GolosText-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 800; font-display: swap;
  src: url('/fonts/GolosText-800-latin.woff2') format('woff2'); }

/* ── Токены ─────────────────────────────────────────────────────────────── */
:root {
  /* Поверхности. Фон лавандовый, карточки белые — белое читается как «поднятое». */
  --bg:            #EFECFB;
  --bg-2:          #F6F4FE;
  --bg-sunk:       #E7E3F7;
  --card:          #FFFFFF;
  --card-2:        #FAF9FE;
  --surface:       #FFFFFF;
  --soft:          #F4F2FC;
  --soft-2:        #EEEBFA;
  --side:          #FAF9FE;
  --side-2:        #EDE9FB;
  --glass:         rgba(255, 255, 255, .74);

  /* Границы — почти невидимые. Разделяет тень, а не линия. */
  --line:          #ECEAF5;
  --line-strong:   #DCD8EE;
  --line-soft:     #F2F0FA;

  /* Текст: тёмно-синий графит с фиолетовым подтоном, а не чёрный. */
  --ink:           #16172B;
  --ink-2:         #4A4F66;
  --muted:         #7C8397;
  --dim:           #A0A5B6;
  --dark:          #1A1B2E;

  /* Акценты. Фиолетовый — навигация и активность. */
  --accent:        #6B5BD2;
  --accent-2:      #8E7BE8;
  --accent-soft:   #E6E2F8;
  --accent-line:   #CFC7F0;

  /* Состояния данных. */
  --ok:            #2FA96E;
  --ok-soft:       #E4F4EC;
  --good:          #2FA96E;
  --good-soft:     #E4F4EC;
  --warn:          #B5791A;
  --warn-soft:     #FAF0DF;
  --crit:          #D8453B;
  --crit-soft:     #FBEAE8;
  --bad:           #D8453B;
  --bad-soft:      #FBEAE8;
  --info:          #6B5BD2;
  --info-soft:     #E6E2F8;
  --gold:          #F2C230;

  /* Тени: три ступени, фиолетовые. Больше не нужно, иначе интерфейс «шумит». */
  --sh-1: 0 1px 3px rgba(82, 70, 150, .05);
  --sh-2: 0 2px 6px rgba(82, 70, 150, .05), 0 14px 34px rgba(82, 70, 150, .07);
  --sh-3: 0 4px 12px rgba(82, 70, 150, .09), 0 24px 56px rgba(82, 70, 150, .11);
  --sh-line: inset 0 0 0 1px var(--line);

  /* Радиусы крупные: интерфейс должен выглядеть мягким, его смотрят весь день. */
  --r-sm: 12px;
  --r:    16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-m:  16px;
  --r-s:  12px;
  --r-l:  20px;
  --pill: 999px;

  /* Тайминги. Один набор на всё приложение — разнобой чувствуется как брак. */
  --t-btn:    110ms;
  --t-press:  110ms;
  --t-hover:  190ms;
  --t-card:   190ms;
  --t-page:   280ms;
  --t-drawer: 320ms;
  --t-drop:   170ms;
  --ease:     cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --sidebar: 212px;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Человеку, которому анимации мешают, мы их не навязываем. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Основа ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body, body.vnk {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.vnk h1, .vnk h2, .vnk h3 { margin: 0; color: var(--ink); }
.vnk h1 { font-size: 23px; font-weight: 800; letter-spacing: .6px; }
.vnk h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.vnk h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.vnk p  { margin: 0; }

.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.num   { font-variant-numeric: tabular-nums; }
.sub   { font-size: 12.5px; color: var(--muted); }

/* Деньги и большие числа — плотные и крупные, их читают первыми. */
.money { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.02em; }

a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ── Слой страницы ──────────────────────────────────────────────────────── */
.page {
  padding: 24px 28px 48px;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: pageIn var(--t-page) var(--ease) both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.spacer { flex: 1; }

/* ── Кнопки ─────────────────────────────────────────────────────────────────
   Нажатие видно всегда: кнопка проседает и теряет тень — как настоящая
   клавиша. На выдаче машины по ней бьют пальцем, стоя во дворе. */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border: none; border-radius: var(--pill);
  background: var(--soft); color: var(--ink-2); text-decoration: none;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t-press) var(--ease), box-shadow var(--t-card) var(--ease),
              background var(--t-card) var(--ease), color var(--t-card) var(--ease);
}
.btn:hover { background: var(--soft-2); color: var(--ink); }
.btn:active { transform: scale(.955) translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--dark); color: #fff; box-shadow: var(--sh-1);
  text-transform: uppercase; font-size: 11px; letter-spacing: .9px;
}
.btn--primary:hover { background: #24263D; color: #fff; box-shadow: var(--sh-2); }

.btn--ghost { background: var(--accent-soft); color: var(--accent); }
.btn--ghost:hover { background: #DDD7F5; color: var(--accent); }

.btn--danger { background: var(--crit-soft); color: var(--crit); }
.btn--danger:hover { background: #F7DAD7; color: var(--crit); }

.btn--sm { padding: 7px 14px; font-size: 11px; letter-spacing: .4px; }

.btn--icon { padding: 9px; width: 36px; height: 36px; border-radius: 50%; }

/* Волна от точки нажатия: живёт 520 мс и убирается сама. */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .22; transform: scale(0);
  animation: ripple 520ms var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* Строчная кнопка-ссылка внутри таблиц и карточек. */
.lnk {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--pill);
  background: var(--soft); color: var(--ink-2); text-decoration: none;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; border: none;
  transition: transform var(--t-press) var(--ease), background var(--t-card) var(--ease), color var(--t-card) var(--ease);
  position: relative; overflow: hidden; white-space: nowrap;
}
.lnk:hover { background: var(--accent-soft); color: var(--accent); }
.lnk:active { transform: scale(.95); }

/* ── Карточки и сетки ───────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-2);
  padding: 20px 22px;
  transition: box-shadow var(--t-card) var(--ease), transform var(--t-card) var(--ease);
}
.card--pad-0 { padding: 0; overflow: hidden; }
.card--flat { box-shadow: var(--sh-1); }
.card--wide { grid-column: 1 / -1; }

/* Карточка, по которой нажимают: приподнимается и проседает под пальцем. */
.card--tap { cursor: pointer; }
.card--tap:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
.card--tap:active { transform: translateY(0) scale(.995); }

.card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card__h h2 { font-size: 16px; font-weight: 700; }
.card__ic {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 30px;
  background: var(--soft); color: var(--accent); display: grid; place-items: center;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid--cars { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px)  { .grid, .grid--2 { grid-template-columns: 1fr; } }

.box { background: var(--soft); border-radius: var(--r-m); padding: 14px 16px;
       display: flex; flex-direction: column; gap: 8px; }

/* ── Плитки показателей ─────────────────────────────────────────────────── */
.kpi {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-2);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow var(--t-card) var(--ease), transform var(--t-card) var(--ease);
  animation: rise 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kpi:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }

.kpi__top { display: flex; align-items: center; gap: 10px; }
.kpi__ic {
  width: 32px; height: 32px; border-radius: 11px; flex: 0 0 32px;
  display: grid; place-items: center; font-size: 15px;
  background: var(--soft); color: var(--accent);
}
.kpi__ic--ok   { background: var(--ok-soft);   color: var(--ok); }
.kpi__ic--warn { background: var(--warn-soft); color: var(--warn); }
.kpi__ic--crit { background: var(--crit-soft); color: var(--crit); }
.kpi__ic--info { background: var(--accent-soft); color: var(--accent); }
.kpi__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi__val { font-size: 27px; font-weight: 800; letter-spacing: -.5px; line-height: 1.08;
            font-variant-numeric: tabular-nums; }
.kpi__foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi__spark { margin-left: auto; }

.big { font-size: 27px; font-weight: 800; letter-spacing: -.5px; line-height: 1.08;
       font-variant-numeric: tabular-nums; }
.big--good { color: var(--ok); }
.big--bad  { color: var(--crit); }

.delta { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta--up   { color: var(--ok); }
.delta--down { color: var(--crit); }

/* ── Метки состояния ────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--pill);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: var(--soft); color: var(--ink-2);
}
.tag--ok     { background: var(--ok-soft);     color: var(--ok); }
.tag--good   { background: var(--ok-soft);     color: var(--ok); }
.tag--warn   { background: var(--warn-soft);   color: var(--warn); }
.tag--crit   { background: var(--crit-soft);   color: var(--crit); }
.tag--bad    { background: var(--crit-soft);   color: var(--crit); }
.tag--info   { background: var(--accent-soft); color: var(--accent); }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--acc    { background: var(--accent-soft); color: var(--accent); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--muted); }
.dot--good { background: var(--ok); }
.dot--bad  { background: var(--crit); }
.dot--warn { background: var(--warn); }

.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--pill);
         background: var(--crit); color: #fff; display: grid; place-items: center;
         font-size: 11px; font-weight: 800; }

/* ── Фильтры и переключатели ────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--pill);
  border: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: transform var(--t-press) var(--ease), background var(--t-card) var(--ease),
              border-color var(--t-card) var(--ease), color var(--t-card) var(--ease);
  position: relative; overflow: hidden;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip:active { transform: scale(.96); }
.chip.is-on, .chip--on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* Тот же вид, что у фильтров на страницах аренды и кассы. */
.filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--pill);
  border: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: transform var(--t-press) var(--ease), background var(--t-card) var(--ease),
              border-color var(--t-card) var(--ease), color var(--t-card) var(--ease);
  position: relative; overflow: hidden;
}
.filter:hover { color: var(--ink); border-color: var(--line-strong); }
.filter:active { transform: scale(.96); }
.filter--on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.seg { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: var(--pill); }
.seg button, .seg .seg__b {
  padding: 8px 14px; border: none; border-radius: var(--pill); background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background var(--t-card) var(--ease), color var(--t-card) var(--ease),
              transform var(--t-press) var(--ease);
}
.seg button:active { transform: scale(.96); }
.seg button.is-on, .seg button[aria-selected="true"], .seg .seg__b--on {
  background: var(--surface); color: var(--accent); box-shadow: var(--sh-1);
}

.tabs { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: var(--pill);
        overflow-x: auto; }
.tabs button, .tabs .tab {
  padding: 9px 16px; border: none; border-radius: var(--pill); background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-card) var(--ease), color var(--t-card) var(--ease),
              transform var(--t-press) var(--ease);
}
.tabs button:active { transform: scale(.97); }
.tabs button.is-on, .tabs .tab--on, .tabs button[aria-selected="true"] {
  background: var(--surface); color: var(--accent); box-shadow: var(--sh-1);
}

/* ── Поля ───────────────────────────────────────────────────────────────────
   Крупные: в них попадают пальцем, стоя у машины, а не мышью за столом. */

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); }

.input, .field input, .field select, .field textarea, input.input, select.input, textarea.input {
  width: 100%; padding: 11px 15px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--soft); font: inherit; font-size: 14.5px; color: var(--ink); outline: none;
  transition: border-color var(--t-card) var(--ease), background var(--t-card) var(--ease);
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--surface);
}
.input:disabled, .field input:disabled, .field select:disabled { opacity: .55; }
.field textarea, textarea.input { min-height: 78px; resize: vertical; }

.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent); cursor: pointer; }

.search {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--soft); border-radius: var(--pill); flex: 1; min-width: 200px;
}
.search input { border: none; background: transparent; outline: none; font: inherit; font-size: 14px;
                color: var(--ink); width: 100%; }
.search input::placeholder { color: var(--muted); }

/* ── Таблицы ────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-2);
}

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-card) var(--ease); }
.tbl tbody tr:hover { background: var(--soft); }
.tbl .num, .tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl--tap tbody tr { cursor: pointer; }

/* Список строк вместо таблицы — там, где строка открывает ящик. */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: var(--r-m); border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: background var(--t-card) var(--ease), transform var(--t-press) var(--ease);
  position: relative; overflow: hidden;
}
.rows .row:last-child { border-bottom: 0; }
.rows .row:hover { background: var(--soft); }
.row__t { flex: 1; min-width: 0; font-size: 13.5px; }
.row__v { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.row-item {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px;
  border-radius: var(--r-m); text-decoration: none; color: inherit; cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-card) var(--ease), transform var(--t-press) var(--ease);
  position: relative; overflow: hidden;
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--soft); }
.row-item:active { transform: scale(.995); }
.row-item__main { flex: 1; min-width: 0; }
.row-item__t { font-size: 14.5px; font-weight: 600; }
.row-item__s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-item__col { width: 150px; flex: 0 0 150px; font-size: 13px; font-variant-numeric: tabular-nums; }
.row-item__col b { display: block; font-weight: 700; }
.row-item__col span { color: var(--muted); font-size: 11.5px; }
.row-item__chev { color: var(--muted); font-size: 17px; flex: 0 0 auto; }
@media (max-width: 1080px) { .row-item__col { width: 110px; flex: 0 0 110px; } }
@media (max-width: 860px)  { .row-item__col { display: none; } }

.pic { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; background: var(--accent-soft);
       color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.pic--car { border-radius: 12px; background: var(--soft); color: var(--ink-2); }

.ava { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; background: var(--gold);
       color: var(--dark); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* ── Полосы и мелкая графика ────────────────────────────────────────────── */
.bar { height: 8px; border-radius: var(--pill); background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: var(--pill);
         background: var(--accent); transition: width 900ms var(--ease); }
.bar i.is-good { background: var(--ok); }
.bar i.is-warn { background: var(--warn); }

.kv { display: flex; flex-direction: column; gap: 1px; }
.kv > div { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv > div:last-child { border-bottom: none; }
.kv span { flex: 1; color: var(--muted); }
.kv b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ── Сообщения ──────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-m);
  background: var(--soft); border-left: 3px solid var(--muted); text-decoration: none; color: inherit;
  transition: transform var(--t-press) var(--ease), background var(--t-card) var(--ease);
  position: relative; overflow: hidden;
}
.alert:hover { background: var(--soft-2); }
.alert--bad  { border-left-color: var(--crit); }
.alert--warn { border-left-color: var(--warn); }
.alert--info { border-left-color: var(--accent); }
.alert--good { border-left-color: var(--ok); }
.alert__t { font-size: 13.5px; font-weight: 600; }
.alert__s { font-size: 12px; color: var(--muted); }

.err { background: var(--crit-soft); color: var(--crit); padding: 11px 15px;
       border-radius: var(--r-m); font-size: 13.5px; }
.err:empty { display: none; padding: 0; }

.empty { padding: 34px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty__ic { font-size: 30px; opacity: .5; margin-bottom: 8px; }

/* Заглушки на время загрузки: страница не прыгает, когда данные приходят. */
.skel, .skeleton {
  background: linear-gradient(90deg, var(--soft) 25%, var(--soft-2) 50%, var(--soft) 75%);
  background-size: 300% 100%; animation: shine 1.4s linear infinite; border-radius: var(--r-m);
}
@keyframes shine { to { background-position: -300% 0; } }
.skel--line { height: 14px; margin-bottom: 8px; }
.skel--card { height: 96px; }

/* ── Ящик с подробностями ───────────────────────────────────────────────────
   Строку открываем панелью справа, а не отдельной страницей: список остаётся
   на месте, и возврат не стоит загрузки. */

.drawer-back, .scrim {
  position: fixed; inset: 0; background: rgba(22, 23, 43, .28);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity var(--t-page) var(--ease); z-index: 40;
}
.drawer-back.is-on, .drawer-back.on, .scrim.is-on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: 460px; max-width: calc(100vw - 24px);
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  transform: translateX(calc(100% + 20px)); transition: transform var(--t-drawer) var(--ease);
  z-index: 41; display: flex; flex-direction: column; overflow: hidden;
}
.drawer.is-on, .drawer.on { transform: none; }
.drawer__head {
  display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-size: 18px; font-weight: 700; flex: 1; min-width: 0; }
.drawer__body { padding: 18px 22px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.drawer__close {
  width: 34px; height: 34px; flex: 0 0 34px; border: none; border-radius: 50%;
  background: var(--soft); color: var(--ink-2); font-size: 17px; cursor: pointer; font-family: inherit;
  transition: transform var(--t-press) var(--ease), background var(--t-card) var(--ease);
}
.drawer__close:hover { background: var(--accent-soft); color: var(--accent); }
.drawer__close:active { transform: scale(.92); }

/* ── Выпадающее меню строки ─────────────────────────────────────────────── */
.menu {
  position: absolute; z-index: 50; min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: var(--sh-3);
  animation: dropIn var(--t-drop) var(--ease) both;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  border: none; background: transparent; border-radius: var(--r-s);
  font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer; text-decoration: none;
  transition: background var(--t-card) var(--ease), color var(--t-card) var(--ease);
}
.menu button:hover, .menu a:hover { background: var(--accent-soft); color: var(--accent); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 0; }

/* ── Сообщение о результате ────────────────────────────────────────────────
   Всплывает снизу и уходит само: действие уже случилось, подтверждать его
   отдельным окном значит заставлять человека нажимать дважды. */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 130%);
  background: var(--dark); color: #fff; padding: 13px 22px; border-radius: var(--pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--sh-3); z-index: 60;
  transition: transform 340ms var(--ease); max-width: calc(100vw - 32px);
}
.toast.is-on, .toast.on { transform: translate(-50%, 0); }
.toast.is-bad { background: var(--crit); }
.toast.is-good { background: var(--ok); }

/* ── Появление ──────────────────────────────────────────────────────────── */
.enter { animation: rise 420ms var(--ease) both; }

/* ── Телефон ────────────────────────────────────────────────────────────────
   Поля и кнопки не ужимаем: на телефоне по ним попадают пальцем. Сжимаются
   отступы и колонки, а не мишени. */

@media (max-width: 860px) {
  .page { padding: 16px 12px 96px; gap: 16px; }
  .card { padding: 16px 16px; border-radius: var(--r-lg); }
  .kpi { padding: 15px 16px; border-radius: var(--r-lg); }
  .vnk h1 { font-size: 20px; }
  .kpi__val, .big { font-size: 24px; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 84vh;
            transform: translateY(calc(100% + 20px)); }
  .drawer.is-on, .drawer.on { transform: none; }
  .toast { bottom: 96px; }
  .tbl th, .tbl td { padding: 10px 12px; }
}
