:root {
  color-scheme: dark;
  --bg: #0b0a1a;
  --bg-2: rgba(12, 11, 28, 0.72);
  --card: rgba(22, 20, 46, 0.72);
  --card-2: rgba(36, 33, 72, 0.78);
  --line: rgba(120, 112, 200, 0.2);
  --line-2: rgba(140, 130, 230, 0.34);
  --text: #eceaf7;
  --muted: #9795b3;
  --faint: #6b6a88;
  --accent: #8b5cf6;
  --accent-2: #4f8cff;
  --a1: 139, 92, 246;
  --a2: 79, 140, 255;
  --a3: 56, 189, 248;
  --bg-g1: #0b0a1a; --bg-g2: #130c33; --bg-g3: #0a1633;
  --blob1: #7c3aed; --blob2: #2563eb; --blob3: rgba(250, 204, 21, 0.55);
  --solid: #14122c;
  --yellow: #ffd23f;
  --ok: #3ddc97;
  --warn: #ffcc4d;
  --err: #ff5d6c;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Manrope', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-h); margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--card-2); color: var(--text); text-decoration: none; cursor: pointer;
  font-weight: 600; transition: transform 0.12s, border-color 0.15s, background 0.15s, opacity 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { border: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 24px rgba(var(--a1), 0.35); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(255, 93, 108, 0.5); color: var(--err); background: transparent; }
.btn-danger:hover { background: rgba(255, 93, 108, 0.1); border-color: var(--err); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 13px; }

/* ── Верхня панель ──────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 62px; padding: 0 22px; background: rgba(11, 10, 26, 0.72);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px var(--font-h); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 18px;
  box-shadow: 0 4px 18px rgba(var(--a1), 0.45);
}
.brand b { background: linear-gradient(90deg, #fff, #c8bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spacer { flex: 1; }
#user { display: flex; align-items: center; gap: 10px; }
.btn-admin { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(var(--a1), 0.55); background: rgba(var(--a1), 0.16); color: #e6dcff; box-shadow: none; white-space: nowrap; }
.btn-admin:hover { background: rgba(var(--a1), 0.28); border-color: var(--accent); }
.user-pill { display: inline-flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
.user-pill img { width: 30px; height: 30px; border-radius: 50%; }
.user-pill span { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Лендінг ────────────────────────────────────────────── */
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 84px 0 64px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.hero h1 { margin: 18px 0 16px; font-size: clamp(36px, 5.5vw, 62px); line-height: 1.04; font-weight: 800; }
.grad { background: linear-gradient(90deg, color-mix(in srgb, var(--accent), #fff 25%), var(--accent-2) 60%, var(--gold, #ffd23f)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 0 0 28px; color: var(--muted); font-size: 18px; max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.error-banner { margin: 18px 0 0; padding: 12px 16px; border: 1px solid rgba(255, 93, 108, 0.45); border-radius: 12px; background: rgba(255, 93, 108, 0.08); color: #ffc2c8; }

.mock { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mock-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 700; }
.mock-head .av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.mock-head small { padding: 1px 6px; border-radius: 5px; background: #5865f2; font-size: 10px; font-weight: 700; }
.v2 { display: grid; gap: 10px; padding: 14px 16px; border-radius: 10px; border-left: 4px solid var(--accent); background: var(--bg-2); }
.v2 h3 { font-size: 17px; }
.v2 .row { display: flex; gap: 14px; }
.v2 .thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; background: linear-gradient(135deg, #ffd23f, #4f8cff); }
.v2 hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.v2 dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.v2 dt { color: var(--muted); }
.v2 dd { margin: 0; }
.v2 .btns { display: flex; gap: 8px; }
.v2 .btns span { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; background: #2b2d45; }
.v2 .btns span.p { background: #5865f2; }
.v2 small { color: var(--faint); }

.section { padding: 56px 0; }
.section h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 8px; }
.section .sub { margin: 0 0 32px; color: var(--muted); max-width: 620px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color 0.15s, transform 0.15s; }
.feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature .ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 12px; background: var(--card-2); font-size: 22px; }
.feature h3 { margin-bottom: 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 22px 22px 22px 70px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); counter-increment: s; }
.step::before { content: counter(s); position: absolute; left: 20px; top: 20px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 800 15px var(--font-h); }
.step h3 { margin-bottom: 4px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.footer { padding: 36px 0 60px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; text-align: center; }

/* ── Дашборд: каркас ────────────────────────────────────── */
.page { width: min(1240px, 100% - 32px); margin: 0 auto; padding: 28px 0 120px; }
.page-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title h1 { font-size: 28px; }
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.server { display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color 0.15s, transform 0.15s; }
.server:hover { border-color: var(--accent); transform: translateY(-2px); }
.server .head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.server .name { font: 700 17px var(--font-h); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; overflow: hidden; background: var(--card-2); font: 800 20px var(--font-h); }
.server-ico img { width: 100%; height: 100%; object-fit: cover; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.side { max-width: 100%; position: sticky; top: 86px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.side-guild { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.side-guild .server-ico { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
.side-guild b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav:hover { background: var(--card-2); color: var(--text); }
.nav.active { background: linear-gradient(135deg, rgba(var(--a1), 0.25), rgba(var(--a2), 0.18)); color: #fff; }
.nav .dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--line-2); }
.nav .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.card h2 { margin-bottom: 4px; font-size: 20px; }
.card .desc { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.card.is-off .fields { opacity: 0.45; }
.module-head { display: flex; align-items: center; gap: 16px; }
.module-head .ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px; background: var(--card-2); font-size: 26px; }
.module-head .t { flex: 1; min-width: 0; }
.module-head h1 { font-size: 24px; }
.module-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.fields { display: grid; gap: 20px; transition: opacity 0.2s; }
.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
input[type='text'], input[type='url'], input[type='number'], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--bg-2); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--a1), 0.2); }
input[type='text'], input[type='url'], input[type='number'], select { height: 44px; line-height: 1.3; }
textarea { min-height: 90px; resize: vertical; }
select:disabled { opacity: 0.55; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type='color'] { width: 46px; height: 42px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); cursor: pointer; }
.color-field input[type='text'] { max-width: 140px; font-family: ui-monospace, monospace; }
.suffix { display: flex; align-items: center; gap: 10px; }
.suffix span { color: var(--muted); white-space: nowrap; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 44px; height: 25px; flex: none; border-radius: 99px; background: var(--line-2); transition: background 0.2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch input:checked + .track::after { transform: translateX(19px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.switch .sw-text { display: grid; gap: 1px; }
.switch .sw-text b { font-size: 14px; font-weight: 600; }
.switch .sw-text small { color: var(--muted); font-size: 13px; }
.toggle-list { display: grid; gap: 14px; }

.multi { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.chip { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--c) 16%, transparent); font-size: 13px; font-weight: 600; }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); cursor: pointer; line-height: 1; }
.chip button:hover { background: var(--err); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.stat b { display: block; font: 800 26px var(--font-h); }
.stat span { color: var(--muted); font-size: 13px; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mod-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); text-decoration: none; font-weight: 600; }
.mod-tile:hover { border-color: var(--accent); }
.mod-tile small { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--muted); font-size: 11px; }
.mod-tile small.on { background: rgba(61, 220, 151, 0.15); color: var(--ok); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid rgba(255, 204, 77, 0.4); border-radius: 12px; background: rgba(255, 204, 77, 0.07); }
.alert.err { border-color: rgba(255, 93, 108, 0.45); background: rgba(255, 93, 108, 0.07); }
.alert ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.alert a { color: var(--accent-2); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.who img { width: 26px; height: 26px; border-radius: 50%; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2); }
.tabs button { padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--card-2); color: var(--text); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--line); font-size: 12px; font-weight: 600; }
.pill.ok { background: rgba(61, 220, 151, 0.15); color: var(--ok); }
.pill.live { background: rgba(255, 204, 77, 0.15); color: var(--warn); }
.gw { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gw:last-child { border-bottom: 0; }
.gw .info { flex: 1; min-width: 200px; }
.gw .info b { display: block; }
.gw .info small { color: var(--muted); }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline > .field { flex: 1; min-width: 180px; }
.empty { padding: 26px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); text-align: center; }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

.savebar {
  position: fixed; left: 50%; bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 20px; border: 1px solid var(--line-2); border-radius: 16px;
  background: rgba(24, 22, 52, 0.94); backdrop-filter: blur(14px); box-shadow: var(--shadow);
  transform: translate(-50%, 140%); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.savebar.show { transform: translate(-50%, 0); }
.savebar span { font-weight: 600; }
.toasts { position: fixed; top: 76px; right: 18px; z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 12px 16px; border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--card-2); box-shadow: var(--shadow); animation: tin 0.2s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.center { display: grid; place-items: center; gap: 14px; padding: 80px 20px; text-align: center; }
.center h1 { font-size: 28px; }
.center p { max-width: 460px; margin: 0; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 32px; gap: 32px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .side-guild { display: none; }
  .nav-group { display: contents; }
  .side .nav { flex: none; white-space: nowrap; }
  .nav .dot { display: none; }
  .topbar { padding: 0 14px; }
  .user-pill span { display: none; }
  .id-btn { display: none; }
  .btn-admin { padding: 0 12px; }
  #user { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ═════════ Фон: «північне сяйво» (без картинок, лише CSS) ═════════ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(165deg, var(--bg-g1) 0%, var(--bg-g2) 46%, var(--bg-g3) 100%); transition: background 0.6s; }
.bg i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; will-change: transform; animation: drift 28s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -16vw; background: radial-gradient(circle, var(--blob1) 0%, transparent 66%); }
.bg i:nth-child(2) { width: 46vw; height: 46vw; right: -12vw; top: 6vh; background: radial-gradient(circle, var(--blob2) 0%, transparent 66%); animation-duration: 34s; animation-delay: -9s; }
.bg i:nth-child(3) { width: 40vw; height: 40vw; left: 28vw; bottom: -20vw; background: radial-gradient(circle, var(--blob3) 0%, transparent 66%); opacity: 0.32; animation-duration: 40s; animation-delay: -16s; }
.bg::before { content: ''; position: absolute; inset: 0; opacity: 0.1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1.4px), radial-gradient(rgba(167, 139, 250, 0.9) 1px, transparent 1.4px);
  background-size: 110px 110px, 170px 170px; background-position: 0 0, 55px 80px; }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 120%, rgba(11, 10, 26, 0.7), transparent 60%); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(5vw, 4vh, 0) scale(1.18); } }

.card, .side, .feature, .server, .stat, .mod-tile, .step, .mock, .cmd-card, .doc-side { backdrop-filter: blur(10px); }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 7px 13px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.topnav a:hover { background: var(--card-2); color: var(--text); }
a.feature { display: block; text-decoration: none; color: inherit; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ═════════ Сторінки інструкцій ═════════ */
.docs { padding-bottom: 40px; }
.doc-hero { padding: 54px 0 22px; }
.doc-hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; }
.doc-hero p { max-width: 640px; margin: 10px 0 20px; color: var(--muted); font-size: 17px; }
.search { width: 100%; max-width: 560px; height: 50px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--bg-2); font-size: 15px; }
.search:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--a1), 0.22); }
.doc-group { padding: 26px 0 6px; }
.doc-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.doc-group-head .ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--card-2); font-size: 24px; }
.doc-group-head h2 { font-size: 22px; }
.doc-group-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; max-width: 760px; }
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cmd-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.cmd-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cmd-card b { font: 800 16px var(--font-h); color: #c4b5fd; }
.cmd-card span { color: var(--muted); font-size: 13px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 28px 0 8px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.cmd-head h1 { font-size: clamp(34px, 5vw, 54px); }
.cmd-head .slash { color: var(--accent); }
.cmd-head .lead { margin: 8px 0 14px; color: var(--muted); font-size: 18px; max-width: 720px; }
.who { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); font-size: 14px; }
.who span { color: var(--yellow); font-weight: 700; }
.doc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; align-items: start; margin-top: 8px; }
.doc-cols h2 { margin: 28px 0 12px; font-size: 21px; }
.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 10px; }
.steps-list li { position: relative; padding: 12px 16px 12px 56px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); counter-increment: n; }
.steps-list li::before { content: counter(n); position: absolute; left: 14px; top: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font: 800 13px var(--font-h); }
pre.code { margin: 0 0 8px; padding: 13px 16px; overflow-x: auto; border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 10px; background: rgba(8, 7, 20, 0.8); }
pre.code code, code { font: 14px ui-monospace, 'Cascadia Code', Consolas, monospace; color: #ddd6fe; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--muted); }
.doc-side { position: sticky; top: 84px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.doc-side h3 { margin: 0 0 10px; font-size: 15px; }
.doc-side h3:not(:first-child) { margin-top: 20px; }
.side-links { display: flex; flex-wrap: wrap; gap: 6px; }
.side-links a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: 13px; font-weight: 600; color: #c4b5fd; }
.side-links a:hover { border-color: var(--accent); }
.pager { display: flex; justify-content: space-between; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.pager a { color: var(--muted); text-decoration: none; font-weight: 600; } .pager a:hover { color: var(--text); }

/* ═════════ Підтримка / ЄЛайт на лендінгу ═════════ */
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding: 10px 0 40px; }
.elite { padding: 30px; border: 1px solid rgba(250, 204, 21, 0.35); border-radius: 20px; background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(var(--a1), 0.16)); }
.perks { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 12px; }
.perks li { display: grid; gap: 2px; }
.perks span { color: var(--muted); font-size: 14px; }

/* ═════════ Дашборд: нові елементи ═════════ */
.hide-sm { }
.nav-group { display: grid; gap: 2px; margin-bottom: 6px; }
.nav-title { margin: 12px 10px 4px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nav .tag { margin-left: auto; padding: 1px 7px; border-radius: 99px; background: rgba(250, 204, 21, 0.16); color: var(--yellow); font-size: 10px; font-weight: 800; }
.help { border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--a1), 0.07); }
.help summary { padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.help summary::before { content: '💡 '; }
.help[open] summary { border-bottom: 1px solid var(--line); }
.help .body { display: grid; gap: 8px; padding: 12px 16px 14px; color: var(--muted); font-size: 14px; }
.help ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.help a { color: var(--accent-2); }
.lock { display: grid; gap: 10px; justify-items: start; padding: 20px; border: 1px dashed rgba(250, 204, 21, 0.5); border-radius: 14px; background: rgba(250, 204, 21, 0.06); }
.lock b { font-size: 17px; }
.elite-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; background: rgba(250, 204, 21, 0.16); color: var(--yellow); font-size: 12px; font-weight: 800; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.check:last-child { border-bottom: 0; }
.check .mark { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); font-size: 12px; }
.check.done .mark { background: var(--ok); border-color: var(--ok); color: #05260f; }
.check.done span { color: var(--muted); text-decoration: line-through; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shop-item:last-child { border-bottom: 0; }
.shop-item .info { flex: 1; min-width: 200px; }
.shop-item .info small { display: block; color: var(--muted); }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; align-items: center; }
.q-row select { height: 44px; }
.pos-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); display: grid; gap: 14px; }
.pos-card > h3 { font-size: 17px; }
.var-hint { color: var(--muted); font-size: 13px; }
.var-hint code { padding: 1px 6px; border-radius: 6px; background: rgba(var(--a1), 0.16); }
.msg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.preview { position: sticky; top: 84px; padding: 16px; border-radius: 14px; background: #313338; border: 1px solid var(--line); }
.preview .who-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; color: #f2f3f5; }
.preview .who-line .av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.preview .who-line small { padding: 1px 6px; border-radius: 5px; background: #5865f2; font-size: 10px; }
.v2c { display: grid; gap: 10px; padding: 14px 16px; border-radius: 8px; border-left: 4px solid var(--accent); background: #2b2d31; color: #dbdee1; }
.v2c img.banner { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; }
.v2c .row { display: flex; gap: 12px; }
.v2c .row .txt { flex: 1; min-width: 0; }
.v2c img.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.v2c h4 { margin: 0 0 4px; font-size: 17px; color: #fff; }
.v2c p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.v2c hr { width: 100%; margin: 0; border: 0; border-top: 1px solid #3f4147; }
.v2c small { color: #949ba4; }
.v2c .linkbtn { justify-self: start; padding: 7px 16px; border-radius: 8px; background: #4e5058; color: #fff; font-size: 13px; font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 6px; }
.chart > div { flex: 1; min-width: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity: 0.9; }
.bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.bar-row .bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-row b { text-align: right; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline-form > .field { flex: 1; min-width: 160px; }
.file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-row img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.btn-gold { border: 0; background: linear-gradient(135deg, #f59e0b, #facc15); color: #1a1200; box-shadow: 0 6px 24px rgba(250, 204, 21, 0.25); }
.kbd { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; font: 12px ui-monospace, monospace; color: var(--muted); }

@media (max-width: 920px) {
  .doc-cols, .msg-split { grid-template-columns: minmax(0, 1fr); }
  .doc-side, .preview { position: static; }
  .topnav { display: none; }
  .hide-sm { display: none; }
  .nav-title { display: none; }
  .q-row { grid-template-columns: minmax(0, 1fr); }
  .elite { padding: 20px; }
}

/* ═════════ Дашборд: доповнення ═════════ */
.pill.bad { background: rgba(255, 93, 108, 0.15); color: var(--err); }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: rgba(250, 204, 21, 0.16); color: var(--yellow); font-size: 11px; font-weight: 800; vertical-align: middle; }
.divider { height: 1px; margin: 22px 0; background: var(--line); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 > .span2 { grid-column: 1 / -1; }
.main-sub { display: grid; gap: 16px; }
.help { margin-top: 14px; }
.help ol { padding: 12px 16px 12px 36px; color: var(--muted); font-size: 14px; }
.help-cmds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 16px 14px; color: var(--muted); font-size: 13px; }
.cmd-chip { padding: 2px 9px; border-radius: 8px; background: rgba(var(--a1), 0.16); color: var(--text) !important; font: 600 13px ui-monospace, monospace; text-decoration: none; }
.cmd-chip:hover { background: rgba(var(--a1), 0.3); }
.checks { margin-top: 6px; }
.check span { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); font-size: 12px; }
.check.done span { background: var(--ok); border-color: var(--ok); color: #05260f; text-decoration: none; }
.check.done { color: var(--muted); }
.card.locked { border-style: dashed; border-color: rgba(250, 204, 21, 0.4); }
.lock-note { padding: 14px; border-radius: 12px; background: rgba(250, 204, 21, 0.07); color: var(--yellow); font-weight: 600; }
.elite-card { border-color: rgba(250, 204, 21, 0.4); background: linear-gradient(135deg, rgba(250, 204, 21, 0.09), rgba(var(--a1), 0.14)); }
.shop-item .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--a1), 0.16); font-size: 20px; }
.shop-item .price { font-weight: 800; color: var(--yellow); white-space: nowrap; }
.q-list { display: grid; gap: 8px; }
.q-row { grid-template-columns: 26px minmax(0, 1fr) 170px auto; }
.q-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); font-size: 12px; font-weight: 700; }
.pos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pos-head > b { font-size: 17px; }
.msg-preview { padding: 16px; border-radius: 14px; background: #313338; border: 1px solid var(--line); position: sticky; top: 84px; }
.v2c { --c: var(--accent); border-left-color: var(--c); }
.v2c h3 { margin: 0; font-size: 17px; color: #fff; }
.v2c .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.v2c .thumb-img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.v2c .big-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; }
.v2c .btns span { display: inline-block; padding: 7px 16px; border-radius: 8px; background: #4e5058; color: #fff; font-size: 13px; font-weight: 600; }
.v2c .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.inline.btn-url { flex-wrap: nowrap; align-items: center; }
.inline.btn-url input { flex: 1; min-width: 0; }
.file-prev { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.bars { display: grid; gap: 2px; }
.bars .bar-row { grid-template-columns: 30px minmax(110px, 190px) minmax(0, 1fr) 120px; }
.bars .bar-row.simple { grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 60px; }
.bar-row .rk { text-align: center; font-weight: 700; }
.bar-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart .col { flex: 1; min-width: 4px; height: 100%; display: flex; align-items: flex-end; background: none; opacity: 1; }
.chart .col > i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.card h3 { margin: 0 0 10px; font-size: 16px; }
@media (max-width: 920px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .msg-preview { position: static; }
  .q-row { grid-template-columns: 26px minmax(0, 1fr); }
  .q-row select, .q-row button { grid-column: 2; }
  .bars .bar-row { grid-template-columns: 26px minmax(0, 1fr) 90px; }
  .bars .bar-row .bar { display: none; }
}
.bar-row .who { border: 0; padding: 0; background: none; display: inline-flex; }

@media (max-width: 920px) { .nav-group { display: contents; } .side .nav { flex: none; white-space: nowrap; } }

/* ═════════ Журнал, рівні, автомодерація ═════════ */
.rw-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.rw-row .suffix input { width: 80px; }
.tabs.wrap { flex-wrap: wrap; }
.tabs .cnt { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--line); font-size: 11px; }
.log-filters { margin: 12px 0; }
.log-list { display: grid; }
.log-row { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-time { color: var(--muted); font-size: 13px; }
.log-title { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.log-ico { margin-right: 4px; }
.log-who { font-weight: 600; }
.log-who small { color: var(--faint); font-weight: 400; font-size: 11px; }
.log-line { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.log-text { margin-top: 4px; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 6px; background: rgba(var(--a1), 0.08); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
@media (max-width: 920px) { .rw-row { grid-template-columns: minmax(0, 1fr); } .log-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.lang-toggle { min-width: 46px; font-weight: 700; letter-spacing: .04em; }
.lang-pick { position: relative; display: inline-flex; }
.lang-caret { margin-left: 6px; font-size: 11px; opacity: .7; transition: transform .15s; }
.lang-toggle[aria-expanded='true'] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 190px; padding: 6px;
  background: var(--solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  display: grid; gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font: 600 15px var(--font); text-align: left; cursor: pointer;
}
.lang-item:hover, .lang-item:focus-visible { background: rgba(var(--a1), 0.2); outline: none; }
.lang-item.on { background: rgba(var(--a1), 0.12); }
.lang-flag { font-size: 18px; }
.lang-name { flex: 1; }
.lang-tick { visibility: hidden; color: var(--ok); font-weight: 800; }
.lang-item.on .lang-tick { visibility: visible; }
:root[data-theme='light'] .lang-menu { background: #fff; }


.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.card-in { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card-2); min-width: 0; }
.card-in h3 { margin: 0 0 10px; font-size: 15px; }
.chart.alt > div { background: linear-gradient(180deg, #38bdf8, #6366f1); }
.chart.ok > div { background: linear-gradient(180deg, #4ade80, #16a34a); }
.chart.bad > div { background: linear-gradient(180deg, #fb7185, #e11d48); }
.chart.hours { gap: 3px; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.feed-row { display: grid; grid-template-columns: 24px minmax(120px, 1.2fr) minmax(100px, 1fr) minmax(120px, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed-row.slim { grid-template-columns: 24px auto 1fr; border-bottom: 0; padding: 5px 0; }
.feed-id { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.live-pill { color: #4ade80; font-size: 12px; font-weight: 700; }
.feed-status { margin-top: 12px; }
@media (max-width: 920px) { .grid-2 { grid-template-columns: 1fr; } .feed-row { grid-template-columns: 24px 1fr auto; } .feed-row input, .feed-row select { grid-column: 1 / -1; } }

.avatar-ph { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 14px; }
.secret { padding: 8px 12px; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--line-2); font-size: 15px; letter-spacing: .02em; user-select: all; word-break: break-all; }
.secret-card { border-color: var(--accent); }
.login-card { max-width: 420px; margin: 8vh auto 0; }
.login-card form { display: grid; gap: 14px; margin-top: 14px; }

.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acc-row .info { flex: 1 1 200px; display: grid; gap: 2px; min-width: 0; }
.acc-row select { width: auto; min-width: 150px; }

/* ── Адмін-панель (v2) ──────────────────────────────────── */
.adm-hero {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-bottom: 20px; padding: 24px 26px;
  border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden;
  background: radial-gradient(900px 260px at 0% 0%, rgba(var(--a1), 0.32), transparent 60%), radial-gradient(700px 240px at 100% 100%, rgba(var(--a2), 0.26), transparent 60%), var(--card);
}
.adm-hero .ico { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; font-size: 30px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 32px rgba(var(--a1), 0.5); }
.adm-hero h1 { font-size: 26px; }
.adm-hero p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.adm-hero .hero-main { flex: 1; min-width: 240px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: rgba(12, 11, 28, 0.55); font-size: 13px; font-weight: 600; }
.adm-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.adm-chip.warn i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.adm-chip.bad i { background: var(--err); box-shadow: 0 0 10px var(--err); }
.adm-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.adm-nav { position: sticky; top: 78px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.adm-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 600; text-align: left; cursor: pointer; transition: background 0.15s, color 0.15s; }
.adm-nav button:hover { background: rgba(var(--a1), 0.1); color: var(--text); }
.adm-nav button.on { background: linear-gradient(135deg, rgba(var(--a1), 0.32), rgba(var(--a2), 0.22)); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.adm-nav .ni { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--card-2); font-size: 15px; }
.adm-nav .nb { margin-left: auto; padding: 1px 8px; border-radius: 99px; background: rgba(255, 93, 108, 0.18); color: var(--err); font-size: 12px; }
.adm-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.kpi { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: auto -20px -34px auto; width: 90px; height: 90px; border-radius: 50%; background: var(--tone, var(--accent)); opacity: 0.12; filter: blur(8px); }
.kpi .kico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; font-size: 22px; background: color-mix(in srgb, var(--tone, var(--accent)) 22%, transparent); }
.kpi b { display: block; font: 800 26px/1.1 var(--font-h); }
.kpi span { color: var(--muted); font-size: 13px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 6px 0 -4px; font: 700 13px var(--font-h); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.adm-avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; overflow: hidden; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 800; font-size: 14px; }
.adm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.row-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-who .nm { min-width: 0; }
.row-who .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-who .nm small { color: var(--faint); font-size: 12px; }
.adm-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid rgba(255, 204, 77, 0.45); border-radius: 14px; background: rgba(255, 204, 77, 0.08); }
.adm-banner.off { border-color: var(--line); background: var(--card); }
.adm-banner .grow { flex: 1; min-width: 200px; }
.adm-banner h3 { margin: 0 0 2px; }
.adm-banner p { margin: 0; color: var(--muted); font-size: 13px; }
.adm-log-line { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.adm-log-line:last-child { border-bottom: 0; }
.adm-log-line time { color: var(--muted); font-size: 13px; }
.adm-log-line .act { font-weight: 700; }
.pill.gold { background: rgba(255, 210, 63, 0.16); color: var(--yellow); }
.tbl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-main .card { border-radius: 16px; }
.adm-main .table tbody tr:hover td { background: rgba(var(--a1), 0.06); }
.mini-list { display: grid; gap: 6px; margin-top: 10px; }
.mini-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.mini-row .grow { flex: 1; min-width: 180px; }
.mini-row small { color: var(--muted); }
.elite-hero { background: radial-gradient(700px 200px at 0% 0%, rgba(255, 210, 63, 0.18), transparent 60%), var(--card); border-color: rgba(250, 204, 21, 0.4); }
@media (max-width: 860px) {
  .adm-layout { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .adm-nav button { width: auto; white-space: nowrap; padding: 9px 12px; }
  .adm-nav .nb { margin-left: 4px; }
  .adm-log-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .adm-hero { padding: 18px; }
}
.adm-banner .inline { flex: 1 1 320px; min-width: 0; }
.adm-banner .inline input { min-width: 0; width: 100%; flex: 1 1 200px; }
.adm-chip i { flex: none; }
@media (max-width: 860px) { .adm-banner .inline { flex-basis: 100%; } }
.adm-banner .btn { white-space: normal; text-align: center; }
@media (max-width: 860px) { .adm-banner .btn { width: 100%; } }

/* Попередній перегляд стилю карток */
.card-preview { --pv: #8b5cf6; position: relative; display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 22px; min-height: 120px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--pv) 18%, #0a0819), #14122b 55%, color-mix(in srgb, var(--pv) 28%, #0a0819)); background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,.08); }
.card-preview .pv-av { width: 64px; height: 64px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--pv) 55%, #000); box-shadow: 0 0 0 4px var(--pv); }
.card-preview .pv-txt { display: flex; flex-direction: column; gap: 2px; color: #fff; }
.card-preview .pv-txt span { color: rgba(255,255,255,.65); font-size: 13px; }
.card-preview .pv-bar { position: absolute; left: 22px; right: 22px; bottom: 14px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.card-preview .pv-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--pv), color-mix(in srgb, var(--pv) 50%, #fff)); }
/* Графіки адмін-панелі */
.svg-chart { width: 100%; }
.svg-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.svg-chart .grid { stroke: var(--line, rgba(255,255,255,.08)); stroke-width: 1; }
.svg-chart .ln { fill: none; stroke: var(--c, var(--accent)); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.svg-chart .ar { fill: var(--c, var(--accent)); opacity: .14; }
.svg-chart text { fill: var(--muted, #8b8fa8); font-size: 11px; }
.svg-chart .bx { fill: var(--c, var(--accent)); }
.svg-chart-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted, #8b8fa8); margin-top: 6px; }
.flag-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.flag-row:first-child { border-top: 0; }
.flag-row textarea { grid-column: 1 / -1; min-height: 60px; }
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th, .perm-table td { padding: 10px 8px; text-align: center; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
@media (max-width: 720px) { .flag-row { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; }
.plan { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); }
.plan b { font-size: 18px; color: var(--yellow, #fbbf24); }
.plan span { font-size: 12px; opacity: .75; }

.plans.pick .plan { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.plans.pick .plan.on { outline: 2px solid var(--yellow, #fbbf24); background: rgba(251,191,36,.18); }
.pay-steps { display: grid; gap: 10px; }
.pay-step { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.pay-step b { min-width: 170px; }
.pay-step.code .secret { font-size: 20px; letter-spacing: 2px; }

/* Меню: підпис займає вільне місце, значки (🔒, Преміум, крапка) вирівняні по правому краю */
.nav { min-width: 0; }
.nav .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .tag, .nav .dot { flex: none; margin-left: 0; }
.side { overflow-x: hidden; }

.main.gated .switch, .main.gated .fields, .main.gated .main-sub input, .main.gated .main-sub select, .main.gated .main-sub textarea, .main.gated .main-sub button { cursor: not-allowed; }
.main.gated .fields, .main.gated .main-sub .card:not(.locked) { opacity: .6; }

/* ЄЛайт: огляд */
.elite-hero2 { position: relative; overflow: hidden; padding: 28px; border-color: rgba(250,204,21,.4); background: radial-gradient(600px 260px at 100% 0%, rgba(250,204,21,.22), transparent 60%), radial-gradient(500px 260px at 0% 100%, rgba(124,58,237,.3), transparent 60%), var(--card); }
.elite-hero2 h2 { font-size: 26px; margin: 10px 0 6px; }
.eh-top { display: flex; justify-content: space-between; align-items: center; }
.eh-gem { font-size: 38px; filter: drop-shadow(0 0 14px rgba(250,204,21,.5)); }
.elite-state { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.08); color: var(--muted); }
.elite-state.on { background: rgba(61,220,151,.15); color: var(--ok); }
.elite-state.exp { background: rgba(255,93,108,.15); color: var(--err); }
.eh-meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin: 14px 0 4px; }
.eh-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--yellow, #fbbf24), #f59e0b); }
.eh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 18px 0; }
.eh-stats > div { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.eh-stats b { display: block; font: 800 22px var(--font-h); color: var(--yellow, #fbbf24); }
.eh-stats span { font-size: 12px; opacity: .75; }
.plan { position: relative; }
.plan em { position: absolute; top: -9px; right: 10px; padding: 1px 8px; border-radius: 99px; font-size: 10px; font-style: normal; font-weight: 800; background: var(--yellow, #fbbf24); color: #1a1530; }
.plan small { font-size: 11px; opacity: .65; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.perk { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08)); color: inherit; text-decoration: none; transition: transform .15s, border-color .15s, background .15s; }
a.perk:hover { transform: translateY(-2px); border-color: rgba(250,204,21,.5); background: rgba(250,204,21,.06); }
.perk .pi { font-size: 24px; }
.perk > span:last-child { font-size: 13px; opacity: .75; }
.cmp th.gold, .cmp td.gold { color: var(--yellow, #fbbf24); font-weight: 700; }
.faq { border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; opacity: .8; }

.elite-landing .plans { margin: 18px 0; }
.elite-landing .perk-grid { margin-top: 6px; }

/* ── Юридичні сторінки ──────────────────────────────────── */
.legal { max-width: 820px; }
.legal-sec { padding: 6px 0 4px; }
.legal-sec h2 { margin: 26px 0 10px; font-size: 21px; }
.legal-sec p, .legal-sec li { color: var(--muted); line-height: 1.7; font-size: 16px; }
.legal-sec p { margin: 0 0 10px; }
.legal-sec ul { margin: 0 0 12px; padding-left: 22px; }
.legal-sec li { margin: 6px 0; }
.legal-sec b { color: var(--text); }
.legal-sec a { color: var(--accent-2); }
.legal .muted { color: var(--faint); font-size: 14px; }

/* ── Активність модераторів ─────────────────────────────── */
.bars .bar-row.mod-row { grid-template-columns: 180px minmax(0, 1fr) auto; row-gap: 2px; }
.mod-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-row .who img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.mod-row small { grid-column: 2 / -1; font-size: 12px; margin-bottom: 6px; }
@media (max-width: 640px) { .bars .bar-row.mod-row { grid-template-columns: minmax(0, 1fr) auto; } .bars .bar-row.mod-row .bar { display: none; } .mod-row small { grid-column: 1 / -1; } }

/* ═══════════════ Стиль 2026: скло, м’які градієнти, світла тема, Ctrl+K ═══════════════ */
:root {
  --radius: 18px;
  --hair: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.55), var(--hair);
  --grad: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent), var(--accent-2)) 55%, rgb(var(--a3)) 100%);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f3fb; --bg-2: rgba(255, 255, 255, 0.7); --card: rgba(255, 255, 255, 0.78); --card-2: rgba(240, 238, 252, 0.95);
  --line: rgba(80, 70, 160, 0.14); --line-2: rgba(80, 70, 160, 0.3);
  --text: #17142e; --muted: #5d5a7d; --faint: #8a87a8;
  --shadow: 0 18px 40px -22px rgba(60, 50, 140, 0.35), inset 0 1px 0 #fff;
  --hair: inset 0 1px 0 #fff;
}
:root[data-theme='light'] .topbar { background: rgba(244, 243, 251, 0.78); }
:root[data-theme='light'] .brand b { background: linear-gradient(90deg, #2a2160, #6d4df0); -webkit-background-clip: text; background-clip: text; }
:root[data-theme='light'] .bg i { opacity: 0.28; }
:root[data-theme='light'] .bg::after { background: none; }
:root[data-theme='light'] .nav.active { color: #2a1f7a; }
:root[data-theme='light'] .btn-admin { color: #4527b0; }
:root[data-theme='light'] .savebar { background: rgba(255, 255, 255, 0.92); }
body { transition: background-color 0.25s, color 0.25s; }

.card, .side, .server, .stat, .mod-tile { box-shadow: var(--shadow); }
.card { border-radius: var(--radius); }
.btn { border-radius: 12px; }
.btn-primary { background: var(--grad); box-shadow: 0 10px 30px -8px rgba(109, 124, 255, 0.6), var(--hair); }
.topbar { backdrop-filter: blur(18px) saturate(1.4); }
.theme-btn { min-width: 38px; padding: 6px 10px; }
kbd { padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--card-2); color: var(--muted); font: 600 11px var(--font); }

/* Бічне меню */
.side { border-radius: var(--radius); padding: 12px; }
.side-search { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--muted); cursor: pointer; text-align: left; transition: border-color 0.15s, color 0.15s; }
.side-search:hover { border-color: var(--accent); color: var(--text); }
.nav { position: relative; border-radius: 12px; transition: background 0.15s, color 0.15s, transform 0.15s; }
.nav:hover { transform: translateX(2px); }
.nav.active::before { content: ''; position: absolute; left: -2px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad); }

/* Hero огляду */
.ov-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow);
  background: radial-gradient(120% 140% at 0% 0%, rgba(var(--a1), 0.32), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(var(--a3), 0.22), transparent 60%), var(--card); }
.ov-hero-main { min-width: 0; flex: 1; }
.ov-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ov-who .server-ico { width: 56px; height: 56px; border-radius: 17px; font-size: 24px; flex: none; }
.ov-who h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; overflow-wrap: anywhere; }
.ov-eyebrow { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.ov-sub { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.ov-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ov-actions .pill { padding: 6px 12px; text-decoration: none; }
.ov-actions kbd { margin-left: 4px; }
.ring { --p: 0; position: relative; display: grid; place-content: center; width: 112px; height: 112px; flex: none; border-radius: 50%; text-align: center;
  background: conic-gradient(from 0deg, var(--accent), rgb(var(--a3)) calc(var(--p) * 1%), var(--line) 0); }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg); }
:root:not([data-theme='light']) .ring::before { background: var(--solid); }
.ring b, .ring small { position: relative; }
.ring b { font: 800 24px var(--font-h); line-height: 1; }
.ring small { color: var(--muted); font-size: 11px; }

/* Статистика та модулі */
.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { position: relative; border-radius: 16px; padding: 16px 16px 14px; transition: transform 0.18s, border-color 0.18s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.stat-ico { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 10px; background: linear-gradient(135deg, rgba(var(--a1), 0.28), rgba(var(--a3), 0.2)); font-style: normal; font-size: 16px; }
.mod-tile { border-radius: 14px; transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.mod-tile:hover { transform: translateY(-2px); }
.mod-tile.is-on { border-color: rgba(61, 220, 151, 0.35); background: linear-gradient(135deg, rgba(61, 220, 151, 0.08), transparent 70%), var(--bg-2); }
.checklist .progress { height: 10px; }
.checklist .check .mark { transition: background 0.2s; }

/* Список серверів */
.server { border-radius: 20px; position: relative; overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.server::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 64px; background: linear-gradient(135deg, rgba(var(--a1), 0.28), rgba(var(--a3), 0.18)); opacity: 0.8; pointer-events: none; }
.server > * { position: relative; }
.server:hover { transform: translateY(-3px); border-color: var(--accent); }

/* Палітра команд */
.pal-back { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(6, 5, 18, 0.55); backdrop-filter: blur(6px); animation: pal-fade 0.15s ease-out; }
.pal { width: min(560px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-2); border-radius: 20px; background: var(--bg); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7); animation: pal-pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
:root:not([data-theme='light']) .pal { background: var(--solid); }
.pal-input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 16px; outline: none; }
.pal-list { overflow-y: auto; padding: 8px; display: grid; gap: 2px; }
.pal-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.pal-item small { margin-left: auto; color: var(--faint); font-size: 11px; }
.pal-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.pal-item .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pal-item.sel { background: linear-gradient(135deg, rgba(var(--a1), 0.28), rgba(var(--a2), 0.2)); }
.pal-empty { padding: 22px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
@keyframes pal-fade { from { opacity: 0; } }
@keyframes pal-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.main > .card, .main > .ov-hero, .main > .alert { animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.main > :nth-child(2) { animation-delay: 0.05s; } .main > :nth-child(3) { animation-delay: 0.1s; } .main > :nth-child(4) { animation-delay: 0.15s; }

@media (max-width: 920px) {
  .side-search { display: none; }
  .nav.active::before { display: none; }
  .nav:hover { transform: none; }
  .ov-hero { flex-direction: column-reverse; align-items: flex-start; padding: 20px; }
  .ring { width: 92px; height: 92px; }
  .ov-actions kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
:root[data-theme='light'] .bg { background: linear-gradient(165deg, #f6f4ff 0%, #ecebfb 50%, #e6f1fb 100%); }
:root[data-theme='light'] .bg::before { opacity: 0.05; }
:root[data-theme='light'] .nav.active, :root[data-theme='light'] .adm-nav button.on { color: #2a1f7a; }
:root[data-theme='light'] .alert a { color: #3b4fd8; }
:root[data-theme='light'] .nav .tag, :root[data-theme='light'] .tag { color: #8a6500; }
:root[data-theme='light'] .pal-back { background: rgba(60, 50, 120, 0.28); }
:root[data-theme='light'] .btn-primary { color: #fff; }
:root[data-theme='light'] .user-pill, :root[data-theme='light'] .topbar .btn { color: var(--text); }
@media (max-width: 920px) { .ov-who { flex-wrap: wrap; } }
@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .user-pill > span:not(.avatar-ph) { display: none; }
  .user-pill { padding-right: 4px; }
  .brand b { display: none; }
}

/* ═══════════════ Бічне меню 2026 ═══════════════ */
.side { padding: 10px; gap: 2px; max-height: calc(100vh - 106px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.side-guild { position: relative; display: flex; align-items: center; gap: 11px; margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none;
  background: radial-gradient(120% 160% at 0% 0%, rgba(var(--a1), 0.28), transparent 65%), radial-gradient(100% 140% at 100% 100%, rgba(var(--a3), 0.18), transparent 65%), var(--bg-2); transition: border-color 0.15s; }
.side-guild:hover { border-color: var(--line-2); }
.side-guild .server-ico { width: 42px; height: 42px; border-radius: 13px; flex: none; }
.sg-t { min-width: 0; display: grid; gap: 1px; }
.sg-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px var(--font-h); }
.sg-t small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-badge { position: absolute; top: 8px; right: 10px; font-size: 14px; filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6)); }
.nav-title { display: flex; align-items: center; gap: 8px; width: 100%; margin: 10px 0 2px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--faint); font: 700 11px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-align: left; transition: color 0.15s, background 0.15s; }
.nav-title:hover { color: var(--text); background: var(--bg-2); }
.nav-title span { flex: 1; }
.nav-title em { padding: 0 7px; border-radius: 99px; background: rgba(61, 220, 151, 0.14); color: var(--ok); font: 700 10px var(--font); font-style: normal; letter-spacing: 0; }
.nav-title .chev { font-style: normal; font-size: 15px; line-height: 1; transform: rotate(90deg); transition: transform 0.2s; }
.nav-group.collapsed .nav-title .chev { transform: rotate(0deg); }
.nav-items { display: grid; gap: 2px; }
.nav-group.collapsed .nav-items { display: none; }
.nav { padding: 7px 10px 7px 8px; gap: 10px; font-weight: 600; font-size: 14px; }
.nav .ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--bg-2); font-size: 15px; transition: background 0.15s, transform 0.15s; }
.nav:hover .ico { background: var(--card-2); transform: scale(1.06); }
.nav.active .ico { background: var(--grad); box-shadow: 0 6px 16px -4px rgba(109, 124, 255, 0.7); }
.nav .dot { width: 7px; height: 7px; }
.nav-back { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding-top: 12px; color: var(--faint); }
:root[data-theme='light'] .nav .ico { background: rgba(120, 110, 220, 0.1); }
@media (max-width: 920px) {
  .side { max-height: none; overflow-x: auto; overflow-y: hidden; }
  .side-guild { display: none; }
  .nav-items { display: contents !important; }
  .nav-title { display: none; }
  .nav .ico { width: 24px; height: 24px; background: transparent; }
  .nav.active .ico { background: transparent; box-shadow: none; }
  .nav-back { margin-top: 0; border-top: 0; padding-top: 7px; }
}

/* ═══════════════ Дзвіночок сповіщень ═══════════════ */
.bell-btn { position: relative; min-width: 38px; padding: 6px 10px; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--err); color: #fff; font: 800 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pal-pop 0.25s; }
.topbar { overflow: visible; }
.bell-panel { position: absolute; top: calc(100% - 6px); right: 70px; z-index: 60; width: min(380px, calc(100vw - 24px)); display: flex; flex-direction: column; max-height: min(520px, 75vh); overflow: hidden; border: 1px solid var(--line-2); border-radius: 18px; background: var(--solid); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7); animation: pal-pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
:root[data-theme='light'] .bell-panel { background: #fff; box-shadow: 0 30px 60px -20px rgba(60, 50, 140, 0.4); }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-list { overflow-y: auto; padding: 6px; display: grid; gap: 2px; }
.bell-item { position: relative; display: flex; gap: 11px; padding: 10px 12px; border-radius: 13px; text-decoration: none; color: inherit; cursor: pointer; transition: background 0.15s; }
a.bell-item:hover, .bell-item:hover { background: var(--bg-2); }
.bell-item.read { opacity: 0.6; }
.bi-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--bg-2); font-size: 16px; }
.bell-item.err .bi-ico { background: rgba(255, 93, 108, 0.16); }
.bell-item.warn .bi-ico { background: rgba(255, 204, 77, 0.16); }
.bi-t { min-width: 0; flex: 1; }
.bi-t b { display: block; font-size: 14px; }
.bi-t p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.bi-t small { color: var(--faint); font-size: 11.5px; }
.bi-dot { width: 8px; height: 8px; margin-top: 6px; flex: none; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.bell-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.bell-empty div { margin-bottom: 6px; font-size: 30px; }
@media (max-width: 560px) { .bell-panel { position: fixed; top: 66px; right: 12px; left: 12px; width: auto; } }

/* ═══════════════ Сезонні теми (налаштовуються в адмін-панелі) ═══════════════ */
html[data-season] body, html[data-season] .topbar { transition: background-color 0.5s, border-color 0.5s; }
html[data-season='summer'] {
  --accent: #f59e0b; --accent-2: #06b6d4; --a1: 245, 158, 11; --a2: 6, 182, 212; --a3: 52, 211, 153; --gold: #fde047;
  --bg: #07161c; --bg-g1: #07161c; --bg-g2: #0a2630; --bg-g3: #1b1a10; --blob1: #f59e0b; --blob2: #0891b2; --blob3: rgba(52, 211, 153, 0.5); --solid: #0e222a;
}
html[data-season='autumn'] {
  --accent: #f97316; --accent-2: #dc2626; --a1: 249, 115, 22; --a2: 220, 38, 38; --a3: 234, 179, 8; --gold: #fbbf24;
  --bg: #170d09; --bg-g1: #170d09; --bg-g2: #26130b; --bg-g3: #1f0d12; --blob1: #ea580c; --blob2: #b91c1c; --blob3: rgba(234, 179, 8, 0.45); --solid: #241410;
}
html[data-season='winter'] {
  --accent: #38bdf8; --accent-2: #818cf8; --a1: 56, 189, 248; --a2: 129, 140, 248; --a3: 186, 230, 253; --gold: #bae6fd;
  --bg: #08111f; --bg-g1: #08111f; --bg-g2: #0c1d36; --bg-g3: #0a1830; --blob1: #0284c7; --blob2: #6366f1; --blob3: rgba(186, 230, 253, 0.4); --solid: #0f1b30;
}
html[data-season='spring'] {
  --accent: #34d399; --accent-2: #f472b6; --a1: 52, 211, 153; --a2: 244, 114, 182; --a3: 253, 224, 71; --gold: #fde68a;
  --bg: #08150f; --bg-g1: #08150f; --bg-g2: #0d2418; --bg-g3: #1c0f1a; --blob1: #059669; --blob2: #db2777; --blob3: rgba(253, 224, 71, 0.4); --solid: #11241b;
}
html[data-season='newyear'] {
  --accent: #ef4444; --accent-2: #22c55e; --a1: 239, 68, 68; --a2: 34, 197, 94; --a3: 250, 204, 21; --gold: #facc15;
  --bg: #0b1410; --bg-g1: #0b1410; --bg-g2: #16120f; --bg-g3: #0a1a12; --blob1: #b91c1c; --blob2: #15803d; --blob3: rgba(250, 204, 21, 0.5); --solid: #151c17;
}
/* Світлий режим: лишаємо світлий фон, змінюються лише акценти та відтінок фону */
html[data-season][data-theme='light'] { --bg: #f6f5fb; --solid: #fff; }
html[data-season='summer'][data-theme='light'] .bg { background: linear-gradient(165deg, #fffbeb 0%, #ecfeff 55%, #f0fdf4 100%); }
html[data-season='autumn'][data-theme='light'] .bg { background: linear-gradient(165deg, #fff7ed 0%, #fef2f2 55%, #fffbeb 100%); }
html[data-season='winter'][data-theme='light'] .bg { background: linear-gradient(165deg, #f0f9ff 0%, #eef2ff 55%, #f8fafc 100%); }
html[data-season='spring'][data-theme='light'] .bg { background: linear-gradient(165deg, #f0fdf4 0%, #fdf2f8 55%, #fefce8 100%); }
html[data-season='newyear'][data-theme='light'] .bg { background: linear-gradient(165deg, #fef2f2 0%, #f0fdf4 55%, #fefce8 100%); }
html[data-season][data-theme='light'] .brand b { background: linear-gradient(90deg, #1f2937, var(--accent)); -webkit-background-clip: text; background-clip: text; }
html[data-season='newyear'] .brand-mark, html[data-season='winter'] .brand-mark { box-shadow: 0 4px 22px rgba(var(--a1), 0.55); }

/* Шар частинок (сніг, листя, пелюстки, світлячки) */
#season-fx { position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }

/* Новорічна гірлянда над верхньою панеллю */
html[data-season='newyear'] .topbar::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; pointer-events: none;
  background:
    radial-gradient(circle at 6px 4px, #ef4444 0 3px, transparent 4px) 0 0 / 54px 10px repeat-x,
    radial-gradient(circle at 6px 4px, #facc15 0 3px, transparent 4px) 18px 0 / 54px 10px repeat-x,
    radial-gradient(circle at 6px 4px, #22c55e 0 3px, transparent 4px) 36px 0 / 54px 10px repeat-x;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.7)); animation: lights 2.4s ease-in-out infinite alternate;
}
html[data-season='newyear'] .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #facc15 20%, #ef4444 50%, #22c55e 80%, transparent); opacity: 0.6; pointer-events: none; }
@keyframes lights { from { opacity: 0.55; } to { opacity: 1; } }
html[data-fx='off'] #season-fx, html[data-fx='off'] .topbar::before { display: none; }
@media (prefers-reduced-motion: reduce) { #season-fx, html[data-season='newyear'] .topbar::before { display: none; } }

/* Адмін: вибір сезонної теми */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.theme-tile { display: grid; gap: 4px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); text-align: left; cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.theme-tile:hover { transform: translateY(-2px); border-color: var(--line-2); }
.theme-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--a1), 0.35); }
.tt-swatch { display: grid; place-items: center; height: 64px; margin-bottom: 6px; border-radius: 11px; }
.tt-swatch i { font-style: normal; font-size: 28px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.theme-tile small { color: var(--muted); font-size: 12px; min-height: 16px; }
.theme-opts { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-bottom: 14px; }
.theme-opt { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.theme-opt select { width: auto; }
.theme-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ═══════════════ Анімації ═══════════════ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0ms), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* підсвітка за курсором */
.card:not(.ov-hero):hover, .feature:hover, .server:hover, .stat:hover, .mod-tile:hover, .cmd-card:hover, .step:hover, .theme-tile:hover {
  background-image: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--a1), 0.16), transparent 62%);
}
/* блик на головній кнопці */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); transform: translateX(-120%); }
.btn-primary:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }
/* живий градієнт заголовка */
.grad { background-size: 220% 100%; animation: grad-shift 7s ease-in-out infinite alternate; }
@keyframes grad-shift { to { background-position: 100% 0; } }
/* лого та іконки */
.brand-mark { transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.1); }
.feature .ico, .nav .ico { transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.feature:hover .ico { transform: translateY(-3px) rotate(-6deg) scale(1.12); }
.nav:hover .ico { transform: scale(1.15) rotate(-5deg); }
/* картка-прев'ю на головній: м'яке «дихання» та плавний нахил */
.mock { transition: transform 0.25s ease-out; will-change: transform; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -8px; } }
/* індикатор «увімкнено» пульсує */
.nav .dot.on, .pal-item .dot.on { animation: pulse-dot 2.6s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 2px var(--ok); opacity: 0.75; } }
/* перемикачі та кнопки — пружина */
.switch .track::after { transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.btn:active { transform: translateY(1px) scale(0.98); }
/* тост з'являється знизу */
.toast { animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
/* прогрес-бар «Швидкого старту» заповнюється */
.progress > i { animation: fill 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.ring { animation: ring-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
@keyframes ring-in { from { opacity: 0; transform: scale(0.8) rotate(-40deg); } }

/* ═══════════════ Святкові теми ═══════════════ */
html[data-season='independence'] {
  --accent: #3b82f6; --accent-2: #facc15; --a1: 59, 130, 246; --a2: 250, 204, 21; --a3: 96, 165, 250; --gold: #facc15;
  --bg: #07142b; --bg-g1: #07142b; --bg-g2: #0a1f45; --bg-g3: #1a1a08; --blob1: #1d4ed8; --blob2: #ca8a04; --blob3: rgba(250, 204, 21, 0.45); --solid: #0e1d3a;
}
html[data-season='halloween'] {
  --accent: #f97316; --accent-2: #a855f7; --a1: 249, 115, 22; --a2: 168, 85, 247; --a3: 251, 191, 36; --gold: #fb923c;
  --bg: #0d0814; --bg-g1: #0d0814; --bg-g2: #1a0d24; --bg-g3: #1a0f08; --blob1: #c2410c; --blob2: #7e22ce; --blob3: rgba(251, 191, 36, 0.35); --solid: #1a1224;
}
html[data-season='easter'] {
  --accent: #fbbf24; --accent-2: #a78bfa; --a1: 251, 191, 36; --a2: 167, 139, 250; --a3: 110, 231, 183; --gold: #fde68a;
  --bg: #120f26; --bg-g1: #120f26; --bg-g2: #1a1636; --bg-g3: #0f1f1a; --blob1: #d97706; --blob2: #7c3aed; --blob3: rgba(110, 231, 183, 0.4); --solid: #1b1736;
}
html[data-season='womensday'] {
  --accent: #f472b6; --accent-2: #facc15; --a1: 244, 114, 182; --a2: 250, 204, 21; --a3: 134, 239, 172; --gold: #fde68a;
  --bg: #170a15; --bg-g1: #170a15; --bg-g2: #2a0f26; --bg-g3: #14200f; --blob1: #be185d; --blob2: #ca8a04; --blob3: rgba(134, 239, 172, 0.35); --solid: #251224;
}
html[data-season='birthday'] {
  --accent: #a855f7; --accent-2: #f59e0b; --a1: 168, 85, 247; --a2: 245, 158, 11; --a3: 34, 211, 238; --gold: #fcd34d;
  --bg: #130b25; --bg-g1: #130b25; --bg-g2: #1d1038; --bg-g3: #0a1a28; --blob1: #7e22ce; --blob2: #d97706; --blob3: rgba(34, 211, 238, 0.4); --solid: #1d1436;
}
html[data-season='independence'][data-theme='light'] .bg { background: linear-gradient(165deg, #eff6ff 0%, #fefce8 100%); }
html[data-season='halloween'][data-theme='light'] .bg { background: linear-gradient(165deg, #fff7ed 0%, #faf5ff 100%); }
html[data-season='easter'][data-theme='light'] .bg { background: linear-gradient(165deg, #fffbeb 0%, #f5f3ff 55%, #ecfdf5 100%); }
html[data-season='womensday'][data-theme='light'] .bg { background: linear-gradient(165deg, #fdf2f8 0%, #fefce8 55%, #f0fdf4 100%); }
html[data-season='birthday'][data-theme='light'] .bg { background: linear-gradient(165deg, #faf5ff 0%, #fffbeb 55%, #ecfeff 100%); }
/* прапор у шапці в День Незалежності */
html[data-season='independence'] .topbar::before { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; pointer-events: none; background: linear-gradient(90deg, #0057b7 50%, #ffd700 50%); opacity: 0.9; }
/* павутиння в куті на Гелловін */
html[data-season='halloween'] .topbar::before { content: '🕸️'; position: absolute; right: 8px; bottom: -22px; font-size: 22px; pointer-events: none; opacity: 0.8; }
html[data-season='birthday'] .topbar::before { content: '🎈 🎉 🎂 🎉 🎈'; position: absolute; left: 50%; transform: translateX(-50%); bottom: -20px; font-size: 14px; letter-spacing: 6px; pointer-events: none; white-space: nowrap; opacity: 0.85; }

/* ═══════════════ Заставка першого візиту ═══════════════ */
html.intro-on::before { content: ''; position: fixed; inset: 0; z-index: 9998; background: radial-gradient(circle at 50% 45%, rgba(var(--a1), 0.35), transparent 55%), var(--bg-g1, #0b0a1a); animation: intro-bg 2.1s ease forwards; }
html.intro-on::after { content: '✨ ЄСяйво'; position: fixed; left: 50%; top: 50%; z-index: 9999; transform: translate(-50%, -50%); padding: 0 12px; white-space: nowrap; font: 800 clamp(34px, 8vw, 64px) var(--font-h); letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: intro-logo 2.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; pointer-events: none; }
html.intro-on body { overflow: hidden; }
@keyframes intro-bg { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes intro-logo { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); filter: blur(10px); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.15); filter: blur(6px); } }

/* ═══════════════ Інтерактивний приклад, цифри, вітрина ═══════════════ */
.demo { display: grid; gap: 12px; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tabs button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.demo-tabs button:hover { color: var(--text); border-color: var(--line-2); }
.demo-tabs button.on { color: #fff; border-color: transparent; background: var(--grad); }
.demo-stage { display: grid; gap: 10px; min-height: 250px; align-content: start; }
.demo-card.pop { animation: pal-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.v2 .btns button { padding: 6px 14px; border: 0; border-radius: 8px; font: 600 13px var(--font); color: #fff; background: #2b2d45; cursor: pointer; transition: transform 0.12s, filter 0.15s; }
.v2 .btns button.p { background: #5865f2; }
.v2 .btns button:hover { filter: brightness(1.2); transform: translateY(-1px); }
.v2 .btns button:active { transform: scale(0.96); }
.demo-replies { min-height: 20px; }
.demo-bubble { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; animation: rise 0.3s ease backwards; }
.demo-bubble p { margin: 0; color: var(--muted); white-space: pre-line; }
.demo-bubble.ok { border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.07); }
.demo-bubble.typing { display: flex; gap: 5px; width: max-content; padding: 12px 14px; }
.demo-bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.demo-bubble.typing i:nth-child(2) { animation-delay: 0.15s; } .demo-bubble.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }
.demo-hint { margin: 0; font-size: 12.5px; text-align: center; }
.numbers { padding: 12px 0 24px; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.big-stat { padding: 22px 16px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.big-stat b { display: block; font: 800 clamp(30px, 5vw, 52px) / 1.1 var(--font-h); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.big-stat span { color: var(--muted); font-size: 14px; }
.marquee { position: relative; overflow: hidden; margin: 14px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: marquee var(--dur, 40s) linear infinite; }
.marquee-rev .track { animation-direction: reverse; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.rv { margin: 0; width: 320px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.rv blockquote { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.rv figcaption { color: var(--muted); font-size: 13px; }
.pt { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-decoration: none; white-space: nowrap; transition: border-color 0.15s, transform 0.15s; }
a.pt:hover { border-color: var(--accent); transform: translateY(-2px); }
.pt-i { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--grad); color: #fff; font: 800 18px var(--font-h); }
.pt small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .big-stats { grid-template-columns: 1fr; } .rv { width: 260px; } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } .marquee .track { animation: none; } }

/* Адмін: вітрина */
.sc-list { display: grid; gap: 10px; margin-bottom: 12px; }
.sc-row { display: grid; grid-template-columns: auto 1fr 1.4fr 1fr auto; gap: 8px; align-items: center; }
.sc-row.sc-rev { grid-template-columns: minmax(160px, 0.7fr) 2fr auto; align-items: start; }
.sc-col { display: grid; gap: 8px; }
@media (max-width: 800px) { .sc-row, .sc-row.sc-rev { grid-template-columns: 1fr; } }
.mock.demo { animation: none; will-change: auto; }

/* ═══════════════ Перегляд карточок Discord біля налаштувань ═══════════════ */
.main.has-pv { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
.main.has-pv > * { grid-column: 1; }
.main.has-pv > .card:first-child { grid-column: 1 / -1; }
.main.has-pv > .pv-card { grid-column: 2; grid-row: 2 / span 40; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.pv-head { display: grid; gap: 2px; margin-bottom: 12px; }
.pv-head small { color: var(--faint); }
.pv-item + .pv-item { margin-top: 14px; }
.pv-item .lbl { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dc-wrap { padding: 12px; border-radius: 12px; background: #313338; }
.dc-wrap .v2c { background: #2b2d31; }
.dc-wrap .v2c .row .txt, .dc-wrap .v2c .txt { font-size: 14px; }
.dc-mention { padding: 0 3px; border-radius: 4px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 500; }
.v2c code { padding: 1px 5px; border-radius: 4px; background: #1e1f22; font-size: 13px; }
.dc-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 14px; }
.dc-fields dt { color: #949ba4; } .dc-fields dd { margin: 0; color: #dbdee1; }
.dc-msg { display: flex; gap: 10px; color: #dbdee1; }
.dc-ava { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--grad); }
.dc-name { color: #fff; font-size: 15px; } .dc-name em { margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: #5865f2; font: 700 10px var(--font); font-style: normal; vertical-align: middle; }
.dc-plain { font-size: 15px; overflow-wrap: anywhere; }
.v2c .btns span { cursor: default; }
@media (max-width: 1100px) {
  .main.has-pv { grid-template-columns: minmax(0, 1fr); }
  .main.has-pv > .pv-card { grid-column: 1; grid-row: auto; position: static; max-height: none; order: -1; }
  .main.has-pv > .card:first-child { order: -2; }
}

/* ═══════════════ Анімований перехід між модулями ═══════════════ */
.main.enter-next { animation: slide-next 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.main.enter-prev { animation: slide-prev 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slide-next { from { opacity: 0; transform: translateX(26px); } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-26px); } }
.nav.active .ico { animation: nav-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes nav-pop { from { transform: scale(0.6) rotate(-20deg); } }

/* ═══════════════ Ефект «збережено» ═══════════════ */
.savebar .btn.saved { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 26px -6px rgba(34, 197, 94, 0.7); animation: saved-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes saved-pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.card.flash-ok { animation: flash-ok 1.2s ease var(--fd, 0ms); }
@keyframes flash-ok { 0% { box-shadow: var(--shadow), 0 0 0 0 rgba(61, 220, 151, 0); } 25% { box-shadow: var(--shadow), 0 0 0 3px rgba(61, 220, 151, 0.55), 0 0 36px rgba(61, 220, 151, 0.35); border-color: rgba(61, 220, 151, 0.7); } 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(61, 220, 151, 0); } }

/* Адмін: карта серверів і живий ефір */
.map-wrap { border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(80% 90% at 50% 40%, rgba(var(--a1), 0.1), transparent), var(--bg-2); overflow: hidden; }
.map-svg { display: block; width: 100%; height: auto; }
.bubble { cursor: pointer; transform-box: fill-box; transform-origin: center; animation: bub-in 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; animation-delay: var(--d, 0ms); transition: filter 0.15s; outline: none; }
.bubble:hover, .bubble:focus { filter: brightness(1.25) drop-shadow(0 0 10px rgba(var(--a1), 0.6)); }
.bubble circle { transition: transform 0.2s; transform-box: fill-box; transform-origin: center; }
.bubble:hover circle { transform: scale(1.06); }
.bt { fill: #fff; font: 700 12px var(--font); pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, 0.35); stroke-width: 2px; }
@keyframes bub-in { from { opacity: 0; transform: scale(0.2); } }
.map-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); min-height: 48px; }
.map-info code { margin-left: auto; color: var(--faint); }
.chip-btn { padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.chip-btn.on { color: #fff; border-color: transparent; background: var(--grad); }
.adm-chips + .map-wrap, .card > .adm-chips { margin-bottom: 12px; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 93, 108, 0.14); color: var(--err); font: 800 11px var(--font); letter-spacing: 0.1em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--err); animation: live-pulse 1.4s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 93, 108, 0.7); } 100% { box-shadow: 0 0 0 9px rgba(255, 93, 108, 0); } }
.live-list { display: grid; gap: 8px; }
.live-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 12px; background: var(--bg-2); animation: live-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.live-item.ok { border-left-color: var(--ok); } .live-item.bad { border-left-color: var(--err); } .live-item.gold { border-left-color: var(--yellow); }
.live-item.fresh { box-shadow: 0 0 0 2px rgba(var(--a1), 0.5), 0 0 28px rgba(var(--a1), 0.3); background: rgba(var(--a1), 0.1); }
.li-t { display: grid; gap: 2px; min-width: 0; } .li-t span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.live-item small { color: var(--faint); white-space: nowrap; }
@keyframes live-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); } }
@media (max-width: 560px) {
  .topbar { gap: 5px; padding: 0 8px; }
  .topbar .btn-sm, .topbar .theme-btn { min-width: 0; padding: 6px 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .btn-admin { min-height: 36px; padding: 0 10px; }
  .user-pill { gap: 4px; }
  .user-pill .tag { display: none; }
}
.layout { overflow-x: clip; }

/* робот-логотип */
.brand-mark.has-robot { background: none; box-shadow: none; width: 48px; height: 44px; border-radius: 0; overflow: visible; }
.brand-mark.has-robot svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 10px rgba(var(--a1), 0.5)); }
.av[data-robot], .av.has-robot { background: none !important; overflow: visible; }
.av.has-robot svg { width: 100%; height: 100%; overflow: visible; }
@media (max-width: 640px) { .brand-mark.has-robot { width: 34px; height: 32px; } }


/* Банер технічних робіт */
.sys-banner { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 44px 9px 16px; font-size: 14px; line-height: 1.4; text-align: center; border-bottom: 1px solid var(--line); background: rgba(88, 101, 242, 0.16); color: var(--text, inherit); }
.sys-banner.sys-warn { background: rgba(255, 204, 77, 0.16); border-bottom-color: rgba(255, 204, 77, 0.45); }
.sys-banner.sys-down { background: rgba(255, 93, 108, 0.16); border-bottom-color: rgba(255, 93, 108, 0.5); }
.sys-banner .sb-tx { max-width: 900px; }
.sys-banner .sb-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: 0.7; }
.sys-banner .sb-x:hover, .sys-banner .sb-x:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.adm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.adm-note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); display: flex; gap: 10px; align-items: flex-start; }
.adm-note .grow { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-note small { display: block; color: var(--muted, #8b93a7); margin-top: 2px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-row .btn.on { outline: 2px solid var(--accent); }

.fin-goals { display: grid; gap: 12px; }
.fin-goal { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: grid; gap: 8px; }
.fin-goal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fin-goal-head b { flex: 1; min-width: 160px; }
.fin-bar { height: 12px; border-radius: 999px; background: rgba(127, 127, 127, 0.18); overflow: hidden; }
.fin-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.fin-goal.done .fin-bar i { background: var(--ok); }
.fin-goal.over:not(.done) .fin-bar i { background: var(--err); }
.fin-goal-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.fin-goal-meta .muted { color: var(--muted, #8b93a7); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

.adm-nav-title { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); opacity: 0.85; }
.adm-nav-title:first-child { padding-top: 4px; }
@media (max-width: 900px) { .adm-nav-title { display: none; } }
.fin-seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.fin-seg button { padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.fin-seg button:hover { background: rgba(var(--a1), 0.1); color: var(--text); }
.fin-seg button.on { background: linear-gradient(135deg, rgba(var(--a1), 0.32), rgba(var(--a2), 0.22)); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
:root[data-theme='light'] .fin-seg button.on { color: #2a1f7a; }

/* ── Конструктор повідомлень: панель форматування, блоки V2, перегляд Markdown ── */
.mb-editor { display: grid; gap: 6px; position: relative; }
.mb-toolbar { display: flex; flex-wrap: wrap; gap: 4px; }
.mb-tb { min-width: 32px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: inherit; font: 600 13px var(--font, inherit); cursor: pointer; }
.mb-tb:hover { background: rgba(var(--a1), 0.18); border-color: rgba(var(--a1), 0.5); }
.mb-pop { padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(20, 18, 34, 0.96); display: grid; gap: 8px; }
.mb-pop[hidden] { display: none; }
.mb-pop-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; max-height: 210px; overflow: auto; }
.mb-grid-wide { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.mb-grid button, .mb-fonts button { min-height: 34px; padding: 2px 6px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.04); color: inherit; font-size: 18px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mb-grid-wide button { font-size: 14px; }
.mb-grid button:hover, .mb-fonts button:hover { border-color: rgba(var(--a1), 0.5); background: rgba(var(--a1), 0.15); }
.mb-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.mb-fonts button { font-size: 15px; text-align: left; }
.mb-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; cursor: pointer; }
.mb-blocks { display: grid; gap: 10px; margin-top: 6px; }
.mb-block { padding: 12px; border-radius: 12px; border: 1px dashed rgba(var(--a1), 0.45); background: rgba(255, 255, 255, 0.02); display: grid; gap: 10px; }
.mb-block-head { display: flex; align-items: center; gap: 6px; }
.mb-editing { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--a1), 0.16); border: 1px solid rgba(var(--a1), 0.5); }
.mb-sticky { position: sticky; top: 84px; display: grid; gap: 6px; }
.mb-sticky .msg-preview { position: static; }
.v2c.no-accent { border-left-color: transparent; }
.v2c .txt > div { min-height: 1em; }
.v2c .md-gap { height: 0.6em; }
.v2c .md-h1 { font-size: 22px; font-weight: 800; color: #fff; }
.v2c .md-h2 { font-size: 18px; font-weight: 800; color: #fff; }
.v2c .md-h3 { font-size: 16px; font-weight: 700; color: #fff; }
.v2c .md-sub { font-size: 12px; color: #949ba4; }
.v2c .md-quote { padding-left: 10px; border-left: 4px solid #4e5058; }
.v2c .md-pre { margin: 4px 0; padding: 8px 10px; border-radius: 6px; background: #1e1f22; font-size: 13px; white-space: pre-wrap; }
.v2c .md-spoiler { padding: 0 3px; border-radius: 4px; background: #1e1f22; color: transparent; cursor: pointer; transition: color 0.2s; }
.v2c .md-spoiler:hover { color: inherit; }
.v2c .md-ts { padding: 0 3px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.v2c a { color: #00a8fc; }
.md-mention, .v2c .md-mention { padding: 0 3px; border-radius: 4px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 600; }
.md-mention-line { margin-bottom: 6px; }
.v2c .v2sep { height: 4px; }
.v2c .v2sep.big { height: 16px; }
.v2c .v2sep.line { height: auto; border-top: 1px solid #3f4147; margin: 2px 0; }
.v2c .v2sep.line.big { margin: 10px 0; }
.v2c .gal { display: grid; gap: 4px; border-radius: 8px; overflow: hidden; }
.v2c .gal img { width: 100%; height: 100%; max-height: 220px; object-fit: cover; display: block; }
.v2c .gal-2, .v2c .gal-4 { grid-template-columns: 1fr 1fr; }
.v2c .gal-3 { grid-template-columns: 2fr 1fr; }
.v2c .gal-3 img:first-child { grid-row: span 2; }
.v2c .gal img.spoiler { filter: blur(18px); }
@media (max-width: 860px) { .mb-sticky { position: static; } }
