/* ===================================================================
   WOT MILITARY HUD — оформление админ-панели.

   Ни одной внешней загрузки: панель поднимается на машине, где может
   не быть интернета. Шрифты — системные, иконки интерфейса — SVG,
   который рисует app.js.

   `color-scheme: dark` ниже — не украшение. Без него браузеры с
   принудительным затемнением страниц (Opera GX, Chrome force-dark)
   считают светлой любую страницу, которая не объявила тему, и сами
   ИНВЕРТИРУЮТ картинки: тёмные превью танков превращались в белые
   силуэты со свечением. Объявленная тёмная тема выключает этот режим.
   =================================================================== */

:root {
  color-scheme: dark;

  --bg:        #0d1013;
  --bg-2:      #12161a;
  --panel:     #1a1f25;
  --panel-2:   #20262d;
  --sunk:      #121619;
  --line:      #2b323b;
  --line-2:    #3b4450;

  --amber:     #f0951e;
  --amber-hi:  #ffb44d;
  --amber-dim: rgba(240, 149, 30, .16);
  --green:     #4ad06e;
  --red:       #e0533f;
  --blue:      #6aa9e9;

  --text:      #e2e7ed;
  --text-dim:  #8b95a3;
  --text-dim2: #626c79;

  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Segoe UI Semibold", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 13px/1.45 var(--sans);
  color: var(--text);
  background: var(--bg);
  /* Камуфляж: несколько мягких пятен цвета хаки поверх графита плюс
     тонкая техническая сетка. Всё градиентами, без единой картинки. */
  background-image:
    radial-gradient(ellipse 60% 40% at 12% 8%,  rgba(78, 90, 62, .55), transparent 70%),
    radial-gradient(ellipse 50% 45% at 85% 20%, rgba(58, 70, 54, .48), transparent 70%),
    radial-gradient(ellipse 70% 50% at 70% 92%, rgba(70, 78, 58, .44), transparent 72%),
    radial-gradient(ellipse 45% 40% at 28% 78%, rgba(46, 58, 50, .48), transparent 70%),
    linear-gradient(0deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(160deg, #0f1317, #0b0e11 60%, #0d1114);
  background-size: auto, auto, auto, auto, 46px 46px, 46px 46px, auto;
  background-attachment: fixed;
}

img { border: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f1317; }
::-webkit-scrollbar-thumb { background: #2f3742; border: 2px solid #0f1317; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* =================================================================== */
/*  ВХОД — ПОВТОРЯЕМ ЭКРАН ЛОГИНА КЛИЕНТА 0.9.12                       */
/*                                                                      */
/*  ВСЁ В НАТУРАЛЬНУЮ ВЕЛИЧИНУ. Размеры сняты пипеткой со скриншота     */
/*  клиента (1920x1080) и совпали с кадрами из флеш-роликов:            */
/*    поле ввода  154 x 21   (кадр ComponentsLib 30x21, рамка 1 px)     */
/*    кнопка      154 x 39   (кадр ComponentsLib 256x128, плашка        */
/*                            лежит там на строках 44..82)              */
/*    логотип     ~430 px по ширине (кадр logos.swf 449x210)            */
/*    фон         1920x1200, показывается как есть, по центру           */
/*  Ничего не растягивается: ни кнопка, ни поле, ни фон. Первый заход   */
/*  тянул кнопку на 320 px и поле на всю строку — отсюда и «уехало».    */
/*                                                                      */
/*  Поле и кнопка ОДНОЙ ШИРИНЫ и стоят ровно по центру экрана — в       */
/*  клиенте так же: середина поля приходится на 960-й пиксель из 1920.  */
/* =================================================================== */

.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}

/* Фотография — в натуральную величину и по центру, БЕЗ cover: клиент
   её тоже не растягивает. Снизу подложен тот же чёрный, что по краям
   самих картинок, чтобы на большом экране не было видно стыка. */
body.login-body::before {
  background: var(--shot, none) center center / auto no-repeat #05070a;
  opacity: 1;
  filter: none;
}
body.login-body::after {
  background:
    radial-gradient(ellipse 95% 85% at 50% 50%,
                    rgba(0,0,0,0), rgba(0,0,0,.55) 88%);
}

/* Группа «логотип + форма» центруется, но со сдвигом вниз. Сдвиг не
   на глаз: в клиенте при 1920x1080 верх логотипа приходится на 42%
   высоты экрана, низ кнопки — на 75%. Простое центрирование ставит
   группу слишком высоко (Карл это и заметил), 14vh выводит её туда же,
   куда её ставит клиент. Подвал в группу не входит — он прижат к низу,
   иначе он тянул бы логотип вверх. */
.login-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 14vh;
}

.login-logo {
  width: min(430px, 44vw); height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.7));
  -webkit-user-drag: none; user-select: none;
}

/* ШИРИНА ФОРМЫ ЗАДАНА ЯВНО. Без неё крайние столбцы сетки (1fr)
   съёживаются по содержимому: слева подпись, справа пусто - и поле
   уезжает вправо от середины. При фиксированной ширине оба крайних
   столбца выходят по (470-154-12)/2 = 152 px, и поле встаёт ровно по
   центру, как в клиенте (там середина поля - 960-й пиксель из 1920). */
.login { width: min(470px, 92vw); }

/* Три столбца: подпись | поле 154 px | пустышка той же ширины. */
.login-row {
  display: grid; grid-template-columns: 1fr 154px 1fr;
  align-items: center; column-gap: 6px;
  margin-bottom: 5px;
}
.login-lab {
  text-align: right; font-size: 13px; color: #cdd2d7;
  text-shadow: 0 1px 2px rgba(0,0,0,.95);
}
/* Имя сервера. Рамку берёт от .login-field (оба класса стоят на одном
   теге), здесь только то, чем подпись отличается от поля ввода: текст
   по центру рамки, свой цвет и обрезка длинного имени многоточием.
   По горизонтали - text-align, по вертикали - line-height в высоту
   содержимого: рамка 21 px минус бордюр по 1 px сверху и снизу = 19.
   Через grid/place-items было бы короче, но тогда перестаёт работать
   многоточие у длинного имени: обрезается анонимный элемент сетки, а
   не сам span. */
.login-server {
  display: block; text-align: center; line-height: 19px;
  color: #e6dcb6; cursor: default;
  text-shadow: 0 1px 2px rgba(0,0,0,.95);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Поле ввода — кадр из клиента, девятью кусками. Рамка там ровно в
   один пиксель, поэтому и срез 1 по вертикали и 2 по горизонтали:
   середина тянется, рамка остаётся острой. Высота 21 — родная,
   по вертикали ничего не тянется вовсе. */
/* СЕЛЕКТОР С ЗАПАСОМ ПО ВЕСУ — `.login .login-field`, а не просто
   `.login-field`.
   09.10.2026, третий заход, и только теперь по делу. Два первых
   возились с картинкой фокуса, а поле пароля всё это время рисовала
   ВООБЩЕ ДРУГАЯ ПРАВИЛА — общая для всей панели
       input[type=text], input[type=password], ... {
           background: var(--sunk);
           border: 1px solid var(--line-2);
       }
   ниже по файлу (см. «формы»). Она весит больше, чем один класс
   (`input[type=password]` — это элемент плюс атрибут), и потому била
   `.login-field` по двум местам сразу: ставила свой тёмный фон и —
   главное — писала СОКРАЩЁННОЕ свойство `border`, которое сбрасывает
   `border-image` в none. То есть рамки из клиента у поля пароля не
   было вовсе, был обычный серый бордюр панели, а в фокусе ещё и
   оранжевый от `input:focus`. Именно это Карл и видел, а я два раза
   сказал, что свёл их к одному виду, не проверив.
   Два класса (`.login` + `.login-field`) весят больше, и теперь рамка
   у поля ввода и у имени сервера рисуется ОДНИМ И ТЕМ ЖЕ куском. */
.login .login-field {
  width: 154px; height: 21px; margin: 0; padding: 0 6px;
  font: 13px var(--sans); color: #d9dbd0;
  background: none; border-radius: 0; outline: none;
  box-shadow: none;
  border: 1px solid transparent; border-width: 1px 2px;
  border-image: url('/static/assets/wot/field.png') 1 2 fill stretch;
}
/* ФОКУС — ТА ЖЕ РАМКА, ТОЛЬКО СВЕТЛЕЕ ВНУТРИ.
   09.10.2026. Раньше в фокусе подставлялась другая картинка,
   field_focus.png, и поле пароля выглядело совсем иначе, чем рамка с
   именем сервера: поле автофокусное, так что эту картинку было видно
   всегда. Разгадка в самих файлах: field.png - честная рамка 30x21
   (светлый бордюр в пиксель, тёмная вдавленная середина), а
   field_focus.png - 150x21 БЕЗ рамки, просто плоская светлая заливка.
   Это разные вещи, а не два состояния одной.
   Поэтому рамка теперь одна на оба состояния, а фокус показываем тем,
   чего в самой картинке нет: внутренним свечением и подсветкой текста.
   Геометрия при этом не меняется ни на пиксель. */
.login .login-field:focus {
  /* НИЧЕГО, КРОМЕ КУРСОРА.
     09.10.2026, второй заход. Первый убрал подмену картинки на
     field_focus.png, но добавил внутреннее свечение - и поле пароля
     снова оказалось светлее рамки с именем сервера, потому что поле
     автофокусное и свечение видно всегда. Карл это и увидел.
     Фокус тут показывать нечем и незачем: поле на странице одно, и
     курсор в нём стоит с первой секунды. */
  caret-color: #e6dcb6;
  box-shadow: none;
  border-image: url('/static/assets/wot/field.png') 1 2 fill stretch;
}

.login-msg {
  min-height: 18px; font-size: 12px; color: #ff6a52;
  text-shadow: 0 1px 3px rgba(0,0,0,.95);
  white-space: nowrap;
}

/* Кнопка — плашка из клиента как есть, 154x39, фоном без растяжения.
   Рамку в один пиксель и ореол добавляем тенью: в самом кадре их нет,
   их рисует компонент клиента поверх. */
.login-go {
  display: block; width: 154px; height: 39px;
  margin: 21px auto 0; padding: 0;
  border: 0; border-radius: 0; cursor: pointer;
  background: url('/static/assets/wot/btn_red.png') center / 154px 39px
              no-repeat;
  /* Рамка в один пиксель - цвет снят с клиента (87,68,53): в самом
     кадре её нет, её рисует компонент поверх плашки. Ореол там едва
     заметный, поэтому и здесь слабый. */
  box-shadow: 0 0 0 1px rgb(87, 68, 53),
              0 0 10px rgba(200, 40, 20, .25);
  font: 700 17px/39px var(--head);
  color: #fff; letter-spacing: .02em;
  text-shadow: 0 2px 3px rgba(0,0,0,.9);
}
.login-go:hover {
  background-image: url('/static/assets/wot/btn_red_hi.png');
  box-shadow: 0 0 0 1px rgb(126, 100, 76),
              0 0 16px rgba(235, 60, 35, .40);
}
.login-go:active { transform: translateY(1px); filter: brightness(.88); }

/* Подвал у нижнего края, как в клиенте. */
.login-foot {
  position: fixed; left: 0; right: 0; bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; pointer-events: none;
}
.login-foot img { width: 120px; height: auto; opacity: .7; }
.login-foot p {
  margin: 0; font-size: 11px; line-height: 1.5; color: #99a0a8;
  text-shadow: 0 1px 2px rgba(0,0,0,.95);
}

/* Узкий экран: подписи встают над полями. */
@media (max-width: 560px) {
  .login-row { grid-template-columns: 1fr; justify-items: center; }
  .login-lab { text-align: center; }
  .login-aside { display: none; }
  .login-wrap { margin-top: 4vh; }
}

/* --------------------------------------------------------- каркас */

.shell { display: flex; min-height: 100vh; }

/* ----- боковое меню ----- */
.side {
  width: 236px; flex: none;
  background: linear-gradient(180deg, rgba(14,17,21,.96), rgba(10,13,16,.96));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand {
  height: 62px; display: flex; align-items: center; gap: 11px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.35);
}
.brand .mark {
  /* Настоящий щит World of Tanks, вытащенный из gui/scaleform/logos.swf */
  height: 36px; width: auto; flex: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.brand .txt b {
  display: block; font: 700 12px var(--head); letter-spacing: .22em;
  text-transform: uppercase;
}
.brand .txt span {
  display: block; font-size: 10px; color: var(--amber);
  letter-spacing: .16em; text-transform: uppercase;
}

.nav { padding: 12px 0; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px; color: var(--text-dim); text-decoration: none;
  border-left: 3px solid transparent; cursor: pointer;
  text-transform: uppercase; letter-spacing: .1em;
  font: 600 11.5px var(--head); transition: .13s;
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav a.on {
  color: var(--amber); border-left-color: var(--amber);
  background: linear-gradient(90deg, var(--amber-dim), transparent);
}
.nav a.on svg { opacity: 1; }

.side-foot {
  padding: 12px 16px; border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--text-dim2); line-height: 1.6;
}
.side-foot b { color: var(--text-dim); font-weight: 600; }

/* ----- шапка ----- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top {
  height: 62px; flex: none; display: flex; align-items: center;
  gap: 18px; padding: 0 20px;
  background: rgba(16,21,26,.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.top h1 {
  margin: 0; font: 600 16px var(--head);
  text-transform: uppercase; letter-spacing: .07em; white-space: nowrap;
}
.top h1 em { font-style: normal; color: var(--amber); }
.top .spacer { flex: 1; }

.meta { display: flex; gap: 20px; }
.meta div { line-height: 1.25; }
.meta span {
  display: block; font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim2);
}
.meta b { font: 600 12px var(--head); color: var(--text); }
.meta b.ok { color: var(--green); }
.meta b.bad { color: var(--red); }

/* тумблер защиты входа */
.toggle { display: flex; align-items: center; gap: 9px; cursor: pointer;
  user-select: none; }
.toggle .sw {
  width: 42px; height: 21px; flex: none; background: #2a313a;
  border: 1px solid var(--line-2); position: relative; transition: .16s;
}
.toggle .sw i {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  background: var(--text-dim); transition: .16s; display: block;
}
.toggle.on .sw { background: rgba(74,208,110,.22); border-color: var(--green); }
.toggle.on .sw i { left: 23px; background: var(--green); }
.toggle .lab {
  font: 600 10.5px var(--head); letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}
.toggle.on .lab { color: var(--green); }

/* ----- рабочая область ----- */
.view { padding: 20px; flex: 1; }
.view.hide { display: none; }

.page-title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 16px;
}
.page-title h2 {
  margin: 0; font: 600 15px var(--head); text-transform: uppercase;
  letter-spacing: .16em;
}
.page-title .rule { flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------- панели */

.panel {
  background: linear-gradient(180deg, rgba(38,45,54,.72), rgba(30,36,44,.74));
  backdrop-filter: blur(3px);
  border: 1px solid var(--line-2);
  position: relative; margin-bottom: 16px;
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 11px; height: 11px;
  border: 1px solid var(--line-2); pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0;
  border-color: var(--amber); }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0;
  border-color: var(--amber); }
.panel > h3 {
  margin: 0; padding: 11px 14px;
  font: 600 11.5px var(--head); letter-spacing: .18em;
  text-transform: uppercase; color: var(--text);
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 10px;
}
.panel > h3 .mini { margin-left: auto; font-size: 10px; letter-spacing: .1em;
  color: var(--text-dim2); font-weight: 400; }
.panel > .body { padding: 14px; }

.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr;
  align-items: start; }
.grid3 { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr);
  align-items: start; }
@media (max-width: 1150px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* плитки со счётчиками */
.tiles { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile {
  padding: 13px 14px; background: linear-gradient(160deg, #1e242b, #171b21);
  border: 1px solid var(--line-2); position: relative; overflow: hidden;
  background: rgba(46,54,64,.5);
}
.tile::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--amber);
}
.tile.green::after { background: var(--green); }
.tile.red::after { background: var(--red); }
.tile b { display: block; font: 600 22px var(--head); line-height: 1.1; }
.tile span { display: flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-dim2); }
.tile span svg, .tile span img { width: 14px; height: 14px;
  flex: none; object-fit: contain; }

/* --------------------------------------------------------- элементы */

label.fld {
  display: block; font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-dim);
}
label.fld > span { display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px; }
label.fld svg { width: 15px; height: 15px; flex: none; }

input[type=text], input[type=password], input[type=number], select,
textarea {
  width: 100%; padding: 8px 10px;
  background: var(--sunk); color: var(--text);
  border: 1px solid var(--line-2); font: 13px var(--sans);
  outline: none; transition: .13s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber-dim);
}
input::placeholder { color: var(--text-dim2); }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 64px; }

button {
  padding: 8px 15px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #262d36, #1b2128); color: var(--text);
  font: 600 11px var(--head); letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: .13s;
}
button:hover { border-color: var(--amber); color: var(--amber-hi); }
button.primary {
  background: linear-gradient(180deg, var(--amber-hi), #d97f0c);
  border-color: #b96a09; color: #17120a;
}
button.primary:hover { filter: brightness(1.1); color: #17120a; }
button.danger { border-color: rgba(224,83,63,.5); color: #f2a294; }
button.danger:hover { background: rgba(224,83,63,.18); border-color: var(--red);
  color: #ffbdb0; }
button.ghost { background: transparent; }
button.sm { padding: 5px 10px; font-size: 10px; }
button:disabled { opacity: .45; cursor: not-allowed; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 150px; }
.row > .tight { flex: 0 0 auto; }

.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.seg { display: inline-flex; border: 1px solid var(--line-2);
  margin-bottom: 14px; }
.seg button {
  border: 0; background: transparent; color: var(--text-dim);
  border-bottom: 2px solid transparent; padding: 9px 20px;
}
.seg button.on { color: var(--amber); border-bottom-color: var(--amber);
  background: var(--amber-dim); }

.hint { color: var(--text-dim2); font-size: 11px; line-height: 1.5; }
.empty { padding: 26px; text-align: center; color: var(--text-dim2); }

.tag {
  display: inline-block; padding: 2px 7px; font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; border: 1px solid;
}
.tag.ok   { color: var(--green); border-color: rgba(74,208,110,.45);
            background: rgba(74,208,110,.1); }
.tag.bad  { color: var(--red); border-color: rgba(224,83,63,.45);
            background: rgba(224,83,63,.1); }
.tag.warn { color: var(--amber); border-color: rgba(240,149,30,.45);
            background: var(--amber-dim); }
.tag.dim  { color: var(--text-dim); border-color: var(--line-2); }
.tag.sm   { padding: 0 5px; font-size: 9px; }
.tag.gold { color: #f0c04a; border-color: rgba(240,192,74,.45);
            background: rgba(240,192,74,.1); }

.alert {
  display: flex; gap: 10px; padding: 10px 12px; margin-top: 12px;
  border: 1px solid rgba(240,149,30,.4); background: var(--amber-dim);
  color: var(--amber-hi); font-size: 12px; line-height: 1.5;
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* -------------------------------------------------------- таблицы */

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; padding: 9px 12px; font: 600 10px var(--head);
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-dim2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid rgba(43,50,59,.6);
  vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: .1s; }
.tbl tbody tr:hover { background: rgba(240,149,30,.07); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nick { font-weight: 600; }
.wrap-x { overflow-x: auto; }

.mono { font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }
.pwd { letter-spacing: .12em; }

/* --------------------------------------------------- деньги, иконки */

/* Картинки из клиента показываем в их натуральном размере или кратно
   ему: 27x17 у флагов, 16x16 у классов, 32x32 у уровней. Растягивать
   их нельзя — замылятся. */
.ico { flex: none; image-rendering: auto; vertical-align: middle; }
.coin { width: 16px; height: 16px; object-fit: contain; }
.cls  { width: 16px; height: 16px; }
.lvl  { width: 22px; height: 22px; object-fit: contain; }
.flag { width: 27px; height: 17px; }

.money { display: inline-flex; align-items: center; gap: 6px; }
.money b { font: inherit; }

/* ----------------------------------------------------- ангар */

.hangars { display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.hcard {
  border: 1px solid var(--line-2); cursor: pointer; overflow: hidden;
  background: var(--panel-2); transition: .15s; position: relative;
}
.hcard:hover { border-color: var(--amber); }
.hcard.on { border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 0 22px rgba(240,149,30,.2); }
.hcard .pic { height: 132px; position: relative; }
.hcard .pic.default {
  background:
    radial-gradient(ellipse 46% 34% at 50% 74%, rgba(255,236,186,.20), transparent 70%),
    linear-gradient(180deg, #3f463c 0%, #333a31 40%, #6d6a5e 41%, #56534a 62%,
                    #3a382f 63%, #2a2823 100%);
}
.hcard .pic.default::after {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(72deg, rgba(0,0,0,.30) 0 2px, transparent 2px 30px) 0 0 / 100% 41%,
    repeating-linear-gradient(-72deg, rgba(0,0,0,.30) 0 2px, transparent 2px 30px) 0 0 / 100% 41%,
    linear-gradient(90deg, transparent 47%, rgba(240,190,90,.28) 49%,
                    rgba(240,190,90,.28) 51%, transparent 53%) 0 62% / 100% 38%;
  background-repeat: no-repeat;
}
.hcard .pic.halloween {
  background:
    radial-gradient(circle at 74% 24%, rgba(226,232,255,.85) 0 7px, rgba(226,232,255,.16) 8px, transparent 34px),
    radial-gradient(ellipse 60% 40% at 50% 96%, rgba(255,132,20,.5), transparent 68%),
    radial-gradient(ellipse 80% 50% at 22% 76%, rgba(120,60,180,.32), transparent 70%),
    linear-gradient(180deg, #131a2e 0%, #1a1630 52%, #120d1c 100%);
}
.hcard .pic.halloween::after {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.34) 0 3px, transparent 3px 58px),
    radial-gradient(circle at 34% 84%, rgba(255,146,30,.7) 0 5px, transparent 16px),
    radial-gradient(circle at 44% 88%, rgba(255,120,20,.55) 0 4px, transparent 13px),
    radial-gradient(circle at 62% 86%, rgba(255,170,40,.5) 0 4px, transparent 14px);
}
.hcard .cap {
  padding: 11px 13px; display: flex; align-items: center; gap: 9px;
  border-top: 1px solid var(--line);
}
.hcard .cap b { font: 600 12.5px var(--head); text-transform: uppercase;
  letter-spacing: .1em; }
.hcard .cap .tag { margin-left: auto; }

/* ------------------------------------------------- каталог техники */

.filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
  margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: 1px solid var(--line-2); background: var(--sunk); cursor: pointer;
  font: 600 10.5px var(--head); letter-spacing: .08em; color: var(--text-dim);
  text-transform: uppercase; transition: .12s;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.lvlchip { padding: 2px 6px; }
.chip.on { border-color: var(--amber); color: var(--amber);
  background: var(--amber-dim); }

.tanks { display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  max-height: 58vh; overflow: auto; padding-right: 6px; }
.tank {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid var(--line-2); background: rgba(35,42,51,.62);
  cursor: pointer; transition: .12s;
}
.tank:hover { border-color: var(--line-2); background: #1d232b; }
.tank.on { border-color: var(--amber); background: rgba(240,149,30,.09);
  box-shadow: inset 0 0 0 1px rgba(240,149,30,.4); }
.tank.hid { border-style: dashed; }
.tank.hid img.veh { opacity: .75; }
.tank img.veh { width: 74px; height: 42px; object-fit: contain; flex: none; }
.tank .nm { font-size: 12.5px; line-height: 1.25; font-weight: 600; }
.tank .sub { margin-top: 3px; font-size: 11px; color: var(--text-dim);
  display: flex; gap: 7px; align-items: center; }

/* ------------------------------------------------------- досье */

.veil {
  position: fixed; inset: 0; background: rgba(6,8,10,.76);
  backdrop-filter: blur(3px); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.veil.show { display: flex; }

.sheet {
  width: min(1120px, 100%); max-height: 92vh; overflow: auto;
  background: linear-gradient(180deg, #1c2128, #14181d);
  border: 1px solid var(--line-2); position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
  animation: pop .16s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.sheet::before, .sheet::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--amber); pointer-events: none;
}
.sheet::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sheet::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.sheet-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: linear-gradient(180deg, #20262e, #1a1f26); z-index: 2;
}
.sheet-head .ava {
  width: 46px; height: 46px; flex: none; display: flex;
  align-items: center; justify-content: center;
  border: 2px solid var(--amber); transform: rotate(45deg);
  color: var(--amber); font: 700 17px var(--head);
}
.sheet-head .ava span { transform: rotate(-45deg); }
/* Портрет экипажа из клиента (158x118) вместо буквы — в прямоугольной
   рамке: ромб срезал бы лицо. */
.sheet-head .ava.pic {
  transform: none; width: 84px; height: 63px; padding: 0; overflow: hidden;
  background: #0f1317;
}
.sheet-head .ava.pic img { width: 100%; height: 100%; object-fit: cover;
  display: block; }
.sheet-head h2 { margin: 0; font: 600 18px var(--head); }
.sheet-head .who { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.sheet-head .acts { margin-left: auto; display: flex; gap: 8px; }
.sheet-body { padding: 18px 20px 22px; }
.sheet-body > .tiles { margin-bottom: 16px; }
/* Досье: правая колонка — статистика, права и блокировка столбиком;
   левая («Учётные данные») тянется на ту же высоту, строки таблицы
   расходятся по ней, и под панелью нет пустоты. */
.sheet-body .stack { min-width: 0; }
.sheet-body .sheet-cols { align-items: stretch; }
.sheet-body .sheet-cols > .panel { display: flex; flex-direction: column; }
.sheet-body .sheet-cols > .panel > .body { flex: 1; display: flex;
  flex-direction: column; }
.sheet-body .sheet-cols > .panel > .body > .kv { flex: 1; }
.cfield.note { max-width: 320px; }
.cfield.note .cval { white-space: normal; word-break: break-word; }
.sheet-body .gfind { display: block; margin-bottom: 12px; }
.sheet-body .gfind em { font-style: normal; text-transform: none;
  letter-spacing: 0; margin-left: 6px; }

.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 7px 0; border-bottom: 1px solid rgba(43,50,59,.55);
  font-size: 12.5px; }
.kv td:first-child { color: var(--text-dim); width: 46%; }
.kv td:last-child { text-align: right; }

/* ------------------------------------------- поле с копированием

   Значение в рамке, значок копирования в правом верхнем углу — так,
   как это делают в блоках кода. Раньше рядом со значением стояла
   кнопка «Копировать», и в строке таблицы это выглядело как два
   разных элемента вместо одного поля.
*/

.kv td .cfield { margin-left: auto; }

.cfield { position: relative; display: inline-flex; align-items: center;
  min-width: 190px; max-width: 100%; gap: 10px;
  padding: 9px 68px 9px 11px; margin: 3px 0;
  background: var(--sunk); border: 1px solid var(--line);
  border-radius: 8px; text-align: left; }
.cfield:hover { border-color: var(--line-2); }
.cfield.empty { color: var(--text-dim2); padding-right: 11px;
  min-width: 0; }

.cfield .clabel { font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-dim2); }
.cfield .cval { font-size: 12.5px; color: var(--text);
  word-break: break-all; }
.cfield.secret .cval { letter-spacing: .12em; }

.cfield .cbtns { position: absolute; top: 5px; right: 5px;
  display: flex; gap: 2px; }
.cbtn { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--text-dim); cursor: pointer; }
.cbtn svg { width: 15px; height: 15px; }
.cbtn:hover { background: var(--panel-2); color: var(--text); }
.cbtn.ok { color: var(--green); }
.cbtn.pen:hover { color: var(--amber); }
.cfield .cval.dim { color: var(--text-dim); font-family: inherit; }

/* ------------------------------------------------------- модалки */

.modal .sheet { width: min(460px, 100%); }
.modal .sheet-body { font-size: 13px; line-height: 1.55; }
.modal .foot { display: flex; gap: 9px; justify-content: flex-end;
  margin-top: 18px; }

/* -------------------------------------------------------- тосты */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120;
  display: flex; flex-direction: column; gap: 9px; max-width: 420px; }
.toast {
  padding: 11px 14px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #232a32, #191e24);
  border-left: 3px solid var(--amber); font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
  animation: slide .18s ease-out;
}
.toast.ok  { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slide {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}

/* -------------------------------------------------------- журнал */

.log { border-left: 2px solid var(--line); padding-left: 14px; }
.log .item { padding: 9px 0; border-bottom: 1px solid rgba(43,50,59,.5);
  position: relative; }
.log .item::before {
  content: ''; position: absolute; left: -19px; top: 15px;
  width: 7px; height: 7px; background: var(--amber);
  transform: rotate(45deg);
}
.log .item.bad::before { background: var(--red); }
.log .when { font-size: 10.5px; color: var(--text-dim2); letter-spacing: .06em; }
.log .what { font: 600 11px var(--head); letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber); }
.log .txt { font-size: 12.5px; margin-top: 2px; }

@media (max-width: 860px) {
  .side { width: 60px; }
  .brand .txt, .nav a span, .side-foot { display: none; }
  .nav a { justify-content: center; padding: 12px 0; }
  .meta { display: none; }
}


/* ------------------------------------------------- подвал с правами */

.credit {
  margin-top: auto; padding: 18px 20px 22px; text-align: center;
  border-top: 1px solid var(--line); background: rgba(0,0,0,.28);
}
.credit img {
  height: 30px; width: auto; margin: 0 14px 8px; vertical-align: middle;
  opacity: .72; transition: .15s;
}
.credit img:hover { opacity: 1; }
.credit p {
  margin: 4px auto 0; max-width: 860px;
  font-size: 10.5px; line-height: 1.6; color: var(--text-dim2);
}
.credit b { color: var(--text-dim); font-weight: 600; }

/* ----------------------------------------------- лог кластера */

.term {
  max-height: 62vh; overflow: auto; background: #0b0e11;
  border: 1px solid var(--line); padding: 8px 10px;
  font: 12px/1.5 Consolas, "Courier New", monospace;
}
.term .ln {
  white-space: pre-wrap; word-break: break-word; color: #9aa5b2;
  padding: 1px 0;
}
.term .lvl-tag {
  display: inline-block; min-width: 68px; margin-right: 8px;
  font-size: 10px; letter-spacing: .08em; color: var(--text-dim2);
}
/* Цвета - как у консоли кластера в терминале Windows (start_cluster.sh,
   раскраска sed по уровню движка; палитра Campbell): красится вся
   строка, как там. */
.ln.lv-ERROR, .ln.lv-CRITICAL, .ln.lv-HACK, .ln.lv-ALERT {      /* 1;31m */
  color: #e74856; font-weight: 700; background: rgba(231,72,86,.08);
}
.ln.lv-WARNING           { color: #c19c00; }                    /* 33m   */
.ln.lv-INFO, .ln.lv-NOTICE { color: #3b78ff; }                  /* 94m   */
.ln.lv-DEBUG             { color: #13a10e; }                    /* 32m   */
.ln.lv-TRACE             { color: #b4009e; }                    /* 35m   */
.ln.lv-DONE              { color: #b4009e; font-weight: 700; }  /* 1;35m */
.term .ln .lvl-tag       { color: inherit; opacity: .75; }

.chip.lv-WARNING.on { border-color: var(--amber); color: var(--amber); }
.chip.lv-ERROR.on, .chip.lv-CRITICAL.on, .chip.lv-HACK.on {
  border-color: var(--red); color: #f0a496; background: rgba(224,83,63,.12);
}

/* ------------------------------------------------- личные резервы */
/* Иконки — файлы клиента (gui/maps/icons/boosters), поэтому никаких
   фильтров и подкрашиваний: показываем как есть. */
.bcards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
.bcard {
  display: flex; flex-direction: column; gap: 4px; padding: 14px;
  background: rgba(40,47,57,.6); border: 1px solid var(--line-2);
  position: relative; transition: .16s;
}
.bcard:hover { border-color: var(--amber); }
.bcard > b { font: 600 15px var(--head); }
.bcard > span { font-size: 12px; line-height: 1.45; }
.bhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px; min-height: 76px;
}
.bhead { justify-content: center; }
.bhead .bico { width: 76px; height: 76px; }
.bico { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; }
.bq { width: 18px; height: 18px; object-fit: contain; }
.brow { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.brow input {
  width: 58px; text-align: center; padding: 7px 6px;
  background: var(--sunk); color: var(--text);
  border: 1px solid var(--line-2);
}
.brow button { flex: 1; }

/* =================================================================== */
/*  Выезжающее боковое меню                                            */
/*  Меню больше не занимает место постоянно: оно лежит поверх страницы */
/*  и выезжает по кнопке с тремя полосками, а при выборе пункта        */
/*  уезжает обратно. `.main` при этом всегда во всю ширину, поэтому    */
/*  ничего не «прыгает» при открытии.                                  */
/* =================================================================== */
.side {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 70;
  transform: translateX(-100%);
  transition: transform .22s ease;
  box-shadow: 8px 0 28px rgba(0, 0, 0, .55);
}
body.menu .side { transform: none; }

.scrim {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(6, 8, 10, .55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
body.menu .scrim { opacity: 1; pointer-events: auto; }

.burger {
  /* Выше затемнения: иначе при открытом меню кнопка оказывалась под
     ним, и закрыть меню той же кнопкой было нельзя. */
  position: relative; z-index: 80;
  width: 38px; height: 34px; flex: none; padding: 0;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 4px; cursor: pointer;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-2);
}
.burger:hover { border-color: var(--amber); background: var(--amber-dim); }
.burger i {
  display: block; width: 17px; height: 2px; background: var(--text);
  transition: .15s;
}
.burger:hover i { background: var(--amber); }
body.menu .burger { border-color: var(--amber); background: var(--amber-dim); }
body.menu .burger i { background: var(--amber); }

/* =================================================================== */
/*  Фон вкладок панели.                                                 */
/*                                                                      */
/*  08.10.2026: вместо чертёжных листов — подложка экрана логина из     */
/*  клиента, gui/maps/login/__login_bg.png (лежит в admin_panel/        */
/*  «задний фон», пережата в assets/bg.jpg; старая рядом как            */
/*  bg.jpg.before-wot).                                                 */
/*                                                                      */
/*  Прозрачность подняли с 0.2 до 0.9 и убрали обесцвечивание. С        */
/*  чертежами двадцати процентов хватало: рисунок светлый и лез в       */
/*  глаза. Эта картинка — почти чёрная виньетка с еле заметной          */
/*  фактурой, при 0.2 её не видно вовсе, а при 0.9 она читается и       */
/*  тексту не мешает.                                                   */
/* =================================================================== */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: url('/static/assets/bg.jpg') center / cover no-repeat;
  opacity: .9;
  pointer-events: none;
}
body::after {
  /* Виньетка поверх картинки: края темнее, середина чуть светлее. */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(13,16,19,.35), rgba(10,13,16,.9) 78%);
}
/* ШАПКА ПРИЛИПАЕТ К ВЕРХУ ЭКРАНА.
   Было `position: relative`, то есть шапка уезжала вместе со страницей.
   На длинных вкладках (логи, танки, аккаунты) её уносило за край, а
   вместе с ней — единственную кнопку меню с тремя полосками: снаружи
   это выглядит как «кнопка исчезла и боковую панель не открыть».
   Со `sticky` шапка остаётся на месте при любой прокрутке. Фон у неё
   полупрозрачный с размытием, поэтому содержимое под ней читается как
   и раньше. */
.top { position: sticky; top: 0; z-index: 66; }

/* Плашка «премиум» больше не вылезает за рамку карточки: строка под
   названием переносится, а сама карточка не даёт содержимому её
   распирать (min-width: 0 у flex-элемента). */
.tank > div { min-width: 0; flex: 1; }
.tank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tank .sub { flex-wrap: wrap; row-gap: 4px; }
.tank .tag { white-space: nowrap; }


/* Панель занята действием: кнопки гаснут, курсор показывает ожидание.
   Само блокирование — в app.js (ACT_BUSY), здесь только вид. */
body.busy button,
body.busy .chip,
body.busy .hcard { opacity: .55; pointer-events: none; }
body.busy { cursor: progress; }
