/* FurryChat — веб-панель. Стиль thefurry.store: чёрный фон, синий градиент, Unbounded + Inter. */

:root {
  color-scheme: dark;
  --page: #000000;
  --surface: #0c0c0e;
  --surface-2: #141417;
  --surface-3: #1c1c20;
  --ink: #ffffff;
  --ink-2: #c9c9d1;
  --muted: #9a9aa3;
  --dim: #5c5c63;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --grid: #1f1f23;
  --axis: #2a2a2e;
  --hover: rgba(255, 255, 255, 0.04);
  --brand: #198cff;
  --brand-soft: rgba(25, 140, 255, 0.10);
  --brand-line: rgba(25, 140, 255, 0.40);
  --gradient: linear-gradient(180deg, #0a3fff 0%, #1797ff 100%);
  --glow: 0 6px 22px rgba(23, 151, 255, 0.30);
  /* цвета рядов графиков — проверены валидатором на фоне #0c0c0e */
  --s1: #198cff;
  --s2: #d9651f;
  --good: #3ecf6e;
  --warning: #e8a33d;
  --serious: #ef8354;
  --critical: #ff4f4f;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: rgba(25, 140, 255, 0.35); }

.noscript { padding: 24px; text-align: center; }

/* ---------- фон: сетка и синее свечение (единственный яркий элемент) ---------- */
.backdrop { position: relative; isolation: isolate; }
.backdrop::before,
.backdrop::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.backdrop::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 0%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 100% at 50% 0%, #000 15%, transparent 75%);
}
.backdrop::after {
  background:
    radial-gradient(ellipse 45% 85% at 50% 0%, rgba(10, 63, 255, 0.42), transparent 70%),
    radial-gradient(ellipse 22% 38% at 50% 0%, rgba(23, 151, 255, 0.40), transparent 75%);
  animation: glow-in 0.9s ease-out both;
}
@keyframes glow-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- загрузка ---------- */
.boot {
  min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px;
  color: var(--muted);
}
.boot-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--gradient); box-shadow: var(--glow);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(0.88); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) {
  .boot-mark, .live-dot::after, .fresh, .backdrop::after { animation: none !important; }
}

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 48px 16px; }
.login-card {
  width: 100%; max-width: 440px; background: rgba(12, 12, 14, 0.86); border: 1px solid var(--line);
  border-radius: 24px; padding: 32px 28px; display: grid; gap: 22px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.login-brand { display: grid; gap: 12px; justify-items: start; }
.login-brand img { width: 40px; height: 40px; }
.login-brand h1 {
  font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1.15;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.login-brand p { color: var(--muted); }
.login-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.login-steps li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 14px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); counter-increment: step;
  color: var(--ink-2);
}
.login-steps li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--gradient);
  display: grid; place-items: center; font-family: var(--display); font-weight: 500; font-size: 12px; color: #fff;
}
code.cmd {
  font-family: var(--mono); font-size: 13px; background: var(--surface-3); padding: 2px 7px; border-radius: 6px;
  color: var(--ink); border: 1px solid var(--line); white-space: nowrap;
}
.login-divider { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-error {
  padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 79, 79, 0.10);
  border: 1px solid rgba(255, 79, 79, 0.30); color: #ff8a8a; font-size: 13px;
}
.login-foot { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 30; min-height: var(--header-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 0 24px; background: rgba(0, 0, 0, 0.72); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; justify-self: start; }
.brand img { width: 30px; height: 30px; flex: 0 0 auto; }
.brand .word { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand .word b { font-weight: 500; color: var(--brand); }

.nav-slot { min-width: 0; display: flex; justify-content: center; }
.nav {
  flex: none; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); position: relative;
}
.nav > a[hidden], .nav-menu a[hidden], .nav-more[hidden] { display: none; }
.nav > a, .nav-more {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap;
  transition: color 0.15s;
}
.nav > a:hover, .nav-more:hover { color: var(--ink); }
.nav > a[aria-current="page"], .nav-more.has-current { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.nav svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav.compact > a, .nav.compact .nav-more { padding: 0 11px; }
.nav.compact > a .label { display: none; }
.nav.compact > a[aria-current="page"] .label { display: inline; }
.nav-more { border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 500; font-size: 13px; }
.nav-more .chev { width: 14px; height: 14px; transition: transform 0.15s; }
.nav-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 230px; display: grid; gap: 2px; padding: 6px;
  border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}
.nav-menu a {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--hover); color: var(--ink); }
.nav-menu a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav-menu svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-menu .nav-badge { margin-left: auto; }

.header-side { display: flex; align-items: center; gap: 10px; justify-self: end; min-width: 0; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); min-width: 0;
}
.user-chip .avatar { border-radius: 50%; }
.user-chip .who { min-width: 0; line-height: 1.25; }
.user-chip strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-chip .role { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-chip .btn { border-radius: 50%; }

/* ---------- заголовок страницы ---------- */
.page-head { padding: 44px 24px 34px; border-bottom: 1px solid var(--line); }
.page-head-inner {
  max-width: 1320px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.page-head-top { max-width: 1320px; margin: 0 auto; }
.page-head .head-main { display: flex; align-items: center; gap: 22px; min-width: 0; flex: 1 1 420px; }
.page-head .lead { flex: 0 0 auto; }
.page-head .titles { min-width: 0; }
.page-head h1 {
  font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.page-head .sub { color: var(--muted); margin-top: 10px; font-size: 15px; max-width: 70ch; }
.page-head .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; min-width: 0; }
.page-head .titles, .page-head .head-main { min-width: 0; }
.page-head .meta-row:empty { display: none; }
.status-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.main { max-width: 1320px; margin: 0 auto; padding: 24px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
  white-space: nowrap;
}
.pill strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.version {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 11px; white-space: nowrap;
  max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}

.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: 0 0 auto; }
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--good);
  opacity: 0; animation: ping 2s ease-out infinite;
}
.live-dot.off { background: var(--dim); }
.live-dot.off::after { display: none; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- элементы ---------- */
/* Кнопки — «таблетки» с кромкой, подсвеченной сверху, как стекло под светом: так они перекликаются с меню и сайтом */
.btn {
  --fill: var(--surface-2); --edge-top: rgba(255, 255, 255, 0.15); --edge-bottom: rgba(255, 255, 255, 0.03);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; color: var(--ink);
  background: linear-gradient(var(--fill), var(--fill)) padding-box,
    linear-gradient(180deg, var(--edge-top), var(--edge-bottom)) border-box;
  cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease, color 0.15s ease;
}
.btn:hover { --fill: var(--surface-3); --edge-top: rgba(255, 255, 255, 0.32); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; filter: none; box-shadow: none; }
.btn.primary {
  color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  background: linear-gradient(180deg, #3a6bff 0%, #0a3fff 52%, #1797ff 100%) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.04)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 26px -10px rgba(23, 151, 255, 0.75);
}
.btn.primary:hover { filter: brightness(1.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 12px 32px -10px rgba(23, 151, 255, 0.95); }
.btn.danger { --fill: rgba(255, 79, 79, 0.07); --edge-top: rgba(255, 130, 130, 0.5); --edge-bottom: rgba(255, 79, 79, 0.08); color: #ff8f8f; }
.btn.danger:hover { --fill: rgba(255, 79, 79, 0.15); --edge-top: rgba(255, 150, 150, 0.75); color: #ffb3b3; }
.btn.danger.solid {
  color: #fff;
  background: linear-gradient(180deg, #ff7272 0%, #e23d3d 100%) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.04)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 26px -12px rgba(255, 79, 79, 0.8);
}
.btn.danger.solid:hover { filter: brightness(1.08); }
.btn.ghost { --fill: transparent; --edge-top: transparent; --edge-bottom: transparent; color: var(--muted); }
.btn.ghost:hover { --fill: var(--hover); --edge-top: rgba(255, 255, 255, 0.1); color: var(--ink); }
.btn.ghost.danger { color: #ff8f8f; }
.btn.ghost.danger:hover { --fill: rgba(255, 79, 79, 0.1); --edge-top: rgba(255, 130, 130, 0.4); color: #ffb3b3; }
.btn.small { height: 32px; padding: 0 14px; font-size: 12px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.small { width: 32px; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active:not(:disabled) { transform: none; } }

.input, .select, .textarea {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background-color: var(--surface); min-width: 0; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.select {
  padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 999px; padding-left: 16px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { background: var(--surface-2); }
.input[type="date"] { color-scheme: dark; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 96px; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25, 140, 255, 0.22);
}
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--dim); }
.search .input { padding-left: 38px; width: 100%; border-radius: 999px; }

.seg {
  display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); gap: 2px;
  border: 1px solid var(--line); flex-wrap: wrap;
}
.seg button {
  border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--gradient); color: #fff; box-shadow: var(--glow); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .spacer { flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
  border: 1px solid var(--line);
}
.badge .ic { font-size: 11px; line-height: 1; }
.badge.critical { background: rgba(255, 79, 79, 0.10); border-color: rgba(255, 79, 79, 0.28); color: #ff8a8a; }
.badge.warning { background: rgba(232, 163, 61, 0.10); border-color: rgba(232, 163, 61, 0.28); color: var(--warning); }
.badge.serious { background: rgba(239, 131, 84, 0.10); border-color: rgba(239, 131, 84, 0.28); color: var(--serious); }
.badge.good { background: rgba(62, 207, 110, 0.10); border-color: rgba(62, 207, 110, 0.28); color: var(--good); }
.badge.accent { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }

.avatar {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; background: var(--surface-3);
  image-rendering: pixelated; object-fit: cover; display: grid; place-items: center;
  font-weight: 600; color: var(--ink-2); font-size: 13px; position: relative;
}
.avatar.lg { width: 84px; height: 84px; border-radius: 18px; font-size: 30px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; }
.avatar.md { width: 44px; height: 44px; border-radius: 11px; font-size: 17px; }
.avatar.body { width: 76px; height: 152px; border-radius: 14px; object-fit: contain; background: var(--surface-2); image-rendering: pixelated; }
.avatar-wrap { position: relative; flex: 0 0 auto; display: inline-block; }

/* 3D-модель скина в шапке профиля */
.skin3d {
  position: relative; display: grid; place-items: center; min-width: 96px;
  border-radius: 18px; background: radial-gradient(60% 55% at 50% 45%, rgba(25, 140, 255, 0.16), transparent 70%);
}
.skin3d-canvas { display: block; cursor: grab; touch-action: none; outline: none; }
.skin3d-canvas:active { cursor: grabbing; }
.skin3d > .dot {
  position: absolute; right: 8px; bottom: 10px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 3px var(--bg, #000);
}
.skin3d > .avatar-wrap { margin: 8px; }
.skin3d-hint {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap;
  font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px; pointer-events: none; transition: opacity 0.3s ease;
}
.skin3d-hint[hidden] { display: block; opacity: 0; }

/* новая версия панели, а в редакторе есть несохранённые правки */
.update-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 12px; max-width: min(640px, calc(100vw - 32px));
  padding: 10px 12px 10px 16px; border-radius: var(--radius-sm); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--brand-line); color: var(--ink);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.avatar-wrap .dot {
  position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 2px var(--surface);
}

.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- карточки и сетки ---------- */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.wide-narrow { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-head h2 { font-family: var(--display); font-size: 16px; font-weight: 500; letter-spacing: -0.005em; }
.card-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.card-body { padding: 14px 20px 20px; }
.card-body.flush { padding: 10px 0 6px; }

/* полоса показателей с разделителями */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat {
  padding: 18px 20px; display: grid; gap: 6px; align-content: start; min-width: 0;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value {
  font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; overflow-wrap: break-word;
}
.stat .value small { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.stat .sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.delta.up { color: var(--good); }
.delta.down { color: #ff8a8a; }

/* ---------- графики ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .tick.peak { fill: var(--ink-2); }
.chart .bar { transition: opacity 0.12s; pointer-events: none; }
.chart text { pointer-events: none; }
.chart .hit { fill: transparent; cursor: default; pointer-events: all; }
.chart .bar.active { opacity: 0.7; }
.chart svg:focus-visible { outline-offset: 4px; border-radius: 6px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.chart-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart-table th, .chart-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--grid); }
.chart-table th { color: var(--muted); font-weight: 500; }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { max-height: 280px; overflow: auto; }

.barlist { display: grid; gap: 12px; }
.barlist .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; }
.barlist a.name:hover { color: var(--brand); }
.barlist .name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.barlist .value { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; font-size: 13px; }
.barlist .track { grid-column: 1 / -1; height: 6px; }
.barlist .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; min-width: 130px; max-width: 280px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); padding: 9px 11px; font-size: 12px;
}
.tooltip .t-title { color: var(--muted); margin-bottom: 4px; }
.tooltip .t-row { display: flex; align-items: center; gap: 8px; }
.tooltip .t-row b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip .t-row span { color: var(--ink-2); }
.tooltip .key { width: 12px; height: 2px; border-radius: 1px; flex: 0 0 auto; }

/* ---------- списки ---------- */
.list { display: grid; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px; min-width: 0;
  border-top: 1px solid var(--grid);
}
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--hover); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { font-size: 12px; color: var(--muted); }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: var(--hover); }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
.player-cell { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.player-cell strong { font-weight: 600; }

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px;
  flex-wrap: wrap; border-top: 1px solid var(--line);
}

/* ---------- чат ---------- */
.chat-list { display: grid; }
.chat-line {
  display: grid; grid-template-columns: 76px 96px minmax(0, 1fr) auto; gap: 12px; padding: 8px 20px;
  border-top: 1px solid var(--grid); align-items: baseline;
}
.chat-line:first-child { border-top: 0; }
.chat-line:hover { background: var(--hover); }
.fresh { animation: fresh 1.8s ease-out; }
@keyframes fresh { from { background: rgba(25, 140, 255, 0.16); } to { background: transparent; } }
.chat-line .time { color: var(--dim); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.chat-line .text { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.chat-line .author { font-weight: 600; margin-right: 6px; color: var(--ink); }
.chat-line a.author:hover { text-decoration: underline; }
.chat-line .event { color: var(--muted); }
.chan {
  font-size: 11px; font-weight: 500; height: 20px; padding: 0 8px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-self: start; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chan.GLOBAL { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.chan.ADMIN, .chan.PM { background: rgba(255, 79, 79, 0.08); border-color: rgba(255, 79, 79, 0.28); color: #ff8a8a; }
.chan.PARTY { color: var(--warning); border-color: rgba(232, 163, 61, 0.28); }
.chan.EVENT { background: transparent; border-color: transparent; color: var(--dim); padding-left: 0; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; height: 30px; padding: 0 13px; border-radius: 999px;
  cursor: pointer; font-size: 12px; font-weight: 500; color: var(--muted);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* ---------- профиль ---------- */
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head .who { flex: 1; min-width: 220px; display: grid; gap: 10px; }
.profile-head .facts { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; align-items: center; }
.profile-head .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; }

.timeline { display: grid; }
.event-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 14px 20px; border-top: 1px solid var(--grid); }
.event-row:first-child { border-top: 0; }
.event-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.event-icon.critical { background: rgba(255, 79, 79, 0.08); border-color: rgba(255, 79, 79, 0.25); color: #ff8a8a; }
.event-icon.warning { background: rgba(232, 163, 61, 0.08); border-color: rgba(232, 163, 61, 0.25); color: var(--warning); }
.event-icon.serious { background: rgba(239, 131, 84, 0.08); border-color: rgba(239, 131, 84, 0.25); color: var(--serious); }
.event-icon.good { background: rgba(62, 207, 110, 0.08); border-color: rgba(62, 207, 110, 0.25); color: var(--good); }
.event-row .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.event-row .head strong { font-weight: 600; }
.event-row .head a:hover strong { color: var(--brand); }
.event-row .when { color: var(--dim); font-size: 12px; margin-left: auto; white-space: nowrap; }
.event-row .details { color: var(--muted); font-size: 13px; margin-top: 3px; }
.quote {
  margin-top: 8px; padding: 7px 12px; border-left: 2px solid var(--brand); background: var(--surface-2);
  border-radius: 0 10px 10px 0; font-size: 13px; overflow-wrap: anywhere; color: var(--ink-2);
}

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding: 0 14px; overflow-x: auto; overflow-y: hidden; }
.tabs button {
  border: 0; background: none; padding: 16px 8px 14px; cursor: pointer; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- формы ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-weight: 600; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
.field > .seg { justify-self: start; }
.check { display: inline-flex; gap: 9px; align-items: center; cursor: pointer; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; cursor: pointer; }

/* ---------- логи ---------- */
.log-month-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.log-month + .log-month .log-month-head { border-top: 1px solid var(--line); }
.log-month-head h3 { font-family: var(--display); font-weight: 500; font-size: 14px; }
.log-day {
  display: grid; grid-template-columns: 22px minmax(170px, 1.2fr) minmax(90px, 2fr) 90px 36px; gap: 14px;
  align-items: center; padding: 8px 20px; border-top: 1px solid var(--grid);
}
.log-month-head + .log-day { border-top: 0; }
.log-day:hover { background: var(--hover); }
.log-day.selected { background: var(--brand-soft); }
.log-day .date { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.log-day .date strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.log-day .size { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.log-day .track { height: 6px; }
.log-day .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.selection-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 10px 10px 10px 20px; border-radius: 999px;
  background: rgba(20, 20, 23, 0.92); border: 1px solid var(--brand-line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cleanup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- объявление ---------- */
.mc-preview {
  border-radius: 14px; padding: 22px; min-height: 170px; display: grid; place-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(45deg, #3d5a27 0 12px, #395524 12px 24px);
}
.mc-toast {
  width: 280px; min-height: 60px; background: #212121; border: 2px solid #555; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #0f0f0f, 0 6px 18px rgba(0, 0, 0, 0.35);
  display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 8px 10px; align-items: center;
  font-family: var(--mono); font-size: 12px; color: #fff; text-shadow: 1px 1px 0 #3f3f3f;
}
.mc-toast .icon { width: 32px; height: 32px; border-radius: 4px; background: #8b8b8b; display: grid; place-items: center; font-size: 18px; }
.mc-toast .hdr { color: #ffff00; }
.mc-toast.challenge .hdr { color: #ff88ff; }
.mc-chat { width: 100%; max-width: 480px; background: rgba(0, 0, 0, 0.5); padding: 6px 10px; font-family: var(--mono); color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.mc-title { text-align: center; font-family: var(--mono); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.mc-title .big { font-size: 26px; font-weight: 700; }
.mc-title .small { font-size: 14px; margin-top: 4px; }
.note {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.note strong { color: var(--ink); font-weight: 600; }

/* ---------- диалоги и уведомления ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink);
  padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog-body { padding: 24px; display: grid; gap: 16px; }
.dialog-body h2 { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.25; }
.dialog-body p { color: var(--muted); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 24px 24px; }

.notice {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--surface-2); color: var(--ink); padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--brand-line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); font-weight: 500;
  max-width: calc(100vw - 32px);
}
.notice.error { border-color: rgba(255, 79, 79, 0.5); color: #ff9a9a; }

/* ---------- счётчик жалоб в меню ---------- */
.nav > a { position: relative; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--critical); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1; box-shadow: 0 0 0 2px var(--surface);
}
.nav > a:not([aria-current="page"]) .nav-badge { position: absolute; top: 1px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; }
.pill.alert { border-color: rgba(255, 79, 79, 0.35); color: #ff9a9a; }
.pill.alert strong { color: #ff8a8a; }

/* ---------- жалобы ---------- */
.report-list { display: grid; gap: 12px; transition: opacity 0.15s; }
.report-card {
  display: grid; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--warning);
}
.report-card.claimed { border-left-color: var(--brand); }
.report-card.resolved { border-left-color: var(--good); }
.report-card.dismissed { border-left-color: var(--line-strong); }
.report-card.resolved, .report-card.dismissed { opacity: 0.85; }
.rc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-who { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.rc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rc-name { font-weight: 600; color: var(--ink); font-size: 15px; }
.rc-name:hover { text-decoration: underline; }
.rc-sub { font-size: 12px; }
.rc-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rc-quote {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); overflow-wrap: anywhere;
}
.rc-text { flex: 1 1 240px; min-width: 0; font-size: 14px; }
.rc-meta { font-size: 12px; }
.rc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-actions .grow { flex: 1 1 auto; }

/* ---------- топ по онлайну ---------- */
.top-page { display: grid; gap: 18px; }
.podium {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end;
}
.podium-card {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 16px 18px; text-align: center;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.podium-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.podium-card.place-1 {
  padding-top: 30px; padding-bottom: 26px; border-color: var(--brand-line);
  background: radial-gradient(90% 70% at 50% 0%, rgba(25, 140, 255, 0.20), transparent 70%), var(--surface);
  box-shadow: var(--glow);
}
.podium-skin { display: grid; place-items: center; min-height: 176px; }
.podium-card.place-1 .podium-skin { min-height: 212px; }
.podium-skin .skin3d { background: none; }
.podium-skin .skin3d-hint { bottom: -14px; }
.podium-card.place-1 .avatar.body { width: 90px; height: 180px; }
.medal {
  position: absolute; top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 14px; color: #0b0b0d; background: #c9c9d1;
}
.place-1 .medal { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.place-3 .medal { background: #d9651f; color: #fff; }
.podium-name { font-size: 16px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-hours { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.place-1 .podium-hours { font-size: 26px; }
.podium-sub { font-size: 12px; }
.badge .live-dot { width: 6px; height: 6px; }
.top-list { display: grid; }
.top-row {
  display: grid; grid-template-columns: 34px minmax(140px, 220px) minmax(0, 1fr) 132px 150px; gap: 14px; align-items: center;
  padding: 10px 20px; border-top: 1px solid var(--grid); color: var(--ink-2);
}
.top-row:first-child { border-top: 0; }
.top-row:hover { background: var(--hover); color: var(--ink); }
.top-rank { font-family: var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; text-align: right; }
.top-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; color: var(--ink); }
.top-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.top-fill { display: block; height: 100%; border-radius: inherit; background: var(--gradient); }
.top-hours { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); font-weight: 500; }
.top-sub { font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.good-text { color: var(--good); }

@media (max-width: 860px) {
  .podium { grid-template-columns: minmax(0, 1fr); }
  .podium-card.place-1 { order: -1; }
  .podium-skin, .podium-card.place-1 .podium-skin { height: auto; }
  .top-row { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 16px; }
  .top-track { grid-column: 2 / -1; grid-row: 2; }
  .top-sub { display: none; }
  .rc-head { flex-wrap: wrap; }
  .rc-side { justify-content: flex-start; }
}

/* ---------- плитки топов ---------- */
.top-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.top-tile {
  display: grid; gap: 10px; padding: 14px 14px 12px; text-align: left; cursor: pointer; color: var(--ink);
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.top-tile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.top-tile[aria-selected="true"] {
  border-color: var(--brand-line); box-shadow: var(--glow);
  background: radial-gradient(120% 90% at 0% 0%, rgba(25, 140, 255, 0.18), transparent 60%), var(--surface);
}
.tt-head { display: flex; align-items: center; gap: 8px; }
.tt-icon { font-size: 16px; line-height: 1; }
.tt-title { font-family: var(--display); font-weight: 500; font-size: 14px; }
.tt-leader { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.tt-who { display: grid; min-width: 0; }
.tt-who strong { font-size: 13px; }
.top-heading { display: grid; gap: 2px; }
.top-heading h2 { font-family: var(--display); font-weight: 500; font-size: 20px; margin: 0; }
.top-heading p { margin: 0; font-size: 13px; }
.top-page { transition: opacity 0.15s; }
.bell-btn[aria-pressed="true"] { color: var(--brand); }

/* ---------- метки, заметки ---------- */
.tag-chip {
  --tag: #9a9aa3; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--tag); white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--tag) 40%, transparent); background: color-mix(in srgb, var(--tag) 12%, transparent);
}
button.tag-chip { cursor: pointer; height: 30px; font: inherit; font-size: 12px; font-weight: 600; }
button.tag-chip:hover { border-color: var(--tag); }
.tag-chip.off { color: var(--muted); border-color: var(--line); background: transparent; font-weight: 500; }
.tag-chip.off .ic { filter: grayscale(1); opacity: 0.6; }
.tag-chip.mini { height: 22px; padding: 0 7px; }
.tag-chip .ic { font-size: 12px; line-height: 1; }
.chip-x {
  border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; margin-right: -4px;
  font-size: 15px; line-height: 1; opacity: 0.7;
}
.chip-x:hover { opacity: 1; }
.select.small { height: 30px; font-size: 12px; padding: 0 28px 0 10px; }
textarea.input { height: auto; min-height: 60px; padding: 9px 12px; resize: vertical; font: inherit; line-height: 1.45; }
.staff-card { display: grid; gap: 20px; }
.staff-block { display: grid; gap: 10px; }
.staff-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.staff-label .muted { font-size: 12px; }
.notes { display: grid; gap: 8px; }
.note { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 12px; }
.note-meta .muted { font-family: var(--mono); font-size: 11px; }
.note-text { margin-top: 6px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); font-size: 14px; }
.note .line-tools { opacity: 0.55; }
.note:hover .line-tools, .note:focus-within .line-tools { opacity: 1; }
.note-form { display: grid; gap: 8px; margin-top: 6px; }
.note-form > .btn { justify-self: end; }
.row-gap { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-gap .input { flex: 1 1 200px; }
.muted.small, .small.muted { font-size: 12px; }

/* ---------- доступ ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.me-card {
  --tag: var(--brand); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-color: color-mix(in srgb, var(--tag) 45%, transparent);
  background: linear-gradient(100deg, color-mix(in srgb, var(--tag) 14%, transparent), transparent 55%), var(--surface);
}
.me-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.me-text { display: grid; gap: 2px; min-width: 0; }
.me-text .muted { font-size: 12px; }
.me-role { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.me-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); max-width: 460px; }
.me-notes li { padding-left: 14px; position: relative; }
.me-notes li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--tag); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tag); box-shadow: 0 0 10px var(--tag); flex: 0 0 auto; }

.assign-form { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) auto; gap: 12px; align-items: end; }
.assign-form .field { display: grid; gap: 6px; min-width: 0; }
.assign-form .input, .assign-form .select { width: 100%; }
.access-hint {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); display: grid; gap: 12px; font-size: 13px; color: var(--ink-2);
}
.access-hint p { margin: 0; line-height: 1.7; }
.access-hint code, .warn-box code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); }
.card-sub { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 8px; border-top: 1px solid var(--line); }
.card-sub h3 { margin: 0; font-size: 14px; font-weight: 600; }
.access-table td { vertical-align: middle; }
.access-table tr.is-self td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.access-table .player-cell .badge { margin-left: 2px; }
.access-table .select.small { min-width: 150px; }

.perm-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; align-content: start; }
.role-card .perm-summary { flex: 1 1 auto; }
.perm-group { display: grid; gap: 7px; align-content: start; min-width: 0; }
.perm-group-title { font-size: 12px; font-weight: 600; color: var(--muted); }
.perm-group .chips { gap: 6px; }
.perm-group.none .perm-group-title { color: var(--dim); }
.chip.static { cursor: default; height: auto; min-height: 26px; padding: 4px 10px; white-space: normal; text-align: left; line-height: 1.3; color: var(--ink-2); }
.chip.static:hover { color: var(--ink-2); border-color: var(--line); }

.role-section { display: grid; gap: 14px; }
.section-title { display: grid; gap: 4px; padding: 0 4px; }
.section-title h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 20px; }
.section-title p { margin: 0; font-size: 13px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: stretch; }
.role-card {
  --tag: #9a9aa3; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; min-width: 0;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--tag) 70%, transparent);
}
.role-card.mine { border-color: color-mix(in srgb, var(--tag) 50%, transparent); }
.role-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.role-head h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 17px; overflow-wrap: anywhere; min-width: 0; }
.role-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.role-about { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.role-people { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.role-names { margin-left: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-actions { margin-top: auto; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }

.status-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line);
}
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.status-chip.current { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.status-chip.current i { background: var(--brand); box-shadow: 0 0 8px var(--brand); }

.warn-box {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); color: #f3c47c;
}
.role-form-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; }
.role-form-top .field { display: grid; gap: 6px; min-width: 0; }
.role-form-top .row-gap { flex-wrap: nowrap; }
.perm-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.perm-fieldset { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: 10px; min-width: 0; }
.perm-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.perm-toggle { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.perm-toggle input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.perm-toggle input:disabled { cursor: default; }
.perm-toggle strong { display: block; font-size: 13px; font-weight: 600; }
.perm-toggle small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.color-input { width: 46px; height: 38px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
dialog.wide { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }

@media (max-width: 860px) {
  .assign-form { grid-template-columns: minmax(0, 1fr); }
  .perm-groups, .role-form-top { grid-template-columns: minmax(0, 1fr); }
  .me-role { font-size: 19px; }
}

/* ---------- удержание ---------- */
.chart .marker-line { stroke: var(--warning); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker-label { fill: var(--warning); font-size: 11px; }

/* ---------- авто-сообщения ---------- */
.page-tabs { justify-self: start; }
.sched { display: grid; gap: 16px; }
.sched[hidden] { display: none; }
.sched-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.sched-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; min-width: 0;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
.sched-card.paused, .sched-card.done, .sched-card.other { opacity: 0.78; }
.sched-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sched-head h3 { margin: 0 auto 0 0; font-family: var(--display); font-weight: 500; font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.status-chip.sched-paused { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.status-chip.sched-paused i { background: var(--warning); }
.status-chip.sched-done i, .status-chip.sched-other i { background: var(--dim); }
.sched-when { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.sched-when svg { width: 14px; height: 14px; color: var(--muted); flex: 0 0 auto; }
.sched-text {
  padding: 10px 12px; border-radius: var(--radius-sm); background: #0a0a0c; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; overflow: hidden; overflow-wrap: anywhere;
}
.sched-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
.sched-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
.stack[hidden], .row-gap[hidden], .grid[hidden] { display: none; }
.row-gap.start { justify-content: flex-start; }
.seg.days button { min-width: 40px; }
.sched-more { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.sched-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sched-more[open] summary { margin-bottom: 12px; }
.perm-toggle.locked { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 860px) {
  .sched-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- адаптив ---------- */
@media (max-width: 1600px) {
  .online-pill .pill-word { display: none; }
}

@media (max-width: 1240px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.wide-narrow { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1040px) {
  .user-chip .who { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 0px; }
  .header { position: static; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 16px; row-gap: 10px; }
  .nav-slot { grid-column: 1 / -1; grid-row: 2; }
  .brand .word { font-size: 15px; }
  .user-chip .who { display: none; }
  .page-head { padding: 30px 16px 24px; }
  .page-head h1 { font-size: 28px; }
  .main { padding: 18px 16px 48px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .chat-line { grid-template-columns: 64px minmax(0, 1fr); padding: 8px 16px; }
  .chat-line .line-tools { grid-column: 1 / -1; opacity: 1; justify-self: start; }
  .chat-line .chan { grid-column: 2; grid-row: 1; }
  .chat-line .text { grid-column: 1 / -1; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 12px 16px 16px; }
  .list-item, .event-row, .pager { padding-left: 16px; padding-right: 16px; }
  .log-day { grid-template-columns: 22px minmax(0, 1fr) 76px 32px; gap: 10px; padding: 8px 16px; }
  .log-day .track { display: none; }
  .log-month-head { padding: 10px 16px; }
  .selection-bar { border-radius: 18px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 16px; }
  .stat .value { font-size: 21px; }
  .page-head h1 { font-size: 24px; }
  .login-brand h1 { font-size: 24px; }
  .login-card { padding: 26px 20px; }
}

@media print {
  .header, .toolbar, .pager, .btn, .selection-bar { display: none !important; }
  .backdrop::before, .backdrop::after { display: none; }
}

/* ---------- уровень доверия ---------- */
.badge.trust { --trust: var(--s1); border-color: color-mix(in srgb, var(--trust) 34%, transparent); color: var(--trust); background: color-mix(in srgb, var(--trust) 10%, transparent); }
.badge.trust .trust-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trust); }
.badge.source { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-2); }
.badge.source.muted { color: var(--dim); }
.trust-meter { display: grid; gap: 8px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }

/* ---------- карточка игрока по наведению ---------- */
.player-card {
  position: fixed; z-index: 90; width: 282px; display: grid; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.player-card .card-head-row { display: flex; align-items: center; gap: 10px; }
.player-card .card-rows { display: grid; gap: 5px; font-size: 13px; }
.player-card .card-rows > div { display: flex; justify-content: space-between; gap: 10px; }
.player-card .card-rows span { color: var(--muted); }
.player-card .card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.player-card .empty { padding: 12px 0; }

/* ---------- сеть серверов ---------- */
.srv-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.srv-card {
  --srv: var(--s1); display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--srv);
}
.srv-card.down { opacity: 0.6; border-left-color: var(--critical); }
.srv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srv-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.srv-badge {
  --srv: var(--s1); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; height: 20px; padding: 0 7px;
  border-radius: 6px; display: inline-flex; align-items: center; white-space: nowrap;
  background: color-mix(in srgb, var(--srv) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--srv) 40%, transparent); color: var(--srv);
}
.chips .chip { --srv: var(--s1); }
.chips .chip[aria-pressed="true"] { border-color: var(--srv); background: color-mix(in srgb, var(--srv) 12%, transparent); color: var(--srv); }
.net-list { max-height: 62vh; overflow: auto; }
.chat-line.net { --srv: var(--s1); grid-template-columns: 62px auto 96px minmax(0, 1fr) auto; border-left: 3px solid var(--srv); }
.chat-line.flagged { background: rgba(232, 163, 61, 0.07); }
.chat-line.removed { opacity: 0.45; text-decoration: line-through; }
.chan.WEB { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.seg .live-dot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.line-tools {
  display: flex; gap: 2px; padding: 2px; border-radius: 999px; opacity: 0; justify-self: end;
  background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px var(--line);
  transition: opacity 0.15s ease;
}
.chat-line:hover .line-tools, .line-tools:focus-within { opacity: 1; }
.tool {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; color: var(--muted); text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.tool svg { width: 15px; height: 15px; }
.tool:hover { background: var(--surface-3); color: var(--ink); }
.tool.danger:hover { background: rgba(255,77,94,0.14); color: #ff6b7a; }
.tool:active { transform: scale(0.92); }
.tool:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.send-row { display: flex; gap: 8px; }
.note {
  grid-column: 1 / -1; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}

@media (max-width: 720px) {
  .chat-line.net { grid-template-columns: 56px auto minmax(0, 1fr); }
  .chat-line.net .srv-badge { grid-column: 2; grid-row: 1; justify-self: start; }
  .chat-line.net .chan { grid-column: 3; grid-row: 1; justify-self: start; }
  .chat-line.net .text { grid-column: 1 / -1; }
  .line-tools { opacity: 1; grid-column: 1 / -1; justify-self: start; }
  .player-card { width: min(300px, 92vw); }
}

/* ---------- редактор конфига ---------- */
.config-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.outline-card { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 40px); display: flex; flex-direction: column; }
.outline-card .card-body { display: grid; gap: 10px; overflow: hidden; min-height: 0; }
.outline { display: grid; gap: 2px; overflow: auto; max-height: calc(100vh - var(--header-h) - 170px); padding-right: 4px; }
.outline-item {
  display: grid; gap: 1px; text-align: left; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--ink-2);
}
.outline-item:hover { background: var(--hover); border-color: var(--line); color: var(--ink); }
.outline-item .o-title { font-size: 13px; line-height: 1.3; }
.outline-item .o-key { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.editor-card .card-head { flex-wrap: wrap; padding-bottom: 14px; }
.small-input { width: 180px; height: 34px; }
.editor {
  --ed-line: 20px; --ed-pad: 12px;
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - var(--header-h) - 250px); min-height: 360px;
  border-top: 1px solid var(--line); background: #08080a; overflow: hidden;
  font-family: var(--mono); font-size: 13px; line-height: var(--ed-line);
}
.gutter {
  color: var(--dim); text-align: right; user-select: none; border-right: 1px solid var(--grid);
  min-width: 52px; overflow: hidden; min-height: 0;
}
.gutter-inner { padding: var(--ed-pad) 10px var(--ed-pad) 14px; will-change: transform; }
.gutter .err { color: var(--critical); font-weight: 700; }
.gutter .warn { color: var(--warning); font-weight: 700; }
.code { position: relative; overflow: hidden; min-height: 0; }
.hl-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hl, .src {
  margin: 0; padding: var(--ed-pad) 16px; font: inherit; line-height: var(--ed-line);
  white-space: pre; tab-size: 2; letter-spacing: 0;
}
.hl { color: var(--ink-2); will-change: transform; min-width: 100%; }
.hl .ln { min-height: var(--ed-line); }
.hl .ln.err { background: rgba(255, 79, 79, 0.12); box-shadow: inset 3px 0 0 var(--critical); }
.hl .ln.warn { background: rgba(232, 163, 61, 0.10); box-shadow: inset 3px 0 0 var(--warning); }
.src {
  position: absolute; inset: 0; width: 100%; height: 100%; resize: none; border: 0; outline: none;
  background: transparent; color: transparent; caret-color: var(--ink); overflow: auto;
}
.src::selection { background: rgba(25, 140, 255, 0.35); color: transparent; }
.t-key { color: #7cc4ff; }
.t-punct { color: var(--dim); }
.t-dash { color: var(--brand); }
.t-str { color: #c9e6a4; }
.t-num { color: #f0b36b; }
.t-com { color: #6b6b75; font-style: italic; }
.t-code { border-bottom: 1px solid; }
.t-fmt { color: #d98cff; }
.t-ph { color: #ffd166; }
.problems { display: grid; gap: 4px; padding: 10px 14px; border-top: 1px solid var(--line); max-height: 160px; overflow: auto; }
.problem {
  display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; text-align: left; cursor: pointer;
  padding: 6px 10px; border-radius: 8px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.problem.err { border-color: rgba(255, 79, 79, 0.35); }
.problem.warn { border-color: rgba(232, 163, 61, 0.35); }
.problem .p-where { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.problem.err .p-where { color: #ff8a8a; }
.problem.warn .p-where { color: var(--warning); }
.editor-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }

@media (max-width: 900px) {
  .config-layout { grid-template-columns: minmax(0, 1fr); }
  .outline-card { position: static; max-height: 240px; }
  .outline { max-height: 150px; }
  .editor { height: 65vh; }
  .small-input { width: 100%; }
}

/* строка события с кнопкой справа (снять наказание, восстановить копию) */
.event-row.with-action { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }

/* неподвижная модель на пьедестале: никаких жестов, клик уходит в ссылку на профиль */
.skin3d.fixed, .skin3d.fixed canvas { cursor: inherit; touch-action: auto; }
.skin3d.fixed canvas { pointer-events: none; }

.top-modes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-modes[hidden] { display: none; }

/* жалобы на игроков */
.rc-reasons { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.rc-reason { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 13px; }
.rc-reason strong { font-weight: 600; white-space: nowrap; }
.rc-reason-text { color: var(--ink-2); overflow-wrap: anywhere; }
.top-filters { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: center; }

/* ---------- Lite и Premium ---------- */
.edition-chip {
  margin-left: 2px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--ink-2); border: 1px solid var(--line-strong); background: var(--surface-2);
}
.premium-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; white-space: nowrap;
  font-size: 11px; font-weight: 700; color: #f3c47c; border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
}
.btn .premium-badge { height: 18px; padding: 0 6px; font-size: 10px; }
.premium-star { color: var(--warning); }
.premium-star.big { font-size: 22px; line-height: 1; }
.premium-hint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px dashed color-mix(in srgb, var(--warning) 35%, transparent); color: var(--ink-2); font-size: 13px;
}
.premium-hint a { color: var(--warning); font-weight: 600; margin-left: auto; }
.nav > a[href="#/premium"] { color: #f3c47c; }
.nav > a[href="#/premium"][aria-current="page"] { background: linear-gradient(180deg, #c98a2b 0%, #e8a33d 100%); color: #1a1205; box-shadow: 0 6px 22px rgba(232, 163, 61, 0.3); }
.promo-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap;
  background: linear-gradient(100deg, color-mix(in srgb, var(--warning) 10%, transparent), transparent 60%), var(--surface);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.promo-strip .grow { flex: 1 1 260px; min-width: 0; }
.promo-card { overflow: hidden; }
.promo-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 26px; align-items: center; }
.promo-text { display: grid; gap: 12px; align-content: start; }
.promo-text h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.25; }
.promo-text p { margin: 0; }
.promo-icon { font-size: 30px; line-height: 1; }
.promo-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.promo-points li { position: relative; padding-left: 24px; color: var(--ink-2); line-height: 1.5; }
.promo-points li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.promo-teaser { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink); font-size: 13px; }
.promo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-actions.center { justify-content: center; }
.promo-preview {
  position: relative; display: grid; gap: 10px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 100% 0%, rgba(25, 140, 255, 0.14), transparent 60%), var(--surface-2);
  pointer-events: none; user-select: none; min-height: 200px; align-content: center;
}
.promo-ribbon { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 600; color: var(--muted); }
.pv-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.pv-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.pv-main strong { font-size: 13px; }
.pv-side { flex: 0 0 auto; }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; }
.pv-place { display: grid; justify-items: center; gap: 8px; padding: 14px 16px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.pv-place.p1 { padding-bottom: 34px; border-color: var(--brand-line); }
.pv-place.p2 { padding-bottom: 22px; }
.pv-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.pv-bars span { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--s1), color-mix(in srgb, var(--s1) 35%, transparent)); }
.pv-code { margin: 0; padding: 14px; border-radius: var(--radius-sm); background: #0a0a0c; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink-2); white-space: pre; overflow: hidden; }
.promo-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding: 24px 26px; align-items: center;
  background: linear-gradient(100deg, color-mix(in srgb, var(--warning) 9%, transparent), transparent 60%), var(--surface); }
.promo-hero h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 500; font-size: 20px; }
.promo-hero p { margin: 0; line-height: 1.6; }
.promo-steps { display: grid; gap: 10px; }
.promo-steps div { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.promo-steps strong { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--warning); font-size: 12px; }
.promo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.promo-tile { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.15s, transform 0.15s; }
.promo-tile:hover { border-color: color-mix(in srgb, var(--warning) 45%, transparent); transform: translateY(-1px); }
.promo-tile .promo-icon { font-size: 22px; }
.cmp-table td.c, .cmp-table th.c { text-align: center; width: 110px; }
.cmp-table .premium-col { background: color-mix(in srgb, var(--warning) 5%, transparent); }
.cmp-table th.premium-col { color: #f3c47c; }
.cmp-group td { font-family: var(--display); font-size: 14px; font-weight: 500; color: var(--ink); background: var(--surface-2); }
.cmp-yes { color: var(--good); font-weight: 700; }
.cmp-no { color: var(--dim); }
@media (max-width: 860px) {
  .promo-body, .promo-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .cmp-table td.c, .cmp-table th.c { width: 64px; }
}

/* закрытый раздел Lite: размытая страница-пример и карточка поверх */
.nav > a.locked { opacity: 0.62; }
.nav > a.locked:hover, .nav > a.locked[aria-current="page"] { opacity: 1; }
.nav-lock { font-size: 9px; margin-left: -3px; filter: grayscale(1); }
.nav.compact > a.locked:not([aria-current="page"]) .nav-lock { position: absolute; right: 3px; bottom: 3px; }
.nav-menu a.locked { color: var(--muted); }
.nav-menu a.locked .premium-badge { margin-left: auto; height: 18px; font-size: 10px; }
.locked-page { position: relative; min-height: 560px; }
.locked-backdrop {
  display: grid; gap: 18px; filter: blur(7px) saturate(0.85); opacity: 0.55; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.locked-fill { display: grid; gap: 10px; min-height: 180px; align-content: center; }
.locked-overlay { position: absolute; inset: 0; display: grid; place-items: start center; padding: 40px 16px; }
.locked-card {
  width: min(620px, 100%); display: grid; gap: 16px; padding: 26px 28px; border-color: color-mix(in srgb, var(--warning) 35%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.locked-head { display: flex; gap: 14px; align-items: flex-start; }
.locked-head h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.25; }
.locked-head p { margin: 0; }
.locked-lock { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--warning) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }
@media (max-width: 860px) {
  .locked-overlay { padding: 20px 0; }
  .locked-card { padding: 20px; }
}

/* ---------- пропуск роли: выбор роли на странице «Доступ» ---------- */
.role-tokens { display: flex; flex-wrap: wrap; gap: 8px; }
.role-token {
  --tag: #9a9aa3; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 6px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; color: var(--ink-2); font: inherit; text-align: left;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)) border-box;
  transition: transform 0.12s ease, box-shadow 0.2s ease, color 0.15s ease;
}
.role-token:hover:not(:disabled) { color: var(--ink); background: linear-gradient(var(--surface-3), var(--surface-3)) padding-box,
  linear-gradient(180deg, color-mix(in srgb, var(--tag) 70%, white), rgba(255, 255, 255, 0.04)) border-box; }
.role-token[aria-checked="true"] {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tag) 34%, var(--surface-2)), color-mix(in srgb, var(--tag) 14%, var(--surface))) padding-box,
    linear-gradient(180deg, color-mix(in srgb, var(--tag) 85%, white), color-mix(in srgb, var(--tag) 30%, transparent)) border-box;
  box-shadow: 0 10px 28px -14px var(--tag), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.role-token:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.role-token:disabled { opacity: 0.4; cursor: not-allowed; }
.role-token:focus-visible { outline: 2px solid var(--tag); outline-offset: 3px; }
.role-glyph {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 14px; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tag) 60%, white), var(--tag) 70%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag) 18%, transparent);
}
.role-token-text { display: grid; line-height: 1.2; }
.role-token-text strong { font-size: 13px; font-weight: 600; }
.role-token-text small { font-size: 11px; color: var(--muted); }
.role-token[aria-checked="true"] .role-token-text small { color: color-mix(in srgb, var(--tag) 40%, white); }
.assign-form.v2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.assign-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.assign-row .field { flex: 1 1 260px; }
.assign-row .input { height: 46px; border-radius: 999px; padding: 0 18px; }
.role-head .role-glyph { width: 30px; height: 30px; font-size: 13px; }
.btn.role-cta {
  --tag: #198cff; height: 46px; padding: 0 24px; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tag) 75%, white) 0%, var(--tag) 55%, color-mix(in srgb, var(--tag) 80%, black) 100%) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.05)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 30px -12px var(--tag);
}
.btn.role-cta:hover { filter: brightness(1.08); }
.role-pill-wrap { position: relative; display: inline-block; }
.role-pill {
  --tag: #9a9aa3; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tag) 45%, transparent); background: color-mix(in srgb, var(--tag) 12%, transparent);
  color: color-mix(in srgb, var(--tag) 55%, white); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.role-pill .role-glyph { width: 24px; height: 24px; font-size: 11px; box-shadow: none; }
.role-pill svg { width: 14px; height: 14px; opacity: 0.7; transition: transform 0.15s; }
.role-pill[aria-expanded="true"] svg { transform: rotate(180deg); }
.role-pill:hover:not(:disabled) { background: color-mix(in srgb, var(--tag) 20%, transparent); }
.role-pill:disabled { cursor: default; }
.role-pill:disabled svg { display: none; }
.role-pill:focus-visible { outline: 2px solid var(--tag); outline-offset: 2px; }
.role-pop {
  position: fixed; z-index: 60; display: grid; gap: 6px; padding: 8px; width: 280px; max-width: calc(100vw - 16px);
  border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.role-pop .role-token { width: 100%; height: auto; min-height: 44px; padding-top: 5px; padding-bottom: 5px; }
.role-pop .role-glyph { width: 30px; height: 30px; font-size: 12px; }
.access-table .row-tools { display: inline-flex; gap: 6px; justify-content: flex-end; }

