/* Палитра и токены взяты из дизайн-системы Majestic ID (id.majestic-rp.ru) —
   Tailwind-тема сайта, --color-* переменные из их собранного CSS. */
:root {
  --surface:            #0e0e0e;
  --surface-secondary:  #111111;
  --surface-elevated:   #1e1e1e;

  --bg-card:            #141414;
  --bg-card-secondary:  #181818;
  --bg-card-tertiary:   #1b1b1b;
  --bg-hover:           #1a1a1a;
  --foreground:         #232323;

  --interactive:        #2a2a2a;
  --interactive-hover:  #303030;

  --border:          #212121;
  --border-secondary:#252525;
  --border-elevated: #2e2e2e;

  --text-primary:   #ffffff;
  --text-tertiary:  #dcdcdc;
  --text-secondary: #b3b3b3;
  --text-muted:     #686868;
  --icon-muted:     #464646;

  --accent:     #e81c5a;
  --accent-dim: rgba(232,28,90,0.12);

  --queue:      #8f8f8f;

  --success:    #5fbb5b;
  --success-bg: rgba(32,42,32,0.8);
  --error:      #d70016;
  --error-bg:   rgba(55,24,27,0.8);

  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 12px;

  --transition: 150ms ease;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  background: var(--surface);
  color: var(--text-primary);
  font-family: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Мягкое розовое свечение сверху страницы — эхо фонового хиро-изображения
   на логин-экране Majestic ID, без самой фотографии. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(232,28,90,0.10) 0%, transparent 60%);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 99px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.app { max-width: 1000px; margin: 0 auto; padding: 0 24px 48px; }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.brand-emoji { font-size: 1.3rem; }

.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.76rem; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-card-secondary); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 99px;
}
.live-badge--inline { padding: 3px 10px; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  animation: pulse 1.6s ease-in-out infinite;
}
.live-dot.offline { background: var(--error); animation: none; }
.live-dot.warn { background: var(--accent); }

/* ── Status card ── */
.status-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.status-name { font-size: 1.05rem; font-weight: 800; }
.status-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: var(--bg-card-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}
.badge.badge-online  { color: var(--success); background: var(--success-bg); border-color: rgba(95,187,91,0.25); }
.badge.badge-offline { color: var(--error);   background: var(--error-bg);   border-color: rgba(215,0,22,0.3); }
.badge.badge-warn    { color: var(--accent);  background: var(--accent-dim); border-color: rgba(232,28,90,0.3); }

/* ── Toolbar ── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.toolbar-title { font-weight: 700; color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }

.range-switch { display: flex; background: var(--foreground); border-radius: var(--radius); padding: 3px; gap: 2px; }
.range-switch button {
  background: transparent; border: none; color: var(--text-secondary);
  padding: 6px 13px; border-radius: var(--radius-sm);
  font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.range-switch button:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.range-switch button.active { background: rgba(255,255,255,0.10); color: #fff; }

/* ── Stat cards (число + спарклайн) ── */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px 14px;
  display: flex; flex-direction: column;
}
.stat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--accent); }
.stat-value.queue { color: var(--text-tertiary); }

.stat-chart { position: relative; height: 120px; margin: 0 -4px; }
.stat-foot { margin-top: 8px; font-size: 0.72rem; color: var(--text-muted); }

.footnote { color: var(--text-muted); font-size: 0.76rem; text-align: center; margin-top: 4px; }
