/* =========================================================================
   Uzel — design system v3
   Черно-розовый минимализм. Реальная типографика, спокойный ритм,
   аккуратные микровзаимодействия. Никаких emoji-заголовков и радужных
   градиентов.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Neutrals */
  --c-bg:       #0a0a0d;
  --c-surface:  #101015;
  --c-surface-2:#16161d;
  --c-surface-3:#1e1e28;
  --c-line:     #23232f;
  --c-line-2:   #2f2f3d;
  --c-line-3:   #3a3a4a;

  --c-text:      #f2f2f7;
  --c-text-2:    #b7b7c6;
  --c-text-3:    #7a7a8a;
  --c-text-4:    #4a4a5a;

  /* Accent */
  --c-accent:      #ff2d78;
  --c-accent-hi:   #ff6ba0;
  --c-accent-lo:   #b41855;
  --c-accent-glow: rgba(255, 45, 120, 0.28);
  --c-accent-soft: rgba(255, 45, 120, 0.10);
  --c-accent-line: rgba(255, 45, 120, 0.22);

  /* Semantic */
  --c-ok:    #22c55e;
  --c-warn:  #f59e0b;
  --c-err:   #ef4444;

  /* Spacing (8px grid) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;

  /* Radii */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-full: 999px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 8px 24px rgba(0,0,0,.32);
  --sh-3: 0 20px 60px rgba(0,0,0,.5);
  --sh-glow: 0 0 0 1px var(--c-accent-line), 0 12px 40px var(--c-accent-glow);

  /* Layout */
  --side-w:   248px;
  --header-h: 60px;

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 380ms;
  --ease:  cubic-bezier(.22,1,.36,1);
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-feature-settings: 'ss01', 'cv11';
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
}
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--c-accent-soft); color: var(--c-text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-line-2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-line-3); }

/* --- ambient background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255,45,120,.10), transparent 65%),
    radial-gradient(900px 600px at -5% 90%, rgba(255,45,120,.06), transparent 60%),
    var(--c-bg);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}

/* --- typography --- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: var(--c-text); }
h1 { font-size: 24px; letter-spacing: -0.02em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p  { margin: 0; color: var(--c-text-2); }
code, pre { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; font-size: 12px; }

/* --- motion primitives --- */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise    { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop     { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

/* --- utility --- */
.stack { display: flex; flex-direction: column; }
.row   { display: flex; align-items: center; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.ml-auto { margin-left: auto; }
.text-2 { color: var(--c-text-2); }
.text-3 { color: var(--c-text-3); }
.hide   { display: none !important; }

/* ==== boot ==== */
.boot {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  animation: fadeIn .3s var(--ease);
}
.boot-orb {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--c-line-2);
  border-top-color: var(--c-accent);
  animation: spin 800ms linear infinite;
}
.boot-label {
  font-size: 12px;
  color: var(--c-text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ==== toast ==== */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: var(--c-surface-2);
  color: var(--c-text);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  box-shadow: var(--sh-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease);
  z-index: 9999;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.toast::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-text-3);
}
.toast.show    { opacity: 1; transform: translateX(-50%); }
.toast.success::before { background: var(--c-ok); box-shadow: 0 0 12px rgba(34,197,94,.6); }
.toast.error::before   { background: var(--c-err); box-shadow: 0 0 12px rgba(239,68,68,.6); }

/* ==== buttons ==== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--dur-1), border-color var(--dur-1), transform 80ms;
  user-select: none;
}
.btn:hover  { background: var(--c-surface-3); border-color: var(--c-line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn.primary {
  background: var(--c-accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px var(--c-accent-glow);
}
.btn.primary:hover { background: var(--c-accent-hi); }

.btn.ghost { background: transparent; border-color: transparent; color: var(--c-text-2); }
.btn.ghost:hover { background: var(--c-surface-2); color: var(--c-text); }

.btn.danger { color: var(--c-err); border-color: transparent; background: transparent; }
.btn.danger:hover { background: rgba(239,68,68,.08); }

.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 12px 20px; font-size: 14px; }

.btn .icon { width: 15px; height: 15px; flex: 0 0 auto; }

/* ==== chips / tags ==== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--c-text-2);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
}
.chip.pink { color: var(--c-accent-hi); background: var(--c-accent-soft); border-color: var(--c-accent-line); }
.chip.ok   { color: var(--c-ok); background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.24); }
.chip.warn { color: var(--c-warn); background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.24); }
.chip.dot::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .8;
}

/* ==== inputs ==== */
.input, textarea.input, select.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  color: var(--c-text);
  outline: none;
  transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-1);
  font-family: inherit;
}
.input::placeholder, textarea.input::placeholder { color: var(--c-text-4); }
.input:focus, textarea.input:focus, select.input:focus {
  border-color: var(--c-accent);
  background: var(--c-surface-2);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute; right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--c-text-3);
  border-bottom: 1.5px solid var(--c-text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select.input {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field label {
  font-size: 12px;
  color: var(--c-text-2);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.field .hint { font-size: 11px; color: var(--c-text-3); margin-top: 2px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle .track {
  position: absolute; inset: 0;
  background: var(--c-surface-3);
  border: 1px solid var(--c-line-2);
  border-radius: 999px;
  transition: background var(--dur-2), border-color var(--dur-2);
}
.toggle .track::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  top: 2px; left: 2px;
  background: var(--c-text-2);
  border-radius: 50%;
  transition: transform var(--dur-2) var(--ease), background var(--dur-2);
}
.toggle input:checked + .track { background: var(--c-accent); border-color: transparent; }
.toggle input:checked + .track::after { transform: translateX(16px); background: white; }

/* ==== cards ==== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.card-hover { transition: border-color var(--dur-2), background var(--dur-2), transform var(--dur-2) var(--ease); }
.card-hover:hover { border-color: var(--c-line-2); }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.card-sub   { font-size: 12px; color: var(--c-text-3); margin: 0 0 var(--s-4); line-height: 1.6; }

/* Grid helpers */
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.divider {
  height: 1px;
  background: var(--c-line);
  margin: var(--s-5) 0;
}

/* ==== logo / brand ==== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #1a1a24 0%, #0e0e14 100%);
  border: 1px solid var(--c-line-2);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,45,120,.35), transparent 60%);
}
.brand-mark svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

/* ============================================================
   LOGIN
   ============================================================ */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s-5);
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: var(--s-6);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  animation: pop .28s var(--ease);
}
.login-brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-bottom: var(--s-5);
}
.login-brand .brand-mark { width: 56px; height: 56px; border-radius: 16px; }
.login-brand .brand-mark svg { width: 34px; height: 34px; }
.login-title { font-size: 22px; text-align: center; }
.login-sub { text-align: center; color: var(--c-text-3); font-size: 13px; margin-top: 4px; }

.btn-discord {
  width: 100%;
  padding: 13px 18px;
  background: #5865F2;
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 80ms, box-shadow var(--dur-2), filter var(--dur-2);
  cursor: pointer;
  margin-top: var(--s-5);
}
.btn-discord:hover  { filter: brightness(1.08); box-shadow: 0 8px 30px rgba(88,101,242,.35); }
.btn-discord:active { transform: translateY(1px); }
.btn-discord svg { width: 20px; height: 20px; }

.login-features {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line);
  display: grid;
  gap: 10px;
}
.login-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--c-text-2);
}
.login-feature-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 8px var(--c-accent-glow);
  flex-shrink: 0;
}

.login-hint {
  margin-top: var(--s-4);
  font-size: 11px;
  color: var(--c-text-4);
  text-align: center;
}

/* ============================================================
   DASHBOARD SHELL — sidebar + header + main
   ============================================================ */
.dash {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-template-rows: var(--header-h) minmax(0, 1fr);
  grid-template-areas:
    "side header"
    "side main";
  min-height: 100vh;
}

/* --- Sidebar --- */
.side {
  grid-area: side;
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.side-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-line);
}
.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-3) 10px;
}
.nav-section-label {
  padding: 14px 10px 6px;
  font-size: 10px;
  color: var(--c-text-4);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--c-text-2);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-1), color var(--dur-1);
}
.nav-item .icon {
  width: 15px; height: 15px;
  color: var(--c-text-3);
  transition: color var(--dur-1);
  flex-shrink: 0;
}
.nav-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-item:hover .icon { color: var(--c-text-2); }
.nav-item.active {
  color: var(--c-text);
  background: var(--c-accent-soft);
}
.nav-item.active .icon { color: var(--c-accent-hi); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--c-accent);
  border-radius: 2px;
}
.nav-item .badge {
  margin-left: auto;
  padding: 1px 7px;
  font-size: 10px;
  color: var(--c-text-3);
  background: var(--c-surface-3);
  border-radius: var(--r-full);
  border: 1px solid var(--c-line);
}
.nav-item.soon .badge { color: var(--c-accent-hi); border-color: var(--c-accent-line); background: var(--c-accent-soft); }

.side-foot {
  padding: 12px;
  border-top: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-foot img {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--c-line-2);
  flex-shrink: 0;
}
.side-foot .name { font-size: 13px; font-weight: 500; }
.side-foot .role { font-size: 11px; color: var(--c-text-3); }
.side-foot .icon-btn {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--c-text-3);
  border-radius: 8px;
  transition: background var(--dur-1), color var(--dur-1);
}
.side-foot .icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }

/* --- Header --- */
.hdr {
  grid-area: header;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  padding: 0 var(--s-5);
  gap: var(--s-4);
  min-height: var(--header-h);
}
.hdr-title    { font-size: 14px; font-weight: 600; }
.hdr-crumb    { font-size: 12px; color: var(--c-text-3); }
.hdr-actions  { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.guild-switch {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  color: var(--c-text);
  transition: background var(--dur-1), border-color var(--dur-1);
}
.guild-switch:hover { background: var(--c-surface-3); border-color: var(--c-line-2); }
.guild-switch img { width: 24px; height: 24px; border-radius: 50%; }
.guild-switch .g-fallback {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-lo));
  color: white; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.guild-switch .g-name { font-size: 13px; font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-switch .chev {
  color: var(--c-text-3); font-size: 10px;
  transform: translateY(1px);
}

/* --- Main --- */
.main {
  grid-area: main;
  overflow-y: auto;
  padding: var(--s-6) var(--s-6) var(--s-8);
  min-width: 0;
}
@media (min-width: 1400px) {
  .main { padding-left: var(--s-7); padding-right: var(--s-7); }
}

/* Section header inside page */
.page { animation: rise .28s var(--ease); }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}
.page-title-row .eyebrow {
  font-size: 11px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 4px;
}
.page-title { font-size: 24px; margin: 0 0 6px; }
.page-subtitle { font-size: 13px; color: var(--c-text-3); max-width: 640px; line-height: 1.6; }

/* ============================================================
   SERVERS PICKER
   ============================================================ */
.picker {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.picker-hdr {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  gap: 16px;
}
.picker-main {
  flex: 1;
  padding: 48px 24px 80px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
.picker-intro {
  margin-bottom: 40px;
}
.picker-intro h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.picker-intro p {
  font-size: 14px;
  color: var(--c-text-3);
  max-width: 560px;
  line-height: 1.6;
}

.picker-section {
  margin-top: var(--s-6);
}
.picker-section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: var(--s-4);
  font-size: 11px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.picker-section-count {
  color: var(--c-text-4);
  font-size: 11px;
  font-weight: 500;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-4);
}

.server-card {
  padding: var(--s-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), background var(--dur-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise .3s var(--ease) both;
}
.server-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-line-2);
  background: var(--c-surface-2);
}
.server-card-head {
  display: flex; align-items: center; gap: 12px;
}
.server-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-surface-3), var(--c-surface-2));
  color: var(--c-accent-hi);
  font-weight: 700; font-size: 16px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.server-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-card-name { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.server-card-meta { font-size: 11px; color: var(--c-text-3); display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.server-card-cta {
  padding: 8px 10px;
  border-top: 1px solid var(--c-line);
  margin-top: 2px;
  font-size: 12px;
  color: var(--c-accent-hi);
  display: flex; justify-content: space-between; align-items: center;
  transition: color var(--dur-1);
}
.server-card--invite { border-style: dashed; opacity: 0.85; }
.server-card--invite:hover { opacity: 1; }

/* Empty */
.empty {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  padding: 60px 20px;
  animation: pop .3s var(--ease);
}
.empty-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--c-surface-2), var(--c-surface));
  border: 1px solid var(--c-line);
  display: grid; place-items: center;
  color: var(--c-accent);
}
.empty h2 { margin: 0 0 6px; font-size: 20px; }
.empty p { color: var(--c-text-3); font-size: 13px; }

/* ============================================================
   OVERVIEW page — stat cards
   ============================================================ */
.stat {
  padding: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-2);
}
.stat:hover { border-color: var(--c-line-2); }
.stat-label { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 4px; }
.stat-sub   { font-size: 12px; color: var(--c-text-3); }
.stat.accent .stat-value { color: var(--c-accent-hi); }
.stat.ok     .stat-value { color: var(--c-ok); }
.stat.warn   .stat-value { color: var(--c-warn); }

.action-card {
  padding: var(--s-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color var(--dur-2), background var(--dur-2);
  position: relative;
}
.action-card:hover { border-color: var(--c-accent-line); background: var(--c-surface-2); }
.action-card::after {
  content: '↗';
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  color: var(--c-text-4);
  transition: color var(--dur-1), transform var(--dur-1);
}
.action-card:hover::after { color: var(--c-accent-hi); transform: translate(2px, -2px); }
.action-card h3 { margin: 0 0 6px; }
.action-card p { font-size: 12px; color: var(--c-text-3); line-height: 1.5; margin: 0 0 var(--s-3); }
.action-card .action-cta { font-size: 12px; color: var(--c-accent-hi); font-weight: 500; }

/* ============================================================
   LOGS page — per-event rows
   ============================================================ */
.log-cat + .log-cat { margin-top: var(--s-6); }
.log-cat h2 {
  font-size: 13px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin: 0 0 var(--s-3);
}
.log-row {
  display: grid;
  grid-template-columns: 1fr 300px auto;
  align-items: center;
  gap: var(--s-4);
  padding: 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.log-row:hover { border-color: var(--c-line-2); background: var(--c-surface-2); }
.log-row .log-info h4 { font-size: 13px; font-weight: 500; margin: 0 0 2px; }
.log-row .log-info p { font-size: 11px; color: var(--c-text-3); margin: 0; line-height: 1.4; }
@media (max-width: 900px) {
  .log-row { grid-template-columns: 1fr; }
}

/* ============================================================
   TEXTS editor
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-5);
  width: fit-content;
  overflow-x: auto;
}
.tab {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--c-text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-1), background var(--dur-1);
  white-space: nowrap;
}
.tab:hover { color: var(--c-text-2); }
.tab.active { color: var(--c-text); background: var(--c-surface-3); }

.editor-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--s-5);
  align-items: start;
}
@media (max-width: 1100px) {
  .editor-two { grid-template-columns: 1fr; }
}

.preview {
  position: sticky;
  top: var(--s-4);
  background: linear-gradient(180deg, #313338, #2b2d31);
  border-radius: var(--r-md);
  padding: var(--s-4);
  color: #dcddde;
  font-family: 'gg sans', 'Whitney', 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.preview-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--c-text-4);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.preview-embed {
  background: #2b2d31;
  border-left: 4px solid var(--c-accent);
  border-radius: 4px;
  padding: 14px 16px;
}
.preview-embed h1 { font-size: 16px; color: white; margin: 0 0 6px; letter-spacing: 0; }
.preview-embed h3 { font-size: 13px; color: white; margin: 10px 0 4px; letter-spacing: 0; }
.preview-embed p, .preview-embed li { font-size: 13px; }
.preview-embed ul { margin: 4px 0 4px 0; padding-left: 18px; }
.preview-embed .discord-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #5865F2;
  color: white;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
}

/* Sticky footer inside pages */
.page-footer-sticky {
  position: sticky;
  bottom: 0;
  margin: var(--s-5) calc(-1 * var(--s-6)) 0;
  padding: 12px var(--s-6);
  background: linear-gradient(180deg, transparent, var(--c-bg) 60%);
  display: flex; gap: 8px; justify-content: flex-end;
  z-index: 5;
}

/* ============================================================
   Feature: role-buttons config
   ============================================================ */
.role-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--c-surface-3);
  border: 1px solid var(--c-line-2);
  border-radius: 4px;
  margin: 4px 6px 4px 0;
  color: white;
  font-size: 13px;
}

/* ============================================================
   Modal (dialog)
   ============================================================ */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 100;
  animation: fadeIn .16s;
}
.modal {
  min-width: 360px;
  max-width: 90vw;
  padding: var(--s-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  animation: pop .2s var(--ease);
}
.modal h3 { margin: 0 0 var(--s-4); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: var(--s-4); }

/* ============================================================
   Coming-soon page
   ============================================================ */
.coming-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}
.coming-soon .icon-wrap {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  color: var(--c-accent);
  margin-bottom: 20px;
}
.coming-soon h1 { margin-bottom: 6px; }
.coming-soon p { color: var(--c-text-3); font-size: 14px; margin-bottom: var(--s-5); line-height: 1.6; }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 720px) {
  .dash {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }
  .side { display: none; }
  .main { padding: var(--s-4); }
  .hdr { padding: 0 var(--s-4); }
  .guild-switch .g-name { max-width: 90px; }
}


/* ============ Fixes v3 ============ */

/* Модалка с редактором ролей — select не должен обрезаться */
.modal .select-wrap select {
  padding-right: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal .select-wrap { min-width: 90px; }

/* Иконки в кнопках нормального размера */
.btn .icon,
.icon-btn .icon,
.nav-item .icon {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
}
.side-foot .icon-btn .icon {
  width: 16px !important;
  height: 16px !important;
}

/* Кнопки-иконки должны сохранять форму */
.btn.icon-only {
  width: 32px;
  padding: 6px;
  justify-content: center;
}

/* Живая статистика — карточки с graph-line */
.stat.live {
  position: relative;
  overflow: hidden;
}
.stat.live::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100px; height: 100%;
  background: linear-gradient(90deg, transparent, var(--c-accent-soft));
  opacity: 0.6;
  pointer-events: none;
}
.stat .pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 0 var(--c-accent-glow);
  animation: pulse 1.5s infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,45,120,.5); }
  70% { box-shadow: 0 0 0 8px rgba(255,45,120,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,45,120,0); }
}

/* Cards ряд метрик */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.metric {
  padding: 16px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 4px;
}
.metric-label {
  font-size: 11px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.metric-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.metric-value.accent { color: var(--c-accent-hi); }
.metric-value.ok     { color: var(--c-ok); }
.metric-value.warn   { color: var(--c-warn); }
.metric-sub {
  font-size: 11px;
  color: var(--c-text-3);
}

/* Кликаемые nav-элементы: всегда явный курсор */
.nav-item { user-select: none; }
