* { box-sizing: border-box; }

:root {
  --bg: #0f1218;
  --bg-2: #161b24;
  --bg-3: #1a2130;
  --border: #232a36;
  --border-2: #2a313c;
  --text: #e6e8eb;
  --muted: #9aa4b2;
  --muted-2: #5b6573;
  --accent: #2d6cdf;
  --accent-hover: #3a7bf0;
  --danger: #c0392b;
  --danger-hover: #d84539;
  --sidebar-w: 264px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

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

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger-hover); }
.btn--success { background: #2e8b57; color: #fff; }
.btn--success:hover { background: #37a065; }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
}
.btn--ghost:hover { background: var(--bg-3); color: var(--text); }
.btn--secondary { background: var(--bg-3); }

/* ===== Основная область ===== */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left .25s ease;
}
.app.nav-collapsed .main { margin-left: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__title { font-weight: 600; font-size: 16px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.content { padding: 20px; }

/* ===== Сервисный баннер (сообщение администратора) ===== */
.service-banner {
  margin: 0 20px;
  padding: 8px 14px;
  border-radius: 6px;
  background: #3a1515;
  border: 1px solid #e74c3c;
  color: #ff4d4d;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.service-banner.hidden { display: none; }

/* ===== Контент-заглушки ===== */
.placeholder-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  color: var(--muted);
}
.placeholder-block h2 { color: var(--text); margin: 0 0 8px; font-size: 18px; }
.placeholder-block .hint { font-size: 13px; }

/* ===== Бейджи ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--stop { background: #3a1d1d; color: #ff6b6b; }
.badge--run { background: #1e4d2b; color: #7bed9f; }
.badge--pending { background: #2a2f3a; color: #f1c40f; }
.badge--danger { background: #3a1515; color: #ff8a80; }
.badge--muted { background: #2a2f3a; color: #f1c40f; }
.badge--banned { background: #3a1d1d; color: #ff6b6b; }
.badge--gold { background: #3a3010; color: #f1c40f; }
