/* ==========================================================================
   TLD DAYZ — стили сайта
   Тёмная «полевая» палитра: хаки, ржавчина, грязный песок.
   Разделы: переменные → база → шапка → hero → карточки → формы → админка
   ========================================================================== */

/* --- 1. Переменные --------------------------------------------------------- */
:root {
  --bg: #0e1113;
  --bg-2: #14181b;
  --panel: #191e21;
  --panel-2: #1f2528;
  --panel-3: #262d31;
  --line: #2c3438;
  --line-2: #3a4449;

  --text: #d7dbdc;
  --text-dim: #97a0a3;
  --text-mute: #6d7679;

  --accent: #c9a227;        /* латунь */
  --accent-2: #e0bb44;
  --danger: #b34a32;        /* ржавчина */
  --ok: #6ea04a;            /* хаки-зелёный */
  --info: #4ea1d3;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);

  --container: 1220px;
  --gap: 20px;
  --header-h: 68px;

  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
}

/* --- 1b. Темы оформления -----------------------------------------------------
   Переключаются атрибутом data-theme на <html> (см. App.applyTheme).
   accent-rgb — тот же акцент в формате "r, g, b" для rgba()-подложек.       */
:root { --accent-rgb: 201, 162, 39; }

[data-theme="emerald"] {
  --accent: #3fae6a;
  --accent-2: #58c983;
  --accent-rgb: 63, 174, 106;
  --ok: #58c983;
}

[data-theme="crimson"] {
  --accent: #cf4b4b;
  --accent-2: #e46a6a;
  --accent-rgb: 207, 75, 75;
  --danger: #e46a6a;
}

[data-theme="azure"] {
  --accent: #3f8ecf;
  --accent-2: #5aa9e4;
  --accent-rgb: 63, 142, 207;
  --info: #5aa9e4;
}

[data-theme="violet"] {
  --accent: #9a6ad4;
  --accent-2: #b189e0;
  --accent-rgb: 154, 106, 212;
}

[data-theme="sunset"] {
  --accent: #e8703a;
  --accent-2: #f28c5e;
  --accent-rgb: 232, 112, 58;
  --ok: #d9a441;
}

/* Сводка корзины в шапке магазина: клик открывает ящик корзины. */
.shop-cart-summary {
  display: block; text-align: right; cursor: pointer; font: inherit; color: inherit;
  background: none; border: 0; padding: 4px 2px; border-radius: var(--radius);
  transition: .15s;
}
.shop-cart-summary:hover { background: var(--panel-2); }
.shop-cart-summary .ico { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: var(--accent); }

/* Переключатель тем в админке: плитки-превью с цветами темы. */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme {
  display: block; text-align: left; cursor: pointer; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2);
  color: var(--text-dim); font-size: 13px; transition: border-color .12s ease, background .12s ease;
}
.theme:hover { border-color: var(--text-mute); color: var(--text); }
.theme.is-active { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); color: var(--text); }
.theme__swatches { display: flex; gap: 6px; margin-bottom: 8px; }
.theme__swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); }
.theme__name { font-weight: 600; color: var(--text); }
.theme__hint { display: block; font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* Панель «Фон сайта» в админке: превью + загрузка + режим + яркость. */
.bg-grid { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 18px; align-items: start; }
.bg-preview {
  position: relative; min-height: 120px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: var(--panel-2); overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.bg-preview img { width: 100%; height: auto; display: block; }
.bg-preview__empty { padding: 30px 16px; text-align: center; color: var(--text-mute); font-size: 13px; }
.bg-preview__remove { position: absolute; top: 8px; right: 8px; }
.bg-upload input[type="file"] { display: none; }
.bg-upload { margin-bottom: 14px; }
.bg-opacity { display: flex; align-items: center; gap: 12px; }
.bg-opacity input[type="range"] { flex: 1; accent-color: var(--accent); }
@media (max-width: 700px) { .bg-grid { grid-template-columns: 1fr; } }

/* --- 2. База --------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 78% -8%, rgba(var(--accent-rgb), .07), transparent 60%),
    radial-gradient(900px 420px at 8% 10%, rgba(78, 161, 211, .05), transparent 65%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Фон сайта из админки: data URL в --bg-image, режим в --bg-mode. */
body.has-bg::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image: var(--bg-image);
  background-size: var(--bg-size, cover);
  background-position: center;
  background-repeat: var(--bg-repeat, no-repeat);
  background-attachment: fixed;
  opacity: var(--bg-opacity, .28);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: 34px; text-transform: uppercase; letter-spacing: 1px; }
h2 { font-size: 24px; text-transform: uppercase; letter-spacing: .8px; }
h3 { font-size: 18px; }
h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.1em; }
li { margin-bottom: .3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd { font-family: var(--font-mono); font-size: .92em; background: var(--panel-3); padding: 1px 6px; border-radius: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding: 28px 0 60px; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #14181b; padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; color: #14181b; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #4a565c; }

/* --- 3. Хлебные элементы: точки статуса, бейджи ---------------------------- */
.dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  background: var(--text-mute); flex: none;
}
.dot--ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(110, 160, 74, .18); }
.dot--off { background: var(--danger); box-shadow: 0 0 0 3px rgba(179, 74, 50, .18); }
.dot--wait { background: var(--accent); animation: pulse 1.1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  background: var(--panel-3); color: var(--text-dim);
}
.badge--ok { background: rgba(110, 160, 74, .16); color: #9dc97c; }
.badge--warn { background: rgba(var(--accent-rgb), .16); color: var(--accent-2); }
.badge--danger { background: rgba(179, 74, 50, .18); color: #e08b76; }
.badge--info { background: rgba(78, 161, 211, .16); color: #86c8ee; }

/* --- 4. Верхняя служебная полоса ------------------------------------------ */
.topbar {
  background: #0a0c0e;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 36px; gap: 16px; }
.topbar__status { display: flex; align-items: center; gap: 8px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__status b { color: var(--text); font-weight: 600; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.topbar__link { color: var(--text-dim); }
.topbar__link:hover { color: var(--accent); }

/* Кнопки аккаунта в верхней полосе: вход/регистрация/админка/выйти/имя. */
.topbar__auth { display: flex; align-items: center; gap: 8px; }
.topbar__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: var(--text-dim); background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 999px;
  transition: .15s; white-space: nowrap;
}
.topbar__btn:hover { color: var(--text); border-color: var(--text-mute); background: var(--panel-3); }
.topbar__btn svg { flex: none; opacity: .85; }
.topbar__btn--accent { background: var(--accent); border-color: var(--accent); color: #14181b; }
.topbar__btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: #14181b; }
.topbar__user {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
  color: var(--accent); background: rgba(var(--accent-rgb), .1);
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 999px;
  white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.topbar__user svg { flex: none; }
.topbar__balance { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
.topbar__balance:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.topbar__balance svg { opacity: .8; }
.topbar__divider { width: 1px; height: 16px; background: var(--line-2); flex: none; }

/* --- 5. Шапка -------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(20, 24, 27, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.brand__mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  color: var(--accent); background: linear-gradient(160deg, #22282b, #15191c);
  border: 1px solid var(--line-2); border-radius: var(--radius);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 17px; letter-spacing: 1.4px; text-transform: uppercase; }
.brand__text strong span { color: var(--accent); margin-left: 5px; }
.brand__text small { font-size: 10.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .8px; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav__link {
  position: relative; padding: 9px 12px; font-size: 13.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); border-radius: var(--radius);
}
.nav__link:hover { color: var(--text); background: var(--panel-2); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--accent);
}

.header__right { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .badge {
  position: absolute; top: -7px; right: -7px; min-width: 19px;
  background: var(--danger); color: #fff; border-radius: 10px; padding: 2px 5px;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: currentColor; transition: .2s; }

/* --- 6. Hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(720px 360px at 50% -12%, rgba(var(--accent-rgb), .18), transparent 65%),
    radial-gradient(420px 240px at 12% 108%, rgba(78, 161, 211, .08), transparent 60%),
    linear-gradient(180deg, #171d20, #101416);
  padding: 64px 40px 46px;
  margin-bottom: 34px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px);
  opacity: .45;
}
.hero > * { position: relative; z-index: 1; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--accent); margin-bottom: 18px;
  padding: 7px 16px; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 999px;
  background: rgba(var(--accent-rgb), .08);
}
.hero__kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.hero h1 { font-size: 46px; max-width: 22ch; margin: 0 auto 16px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero__lead { max-width: 62ch; color: var(--text-dim); font-size: 16px; margin: 0 auto 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 30px; }

/* Ряд плашек-преимуществ под кнопками (как бейджи в hero у Luxel) */
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-dim);
}
.pill b { color: var(--text); font-weight: 700; }
.pill svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

.hero__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat {
  flex: 1 1 170px; max-width: 250px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px;
}
.stat__value { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); margin-top: 6px; }

/* --- 7. Кнопки ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; cursor: pointer; font: inherit; font-weight: 700; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: .7px; text-decoration: none;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: .15s;
}
.btn:hover { border-color: var(--text-mute); color: var(--text); background: var(--panel-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #14181b; }
.btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: #14181b; }
.btn--danger { background: rgba(179, 74, 50, .16); border-color: rgba(179, 74, 50, .6); color: #e08b76; }
.btn--danger:hover { background: rgba(179, 74, 50, .3); border-color: var(--danger); color: #f0a894; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 26px; font-size: 15px; }

/* --- 8. Панели, сетки, карточки ------------------------------------------- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
}
.panel--pad-lg { padding: 30px; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin: -22px -22px 20px; padding: 16px 22px;
  border-bottom: 1px solid var(--line); background: var(--panel-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.panel__head h2, .panel__head h3 { margin: 0; }

.section { margin-bottom: 34px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head .muted { font-size: 13px; }

/* Центрированный заголовок секции с «eyebrow» — как блоками у Luxel */
.section__intro { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.section__intro h2 { margin: 0 0 8px; }
.section__intro .muted { font-size: 14px; }
.eyebrow {
  display: block; margin-bottom: 10px;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.2px;
  color: var(--accent);
}

/* Карточки «Что вы получаете» — крупные, с большим номером 01/02 */
.benefit {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; position: relative; overflow: hidden; transition: .18s;
}
.benefit:hover { border-color: rgba(var(--accent-rgb), .5); transform: translateY(-2px); box-shadow: var(--shadow); }
.benefit__num {
  font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: 2px;
  color: transparent; -webkit-text-stroke: 1px rgba(var(--accent-rgb), .55);
}
.benefit h3 { margin: 0; font-size: 19px; }
.benefit p { margin: 0; color: var(--text-dim); font-size: 14px; }
.benefit__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Нумерованные шаги «Как это работает» */
.step-card {
  position: relative; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 20px 22px; transition: .18s;
}
.step-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.step-card__num {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px;
  font-size: 18px; font-weight: 800;
  color: var(--accent); background: rgba(var(--accent-rgb), .1);
  border: 1px solid rgba(var(--accent-rgb), .4); border-radius: 50%;
}
.step-card h3 { margin: 0 0 8px; font-size: 15.5px; text-transform: uppercase; letter-spacing: .6px; }
.step-card p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

/* Плитки «Почему выбирают» — иконка в квадрате + текст */
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; transition: .18s;
}
.feature:hover { border-color: rgba(var(--accent-rgb), .45); background: var(--panel-2); }
.feature__icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  color: var(--accent); background: rgba(var(--accent-rgb), .1);
  border: 1px solid rgba(var(--accent-rgb), .3); border-radius: var(--radius);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 7px; font-size: 15.5px; }
.feature p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

/* Финальный CTA-блок */
.cta {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: var(--radius-lg);
  background:
    radial-gradient(560px 260px at 50% -30%, rgba(var(--accent-rgb), .2), transparent 70%),
    linear-gradient(180deg, #1a2023, #111517);
  padding: 52px 30px;
}
.cta h2 { font-size: 28px; margin-bottom: 10px; }
.cta p { color: var(--text-dim); max-width: 56ch; margin: 0 auto 24px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--sidebar { grid-template-columns: 275px 1fr; align-items: start; }
.grid--admin { grid-template-columns: 230px 1fr; align-items: start; gap: 22px; }
/* Колонка контента не должна растягиваться широкими таблицами —
   иначе .table-wrap теряет внутренний скролл и страница растёт вширь. */
.grid--admin > :last-child { min-width: 0; }

/* Карточка товара */
.product {
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: .18s;
}
.product:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.product__visual {
  position: relative; height: 116px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--panel-3), var(--panel-2));
  border-bottom: 1px solid var(--line);
}
.product__visual svg { width: 46px; height: 46px; opacity: .9; }
.product__badge { position: absolute; top: 10px; left: 10px; }
.product__stock { position: absolute; top: 10px; right: 10px; font-size: 11px; }
.product__body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.product__cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); }
.product__title { font-size: 16px; font-weight: 700; margin: 0; }
.product__short { font-size: 13.5px; color: var(--text-dim); margin: 0; flex: 1; }
.product__feats { list-style: none; padding: 0; margin: 0; font-size: 12.8px; color: var(--text-dim); }
.product__feats li { display: flex; gap: 7px; margin-bottom: 4px; }
.product__feats svg { width: 13px; height: 13px; color: var(--ok); flex: none; margin-top: 4px; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price__now { font-size: 21px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.price__old { font-size: 13px; color: var(--text-mute); text-decoration: line-through; }

/* Карточка сервера */
.server { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.server__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.server__name { font-size: 16px; font-weight: 700; margin: 0 0 3px; display: flex; align-items: center; gap: 9px; }
.server__meta { font-size: 12.5px; color: var(--text-mute); font-family: var(--font-mono); }
.server__body { padding: 16px 18px; }
.server__note { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; }
.bar { height: 7px; background: var(--panel-3); border-radius: 4px; overflow: hidden; margin: 8px 0 14px; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--ok), #a8c977); transition: width .4s; }
.bar__fill--hot { background: linear-gradient(90deg, var(--accent), #e6c95f); }
.bar__fill--full { background: linear-gradient(90deg, var(--danger), #d1674e); }

.players { list-style: none; margin: 0; padding: 0; max-height: 250px; overflow: auto; font-size: 13px; }
.players li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.players li:last-child { border-bottom: 0; }
.players__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players__score { color: var(--text-mute); font-family: var(--font-mono); flex: none; }

/* Новости */
.news-item {
  display: flex; flex-direction: column; gap: 8px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); transition: .18s;
}
.news-item:hover { background: var(--panel-2); border-left-color: var(--accent-2); }
.news-item__date { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .8px; }
.news-item__title { font-size: 16.5px; font-weight: 700; margin: 0; color: var(--text); }
.news-item:hover .news-item__title { color: var(--accent); }
.news-item__text { font-size: 13.5px; color: var(--text-dim); margin: 0; }
.article { white-space: pre-line; color: var(--text-dim); font-size: 15px; line-height: 1.75; }

/* Таблица */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); max-width: 100%; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; max-width: 100%; table-layout: auto; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; min-width: 0; }
.table th { background: var(--panel-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-mute); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.actions { white-space: nowrap; text-align: right; }
.table .num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.table td.nowrap { white-space: nowrap; }

/* --- 9. Формы -------------------------------------------------------------- */
.field { margin-bottom: 15px; }
.field > label { display: block; margin-bottom: 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-dim); font-weight: 600; }
.field__hint { font-size: 12px; color: var(--text-mute); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--radius); transition: .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #101416; }
input::placeholder, textarea::placeholder { color: #5c6568; }
select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-dim); cursor: pointer; margin-bottom: 12px; }
.check input { margin-top: 2px; flex: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.row--tight { gap: 8px; }

.alert { padding: 11px 14px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 14px; border: 1px solid transparent; }
.alert--error { background: rgba(179, 74, 50, .13); border-color: rgba(179, 74, 50, .5); color: #e79c88; }
.alert--ok { background: rgba(110, 160, 74, .13); border-color: rgba(110, 160, 74, .45); color: #a4cd82; }
.alert--info { background: rgba(78, 161, 211, .1); border-color: rgba(78, 161, 211, .4); color: #8ccbee; }
.alert--warn { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .45); color: var(--accent-2); }

/* --- 10. Корзина (drawer) и модалки --------------------------------------- */
.drawer {
  position: fixed; top: 0; right: 0; z-index: 120;
  width: min(420px, 100vw); height: 100%;
  background: var(--panel); border-left: 1px solid var(--line-2);
  box-shadow: -20px 0 50px rgba(0, 0, 0, .55);
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { margin: 0; }
.drawer__body { flex: 1; overflow: auto; padding: 18px 20px; }
.drawer__foot { padding: 18px 20px; border-top: 1px solid var(--line); background: var(--panel-2); }

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__main { flex: 1; min-width: 0; }
.cart-line__title { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.cart-line__price { font-size: 12.5px; color: var(--text-mute); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.qty button { width: 26px; height: 26px; cursor: pointer; background: var(--panel-3); border: 0; color: var(--text); font-size: 15px; line-height: 1; }
.qty button:hover { background: var(--line-2); }
.qty span { min-width: 30px; text-align: center; font-size: 13px; font-family: var(--font-mono); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 7px; }
.sum-row--total { font-size: 18px; font-weight: 700; padding-top: 9px; border-top: 1px solid var(--line); margin-top: 9px; }
.sum-row--total .val { color: var(--accent); }

/* --- 10.1 Быстрая покупка (модалка «Купить», в стиле Luxel) ----------------- */
.qb__top { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.qb__thumb {
  width: 76px; height: 76px; flex: none; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(150deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center;
}
.qb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qb__thumb svg { width: 34px; height: 34px; color: var(--accent); opacity: .85; }
.qb__meta { min-width: 0; }
.qb__cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); }
.qb__title { font-size: 16.5px; font-weight: 700; margin: 3px 0 2px; }
.qb__price { font-size: 13.5px; color: var(--text-dim); font-family: var(--font-mono); }
.qb__row { margin-bottom: 14px; }
.qb__label { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-mute); font-weight: 700; margin-bottom: 7px; }
.qb__stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.qb__stepper button { width: 40px; height: 40px; cursor: pointer; background: var(--panel-3); border: 0; color: var(--text); font-size: 19px; line-height: 1; }
.qb__stepper button:hover:not(:disabled) { background: var(--line-2); color: var(--accent); }
.qb__stepper button:disabled { opacity: .4; cursor: default; }
.qb__stepper span { min-width: 52px; text-align: center; font-size: 16px; font-weight: 700; font-family: var(--font-mono); }
.qb__unit { margin-left: 12px; font-size: 13px; color: var(--text-mute); }
.qb__methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.qb__method {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2);
  color: var(--text-dim); font-size: 13px; text-align: left; transition: border-color .12s ease, background .12s ease;
}
.qb__method:hover { border-color: var(--text-mute); color: var(--text); }
.qb__method.is-active { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); color: var(--text); }
.qb__method-ico { flex: none; display: inline-flex; color: var(--accent); }
.qb__method small { display: block; font-size: 11px; color: var(--text-mute); }
.qb__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 2px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.qb__total .k { font-size: 13.5px; color: var(--text-dim); }
.qb__total .v { font-size: 26px; font-weight: 800; font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
.qb__uid { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; }
.qb__uid code { font-size: 12.5px; color: var(--text); word-break: break-all; }
.qb__uid .link-btn { margin-left: auto; flex: none; background: none; border: 0; cursor: pointer; color: var(--accent); font-size: 12.5px; padding: 0; text-decoration: underline; }
.qb__uid .link-btn:hover { color: var(--accent-2); }
@media (max-width: 520px) {
  .qb__methods { grid-template-columns: 1fr 1fr; }
  .qb__total .v { font-size: 22px; }
}

.modal {
  position: fixed; inset: 0; z-index: 140; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 8, 9, .78); backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }
.modal__box {
  width: min(640px, 100%); max-height: 88vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.modal__head h3 { margin: 0; }
.modal__body { padding: 20px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.close-x { background: none; border: 0; color: var(--text-mute); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.close-x:hover { color: var(--danger); }

/* --- 11. Уведомления ------------------------------------------------------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13.5px;
  animation: slide-in .22s ease;
}
.toast--ok { border-left-color: var(--ok); }
.toast--error { border-left-color: var(--danger); }
.toast--info { border-left-color: var(--info); }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }

/* --- 12. Админка ----------------------------------------------------------- */
.admin-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--header-h) + 16px); }
.admin-nav__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; text-align: left;
}
.admin-nav__item:hover { background: var(--panel); color: var(--text); }
.admin-nav__item.is-active { background: var(--panel-2); border-color: var(--line-2); color: var(--accent); }
.admin-nav__item .count { margin-left: auto; font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); }

.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.metric__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); margin-bottom: 8px; }
.metric__value { font-size: 26px; font-weight: 700; line-height: 1; }
.metric__sub { font-size: 12px; color: var(--text-mute); margin-top: 6px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 26px; }
.chart__bar { width: 100%; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), .25)); border-radius: 2px 2px 0 0; min-height: 2px; }
.chart__label { font-size: 10px; color: var(--text-mute); font-family: var(--font-mono); }

.status-select { min-width: 140px; }

/* --- 13. Прочее ------------------------------------------------------------ */
.boot { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 90px 0; color: var(--text-mute); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 40px 20px; text-align: center; color: var(--text-mute); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty__title { font-size: 16px; color: var(--text-dim); margin: 0 0 6px; }

.breadcrumbs { font-size: 12.5px; color: var(--text-mute); margin-bottom: 16px; }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs span { margin: 0 7px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  padding: 9px 15px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; white-space: nowrap;
  color: var(--text-mute); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-dim); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; transition: .15s;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #14181b; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: 13.5px; }
.kv dt { color: var(--text-mute); }
.kv dd { margin: 0; font-family: var(--font-mono); word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 1px solid var(--line-2); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -4.5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline time { display: block; font-size: 11.5px; color: var(--text-mute); }

.acc { display: flex; flex-direction: column; gap: 8px; }
.acc__item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); background: none; border: 0; text-align: left; }
.acc__q:hover { color: var(--accent); }
.acc__q::after { content: "+"; font-size: 20px; color: var(--text-mute); transition: .2s; }
.acc__item.is-open .acc__q::after { transform: rotate(45deg); color: var(--accent); }
.acc__a { display: none; padding: 0 16px 15px; font-size: 13.5px; color: var(--text-dim); }
.acc__item.is-open .acc__a { display: block; }

.rules h3 { margin-top: 26px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.rules ol { padding-left: 1.3em; }

/* --- 13b. Поддержка: тикеты и переписка ------------------------------------ */
.badges { display: inline-flex; gap: 5px; align-items: center; }

.tickets { display: flex; flex-direction: column; gap: 10px; }
.ticket {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: .15s;
}
.ticket:hover { border-color: var(--line-2); }
.ticket.is-new { border-left: 3px solid var(--accent); }
.ticket__main { display: block; color: inherit; }
.ticket__top { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-size: 12px; margin-bottom: 6px; }
.ticket__subject { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ticket__main:hover .ticket__subject { color: var(--accent); }
.ticket__preview {
  font-size: 12.5px; color: var(--text-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ticket__meta { font-size: 11.5px; text-align: right; line-height: 1.7; white-space: nowrap; }

.thread { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.msg { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; }
.msg--me { border-left: 3px solid var(--accent); }
.msg--admin { background: rgba(var(--accent-rgb), .07); border-color: rgba(var(--accent-rgb), .3); }
.msg--internal {
  background: rgba(96, 165, 250, .06); border: 1px dashed rgba(96, 165, 250, .4);
  font-size: 12.5px; color: var(--text-dim);
}
.msg__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.msg__author { font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.msg__author--admin { color: var(--accent); }
.msg__time { font-size: 11.5px; color: var(--text-mute); font-family: var(--font-mono); }
.msg__edited { font-size: 11px; color: var(--text-mute); font-style: italic; }
.msg__text { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg__files { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.msg__files a { font-size: 12px; font-family: var(--font-mono); color: var(--info); word-break: break-all; }
.msg__foot { margin-top: 8px; }

.stars { display: flex; gap: 4px; margin: 8px 0 12px; }
.stars__star { font-size: 24px; line-height: 1; cursor: pointer; background: none; border: 0; padding: 0 2px; color: var(--line-2); }
.stars__star.is-on, .stars__star:hover { color: var(--accent); }

.admin-nav__count {
  margin-left: auto; min-width: 20px; padding: 1px 6px; text-align: center;
  font-size: 11px; font-weight: 700; font-family: var(--font-mono);
  background: var(--danger); color: #fff; border-radius: 10px;
}
.table-wrap tr.is-new td:first-child { position: relative; }
.ticket-modal .kv { margin-bottom: 14px; }
.ticket-modal .field textarea { width: 100%; }
.topbar__link .badge { margin-left: 6px; vertical-align: middle; }

/* --- 13c. Фотографии товаров ----------------------------------------------- */

.product__visual--photo { background: #12161a; }
.product__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.product__visual--photo .product__badge,
.product__visual--photo .product__stock { z-index: 1; }
.product__visual--photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
}
.product__shots {
  position: absolute; bottom: 8px; right: 10px; z-index: 1;
  padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 700;
  background: rgba(8, 10, 12, .72); color: #fff; font-family: var(--font-mono);
}

/* Галерея в карточке товара (модалка) */
.gallery { margin: 0 0 16px; }
.gallery__main {
  display: block; width: 100%; max-height: 320px; object-fit: cover;
  background: #12161a; border: 1px solid var(--line); border-radius: var(--radius);
}
.gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gallery__thumb {
  width: 64px; height: 48px; padding: 0; overflow: hidden; cursor: pointer;
  background: #12161a; border: 1px solid var(--line); border-radius: 6px; transition: .15s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb:hover { border-color: var(--line-2); }
.gallery__thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Превью в таблице админки */
.thumb {
  width: 46px; height: 34px; object-fit: cover; flex: none;
  background: #12161a; border: 1px solid var(--line); border-radius: 6px;
}
.thumb--empty { display: inline-grid; place-items: center; }
.thumb--empty svg { width: 22px; height: 22px; opacity: .8; }

/* Поле загрузки фото в форме админки */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 10px; }
.shots[hidden] { display: none; }
.shot { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #12161a; }
.shot img { display: block; width: 100%; height: 78px; object-fit: cover; }
.shot--cover { border-color: var(--accent); }
.shot__cover {
  position: absolute; left: 5px; top: 5px; padding: 1px 6px; border-radius: 9px;
  font-size: 10px; font-weight: 700; background: var(--accent); color: #17120a;
}
.shot__remove, .shot__to-cover {
  position: absolute; top: 4px; width: 22px; height: 22px; padding: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  background: rgba(8, 10, 12, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px;
}
.shot__remove { right: 4px; }
.shot__remove:hover { background: var(--danger); border-color: var(--danger); }
.shot__to-cover { right: 30px; color: var(--accent); }
.shot__to-cover:hover { background: var(--accent); color: #17120a; }
.shots-field > label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.shots__add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 14px; cursor: pointer; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--text-dim); transition: .15s;
}
.shots__add:hover { border-color: var(--accent); color: var(--text); background: var(--panel-2); }
.shots__add[hidden] { display: none; }
.shots__add svg { color: var(--text-mute); }
.shots__add-text { font-size: 13px; font-weight: 600; }
.shots__add-hint { font-size: 11.5px; color: var(--text-mute); }
.shots__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* --- 13d. Внутренний баланс ------------------------------------------------- */

.wallet__sum {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.wallet__info { min-width: 200px; }
.wallet__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); margin-bottom: 4px;
}
.wallet__value {
  font-size: 32px; font-weight: 800; line-height: 1.1; color: var(--accent);
  font-family: var(--font-mono); margin-bottom: 6px;
}
.wallet__topup { flex: none; display: inline-flex; align-items: center; gap: 8px; }

.wallet-ops { display: flex; flex-direction: column; gap: 2px; }
.wallet-op {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.wallet-op:last-child { border-bottom: 0; }
.wallet-op__main { min-width: 0; }
.wallet-op__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 3px; }
.wallet-op__title .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.wallet-op__time { font-size: 11.5px; color: var(--text-mute); font-family: var(--font-mono); }
.wallet-op__right { text-align: right; flex: none; }
.wallet-op__sum { font-size: 15px; font-weight: 700; }

.quick-sums { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }

.topbar__sound {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 5px;
  color: var(--accent); cursor: pointer;
}
.topbar__sound:hover { border-color: var(--line); color: var(--accent); }
.topbar__sound.is-off { color: var(--text-mute); }
.topbar__sound:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* --- 13e. Оплата через ЮMoney ---------------------------------------------- */
.pay__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pay__sum { font-size: 30px; font-weight: 700; font-family: var(--font-mono); color: var(--accent); }
.pay .boot { display: flex; justify-content: center; padding: 14px 0 6px; }
.pay .alert { margin: 0 0 8px; }
.pay__hint { font-size: 12.5px; color: var(--text-mute); margin: 6px 0 0; line-height: 1.5; }

/* --- 14. Футер ------------------------------------------------------------- */
.footer { background: #0a0c0e; border-top: 1px solid var(--line); margin-top: auto; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 30px; padding: 40px 20px 26px; }
.footer__logo { font-size: 17px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 10px; }
.footer__note { font-size: 12.5px; color: var(--text-mute); margin: 0; max-width: 42ch; }
.footer h4 { margin-bottom: 12px; }
.footer a { display: block; padding: 3px 0; font-size: 13.5px; color: var(--text-dim); }
.footer a:hover { color: var(--accent); }
.footer__social { display: flex; flex-direction: column; gap: 2px; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-mute);
}

/* --- 15. Адаптив ----------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--sidebar { grid-template-columns: 1fr; }
  .grid--admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .admin-nav__item { white-space: nowrap; }
  .admin-nav__item .count { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: calc(36px + var(--header-h)) 0 auto 0; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line-2);
    padding: 8px 16px 14px; display: none; max-height: calc(100vh - 100px); overflow: auto;
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 10px; border-bottom: 1px solid var(--line); }
  .nav__link.is-active::after { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 40px 22px 30px; }
  .hero h1 { font-size: 30px; }
  .topbar__link { display: none; }
  .topbar__actions { gap: 6px; }
  .topbar__btn, .topbar__user { padding: 4px 9px; font-size: 11.5px; }
  .topbar__balance, .topbar__divider { display: none; }
  .cta { padding: 38px 20px; }
  .cta h2 { font-size: 22px; }
}

@media (max-width: 620px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 25px; }
  .hero__stats { gap: 18px; }
  .stat__value { font-size: 22px; }
  .panel { padding: 16px; }
  .panel__head { margin: -16px -16px 16px; padding: 14px 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 22px; padding: 30px 20px 20px; }
  .drawer { width: 100vw; }
  .brand__text small { display: none; }
  .table th, .table td { padding: 8px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .header, .footer, .drawer, .modal, .toasts, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
